azure_mgmt_cognitive_services 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc619f24f0dba8af70b76e22a87cb4606c40cb50
|
|
4
|
+
data.tar.gz: cbf87aa660e2a5058fb9a59a50ae26aad85fceca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ac3b838fe5ece9fe1c55caeff4bb18d31edbf1046c08f13d5d2eceea0a3b382dbf89daf83cff1ad82f7fddcad1320c872143682fbe832abadb24f2ea2ee2bf3
|
|
7
|
+
data.tar.gz: c76b1570df08b18cee2b37609de391a8c071f6d3790f954d16fca61f0369fdb6c0b39c69b31ee537da0fa11c914b1510aee8aa7809861dbd27b65681005a484f
|
|
@@ -107,31 +107,28 @@ module Azure::ARM::CognitiveServices
|
|
|
107
107
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
108
108
|
|
|
109
109
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'
|
|
110
|
+
|
|
111
|
+
request_url = @base_url || @client.base_url
|
|
112
|
+
|
|
110
113
|
options = {
|
|
111
114
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
112
115
|
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
|
113
116
|
query_params: {'api-version' => @client.api_version},
|
|
114
117
|
body: request_content,
|
|
115
|
-
headers: request_headers.merge(custom_headers || {})
|
|
118
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
119
|
+
base_url: request_url
|
|
116
120
|
}
|
|
121
|
+
promise = @client.make_request_async(:put, path_template, options)
|
|
117
122
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
|
121
|
-
promise = request.run_promise do |req|
|
|
122
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
promise = promise.then do |http_response|
|
|
123
|
+
promise = promise.then do |result|
|
|
124
|
+
http_response = result.response
|
|
126
125
|
status_code = http_response.status
|
|
127
126
|
response_content = http_response.body
|
|
128
127
|
unless status_code == 200 || status_code == 201
|
|
129
128
|
error_model = JSON.load(response_content)
|
|
130
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
|
129
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
131
130
|
end
|
|
132
131
|
|
|
133
|
-
# Create Result
|
|
134
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
135
132
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
136
133
|
# Deserialize Response
|
|
137
134
|
if status_code == 200
|
|
@@ -255,31 +252,28 @@ module Azure::ARM::CognitiveServices
|
|
|
255
252
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
256
253
|
|
|
257
254
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'
|
|
255
|
+
|
|
256
|
+
request_url = @base_url || @client.base_url
|
|
257
|
+
|
|
258
258
|
options = {
|
|
259
259
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
260
260
|
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
|
261
261
|
query_params: {'api-version' => @client.api_version},
|
|
262
262
|
body: request_content,
|
|
263
|
-
headers: request_headers.merge(custom_headers || {})
|
|
263
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
264
|
+
base_url: request_url
|
|
264
265
|
}
|
|
266
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
|
265
267
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
|
269
|
-
promise = request.run_promise do |req|
|
|
270
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
271
|
-
end
|
|
272
|
-
|
|
273
|
-
promise = promise.then do |http_response|
|
|
268
|
+
promise = promise.then do |result|
|
|
269
|
+
http_response = result.response
|
|
274
270
|
status_code = http_response.status
|
|
275
271
|
response_content = http_response.body
|
|
276
272
|
unless status_code == 200
|
|
277
273
|
error_model = JSON.load(response_content)
|
|
278
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
|
274
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
279
275
|
end
|
|
280
276
|
|
|
281
|
-
# Create Result
|
|
282
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
283
277
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
284
278
|
# Deserialize Response
|
|
285
279
|
if status_code == 200
|
|
@@ -361,30 +355,27 @@ module Azure::ARM::CognitiveServices
|
|
|
361
355
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
362
356
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
363
357
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'
|
|
358
|
+
|
|
359
|
+
request_url = @base_url || @client.base_url
|
|
360
|
+
|
|
364
361
|
options = {
|
|
365
362
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
366
363
|
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
|
367
364
|
query_params: {'api-version' => @client.api_version},
|
|
368
|
-
headers: request_headers.merge(custom_headers || {})
|
|
365
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
366
|
+
base_url: request_url
|
|
369
367
|
}
|
|
368
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
|
370
369
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
|
374
|
-
promise = request.run_promise do |req|
|
|
375
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
376
|
-
end
|
|
377
|
-
|
|
378
|
-
promise = promise.then do |http_response|
|
|
370
|
+
promise = promise.then do |result|
|
|
371
|
+
http_response = result.response
|
|
379
372
|
status_code = http_response.status
|
|
380
373
|
response_content = http_response.body
|
|
381
374
|
unless status_code == 200 || status_code == 204
|
|
382
375
|
error_model = JSON.load(response_content)
|
|
383
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
|
376
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
384
377
|
end
|
|
385
378
|
|
|
386
|
-
# Create Result
|
|
387
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
388
379
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
389
380
|
|
|
390
381
|
result
|
|
@@ -457,30 +448,27 @@ module Azure::ARM::CognitiveServices
|
|
|
457
448
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
458
449
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
459
450
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'
|
|
451
|
+
|
|
452
|
+
request_url = @base_url || @client.base_url
|
|
453
|
+
|
|
460
454
|
options = {
|
|
461
455
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
462
456
|
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
|
463
457
|
query_params: {'api-version' => @client.api_version},
|
|
464
|
-
headers: request_headers.merge(custom_headers || {})
|
|
458
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
459
|
+
base_url: request_url
|
|
465
460
|
}
|
|
461
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
466
462
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
|
470
|
-
promise = request.run_promise do |req|
|
|
471
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
472
|
-
end
|
|
473
|
-
|
|
474
|
-
promise = promise.then do |http_response|
|
|
463
|
+
promise = promise.then do |result|
|
|
464
|
+
http_response = result.response
|
|
475
465
|
status_code = http_response.status
|
|
476
466
|
response_content = http_response.body
|
|
477
467
|
unless status_code == 200
|
|
478
468
|
error_model = JSON.load(response_content)
|
|
479
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
|
469
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
480
470
|
end
|
|
481
471
|
|
|
482
|
-
# Create Result
|
|
483
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
484
472
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
485
473
|
# Deserialize Response
|
|
486
474
|
if status_code == 200
|
|
@@ -550,30 +538,27 @@ module Azure::ARM::CognitiveServices
|
|
|
550
538
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
551
539
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
552
540
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts'
|
|
541
|
+
|
|
542
|
+
request_url = @base_url || @client.base_url
|
|
543
|
+
|
|
553
544
|
options = {
|
|
554
545
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
555
546
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
|
556
547
|
query_params: {'api-version' => @client.api_version},
|
|
557
|
-
headers: request_headers.merge(custom_headers || {})
|
|
548
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
549
|
+
base_url: request_url
|
|
558
550
|
}
|
|
551
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
559
552
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
|
563
|
-
promise = request.run_promise do |req|
|
|
564
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
565
|
-
end
|
|
566
|
-
|
|
567
|
-
promise = promise.then do |http_response|
|
|
553
|
+
promise = promise.then do |result|
|
|
554
|
+
http_response = result.response
|
|
568
555
|
status_code = http_response.status
|
|
569
556
|
response_content = http_response.body
|
|
570
557
|
unless status_code == 200
|
|
571
558
|
error_model = JSON.load(response_content)
|
|
572
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
|
559
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
573
560
|
end
|
|
574
561
|
|
|
575
|
-
# Create Result
|
|
576
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
577
562
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
578
563
|
# Deserialize Response
|
|
579
564
|
if status_code == 200
|
|
@@ -636,30 +621,27 @@ module Azure::ARM::CognitiveServices
|
|
|
636
621
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
637
622
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
638
623
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts'
|
|
624
|
+
|
|
625
|
+
request_url = @base_url || @client.base_url
|
|
626
|
+
|
|
639
627
|
options = {
|
|
640
628
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
641
629
|
path_params: {'subscriptionId' => @client.subscription_id},
|
|
642
630
|
query_params: {'api-version' => @client.api_version},
|
|
643
|
-
headers: request_headers.merge(custom_headers || {})
|
|
631
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
632
|
+
base_url: request_url
|
|
644
633
|
}
|
|
634
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
645
635
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
|
649
|
-
promise = request.run_promise do |req|
|
|
650
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
651
|
-
end
|
|
652
|
-
|
|
653
|
-
promise = promise.then do |http_response|
|
|
636
|
+
promise = promise.then do |result|
|
|
637
|
+
http_response = result.response
|
|
654
638
|
status_code = http_response.status
|
|
655
639
|
response_content = http_response.body
|
|
656
640
|
unless status_code == 200
|
|
657
641
|
error_model = JSON.load(response_content)
|
|
658
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
|
642
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
659
643
|
end
|
|
660
644
|
|
|
661
|
-
# Create Result
|
|
662
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
663
645
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
664
646
|
# Deserialize Response
|
|
665
647
|
if status_code == 200
|
|
@@ -742,30 +724,27 @@ module Azure::ARM::CognitiveServices
|
|
|
742
724
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
743
725
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
744
726
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys'
|
|
727
|
+
|
|
728
|
+
request_url = @base_url || @client.base_url
|
|
729
|
+
|
|
745
730
|
options = {
|
|
746
731
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
747
732
|
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
|
748
733
|
query_params: {'api-version' => @client.api_version},
|
|
749
|
-
headers: request_headers.merge(custom_headers || {})
|
|
734
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
735
|
+
base_url: request_url
|
|
750
736
|
}
|
|
737
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
751
738
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
|
755
|
-
promise = request.run_promise do |req|
|
|
756
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
757
|
-
end
|
|
758
|
-
|
|
759
|
-
promise = promise.then do |http_response|
|
|
739
|
+
promise = promise.then do |result|
|
|
740
|
+
http_response = result.response
|
|
760
741
|
status_code = http_response.status
|
|
761
742
|
response_content = http_response.body
|
|
762
743
|
unless status_code == 200
|
|
763
744
|
error_model = JSON.load(response_content)
|
|
764
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
|
745
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
765
746
|
end
|
|
766
747
|
|
|
767
|
-
# Create Result
|
|
768
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
769
748
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
770
749
|
# Deserialize Response
|
|
771
750
|
if status_code == 200
|
|
@@ -869,31 +848,28 @@ module Azure::ARM::CognitiveServices
|
|
|
869
848
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
870
849
|
|
|
871
850
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey'
|
|
851
|
+
|
|
852
|
+
request_url = @base_url || @client.base_url
|
|
853
|
+
|
|
872
854
|
options = {
|
|
873
855
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
874
856
|
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
|
875
857
|
query_params: {'api-version' => @client.api_version},
|
|
876
858
|
body: request_content,
|
|
877
|
-
headers: request_headers.merge(custom_headers || {})
|
|
859
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
860
|
+
base_url: request_url
|
|
878
861
|
}
|
|
862
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
879
863
|
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
|
883
|
-
promise = request.run_promise do |req|
|
|
884
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
885
|
-
end
|
|
886
|
-
|
|
887
|
-
promise = promise.then do |http_response|
|
|
864
|
+
promise = promise.then do |result|
|
|
865
|
+
http_response = result.response
|
|
888
866
|
status_code = http_response.status
|
|
889
867
|
response_content = http_response.body
|
|
890
868
|
unless status_code == 200
|
|
891
869
|
error_model = JSON.load(response_content)
|
|
892
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
|
870
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
893
871
|
end
|
|
894
872
|
|
|
895
|
-
# Create Result
|
|
896
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
897
873
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
898
874
|
# Deserialize Response
|
|
899
875
|
if status_code == 200
|
|
@@ -976,30 +952,27 @@ module Azure::ARM::CognitiveServices
|
|
|
976
952
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
977
953
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
978
954
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus'
|
|
955
|
+
|
|
956
|
+
request_url = @base_url || @client.base_url
|
|
957
|
+
|
|
979
958
|
options = {
|
|
980
959
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
981
960
|
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
|
982
961
|
query_params: {'api-version' => @client.api_version},
|
|
983
|
-
headers: request_headers.merge(custom_headers || {})
|
|
962
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
963
|
+
base_url: request_url
|
|
984
964
|
}
|
|
965
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
985
966
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
|
989
|
-
promise = request.run_promise do |req|
|
|
990
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
991
|
-
end
|
|
992
|
-
|
|
993
|
-
promise = promise.then do |http_response|
|
|
967
|
+
promise = promise.then do |result|
|
|
968
|
+
http_response = result.response
|
|
994
969
|
status_code = http_response.status
|
|
995
970
|
response_content = http_response.body
|
|
996
971
|
unless status_code == 200
|
|
997
972
|
error_model = JSON.load(response_content)
|
|
998
|
-
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
|
973
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
999
974
|
end
|
|
1000
975
|
|
|
1001
|
-
# Create Result
|
|
1002
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
1003
976
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
1004
977
|
# Deserialize Response
|
|
1005
978
|
if status_code == 200
|
|
@@ -35,10 +35,6 @@ module Azure::ARM::CognitiveServices
|
|
|
35
35
|
# is generated and included in each request. Default is true.
|
|
36
36
|
attr_accessor :generate_client_request_id
|
|
37
37
|
|
|
38
|
-
# @return Subscription credentials which uniquely identify client
|
|
39
|
-
# subscription.
|
|
40
|
-
attr_accessor :credentials
|
|
41
|
-
|
|
42
38
|
# @return [CognitiveServicesAccounts] cognitive_services_accounts
|
|
43
39
|
attr_reader :cognitive_services_accounts
|
|
44
40
|
|
|
@@ -63,5 +59,60 @@ module Azure::ARM::CognitiveServices
|
|
|
63
59
|
@generate_client_request_id = true
|
|
64
60
|
end
|
|
65
61
|
|
|
62
|
+
#
|
|
63
|
+
# Makes a request and returns the body of the response.
|
|
64
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
|
65
|
+
# @param path [String] the path, relative to {base_url}.
|
|
66
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
|
67
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
|
68
|
+
# Example:
|
|
69
|
+
#
|
|
70
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
|
71
|
+
# path = "/path"
|
|
72
|
+
# options = {
|
|
73
|
+
# body: request_content,
|
|
74
|
+
# query_params: {'api-version' => '2016-02-01'}
|
|
75
|
+
# }
|
|
76
|
+
# result = @client.make_request(:put, path, options)
|
|
77
|
+
#
|
|
78
|
+
def make_request(method, path, options = {})
|
|
79
|
+
result = make_request_with_http_info(method, path, options)
|
|
80
|
+
result.body unless result.nil?
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
#
|
|
84
|
+
# Makes a request and returns the operation response.
|
|
85
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
|
86
|
+
# @param path [String] the path, relative to {base_url}.
|
|
87
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
|
88
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
|
89
|
+
#
|
|
90
|
+
def make_request_with_http_info(method, path, options = {})
|
|
91
|
+
result = make_request_async(method, path, options).value!
|
|
92
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
|
93
|
+
result
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
#
|
|
97
|
+
# Makes a request asynchronously.
|
|
98
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
|
99
|
+
# @param path [String] the path, relative to {base_url}.
|
|
100
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
|
101
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
102
|
+
#
|
|
103
|
+
def make_request_async(method, path, options = {})
|
|
104
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
|
105
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
|
106
|
+
|
|
107
|
+
request_url = options[:base_url] || @base_url
|
|
108
|
+
|
|
109
|
+
request_headers = @request_headers
|
|
110
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
|
111
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
|
112
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
|
113
|
+
|
|
114
|
+
super(request_url, method, path, options)
|
|
115
|
+
end
|
|
116
|
+
|
|
66
117
|
end
|
|
67
118
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: azure_mgmt_cognitive_services
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.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: 2016-
|
|
11
|
+
date: 2016-10-14 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.
|
|
75
|
+
version: 0.6.0
|
|
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.
|
|
82
|
+
version: 0.6.0
|
|
83
83
|
description: Microsoft Azure Cognitive Services Management Client Library for Ruby
|
|
84
84
|
email: azrubyteam@microsoft.com
|
|
85
85
|
executables: []
|
|
@@ -121,7 +121,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
121
121
|
requirements:
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
124
|
+
version: 2.0.0
|
|
125
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
requirements:
|
|
127
127
|
- - ">="
|