azure_mgmt_media_services 0.6.0 → 0.7.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
2
  SHA1:
3
- metadata.gz: 7e0fed84642b8592a72e60d7df9099cb1f8e091f
4
- data.tar.gz: c93c8ad1cd375012aea10179e06cdda1ab5d29b0
3
+ metadata.gz: 93d74d15368963ad38eafaa35387d6e638e7d401
4
+ data.tar.gz: cda40bcd5e80a0c6f4f32da2fa16d70d7e46c3ba
5
5
  SHA512:
6
- metadata.gz: 641480249627f1e523de043eeb1a6db09c0f24a1e745d44faf0668e8dc29d6e26b8c133aedd4641a1ae46140e17cf8f1c0e50eb9035986208ff6bc10c8de23d5
7
- data.tar.gz: 393f4c7cc298065b3769cd7e7e57c91c5fab83c49c06bcec27fdd789193ea26be59126c64741ff0c42170f326a5e9168e8f329908f150b3fee9d5decd622d6a1
6
+ metadata.gz: cadddcaefaa1fbc7e9ac382dc7ac36ee4f2e8c538a75fac0f4a37e6cd7e8957febff3f09fc0f258d4258692b4887ecce16fbc8b4047c99277c696dc8026e2fad
7
+ data.tar.gz: 379e58f2f352d7fc32946025b60a2b97bff7b448d294645fd0ec01dba4f3c8846b777edb252e005489aa69d8bbbadab09dcfa1152d9102ba72f897bea00605db
@@ -36,6 +36,7 @@ module Azure::ARM::MediaServices
36
36
  autoload :SyncStorageKeysInput, 'generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb'
37
37
  autoload :TrackedResource, 'generated/azure_mgmt_media_services/models/tracked_resource.rb'
38
38
  autoload :MediaService, 'generated/azure_mgmt_media_services/models/media_service.rb'
39
+ autoload :ResourceType, 'generated/azure_mgmt_media_services/models/resource_type.rb'
39
40
  autoload :EntityNameUnavailabilityReason, 'generated/azure_mgmt_media_services/models/entity_name_unavailability_reason.rb'
40
41
  autoload :KeyType, 'generated/azure_mgmt_media_services/models/key_type.rb'
41
42
  end
@@ -33,8 +33,8 @@ module Azure::ARM::MediaServices
33
33
  #
34
34
  # @return [CheckNameAvailabilityOutput] operation results.
35
35
  #
36
- def check_name_availabilty(check_name_availability_input, custom_headers = nil)
37
- response = check_name_availabilty_async(check_name_availability_input, custom_headers).value!
36
+ def check_name_availability(check_name_availability_input, custom_headers = nil)
37
+ response = check_name_availability_async(check_name_availability_input, custom_headers).value!
38
38
  response.body unless response.nil?
39
39
  end
40
40
 
@@ -49,8 +49,8 @@ module Azure::ARM::MediaServices
49
49
  #
50
50
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
51
  #
52
- def check_name_availabilty_with_http_info(check_name_availability_input, custom_headers = nil)
53
- check_name_availabilty_async(check_name_availability_input, custom_headers).value!
52
+ def check_name_availability_with_http_info(check_name_availability_input, custom_headers = nil)
53
+ check_name_availability_async(check_name_availability_input, custom_headers).value!
54
54
  end
55
55
 
56
56
  #
@@ -64,7 +64,7 @@ module Azure::ARM::MediaServices
64
64
  #
65
65
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
66
  #
67
- def check_name_availabilty_async(check_name_availability_input, custom_headers = nil)
67
+ def check_name_availability_async(check_name_availability_input, custom_headers = nil)
68
68
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
69
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
70
70
  fail ArgumentError, 'check_name_availability_input is nil' if check_name_availability_input.nil?
@@ -84,31 +84,28 @@ module Azure::ARM::MediaServices
84
84
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
85
85
 
86
86
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Media/CheckNameAvailability'
87
+
88
+ request_url = @base_url || @client.base_url
89
+
87
90
  options = {
88
91
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
92
  path_params: {'subscriptionId' => @client.subscription_id},
90
93
  query_params: {'api-version' => @client.api_version},
91
94
  body: request_content,
92
- headers: request_headers.merge(custom_headers || {})
95
+ headers: request_headers.merge(custom_headers || {}),
96
+ base_url: request_url
93
97
  }
98
+ promise = @client.make_request_async(:post, path_template, options)
94
99
 
95
- request_url = @base_url || @client.base_url
96
-
97
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
98
- promise = request.run_promise do |req|
99
- @client.credentials.sign_request(req) unless @client.credentials.nil?
100
- end
101
-
102
- promise = promise.then do |http_response|
100
+ promise = promise.then do |result|
101
+ http_response = result.response
103
102
  status_code = http_response.status
