diff --git a/azure_sdk/lib/azure_sdk.rb b/azure_sdk/lib/azure_sdk.rb index 4de13c3d8b..3d3eabaa94 100644 --- a/azure_sdk/lib/azure_sdk.rb +++ b/azure_sdk/lib/azure_sdk.rb @@ -2,5 +2,5 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -require 'latest/latest_profile_client' require 'v2017_03_09/v2017_03_09_profile_client' +require 'latest/latest_profile_client' diff --git a/azure_sdk/lib/latest/modules/computervision_profile_module.rb b/azure_sdk/lib/latest/modules/computervision_profile_module.rb index cae6fdec77..003cc18c87 100644 --- a/azure_sdk/lib/latest/modules/computervision_profile_module.rb +++ b/azure_sdk/lib/latest/modules/computervision_profile_module.rb @@ -8,42 +8,44 @@ module Azure::Profiles::Latest module ComputerVision module Models - ImageDescriptionDetails = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescriptionDetails - Word = Azure::CognitiveServices::ComputerVision::V1_0::Models::Word FaceDescription = Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceDescription - RecognitionResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::RecognitionResult ImageAnalysis = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageAnalysis - FaceRectangle = Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceRectangle + Line = Azure::CognitiveServices::ComputerVision::V1_0::Models::Line OcrWord = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrWord - CategoryDetail = Azure::CognitiveServices::ComputerVision::V1_0::Models::CategoryDetail + TextOperationResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationResult OcrLine = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrLine - AdultInfo = Azure::CognitiveServices::ComputerVision::V1_0::Models::AdultInfo + CelebritiesModel = Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebritiesModel OcrRegion = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrRegion - ImageType = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageType + Category = Azure::CognitiveServices::ComputerVision::V1_0::Models::Category OcrResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrResult - ImageCaption = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageCaption + ColorInfo = Azure::CognitiveServices::ComputerVision::V1_0::Models::ColorInfo ModelDescription = Azure::CognitiveServices::ComputerVision::V1_0::Models::ModelDescription - Line = Azure::CognitiveServices::ComputerVision::V1_0::Models::Line + ImageTag = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageTag ListModelsResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::ListModelsResult - CelebritiesModel = Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebritiesModel + ImageMetadata = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageMetadata DomainModelResults = Azure::CognitiveServices::ComputerVision::V1_0::Models::DomainModelResults - ColorInfo = Azure::CognitiveServices::ComputerVision::V1_0::Models::ColorInfo + Word = Azure::CognitiveServices::ComputerVision::V1_0::Models::Word + CelebrityResults = Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebrityResults + FaceRectangle = Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceRectangle + LandmarkResultsLandmarksItem = Azure::CognitiveServices::ComputerVision::V1_0::Models::LandmarkResultsLandmarksItem + AdultInfo = Azure::CognitiveServices::ComputerVision::V1_0::Models::AdultInfo + LandmarkResults = Azure::CognitiveServices::ComputerVision::V1_0::Models::LandmarkResults + ImageCaption = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageCaption ImageDescription = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescription - ImageMetadata = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageMetadata + RecognitionResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::RecognitionResult TagResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::TagResult - Category = Azure::CognitiveServices::ComputerVision::V1_0::Models::Category + ImageType = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageType ComputerVisionError = Azure::CognitiveServices::ComputerVision::V1_0::Models::ComputerVisionError - TextOperationResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationResult + CategoryDetail = Azure::CognitiveServices::ComputerVision::V1_0::Models::CategoryDetail ImageUrl = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl - ImageTag = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageTag + ImageDescriptionDetails = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescriptionDetails TextOperationStatusCodes = Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationStatusCodes + Gender = Azure::CognitiveServices::ComputerVision::V1_0::Models::Gender ComputerVisionErrorCodes = Azure::CognitiveServices::ComputerVision::V1_0::Models::ComputerVisionErrorCodes VisualFeatureTypes = Azure::CognitiveServices::ComputerVision::V1_0::Models::VisualFeatureTypes OcrLanguages = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrLanguages AzureRegions = Azure::CognitiveServices::ComputerVision::V1_0::Models::AzureRegions Details = Azure::CognitiveServices::ComputerVision::V1_0::Models::Details - Language1 = Azure::CognitiveServices::ComputerVision::V1_0::Models::Language1 - DomainModels = Azure::CognitiveServices::ComputerVision::V1_0::Models::DomainModels end class ComputerVisionDataClass @@ -75,93 +77,105 @@ def method_missing(method, *args) end class ModelClasses - def image_description_details - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescriptionDetails - end - def word - Azure::CognitiveServices::ComputerVision::V1_0::Models::Word - end def face_description Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceDescription end - def recognition_result - Azure::CognitiveServices::ComputerVision::V1_0::Models::RecognitionResult - end def image_analysis Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageAnalysis end - def face_rectangle - Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceRectangle + def line + Azure::CognitiveServices::ComputerVision::V1_0::Models::Line end def ocr_word Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrWord end - def category_detail - Azure::CognitiveServices::ComputerVision::V1_0::Models::CategoryDetail + def text_operation_result + Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationResult end def ocr_line Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrLine end - def adult_info - Azure::CognitiveServices::ComputerVision::V1_0::Models::AdultInfo + def celebrities_model + Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebritiesModel end def ocr_region Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrRegion end - def image_type - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageType + def category + Azure::CognitiveServices::ComputerVision::V1_0::Models::Category end def ocr_result Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrResult end - def image_caption - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageCaption + def color_info + Azure::CognitiveServices::ComputerVision::V1_0::Models::ColorInfo end def model_description Azure::CognitiveServices::ComputerVision::V1_0::Models::ModelDescription end - def line - Azure::CognitiveServices::ComputerVision::V1_0::Models::Line + def image_tag + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageTag end def list_models_result Azure::CognitiveServices::ComputerVision::V1_0::Models::ListModelsResult end - def celebrities_model - Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebritiesModel + def image_metadata + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageMetadata end def domain_model_results Azure::CognitiveServices::ComputerVision::V1_0::Models::DomainModelResults end - def color_info - Azure::CognitiveServices::ComputerVision::V1_0::Models::ColorInfo + def word + Azure::CognitiveServices::ComputerVision::V1_0::Models::Word + end + def celebrity_results + Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebrityResults + end + def face_rectangle + Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceRectangle + end + def landmark_results_landmarks_item + Azure::CognitiveServices::ComputerVision::V1_0::Models::LandmarkResultsLandmarksItem + end + def adult_info + Azure::CognitiveServices::ComputerVision::V1_0::Models::AdultInfo + end + def landmark_results + Azure::CognitiveServices::ComputerVision::V1_0::Models::LandmarkResults + end + def image_caption + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageCaption end def image_description Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescription end - def image_metadata - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageMetadata + def recognition_result + Azure::CognitiveServices::ComputerVision::V1_0::Models::RecognitionResult end def tag_result Azure::CognitiveServices::ComputerVision::V1_0::Models::TagResult end - def category - Azure::CognitiveServices::ComputerVision::V1_0::Models::Category + def image_type + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageType end def computer_vision_error Azure::CognitiveServices::ComputerVision::V1_0::Models::ComputerVisionError end - def text_operation_result - Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationResult + def category_detail + Azure::CognitiveServices::ComputerVision::V1_0::Models::CategoryDetail end def image_url Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl end - def image_tag - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageTag + def image_description_details + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescriptionDetails end def text_operation_status_codes Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationStatusCodes end + def gender + Azure::CognitiveServices::ComputerVision::V1_0::Models::Gender + end def computer_vision_error_codes Azure::CognitiveServices::ComputerVision::V1_0::Models::ComputerVisionErrorCodes end @@ -177,12 +191,6 @@ def azure_regions def details Azure::CognitiveServices::ComputerVision::V1_0::Models::Details end - def language1 - Azure::CognitiveServices::ComputerVision::V1_0::Models::Language1 - end - def domain_models - Azure::CognitiveServices::ComputerVision::V1_0::Models::DomainModels - end end end end diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision.rb index f8b010eed5..0c179cda8b 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision.rb @@ -23,41 +23,43 @@ module Azure::CognitiveServices::ComputerVision::V1_0 autoload :ComputerVisionClient, '1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb' module Models - autoload :ImageDescriptionDetails, '1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb' - autoload :Word, '1.0/generated/azure_cognitiveservices_computervision/models/word.rb' autoload :FaceDescription, '1.0/generated/azure_cognitiveservices_computervision/models/face_description.rb' - autoload :RecognitionResult, '1.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb' autoload :ImageAnalysis, '1.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb' - autoload :FaceRectangle, '1.0/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb' + autoload :Line, '1.0/generated/azure_cognitiveservices_computervision/models/line.rb' autoload :OcrWord, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_word.rb' - autoload :CategoryDetail, '1.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb' + autoload :TextOperationResult, '1.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb' autoload :OcrLine, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_line.rb' - autoload :AdultInfo, '1.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb' + autoload :CelebritiesModel, '1.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb' autoload :OcrRegion, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb' - autoload :ImageType, '1.0/generated/azure_cognitiveservices_computervision/models/image_type.rb' + autoload :Category, '1.0/generated/azure_cognitiveservices_computervision/models/category.rb' autoload :OcrResult, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb' - autoload :ImageCaption, '1.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb' + autoload :ColorInfo, '1.0/generated/azure_cognitiveservices_computervision/models/color_info.rb' autoload :ModelDescription, '1.0/generated/azure_cognitiveservices_computervision/models/model_description.rb' - autoload :Line, '1.0/generated/azure_cognitiveservices_computervision/models/line.rb' + autoload :ImageTag, '1.0/generated/azure_cognitiveservices_computervision/models/image_tag.rb' autoload :ListModelsResult, '1.0/generated/azure_cognitiveservices_computervision/models/list_models_result.rb' - autoload :CelebritiesModel, '1.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb' + autoload :ImageMetadata, '1.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb' autoload :DomainModelResults, '1.0/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb' - autoload :ColorInfo, '1.0/generated/azure_cognitiveservices_computervision/models/color_info.rb' + autoload :Word, '1.0/generated/azure_cognitiveservices_computervision/models/word.rb' + autoload :CelebrityResults, '1.0/generated/azure_cognitiveservices_computervision/models/celebrity_results.rb' + autoload :FaceRectangle, '1.0/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb' + autoload :LandmarkResultsLandmarksItem, '1.0/generated/azure_cognitiveservices_computervision/models/landmark_results_landmarks_item.rb' + autoload :AdultInfo, '1.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb' + autoload :LandmarkResults, '1.0/generated/azure_cognitiveservices_computervision/models/landmark_results.rb' + autoload :ImageCaption, '1.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb' autoload :ImageDescription, '1.0/generated/azure_cognitiveservices_computervision/models/image_description.rb' - autoload :ImageMetadata, '1.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb' + autoload :RecognitionResult, '1.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb' autoload :TagResult, '1.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb' - autoload :Category, '1.0/generated/azure_cognitiveservices_computervision/models/category.rb' + autoload :ImageType, '1.0/generated/azure_cognitiveservices_computervision/models/image_type.rb' autoload :ComputerVisionError, '1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb' - autoload :TextOperationResult, '1.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb' + autoload :CategoryDetail, '1.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb' autoload :ImageUrl, '1.0/generated/azure_cognitiveservices_computervision/models/image_url.rb' - autoload :ImageTag, '1.0/generated/azure_cognitiveservices_computervision/models/image_tag.rb' + autoload :ImageDescriptionDetails, '1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb' autoload :TextOperationStatusCodes, '1.0/generated/azure_cognitiveservices_computervision/models/text_operation_status_codes.rb' + autoload :Gender, '1.0/generated/azure_cognitiveservices_computervision/models/gender.rb' autoload :ComputerVisionErrorCodes, '1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error_codes.rb' autoload :VisualFeatureTypes, '1.0/generated/azure_cognitiveservices_computervision/models/visual_feature_types.rb' autoload :OcrLanguages, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_languages.rb' autoload :AzureRegions, '1.0/generated/azure_cognitiveservices_computervision/models/azure_regions.rb' autoload :Details, '1.0/generated/azure_cognitiveservices_computervision/models/details.rb' - autoload :Language1, '1.0/generated/azure_cognitiveservices_computervision/models/language1.rb' - autoload :DomainModels, '1.0/generated/azure_cognitiveservices_computervision/models/domain_models.rb' end end diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb index fca9db6725..4844b73bfb 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb @@ -103,9 +103,6 @@ def make_request_async(method, path, options = {}) fail ArgumentError, 'path is nil' if path.nil? request_url = options[:base_url] || @base_url - if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?) - @request_headers['Content-Type'] = options[:headers]['Content-Type'] - end request_headers = @request_headers request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? @@ -127,8 +124,8 @@ def make_request_async(method, path, options = {}) # # @return [ListModelsResult] operation results. # - def list_models(custom_headers:nil) - response = list_models_async(custom_headers:custom_headers).value! + def list_models(custom_headers = nil) + response = list_models_async(custom_headers).value! response.body unless response.nil? end @@ -144,8 +141,8 @@ def list_models(custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_models_with_http_info(custom_headers:nil) - list_models_async(custom_headers:custom_headers).value! + def list_models_with_http_info(custom_headers = nil) + list_models_async(custom_headers).value! end # @@ -160,12 +157,11 @@ def list_models_with_http_info(custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_models_async(custom_headers:nil) + def list_models_async(custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -216,7 +212,7 @@ def list_models_async(custom_headers:nil) # to allow you to choose which features to return. By default, image # categories are returned in the response. # - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param visual_features [Array] A string indicating what # visual feature types to return. Multiple values should be comma-separated. # Valid visual feature types include:Categories - categorizes image content @@ -232,18 +228,18 @@ def list_models_async(custom_headers:nil) # details to return. Multiple values should be comma-separated. Valid visual # feature types include:Celebrities - identifies celebrities if detected in the # image. - # @param language [Language1] A string indicating which language to return. The - # service will return recognition results in specified language. If this + # @param language [Enum] The desired language for output generation. If this # parameter is not specified, the default value is "en".Supported - # languages:en - English, Default.zh - Simplified Chinese. Possible values - # include: 'en', 'zh' + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [ImageAnalysis] operation results. # - def analyze_image(url, visual_features:nil, details:nil, language:nil, custom_headers:nil) - response = analyze_image_async(url, visual_features:visual_features, details:details, language:language, custom_headers:custom_headers).value! + def analyze_image(url, visual_features = nil, details = nil, language = nil, custom_headers = nil) + response = analyze_image_async(url, visual_features, details, language, custom_headers).value! response.body unless response.nil? end @@ -254,7 +250,7 @@ def analyze_image(url, visual_features:nil, details:nil, language:nil, custom_he # to allow you to choose which features to return. By default, image # categories are returned in the response. # - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param visual_features [Array] A string indicating what # visual feature types to return. Multiple values should be comma-separated. # Valid visual feature types include:Categories - categorizes image content @@ -270,18 +266,18 @@ def analyze_image(url, visual_features:nil, details:nil, language:nil, custom_he # details to return. Multiple values should be comma-separated. Valid visual # feature types include:Celebrities - identifies celebrities if detected in the # image. - # @param language [Language1] A string indicating which language to return. The - # service will return recognition results in specified language. If this + # @param language [Enum] The desired language for output generation. If this # parameter is not specified, the default value is "en".Supported - # languages:en - English, Default.zh - Simplified Chinese. Possible values - # include: 'en', 'zh' + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def analyze_image_with_http_info(url, visual_features:nil, details:nil, language:nil, custom_headers:nil) - analyze_image_async(url, visual_features:visual_features, details:details, language:language, custom_headers:custom_headers).value! + def analyze_image_with_http_info(url, visual_features = nil, details = nil, language = nil, custom_headers = nil) + analyze_image_async(url, visual_features, details, language, custom_headers).value! end # @@ -291,7 +287,7 @@ def analyze_image_with_http_info(url, visual_features:nil, details:nil, language # to allow you to choose which features to return. By default, image # categories are returned in the response. # - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param visual_features [Array] A string indicating what # visual feature types to return. Multiple values should be comma-separated. # Valid visual feature types include:Categories - categorizes image content @@ -307,17 +303,17 @@ def analyze_image_with_http_info(url, visual_features:nil, details:nil, language # details to return. Multiple values should be comma-separated. Valid visual # feature types include:Celebrities - identifies celebrities if detected in the # image. - # @param language [Language1] A string indicating which language to return. The - # service will return recognition results in specified language. If this + # @param language [Enum] The desired language for output generation. If this # parameter is not specified, the default value is "en".Supported - # languages:en - English, Default.zh - Simplified Chinese. Possible values - # include: 'en', 'zh' + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def analyze_image_async(url, visual_features:nil, details:nil, language:nil, custom_headers:nil) + def analyze_image_async(url, visual_features = nil, details = nil, language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'url is nil' if url.nil? @@ -327,12 +323,13 @@ def analyze_image_async(url, visual_features:nil, details:nil, language:nil, cus end request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' + # Serialize Request request_mapper = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl.mapper() request_content = self.serialize(request_mapper, image_url) @@ -392,15 +389,15 @@ def analyze_image_async(url, visual_features:nil, details:nil, language:nil, cus # Recommended minimum of 50. # @param height [Integer] Height of the thumbnail. It must be between 1 and # 1024. Recommended minimum of 50. - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param smart_cropping [Boolean] Boolean flag for enabling smart cropping. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [NOT_IMPLEMENTED] operation results. # - def generate_thumbnail(width, height, url, smart_cropping:false, custom_headers:nil) - response = generate_thumbnail_async(width, height, url, smart_cropping:smart_cropping, custom_headers:custom_headers).value! + def generate_thumbnail(width, height, url, smart_cropping = false, custom_headers = nil) + response = generate_thumbnail_async(width, height, url, smart_cropping, custom_headers).value! response.body unless response.nil? end @@ -417,15 +414,15 @@ def generate_thumbnail(width, height, url, smart_cropping:false, custom_headers: # Recommended minimum of 50. # @param height [Integer] Height of the thumbnail. It must be between 1 and # 1024. Recommended minimum of 50. - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param smart_cropping [Boolean] Boolean flag for enabling smart cropping. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def generate_thumbnail_with_http_info(width, height, url, smart_cropping:false, custom_headers:nil) - generate_thumbnail_async(width, height, url, smart_cropping:smart_cropping, custom_headers:custom_headers).value! + def generate_thumbnail_with_http_info(width, height, url, smart_cropping = false, custom_headers = nil) + generate_thumbnail_async(width, height, url, smart_cropping, custom_headers).value! end # @@ -441,21 +438,17 @@ def generate_thumbnail_with_http_info(width, height, url, smart_cropping:false, # Recommended minimum of 50. # @param height [Integer] Height of the thumbnail. It must be between 1 and # 1024. Recommended minimum of 50. - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param smart_cropping [Boolean] Boolean flag for enabling smart cropping. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def generate_thumbnail_async(width, height, url, smart_cropping:false, custom_headers:nil) + def generate_thumbnail_async(width, height, url, smart_cropping = false, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'width is nil' if width.nil? - fail ArgumentError, "'width' should satisfy the constraint - 'InclusiveMaximum': '1023'" if !width.nil? && width > 1023 - fail ArgumentError, "'width' should satisfy the constraint - 'InclusiveMinimum': '1'" if !width.nil? && width < 1 fail ArgumentError, 'height is nil' if height.nil? - fail ArgumentError, "'height' should satisfy the constraint - 'InclusiveMaximum': '1023'" if !height.nil? && height > 1023 - fail ArgumentError, "'height' should satisfy the constraint - 'InclusiveMinimum': '1'" if !height.nil? && height < 1 fail ArgumentError, 'url is nil' if url.nil? image_url = ImageUrl.new @@ -464,12 +457,13 @@ def generate_thumbnail_async(width, height, url, smart_cropping:false, custom_he end request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' + # Serialize Request request_mapper = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl.mapper() request_content = self.serialize(request_mapper, image_url) @@ -504,7 +498,6 @@ def generate_thumbnail_async(width, height, url, smart_cropping:false, custom_he begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { - client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { @@ -535,7 +528,7 @@ def generate_thumbnail_async(width, height, url, smart_cropping:false, custom_he # the image. With detectOrientation=true the OCR service tries to detect the # image orientation and correct it before further processing (e.g. if it's # upside-down). - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param language [OcrLanguages] The BCP-47 language code of the text to be # detected in the image. The default value is 'unk'. Possible values include: # 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', @@ -546,8 +539,8 @@ def generate_thumbnail_async(width, height, url, smart_cropping:false, custom_he # # @return [OcrResult] operation results. # - def recognize_printed_text(detect_orientation, url, language:nil, custom_headers:nil) - response = recognize_printed_text_async(detect_orientation, url, language:language, custom_headers:custom_headers).value! + def recognize_printed_text(detect_orientation, url, language = nil, custom_headers = nil) + response = recognize_printed_text_async(detect_orientation, url, language, custom_headers).value! response.body unless response.nil? end @@ -563,7 +556,7 @@ def recognize_printed_text(detect_orientation, url, language:nil, custom_headers # the image. With detectOrientation=true the OCR service tries to detect the # image orientation and correct it before further processing (e.g. if it's # upside-down). - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param language [OcrLanguages] The BCP-47 language code of the text to be # detected in the image. The default value is 'unk'. Possible values include: # 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', @@ -574,8 +567,8 @@ def recognize_printed_text(detect_orientation, url, language:nil, custom_headers # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def recognize_printed_text_with_http_info(detect_orientation, url, language:nil, custom_headers:nil) - recognize_printed_text_async(detect_orientation, url, language:language, custom_headers:custom_headers).value! + def recognize_printed_text_with_http_info(detect_orientation, url, language = nil, custom_headers = nil) + recognize_printed_text_async(detect_orientation, url, language, custom_headers).value! end # @@ -590,7 +583,7 @@ def recognize_printed_text_with_http_info(detect_orientation, url, language:nil, # the image. With detectOrientation=true the OCR service tries to detect the # image orientation and correct it before further processing (e.g. if it's # upside-down). - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param language [OcrLanguages] The BCP-47 language code of the text to be # detected in the image. The default value is 'unk'. Possible values include: # 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', @@ -601,7 +594,7 @@ def recognize_printed_text_with_http_info(detect_orientation, url, language:nil, # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def recognize_printed_text_async(detect_orientation, url, language:nil, custom_headers:nil) + def recognize_printed_text_async(detect_orientation, url, language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'detect_orientation is nil' if detect_orientation.nil? fail ArgumentError, 'url is nil' if url.nil? @@ -612,12 +605,13 @@ def recognize_printed_text_async(detect_orientation, url, language:nil, custom_h end request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' + # Serialize Request request_mapper = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl.mapper() request_content = self.serialize(request_mapper, image_url) @@ -674,16 +668,21 @@ def recognize_printed_text_async(detect_orientation, url, language:nil, custom_h # will be returned in JSON. If the request failed, the response will contain # an error code and a message to help understand what went wrong. # - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param max_candidates [String] Maximum number of candidate descriptions to be # returned. The default is 1. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [ImageDescription] operation results. # - def describe_image(url, max_candidates:'1', custom_headers:nil) - response = describe_image_async(url, max_candidates:max_candidates, custom_headers:custom_headers).value! + def describe_image(url, max_candidates = '1', language = nil, custom_headers = nil) + response = describe_image_async(url, max_candidates, language, custom_headers).value! response.body unless response.nil? end @@ -697,16 +696,21 @@ def describe_image(url, max_candidates:'1', custom_headers:nil) # will be returned in JSON. If the request failed, the response will contain # an error code and a message to help understand what went wrong. # - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param max_candidates [String] Maximum number of candidate descriptions to be # returned. The default is 1. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def describe_image_with_http_info(url, max_candidates:'1', custom_headers:nil) - describe_image_async(url, max_candidates:max_candidates, custom_headers:custom_headers).value! + def describe_image_with_http_info(url, max_candidates = '1', language = nil, custom_headers = nil) + describe_image_async(url, max_candidates, language, custom_headers).value! end # @@ -719,15 +723,20 @@ def describe_image_with_http_info(url, max_candidates:'1', custom_headers:nil) # will be returned in JSON. If the request failed, the response will contain # an error code and a message to help understand what went wrong. # - # @param url [String] + # @param url [String] Publicly reachable URL of an image # @param max_candidates [String] Maximum number of candidate descriptions to be # returned. The default is 1. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def describe_image_async(url, max_candidates:'1', custom_headers:nil) + def describe_image_async(url, max_candidates = '1', language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'url is nil' if url.nil? @@ -737,12 +746,13 @@ def describe_image_async(url, max_candidates:'1', custom_headers:nil) end request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' + # Serialize Request request_mapper = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl.mapper() request_content = self.serialize(request_mapper, image_url) @@ -755,7 +765,7 @@ def describe_image_async(url, max_candidates:'1', custom_headers:nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - query_params: {'maxCandidates' => max_candidates}, + query_params: {'maxCandidates' => max_candidates,'language' => language}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -795,17 +805,22 @@ def describe_image_async(url, max_candidates:'1', custom_headers:nil) # on objects, living beings, scenery or actions found in images. Unlike # categories, tags are not organized according to a hierarchical classification # system, but correspond to image content. Tags may contain hints to avoid - # ambiguity or provide context, for example the tag “cello” may be accompanied - # by the hint “musical instrument”. All tags are in English. + # ambiguity or provide context, for example the tag 'cello' may be accompanied + # by the hint 'musical instrument'. All tags are in English. # - # @param url [String] + # @param url [String] Publicly reachable URL of an image + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [TagResult] operation results. # - def tag_image(url, custom_headers:nil) - response = tag_image_async(url, custom_headers:custom_headers).value! + def tag_image(url, language = nil, custom_headers = nil) + response = tag_image_async(url, language, custom_headers).value! response.body unless response.nil? end @@ -815,17 +830,22 @@ def tag_image(url, custom_headers:nil) # on objects, living beings, scenery or actions found in images. Unlike # categories, tags are not organized according to a hierarchical classification # system, but correspond to image content. Tags may contain hints to avoid - # ambiguity or provide context, for example the tag “cello” may be accompanied - # by the hint “musical instrument”. All tags are in English. + # ambiguity or provide context, for example the tag 'cello' may be accompanied + # by the hint 'musical instrument'. All tags are in English. # - # @param url [String] + # @param url [String] Publicly reachable URL of an image + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def tag_image_with_http_info(url, custom_headers:nil) - tag_image_async(url, custom_headers:custom_headers).value! + def tag_image_with_http_info(url, language = nil, custom_headers = nil) + tag_image_async(url, language, custom_headers).value! end # @@ -834,16 +854,21 @@ def tag_image_with_http_info(url, custom_headers:nil) # on objects, living beings, scenery or actions found in images. Unlike # categories, tags are not organized according to a hierarchical classification # system, but correspond to image content. Tags may contain hints to avoid - # ambiguity or provide context, for example the tag “cello” may be accompanied - # by the hint “musical instrument”. All tags are in English. + # ambiguity or provide context, for example the tag 'cello' may be accompanied + # by the hint 'musical instrument'. All tags are in English. # - # @param url [String] + # @param url [String] Publicly reachable URL of an image + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def tag_image_async(url, custom_headers:nil) + def tag_image_async(url, language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'url is nil' if url.nil? @@ -853,12 +878,13 @@ def tag_image_async(url, custom_headers:nil) end request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' + # Serialize Request request_mapper = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl.mapper() request_content = self.serialize(request_mapper, image_url) @@ -871,6 +897,7 @@ def tag_image_async(url, custom_headers:nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + query_params: {'language' => language}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -914,16 +941,20 @@ def tag_image_async(url, custom_headers:nil) # failed, the response will contain an error code and a message to help # understand what went wrong. # - # @param model [DomainModels] The domain-specific content to recognize. - # Possible values include: 'Celebrities', 'Landmarks' - # @param url [String] + # @param model [String] The domain-specific content to recognize. + # @param url [String] Publicly reachable URL of an image + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [DomainModelResults] operation results. # - def analyze_image_by_domain(model, url, custom_headers:nil) - response = analyze_image_by_domain_async(model, url, custom_headers:custom_headers).value! + def analyze_image_by_domain(model, url, language = nil, custom_headers = nil) + response = analyze_image_by_domain_async(model, url, language, custom_headers).value! response.body unless response.nil? end @@ -937,16 +968,20 @@ def analyze_image_by_domain(model, url, custom_headers:nil) # failed, the response will contain an error code and a message to help # understand what went wrong. # - # @param model [DomainModels] The domain-specific content to recognize. - # Possible values include: 'Celebrities', 'Landmarks' - # @param url [String] + # @param model [String] The domain-specific content to recognize. + # @param url [String] Publicly reachable URL of an image + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def analyze_image_by_domain_with_http_info(model, url, custom_headers:nil) - analyze_image_by_domain_async(model, url, custom_headers:custom_headers).value! + def analyze_image_by_domain_with_http_info(model, url, language = nil, custom_headers = nil) + analyze_image_by_domain_async(model, url, language, custom_headers).value! end # @@ -959,15 +994,19 @@ def analyze_image_by_domain_with_http_info(model, url, custom_headers:nil) # failed, the response will contain an error code and a message to help # understand what went wrong. # - # @param model [DomainModels] The domain-specific content to recognize. - # Possible values include: 'Celebrities', 'Landmarks' - # @param url [String] + # @param model [String] The domain-specific content to recognize. + # @param url [String] Publicly reachable URL of an image + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def analyze_image_by_domain_async(model, url, custom_headers:nil) + def analyze_image_by_domain_async(model, url, language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'model is nil' if model.nil? fail ArgumentError, 'url is nil' if url.nil? @@ -978,12 +1017,13 @@ def analyze_image_by_domain_async(model, url, custom_headers:nil) end request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' + # Serialize Request request_mapper = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl.mapper() request_content = self.serialize(request_mapper, image_url) @@ -997,6 +1037,7 @@ def analyze_image_by_domain_async(model, url, custom_headers:nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'model' => model}, + query_params: {'language' => language}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -1032,58 +1073,58 @@ def analyze_image_by_domain_async(model, url, custom_headers:nil) # # Recognize Text operation. When you use the Recognize Text interface, the - # response contains a field called “Operation-Location”. The - # “Operation-Location” field contains the URL that you must use for your Get + # response contains a field called 'Operation-Location'. The + # 'Operation-Location' field contains the URL that you must use for your Get # Handwritten Text Operation Result operation. # - # @param url [String] - # @param detect_handwriting [Boolean] If “true” is specified, handwriting - # recognition is performed. If this parameter is set to “false” or is not + # @param url [String] Publicly reachable URL of an image + # @param detect_handwriting [Boolean] If 'true' is specified, handwriting + # recognition is performed. If this parameter is set to 'false' or is not # specified, printed text recognition is performed. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def recognize_text(url, detect_handwriting:false, custom_headers:nil) - response = recognize_text_async(url, detect_handwriting:detect_handwriting, custom_headers:custom_headers).value! + def recognize_text(url, detect_handwriting = false, custom_headers = nil) + response = recognize_text_async(url, detect_handwriting, custom_headers).value! nil end # # Recognize Text operation. When you use the Recognize Text interface, the - # response contains a field called “Operation-Location”. The - # “Operation-Location” field contains the URL that you must use for your Get + # response contains a field called 'Operation-Location'. The + # 'Operation-Location' field contains the URL that you must use for your Get # Handwritten Text Operation Result operation. # - # @param url [String] - # @param detect_handwriting [Boolean] If “true” is specified, handwriting - # recognition is performed. If this parameter is set to “false” or is not + # @param url [String] Publicly reachable URL of an image + # @param detect_handwriting [Boolean] If 'true' is specified, handwriting + # recognition is performed. If this parameter is set to 'false' or is not # specified, printed text recognition is performed. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def recognize_text_with_http_info(url, detect_handwriting:false, custom_headers:nil) - recognize_text_async(url, detect_handwriting:detect_handwriting, custom_headers:custom_headers).value! + def recognize_text_with_http_info(url, detect_handwriting = false, custom_headers = nil) + recognize_text_async(url, detect_handwriting, custom_headers).value! end # # Recognize Text operation. When you use the Recognize Text interface, the - # response contains a field called “Operation-Location”. The - # “Operation-Location” field contains the URL that you must use for your Get + # response contains a field called 'Operation-Location'. The + # 'Operation-Location' field contains the URL that you must use for your Get # Handwritten Text Operation Result operation. # - # @param url [String] - # @param detect_handwriting [Boolean] If “true” is specified, handwriting - # recognition is performed. If this parameter is set to “false” or is not + # @param url [String] Publicly reachable URL of an image + # @param detect_handwriting [Boolean] If 'true' is specified, handwriting + # recognition is performed. If this parameter is set to 'false' or is not # specified, printed text recognition is performed. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def recognize_text_async(url, detect_handwriting:false, custom_headers:nil) + def recognize_text_async(url, detect_handwriting = false, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'url is nil' if url.nil? @@ -1093,12 +1134,13 @@ def recognize_text_async(url, detect_handwriting:false, custom_headers:nil) end request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' + # Serialize Request request_mapper = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl.mapper() request_content = self.serialize(request_mapper, image_url) @@ -1147,8 +1189,8 @@ def recognize_text_async(url, detect_handwriting:false, custom_headers:nil) # # @return [TextOperationResult] operation results. # - def get_text_operation_result(operation_id, custom_headers:nil) - response = get_text_operation_result_async(operation_id, custom_headers:custom_headers).value! + def get_text_operation_result(operation_id, custom_headers = nil) + response = get_text_operation_result_async(operation_id, custom_headers).value! response.body unless response.nil? end @@ -1164,8 +1206,8 @@ def get_text_operation_result(operation_id, custom_headers:nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_text_operation_result_with_http_info(operation_id, custom_headers:nil) - get_text_operation_result_async(operation_id, custom_headers:custom_headers).value! + def get_text_operation_result_with_http_info(operation_id, custom_headers = nil) + get_text_operation_result_async(operation_id, custom_headers).value! end # @@ -1180,13 +1222,12 @@ def get_text_operation_result_with_http_info(operation_id, custom_headers:nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_text_operation_result_async(operation_id, custom_headers:nil) + def get_text_operation_result_async(operation_id, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? request_headers = {} - request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid @@ -1251,18 +1292,18 @@ def get_text_operation_result_async(operation_id, custom_headers:nil) # return. Multiple values should be comma-separated. Valid visual feature types # include:Celebrities - identifies celebrities if detected in the image. # Possible values include: 'Celebrities', 'Landmarks' - # @param language [Enum] A string indicating which language to return. The - # service will return recognition results in specified language. If this + # @param language [Enum] The desired language for output generation. If this # parameter is not specified, the default value is "en".Supported - # languages:en - English, Default.zh - Simplified Chinese. Possible values - # include: 'en', 'zh' + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [ImageAnalysis] operation results. # - def analyze_image_in_stream(image, visual_features:nil, details:nil, language:nil, custom_headers:nil) - response = analyze_image_in_stream_async(image, visual_features:visual_features, details:details, language:language, custom_headers:custom_headers).value! + def analyze_image_in_stream(image, visual_features = nil, details = nil, language = nil, custom_headers = nil) + response = analyze_image_in_stream_async(image, visual_features, details, language, custom_headers).value! response.body unless response.nil? end @@ -1286,18 +1327,18 @@ def analyze_image_in_stream(image, visual_features:nil, details:nil, language:ni # return. Multiple values should be comma-separated. Valid visual feature types # include:Celebrities - identifies celebrities if detected in the image. # Possible values include: 'Celebrities', 'Landmarks' - # @param language [Enum] A string indicating which language to return. The - # service will return recognition results in specified language. If this + # @param language [Enum] The desired language for output generation. If this # parameter is not specified, the default value is "en".Supported - # languages:en - English, Default.zh - Simplified Chinese. Possible values - # include: 'en', 'zh' + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def analyze_image_in_stream_with_http_info(image, visual_features:nil, details:nil, language:nil, custom_headers:nil) - analyze_image_in_stream_async(image, visual_features:visual_features, details:details, language:language, custom_headers:custom_headers).value! + def analyze_image_in_stream_with_http_info(image, visual_features = nil, details = nil, language = nil, custom_headers = nil) + analyze_image_in_stream_async(image, visual_features, details, language, custom_headers).value! end # @@ -1320,31 +1361,31 @@ def analyze_image_in_stream_with_http_info(image, visual_features:nil, details:n # return. Multiple values should be comma-separated. Valid visual feature types # include:Celebrities - identifies celebrities if detected in the image. # Possible values include: 'Celebrities', 'Landmarks' - # @param language [Enum] A string indicating which language to return. The - # service will return recognition results in specified language. If this + # @param language [Enum] The desired language for output generation. If this # parameter is not specified, the default value is "en".Supported - # languages:en - English, Default.zh - Simplified Chinese. Possible values - # include: 'en', 'zh' + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def analyze_image_in_stream_async(image, visual_features:nil, details:nil, language:nil, custom_headers:nil) + def analyze_image_in_stream_async(image, visual_features = nil, details = nil, language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'image is nil' if image.nil? request_headers = {} - request_headers['Content-Type'] = 'application/octet-stream' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/octet-stream' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'Image', type: { @@ -1352,6 +1393,7 @@ def analyze_image_in_stream_async(image, visual_features:nil, details:nil, langu } } request_content = self.serialize(request_mapper, image) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'analyze' @@ -1414,8 +1456,8 @@ def analyze_image_in_stream_async(image, visual_features:nil, details:nil, langu # # @return [NOT_IMPLEMENTED] operation results. # - def generate_thumbnail_in_stream(width, height, image, smart_cropping:false, custom_headers:nil) - response = generate_thumbnail_in_stream_async(width, height, image, smart_cropping:smart_cropping, custom_headers:custom_headers).value! + def generate_thumbnail_in_stream(width, height, image, smart_cropping = false, custom_headers = nil) + response = generate_thumbnail_in_stream_async(width, height, image, smart_cropping, custom_headers).value! response.body unless response.nil? end @@ -1439,8 +1481,8 @@ def generate_thumbnail_in_stream(width, height, image, smart_cropping:false, cus # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def generate_thumbnail_in_stream_with_http_info(width, height, image, smart_cropping:false, custom_headers:nil) - generate_thumbnail_in_stream_async(width, height, image, smart_cropping:smart_cropping, custom_headers:custom_headers).value! + def generate_thumbnail_in_stream_with_http_info(width, height, image, smart_cropping = false, custom_headers = nil) + generate_thumbnail_in_stream_async(width, height, image, smart_cropping, custom_headers).value! end # @@ -1463,27 +1505,23 @@ def generate_thumbnail_in_stream_with_http_info(width, height, image, smart_crop # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def generate_thumbnail_in_stream_async(width, height, image, smart_cropping:false, custom_headers:nil) + def generate_thumbnail_in_stream_async(width, height, image, smart_cropping = false, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'width is nil' if width.nil? - fail ArgumentError, "'width' should satisfy the constraint - 'InclusiveMaximum': '1023'" if !width.nil? && width > 1023 - fail ArgumentError, "'width' should satisfy the constraint - 'InclusiveMinimum': '1'" if !width.nil? && width < 1 fail ArgumentError, 'height is nil' if height.nil? - fail ArgumentError, "'height' should satisfy the constraint - 'InclusiveMaximum': '1023'" if !height.nil? && height > 1023 - fail ArgumentError, "'height' should satisfy the constraint - 'InclusiveMinimum': '1'" if !height.nil? && height < 1 fail ArgumentError, 'image is nil' if image.nil? request_headers = {} - request_headers['Content-Type'] = 'application/octet-stream' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/octet-stream' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'Image', type: { @@ -1491,6 +1529,7 @@ def generate_thumbnail_in_stream_async(width, height, image, smart_cropping:fals } } request_content = self.serialize(request_mapper, image) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'generateThumbnail' @@ -1512,7 +1551,7 @@ def generate_thumbnail_in_stream_async(width, height, image, smart_cropping:fals response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -1521,7 +1560,6 @@ def generate_thumbnail_in_stream_async(width, height, image, smart_cropping:fals begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { - client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { @@ -1563,8 +1601,8 @@ def generate_thumbnail_in_stream_async(width, height, image, smart_cropping:fals # # @return [OcrResult] operation results. # - def recognize_printed_text_in_stream(detect_orientation, image, language:nil, custom_headers:nil) - response = recognize_printed_text_in_stream_async(detect_orientation, image, language:language, custom_headers:custom_headers).value! + def recognize_printed_text_in_stream(detect_orientation, image, language = nil, custom_headers = nil) + response = recognize_printed_text_in_stream_async(detect_orientation, image, language, custom_headers).value! response.body unless response.nil? end @@ -1591,8 +1629,8 @@ def recognize_printed_text_in_stream(detect_orientation, image, language:nil, cu # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def recognize_printed_text_in_stream_with_http_info(detect_orientation, image, language:nil, custom_headers:nil) - recognize_printed_text_in_stream_async(detect_orientation, image, language:language, custom_headers:custom_headers).value! + def recognize_printed_text_in_stream_with_http_info(detect_orientation, image, language = nil, custom_headers = nil) + recognize_printed_text_in_stream_async(detect_orientation, image, language, custom_headers).value! end # @@ -1618,22 +1656,22 @@ def recognize_printed_text_in_stream_with_http_info(detect_orientation, image, l # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def recognize_printed_text_in_stream_async(detect_orientation, image, language:nil, custom_headers:nil) + def recognize_printed_text_in_stream_async(detect_orientation, image, language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'detect_orientation is nil' if detect_orientation.nil? fail ArgumentError, 'image is nil' if image.nil? request_headers = {} - request_headers['Content-Type'] = 'application/octet-stream' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/octet-stream' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'Image', type: { @@ -1641,6 +1679,7 @@ def recognize_printed_text_in_stream_async(detect_orientation, image, language:n } } request_content = self.serialize(request_mapper, image) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'ocr' @@ -1696,13 +1735,18 @@ def recognize_printed_text_in_stream_async(detect_orientation, image, language:n # @param image An image stream. # @param max_candidates [String] Maximum number of candidate descriptions to be # returned. The default is 1. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [ImageDescription] operation results. # - def describe_image_in_stream(image, max_candidates:'1', custom_headers:nil) - response = describe_image_in_stream_async(image, max_candidates:max_candidates, custom_headers:custom_headers).value! + def describe_image_in_stream(image, max_candidates = '1', language = nil, custom_headers = nil) + response = describe_image_in_stream_async(image, max_candidates, language, custom_headers).value! response.body unless response.nil? end @@ -1719,13 +1763,18 @@ def describe_image_in_stream(image, max_candidates:'1', custom_headers:nil) # @param image An image stream. # @param max_candidates [String] Maximum number of candidate descriptions to be # returned. The default is 1. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def describe_image_in_stream_with_http_info(image, max_candidates:'1', custom_headers:nil) - describe_image_in_stream_async(image, max_candidates:max_candidates, custom_headers:custom_headers).value! + def describe_image_in_stream_with_http_info(image, max_candidates = '1', language = nil, custom_headers = nil) + describe_image_in_stream_async(image, max_candidates, language, custom_headers).value! end # @@ -1741,26 +1790,31 @@ def describe_image_in_stream_with_http_info(image, max_candidates:'1', custom_he # @param image An image stream. # @param max_candidates [String] Maximum number of candidate descriptions to be # returned. The default is 1. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def describe_image_in_stream_async(image, max_candidates:'1', custom_headers:nil) + def describe_image_in_stream_async(image, max_candidates = '1', language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'image is nil' if image.nil? request_headers = {} - request_headers['Content-Type'] = 'application/octet-stream' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/octet-stream' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'Image', type: { @@ -1768,6 +1822,7 @@ def describe_image_in_stream_async(image, max_candidates:'1', custom_headers:nil } } request_content = self.serialize(request_mapper, image) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'describe' @@ -1776,7 +1831,7 @@ def describe_image_in_stream_async(image, max_candidates:'1', custom_headers:nil options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - query_params: {'maxCandidates' => max_candidates}, + query_params: {'maxCandidates' => max_candidates,'language' => language}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -1816,17 +1871,22 @@ def describe_image_in_stream_async(image, max_candidates:'1', custom_headers:nil # on objects, living beings, scenery or actions found in images. Unlike # categories, tags are not organized according to a hierarchical classification # system, but correspond to image content. Tags may contain hints to avoid - # ambiguity or provide context, for example the tag “cello” may be accompanied - # by the hint “musical instrument”. All tags are in English. + # ambiguity or provide context, for example the tag 'cello' may be accompanied + # by the hint 'musical instrument'. All tags are in English. # # @param image An image stream. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [TagResult] operation results. # - def tag_image_in_stream(image, custom_headers:nil) - response = tag_image_in_stream_async(image, custom_headers:custom_headers).value! + def tag_image_in_stream(image, language = nil, custom_headers = nil) + response = tag_image_in_stream_async(image, language, custom_headers).value! response.body unless response.nil? end @@ -1836,17 +1896,22 @@ def tag_image_in_stream(image, custom_headers:nil) # on objects, living beings, scenery or actions found in images. Unlike # categories, tags are not organized according to a hierarchical classification # system, but correspond to image content. Tags may contain hints to avoid - # ambiguity or provide context, for example the tag “cello” may be accompanied - # by the hint “musical instrument”. All tags are in English. + # ambiguity or provide context, for example the tag 'cello' may be accompanied + # by the hint 'musical instrument'. All tags are in English. # # @param image An image stream. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def tag_image_in_stream_with_http_info(image, custom_headers:nil) - tag_image_in_stream_async(image, custom_headers:custom_headers).value! + def tag_image_in_stream_with_http_info(image, language = nil, custom_headers = nil) + tag_image_in_stream_async(image, language, custom_headers).value! end # @@ -1855,30 +1920,35 @@ def tag_image_in_stream_with_http_info(image, custom_headers:nil) # on objects, living beings, scenery or actions found in images. Unlike # categories, tags are not organized according to a hierarchical classification # system, but correspond to image content. Tags may contain hints to avoid - # ambiguity or provide context, for example the tag “cello” may be accompanied - # by the hint “musical instrument”. All tags are in English. + # ambiguity or provide context, for example the tag 'cello' may be accompanied + # by the hint 'musical instrument'. All tags are in English. # # @param image An image stream. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def tag_image_in_stream_async(image, custom_headers:nil) + def tag_image_in_stream_async(image, language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'image is nil' if image.nil? request_headers = {} - request_headers['Content-Type'] = 'application/octet-stream' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/octet-stream' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'Image', type: { @@ -1886,6 +1956,7 @@ def tag_image_in_stream_async(image, custom_headers:nil) } } request_content = self.serialize(request_mapper, image) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'tag' @@ -1894,6 +1965,7 @@ def tag_image_in_stream_async(image, custom_headers:nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + query_params: {'language' => language}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -1939,13 +2011,18 @@ def tag_image_in_stream_async(image, custom_headers:nil) # # @param model [String] The domain-specific content to recognize. # @param image An image stream. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [DomainModelResults] operation results. # - def analyze_image_by_domain_in_stream(model, image, custom_headers:nil) - response = analyze_image_by_domain_in_stream_async(model, image, custom_headers:custom_headers).value! + def analyze_image_by_domain_in_stream(model, image, language = nil, custom_headers = nil) + response = analyze_image_by_domain_in_stream_async(model, image, language, custom_headers).value! response.body unless response.nil? end @@ -1961,13 +2038,18 @@ def analyze_image_by_domain_in_stream(model, image, custom_headers:nil) # # @param model [String] The domain-specific content to recognize. # @param image An image stream. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def analyze_image_by_domain_in_stream_with_http_info(model, image, custom_headers:nil) - analyze_image_by_domain_in_stream_async(model, image, custom_headers:custom_headers).value! + def analyze_image_by_domain_in_stream_with_http_info(model, image, language = nil, custom_headers = nil) + analyze_image_by_domain_in_stream_async(model, image, language, custom_headers).value! end # @@ -1982,27 +2064,32 @@ def analyze_image_by_domain_in_stream_with_http_info(model, image, custom_header # # @param model [String] The domain-specific content to recognize. # @param image An image stream. + # @param language [Enum] The desired language for output generation. If this + # parameter is not specified, the default value is "en".Supported + # languages:en - English, Default. es - Spanish, ja - Japanese, pt - + # Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', + # 'ja', 'pt', 'zh' # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def analyze_image_by_domain_in_stream_async(model, image, custom_headers:nil) + def analyze_image_by_domain_in_stream_async(model, image, language = nil, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'model is nil' if model.nil? fail ArgumentError, 'image is nil' if image.nil? request_headers = {} - request_headers['Content-Type'] = 'application/octet-stream' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/octet-stream' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'Image', type: { @@ -2010,6 +2097,7 @@ def analyze_image_by_domain_in_stream_async(model, image, custom_headers:nil) } } request_content = self.serialize(request_mapper, image) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'models/{model}/analyze' @@ -2019,6 +2107,7 @@ def analyze_image_by_domain_in_stream_async(model, image, custom_headers:nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'model' => model}, + query_params: {'language' => language}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -2054,72 +2143,72 @@ def analyze_image_by_domain_in_stream_async(model, image, custom_headers:nil) # # Recognize Text operation. When you use the Recognize Text interface, the - # response contains a field called “Operation-Location”. The - # “Operation-Location” field contains the URL that you must use for your Get + # response contains a field called 'Operation-Location'. The + # 'Operation-Location' field contains the URL that you must use for your Get # Handwritten Text Operation Result operation. # # @param image An image stream. - # @param detect_handwriting [Boolean] If “true” is specified, handwriting - # recognition is performed. If this parameter is set to “false” or is not + # @param detect_handwriting [Boolean] If 'true' is specified, handwriting + # recognition is performed. If this parameter is set to 'false' or is not # specified, printed text recognition is performed. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def recognize_text_in_stream(image, detect_handwriting:false, custom_headers:nil) - response = recognize_text_in_stream_async(image, detect_handwriting:detect_handwriting, custom_headers:custom_headers).value! + def recognize_text_in_stream(image, detect_handwriting = false, custom_headers = nil) + response = recognize_text_in_stream_async(image, detect_handwriting, custom_headers).value! nil end # # Recognize Text operation. When you use the Recognize Text interface, the - # response contains a field called “Operation-Location”. The - # “Operation-Location” field contains the URL that you must use for your Get + # response contains a field called 'Operation-Location'. The + # 'Operation-Location' field contains the URL that you must use for your Get # Handwritten Text Operation Result operation. # # @param image An image stream. - # @param detect_handwriting [Boolean] If “true” is specified, handwriting - # recognition is performed. If this parameter is set to “false” or is not + # @param detect_handwriting [Boolean] If 'true' is specified, handwriting + # recognition is performed. If this parameter is set to 'false' or is not # specified, printed text recognition is performed. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def recognize_text_in_stream_with_http_info(image, detect_handwriting:false, custom_headers:nil) - recognize_text_in_stream_async(image, detect_handwriting:detect_handwriting, custom_headers:custom_headers).value! + def recognize_text_in_stream_with_http_info(image, detect_handwriting = false, custom_headers = nil) + recognize_text_in_stream_async(image, detect_handwriting, custom_headers).value! end # # Recognize Text operation. When you use the Recognize Text interface, the - # response contains a field called “Operation-Location”. The - # “Operation-Location” field contains the URL that you must use for your Get + # response contains a field called 'Operation-Location'. The + # 'Operation-Location' field contains the URL that you must use for your Get # Handwritten Text Operation Result operation. # # @param image An image stream. - # @param detect_handwriting [Boolean] If “true” is specified, handwriting - # recognition is performed. If this parameter is set to “false” or is not + # @param detect_handwriting [Boolean] If 'true' is specified, handwriting + # recognition is performed. If this parameter is set to 'false' or is not # specified, printed text recognition is performed. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def recognize_text_in_stream_async(image, detect_handwriting:false, custom_headers:nil) + def recognize_text_in_stream_async(image, detect_handwriting = false, custom_headers = nil) fail ArgumentError, 'azure_region is nil' if azure_region.nil? fail ArgumentError, 'image is nil' if image.nil? request_headers = {} - request_headers['Content-Type'] = 'application/octet-stream' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? + request_headers['Content-Type'] = 'application/octet-stream' + # Serialize Request request_mapper = { - client_side_validation: true, required: true, serialized_name: 'Image', type: { @@ -2127,6 +2216,7 @@ def recognize_text_in_stream_async(image, detect_handwriting:false, custom_heade } } request_content = self.serialize(request_mapper, image) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'recognizeText' @@ -2166,7 +2256,9 @@ def recognize_text_in_stream_async(image, detect_handwriting:false, custom_heade # def add_telemetry sdk_information = 'azure_cognitiveservices_computervision' - sdk_information = "#{sdk_information}/0.16.0" + if defined? Azure::CognitiveServices::ComputerVision::V1_0::VERSION + sdk_information = "#{sdk_information}/#{Azure::CognitiveServices::ComputerVision::V1_0::VERSION}" + end add_user_agent_information(sdk_information) end end diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb index c59b1fbb25..293d4ffbfa 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb @@ -35,7 +35,6 @@ class AdultInfo # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'AdultInfo', type: { @@ -43,7 +42,6 @@ def self.mapper() class_name: 'AdultInfo', model_properties: { is_adult_content: { - client_side_validation: true, required: false, serialized_name: 'isAdultContent', type: { @@ -51,7 +49,6 @@ def self.mapper() } }, is_racy_content: { - client_side_validation: true, required: false, serialized_name: 'isRacyContent', type: { @@ -59,7 +56,6 @@ def self.mapper() } }, adult_score: { - client_side_validation: true, required: false, serialized_name: 'adultScore', type: { @@ -67,7 +63,6 @@ def self.mapper() } }, racy_score: { - client_side_validation: true, required: false, serialized_name: 'racyScore', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/category.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/category.rb index 6adaf77c0a..57dd3a630c 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/category.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/category.rb @@ -18,7 +18,7 @@ class Category # @return [Float] Scoring of the category. attr_accessor :score - # @return [CategoryDetail] Additional category detail if available. + # @return [CategoryDetail] attr_accessor :detail @@ -28,7 +28,6 @@ class Category # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Category', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'Category', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, score: { - client_side_validation: true, required: false, serialized_name: 'score', type: { @@ -52,7 +49,6 @@ def self.mapper() } }, detail: { - client_side_validation: true, required: false, serialized_name: 'detail', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb index c4b7f0db9b..bd26c49e55 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb @@ -23,7 +23,6 @@ class CategoryDetail # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CategoryDetail', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'CategoryDetail', model_properties: { celebrities: { - client_side_validation: true, required: false, serialized_name: 'celebrities', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'CelebritiesModelElementType', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb index 83779a13db..666700d04b 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb @@ -28,7 +28,6 @@ class CelebritiesModel # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'CelebritiesModel', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'CelebritiesModel', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, confidence: { - client_side_validation: true, required: false, serialized_name: 'confidence', type: { @@ -52,7 +49,6 @@ def self.mapper() } }, face_rectangle: { - client_side_validation: true, required: false, serialized_name: 'faceRectangle', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/celebrity_results.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/celebrity_results.rb new file mode 100644 index 0000000000..dd21df2044 --- /dev/null +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/celebrity_results.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::CognitiveServices::ComputerVision::V1_0 + module Models + # + # List of celebrities recognized in the image. + # + class CelebrityResults + + include MsRestAzure + + # @return [Array] + attr_accessor :celebrities + + # @return [String] Id of the REST API request. + attr_accessor :request_id + + # @return [ImageMetadata] + attr_accessor :metadata + + + # + # Mapper for CelebrityResults class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CelebrityResults', + type: { + name: 'Composite', + class_name: 'CelebrityResults', + model_properties: { + celebrities: { + required: false, + serialized_name: 'celebrities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CelebritiesModelElementType', + type: { + name: 'Composite', + class_name: 'CelebritiesModel' + } + } + } + }, + request_id: { + required: false, + serialized_name: 'requestId', + type: { + name: 'String' + } + }, + metadata: { + required: false, + serialized_name: 'metadata', + type: { + name: 'Composite', + class_name: 'ImageMetadata' + } + } + } + } + } + end + end + end +end diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/color_info.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/color_info.rb index 9934bb0d3c..e8ba9a4a57 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/color_info.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/color_info.rb @@ -34,7 +34,6 @@ class ColorInfo # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ColorInfo', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'ColorInfo', model_properties: { dominant_color_foreground: { - client_side_validation: true, required: false, serialized_name: 'dominantColorForeground', type: { @@ -50,7 +48,6 @@ def self.mapper() } }, dominant_color_background: { - client_side_validation: true, required: false, serialized_name: 'dominantColorBackground', type: { @@ -58,13 +55,11 @@ def self.mapper() } }, dominant_colors: { - client_side_validation: true, required: false, serialized_name: 'dominantColors', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -74,7 +69,6 @@ def self.mapper() } }, accent_color: { - client_side_validation: true, required: false, serialized_name: 'accentColor', type: { @@ -82,7 +76,6 @@ def self.mapper() } }, is_bwimg: { - client_side_validation: true, required: false, serialized_name: 'isBWImg', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb index 9d77db22ce..16c38704c7 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb @@ -34,7 +34,6 @@ class ComputerVisionError # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ComputerVisionError', type: { @@ -42,7 +41,6 @@ def self.mapper() class_name: 'ComputerVisionError', model_properties: { code: { - client_side_validation: true, required: true, serialized_name: 'code', type: { @@ -51,7 +49,6 @@ def self.mapper() } }, message: { - client_side_validation: true, required: true, serialized_name: 'message', type: { @@ -59,7 +56,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, serialized_name: 'requestId', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb index 461f3d212c..691104f119 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb @@ -13,14 +13,13 @@ class DomainModelResults include MsRestAzure - # @return [Array] An array of possible celebritied - # identified in the image. - attr_accessor :celebrities + # @return Model-specific response + attr_accessor :result # @return [String] Id of the REST API request. attr_accessor :request_id - # @return [ImageMetadata] Additional image metadata + # @return [ImageMetadata] attr_accessor :metadata @@ -30,32 +29,20 @@ class DomainModelResults # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'DomainModelResults', type: { name: 'Composite', class_name: 'DomainModelResults', model_properties: { - celebrities: { - client_side_validation: true, + result: { required: false, - serialized_name: 'result.celebrities', + serialized_name: 'result', type: { - name: 'Sequence', - element: { - client_side_validation: true, - required: false, - serialized_name: 'CelebritiesModelElementType', - type: { - name: 'Composite', - class_name: 'CelebritiesModel' - } - } + name: 'Object' } }, request_id: { - client_side_validation: true, required: false, serialized_name: 'requestId', type: { @@ -63,7 +50,6 @@ def self.mapper() } }, metadata: { - client_side_validation: true, required: false, serialized_name: 'metadata', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_description.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_description.rb index 8c581f9e65..0bf0074f5b 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_description.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_description.rb @@ -15,7 +15,7 @@ class FaceDescription # @return [Integer] Possible age of the face. attr_accessor :age - # @return [Enum] Possible gender of the face. Possible values include: + # @return [Gender] Possible gender of the face. Possible values include: # 'Male', 'Female' attr_accessor :gender @@ -29,7 +29,6 @@ class FaceDescription # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'FaceDescription', type: { @@ -37,7 +36,6 @@ def self.mapper() class_name: 'FaceDescription', model_properties: { age: { - client_side_validation: true, required: false, serialized_name: 'age', type: { @@ -45,15 +43,14 @@ def self.mapper() } }, gender: { - client_side_validation: true, required: false, serialized_name: 'gender', type: { - name: 'String' + name: 'Enum', + module: 'Gender' } }, face_rectangle: { - client_side_validation: true, required: false, serialized_name: 'faceRectangle', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb index df3ff38cf0..6e2a59e547 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb @@ -31,7 +31,6 @@ class FaceRectangle # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'FaceRectangle', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'FaceRectangle', model_properties: { left: { - client_side_validation: true, required: false, serialized_name: 'left', type: { @@ -47,7 +45,6 @@ def self.mapper() } }, top: { - client_side_validation: true, required: false, serialized_name: 'top', type: { @@ -55,7 +52,6 @@ def self.mapper() } }, width: { - client_side_validation: true, required: false, serialized_name: 'width', type: { @@ -63,7 +59,6 @@ def self.mapper() } }, height: { - client_side_validation: true, required: false, serialized_name: 'height', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/gender.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/gender.rb new file mode 100644 index 0000000000..051d8c1b99 --- /dev/null +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/gender.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::CognitiveServices::ComputerVision::V1_0 + module Models + # + # Defines values for Gender + # + module Gender + Male = "Male" + Female = "Female" + end + end +end diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb index 26789860fd..f7475ec78d 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb @@ -15,21 +15,19 @@ class ImageAnalysis # @return [Array] An array indicating identified categories. attr_accessor :categories - # @return [AdultInfo] A property scoring on whether the image is - # adult-oriented and/or racy. + # @return [AdultInfo] attr_accessor :adult - # @return [ColorInfo] A property scoring on color spectrums. + # @return [ColorInfo] attr_accessor :color - # @return [ImageType] A property indicating type of image (whether it's - # clipart or line drawing) + # @return [ImageType] attr_accessor :image_type # @return [Array] A list of tags with confidence level. attr_accessor :tags - # @return [ImageDescriptionDetails] Description of the image. + # @return [ImageDescriptionDetails] attr_accessor :description # @return [Array] An array of possible faces within the @@ -39,7 +37,7 @@ class ImageAnalysis # @return [String] Id of the request for tracking purposes. attr_accessor :request_id - # @return [ImageMetadata] Image metadata + # @return [ImageMetadata] attr_accessor :metadata @@ -49,7 +47,6 @@ class ImageAnalysis # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImageAnalysis', type: { @@ -57,13 +54,11 @@ def self.mapper() class_name: 'ImageAnalysis', model_properties: { categories: { - client_side_validation: true, required: false, serialized_name: 'categories', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'CategoryElementType', type: { @@ -74,7 +69,6 @@ def self.mapper() } }, adult: { - client_side_validation: true, required: false, serialized_name: 'adult', type: { @@ -83,7 +77,6 @@ def self.mapper() } }, color: { - client_side_validation: true, required: false, serialized_name: 'color', type: { @@ -92,7 +85,6 @@ def self.mapper() } }, image_type: { - client_side_validation: true, required: false, serialized_name: 'imageType', type: { @@ -101,13 +93,11 @@ def self.mapper() } }, tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ImageTagElementType', type: { @@ -118,7 +108,6 @@ def self.mapper() } }, description: { - client_side_validation: true, required: false, serialized_name: 'description', type: { @@ -127,13 +116,11 @@ def self.mapper() } }, faces: { - client_side_validation: true, required: false, serialized_name: 'faces', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'FaceDescriptionElementType', type: { @@ -144,7 +131,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, serialized_name: 'requestId', type: { @@ -152,7 +138,6 @@ def self.mapper() } }, metadata: { - client_side_validation: true, required: false, serialized_name: 'metadata', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb index 91d0ede54f..6a20ec17b0 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb @@ -25,7 +25,6 @@ class ImageCaption # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImageCaption', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'ImageCaption', model_properties: { text: { - client_side_validation: true, required: false, serialized_name: 'text', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, confidence: { - client_side_validation: true, required: false, serialized_name: 'confidence', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description.rb index 62ad9c35b4..42390bf28c 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description.rb @@ -23,7 +23,7 @@ class ImageDescription # @return [String] Id of the REST API request. attr_accessor :request_id - # @return [ImageMetadata] Image metadata + # @return [ImageMetadata] attr_accessor :metadata @@ -33,7 +33,6 @@ class ImageDescription # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImageDescription', type: { @@ -41,13 +40,11 @@ def self.mapper() class_name: 'ImageDescription', model_properties: { tags: { - client_side_validation: true, required: false, serialized_name: 'description.tags', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -57,13 +54,11 @@ def self.mapper() } }, captions: { - client_side_validation: true, required: false, serialized_name: 'description.captions', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ImageCaptionElementType', type: { @@ -74,7 +69,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, serialized_name: 'description.requestId', type: { @@ -82,7 +76,6 @@ def self.mapper() } }, metadata: { - client_side_validation: true, required: false, serialized_name: 'description.metadata', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb index 7d24f680ee..1004ee32b2 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb @@ -23,7 +23,7 @@ class ImageDescriptionDetails # @return [String] Id of the REST API request. attr_accessor :request_id - # @return [ImageMetadata] Image metadata + # @return [ImageMetadata] attr_accessor :metadata @@ -33,7 +33,6 @@ class ImageDescriptionDetails # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImageDescriptionDetails', type: { @@ -41,13 +40,11 @@ def self.mapper() class_name: 'ImageDescriptionDetails', model_properties: { tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { @@ -57,13 +54,11 @@ def self.mapper() } }, captions: { - client_side_validation: true, required: false, serialized_name: 'captions', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ImageCaptionElementType', type: { @@ -74,7 +69,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, serialized_name: 'requestId', type: { @@ -82,7 +76,6 @@ def self.mapper() } }, metadata: { - client_side_validation: true, required: false, serialized_name: 'metadata', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb index f756419bab..284b98aafb 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb @@ -28,7 +28,6 @@ class ImageMetadata # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImageMetadata', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'ImageMetadata', model_properties: { width: { - client_side_validation: true, required: false, serialized_name: 'width', type: { @@ -44,7 +42,6 @@ def self.mapper() } }, height: { - client_side_validation: true, required: false, serialized_name: 'height', type: { @@ -52,7 +49,6 @@ def self.mapper() } }, format: { - client_side_validation: true, required: false, serialized_name: 'format', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_tag.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_tag.rb index aef3ee45f8..321c5913bc 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_tag.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_tag.rb @@ -25,7 +25,6 @@ class ImageTag # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImageTag', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'ImageTag', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, confidence: { - client_side_validation: true, required: false, serialized_name: 'confidence', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_type.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_type.rb index 35c66e937d..3a7bc531f1 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_type.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_type.rb @@ -25,7 +25,6 @@ class ImageType # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImageType', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'ImageType', model_properties: { clip_art_type: { - client_side_validation: true, required: false, serialized_name: 'clipArtType', type: { @@ -41,7 +39,6 @@ def self.mapper() } }, line_drawing_type: { - client_side_validation: true, required: false, serialized_name: 'lineDrawingType', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_url.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_url.rb index ab0d4c4c69..502b15ecbd 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_url.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_url.rb @@ -13,7 +13,7 @@ class ImageUrl include MsRestAzure - # @return [String] + # @return [String] Publicly reachable URL of an image attr_accessor :url @@ -23,7 +23,6 @@ class ImageUrl # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ImageUrl', type: { @@ -31,7 +30,6 @@ def self.mapper() class_name: 'ImageUrl', model_properties: { url: { - client_side_validation: true, required: true, serialized_name: 'url', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/landmark_results.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/landmark_results.rb new file mode 100644 index 0000000000..c6cd21b76e --- /dev/null +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/landmark_results.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::CognitiveServices::ComputerVision::V1_0 + module Models + # + # List of landmarks recognized in the image. + # + class LandmarkResults + + include MsRestAzure + + # @return [Array] + attr_accessor :landmarks + + # @return [String] Id of the REST API request. + attr_accessor :request_id + + # @return [ImageMetadata] + attr_accessor :metadata + + + # + # Mapper for LandmarkResults class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LandmarkResults', + type: { + name: 'Composite', + class_name: 'LandmarkResults', + model_properties: { + landmarks: { + required: false, + serialized_name: 'landmarks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LandmarkResultsLandmarksItemElementType', + type: { + name: 'Composite', + class_name: 'LandmarkResultsLandmarksItem' + } + } + } + }, + request_id: { + required: false, + serialized_name: 'requestId', + type: { + name: 'String' + } + }, + metadata: { + required: false, + serialized_name: 'metadata', + type: { + name: 'Composite', + class_name: 'ImageMetadata' + } + } + } + } + } + end + end + end +end diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/landmark_results_landmarks_item.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/landmark_results_landmarks_item.rb new file mode 100644 index 0000000000..0b9920e79c --- /dev/null +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/landmark_results_landmarks_item.rb @@ -0,0 +1,54 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::CognitiveServices::ComputerVision::V1_0 + module Models + # + # A landmark recognized in the image + # + class LandmarkResultsLandmarksItem + + include MsRestAzure + + # @return [String] Name of the landmark. + attr_accessor :name + + # @return [Float] Confidence level for the landmark recognition. + attr_accessor :confidence + + + # + # Mapper for LandmarkResultsLandmarksItem class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LandmarkResults_landmarksItem', + type: { + name: 'Composite', + class_name: 'LandmarkResultsLandmarksItem', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + confidence: { + required: false, + serialized_name: 'confidence', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/line.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/line.rb index 670b586fb4..452a621fd5 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/line.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/line.rb @@ -29,7 +29,6 @@ class Line # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Line', type: { @@ -37,13 +36,11 @@ def self.mapper() class_name: 'Line', model_properties: { bounding_box: { - client_side_validation: true, required: false, serialized_name: 'boundingBox', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'NumberElementType', type: { @@ -53,7 +50,6 @@ def self.mapper() } }, text: { - client_side_validation: true, required: false, serialized_name: 'text', type: { @@ -61,13 +57,11 @@ def self.mapper() } }, words: { - client_side_validation: true, required: false, serialized_name: 'words', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'WordElementType', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/list_models_result.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/list_models_result.rb index 074d4b3c5e..ebe2904268 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/list_models_result.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/list_models_result.rb @@ -22,7 +22,6 @@ class ListModelsResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ListModelsResult', type: { @@ -30,14 +29,12 @@ def self.mapper() class_name: 'ListModelsResult', model_properties: { models_property: { - client_side_validation: true, required: false, read_only: true, serialized_name: 'models', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ModelDescriptionElementType', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/model_description.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/model_description.rb index e4fc595bf8..117fd3fa5b 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/model_description.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/model_description.rb @@ -25,7 +25,6 @@ class ModelDescription # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'ModelDescription', type: { @@ -33,7 +32,6 @@ def self.mapper() class_name: 'ModelDescription', model_properties: { name: { - client_side_validation: true, required: false, serialized_name: 'name', type: { @@ -41,13 +39,11 @@ def self.mapper() } }, categories: { - client_side_validation: true, required: false, serialized_name: 'categories', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_line.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_line.rb index 98bb500277..c6e6b7b9c7 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_line.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_line.rb @@ -31,7 +31,6 @@ class OcrLine # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OcrLine', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'OcrLine', model_properties: { bounding_box: { - client_side_validation: true, required: false, serialized_name: 'boundingBox', type: { @@ -47,13 +45,11 @@ def self.mapper() } }, words: { - client_side_validation: true, required: false, serialized_name: 'words', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OcrWordElementType', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb index b2c8e398c7..6074a0aca2 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb @@ -31,7 +31,6 @@ class OcrRegion # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OcrRegion', type: { @@ -39,7 +38,6 @@ def self.mapper() class_name: 'OcrRegion', model_properties: { bounding_box: { - client_side_validation: true, required: false, serialized_name: 'boundingBox', type: { @@ -47,13 +45,11 @@ def self.mapper() } }, lines: { - client_side_validation: true, required: false, serialized_name: 'lines', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OcrLineElementType', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb index e1b1cea73a..e4f26cb181 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb @@ -13,7 +13,7 @@ class OcrResult include MsRestAzure - # @return [OcrResult] + # @return [String] The BCP-47 language code of the text in the image. attr_accessor :language # @return [Float] The angle, in degrees, of the detected text with @@ -46,7 +46,6 @@ class OcrResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OcrResult', type: { @@ -54,16 +53,13 @@ def self.mapper() class_name: 'OcrResult', model_properties: { language: { - client_side_validation: true, required: false, serialized_name: 'language', type: { - name: 'Composite', - class_name: 'OcrResult' + name: 'String' } }, text_angle: { - client_side_validation: true, required: false, serialized_name: 'textAngle', type: { @@ -71,7 +67,6 @@ def self.mapper() } }, orientation: { - client_side_validation: true, required: false, serialized_name: 'orientation', type: { @@ -79,13 +74,11 @@ def self.mapper() } }, regions: { - client_side_validation: true, required: false, serialized_name: 'regions', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'OcrRegionElementType', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_word.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_word.rb index 4a8ecaa770..4d686117fc 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_word.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_word.rb @@ -30,7 +30,6 @@ class OcrWord # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'OcrWord', type: { @@ -38,7 +37,6 @@ def self.mapper() class_name: 'OcrWord', model_properties: { bounding_box: { - client_side_validation: true, required: false, serialized_name: 'boundingBox', type: { @@ -46,7 +44,6 @@ def self.mapper() } }, text: { - client_side_validation: true, required: false, serialized_name: 'text', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb index aa622bd53f..bcb643263c 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb @@ -23,7 +23,6 @@ class RecognitionResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'RecognitionResult', type: { @@ -31,13 +30,11 @@ def self.mapper() class_name: 'RecognitionResult', model_properties: { lines: { - client_side_validation: true, required: false, serialized_name: 'lines', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'LineElementType', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb index 2945edd929..4123c60cad 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb @@ -19,7 +19,7 @@ class TagResult # @return [String] Id of the REST API request. attr_accessor :request_id - # @return [ImageMetadata] Image metadata + # @return [ImageMetadata] attr_accessor :metadata @@ -29,7 +29,6 @@ class TagResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TagResult', type: { @@ -37,13 +36,11 @@ def self.mapper() class_name: 'TagResult', model_properties: { tags: { - client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'ImageTagElementType', type: { @@ -54,7 +51,6 @@ def self.mapper() } }, request_id: { - client_side_validation: true, required: false, serialized_name: 'requestId', type: { @@ -62,7 +58,6 @@ def self.mapper() } }, metadata: { - client_side_validation: true, required: false, serialized_name: 'metadata', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb index 2b7f0a988b..2fd8255f2b 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb @@ -28,7 +28,6 @@ class TextOperationResult # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'TextOperationResult', type: { @@ -36,7 +35,6 @@ def self.mapper() class_name: 'TextOperationResult', model_properties: { status: { - client_side_validation: true, required: false, serialized_name: 'status', type: { @@ -45,7 +43,6 @@ def self.mapper() } }, recognition_result: { - client_side_validation: true, required: false, serialized_name: 'recognitionResult', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/word.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/word.rb index 1e1920cd1d..9be001aa3b 100644 --- a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/word.rb +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/models/word.rb @@ -26,7 +26,6 @@ class Word # def self.mapper() { - client_side_validation: true, required: false, serialized_name: 'Word', type: { @@ -34,13 +33,11 @@ def self.mapper() class_name: 'Word', model_properties: { bounding_box: { - client_side_validation: true, required: false, serialized_name: 'boundingBox', type: { name: 'Sequence', element: { - client_side_validation: true, required: false, serialized_name: 'NumberElementType', type: { @@ -50,7 +47,6 @@ def self.mapper() } }, text: { - client_side_validation: true, required: false, serialized_name: 'text', type: { diff --git a/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/version.rb b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/version.rb new file mode 100644 index 0000000000..57ec66bad2 --- /dev/null +++ b/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/version.rb @@ -0,0 +1,8 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::CognitiveServices::ComputerVision::V1_0 + VERSION = '0.16.0' +end diff --git a/data/azure_cognitiveservices_computervision/lib/profiles/latest/modules/computervision_profile_module.rb b/data/azure_cognitiveservices_computervision/lib/profiles/latest/modules/computervision_profile_module.rb index f6c3fdfad7..3941e04180 100644 --- a/data/azure_cognitiveservices_computervision/lib/profiles/latest/modules/computervision_profile_module.rb +++ b/data/azure_cognitiveservices_computervision/lib/profiles/latest/modules/computervision_profile_module.rb @@ -7,42 +7,44 @@ module Azure::ComputerVision::Profiles::Latest module Models - ImageDescriptionDetails = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescriptionDetails - Word = Azure::CognitiveServices::ComputerVision::V1_0::Models::Word FaceDescription = Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceDescription - RecognitionResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::RecognitionResult ImageAnalysis = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageAnalysis - FaceRectangle = Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceRectangle + Line = Azure::CognitiveServices::ComputerVision::V1_0::Models::Line OcrWord = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrWord - CategoryDetail = Azure::CognitiveServices::ComputerVision::V1_0::Models::CategoryDetail + TextOperationResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationResult OcrLine = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrLine - AdultInfo = Azure::CognitiveServices::ComputerVision::V1_0::Models::AdultInfo + CelebritiesModel = Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebritiesModel OcrRegion = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrRegion - ImageType = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageType + Category = Azure::CognitiveServices::ComputerVision::V1_0::Models::Category OcrResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrResult - ImageCaption = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageCaption + ColorInfo = Azure::CognitiveServices::ComputerVision::V1_0::Models::ColorInfo ModelDescription = Azure::CognitiveServices::ComputerVision::V1_0::Models::ModelDescription - Line = Azure::CognitiveServices::ComputerVision::V1_0::Models::Line + ImageTag = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageTag ListModelsResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::ListModelsResult - CelebritiesModel = Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebritiesModel + ImageMetadata = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageMetadata DomainModelResults = Azure::CognitiveServices::ComputerVision::V1_0::Models::DomainModelResults - ColorInfo = Azure::CognitiveServices::ComputerVision::V1_0::Models::ColorInfo + Word = Azure::CognitiveServices::ComputerVision::V1_0::Models::Word + CelebrityResults = Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebrityResults + FaceRectangle = Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceRectangle + LandmarkResultsLandmarksItem = Azure::CognitiveServices::ComputerVision::V1_0::Models::LandmarkResultsLandmarksItem + AdultInfo = Azure::CognitiveServices::ComputerVision::V1_0::Models::AdultInfo + LandmarkResults = Azure::CognitiveServices::ComputerVision::V1_0::Models::LandmarkResults + ImageCaption = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageCaption ImageDescription = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescription - ImageMetadata = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageMetadata + RecognitionResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::RecognitionResult TagResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::TagResult - Category = Azure::CognitiveServices::ComputerVision::V1_0::Models::Category + ImageType = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageType ComputerVisionError = Azure::CognitiveServices::ComputerVision::V1_0::Models::ComputerVisionError - TextOperationResult = Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationResult + CategoryDetail = Azure::CognitiveServices::ComputerVision::V1_0::Models::CategoryDetail ImageUrl = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl - ImageTag = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageTag + ImageDescriptionDetails = Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescriptionDetails TextOperationStatusCodes = Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationStatusCodes + Gender = Azure::CognitiveServices::ComputerVision::V1_0::Models::Gender ComputerVisionErrorCodes = Azure::CognitiveServices::ComputerVision::V1_0::Models::ComputerVisionErrorCodes VisualFeatureTypes = Azure::CognitiveServices::ComputerVision::V1_0::Models::VisualFeatureTypes OcrLanguages = Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrLanguages AzureRegions = Azure::CognitiveServices::ComputerVision::V1_0::Models::AzureRegions Details = Azure::CognitiveServices::ComputerVision::V1_0::Models::Details - Language1 = Azure::CognitiveServices::ComputerVision::V1_0::Models::Language1 - DomainModels = Azure::CognitiveServices::ComputerVision::V1_0::Models::DomainModels end # @@ -89,93 +91,105 @@ def method_missing(method, *args) end class ModelClasses - def image_description_details - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescriptionDetails - end - def word - Azure::CognitiveServices::ComputerVision::V1_0::Models::Word - end def face_description Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceDescription end - def recognition_result - Azure::CognitiveServices::ComputerVision::V1_0::Models::RecognitionResult - end def image_analysis Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageAnalysis end - def face_rectangle - Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceRectangle + def line + Azure::CognitiveServices::ComputerVision::V1_0::Models::Line end def ocr_word Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrWord end - def category_detail - Azure::CognitiveServices::ComputerVision::V1_0::Models::CategoryDetail + def text_operation_result + Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationResult end def ocr_line Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrLine end - def adult_info - Azure::CognitiveServices::ComputerVision::V1_0::Models::AdultInfo + def celebrities_model + Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebritiesModel end def ocr_region Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrRegion end - def image_type - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageType + def category + Azure::CognitiveServices::ComputerVision::V1_0::Models::Category end def ocr_result Azure::CognitiveServices::ComputerVision::V1_0::Models::OcrResult end - def image_caption - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageCaption + def color_info + Azure::CognitiveServices::ComputerVision::V1_0::Models::ColorInfo end def model_description Azure::CognitiveServices::ComputerVision::V1_0::Models::ModelDescription end - def line - Azure::CognitiveServices::ComputerVision::V1_0::Models::Line + def image_tag + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageTag end def list_models_result Azure::CognitiveServices::ComputerVision::V1_0::Models::ListModelsResult end - def celebrities_model - Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebritiesModel + def image_metadata + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageMetadata end def domain_model_results Azure::CognitiveServices::ComputerVision::V1_0::Models::DomainModelResults end - def color_info - Azure::CognitiveServices::ComputerVision::V1_0::Models::ColorInfo + def word + Azure::CognitiveServices::ComputerVision::V1_0::Models::Word + end + def celebrity_results + Azure::CognitiveServices::ComputerVision::V1_0::Models::CelebrityResults + end + def face_rectangle + Azure::CognitiveServices::ComputerVision::V1_0::Models::FaceRectangle + end + def landmark_results_landmarks_item + Azure::CognitiveServices::ComputerVision::V1_0::Models::LandmarkResultsLandmarksItem + end + def adult_info + Azure::CognitiveServices::ComputerVision::V1_0::Models::AdultInfo + end + def landmark_results + Azure::CognitiveServices::ComputerVision::V1_0::Models::LandmarkResults + end + def image_caption + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageCaption end def image_description Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescription end - def image_metadata - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageMetadata + def recognition_result + Azure::CognitiveServices::ComputerVision::V1_0::Models::RecognitionResult end def tag_result Azure::CognitiveServices::ComputerVision::V1_0::Models::TagResult end - def category - Azure::CognitiveServices::ComputerVision::V1_0::Models::Category + def image_type + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageType end def computer_vision_error Azure::CognitiveServices::ComputerVision::V1_0::Models::ComputerVisionError end - def text_operation_result - Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationResult + def category_detail + Azure::CognitiveServices::ComputerVision::V1_0::Models::CategoryDetail end def image_url Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageUrl end - def image_tag - Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageTag + def image_description_details + Azure::CognitiveServices::ComputerVision::V1_0::Models::ImageDescriptionDetails end def text_operation_status_codes Azure::CognitiveServices::ComputerVision::V1_0::Models::TextOperationStatusCodes end + def gender + Azure::CognitiveServices::ComputerVision::V1_0::Models::Gender + end def computer_vision_error_codes Azure::CognitiveServices::ComputerVision::V1_0::Models::ComputerVisionErrorCodes end @@ -191,11 +205,5 @@ def azure_regions def details Azure::CognitiveServices::ComputerVision::V1_0::Models::Details end - def language1 - Azure::CognitiveServices::ComputerVision::V1_0::Models::Language1 - end - def domain_models - Azure::CognitiveServices::ComputerVision::V1_0::Models::DomainModels - end end end