1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace AlibabaCloud\ImageSearch\V20190325; |
4
|
|
|
|
5
|
|
|
use AlibabaCloud\ApiResolverTrait; |
6
|
|
|
use AlibabaCloud\Roa; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Resolve Api based on the method name. |
10
|
|
|
* |
11
|
|
|
* @method SearchImage searchImage(array $options = []) |
12
|
|
|
* @method DeleteImage deleteImage(array $options = []) |
13
|
|
|
* @method AddImage addImage(array $options = []) |
14
|
|
|
*/ |
15
|
|
|
class ImageSearchApiResolver |
16
|
|
|
{ |
17
|
|
|
use ApiResolverTrait; |
18
|
|
|
} |
19
|
|
|
|
20
|
|
|
class V20190325Roa extends Roa |
21
|
|
|
{ |
22
|
|
|
/** @var string */ |
23
|
|
|
public $product = 'ImageSearch'; |
24
|
|
|
|
25
|
|
|
/** @var string */ |
26
|
|
|
public $version = '2019-03-25'; |
27
|
|
|
|
28
|
|
|
/** @var string */ |
29
|
|
|
public $method = 'POST'; |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @method string getFilter() |
34
|
|
|
* @method string getPicContent() |
35
|
|
|
* @method string getInstanceName() |
36
|
|
|
* @method string getProductId() |
37
|
|
|
* @method string getNum() |
38
|
|
|
* @method string getPicName() |
39
|
|
|
* @method string getStart() |
40
|
|
|
* @method string getRegion() |
41
|
|
|
* @method string getType() |
42
|
|
|
* @method string getCategoryId() |
43
|
|
|
* @method string getCrop() |
44
|
|
|
*/ |
45
|
|
|
class SearchImage extends V20190325Roa |
46
|
|
|
{ |
47
|
|
|
/** @var string */ |
48
|
|
|
public $pathPattern = '/v2/image/search'; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @param string $value |
52
|
|
|
* |
53
|
|
|
* @return $this |
54
|
|
|
*/ |
55
|
|
|
public function withFilter($value) |
56
|
|
|
{ |
57
|
|
|
$this->data['Filter'] = $value; |
58
|
|
|
$this->options['query']['Filter'] = $value; |
59
|
|
|
|
60
|
|
|
return $this; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @param string $value |
65
|
|
|
* |
66
|
|
|
* @return $this |
67
|
|
|
*/ |
68
|
|
|
public function withPicContent($value) |
69
|
|
|
{ |
70
|
|
|
$this->data['PicContent'] = $value; |
71
|
|
|
$this->options['query']['PicContent'] = $value; |
72
|
|
|
|
73
|
|
|
return $this; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @param string $value |
78
|
|
|
* |
79
|
|
|
* @return $this |
80
|
|
|
*/ |
81
|
|
|
public function withInstanceName($value) |
82
|
|
|
{ |
83
|
|
|
$this->data['InstanceName'] = $value; |
84
|
|
|
$this->options['query']['InstanceName'] = $value; |
85
|
|
|
|
86
|
|
|
return $this; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* @param string $value |
91
|
|
|
* |
92
|
|
|
* @return $this |
93
|
|
|
*/ |
94
|
|
|
public function withProductId($value) |
95
|
|
|
{ |
96
|
|
|
$this->data['ProductId'] = $value; |
97
|
|
|
$this->options['query']['ProductId'] = $value; |
98
|
|
|
|
99
|
|
|
return $this; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @param string $value |
104
|
|
|
* |
105
|
|
|
* @return $this |
106
|
|
|
*/ |
107
|
|
|
public function withNum($value) |
108
|
|
|
{ |
109
|
|
|
$this->data['Num'] = $value; |
110
|
|
|
$this->options['query']['Num'] = $value; |
111
|
|
|
|
112
|
|
|
return $this; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @param string $value |
117
|
|
|
* |
118
|
|
|
* @return $this |
119
|
|
|
*/ |
120
|
|
|
public function withPicName($value) |
121
|
|
|
{ |
122
|
|
|
$this->data['PicName'] = $value; |
123
|
|
|
$this->options['query']['PicName'] = $value; |
124
|
|
|
|
125
|
|
|
return $this; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @param string $value |
130
|
|
|
* |
131
|
|
|
* @return $this |
132
|
|
|
*/ |
133
|
|
|
public function withStart($value) |
134
|
|
|
{ |
135
|
|
|
$this->data['Start'] = $value; |
136
|
|
|
$this->options['query']['Start'] = $value; |
137
|
|
|
|
138
|
|
|
return $this; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* @param string $value |
143
|
|
|
* |
144
|
|
|
* @return $this |
145
|
|
|
*/ |
146
|
|
|
public function withRegion($value) |
147
|
|
|
{ |
148
|
|
|
$this->data['Region'] = $value; |
149
|
|
|
$this->options['query']['Region'] = $value; |
150
|
|
|
|
151
|
|
|
return $this; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @param string $value |
156
|
|
|
* |
157
|
|
|
* @return $this |
158
|
|
|
*/ |
159
|
|
|
public function withType($value) |
160
|
|
|
{ |
161
|
|
|
$this->data['Type'] = $value; |
162
|
|
|
$this->options['query']['Type'] = $value; |
163
|
|
|
|
164
|
|
|
return $this; |
165
|
|
|
} |
166
|
|
|
|
167
|
|
|
/** |
168
|
|
|
* @param string $value |
169
|
|
|
* |
170
|
|
|
* @return $this |
171
|
|
|
*/ |
172
|
|
|
public function withCategoryId($value) |
173
|
|
|
{ |
174
|
|
|
$this->data['CategoryId'] = $value; |
175
|
|
|
$this->options['query']['CategoryId'] = $value; |
176
|
|
|
|
177
|
|
|
return $this; |
178
|
|
|
} |
179
|
|
|
|
180
|
|
|
/** |
181
|
|
|
* @param string $value |
182
|
|
|
* |
183
|
|
|
* @return $this |
184
|
|
|
*/ |
185
|
|
|
public function withCrop($value) |
186
|
|
|
{ |
187
|
|
|
$this->data['Crop'] = $value; |
188
|
|
|
$this->options['query']['Crop'] = $value; |
189
|
|
|
|
190
|
|
|
return $this; |
191
|
|
|
} |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* @method string getInstanceName() |
196
|
|
|
* @method string getProductId() |
197
|
|
|
* @method string getPicName() |
198
|
|
|
*/ |
199
|
|
|
class DeleteImage extends V20190325Roa |
200
|
|
|
{ |
201
|
|
|
/** @var string */ |
202
|
|
|
public $pathPattern = '/v2/image/delete'; |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* @param string $value |
206
|
|
|
* |
207
|
|
|
* @return $this |
208
|
|
|
*/ |
209
|
|
|
public function withInstanceName($value) |
210
|
|
|
{ |
211
|
|
|
$this->data['InstanceName'] = $value; |
212
|
|
|
$this->options['query']['InstanceName'] = $value; |
213
|
|
|
|
214
|
|
|
return $this; |
215
|
|
|
} |
216
|
|
|
|
217
|
|
|
/** |
218
|
|
|
* @param string $value |
219
|
|
|
* |
220
|
|
|
* @return $this |
221
|
|
|
*/ |
222
|
|
|
public function withProductId($value) |
223
|
|
|
{ |
224
|
|
|
$this->data['ProductId'] = $value; |
225
|
|
|
$this->options['query']['ProductId'] = $value; |
226
|
|
|
|
227
|
|
|
return $this; |
228
|
|
|
} |
229
|
|
|
|
230
|
|
|
/** |
231
|
|
|
* @param string $value |
232
|
|
|
* |
233
|
|
|
* @return $this |
234
|
|
|
*/ |
235
|
|
|
public function withPicName($value) |
236
|
|
|
{ |
237
|
|
|
$this->data['PicName'] = $value; |
238
|
|
|
$this->options['query']['PicName'] = $value; |
239
|
|
|
|
240
|
|
|
return $this; |
241
|
|
|
} |
242
|
|
|
} |
243
|
|
|
|
244
|
|
|
/** |
245
|
|
|
* @method string getPicContent() |
246
|
|
|
* @method string getStrAttr() |
247
|
|
|
* @method string getInstanceName() |
248
|
|
|
* @method string getIntAttr() |
249
|
|
|
* @method string getProductId() |
250
|
|
|
* @method string getPicName() |
251
|
|
|
* @method string getCustomContent() |
252
|
|
|
* @method string getRegion() |
253
|
|
|
* @method string getCategoryId() |
254
|
|
|
* @method string getCrop() |
255
|
|
|
*/ |
256
|
|
|
class AddImage extends V20190325Roa |
257
|
|
|
{ |
258
|
|
|
/** @var string */ |
259
|
|
|
public $pathPattern = '/v2/image/add'; |
260
|
|
|
|
261
|
|
|
/** |
262
|
|
|
* @param string $value |
263
|
|
|
* |
264
|
|
|
* @return $this |
265
|
|
|
*/ |
266
|
|
|
public function withPicContent($value) |
267
|
|
|
{ |
268
|
|
|
$this->data['PicContent'] = $value; |
269
|
|
|
$this->options['query']['PicContent'] = $value; |
270
|
|
|
|
271
|
|
|
return $this; |
272
|
|
|
} |
273
|
|
|
|
274
|
|
|
/** |
275
|
|
|
* @param string $value |
276
|
|
|
* |
277
|
|
|
* @return $this |
278
|
|
|
*/ |
279
|
|
|
public function withStrAttr($value) |
280
|
|
|
{ |
281
|
|
|
$this->data['StrAttr'] = $value; |
282
|
|
|
$this->options['query']['StrAttr'] = $value; |
283
|
|
|
|
284
|
|
|
return $this; |
285
|
|
|
} |
286
|
|
|
|
287
|
|
|
/** |
288
|
|
|
* @param string $value |
289
|
|
|
* |
290
|
|
|
* @return $this |
291
|
|
|
*/ |
292
|
|
|
public function withInstanceName($value) |
293
|
|
|
{ |
294
|
|
|
$this->data['InstanceName'] = $value; |
295
|
|
|
$this->options['query']['InstanceName'] = $value; |
296
|
|
|
|
297
|
|
|
return $this; |
298
|
|
|
} |
299
|
|
|
|
300
|
|
|
/** |
301
|
|
|
* @param string $value |
302
|
|
|
* |
303
|
|
|
* @return $this |
304
|
|
|
*/ |
305
|
|
|
public function withIntAttr($value) |
306
|
|
|
{ |
307
|
|
|
$this->data['IntAttr'] = $value; |
308
|
|
|
$this->options['query']['IntAttr'] = $value; |
309
|
|
|
|
310
|
|
|
return $this; |
311
|
|
|
} |
312
|
|
|
|
313
|
|
|
/** |
314
|
|
|
* @param string $value |
315
|
|
|
* |
316
|
|
|
* @return $this |
317
|
|
|
*/ |
318
|
|
|
public function withProductId($value) |
319
|
|
|
{ |
320
|
|
|
$this->data['ProductId'] = $value; |
321
|
|
|
$this->options['query']['ProductId'] = $value; |
322
|
|
|
|
323
|
|
|
return $this; |
324
|
|
|
} |
325
|
|
|
|
326
|
|
|
/** |
327
|
|
|
* @param string $value |
328
|
|
|
* |
329
|
|
|
* @return $this |
330
|
|
|
*/ |
331
|
|
|
public function withPicName($value) |
332
|
|
|
{ |
333
|
|
|
$this->data['PicName'] = $value; |
334
|
|
|
$this->options['query']['PicName'] = $value; |
335
|
|
|
|
336
|
|
|
return $this; |
337
|
|
|
} |
338
|
|
|
|
339
|
|
|
/** |
340
|
|
|
* @param string $value |
341
|
|
|
* |
342
|
|
|
* @return $this |
343
|
|
|
*/ |
344
|
|
|
public function withCustomContent($value) |
345
|
|
|
{ |
346
|
|
|
$this->data['CustomContent'] = $value; |
347
|
|
|
$this->options['query']['CustomContent'] = $value; |
348
|
|
|
|
349
|
|
|
return $this; |
350
|
|
|
} |
351
|
|
|
|
352
|
|
|
/** |
353
|
|
|
* @param string $value |
354
|
|
|
* |
355
|
|
|
* @return $this |
356
|
|
|
*/ |
357
|
|
|
public function withRegion($value) |
358
|
|
|
{ |
359
|
|
|
$this->data['Region'] = $value; |
360
|
|
|
$this->options['query']['Region'] = $value; |
361
|
|
|
|
362
|
|
|
return $this; |
363
|
|
|
} |
364
|
|
|
|
365
|
|
|
/** |
366
|
|
|
* @param string $value |
367
|
|
|
* |
368
|
|
|
* @return $this |
369
|
|
|
*/ |
370
|
|
|
public function withCategoryId($value) |
371
|
|
|
{ |
372
|
|
|
$this->data['CategoryId'] = $value; |
373
|
|
|
$this->options['query']['CategoryId'] = $value; |
374
|
|
|
|
375
|
|
|
return $this; |
376
|
|
|
} |
377
|
|
|
|
378
|
|
|
/** |
379
|
|
|
* @param string $value |
380
|
|
|
* |
381
|
|
|
* @return $this |
382
|
|
|
*/ |
383
|
|
|
public function withCrop($value) |
384
|
|
|
{ |
385
|
|
|
$this->data['Crop'] = $value; |
386
|
|
|
$this->options['query']['Crop'] = $value; |
387
|
|
|
|
388
|
|
|
return $this; |
389
|
|
|
} |
390
|
|
|
} |
391
|
|
|
|