azure_cognitiveservices_computervision 0.18.0 → 0.20.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +5 -5
  2. data/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb +33 -1
  3. data/lib/2.0/generated/azure_cognitiveservices_computervision.rb +15 -11
  4. data/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb +365 -7
  5. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/detected_brand.rb +73 -0
  6. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb +20 -0
  7. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/line.rb +6 -7
  8. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/read_operation_result.rb +69 -0
  9. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb +5 -6
  10. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/text_operation_status_codes.rb +1 -1
  11. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/text_recognition_result.rb +114 -0
  12. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/text_recognition_result_confidence_class.rb +16 -0
  13. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/text_recognition_result_dimension_unit.rb +16 -0
  14. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/visual_feature_types.rb +1 -0
  15. data/lib/2.0/generated/azure_cognitiveservices_computervision/models/word.rb +20 -8
  16. data/lib/2.1/generated/azure_cognitiveservices_computervision.rb +74 -0
  17. data/lib/2.1/generated/azure_cognitiveservices_computervision/computer_vision_client.rb +3253 -0
  18. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/adult_info.rb +105 -0
  19. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/area_of_interest_result.rb +72 -0
  20. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/bounding_rect.rb +83 -0
  21. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/category.rb +69 -0
  22. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/category_detail.rb +77 -0
  23. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb +70 -0
  24. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/celebrity_results.rb +79 -0
  25. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/color_info.rb +98 -0
  26. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb +69 -0
  27. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/description_exclude.rb +16 -0
  28. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/details.rb +16 -0
  29. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/detect_result.rb +79 -0
  30. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/detected_brand.rb +73 -0
  31. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/detected_object.rb +86 -0
  32. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb +70 -0
  33. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/face_description.rb +72 -0
  34. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb +83 -0
  35. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/gender.rb +16 -0
  36. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/image_analysis.rb +212 -0
  37. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/image_caption.rb +57 -0
  38. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/image_description.rb +99 -0
  39. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/image_description_details.rb +76 -0
  40. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/image_metadata.rb +68 -0
  41. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/image_tag.rb +68 -0
  42. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/image_type.rb +57 -0
  43. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/image_url.rb +47 -0
  44. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/landmark_results.rb +79 -0
  45. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/landmarks_model.rb +58 -0
  46. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/line.rb +85 -0
  47. data/lib/{2.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb → 2.1/generated/azure_cognitiveservices_computervision/models/list_models_result.rb} +13 -13
  48. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/model_description.rb +65 -0
  49. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/object_hierarchy.rb +73 -0
  50. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_languages.rb +41 -0
  51. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_line.rb +72 -0
  52. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_region.rb +72 -0
  53. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_result.rb +105 -0
  54. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/ocr_word.rb +62 -0
  55. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/read_operation_result.rb +69 -0
  56. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/tag_result.rb +79 -0
  57. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb +61 -0
  58. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/text_operation_status_codes.rb +18 -0
  59. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/text_recognition_mode.rb +16 -0
  60. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/text_recognition_result.rb +114 -0
  61. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/text_recognition_result_confidence_class.rb +16 -0
  62. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/text_recognition_result_dimension_unit.rb +16 -0
  63. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/visual_feature_types.rb +23 -0
  64. data/lib/2.1/generated/azure_cognitiveservices_computervision/models/word.rb +78 -0
  65. data/lib/2.1/generated/azure_cognitiveservices_computervision/module_definition.rb +9 -0
  66. data/lib/azure_cognitiveservices_computervision.rb +1 -0
  67. data/lib/profiles/latest/modules/computervision_profile_module.rb +116 -96
  68. data/lib/version.rb +1 -1
  69. metadata +60 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ef1ae83a62f776e1479b5b977e117445ceef7808
4
- data.tar.gz: 16abda3e423a0d11e4e04a7729a9d42bc47d03d6
2
+ SHA256:
3
+ metadata.gz: adaebb9a6ac03c4eafe9ef40ff40cbf869e209697c2c2fe8bc5ac53667d6452e
4
+ data.tar.gz: 375c767b17aa4edd56ce049379001a977a5b7db0d55960713d8470a335a5a76a
5
5
  SHA512:
