@alicloud/green20220302 2.19.0 → 2.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/client.ts CHANGED
@@ -753,6 +753,22 @@ export class ImageAsyncModerationResponse extends $tea.Model {
753
753
 
754
754
  export class ImageBatchModerationRequest extends $tea.Model {
755
755
  /**
756
+ * @remarks
757
+ * The types of detection supported by the enhanced image review, separated by English commas. Values:
758
+ *
759
+ * - baselineCheck:General Baseline Detection
760
+ * - baselineCheck_pro:General Baseline Detection_Pro Edition
761
+ * - tonalityImprove:Content governance monitoring
762
+ * - aigcCheck:AIGC image detection
763
+ *
764
+ * @example
765
+ * baselineCheck,tonalityImprove
766
+ */
767
+ service?: string;
768
+ /**
769
+ * @remarks
770
+ * The set of relevant parameters for content detection objects.
771
+ *
756
772
  * @example
757
773
  * {
758
774
  * "imageUrl": "https://img.alicdn.com/tfs/TB1U4r9AeH2gK0jSZJnXXaT1FXa-2880-480.png",
@@ -760,22 +776,17 @@ export class ImageBatchModerationRequest extends $tea.Model {
760
776
  * }
761
777
  */
762
778
  serviceParameters?: string;
763
- /**
764
- * @example
765
- * baselineCheck,tonalityImprove
766
- */
767
- services?: string;
768
779
  static names(): { [key: string]: string } {
769
780
  return {
781
+ service: 'Service',
770
782
  serviceParameters: 'ServiceParameters',
771
- services: 'Services',
772
783
  };
773
784
  }
774
785
 
775
786
  static types(): { [key: string]: any } {
776
787
  return {
788
+ service: 'string',
777
789
  serviceParameters: 'string',
778
- services: 'string',
779
790
  };
780
791
  }
781
792
 
@@ -786,17 +797,30 @@ export class ImageBatchModerationRequest extends $tea.Model {
786
797
 
787
798
  export class ImageBatchModerationResponseBody extends $tea.Model {
788
799
  /**
800
+ * @remarks
801
+ * Return code. A return of 200 represents success.
802
+ *
789
803
  * @example
790
804
  * 200
791
805
  */
792
806
  code?: number;
807
+ /**
808
+ * @remarks
809
+ * The result of image content detection.
810
+ */
793
811
  data?: ImageBatchModerationResponseBodyData;
794
812
  /**
813
+ * @remarks
814
+ * The response message for this request.
815
+ *
795
816
  * @example
796
817
  * success
797
818
  */
798
819
  msg?: string;
799
820
  /**
821
+ * @remarks
822
+ * The ID of this invocation request, generated by Alibaba Cloud as a unique identifier for the request, can be used for troubleshooting and pinpointing issues.
823
+ *
800
824
  * @example
801
825
  * 6CF2815C-C8C7-4A01-B52E-FF6E24F53492
802
826
  */
@@ -3197,12 +3221,25 @@ export class ImageAsyncModerationResponseBodyData extends $tea.Model {
3197
3221
 
3198
3222
  export class ImageBatchModerationResponseBodyDataResult extends $tea.Model {
3199
3223
  /**
3224
+ * @remarks
3225
+ * Confidence score, ranging from 0 to 100, retained to two decimal places. Some labels do not have a confidence score.
3226
+ *
3200
3227
  * @example
3201
3228
  * 81.22
3202
3229
  */
3203
3230
  confidence?: number;
3231
+ /**
3232
+ * @remarks
3233
+ * Description.
3234
+ *
3235
+ * @example
3236
+ * No risk detected
3237
+ */
3204
3238
  description?: string;
3205
3239
  /**
3240
+ * @remarks
3241
+ * The labels returned after image content detection. A single image may be associated with multiple labels and corresponding scores.
3242
+ *
3206
3243
  * @example
3207
3244
  * violent_explosion
3208
3245
  */
@@ -3230,15 +3267,28 @@ export class ImageBatchModerationResponseBodyDataResult extends $tea.Model {
3230
3267
 
3231
3268
  export class ImageBatchModerationResponseBodyDataResultsExtCustomImage extends $tea.Model {
3232
3269
  /**
3270
+ * @remarks
3271
+ * The ID of the hit custom image.
3272
+ *
3233
3273
  * @example
3234
3274
  * 1965304870002
3235
3275
  */
3236
3276
  imageId?: string;
3237
3277
  /**
3278
+ * @remarks
3279
+ * Custom library ID
3280
+ *
3238
3281
  * @example
3239
3282
  * 1965304870002
3240
3283
  */
3241
3284
  libId?: string;
3285
+ /**
3286
+ * @remarks
3287
+ * The name of the hit custom gallery.
3288
+ *
3289
+ * @example
3290
+ * Whitelist
3291
+ */
3242
3292
  libName?: string;
3243
3293
  static names(): { [key: string]: string } {
3244
3294
  return {
@@ -3263,21 +3313,33 @@ export class ImageBatchModerationResponseBodyDataResultsExtCustomImage extends $
3263
3313
 
3264
3314
  export class ImageBatchModerationResponseBodyDataResultsExtLogoDataLocation extends $tea.Model {
3265
3315
  /**
3316
+ * @remarks
3317
+ * The width of the text area, in pixels.
3318
+ *
3266
3319
  * @example
3267
3320
  * 440
3268
3321
  */
3269
3322
  h?: number;
3270
3323
  /**
3324
+ * @remarks
3325
+ * The height of the text area, in pixels.
3326
+ *
3271
3327
  * @example
3272
3328
  * 330
3273
3329
  */
3274
3330
  w?: number;
3275
3331
  /**
3332
+ * @remarks
3333
+ * The distance from the top-left corner of the text area to the y-axis, with the top-left corner of the image as the origin, in pixels.
3334
+ *
3276
3335
  * @example
3277
3336
  * 11
3278
3337
  */
3279
3338
  x?: number;
3280
3339
  /**
3340
+ * @remarks
3341
+ * The distance from the top-left corner of the text area to the x-axis, with the top-left corner of the image as the origin, in pixels.
3342
+ *
3281
3343
  * @example
3282
3344
  * 22
3283
3345
  */
@@ -3307,15 +3369,28 @@ export class ImageBatchModerationResponseBodyDataResultsExtLogoDataLocation exte
3307
3369
 
3308
3370
  export class ImageBatchModerationResponseBodyDataResultsExtLogoDataLogo extends $tea.Model {
3309
3371
  /**
3372
+ * @remarks
3373
+ * Confidence score, from 0 to 100, rounded to two decimal places.
3374
+ *
3310
3375
  * @example
3311
3376
  * 99.1
3312
3377
  */
3313
3378
  confidence?: number;
3314
3379
  /**
3380
+ * @remarks
3381
+ * Identify the category.
3382
+ *
3315
3383
  * @example
3316
3384
  * logo_sns
3317
3385
  */
3318
3386
  label?: string;
3387
+ /**
3388
+ * @remarks
3389
+ * identifier name.
3390
+ *
3391
+ * @example
3392
+ * Alibaba Cloud
3393
+ */
3319
3394
  name?: string;
3320
3395
  static names(): { [key: string]: string } {
3321
3396
  return {
@@ -3339,7 +3414,15 @@ export class ImageBatchModerationResponseBodyDataResultsExtLogoDataLogo extends
3339
3414
  }
3340
3415
 
3341
3416
  export class ImageBatchModerationResponseBodyDataResultsExtLogoData extends $tea.Model {
3417
+ /**
3418
+ * @remarks
3419
+ * The location information of the identifier.
3420
+ */
3342
3421
  location?: ImageBatchModerationResponseBodyDataResultsExtLogoDataLocation;
3422
+ /**
3423
+ * @remarks
3424
+ * identification information
3425
+ */
3343
3426
  logo?: ImageBatchModerationResponseBodyDataResultsExtLogoDataLogo[];
3344
3427
  static names(): { [key: string]: string } {
3345
3428
  return {
@@ -3362,21 +3445,33 @@ export class ImageBatchModerationResponseBodyDataResultsExtLogoData extends $tea
3362
3445
 
3363
3446
  export class ImageBatchModerationResponseBodyDataResultsExtPublicFigureLocation extends $tea.Model {
3364
3447
  /**
3448
+ * @remarks
3449
+ * The width of the text area, in pixels.
3450
+ *
3365
3451
  * @example
3366
3452
  * 440
3367
3453
  */
3368
3454
  h?: number;
3369
3455
  /**
3456
+ * @remarks
3457
+ * The height of the text area, in pixels.
3458
+ *
3370
3459
  * @example
3371
3460
  * 330
3372
3461
  */
3373
3462
  w?: number;
3374
3463
  /**
3464
+ * @remarks
3465
+ * The distance from the top-left corner of the text area to the y-axis, with the top-left corner of the image as the origin, in pixels.
3466
+ *
3375
3467
  * @example
3376
3468
  * 11
3377
3469
  */
3378
3470
  x?: number;
3379
3471
  /**
3472
+ * @remarks
3473
+ * The distance from the top-left corner of the text area to the x-axis, with the top-left corner of the image as the origin, in pixels.
3474
+ *
3380
3475
  * @example
3381
3476
  * 22
3382
3477
  */
@@ -3405,8 +3500,26 @@ export class ImageBatchModerationResponseBodyDataResultsExtPublicFigureLocation
3405
3500
  }
3406
3501
 
3407
3502
  export class ImageBatchModerationResponseBodyDataResultsExtPublicFigure extends $tea.Model {
3503
+ /**
3504
+ * @remarks
3505
+ * Identify the encoded information of the person.
3506
+ *
3507
+ * @example
3508
+ * 12324222
3509
+ */
3408
3510
  figureId?: string;
3511
+ /**
3512
+ * @remarks
3513
+ * The identified person\\"s name information.
3514
+ *
3515
+ * @example
3516
+ * xxxxx
3517
+ */
3409
3518
  figureName?: string;
3519
+ /**
3520
+ * @remarks
3521
+ * The location information of the identifier.
3522
+ */
3410
3523
  location?: ImageBatchModerationResponseBodyDataResultsExtPublicFigureLocation[];
3411
3524
  static names(): { [key: string]: string } {
3412
3525
  return {
@@ -3430,12 +3543,29 @@ export class ImageBatchModerationResponseBodyDataResultsExtPublicFigure extends
3430
3543
  }
3431
3544
 
3432
3545
  export class ImageBatchModerationResponseBodyDataResultsExtTextInImageCustomText extends $tea.Model {
3546
+ /**
3547
+ * @remarks
3548
+ * Custom words, separate multiple words with commas.
3549
+ *
3550
+ * @example
3551
+ * Custom Word 1 and Custom Word 2
3552
+ */
3433
3553
  keyWords?: string;
3434
3554
  /**
3555
+ * @remarks
3556
+ * Custom library ID.
3557
+ *
3435
3558
  * @example
3436
3559
  * 123456
3437
3560
  */
3438
3561
  libId?: string;
3562
+ /**
3563
+ * @remarks
3564
+ * Custom library name.
3565
+ *
3566
+ * @example
3567
+ * Custom Library 1
3568
+ */
3439
3569
  libName?: string;
3440
3570
  static names(): { [key: string]: string } {
3441
3571
  return {
@@ -3460,21 +3590,33 @@ export class ImageBatchModerationResponseBodyDataResultsExtTextInImageCustomText
3460
3590
 
3461
3591
  export class ImageBatchModerationResponseBodyDataResultsExtTextInImageOcrResultLocation extends $tea.Model {
3462
3592
  /**
3593
+ * @remarks
3594
+ * The height of the text area, in pixels.
3595
+ *
3463
3596
  * @example
3464
3597
  * 33
3465
3598
  */
3466
3599
  h?: number;
3467
3600
  /**
3601
+ * @remarks
3602
+ * The width of the text area, in pixels.
3603
+ *
3468
3604
  * @example
3469
3605
  * 44
3470
3606
  */
3471
3607
  w?: number;
3472
3608
  /**
3609
+ * @remarks
3610
+ * The distance from the top-left corner of the text area to the y-axis, with the top-left corner of the image as the origin, in pixels.
3611
+ *
3473
3612
  * @example
3474
3613
  * 11
3475
3614
  */
3476
3615
  x?: number;
3477
3616
  /**
3617
+ * @remarks
3618
+ * The distance from the top-left corner of the text area to the x-axis, with the top-left corner of the image as the origin, in pixels.
3619
+ *
3478
3620
  * @example
3479
3621
  * 22
3480
3622
  */
@@ -3503,8 +3645,15 @@ export class ImageBatchModerationResponseBodyDataResultsExtTextInImageOcrResultL
3503
3645
  }
3504
3646
 
3505
3647
  export class ImageBatchModerationResponseBodyDataResultsExtTextInImageOcrResult extends $tea.Model {
3648
+ /**
3649
+ * @remarks
3650
+ * Text line coordinate information.
3651
+ */
3506
3652
  location?: ImageBatchModerationResponseBodyDataResultsExtTextInImageOcrResultLocation;
3507
3653
  /**
3654
+ * @remarks
3655
+ * Text information.
3656
+ *
3508
3657
  * @example
3509
3658
  * abcd
3510
3659
  */
@@ -3529,8 +3678,20 @@ export class ImageBatchModerationResponseBodyDataResultsExtTextInImageOcrResult
3529
3678
  }
3530
3679
 
3531
3680
  export class ImageBatchModerationResponseBodyDataResultsExtTextInImage extends $tea.Model {
3681
+ /**
3682
+ * @remarks
3683
+ * When a custom text library is matched, return the custom library ID, custom library name, and custom words.
3684
+ */
3532
3685
  customText?: ImageBatchModerationResponseBodyDataResultsExtTextInImageCustomText[];
3686
+ /**
3687
+ * @remarks
3688
+ * Return the text information of each line recognized in the image.
3689
+ */
3533
3690
  ocrResult?: ImageBatchModerationResponseBodyDataResultsExtTextInImageOcrResult[];
3691
+ /**
3692
+ * @remarks
3693
+ * hit risk keywords
3694
+ */
3534
3695
  riskWord?: string[];
3535
3696
  static names(): { [key: string]: string } {
3536
3697
  return {
@@ -3554,9 +3715,25 @@ export class ImageBatchModerationResponseBodyDataResultsExtTextInImage extends $
3554
3715
  }
3555
3716
 
3556
3717
  export class ImageBatchModerationResponseBodyDataResultsExt extends $tea.Model {
3718
+ /**
3719
+ * @remarks
3720
+ * Custom image library hit information list.
3721
+ */
3557
3722
  customImage?: ImageBatchModerationResponseBodyDataResultsExtCustomImage[];
3723
+ /**
3724
+ * @remarks
3725
+ * Logo identification information.
3726
+ */
3558
3727
  logoData?: ImageBatchModerationResponseBodyDataResultsExtLogoData;
3728
+ /**
3729
+ * @remarks
3730
+ * List of character information.
3731
+ */
3559
3732
  publicFigure?: ImageBatchModerationResponseBodyDataResultsExtPublicFigure[];
3733
+ /**
3734
+ * @remarks
3735
+ * Return the text information from the recognized images.
3736
+ */
3560
3737
  textInImage?: ImageBatchModerationResponseBodyDataResultsExtTextInImage;
3561
3738
  static names(): { [key: string]: string } {
3562
3739
  return {
@@ -3583,12 +3760,25 @@ export class ImageBatchModerationResponseBodyDataResultsExt extends $tea.Model {
3583
3760
 
3584
3761
  export class ImageBatchModerationResponseBodyDataResultsResult extends $tea.Model {
3585
3762
  /**
3763
+ * @remarks
3764
+ * Confidence score, ranging from 0 to 100, rounded to two decimal places. Some labels do not have a confidence score.
3765
+ *
3586
3766
  * @example
3587
3767
  * 81.22
3588
3768
  */
3589
3769
  confidence?: number;
3770
+ /**
3771
+ * @remarks
3772
+ * Description.
3773
+ *
3774
+ * @example
3775
+ * No risk detected
3776
+ */
3590
3777
  description?: string;
3591
3778
  /**
3779
+ * @remarks
3780
+ * The labels returned after image content detection. A single image may have multiple labels and corresponding scores detected.
3781
+ *
3592
3782
  * @example
3593
3783
  * violent_explosion
3594
3784
  */
@@ -3615,14 +3805,28 @@ export class ImageBatchModerationResponseBodyDataResultsResult extends $tea.Mode
3615
3805
  }
3616
3806
 
3617
3807
  export class ImageBatchModerationResponseBodyDataResults extends $tea.Model {
3808
+ /**
3809
+ * @remarks
3810
+ * Image supplementary reference information.
3811
+ */
3618
3812
  ext?: ImageBatchModerationResponseBodyDataResultsExt;
3813
+ /**
3814
+ * @remarks
3815
+ * The risk labels, confidence scores, and other parameters of image detection results, in an array structure.
3816
+ */
3619
3817
  result?: ImageBatchModerationResponseBodyDataResultsResult[];
3620
3818
  /**
3819
+ * @remarks
3820
+ * Risk level.
3821
+ *
3621
3822
  * @example
3622
3823
  * high
3623
3824
  */
3624
3825
  riskLevel?: string;
3625
3826
  /**
3827
+ * @remarks
3828
+ * The enhanced image detection service supports various detection services.
3829
+ *
3626
3830
  * @example
3627
3831
  * baselineCheck
3628
3832
  */
@@ -3652,13 +3856,27 @@ export class ImageBatchModerationResponseBodyDataResults extends $tea.Model {
3652
3856
 
3653
3857
  export class ImageBatchModerationResponseBodyData extends $tea.Model {
3654
3858
  /**
3859
+ * @remarks
3860
+ * To detect the data ID corresponding to the object.
3861
+ *
3655
3862
  * @example
3656
3863
  * 26769ada6e264e7ba9aa048241e12be9
3657
3864
  */
3658
3865
  dataId?: string;
3866
+ /**
3867
+ * @remarks
3868
+ * The risk labels, confidence scores, and other parameters of image detection results, in an array structure.
3869
+ */
3659
3870
  result?: ImageBatchModerationResponseBodyDataResult[];
3871
+ /**
3872
+ * @remarks
3873
+ * The risk labels, confidence scores, and other parameters for each service\\"s image detection, in an array structure.
3874
+ */
3660
3875
  results?: ImageBatchModerationResponseBodyDataResults[];
3661
3876
  /**
3877
+ * @remarks
3878
+ * Risk level.
3879
+ *
3662
3880
  * @example
3663
3881
  * high
3664
3882
  */
@@ -4937,6 +5155,8 @@ export class TextModerationResponseBodyData extends $tea.Model {
4937
5155
  * 123456
4938
5156
  */
4939
5157
  accountId?: string;
5158
+ dataId?: string;
5159
+ descriptions?: string;
4940
5160
  /**
4941
5161
  * @remarks
4942
5162
  * The device ID.
@@ -4964,6 +5184,8 @@ export class TextModerationResponseBodyData extends $tea.Model {
4964
5184
  static names(): { [key: string]: string } {
4965
5185
  return {
4966
5186
  accountId: 'accountId',
5187
+ dataId: 'dataId',
5188
+ descriptions: 'descriptions',
4967
5189
  deviceId: 'deviceId',
4968
5190
  labels: 'labels',
4969
5191
  reason: 'reason',
@@ -4973,6 +5195,8 @@ export class TextModerationResponseBodyData extends $tea.Model {
4973
5195
  static types(): { [key: string]: any } {
4974
5196
  return {
4975
5197
  accountId: 'string',
5198
+ dataId: 'string',
5199
+ descriptions: 'string',
4976
5200
  deviceId: 'string',
4977
5201
  labels: 'string',
4978
5202
  reason: 'string',
@@ -5135,6 +5359,7 @@ export class TextModerationPlusResponseBodyData extends $tea.Model {
5135
5359
  * The suggestion.
5136
5360
  */
5137
5361
  advice?: TextModerationPlusResponseBodyDataAdvice[];
5362
+ dataId?: string;
5138
5363
  /**
5139
5364
  * @remarks
5140
5365
  * The results.
@@ -5159,6 +5384,7 @@ export class TextModerationPlusResponseBodyData extends $tea.Model {
5159
5384
  static names(): { [key: string]: string } {
5160
5385
  return {
5161
5386
  advice: 'Advice',
5387
+ dataId: 'DataId',
5162
5388
  result: 'Result',
5163
5389
  riskLevel: 'RiskLevel',
5164
5390
  score: 'Score',
@@ -5168,6 +5394,7 @@ export class TextModerationPlusResponseBodyData extends $tea.Model {
5168
5394
  static types(): { [key: string]: any } {
5169
5395
  return {
5170
5396
  advice: { 'type': 'array', 'itemType': TextModerationPlusResponseBodyDataAdvice },
5397
+ dataId: 'string',
5171
5398
  result: { 'type': 'array', 'itemType': TextModerationPlusResponseBodyDataResult },
5172
5399
  riskLevel: 'string',
5173
5400
  score: 'number',
@@ -6480,12 +6707,12 @@ export default class Client extends OpenApi {
6480
6707
  async imageBatchModerationWithOptions(request: ImageBatchModerationRequest, runtime: $Util.RuntimeOptions): Promise<ImageBatchModerationResponse> {
6481
6708
  Util.validateModel(request);
6482
6709
  let query = { };
6483
- if (!Util.isUnset(request.serviceParameters)) {
6484
- query["ServiceParameters"] = request.serviceParameters;
6710
+ if (!Util.isUnset(request.service)) {
6711
+ query["Service"] = request.service;
6485
6712
  }
6486
6713
 
6487
- if (!Util.isUnset(request.services)) {
6488
- query["Services"] = request.services;
6714
+ if (!Util.isUnset(request.serviceParameters)) {
6715
+ query["ServiceParameters"] = request.serviceParameters;
6489
6716
  }
6490
6717
 
6491
6718
  let req = new $OpenApi.OpenApiRequest({