azure_cognitiveservices_contentmoderator 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator.rb +22 -27
  3. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/content_moderator_client.rb +5 -18
  4. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/image_moderation.rb +24 -32
  5. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb +12 -20
  6. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image_lists.rb +12 -20
  7. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term.rb +8 -16
  8. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term_lists.rb +12 -20
  9. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/body.rb +10 -3
  10. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/evaluate.rb +1 -1
  11. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/image_list.rb +10 -3
  12. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/refresh_index.rb +11 -4
  13. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/term_list.rb +10 -3
  14. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb +24 -32
  15. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/text_moderation.rb +4 -12
  16. data/lib/profiles/latest/modules/contentmoderator_profile_module.rb +66 -86
  17. data/lib/version.rb +1 -1
  18. metadata +2 -7
  19. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/azure_region_base_url.rb +0 -27
  20. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/body_metadata.rb +0 -57
  21. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/image_list_metadata.rb +0 -57
  22. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/refresh_index_advanced_info_item.rb +0 -58
  23. data/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/term_list_metadata.rb +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42b40bcb14d9916e812913f4fbc452c8a0a7d603
4
- data.tar.gz: aa54071a4ff25f54ab39d9f1b28c3b73bd1cf4fe
3
+ metadata.gz: 0ec77fdef0f0d112d2aeb3689761e361ee51573e
4
+ data.tar.gz: a56ae7d179b8f1f53f1b80b5291732f408869178
5
5
  SHA512:
6
- metadata.gz: 9a2df693358e767c2f8439d018affb948200ec2d26f36a8dc01be3e4f7bd53d0eac3d513785e6b91160f9feea5add3a2766999a0b549a3f895488a955c6a25b9
7
- data.tar.gz: 6b02630e56aade1f58b55a697dd8c06e41d87f46e142ca99c9a02984b419f640c1118a7122e1df2c769032b105b1daad3e120de9e9d0ab1744a4990fbb0a5912
6
+ metadata.gz: 5e3cae36dbe561d89f61746aca9d847a5f7639d7125138a355c0605251bb63dacabbd3e6de4c473c2b4c16aaef983b76d88b28f91c815d8c2bbcd28d14950458
7
+ data.tar.gz: 96db4716fa3ff9ae57102ee2bcfee1079388f84c20e941fd21fdc7b03f0f716cb23909b40e53760e315bbea344f7091e488e3951dfc497bd669c97b2a357cdba
@@ -30,37 +30,35 @@ module Azure::CognitiveServices::ContentModerator::V1_0
30
30
  autoload :ContentModeratorClient, '1.0/generated/azure_cognitiveservices_contentmoderator/content_moderator_client.rb'
31
31
 
32
32
  module Models
33
- autoload :RefreshIndex, '1.0/generated/azure_cognitiveservices_contentmoderator/models/refresh_index.rb'
34
33
  autoload :ImageAdditionalInfoItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/image_additional_info_item.rb'
35
- autoload :Tag, '1.0/generated/azure_cognitiveservices_contentmoderator/models/tag.rb'
36
34
  autoload :Image, '1.0/generated/azure_cognitiveservices_contentmoderator/models/image.rb'
37
- autoload :Frames, '1.0/generated/azure_cognitiveservices_contentmoderator/models/frames.rb'
35
+ autoload :Tag, '1.0/generated/azure_cognitiveservices_contentmoderator/models/tag.rb'
38
36
  autoload :ImageIds, '1.0/generated/azure_cognitiveservices_contentmoderator/models/image_ids.rb'
39
- autoload :ClassificationCategory2, '1.0/generated/azure_cognitiveservices_contentmoderator/models/classification_category2.rb'
37
+ autoload :Frames, '1.0/generated/azure_cognitiveservices_contentmoderator/models/frames.rb'
40
38
  autoload :TermsInList, '1.0/generated/azure_cognitiveservices_contentmoderator/models/terms_in_list.rb'
41
- autoload :Classification, '1.0/generated/azure_cognitiveservices_contentmoderator/models/classification.rb'
39
+ autoload :ClassificationCategory2, '1.0/generated/azure_cognitiveservices_contentmoderator/models/classification_category2.rb'
42
40
  autoload :TermsData, '1.0/generated/azure_cognitiveservices_contentmoderator/models/terms_data.rb'