6
- metadata.gz: 0a4e89504d8d31f761e9333d2992b27bef4569c27a76978af9540d65209b8f0f9b32d60ef7ddb9a48c30cd404ab92af1d616325faf86db10183ecaef2216cfca
7
- data.tar.gz: 87906ee6215eaf491b541369ba0d1b320e21789c5fdb2a9d165bbc31ee8424e18d12212cdff6b6056fe8f5caedd66b5c992ab4453ce14be5ab986ea8ca14b05f
6
+ metadata.gz: df7d88f2b2f4eef32175566f9aebc10f5cd4bbee6251337875dafb6cb8e9f6a5a71de4d6733c64c4caf30c23e011d2c6bac77a3f8634d72402169d8166b57044
7
+ data.tar.gz: 64b7c1c229ad58b437a6f347f08e49356cd2346169ceff35789477536b1921689625caf1d89e079c016eca6d4430eeec7e6806c68d1e2e5cb846624cfa01f09b
@@ -189,6 +189,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
189
189
  end
190
190
 
191
191
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
192
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
193
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
192
194
  # Deserialize Response
193
195
  if status_code == 200
194
196
  begin
@@ -359,6 +361,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
359
361
  end
360
362
 
361
363
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
364
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
365
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
362
366
  # Deserialize Response
363
367
  if status_code == 200
364
368
  begin
@@ -496,6 +500,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
496
500
  end
497
501
 
498
502
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
503
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
504
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
499
505
  # Deserialize Response
500
506
  if status_code == 200
501
507
  begin
@@ -644,6 +650,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
644
650
  end
645
651
 
646
652
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
653
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
654
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
647
655
  # Deserialize Response
648
656
  if status_code == 200
649
657
  begin
@@ -784,6 +792,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
784
792
  end
785
793
 
786
794
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
795
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
796
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
787
797
  # Deserialize Response
788
798
  if status_code == 200
789
799
  begin
@@ -915,6 +925,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
915
925
  end
916
926
 
917
927
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
928
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
929
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
918
930
  # Deserialize Response
919
931
  if status_code == 200
920
932
  begin
@@ -1054,6 +1066,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
1054
1066
  end
1055
1067
 
1056
1068
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1069
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1070
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1057
1071
  # Deserialize Response
1058
1072
  if status_code == 200
1059
1073
  begin
@@ -1169,6 +1183,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
1169
1183
  end
1170
1184
 
1171
1185
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1186
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1187
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1172
1188
 
1173
1189
  result
1174
1190
  end
@@ -1255,6 +1271,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
1255
1271
  end
1256
1272
 
1257
1273
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1274
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1275
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1258
1276
  # Deserialize Response
1259
1277
  if status_code == 200
1260
1278
  begin
@@ -1418,6 +1436,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
1418
1436
  end
1419
1437
 
1420
1438
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1439
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1440
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1421
1441
  # Deserialize Response
1422
1442
  if status_code == 200
1423
1443
  begin
@@ -1557,6 +1577,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
1557
1577
  end
1558
1578
 
1559
1579
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1580
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1581
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1560
1582
  # Deserialize Response
1561
1583
  if status_code == 200
1562
1584
  begin
@@ -1707,6 +1729,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
1707
1729
  end
1708
1730
 
1709
1731
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1732
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1733
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1710
1734
  # Deserialize Response
1711
1735
  if status_code == 200
1712
1736
  begin
@@ -1849,6 +1873,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
1849
1873
  end
1850
1874
 
1851
1875
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1876
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1877
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1852
1878
  # Deserialize Response
1853
1879
  if status_code == 200
1854
1880
  begin
@@ -1982,6 +2008,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
1982
2008
  end
1983
2009
 
1984
2010
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2011
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2012
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1985
2013
  # Deserialize Response
1986
2014
  if status_code == 200
1987
2015
  begin
@@ -2123,6 +2151,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
2123
2151
  end
2124
2152
 
2125
2153
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2154
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2155
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2126
2156
  # Deserialize Response
2127
2157
  if status_code == 200
2128
2158
  begin
@@ -2240,6 +2270,8 @@ module Azure::CognitiveServices::ComputerVision::V1_0
2240
2270
  end
2241
2271
 
