Skip to content

Commit 900a133

Browse files
wb-hx510875peze
authored andcommitted
Generated php sdk by php generator 1.1.3 version
1 parent 261fadd commit 900a133

20 files changed

+1574
-253
lines changed

src/ImageSearch/AddImageAdvanceRequest.php

Lines changed: 117 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,66 @@
88

99
class AddImageAdvanceRequest extends Model
1010
{
11+
/**
12+
* @description PicContentObject
13+
*
14+
* @var Stream
15+
*/
1116
public $picContentObject;
17+
/**
18+
* @description instanceName
19+
*
20+
* @var string
21+
*/
1222
public $instanceName;
23+
/**
24+
* @description categoryId
25+
*
26+
* @var int
27+
*/
1328
public $categoryId;
29+
/**
30+
* @description productId
31+
*
32+
* @var string
33+
*/
1434
public $productId;
35+
/**
36+
* @description picName
37+
*
38+
* @var string
39+
*/
1540
public $picName;
41+
/**
42+
* @description crop
43+
*
44+
* @var bool
45+
*/
1646
public $crop;
47+
/**
48+
* @description region
49+
*
50+
* @var string
51+
*/
1752
public $region;
53+
/**
54+
* @description customContent
55+
*
56+
* @var string
57+
*/
1858
public $customContent;
59+
/**
60+
* @description intAttr
61+
*
62+
* @var int
63+
*/
1964
public $intAttr;
65+
/**
66+
* @description strAttr
67+
*
68+
* @var string
69+
*/
2070
public $strAttr;
21-
protected $_required = [
22-
'picContentObject' => true,
23-
'instanceName' => true,
24-
'productId' => true,
25-
'picName' => true,
26-
];
27-
protected $_description = [
28-
'picContentObject' => 'PicContentObject',
29-
'instanceName' => 'instanceName',
30-
'categoryId' => 'categoryId',
31-
'productId' => 'productId',
32-
'picName' => 'picName',
33-
'crop' => 'crop',
34-
'region' => 'region',
35-
'customContent' => 'customContent',
36-
'intAttr' => 'intAttr',
37-
'strAttr' => 'strAttr',
38-
];
3971
protected $_name = [
4072
'picContentObject' => 'PicContentObject',
4173
'instanceName' => 'InstanceName',
@@ -48,4 +80,71 @@ class AddImageAdvanceRequest extends Model
4880
'intAttr' => 'IntAttr',
4981
'strAttr' => 'StrAttr',
5082
];
83+
84+
public function validate()
85+
{
86+
Model::validateRequired('picContentObject', $this->picContentObject, true);
87+
Model::validateRequired('instanceName', $this->instanceName, true);
88+
Model::validateRequired('productId', $this->productId, true);
89+
Model::validateRequired('picName', $this->picName, true);
90+
}
91+
92+
public function toMap()
93+
{
94+
$res = [];
95+
$res['PicContentObject'] = $this->picContentObject;
96+
$res['InstanceName'] = $this->instanceName;
97+
$res['CategoryId'] = $this->categoryId;
98+
$res['ProductId'] = $this->productId;
99+
$res['PicName'] = $this->picName;
100+
$res['Crop'] = $this->crop;
101+
$res['Region'] = $this->region;
102+
$res['CustomContent'] = $this->customContent;
103+
$res['IntAttr'] = $this->intAttr;
104+
$res['StrAttr'] = $this->strAttr;
105+
106+
return $res;
107+
}
108+
109+
/**
110+
* @param array $map
111+
*
112+
* @return AddImageAdvanceRequest
113+
*/
114+
public static function fromMap($map = [])
115+
{
116+
$model = new self();
117+
if (isset($map['PicContentObject'])) {
118+
$model->picContentObject = $map['PicContentObject'];
119+
}
120+
if (isset($map['InstanceName'])) {
121+
$model->instanceName = $map['InstanceName'];
122+
}
123+
if (isset($map['CategoryId'])) {
124+
$model->categoryId = $map['CategoryId'];
125+
}
126+
if (isset($map['ProductId'])) {
127+
$model->productId = $map['ProductId'];
128+
}
129+
if (isset($map['PicName'])) {
130+
$model->picName = $map['PicName'];
131+
}
132+
if (isset($map['Crop'])) {
133+
$model->crop = $map['Crop'];
134+
}
135+
if (isset($map['Region'])) {
136+
$model->region = $map['Region'];
137+
}
138+
if (isset($map['CustomContent'])) {
139+
$model->customContent = $map['CustomContent'];
140+
}
141+
if (isset($map['IntAttr'])) {
142+
$model->intAttr = $map['IntAttr'];
143+
}
144+
if (isset($map['StrAttr'])) {
145+
$model->strAttr = $map['StrAttr'];
146+
}
147+
148+
return $model;
149+
}
51150
}