43
- autoload :Email, '1.0/generated/azure_cognitiveservices_contentmoderator/models/email.rb'
41
+ autoload :Classification, '1.0/generated/azure_cognitiveservices_contentmoderator/models/classification.rb'
44
42
  autoload :TermsPaging, '1.0/generated/azure_cognitiveservices_contentmoderator/models/terms_paging.rb'
45
- autoload :IPA, '1.0/generated/azure_cognitiveservices_contentmoderator/models/ipa.rb'
43
+ autoload :Email, '1.0/generated/azure_cognitiveservices_contentmoderator/models/email.rb'
46
44
  autoload :Terms, '1.0/generated/azure_cognitiveservices_contentmoderator/models/terms.rb'
47
- autoload :Address, '1.0/generated/azure_cognitiveservices_contentmoderator/models/address.rb'
45
+ autoload :IPA, '1.0/generated/azure_cognitiveservices_contentmoderator/models/ipa.rb'
48
46
  autoload :Review, '1.0/generated/azure_cognitiveservices_contentmoderator/models/review.rb'
49
- autoload :DetectedTerms, '1.0/generated/azure_cognitiveservices_contentmoderator/models/detected_terms.rb'
47
+ autoload :Address, '1.0/generated/azure_cognitiveservices_contentmoderator/models/address.rb'
50
48
  autoload :JobExecutionReportDetails, '1.0/generated/azure_cognitiveservices_contentmoderator/models/job_execution_report_details.rb'
51
- autoload :Face, '1.0/generated/azure_cognitiveservices_contentmoderator/models/face.rb'
49
+ autoload :DetectedTerms, '1.0/generated/azure_cognitiveservices_contentmoderator/models/detected_terms.rb'
52
50
  autoload :Job, '1.0/generated/azure_cognitiveservices_contentmoderator/models/job.rb'
53
- autoload :Candidate, '1.0/generated/azure_cognitiveservices_contentmoderator/models/candidate.rb'
51
+ autoload :Face, '1.0/generated/azure_cognitiveservices_contentmoderator/models/face.rb'
54
52
  autoload :JobListResult, '1.0/generated/azure_cognitiveservices_contentmoderator/models/job_list_result.rb'
55
- autoload :Evaluate, '1.0/generated/azure_cognitiveservices_contentmoderator/models/evaluate.rb'
53
+ autoload :Candidate, '1.0/generated/azure_cognitiveservices_contentmoderator/models/candidate.rb'
56
54
  autoload :JobId, '1.0/generated/azure_cognitiveservices_contentmoderator/models/job_id.rb'
57
- autoload :MatchResponse, '1.0/generated/azure_cognitiveservices_contentmoderator/models/match_response.rb'
55
+ autoload :Evaluate, '1.0/generated/azure_cognitiveservices_contentmoderator/models/evaluate.rb'
58
56
  autoload :Error, '1.0/generated/azure_cognitiveservices_contentmoderator/models/error.rb'
59
- autoload :ImageListMetadata, '1.0/generated/azure_cognitiveservices_contentmoderator/models/image_list_metadata.rb'
57
+ autoload :MatchResponse, '1.0/generated/azure_cognitiveservices_contentmoderator/models/match_response.rb'
60
58
  autoload :APIError, '1.0/generated/azure_cognitiveservices_contentmoderator/models/apierror.rb'
61
- autoload :TermListMetadata, '1.0/generated/azure_cognitiveservices_contentmoderator/models/term_list_metadata.rb'
59
+ autoload :ImageList, '1.0/generated/azure_cognitiveservices_contentmoderator/models/image_list.rb'
62
60
  autoload :TranscriptModerationBodyItemTermsItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/transcript_moderation_body_item_terms_item.rb'
63
- autoload :RefreshIndexAdvancedInfoItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/refresh_index_advanced_info_item.rb'
61
+ autoload :RefreshIndex, '1.0/generated/azure_cognitiveservices_contentmoderator/models/refresh_index.rb'
64
62
  autoload :TranscriptModerationBodyItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/transcript_moderation_body_item.rb'
65
63
  autoload :Frame, '1.0/generated/azure_cognitiveservices_contentmoderator/models/frame.rb'
66
64
  autoload :CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/create_video_reviews_body_item_video_frames_item_reviewer_result_tags_item.rb'
@@ -73,24 +71,21 @@ module Azure::CognitiveServices::ContentModerator::V1_0
73
71
  autoload :FoundFaces, '1.0/generated/azure_cognitiveservices_contentmoderator/models/found_faces.rb'