2242
2272
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2273
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2274
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2243
2275
 
2244
2276
  result
2245
2277
  end
@@ -2254,7 +2286,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
2254
2286
  #
2255
2287
  def add_telemetry
2256
2288
  sdk_information = 'azure_cognitiveservices_computervision'
2257
- sdk_information = "#{sdk_information}/0.18.0"
2289
+ sdk_information = "#{sdk_information}/0.20.2"
2258
2290
  add_user_agent_information(sdk_information)
2259
2291
  end
2260
2292
  end
@@ -40,27 +40,31 @@ module Azure::CognitiveServices::ComputerVision::V2_0
40
40
  autoload :OcrResult, '2.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb'
41
41
  autoload :DetectedObject, '2.0/generated/azure_cognitiveservices_computervision/models/detected_object.rb'
42
42
  autoload :TagResult, '2.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb'
43
- autoload :ImageAnalysis, '2.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb'
43
+ autoload :ImageMetadata, '2.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb'
44
44
  autoload :AreaOfInterestResult, '2.0/generated/azure_cognitiveservices_computervision/models/area_of_interest_result.rb'
45
- autoload :CelebritiesModel, '2.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb'
45
+ autoload :ImageDescription, '2.0/generated/azure_cognitiveservices_computervision/models/image_description.rb'
46
46
  autoload :ImageUrl, '2.0/generated/azure_cognitiveservices_computervision/models/image_url.rb'
47
- autoload :AdultInfo, '2.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb'
47
+ autoload :CategoryDetail, '2.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb'
48
48
  autoload :ComputerVisionError, '2.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb'
49
- autoload :ImageCaption, '2.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb'
49
+ autoload :ImageType, '2.0/generated/azure_cognitiveservices_computervision/models/image_type.rb'
50
50
  autoload :LandmarkResults, '2.0/generated/azure_cognitiveservices_computervision/models/landmark_results.rb'
51
- autoload :ObjectHierarchy, '2.0/generated/azure_cognitiveservices_computervision/models/object_hierarchy.rb'
51
+ autoload :FaceDescription, '2.0/generated/azure_cognitiveservices_computervision/models/face_description.rb'
52
52
  autoload :CelebrityResults, '2.0/generated/azure_cognitiveservices_computervision/models/celebrity_results.rb'
53
- autoload :ImageDescription, '2.0/generated/azure_cognitiveservices_computervision/models/image_description.rb'
53
+ autoload :DetectedBrand, '2.0/generated/azure_cognitiveservices_computervision/models/detected_brand.rb'
54
54
  autoload :Word, '2.0/generated/azure_cognitiveservices_computervision/models/word.rb'
55
- autoload :ImageType, '2.0/generated/azure_cognitiveservices_computervision/models/image_type.rb'
55
+ autoload :CelebritiesModel, '2.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb'
56
56
  autoload :Line, '2.0/generated/azure_cognitiveservices_computervision/models/line.rb'
57
- autoload :ImageMetadata, '2.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb'
58
- autoload :RecognitionResult, '2.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb'
59
- autoload :FaceDescription, '2.0/generated/azure_cognitiveservices_computervision/models/face_description.rb'
57
+ autoload :ImageCaption, '2.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb'
58
+ autoload :TextRecognitionResult, '2.0/generated/azure_cognitiveservices_computervision/models/text_recognition_result.rb'
59
+ autoload :ImageAnalysis, '2.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb'
60
60
  autoload :TextOperationResult, '2.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb'
61
- autoload :CategoryDetail, '2.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb'
61
+ autoload :ObjectHierarchy, '2.0/generated/azure_cognitiveservices_computervision/models/object_hierarchy.rb'
62
+ autoload :ReadOperationResult, '2.0/generated/azure_cognitiveservices_computervision/models/read_operation_result.rb'
63
+ autoload :AdultInfo, '2.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb'
62
64
  autoload :Gender, '2.0/generated/azure_cognitiveservices_computervision/models/gender.rb'
63
65
  autoload :TextOperationStatusCodes, '2.0/generated/azure_cognitiveservices_computervision/models/text_operation_status_codes.rb'
