GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#107)
by Yong
07:54
created

TagResources   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 14
dl 0
loc 47
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A withResourceType() 0 6 1
A withTag() 0 9 2
A withResourceId() 0 8 2
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 ListTagResources listTagResources(array $options = [])
12
 * @method UntagResources untagResources(array $options = [])
13
 * @method TagResources tagResources(array $options = [])
14
 * @method SearchImage searchImage(array $options = [])
15
 * @method DeleteImage deleteImage(array $options = [])
16
 * @method AddImage addImage(array $options = [])
17
 */
18
class ImageSearchApiResolver
19
{
20
    use ApiResolverTrait;
21
}
22
23
class V20190325Roa extends Roa
24
{
25
    /** @var string */
26
    public $product = 'ImageSearch';
27
28
    /** @var string */
29
    public $version = '2019-03-25';
30
31
    /** @var string */
32
    public $method = 'POST';
33
}
34
35
/**
36
 * @method array getResourceId()
37
 * @method string getNextToken()
38
 * @method array getTag()
39
 * @method string getResourceType()
40
 */
41
class ListTagResources extends V20190325Roa
42
{
43
    /** @var string */
44
    public $pathPattern = '/resources/listTag';
45
46
    /**
47
     * @param array $resourceId
48
     *
49
     * @return $this
50
     */
51
    public function withResourceId(array $resourceId)
52
    {
53
        $this->data['ResourceId'] = $resourceId;
54
        foreach ($resourceId as $i => $iValue) {
55
            $this->options['query']['ResourceId.' . ($i + 1)] = $iValue;
56
        }
57
58
        return $this;
59
    }
60
61
    /**
62
     * @param string $value
63
     *
64
     * @return $this
65
     */
66
    public function withNextToken($value)
67
    {
68
        $this->data['NextToken'] = $value;
69
        $this->options['query']['NextToken'] = $value;
70
71
        return $this;
72
    }
73
74
    /**
75
     * @param array $tag
76
     *
77
     * @return $this
78
     */
79
    public function withTag(array $tag)
80
    {
81
        $this->data['Tag'] = $tag;
82
        foreach ($tag as $depth1 => $depth1Value) {
83
            $this->options['query']['Tag.' . ($depth1 + 1) . '.Value'] = $depth1Value['Value'];
84
            $this->options['query']['Tag.' . ($depth1 + 1) . '.Key'] = $depth1Value['Key'];
85
        }
86
87
        return $this;
88
    }
89
90
    /**
91
     * @param string $value
92
     *
93
     * @return $this
94
     */
95
    public function withResourceType($value)
96
    {
97
        $this->data['ResourceType'] = $value;
98
        $this->options['query']['ResourceType'] = $value;
99
100
        return $this;
101
    }
102
}
103
104
/**
105
 * @method string getAll()
106
 * @method array getResourceId()
107
 * @method array getTagKey()
108
 * @method string getResourceType()
109
 */
110
class UntagResources extends V20190325Roa
111
{
112
    /** @var string */
113
    public $pathPattern = '/resources/untag';
114
115
    /**
116
     * @param string $value
117
     *
118
     * @return $this
119
     */
120
    public function withAll($value)
121
    {
122
        $this->data['All'] = $value;
123
        $this->options['query']['All'] = $value;
124
125
        return $this;
126
    }
127
128
    /**
129
     * @param array $resourceId
130
     *
131
     * @return $this
132
     */
133
    public function withResourceId(array $resourceId)
134
    {
135
        $this->data['ResourceId'] = $resourceId;
136
        foreach ($resourceId as $i => $iValue) {
137
            $this->options['query']['ResourceId.' . ($i + 1)] = $iValue;
138
        }
139
140
        return $this;
141
    }
142
143
    /**
144
     * @param array $tagKey
145
     *
146
     * @return $this
147
     */
148
    public function withTagKey(array $tagKey)
149
    {
150
        $this->data['TagKey'] = $tagKey;
151
        foreach ($tagKey as $i => $iValue) {
152
            $this->options['query']['TagKey.' . ($i + 1)] = $iValue;
153
        }
154
155
        return $this;
156
    }
157
158
    /**
159
     * @param string $value
160
     *
161
     * @return $this
162
     */
163
    public function withResourceType($value)
164
    {
165
        $this->data['ResourceType'] = $value;
166
        $this->options['query']['ResourceType'] = $value;
167
168
        return $this;
169
    }
170
}
171
172
/**
173
 * @method array getResourceId()
174
 * @method array getTag()
175
 * @method string getResourceType()
176
 */