74
72
  autoload :CreateVideoReviewsBodyItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/create_video_reviews_body_item.rb'
75
73
  autoload :Match, '1.0/generated/azure_cognitiveservices_contentmoderator/models/match.rb'
76
- autoload :BodyMetadata, '1.0/generated/azure_cognitiveservices_contentmoderator/models/body_metadata.rb'
77
- autoload :ImageList, '1.0/generated/azure_cognitiveservices_contentmoderator/models/image_list.rb'
78
74
  autoload :Body, '1.0/generated/azure_cognitiveservices_contentmoderator/models/body.rb'
79
- autoload :KeyValuePair, '1.0/generated/azure_cognitiveservices_contentmoderator/models/key_value_pair.rb'
75
+ autoload :TermList, '1.0/generated/azure_cognitiveservices_contentmoderator/models/term_list.rb'
80
76
  autoload :ImageUrl, '1.0/generated/azure_cognitiveservices_contentmoderator/models/image_url.rb'
81
- autoload :Status, '1.0/generated/azure_cognitiveservices_contentmoderator/models/status.rb'
77
+ autoload :ClassificationCategory1, '1.0/generated/azure_cognitiveservices_contentmoderator/models/classification_category1.rb'
82
78
  autoload :VideoFrameBodyItemReviewerResultTagsItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/video_frame_body_item_reviewer_result_tags_item.rb'
83
- autoload :Screen, '1.0/generated/azure_cognitiveservices_contentmoderator/models/screen.rb'
79
+ autoload :Phone, '1.0/generated/azure_cognitiveservices_contentmoderator/models/phone.rb'
84
80
  autoload :VideoFrameBodyItemMetadataItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/video_frame_body_item_metadata_item.rb'
85
- autoload :DetectedLanguage, '1.0/generated/azure_cognitiveservices_contentmoderator/models/detected_language.rb'
81
+ autoload :OCR, '1.0/generated/azure_cognitiveservices_contentmoderator/models/ocr.rb'
86
82
  autoload :VideoFrameBodyItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/video_frame_body_item.rb'
87
- autoload :ClassificationCategory1, '1.0/generated/azure_cognitiveservices_contentmoderator/models/classification_category1.rb'
83
+ autoload :KeyValuePair, '1.0/generated/azure_cognitiveservices_contentmoderator/models/key_value_pair.rb'
88
84
  autoload :CreateReviewBodyItemMetadataItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/create_review_body_item_metadata_item.rb'
89
- autoload :OCR, '1.0/generated/azure_cognitiveservices_contentmoderator/models/ocr.rb'
85
+ autoload :Screen, '1.0/generated/azure_cognitiveservices_contentmoderator/models/screen.rb'
90
86
  autoload :CreateReviewBodyItem, '1.0/generated/azure_cognitiveservices_contentmoderator/models/create_review_body_item.rb'
91
- autoload :Phone, '1.0/generated/azure_cognitiveservices_contentmoderator/models/phone.rb'
87
+ autoload :Status, '1.0/generated/azure_cognitiveservices_contentmoderator/models/status.rb'
92
88
  autoload :Content, '1.0/generated/azure_cognitiveservices_contentmoderator/models/content.rb'
93
- autoload :TermList, '1.0/generated/azure_cognitiveservices_contentmoderator/models/term_list.rb'
94
- autoload :AzureRegionBaseUrl, '1.0/generated/azure_cognitiveservices_contentmoderator/models/azure_region_base_url.rb'
89
+ autoload :DetectedLanguage, '1.0/generated/azure_cognitiveservices_contentmoderator/models/detected_language.rb'
95
90
  end
96
91
  end
@@ -17,22 +17,9 @@ module Azure::CognitiveServices::ContentModerator::V1_0
17
17
  # @return Credentials needed for the client to connect to Azure.
18
18
  attr_reader :credentials1
19
19
 