66
+ autoload :TextRecognitionResultDimensionUnit, '2.0/generated/azure_cognitiveservices_computervision/models/text_recognition_result_dimension_unit.rb'
67
+ autoload :TextRecognitionResultConfidenceClass, '2.0/generated/azure_cognitiveservices_computervision/models/text_recognition_result_confidence_class.rb'
64
68
  autoload :OcrLanguages, '2.0/generated/azure_cognitiveservices_computervision/models/ocr_languages.rb'
65
69
  autoload :VisualFeatureTypes, '2.0/generated/azure_cognitiveservices_computervision/models/visual_feature_types.rb'
66
70
  autoload :TextRecognitionMode, '2.0/generated/azure_cognitiveservices_computervision/models/text_recognition_mode.rb'
@@ -136,7 +136,9 @@ module Azure::CognitiveServices::ComputerVision::V2_0
136
136
  # - detects if the image is pornographic in nature (depicts nudity or a sex
137
137
  # act). Sexually suggestive content is also detected. Objects - detects
138
138
  # various objects within an image, including the approximate location. The
139
- # Objects argument is only available in English.
139
+ # Objects argument is only available in English. Brands - detects various
140
+ # brands within an image, including the approximate location. The Brands
141
+ # argument is only available in English.
140
142
  # @param details [Array<Details>] A string indicating which domain-specific
141
143
  # details to return. Multiple values should be comma-separated. Valid visual
142
144
  # feature types include: Celebrities - identifies celebrities if detected in
@@ -180,7 +182,9 @@ module Azure::CognitiveServices::ComputerVision::V2_0
180
182
  # - detects if the image is pornographic in nature (depicts nudity or a sex
181
183
  # act). Sexually suggestive content is also detected. Objects - detects
182
184
  # various objects within an image, including the approximate location. The
183
- # Objects argument is only available in English.
185
+ # Objects argument is only available in English. Brands - detects various
186
+ # brands within an image, including the approximate location. The Brands
187
+ # argument is only available in English.
184
188
  # @param details [Array<Details>] A string indicating which domain-specific
185
189
  # details to return. Multiple values should be comma-separated. Valid visual
186
190
  # feature types include: Celebrities - identifies celebrities if detected in
@@ -223,7 +227,9 @@ module Azure::CognitiveServices::ComputerVision::V2_0
223
227
  # - detects if the image is pornographic in nature (depicts nudity or a sex
224
228
  # act). Sexually suggestive content is also detected. Objects - detects
225
229
  # various objects within an image, including the approximate location. The
226
- # Objects argument is only available in English.
230
+ # Objects argument is only available in English. Brands - detects various
231
+ # brands within an image, including the approximate location. The Brands
232
+ # argument is only available in English.
227
233
  # @param details [Array<Details>] A string indicating which domain-specific
228
234
  # details to return. Multiple values should be comma-separated. Valid visual
229
235
  # feature types include: Celebrities - identifies celebrities if detected in
@@ -283,6 +289,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
283
289
  end
284
290
 
285
291
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
292
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
293
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
286
294
  # Deserialize Response
287
295
  if status_code == 200
288
296
  begin
@@ -429,6 +437,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
429
437
  end
430
438
 
431
439
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
440
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
441
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
432
442
  # Deserialize Response
433
443
  if status_code == 200
434
444
  begin
@@ -541,6 +551,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
541
551
  end
542
552
 
543
553
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
554
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
555
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
544
556
  # Deserialize Response
545
557
  if status_code == 200
546
558
  begin
@@ -638,6 +650,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
638
650
  end
639
651
 
640
652
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
653
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
654
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
641
655
  # Deserialize Response
642
656
  if status_code == 200
643
657
  begin
@@ -783,6 +797,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
783
797
  end
784
798
 
785
799
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
800
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
801
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
786
802
  # Deserialize Response
787
803
  if status_code == 200
788
804
  begin
@@ -927,6 +943,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
927
943
  end
928
944
 
929
945
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
946
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
947
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
930
948
  # Deserialize Response
931
949
  if status_code == 200
932
950
  begin
@@ -1073,6 +1091,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1073
1091
  end
1074
1092
 
1075
1093
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1094
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1095
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1076
1096
  # Deserialize Response
1077
1097
  if status_code == 200
1078
1098
  begin
