azure_cognitiveservices_computervision 0.19.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: ae50a37335f7d65db4ca6b1bcb25a5900121dde306dcc5908fc79cb35ccde09c
4
- data.tar.gz: 37453a13b9a2acc22fc974d366ab41efc50c86db5c665b5cb98a48ac7090e20c
2
+ SHA1:
3
+ metadata.gz: 7ad18653bcb5b979aab2adc9c10d8ed0b28ccbbc
4
+ data.tar.gz: 9a1ce765f9e2059af6fe451657564580d72d44ec
5
5
  SHA512:
6
- metadata.gz: 97e70b4af6cba069770dca5a599a4ba4414ec8a0a72a71a6edf23fdba9f88282b66dfc0ee33dd52a7bc37a134a937b20dce81e1ae5cc41b15efebbeb5e0f4665
7
- data.tar.gz: 43f4102201fdc4a30857dacd51ffd3c83a8fb611d5839f145abf30995f87feb4131faa11d969e5211a1dbe08ae2a0bd7eda29528df4886dd9b8bfcaa82fe7aca
6
+ metadata.gz: bcf66bd477a2ac858bb6fb280f8ad7cb824b0b10dafe2b2be541053b3fe3dbccd18273400c322b5e289033f36ebe8b0b84add1514f37bfc5382edc539eed7c1d
7
+ data.tar.gz: a7bb5ecd4702f519836d9e9d3ad631fec763295e9bc08f3be7c8b995a62469a7c1549a9f198b90b5b536a989f45621e961c9f2a29b9eaab24c1d9b7fd6f3ea8f
@@ -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.19.0"
2289
+ sdk_information = "#{sdk_information}/0.20.0"
2258
2290
  add_user_agent_information(sdk_information)
2259
2291
  end
2260
2292
  end
@@ -289,6 +289,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
289
289
  end
290
290
 
291
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?
292
294
  # Deserialize Response
293
295
  if status_code == 200
294
296
  begin
@@ -435,6 +437,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
435
437
  end
436
438
 
437
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?
438
442
  # Deserialize Response
439
443
  if status_code == 200
440
444
  begin
@@ -547,6 +551,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
547
551
  end
548
552
 
549
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?
550
556
  # Deserialize Response
551
557
  if status_code == 200
552
558
  begin
@@ -644,6 +650,8 @@ module Azure::CognitiveServices::ComputerVision::V2_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
@@ -789,6 +797,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
789
797
  end
790
798
 
791
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?
792
802
  # Deserialize Response
793
803
  if status_code == 200
794
804
  begin
@@ -933,6 +943,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
933
943
  end
934
944
 
935
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?
936
948
  # Deserialize Response
937
949
  if status_code == 200
938
950
  begin
@@ -1079,6 +1091,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1079
1091
  end
1080
1092
 
1081
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?
1082
1096
  # Deserialize Response
1083
1097
  if status_code == 200
1084
1098
  begin
@@ -1231,6 +1245,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1231
1245
  end
1232
1246
 
1233
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?
1234
1250
  # Deserialize Response
1235
1251
  if status_code == 200
1236
1252
  begin
@@ -1356,6 +1372,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1356
1372
  end
1357
1373
 
1358
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?
1359
1377
  # Deserialize Response
1360
1378
  if status_code == 200
1361
1379
  begin
@@ -1469,6 +1487,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1469
1487
  end
1470
1488
 
1471
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?
1472
1492
 
1473
1493
  result
1474
1494
  end
@@ -1555,6 +1575,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1555
1575
  end
1556
1576
 
1557
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?
1558
1580
  # Deserialize Response
1559
1581
  if status_code == 200
1560
1582
  begin
@@ -1576,19 +1598,17 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1576
1598
  # Use this interface to get the result of a Read operation, employing the
1577
1599
  # state-of-the-art Optical Character Recognition (OCR) algorithms optimized for
1578
1600
  # text-heavy documents. When you use the Read File interface, the response
1579
- # contains a field called "Operation-Location". The "Operation-Location" field
1580
- # contains the URL that you must use for your "Read Operation Result" operation
1581
- # to access OCR results.​
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.​
1582
1604
  #
1583
- # @param mode [TextRecognitionMode] Type of text to recognize. Possible values
1584
- # include: 'Handwritten', 'Printed'
1585
1605
  # @param url [String] Publicly reachable URL of an image.