20
- # @return [AzureRegionBaseUrl] Supported Azure regions for Content
21
- # Moderator endpoints. Possible values include:
22
- # 'westus.api.cognitive.microsoft.com',
23
- # 'westus2.api.cognitive.microsoft.com',
24
- # 'eastus.api.cognitive.microsoft.com',
25
- # 'eastus2.api.cognitive.microsoft.com',
26
- # 'westcentralus.api.cognitive.microsoft.com',
27
- # 'southcentralus.api.cognitive.microsoft.com',
28
- # 'westeurope.api.cognitive.microsoft.com',
29
- # 'northeurope.api.cognitive.microsoft.com',
30
- # 'southeastasia.api.cognitive.microsoft.com',
31
- # 'eastasia.api.cognitive.microsoft.com',
32
- # 'australiaeast.api.cognitive.microsoft.com',
33
- # 'brazilsouth.api.cognitive.microsoft.com',
34
- # 'contentmoderatortest.azure-api.net'
35
- attr_accessor :base_url
20
+ # @return [String] Supported Cognitive Services endpoints (protocol and
21
+ # hostname, for example: https://westus.api.cognitive.microsoft.com).
22
+ attr_accessor :endpoint
36
23
 
37
24
  # @return Subscription credentials which uniquely identify client
38
25
  # subscription.
@@ -78,7 +65,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
78
65
  #
79
66
  def initialize(credentials = nil, options = nil)
80
67
  super(credentials, options)
81
- @base_url = 'https://{baseUrl}/'
68
+ @base_url = '{Endpoint}'
82
69
 
83
70
  fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
84
71
  @credentials = credentials
@@ -161,7 +148,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
161
148
  #
162
149
  def add_telemetry
163
150
  sdk_information = 'azure_cognitiveservices_contentmoderator'
164
- sdk_information = "#{sdk_information}/0.17.0"
151
+ sdk_information = "#{sdk_information}/0.17.1"
165
152
  add_user_agent_information(sdk_information)
166
153
  end
167
154
  end
@@ -17,14 +17,6 @@ module Azure::CognitiveServices::ContentModerator::V1_0
17
17
  # If the content passed to the text API or the image API exceeds the size
18
18
  # limits, the API will return an error code that informs about the issue.
19
19
  #
20
- # This API is currently available in:
21
- #
22
- # * West US - westus.api.cognitive.microsoft.com
23
- # * East US 2 - eastus2.api.cognitive.microsoft.com
24
- # * West Central US - westcentralus.api.cognitive.microsoft.com
25
- # * West Europe - westeurope.api.cognitive.microsoft.com
26
- # * Southeast Asia - southeastasia.api.cognitive.microsoft.com .
27
- #
28
20
  class ImageModeration
29
21
  include MsRestAzure
30
22
 
@@ -79,7 +71,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
79
71
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
80
72
  #
81
73
  def find_faces_async(cache_image:nil, custom_headers:nil)
82
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
74
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
83
75
 
84
76
 
85
77
  request_headers = {}
@@ -91,7 +83,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
91
83
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/FindFaces'
92
84
 
93
85
  request_url = @base_url || @client.base_url
94
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
86
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
95
87
 