@@ -1225,6 +1245,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1225
1245
  end
1226
1246
 
1227
1247
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1248
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1249
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1228
1250
  # Deserialize Response
1229
1251
  if status_code == 200
1230
1252
  begin
@@ -1350,6 +1372,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1350
1372
  end
1351
1373
 
1352
1374
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1375
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1376
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1353
1377
  # Deserialize Response
1354
1378
  if status_code == 200
1355
1379
  begin
@@ -1463,6 +1487,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1463
1487
  end
1464
1488
 
1465
1489
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1490
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1491
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1466
1492
 
1467
1493
  result
1468
1494
  end
@@ -1549,6 +1575,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1549
1575
  end
1550
1576
 
1551
1577
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1578
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1579
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1552
1580
  # Deserialize Response
1553
1581
  if status_code == 200
1554
1582
  begin
@@ -1566,6 +1594,207 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1566
1594
  promise.execute
1567
1595
  end
1568
1596
 
1597
+ #
1598
+ # Use this interface to get the result of a Read operation, employing the
1599
+ # state-of-the-art Optical Character Recognition (OCR) algorithms optimized for
1600
+ # text-heavy documents. When you use the Read File interface, the response
1601
+ # contains a field called 'Operation-Location'. The 'Operation-Location' field
1602
+ # contains the URL that you must use for your 'GetReadOperationResult'
1603
+ # operation to access OCR results.​
1604
+ #
1605
+ # @param url [String] Publicly reachable URL of an image.
1606
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1607
+ # will be added to the HTTP request.
1608
+ #
1609
+ #
1610
+ def batch_read_file(url, custom_headers:nil)
1611
+ response = batch_read_file_async(url, custom_headers:custom_headers).value!
1612
+ nil
1613
+ end
1614
+
1615
+ #
1616
+ # Use this interface to get the result of a Read operation, employing the
1617
+ # state-of-the-art Optical Character Recognition (OCR) algorithms optimized for
1618
+ # text-heavy documents. When you use the Read File interface, the response
1619
+ # contains a field called 'Operation-Location'. The 'Operation-Location' field
1620
+ # contains the URL that you must use for your 'GetReadOperationResult'
1621
+ # operation to access OCR results.​
1622
+ #
1623
+ # @param url [String] Publicly reachable URL of an image.
1624
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1625
+ # will be added to the HTTP request.
1626
+ #
1627
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1628
+ #
1629
+ def batch_read_file_with_http_info(url, custom_headers:nil)
1630
+ batch_read_file_async(url, custom_headers:custom_headers).value!
1631
+ end
1632
+
1633
+ #
1634
+ # Use this interface to get the result of a Read operation, employing the
1635
+ # state-of-the-art Optical Character Recognition (OCR) algorithms optimized for
1636
+ # text-heavy documents. When you use the Read File interface, the response
1637
+ # contains a field called 'Operation-Location'. The 'Operation-Location' field
1638
+ # contains the URL that you must use for your 'GetReadOperationResult'
1639
+ # operation to access OCR results.​
1640
+ #
1641
+ # @param url [String] Publicly reachable URL of an image.
1642
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1643
+ # to the HTTP request.
1644
+ #
1645
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1646
+ #
1647
+ def batch_read_file_async(url, custom_headers:nil)
1648
+ fail ArgumentError, 'endpoint is nil' if endpoint.nil?
1649
+ fail ArgumentError, 'url is nil' if url.nil?
1650
+
1651
+ image_url = ImageUrl.new
1652
+ unless url.nil?
1653
+ image_url.url = url
1654
+ end
1655
+
1656
+ request_headers = {}
1657
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1658
+
1659
+ # Set Headers
1660
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1661
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
1662
+
1663
+ # Serialize Request
1664
+ request_mapper = Azure::CognitiveServices::ComputerVision::V2_0::Models::ImageUrl.mapper()
1665
+ request_content = self.serialize(request_mapper, image_url)
1666
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1667
+
1668
+ path_template = 'read/core/asyncBatchAnalyze'
1669
+
1670
+ request_url = @base_url || self.base_url
1671
+ request_url = request_url.gsub('{Endpoint}', endpoint)
1672
+
1673
+ options = {
1674
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1675
+ body: request_content,
1676
+ headers: request_headers.merge(custom_headers || {}),
1677
+ base_url: request_url
1678
+ }
1679
+ promise = self.make_request_async(:post, path_template, options)
1680
+
1681
+ promise = promise.then do |result|
1682
+ http_response = result.response
1683
+ status_code = http_response.status
1684
+ response_content = http_response.body
1685
+ unless status_code == 202
1686
+ error_model = JSON.load(response_content)
1687
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1688
+ end
1689
+
1690
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1691
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1692
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1693
+
1694
+ result
1695
+ end
1696
+
1697
+ promise.execute
1698
+ end
1699
+
1700
+ #
1701
+ # This interface is used for getting OCR results of Read operation. The URL to
1702
+ # this interface should be retrieved from 'Operation-Location' field returned
1703
+ # from Batch Read File interface.
1704
+ #
1705
+ # @param operation_id [String] Id of read operation returned in the response of
1706
+ # the 'Batch Read File' interface.
1707
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1708
+ # will be added to the HTTP request.
1709
+ #
1710
+ # @return [ReadOperationResult] operation results.
1711
+ #
1712
+ def get_read_operation_result(operation_id, custom_headers:nil)
1713
+ response = get_read_operation_result_async(operation_id, custom_headers:custom_headers).value!
1714
+ response.body unless response.nil?
1715
+ end
1716
+
1717
+ #
1718
+ # This interface is used for getting OCR results of Read operation. The URL to
1719
+ # this interface should be retrieved from 'Operation-Location' field returned
1720
+ # from Batch Read File interface.
1721
+ #
1722
+ # @param operation_id [String] Id of read operation returned in the response of
1723
+ # the 'Batch Read File' interface.
1724
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1725
+ # will be added to the HTTP request.
1726
+ #
1727
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1728
+ #
1729
+ def get_read_operation_result_with_http_info(operation_id, custom_headers:nil)
1730
+ get_read_operation_result_async(operation_id, custom_headers:custom_headers).value!
1731
+ end
1732
+
1733
+ #
1734
+ # This interface is used for getting OCR results of Read operation. The URL to
1735
+ # this interface should be retrieved from 'Operation-Location' field returned
1736
+ # from Batch Read File interface.
1737
+ #
1738
+ # @param operation_id [String] Id of read operation returned in the response of
1739
+ # the 'Batch Read File' interface.
1740
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1741
+ # to the HTTP request.
1742
+ #
1743
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1744
+ #
1745
+ def get_read_operation_result_async(operation_id, custom_headers:nil)
1746
+ fail ArgumentError, 'endpoint is nil' if endpoint.nil?
1747
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
1748
+
1749
+
1750
+ request_headers = {}
1751
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1752
+
1753
+ # Set Headers
1754
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1755
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
1756
+ path_template = 'read/operations/{operationId}'
1757
+
1758
+ request_url = @base_url || self.base_url
1759
+ request_url = request_url.gsub('{Endpoint}', endpoint)
1760
+
1761
+ options = {
1762
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1763
+ path_params: {'operationId' => operation_id},
1764
+ headers: request_headers.merge(custom_headers || {}),
1765
+ base_url: request_url
1766
+ }
1767
+ promise = self.make_request_async(:get, path_template, options)
1768
+
1769
+ promise = promise.then do |result|
1770
+ http_response = result.response
1771
+ status_code = http_response.status
1772
+ response_content = http_response.body
1773
+ unless status_code == 200
1774
+ error_model = JSON.load(response_content)
1775
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1776
+ end
1777
+
1778
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1779
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1780
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1781
+ # Deserialize Response
1782
+ if status_code == 200
1783
+ begin
1784
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1785
+ result_mapper = Azure::CognitiveServices::ComputerVision::V2_0::Models::ReadOperationResult.mapper()
1786
+ result.body = self.deserialize(result_mapper, parsed_response)
1787
+ rescue Exception => e
1788
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1789
+ end
1790
+ end
1791
+
1792
+ result
1793
+ end
1794
+
1795
+ promise.execute
1796
+ end
1797
+
1569
1798
  #