1586
1606
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1587
1607
  # will be added to the HTTP request.
1588
1608
  #
1589
1609
  #
1590
- def batch_read_file(url, mode, custom_headers:nil)
1591
- response = batch_read_file_async(url, mode, custom_headers:custom_headers).value!
1610
+ def batch_read_file(url, custom_headers:nil)
1611
+ response = batch_read_file_async(url, custom_headers:custom_headers).value!
1592
1612
  nil
1593
1613
  end
1594
1614
 
@@ -1596,41 +1616,36 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1596
1616
  # Use this interface to get the result of a Read operation, employing the
1597
1617
  # state-of-the-art Optical Character Recognition (OCR) algorithms optimized for
1598
1618
  # text-heavy documents. When you use the Read File interface, the response
1599
- # contains a field called "Operation-Location". The "Operation-Location" field
1600
- # contains the URL that you must use for your "Read Operation Result" operation
1601
- # to access OCR results.​
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.​
1602
1622
  #
1603
- # @param mode [TextRecognitionMode] Type of text to recognize. Possible values
1604
- # include: 'Handwritten', 'Printed'
1605
1623
  # @param url [String] Publicly reachable URL of an image.
1606
1624
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1607
1625
  # will be added to the HTTP request.
1608
1626
  #
1609
1627
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1610
1628
  #
1611
- def batch_read_file_with_http_info(url, mode, custom_headers:nil)
1612
- batch_read_file_async(url, mode, custom_headers:custom_headers).value!
1629
+ def batch_read_file_with_http_info(url, custom_headers:nil)
1630
+ batch_read_file_async(url, custom_headers:custom_headers).value!
1613
1631
  end
1614
1632
 
1615
1633
  #
1616
1634
  # Use this interface to get the result of a Read operation, employing the
1617
1635
  # state-of-the-art Optical Character Recognition (OCR) algorithms optimized for
1618
1636
  # 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 "Read Operation Result" operation
1621
- # to access OCR results.​
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.​
1622
1640
  #
1623
- # @param mode [TextRecognitionMode] Type of text to recognize. Possible values
1624
- # include: 'Handwritten', 'Printed'
1625
1641
  # @param url [String] Publicly reachable URL of an image.
1626
1642
  # @param [Hash{String => String}] A hash of custom headers that will be added
1627
1643
  # to the HTTP request.
1628
1644
  #
1629
1645
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1630
1646
  #
1631
- def batch_read_file_async(url, mode, custom_headers:nil)
1647
+ def batch_read_file_async(url, custom_headers:nil)
1632
1648
  fail ArgumentError, 'endpoint is nil' if endpoint.nil?
1633
- fail ArgumentError, 'mode is nil' if mode.nil?
1634
1649
  fail ArgumentError, 'url is nil' if url.nil?
1635
1650
 
1636
1651
  image_url = ImageUrl.new
@@ -1657,7 +1672,6 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1657
1672
 