104
103
  response_content = http_response.body
105
104
  unless status_code == 200
106
105
  error_model = JSON.load(response_content)
107
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
106
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
108
107
  end
109
108
 
110
- # Create Result
111
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
112
109
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
110
  # Deserialize Response
114
111
  if status_code == 200
@@ -178,30 +175,27 @@ module Azure::ARM::MediaServices
178
175
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
179
176
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
180
177
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices'
178
+
179
+ request_url = @base_url || @client.base_url
180
+
181
181
  options = {
182
182
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
183
183
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
184
184
  query_params: {'api-version' => @client.api_version},
185
- headers: request_headers.merge(custom_headers || {})
185
+ headers: request_headers.merge(custom_headers || {}),
186
+ base_url: request_url
186
187
  }
188
+ promise = @client.make_request_async(:get, path_template, options)
187
189
 
188
- request_url = @base_url || @client.base_url
189
-
190
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
191
- promise = request.run_promise do |req|
192
- @client.credentials.sign_request(req) unless @client.credentials.nil?
193
- end
194
-
195
- promise = promise.then do |http_response|
190
+ promise = promise.then do |result|
191
+ http_response = result.response
196
192
  status_code = http_response.status
197
193
  response_content = http_response.body
198
194
  unless status_code == 200
199
195
  error_model = JSON.load(response_content)
200
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
196
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
201
197
  end
202
198
 
203
- # Create Result
204
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
205
199
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
206
200
  # Deserialize Response
207
201
  if status_code == 200
@@ -275,30 +269,27 @@ module Azure::ARM::MediaServices
275
269
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
276
270
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
277
271
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}'
272
+
273
+ request_url = @base_url || @client.base_url
274
+
278
275
  options = {
279
276
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
280
277
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'mediaServiceName' => media_service_name},
281
278
  query_params: {'api-version' => @client.api_version},
282
- headers: request_headers.merge(custom_headers || {})
279
+ headers: request_headers.merge(custom_headers || {}),
280
+ base_url: request_url
283
281
  }
282
+ promise = @client.make_request_async(:get, path_template, options)
284
283
 
285
- request_url = @base_url || @client.base_url
286
-
287
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
288
- promise = request.run_promise do |req|
289
- @client.credentials.sign_request(req) unless @client.credentials.nil?
290
- end
291
-
292
- promise = promise.then do |http_response|
284
+ promise = promise.then do |result|
285
+ http_response = result.response
293
286
  status_code = http_response.status
294
287
  response_content = http_response.body
295
288
  unless status_code == 200
296
289
  error_model = JSON.load(response_content)
297
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
290
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
298
291
  end
299
292
 
300
- # Create Result
301
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
302
293
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
303
294
  # Deserialize Response
304
295
  if status_code == 200
@@ -387,31 +378,28 @@ module Azure::ARM::MediaServices
387
378
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
388
379
 
389
380
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}'
381
+
382
+ request_url = @base_url || @client.base_url
383
+
390
384
  options = {
391
385
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
392
386
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'mediaServiceName' => media_service_name},
393
387
  query_params: {'api-version' => @client.api_version},
394
388
  body: request_content,
395
- headers: request_headers.merge(custom_headers || {})
389
+ headers: request_headers.merge(custom_headers || {}),
390
+ base_url: request_url
396
391
  }
392
+ promise = @client.make_request_async(:put, path_template, options)
397
393
 
398
- request_url = @base_url || @client.base_url
399
-
400
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
401
- promise = request.run_promise do |req|
402
- @client.credentials.sign_request(req) unless @client.credentials.nil?
403
- end
404
-
405
- promise = promise.then do |http_response|
394
+ promise = promise.then do |result|
395
+ http_response = result.response
406
396
  status_code = http_response.status
407
397
  response_content = http_response.body
408
398
  unless status_code == 200 || status_code == 201
409
399
  error_model = JSON.load(response_content)
410
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
400
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
411
401
  end
412
402
 
413
- # Create Result
414
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
415
403
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
416
404
  # Deserialize Response
417
405
  if status_code == 200
@@ -494,30 +482,27 @@ module Azure::ARM::MediaServices
494
482
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
495
483
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
496
484
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}'
485
+
486
+ request_url = @base_url || @client.base_url
487
+
497
488
  options = {
498
489
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
499
490
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'mediaServiceName' => media_service_name},
500
491
  query_params: {'api-version' => @client.api_version},
501
- headers: request_headers.merge(custom_headers || {})
492
+ headers: request_headers.merge(custom_headers || {}),
493
+ base_url: request_url
502
494
  }
495
+ promise = @client.make_request_async(:delete, path_template, options)
503
496
 