1570
1799
  # This operation extracts a rich set of visual features based on the image
1571
1800
  # content.
@@ -1590,7 +1819,9 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1590
1819
  # - detects if the image is pornographic in nature (depicts nudity or a sex
1591
1820
  # act). Sexually suggestive content is also detected. Objects - detects
1592
1821
  # various objects within an image, including the approximate location. The
1593
- # Objects argument is only available in English.
1822
+ # Objects argument is only available in English. Brands - detects various
1823
+ # brands within an image, including the approximate location. The Brands
1824
+ # argument is only available in English.
1594
1825
  # @param details [Array<Details>] A string indicating which domain-specific
1595
1826
  # details to return. Multiple values should be comma-separated. Valid visual
1596
1827
  # feature types include: Celebrities - identifies celebrities if detected in
@@ -1634,7 +1865,9 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1634
1865
  # - detects if the image is pornographic in nature (depicts nudity or a sex
1635
1866
  # act). Sexually suggestive content is also detected. Objects - detects
1636
1867
  # various objects within an image, including the approximate location. The
1637
- # Objects argument is only available in English.
1868
+ # Objects argument is only available in English. Brands - detects various
1869
+ # brands within an image, including the approximate location. The Brands
1870
+ # argument is only available in English.
1638
1871
  # @param details [Array<Details>] A string indicating which domain-specific