177
class TagResources extends V20190325Roa
178
{
179
    /** @var string */
180
    public $pathPattern = '/imagesearch/tag';
181
182
    /**
183
     * @param array $resourceId
184
     *
185
     * @return $this
186
     */
187
    public function withResourceId(array $resourceId)
188
    {
189
        $this->data['ResourceId'] = $resourceId;
190
        foreach ($resourceId as $i => $iValue) {
191
            $this->options['query']['ResourceId.' . ($i + 1)] = $iValue;
192
        }
193
194
        return $this;
195
    }
196
197
    /**
198
     * @param array $tag
199
     *
200
     * @return $this
201
     */
202
    public function withTag(array $tag)
203
    {
204
        $this->data['Tag'] = $tag;
205
        foreach ($tag as $depth1 => $depth1Value) {
206
            $this->options['query']['Tag.' . ($depth1 + 1) . '.Value'] = $depth1Value['Value'];
207
            $this->options['query']['Tag.' . ($depth1 + 1) . '.Key'] = $depth1Value['Key'];
208
        }
209
210
        return $this;
211
    }
212
213
    /**
214
     * @param string $value
215
     *
216
     * @return $this
217
     */
218
    public function withResourceType($value)
219
    {
220
        $this->data['ResourceType'] = $value;
221
        $this->options['query']['ResourceType'] = $value;
222
223
        return $this;
224
    }
225
}
226
227
/**
228
 * @method string getFilter()
229
 * @method string getPicContent()
230
 * @method string getInstanceName()
231
 * @method string getProductId()
232
 * @method string getNum()
233
 * @method string getPicName()
234
 * @method string getStart()
235
 * @method string getRegion()
236
 * @method string getType()
237
 * @method string getCategoryId()
238
 * @method string getCrop()
239
 */
240
class SearchImage extends V20190325Roa
241
{
242
    /** @var string */
243
    public $pathPattern = '/v2/image/search';
244
245
    /**
246
     * @param string $value
247
     *
248
     * @return $this
249
     */
250
    public function withFilter($value)
251
    {
252
        $this->data['Filter'] = $value;
253
        $this->options['form_params']['Filter'] = $value;
254
255
        return $this;
256
    }
257
258
    /**
259
     * @param string $value
260
     *
261
     * @return $this
262
     */
263
    public function withPicContent($value)
264
    {
265
        $this->data['PicContent'] = $value;
266
        $this->options['form_params']['PicContent'] = $value;
267
268
        return $this;
269
    }
270
271
    /**
272
     * @param string $value
273
     *
274
     * @return $this
275
     */
276
    public function withInstanceName($value)
277
    {
278
        $this->data['InstanceName'] = $value;
279
        $this->options['form_params']['InstanceName'] = $value;
280
281
        return $this;
282
    }
283
284
    /**
285
     * @param string $value
286
     *
287
     * @return $this
288
     */
289
    public function withProductId($value)
290
    {
291
        $this->data['ProductId'] = $value;
292
        $this->options['form_params']['ProductId'] = $value;
293
294
        return $this;
295
    }
296
297
    /**
298
     * @param string $value
299
     *
300
     * @return $this
301
     */
302
    public function withNum($value)
303
    {
304
        $this->data['Num'] = $value;
305
        $this->options['form_params']['Num'] = $value;
306
307
        return $this;
308
    }
309
310
    /**
311
     * @param string $value
312
     *
313
     * @return $this
314
     */
315
    public function withPicName($value)
316
    {
317
        $this->data['PicName'] = $value;
318
        $this->options['form_params']['PicName'] = $value;
319
320
        return $this;
321
    }
322
323
    /**
324
     * @param string $value
325
     *
326
     * @return $this
327
     */
328
    public function withStart($value)
329
    {
330
        $this->data['Start'] = $value;
331
        $this->options['form_params']['Start'] = $value;
332
333
        return $this;
334
    }
335
336
    /**
337
     * @param string $value
338
     *
339
     * @return $this
340
     */
341
    public function withRegion($value)
342
    {
343
        $this->data['Region'] = $value;
344
        $this->options['form_params']['Region'] = $value;
345
346
        return $this;
347
    }
348
349
    /**
350
     * @param string $value
351
     *
352
     * @return $this
353
     */
354
    public function withType($value)
355
    {
356
        $this->data['Type'] = $value;
357
        $this->options['form_params']['Type'] = $value;
358
359
        return $this;
360
    }
361
362
    /**
363
     * @param string $value
364
     *
365
     * @return $this
366
     */
367
    public function withCategoryId($value)
368
    {
369
        $this->data['CategoryId'] = $value;
370
        $this->options['form_params']['CategoryId'] = $value;
371
372
        return $this;
373
    }
374
375
    /**
376
     * @param string $value
377
     *
378
     * @return $this
379
     */
380
    public function withCrop($value)
381
    {
382
        $this->data['Crop'] = $value;
383
        $this->options['form_params']['Crop'] = $value;
384
385
        return $this;
386
    }
387
}
388
389
/**
390
 * @method string getInstanceName()
391
 * @method string getProductId()
392
 * @method string getPicName()
393
 */