504
- request_url = @base_url || @client.base_url
505
-
506
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
507
- promise = request.run_promise do |req|
508
- @client.credentials.sign_request(req) unless @client.credentials.nil?
509
- end
510
-
511
- promise = promise.then do |http_response|
497
+ promise = promise.then do |result|
498
+ http_response = result.response
512
499
  status_code = http_response.status
513
500
  response_content = http_response.body
514
501
  unless status_code == 200
515
502
  error_model = JSON.load(response_content)
516
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
503
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
517
504
  end
518
505
 
519
- # Create Result
520
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
521
506
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
522
507
 
523
508
  result
@@ -596,31 +581,28 @@ module Azure::ARM::MediaServices
596
581
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
597
582
 
598
583
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}'
584
+
585
+ request_url = @base_url || @client.base_url
586
+
599
587
  options = {
600
588
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
601
589
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'mediaServiceName' => media_service_name},
602
590
  query_params: {'api-version' => @client.api_version},
603
591
  body: request_content,
604
- headers: request_headers.merge(custom_headers || {})
592
+ headers: request_headers.merge(custom_headers || {}),
593
+ base_url: request_url
605
594
  }
595
+ promise = @client.make_request_async(:patch, path_template, options)
606
596
 
607
- request_url = @base_url || @client.base_url
608
-
609
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
610
- promise = request.run_promise do |req|
611
- @client.credentials.sign_request(req) unless @client.credentials.nil?
612
- end
613
-
614
- promise = promise.then do |http_response|
597
+ promise = promise.then do |result|
598
+ http_response = result.response
615
599
  status_code = http_response.status
616
600
  response_content = http_response.body
617
601
  unless status_code == 200
618
602
  error_model = JSON.load(response_content)
619
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
603
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
620
604
  end
621
605
 
622
- # Create Result
623
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
624
606
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
625
607
  # Deserialize Response
626
608
  if status_code == 200
@@ -709,31 +691,28 @@ module Azure::ARM::MediaServices
709
691
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
710
692
 
711
693
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/regenerateKey'
694
+
695
+ request_url = @base_url || @client.base_url
696
+
712
697
  options = {
713
698
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
714
699
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'mediaServiceName' => media_service_name},
715
700
  query_params: {'api-version' => @client.api_version},
716
701
  body: request_content,
717
- headers: request_headers.merge(custom_headers || {})
702
+ headers: request_headers.merge(custom_headers || {}),
703
+ base_url: request_url
718
704
  }
705
+ promise = @client.make_request_async(:post, path_template, options)
719
706
 
720
- request_url = @base_url || @client.base_url
721
-
722
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
723
- promise = request.run_promise do |req|
724
- @client.credentials.sign_request(req) unless @client.credentials.nil?
725
- end
726
-
727
- promise = promise.then do |http_response|
707
+ promise = promise.then do |result|
708
+ http_response = result.response
728
709
  status_code = http_response.status
729
710
  response_content = http_response.body
730
711
  unless status_code == 200 || status_code == 202
731
712
  error_model = JSON.load(response_content)
732
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
713
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
733
714
  end
734
715
 
735
- # Create Result
736
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
737
716
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
738
717
  # Deserialize Response
739
718
  if status_code == 200
@@ -807,30 +786,27 @@ module Azure::ARM::MediaServices
807
786
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
808
787
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
809
788
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/listKeys'
789
+
790
+ request_url = @base_url || @client.base_url
791
+
810
792
  options = {
811
793
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
812
794
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'mediaServiceName' => media_service_name},
813
795
  query_params: {'api-version' => @client.api_version},
814
- headers: request_headers.merge(custom_headers || {})
796
+ headers: request_headers.merge(custom_headers || {}),
797
+ base_url: request_url
815
798
  }
799
+ promise = @client.make_request_async(:post, path_template, options)
816
800
 
817
- request_url = @base_url || @client.base_url
818
-
819
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
820
- promise = request.run_promise do |req|
821
- @client.credentials.sign_request(req) unless @client.credentials.nil?
822
- end
823
-
824
- promise = promise.then do |http_response|
801
+ promise = promise.then do |result|
802
+ http_response = result.response
825
803
  status_code = http_response.status
826
804
  response_content = http_response.body
827
805
  unless status_code == 200 || status_code == 202
828
806
  error_model = JSON.load(response_content)
829
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
807
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
830
808
  end
831
809
 
832
- # Create Result
833
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
834
810
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
835
811
  # Deserialize Response
836
812
  if status_code == 200
@@ -919,31 +895,28 @@ module Azure::ARM::MediaServices
919
895
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
920
896
 
921
897
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/syncStorageKeys'
898
+
899
+ request_url = @base_url || @client.base_url
900
+
922
901
  options = {
923
902
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
924
903
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'mediaServiceName' => media_service_name},
925
904
  query_params: {'api-version' => @client.api_version},