1639
1872
  # details to return. Multiple values should be comma-separated. Valid visual
1640
1873
  # feature types include: Celebrities - identifies celebrities if detected in
@@ -1677,7 +1910,9 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1677
1910
  # - detects if the image is pornographic in nature (depicts nudity or a sex
1678
1911
  # act). Sexually suggestive content is also detected. Objects - detects
1679
1912
  # various objects within an image, including the approximate location. The
1680
- # Objects argument is only available in English.
1913
+ # Objects argument is only available in English. Brands - detects various
1914
+ # brands within an image, including the approximate location. The Brands
1915
+ # argument is only available in English.
1681
1916
  # @param details [Array<Details>] A string indicating which domain-specific
1682
1917
  # details to return. Multiple values should be comma-separated. Valid visual
1683
1918
  # feature types include: Celebrities - identifies celebrities if detected in
@@ -1739,6 +1974,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1739
1974
  end
1740
1975
 
1741
1976
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1977
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1978
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1742
1979
  # Deserialize Response
1743
1980
  if status_code == 200
1744
1981
  begin
@@ -1859,6 +2096,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1859
2096
  end
1860
2097
 
1861
2098
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2099
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2100
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1862
2101
  # Deserialize Response
1863
2102
  if status_code == 200
1864
2103
  begin
@@ -2007,6 +2246,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2007
2246
  end
2008
2247
 
2009
2248
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2249
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2250
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2010
2251
  # Deserialize Response
2011
2252
  if status_code == 200
2012
2253
  begin
@@ -2121,6 +2362,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2121
2362
  end
2122
2363
 
2123
2364
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2365
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2366
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2124
2367
  # Deserialize Response
2125
2368
  if status_code == 200
2126
2369
  begin
@@ -2275,6 +2518,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2275
2518
  end
2276
2519
 
2277
2520
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2521
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2522
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2278
2523
  # Deserialize Response
2279
2524
  if status_code == 200
2280
2525
  begin
@@ -2429,6 +2674,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2429
2674
  end
2430
2675
 
2431
2676
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2677
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2678
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2432
2679
  # Deserialize Response
2433
2680
  if status_code == 200
2434
2681
  begin
@@ -2575,6 +2822,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2575
2822
  end
2576
2823
 
2577
2824
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2825
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2826
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2578
2827
  # Deserialize Response
2579
2828
  if status_code == 200
2580
2829
  begin
@@ -2723,6 +2972,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2723
2972
  end
2724
2973
 
2725
2974
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2975
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2976
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2726
2977
  # Deserialize Response
2727
2978
  if status_code == 200
2728
2979
  begin
@@ -2838,6 +3089,113 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2838
3089
  end
2839
3090
 