96
88
  options = {
97
89
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -192,7 +184,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
192
184
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
193
185
  #
194
186
  def ocrmethod_async(language, cache_image:nil, enhanced:false, custom_headers:nil)
195
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
187
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
196
188
  fail ArgumentError, 'language is nil' if language.nil?
197
189
 
198
190
 
@@ -205,7 +197,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
205
197
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/OCR'
206
198
 
207
199
  request_url = @base_url || @client.base_url
208
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
200
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
209
201
 
210
202
  options = {
211
203
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -282,7 +274,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
282
274
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
283
275
  #
284
276
  def evaluate_method_async(cache_image:nil, custom_headers:nil)
285
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
277
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
286
278
 
287
279
 
288
280
  request_headers = {}
@@ -294,7 +286,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
294
286
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/Evaluate'
295
287
 
296
288
  request_url = @base_url || @client.base_url
297
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
289
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
298
290
 
299
291
  options = {
300
292
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -398,7 +390,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
398
390
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
399
391
  #
400
392
  def match_method_async(list_id:nil, cache_image:nil, custom_headers:nil)
401
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
393
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
402
394
 
403
395
 
404
396
  request_headers = {}
@@ -410,7 +402,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
410
402
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/Match'
411
403
 
412
404
  request_url = @base_url || @client.base_url
413
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
405
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
414
406
 
415
407
  options = {
416
408
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -490,7 +482,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
490
482
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
491
483
  #
492
484
  def find_faces_file_input_async(image_stream, cache_image:nil, custom_headers:nil)
493
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
485
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
494
486
  fail ArgumentError, 'image_stream is nil' if image_stream.nil?
495
487
 
496
488
 
@@ -515,7 +507,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
515
507
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/FindFaces'
516
508
 
517
509
  request_url = @base_url || @client.base_url
518
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
510
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
519
511
 
520
512
  options = {
521
513
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -599,7 +591,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
599
591
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
600
592
  #
601
593
  def find_faces_url_input_async(content_type, image_url, cache_image:nil, custom_headers:nil)
602
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
594
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
603
595
  fail ArgumentError, 'content_type is nil' if content_type.nil?
604
596
  fail ArgumentError, 'image_url is nil' if image_url.nil?
605
597
 
@@ -620,7 +612,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
620
612
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/FindFaces'
621
613
 
622
614
  request_url = @base_url || @client.base_url
623
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
615
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
624
616
 
625
617
  options = {
626
618
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -728,7 +720,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
728
720
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
729
721
  #
730
722
  def ocrurl_input_async(language, content_type, image_url, cache_image:nil, enhanced:false, custom_headers:nil)
731
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
723
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
732
724
  fail ArgumentError, 'language is nil' if language.nil?
733
725
  fail ArgumentError, 'content_type is nil' if content_type.nil?
734
726
  fail ArgumentError, 'image_url is nil' if image_url.nil?
@@ -750,7 +742,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
750
742
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/OCR'
751
743
 
752
744
  request_url = @base_url || @client.base_url
753
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
745
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
754
746
 
755
747
  options = {
756
748
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -855,7 +847,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
855
847
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
856
848
  #
857
849
  def ocrfile_input_async(language, image_stream, cache_image:nil, enhanced:false, custom_headers:nil)
858
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
850
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
859
851
  fail ArgumentError, 'language is nil' if language.nil?
860
852
  fail ArgumentError, 'image_stream is nil' if image_stream.nil?
861
853
 
@@ -881,7 +873,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
881
873
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/OCR'
882
874
 
883
875
  request_url = @base_url || @client.base_url
884
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
876
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
885
877
 
886
878
  options = {
887
879
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -962,7 +954,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
962
954
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
963
955
  #
964
956
  def evaluate_file_input_async(image_stream, cache_image:nil, custom_headers:nil)
965
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
957
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
966
958
  fail ArgumentError, 'image_stream is nil' if image_stream.nil?
967
959
 
968
960
 
@@ -987,7 +979,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
987
979
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/Evaluate'
988
980
 
989
981
  request_url = @base_url || @client.base_url
990
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
982
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
991
983
 
992
984
  options = {
993
985
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -1071,7 +1063,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
1071
1063
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1072
1064
  #
1073
1065
  def evaluate_url_input_async(content_type, image_url, cache_image:nil, custom_headers:nil)
1074
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
1066
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
1075
1067
  fail ArgumentError, 'content_type is nil' if content_type.nil?
1076
1068
  fail ArgumentError, 'image_url is nil' if image_url.nil?
1077
1069
 
@@ -1092,7 +1084,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
1092
1084
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/Evaluate'
1093
1085
 
1094
1086
  request_url = @base_url || @client.base_url
1095
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
1087
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
1096
1088
 
1097
1089
  options = {
1098
1090
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -1203,7 +1195,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
1203
1195
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1204
1196
  #
1205
1197
  def match_url_input_async(content_type, image_url, list_id:nil, cache_image:nil, custom_headers:nil)
1206
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
1198
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
1207
1199
  fail ArgumentError, 'content_type is nil' if content_type.nil?
1208
1200
  fail ArgumentError, 'image_url is nil' if image_url.nil?
1209
1201
 
@@ -1224,7 +1216,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
1224
1216
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/Match'
1225
1217
 
1226
1218
  request_url = @base_url || @client.base_url
1227
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
1219
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
1228
1220
 
1229
1221
  options = {
1230
1222
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -1332,7 +1324,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
1332
1324
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1333
1325
  #
1334
1326
  def match_file_input_async(image_stream, list_id:nil, cache_image:nil, custom_headers:nil)
1335
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
1327
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
1336
1328
  fail ArgumentError, 'image_stream is nil' if image_stream.nil?
1337
1329
 
1338
1330
 
@@ -1357,7 +1349,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
1357
1349
  path_template = 'contentmoderator/moderate/v1.0/ProcessImage/Match'
1358
1350
 
1359
1351
  request_url = @base_url || @client.base_url
1360
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
1352
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
1361
1353
 
1362
1354
  options = {
1363
1355
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -17,14 +17,6 @@ module Azure::CognitiveServices::ContentModerator::V1_0
17
17
  # If the content passed to the text API or the image API exceeds the size
18
18
  # limits, the API will return an error code that informs about the issue.
19
19
  #
20
- # This API is currently available in:
21
- #
22
- # * West US - westus.api.cognitive.microsoft.com
23
- # * East US 2 - eastus2.api.cognitive.microsoft.com
24
- # * West Central US - westcentralus.api.cognitive.microsoft.com
25
- # * West Europe - westeurope.api.cognitive.microsoft.com
26
- # * Southeast Asia - southeastasia.api.cognitive.microsoft.com .
27
- #
28
20
  class ListManagementImage
29
21
  include MsRestAzure
30
22
 
@@ -82,7 +74,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
82
74
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
83
75
  #
84
76
  def add_image_async(list_id, tag:nil, label:nil, custom_headers:nil)
85
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
77
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
86
78
  fail ArgumentError, 'list_id is nil' if list_id.nil?
87
79
 
88
80
 
@@ -95,7 +87,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
95
87
  path_template = 'contentmoderator/lists/v1.0/imagelists/{listId}/images'
96
88
 
97
89
  request_url = @base_url || @client.base_url
98
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
90
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
99
91
 
100
92
  options = {
101
93
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -170,7 +162,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
170
162
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
171
163
  #
172
164
  def delete_all_images_async(list_id, custom_headers:nil)
173
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
165
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
174
166
  fail ArgumentError, 'list_id is nil' if list_id.nil?
175
167
 
176
168
 
@@ -183,7 +175,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
183
175
  path_template = 'contentmoderator/lists/v1.0/imagelists/{listId}/images'
184
176
 
185
177
  request_url = @base_url || @client.base_url
186
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
178
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
187
179
 
188
180
  options = {
189
181
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -264,7 +256,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
264
256
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
265
257
  #
266
258
  def get_all_image_ids_async(list_id, custom_headers:nil)
267
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
259
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
268
260
  fail ArgumentError, 'list_id is nil' if list_id.nil?
269
261
 
270
262
 
@@ -277,7 +269,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
277
269
  path_template = 'contentmoderator/lists/v1.0/imagelists/{listId}/images'
278
270
 
279
271
  request_url = @base_url || @client.base_url
280
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
272
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
281
273
 
282
274
  options = {
283
275
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -354,7 +346,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
354
346
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
355
347
  #
356
348
  def delete_image_async(list_id, image_id, custom_headers:nil)
357
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
349
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
358
350
  fail ArgumentError, 'list_id is nil' if list_id.nil?
359
351
  fail ArgumentError, 'image_id is nil' if image_id.nil?
360
352
 
@@ -368,7 +360,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
368
360
  path_template = 'contentmoderator/lists/v1.0/imagelists/{listId}/images/{ImageId}'
369
361
 
370
362
  request_url = @base_url || @client.base_url
371
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
363
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
372
364
 
373
365
  options = {
374
366
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -461,7 +453,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
461
453
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
462
454
  #
463
455
  def add_image_url_input_async(list_id, content_type, image_url, tag:nil, label:nil, custom_headers:nil)
464
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
456
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
465
457
  fail ArgumentError, 'list_id is nil' if list_id.nil?
466
458
  fail ArgumentError, 'content_type is nil' if content_type.nil?
467
459
  fail ArgumentError, 'image_url is nil' if image_url.nil?
@@ -483,7 +475,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
483
475
  path_template = 'contentmoderator/lists/v1.0/imagelists/{listId}/images'
484
476
 
485
477
  request_url = @base_url || @client.base_url
486
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
478
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
487
479
 
488
480
  options = {
489
481
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -568,7 +560,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
568
560
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
569
561
  #
570
562
  def add_image_file_input_async(list_id, image_stream, tag:nil, label:nil, custom_headers:nil)
571
- fail ArgumentError, '@client.base_url is nil' if @client.base_url.nil?
563
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
572
564
  fail ArgumentError, 'list_id is nil' if list_id.nil?
573
565
  fail ArgumentError, 'image_stream is nil' if image_stream.nil?
574
566
 
@@ -594,7 +586,7 @@ module Azure::CognitiveServices::ContentModerator::V1_0
594
586
  path_template = 'contentmoderator/lists/v1.0/imagelists/{listId}/images'
595
587
 
596
588
  request_url = @base_url || @client.base_url
597
- request_url = request_url.gsub('{baseUrl}', @client.base_url)
589
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
598
590
 
599
591
  options = {
600
592
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],