1658
1673
  options = {
1659
1674
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1660
- query_params: {'mode' => mode},
1661
1675
  body: request_content,
1662
1676
  headers: request_headers.merge(custom_headers || {}),
1663
1677
  base_url: request_url
@@ -1674,6 +1688,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1674
1688
  end
1675
1689
 
1676
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?
1677
1693
 
1678
1694
  result
1679
1695
  end
@@ -1683,11 +1699,11 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1683
1699
 
1684
1700
  #
1685
1701
  # This interface is used for getting OCR results of Read operation. The URL to
1686
- # this interface should be retrieved from "Operation-Location" field returned
1702
+ # this interface should be retrieved from 'Operation-Location' field returned
1687
1703
  # from Batch Read File interface.
1688
1704
  #
1689
1705
  # @param operation_id [String] Id of read operation returned in the response of
1690
- # the "Batch Read File" interface.
1706
+ # the 'Batch Read File' interface.
1691
1707
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1692
1708
  # will be added to the HTTP request.
1693
1709
  #
@@ -1700,11 +1716,11 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1700
1716
 
1701
1717
  #
1702
1718
  # This interface is used for getting OCR results of Read operation. The URL to
1703
- # this interface should be retrieved from "Operation-Location" field returned
1719
+ # this interface should be retrieved from 'Operation-Location' field returned
1704
1720
  # from Batch Read File interface.
1705
1721
  #
1706
1722
  # @param operation_id [String] Id of read operation returned in the response of
1707
- # the "Batch Read File" interface.
1723
+ # the 'Batch Read File' interface.
1708
1724
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1709
1725
  # will be added to the HTTP request.
1710
1726
  #
@@ -1716,11 +1732,11 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1716
1732
 
1717
1733
  #
1718
1734
  # 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
1735
+ # this interface should be retrieved from 'Operation-Location' field returned
1720
1736
  # from Batch Read File interface.
1721
1737
  #
1722
1738
  # @param operation_id [String] Id of read operation returned in the response of
1723
- # the "Batch Read File" interface.
1739
+ # the 'Batch Read File' interface.
1724
1740
  # @param [Hash{String => String}] A hash of custom headers that will be added
1725
1741
  # to the HTTP request.
1726
1742
  #
@@ -1760,6 +1776,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1760
1776
  end
1761
1777
 
1762
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?
1763
1781
  # Deserialize Response
1764
1782
  if status_code == 200
1765
1783
  begin
@@ -1956,6 +1974,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
1956
1974
  end
1957
1975
 
1958
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?
1959
1979
  # Deserialize Response
1960
1980
  if status_code == 200
1961
1981
  begin
@@ -2076,6 +2096,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2076
2096
  end
2077
2097
 
2078
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?
2079
2101
  # Deserialize Response
2080
2102
  if status_code == 200
2081
2103
  begin
@@ -2224,6 +2246,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2224
2246
  end
2225
2247
 
2226
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?
2227
2251
  # Deserialize Response
2228
2252
  if status_code == 200
2229
2253
  begin
@@ -2338,6 +2362,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2338
2362
  end
2339
2363
 
2340
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?
2341
2367
  # Deserialize Response
2342
2368
  if status_code == 200
2343
2369
  begin
@@ -2492,6 +2518,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2492
2518
  end
2493
2519
 
2494
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?
2495
2523
  # Deserialize Response
2496
2524
  if status_code == 200
2497
2525
  begin
@@ -2646,6 +2674,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2646
2674
  end
2647
2675
 
2648
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?
2649
2679
  # Deserialize Response
2650
2680
  if status_code == 200
2651
2681
  begin
@@ -2792,6 +2822,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2792
2822
  end
2793
2823
 
2794
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?
2795
2827
  # Deserialize Response
2796
2828
  if status_code == 200
2797
2829
  begin
@@ -2940,6 +2972,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
2940
2972
  end
2941
2973
 
2942
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?
2943
2977
  # Deserialize Response
2944
2978
  if status_code == 200
2945
2979
  begin
@@ -3055,6 +3089,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
3055
3089
  end
3056
3090
 
3057
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?
3058
3094
 
3059
3095
  result
3060
3096
  end
@@ -3066,19 +3102,17 @@ module Azure::CognitiveServices::ComputerVision::V2_0
3066
3102
  # Use this interface to get the result of a Read Document operation, employing
3067
3103
  # the state-of-the-art Optical Character Recognition (OCR) algorithms optimized
3068
3104
  # for text-heavy documents. When you use the Read Document interface, the
3069
- # response contains a field called "Operation-Location". The
3070
- # "Operation-Location" field contains the URL that you must use for your "Get
3071
- # Read Result operation" to access OCR results.​
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.​
3072
3108
  #
3073
3109
  # @param image An image stream.
3074
- # @param mode [TextRecognitionMode] Type of text to recognize. Possible values
3075
- # include: 'Handwritten', 'Printed'
3076
3110
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
3077
3111
  # will be added to the HTTP request.
3078
3112
  #
3079
3113
  #
3080
- def batch_read_file_in_stream(image, mode, custom_headers:nil)
3081
- response = batch_read_file_in_stream_async(image, mode, custom_headers:custom_headers).value!
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!
3082
3116
  nil
3083
3117
  end
3084
3118
 
@@ -3086,42 +3120,37 @@ module Azure::CognitiveServices::ComputerVision::V2_0
3086
3120
  # Use this interface to get the result of a Read Document operation, employing
3087
3121
  # the state-of-the-art Optical Character Recognition (OCR) algorithms optimized
3088
3122
  # for text-heavy documents. When you use the Read Document interface, the
3089
- # response contains a field called "Operation-Location". The
3090
- # "Operation-Location" field contains the URL that you must use for your "Get
3091
- # Read Result operation" to access OCR results.​
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.​
3092
3126
  #
3093
3127
  # @param image An image stream.
3094
- # @param mode [TextRecognitionMode] Type of text to recognize. Possible values
3095
- # include: 'Handwritten', 'Printed'
3096
3128
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
3097
3129
  # will be added to the HTTP request.
3098
3130
  #
3099
3131
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3100
3132
  #
3101
- def batch_read_file_in_stream_with_http_info(image, mode, custom_headers:nil)
3102
- batch_read_file_in_stream_async(image, mode, custom_headers:custom_headers).value!
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!
3103
3135
  end
3104
3136
 
3105
3137
  #
3106
3138
  # Use this interface to get the result of a Read Document operation, employing
3107
3139
  # the state-of-the-art Optical Character Recognition (OCR) algorithms optimized
3108
3140
  # for text-heavy documents. When you use the Read Document interface, the
3109
- # response contains a field called "Operation-Location". The
3110
- # "Operation-Location" field contains the URL that you must use for your "Get
3111
- # Read Result operation" to access OCR results.​
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.​
3112
3144
  #
3113
3145
  # @param image An image stream.
3114
- # @param mode [TextRecognitionMode] Type of text to recognize. Possible values
3115
- # include: 'Handwritten', 'Printed'
3116
3146
  # @param [Hash{String => String}] A hash of custom headers that will be added
3117
3147
  # to the HTTP request.
3118
3148
  #
3119
3149
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3120
3150
  #
3121
- def batch_read_file_in_stream_async(image, mode, custom_headers:nil)
3151
+ def batch_read_file_in_stream_async(image, custom_headers:nil)
3122
3152
  fail ArgumentError, 'endpoint is nil' if endpoint.nil?
3123
3153
  fail ArgumentError, 'image is nil' if image.nil?
3124
- fail ArgumentError, 'mode is nil' if mode.nil?
3125
3154
 
3126
3155
 
3127
3156
  request_headers = {}
@@ -3149,7 +3178,6 @@ module Azure::CognitiveServices::ComputerVision::V2_0
3149
3178
 
3150
3179
  options = {
3151
3180
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3152
- query_params: {'mode' => mode},
3153
3181
  body: request_content,
3154
3182
  headers: request_headers.merge(custom_headers || {}),
3155
3183
  base_url: request_url
@@ -3166,6 +3194,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
3166
3194
  end
3167
3195
 
3168
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?
3169
3199
 
3170
3200
  result
3171
3201
  end
@@ -3180,7 +3210,7 @@ module Azure::CognitiveServices::ComputerVision::V2_0
3180
3210
  #
3181
3211
  def add_telemetry
3182
3212
  sdk_information = 'azure_cognitiveservices_computervision'
3183
- sdk_information = "#{sdk_information}/0.19.0"
3213
+ sdk_information = "#{sdk_information}/0.20.0"
3184
3214
  add_user_agent_information(sdk_information)
3185
3215
  end
3186
3216
  end
@@ -6,13 +6,13 @@
6
6
  module Azure::CognitiveServices::ComputerVision::V2_0
7
7
  module Models
8
8
  #
9
- # Json object representing a recognized text line.
9
+ # An object representing a recognized text line.
10
10
  #
11
11
  class Line
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [Array<Integer>] Bounding box of a recognized line.
15
+ # @return [Array<Float>] Bounding box of a recognized line.
16
16
  attr_accessor :bounding_box
17
17
 
18
18
  # @return [String] The text content of the line.
@@ -44,9 +44,9 @@ module Azure::CognitiveServices::ComputerVision::V2_0
44
44
  element: {
45
45
  client_side_validation: true,
46
46
  required: false,
47
- serialized_name: 'NumberElementType',
47
+ serialized_name: 'FloatElementType',
48
48
  type: {
49
- name: 'Number'
49
+ name: 'Double'
50
50
  }
51
51
  }
52
52
  }
@@ -13,11 +13,10 @@ module Azure::CognitiveServices::ComputerVision::V2_0
13
13
  include MsRestAzure
14
14
 
15
15
  # @return [TextOperationStatusCodes] Status of the read operation.
16
- # Possible values include: 'Not Started', 'Running', 'Failed',
17
- # 'Succeeded'
16
+ # Possible values include: 'NotStarted', 'Running', 'Failed', 'Succeeded'
18
17
  attr_accessor :status
19
18
 
20
- # @return [Array<TextRecognitionResult>] A array of text recognition
19
+ # @return [Array<TextRecognitionResult>] An array of text recognition
21
20
  # result of the read operation.
22
21
  attr_accessor :recognition_results
23
22
 
@@ -13,8 +13,7 @@ module Azure::CognitiveServices::ComputerVision::V2_0
13
13
  include MsRestAzure
14
14
 
15
15
  # @return [TextOperationStatusCodes] Status of the text operation.
16
- # Possible values include: 'Not Started', 'Running', 'Failed',
17
- # 'Succeeded'
16
+ # Possible values include: 'NotStarted', 'Running', 'Failed', 'Succeeded'
18
17
  attr_accessor :status
19
18
 
20
19
  # @return [TextRecognitionResult] Text recognition result of the text
@@ -9,7 +9,7 @@ module Azure::CognitiveServices::ComputerVision::V2_0
9
9
  # Defines values for TextOperationStatusCodes
10
10
  #
11
11
  module TextOperationStatusCodes
12
- NotStarted = "Not Started"
12
+ NotStarted = "NotStarted"
13
13
  Running = "Running"
14
14
  Failed = "Failed"
15
15
  Succeeded = "Succeeded"
@@ -6,7 +6,7 @@
6
6
  module Azure::CognitiveServices::ComputerVision::V2_0
7
7
  module Models
8
8
  #
9
- # Json object representing a recognized text region
9
+ # An object representing a recognized text region
10
10
  #
11
11
  class TextRecognitionResult
12
12
 
@@ -26,8 +26,8 @@ module Azure::CognitiveServices::ComputerVision::V2_0
26
26
  attr_accessor :height
27
27
 
28
28
  # @return [TextRecognitionResultDimensionUnit] The unit used in the
29
- # Width, Height and BoundingBox. For images, the unit is "pixel". For
30
- # PDF, the unit is "inch". Possible values include: 'pixel', 'inch'
29
+ # Width, Height and BoundingBox. For images, the unit is 'pixel'. For
30
+ # PDF, the unit is 'inch'. Possible values include: 'pixel', 'inch'
31
31
  attr_accessor :unit
32
32
 
33
33
  # @return [Array<Line>] A list of recognized text lines.
@@ -6,13 +6,13 @@
6
6
  module Azure::CognitiveServices::ComputerVision::V2_0
7
7
  module Models
8
8
  #
9
- # Json object representing a recognized word.
9
+ # An object representing a recognized word.
10
10
  #
11
11
  class Word
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [Array<Integer>] Bounding box of a recognized word.
15
+ # @return [Array<Float>] Bounding box of a recognized word.
16
16
  attr_accessor :bounding_box
17
17
 
18
18
  # @return [String] The text content of the word.
@@ -45,9 +45,9 @@ module Azure::CognitiveServices::ComputerVision::V2_0
45
45
  element: {
46
46
  client_side_validation: true,
47
47
  required: false,
48
- serialized_name: 'NumberElementType',
48
+ serialized_name: 'FloatElementType',
49
49
  type: {
50
- name: 'Number'
50
+ name: 'Double'
51
51
  }
52
52
  }
53
53
  }
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module Azure::CognitiveServices::ComputerVision
6
- VERSION = '0.19.0'
6
+ VERSION = '0.20.0'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_cognitiveservices_computervision
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-13 00:00:00.000000000 Z
11
+ date: 2019-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.11.0
75
+ version: 0.11.1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.11.0
82
+ version: 0.11.1
83
83
  description: Microsoft Azure Cognitive Services Computer Vision Client Library for
84
84
  Ruby
85
85
  email: azrubyteam@microsoft.com
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  version: '0'
210
210
  requirements: []
211
211
  rubyforge_project:
212
- rubygems_version: 2.7.6
212
+ rubygems_version: 2.5.1
213
213
  signing_key:
214
214
  specification_version: 4
215
215
  summary: Official Ruby client library to consume Microsoft Azure Cognitive Services