2840
3091
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3092
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3093
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3094
+
3095
+ result
3096
+ end
3097
+
3098
+ promise.execute
3099
+ end
3100
+
3101
+ #
3102
+ # Use this interface to get the result of a Read Document operation, employing
3103
+ # the state-of-the-art Optical Character Recognition (OCR) algorithms optimized
3104
+ # for text-heavy documents. When you use the Read Document interface, the
3105
+ # response contains a field called 'Operation-Location'. The
3106
+ # 'Operation-Location' field contains the URL that you must use for your 'Get
3107
+ # Read Result operation' to access OCR results.​
3108
+ #
3109
+ # @param image An image stream.
3110
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3111
+ # will be added to the HTTP request.
3112
+ #
3113
+ #
3114
+ def batch_read_file_in_stream(image, custom_headers:nil)
3115
+ response = batch_read_file_in_stream_async(image, custom_headers:custom_headers).value!
3116
+ nil
3117
+ end
3118
+
3119
+ #
3120
+ # Use this interface to get the result of a Read Document operation, employing
3121
+ # the state-of-the-art Optical Character Recognition (OCR) algorithms optimized
3122
+ # for text-heavy documents. When you use the Read Document interface, the
3123
+ # response contains a field called 'Operation-Location'. The
3124
+ # 'Operation-Location' field contains the URL that you must use for your 'Get
3125
+ # Read Result operation' to access OCR results.​
3126
+ #
3127
+ # @param image An image stream.
3128
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3129
+ # will be added to the HTTP request.
3130
+ #
3131
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3132
+ #
3133
+ def batch_read_file_in_stream_with_http_info(image, custom_headers:nil)
3134
+ batch_read_file_in_stream_async(image, custom_headers:custom_headers).value!
3135
+ end
3136
+
3137
+ #
3138
+ # Use this interface to get the result of a Read Document operation, employing
3139
+ # the state-of-the-art Optical Character Recognition (OCR) algorithms optimized
3140
+ # for text-heavy documents. When you use the Read Document interface, the
3141
+ # response contains a field called 'Operation-Location'. The
3142
+ # 'Operation-Location' field contains the URL that you must use for your 'Get
3143
+ # Read Result operation' to access OCR results.​
3144
+ #
3145
+ # @param image An image stream.
3146
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3147
+ # to the HTTP request.
3148
+ #
3149
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3150
+ #
3151
+ def batch_read_file_in_stream_async(image, custom_headers:nil)
3152
+ fail ArgumentError, 'endpoint is nil' if endpoint.nil?
3153
+ fail ArgumentError, 'image is nil' if image.nil?
3154
+
3155
+
3156
+ request_headers = {}
3157
+ request_headers['Content-Type'] = 'application/octet-stream'
3158
+
3159
+ # Set Headers
3160
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3161
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
3162
+
3163
+ # Serialize Request
3164
+ request_mapper = {
3165
+ client_side_validation: true,
3166
+ required: true,
3167
+ serialized_name: 'Image',
3168
+ type: {
3169
+ name: 'Stream'
3170
+ }
3171
+ }
3172
+ request_content = self.serialize(request_mapper, image)
3173
+
3174
+ path_template = 'read/core/asyncBatchAnalyze'
3175
+
3176
+ request_url = @base_url || self.base_url
3177
+ request_url = request_url.gsub('{Endpoint}', endpoint)
3178
+
3179
+ options = {
3180
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3181
+ body: request_content,
3182
+ headers: request_headers.merge(custom_headers || {}),
3183
+ base_url: request_url
3184
+ }
3185
+ promise = self.make_request_async(:post, path_template, options)
3186
+
3187
+ promise = promise.then do |result|
3188
+ http_response = result.response
3189
+ status_code = http_response.status
3190
+ response_content = http_response.body
3191
+ unless status_code == 202
3192
+ error_model = JSON.load(response_content)
3193
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3194
+ end
3195
+
3196
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3197
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3198
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2841
3199
 
2842
3200
  result
2843
3201
  end
@@ -2852,7 +3210,7 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2852
3210
  #
2853
3211
  def add_telemetry
2854
3212
  sdk_information = 'azure_cognitiveservices_computervision'
2855
- sdk_information = "#{sdk_information}/0.18.0"
3213
+ sdk_information = "#{sdk_information}/0.20.2"
2856
3214
  add_user_agent_information(sdk_information)
2857
3215
  end
2858
3216
  end