394
class DeleteImage extends V20190325Roa
395
{
396
    /** @var string */
397
    public $pathPattern = '/v2/image/delete';
398
399
    /**
400
     * @param string $value
401
     *
402
     * @return $this
403
     */
404
    public function withInstanceName($value)
405
    {
406
        $this->data['InstanceName'] = $value;
407
        $this->options['form_params']['InstanceName'] = $value;
408
409
        return $this;
410
    }
411
412
    /**
413
     * @param string $value
414
     *
415
     * @return $this
416
     */
417
    public function withProductId($value)
418
    {
419
        $this->data['ProductId'] = $value;
420
        $this->options['form_params']['ProductId'] = $value;
421
422
        return $this;
423
    }
424
425
    /**
426
     * @param string $value
427
     *
428
     * @return $this
429
     */
430
    public function withPicName($value)
431
    {
432
        $this->data['PicName'] = $value;
433
        $this->options['form_params']['PicName'] = $value;
434
435
        return $this;
436
    }
437
}
438
439
/**
440
 * @method string getPicContent()
441
 * @method string getStrAttr()
442
 * @method string getInstanceName()
443
 * @method string getIntAttr()
444
 * @method string getProductId()
445
 * @method string getPicName()
446
 * @method string getCustomContent()
447
 * @method string getRegion()
448
 * @method string getCategoryId()
449
 * @method string getCrop()
450
 */
451
class AddImage extends V20190325Roa
452
{
453
    /** @var string */
454
    public $pathPattern = '/v2/image/add';
455
456
    /**
457
     * @param string $value
458
     *
459
     * @return $this
460
     */
461
    public function withPicContent($value)
462
    {
463
        $this->data['PicContent'] = $value;
464
        $this->options['form_params']['PicContent'] = $value;
465
466
        return $this;
467
    }
468
469
    /**
470
     * @param string $value
471
     *
472
     * @return $this
473
     */
474
    public function withStrAttr($value)
475
    {
476
        $this->data['StrAttr'] = $value;
477
        $this->options['form_params']['StrAttr'] = $value;
478
479
        return $this;
480
    }
481
482
    /**
483
     * @param string $value
484
     *
485
     * @return $this
486
     */
487
    public function withInstanceName($value)
488
    {
489
        $this->data['InstanceName'] = $value;
490
        $this->options['form_params']['InstanceName'] = $value;
491
492
        return $this;
493
    }
494
495
    /**
496
     * @param string $value
497
     *
498
     * @return $this
499
     */
500
    public function withIntAttr($value)
501
    {
502
        $this->data['IntAttr'] = $value;
503
        $this->options['form_params']['IntAttr'] = $value;
504
505
        return $this;
506
    }
507
508
    /**
509
     * @param string $value
510
     *
511
     * @return $this
512
     */
513
    public function withProductId($value)
514
    {
515
        $this->data['ProductId'] = $value;
516
        $this->options['form_params']['ProductId'] = $value;
517
518
        return $this;
519
    }
520
521
    /**
522
     * @param string $value
523
     *
524
     * @return $this
525
     */
526
    public function withPicName($value)
527
    {
528
        $this->data['PicName'] = $value;
529
        $this->options['form_params']['PicName'] = $value;
530
531
        return $this;
532
    }
533
534
    /**
535
     * @param string $value
536
     *
537
     * @return $this
538
     */
539
    public function withCustomContent($value)
540
    {
541
        $this->data['CustomContent'] = $value;
542
        $this->options['form_params']['CustomContent'] = $value;
543
544
        return $this;
545
    }
546
547
    /**
548
     * @param string $value
549
     *
550
     * @return $this
551
     */
552
    public function withRegion($value)
553
    {
554
        $this->data['Region'] = $value;
555
        $this->options['form_params']['Region'] = $value;
556
557
        return $this;
558
    }
559
560
    /**
561
     * @param string $value
562
     *
563
     * @return $this
564
     */
565
    public function withCategoryId($value)
566
    {
567
        $this->data['CategoryId'] = $value;
568
        $this->options['form_params']['CategoryId'] = $value;
569
570
        return $this;
571
    }
572
573
    /**
574
     * @param string $value
575
     *
576
     * @return $this
577
     */
578
    public function withCrop($value)
579
    {
580
        $this->data['Crop'] = $value;
581
        $this->options['form_params']['Crop'] = $value;
582
583
        return $this;
584
    }
585
}
586