src/ImageSearch/AddImageRequest.php

Lines changed: 117 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,66 @@
88

99
class AddImageRequest extends Model
1010
{
11+
/**
12+
* @description instanceName
13+
*
14+
* @var string
15+
*/
1116
public $instanceName;
17+
/**
18+
* @description categoryId
19+
*
20+
* @var int
21+
*/
1222
public $categoryId;
23+
/**
24+
* @description productId
25+
*
26+
* @var string
27+
*/
1328
public $productId;
29+
/**
30+
* @description picName
31+
*
32+
* @var string
33+
*/
1434
public $picName;
35+
/**
36+
* @description picContent
37+
*
38+
* @var string
39+
*/
1540
public $picContent;
41+
/**
42+
* @description crop
43+
*
44+
* @var bool
45+
*/
1646
public $crop;
47+
/**
48+
* @description region
49+
*
50+
* @var string
51+
*/
1752
public $region;
53+
/**
54+
* @description customContent
55+
*
56+
* @var string
57+
*/
1858
public $customContent;
59+
/**
60+
* @description intAttr
61+
*
62+
* @var int
63+
*/
1964
public $intAttr;
65+
/**
66+
* @description strAttr
67+
*
68+
* @var string
69+
*/
2070
public $strAttr;
21-
protected $_required = [
22-
'instanceName' => true,
23-
'productId' => true,
24-
'picName' => true,
25-
'picContent' => true,
26-
];
2771
protected $_name = [
2872
'instanceName' => 'InstanceName',
2973
'categoryId' => 'CategoryId',
@@ -36,16 +80,71 @@ class AddImageRequest extends Model
3680
'intAttr' => 'IntAttr',
3781
'strAttr' => 'StrAttr',
3882
];
39-
protected $_description = [
40-
'instanceName' => 'instanceName',
41-
'categoryId' => 'categoryId',
42-
'productId' => 'productId',
43-
'picName' => 'picName',
44-
'picContent' => 'picContent',
45-
'crop' => 'crop',
46-
'region' => 'region',
47-
'customContent' => 'customContent',
48-
'intAttr' => 'intAttr',
49-
'strAttr' => 'strAttr',
50-
];
83+
84+
public function validate()
85+
{
86+
Model::validateRequired('instanceName', $this->instanceName, true);
87+
Model::validateRequired('productId', $this->productId, true);
88+
Model::validateRequired('picName', $this->picName, true);
89+
Model::validateRequired('picContent', $this->picContent, true);
90+
}
91+
92+
public function toMap()
93+
{
94+
$res = [];
95+
$res['InstanceName'] = $this->instanceName;
96+
$res['CategoryId'] = $this->categoryId;
97+
$res['ProductId'] = $this->productId;
98+
$res['PicName'] = $this->picName;
99+
$res['PicContent'] = $this->picContent;
100+
$res['Crop'] = $this->crop;
101+
$res['Region'] = $this->region;
102+
$res['CustomContent'] = $this->customContent;
103+
$res['IntAttr'] = $this->intAttr;
104+
$res['StrAttr'] = $this->strAttr;
105+
106+
return $res;
107+
}
108+
109+
/**
110+
* @param array $map
111+
*
112+
* @return AddImageRequest
113+
*/
114+
public static function fromMap($map = [])
115+
{
116+
$model = new self();
117+
if (isset($map['InstanceName'])) {
118+
$model->instanceName = $map['InstanceName'];
119+
}
120+
if (isset($map['CategoryId'])) {
121+
$model->categoryId = $map['CategoryId'];
122+
}
123+
if (isset($map['ProductId'])) {
124+
$model->productId = $map['ProductId'];
125+
}
126+
if (isset($map['PicName'])) {
127+
$model->picName = $map['PicName'];
128+
}
129+
if (isset($map['PicContent'])) {
130+
$model->picContent = $map['PicContent'];
131+
}
132+
if (isset($map['Crop'])) {
133+
$model->crop = $map['Crop'];
134+
}
135+
if (isset($map['Region'])) {
136+
$model->region = $map['Region'];
137+
}
138+
if (isset($map['CustomContent'])) {
139+
$model->customContent = $map['CustomContent'];
140+
}
141+
if (isset($map['IntAttr'])) {
142+
$model->intAttr = $map['IntAttr'];
143+
}
144+
if (isset($map['StrAttr'])) {
145+
$model->strAttr = $map['StrAttr'];
146+
}
147+
148+
return $model;
149+
}
51150
}

0 commit comments

Comments
 (0)