926
905
  body: request_content,
927
- headers: request_headers.merge(custom_headers || {})
906
+ headers: request_headers.merge(custom_headers || {}),
907
+ base_url: request_url
928
908
  }
909
+ promise = @client.make_request_async(:post, path_template, options)
929
910
 
930
- request_url = @base_url || @client.base_url
931
-
932
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
933
- promise = request.run_promise do |req|
934
- @client.credentials.sign_request(req) unless @client.credentials.nil?
935
- end
936
-
937
- promise = promise.then do |http_response|
911
+ promise = promise.then do |result|
912
+ http_response = result.response
938
913
  status_code = http_response.status
939
914
  response_content = http_response.body
940
915
  unless status_code == 200 || status_code == 202
941
916
  error_model = JSON.load(response_content)
942
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
917
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
943
918
  end
944
919
 
945
- # Create Result
946
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
947
920
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
948
921
  # Deserialize Response
949
922
  if status_code == 200
@@ -35,10 +35,6 @@ module Azure::ARM::MediaServices
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 [MediaServiceOperations] media_service_operations
43
39
  attr_reader :media_service_operations
44
40
 
@@ -63,5 +59,60 @@ module Azure::ARM::MediaServices
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
@@ -16,7 +16,8 @@ module Azure::ARM::MediaServices
16
16
  # unique.
17
17
  attr_accessor :name
18
18
 
19
- # @return [String] Specifies the type of the resource.
19
+ # @return [String] Specifies the type of the resource. Default value:
20
+ # 'mediaservices' .
20
21
  attr_accessor :type
21
22
 
22
23
 
@@ -33,7 +34,7 @@ module Azure::ARM::MediaServices
33
34
  class_name: 'CheckNameAvailabilityInput',
34
35
  model_properties: {
35
36
  name: {
36
- required: false,
37
+ required: true,
37
38
  serialized_name: 'name',
38
39
  constraints: {
39
40
  MaxLength: 24,
@@ -45,8 +46,10 @@ module Azure::ARM::MediaServices
45
46
  }
46
47
  },
47
48
  type: {
48
- required: false,
49
+ required: true,
50
+ is_constant: true,
49
51
  serialized_name: 'type',
52
+ default_value: 'mediaservices',
50
53
  type: {
51
54
  name: 'String'
52
55
  }
@@ -39,14 +39,14 @@ module Azure::ARM::MediaServices
39
39
  model_properties: {
40
40
  name_available: {
41
41
  required: false,
42
- serialized_name: 'nameAvailable',
42
+ serialized_name: 'NameAvailable',
43
43
  type: {
44
44
  name: 'Boolean'
45
45
  }
46
46
  },
47
47
  reason: {
48
48
  required: false,
49
- serialized_name: 'reason',
49
+ serialized_name: 'Reason',
50
50
  type: {
51
51
  name: 'Enum',
52
52
  module: 'EntityNameUnavailabilityReason'
@@ -54,7 +54,7 @@ module Azure::ARM::MediaServices
54
54
  },
55
55
  message: {
56
56
  required: false,
57
- serialized_name: 'message',
57
+ serialized_name: 'Message',
58
58
  type: {
59
59
  name: 'String'
60
60
  }
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::MediaServices
7
+ module Models
8
+ #
9
+ # Defines values for ResourceType
10
+ #
11
+ module ResourceType
12
+ Mediaservices = "mediaservices"
13
+ end
14
+ end
15
+ end
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::MediaServices
7
- VERSION = '0.6.0'
7
+ VERSION = '0.7.0'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_media_services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.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-09-15 00:00:00.000000000 Z
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.5.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.5.0
82
+ version: 0.6.0
83
83
  description: Microsoft Azure Media Services Management Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -101,6 +101,7 @@ files:
101
101
  - lib/generated/azure_mgmt_media_services/models/media_service_collection.rb
102
102
  - lib/generated/azure_mgmt_media_services/models/regenerate_key_input.rb
103
103
  - lib/generated/azure_mgmt_media_services/models/regenerate_key_output.rb
104
+ - lib/generated/azure_mgmt_media_services/models/resource_type.rb
104
105
  - lib/generated/azure_mgmt_media_services/models/service_keys.rb
105
106
  - lib/generated/azure_mgmt_media_services/models/storage_account.rb
106
107
  - lib/generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb
@@ -119,7 +120,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
120
  requirements:
120
121
  - - ">="
121
122
  - !ruby/object:Gem::Version
122
- version: 1.9.3
123
+ version: 2.0.0
123
124
  required_rubygems_version: !ruby/object:Gem::Requirement
124
125
  requirements:
125
126
  - - ">="