azure_mgmt_iot_hub 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -104,6 +104,9 @@ module Azure::IotHub::Mgmt::V2017_01_19
104
104
  fail ArgumentError, 'path is nil' if path.nil?
105
105
 
106
106
  request_url = options[:base_url] || @base_url
107
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
108
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
109
+ end
107
110
 
108
111
  request_headers = @request_headers
109
112
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
@@ -120,7 +123,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
120
123
  #
121
124
  def add_telemetry
122
125
  sdk_information = 'azure_mgmt_iot_hub'
123
- sdk_information = "#{sdk_information}/0.15.2"
126
+ sdk_information = "#{sdk_information}/0.16.0"
124
127
  add_user_agent_information(sdk_information)
125
128
  end
126
129
  end
@@ -34,8 +34,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
34
34
  #
35
35
  # @return [IotHubDescription] operation results.
36
36
  #
37
- def get(resource_group_name, resource_name, custom_headers = nil)
38
- response = get_async(resource_group_name, resource_name, custom_headers).value!
37
+ def get(resource_group_name, resource_name, custom_headers:nil)
38
+ response = get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
39
39
  response.body unless response.nil?
40
40
  end
41
41
 
@@ -52,8 +52,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
52
52
  #
53
53
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
54
  #
55
- def get_with_http_info(resource_group_name, resource_name, custom_headers = nil)
56
- get_async(resource_group_name, resource_name, custom_headers).value!
55
+ def get_with_http_info(resource_group_name, resource_name, custom_headers:nil)
56
+ get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
57
57
  end
58
58
 
59
59
  #
@@ -69,7 +69,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
69
69
  #
70
70
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
71
  #
72
- def get_async(resource_group_name, resource_name, custom_headers = nil)
72
+ def get_async(resource_group_name, resource_name, custom_headers:nil)
73
73
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
74
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
75
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -77,6 +77,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
77
77
 
78
78
 
79
79
  request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
80
81
 
81
82
  # Set Headers
82
83
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -138,8 +139,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
138
139
  #
139
140
  # @return [IotHubDescription] operation results.
140
141
  #
141
- def create_or_update(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
142
- response = create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value!
142
+ def create_or_update(resource_group_name, resource_name, iot_hub_description, custom_headers:nil)
143
+ response = create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers:custom_headers).value!
143
144
  response.body unless response.nil?
144
145
  end
145
146
 
@@ -155,9 +156,9 @@ module Azure::IotHub::Mgmt::V2017_01_19
155
156
  # @return [Concurrent::Promise] promise which provides async access to http
156
157
  # response.
157
158
  #
158
- def create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
159
+ def create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers:nil)
159
160
  # Send request
160
- promise = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers)
161
+ promise = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers:custom_headers)
161
162
 
162
163
  promise = promise.then do |response|
163
164
  # Defining deserialization method.
@@ -186,8 +187,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
186
187
  #
187
188
  # @return [Object] operation results.
188
189
  #
189
- def delete(resource_group_name, resource_name, custom_headers = nil)
190
- response = delete_async(resource_group_name, resource_name, custom_headers).value!
190
+ def delete(resource_group_name, resource_name, custom_headers:nil)
191
+ response = delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
191
192
  response.body unless response.nil?
192
193
  end
193
194
 
@@ -201,9 +202,9 @@ module Azure::IotHub::Mgmt::V2017_01_19
201
202
  # @return [Concurrent::Promise] promise which provides async access to http
202
203
  # response.
203
204
  #
204
- def delete_async(resource_group_name, resource_name, custom_headers = nil)
205
+ def delete_async(resource_group_name, resource_name, custom_headers:nil)
205
206
  # Send request
206
- promise = begin_delete_async(resource_group_name, resource_name, custom_headers)
207
+ promise = begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers)
207
208
 
208
209
  promise = promise.then do |response|
209
210
  # Defining deserialization method.
@@ -236,8 +237,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
236
237
  #
237
238
  # @return [Array<IotHubDescription>] operation results.
238
239
  #
239
- def list_by_subscription(custom_headers = nil)
240
- first_page = list_by_subscription_as_lazy(custom_headers)
240
+ def list_by_subscription(custom_headers:nil)
241
+ first_page = list_by_subscription_as_lazy(custom_headers:custom_headers)
241
242
  first_page.get_all_items
242
243
  end
243
244
 
@@ -251,8 +252,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
251
252
  #
252
253
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
253
254
  #
254
- def list_by_subscription_with_http_info(custom_headers = nil)
255
- list_by_subscription_async(custom_headers).value!
255
+ def list_by_subscription_with_http_info(custom_headers:nil)
256
+ list_by_subscription_async(custom_headers:custom_headers).value!
256
257
  end
257
258
 
258
259
  #
@@ -265,12 +266,13 @@ module Azure::IotHub::Mgmt::V2017_01_19
265
266
  #
266
267
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
267
268
  #
268
- def list_by_subscription_async(custom_headers = nil)
269
+ def list_by_subscription_async(custom_headers:nil)
269
270
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
270
271
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
271
272
 
272
273
 
273
274
  request_headers = {}
275
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
274
276
 
275
277
  # Set Headers
276
278
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -327,8 +329,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
327
329
  #
328
330
  # @return [Array<IotHubDescription>] operation results.
329
331
  #
330
- def list_by_resource_group(resource_group_name, custom_headers = nil)
331
- first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
332
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
333
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
332
334
  first_page.get_all_items
333
335
  end
334
336
 
@@ -344,8 +346,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
344
346
  #
345
347
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
346
348
  #
347
- def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
348
- list_by_resource_group_async(resource_group_name, custom_headers).value!
349
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
350
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
349
351
  end
350
352
 
351
353
  #
@@ -360,13 +362,14 @@ module Azure::IotHub::Mgmt::V2017_01_19
360
362
  #
361
363
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
362
364
  #
363
- def list_by_resource_group_async(resource_group_name, custom_headers = nil)
365
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
364
366
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
365
367
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
366
368
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
367
369
 
368
370
 
369
371
  request_headers = {}
372
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
370
373
 
371
374
  # Set Headers
372
375
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -424,8 +427,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
424
427
  #
425
428
  # @return [RegistryStatistics] operation results.
426
429
  #
427
- def get_stats(resource_group_name, resource_name, custom_headers = nil)
428
- response = get_stats_async(resource_group_name, resource_name, custom_headers).value!
430
+ def get_stats(resource_group_name, resource_name, custom_headers:nil)
431
+ response = get_stats_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
429
432
  response.body unless response.nil?
430
433
  end
431
434
 
@@ -442,8 +445,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
442
445
  #
443
446
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
444
447
  #
445
- def get_stats_with_http_info(resource_group_name, resource_name, custom_headers = nil)
446
- get_stats_async(resource_group_name, resource_name, custom_headers).value!
448
+ def get_stats_with_http_info(resource_group_name, resource_name, custom_headers:nil)
449
+ get_stats_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
447
450
  end
448
451
 
449
452
  #
@@ -459,7 +462,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
459
462
  #
460
463
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
461
464
  #
462
- def get_stats_async(resource_group_name, resource_name, custom_headers = nil)
465
+ def get_stats_async(resource_group_name, resource_name, custom_headers:nil)
463
466
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
464
467
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
465
468
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -467,6 +470,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
467
470
 
468
471
 
469
472
  request_headers = {}
473
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
470
474
 
471
475
  # Set Headers
472
476
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -524,8 +528,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
524
528
  #
525
529
  # @return [Array<IotHubSkuDescription>] operation results.
526
530
  #
527
- def get_valid_skus(resource_group_name, resource_name, custom_headers = nil)
528
- first_page = get_valid_skus_as_lazy(resource_group_name, resource_name, custom_headers)
531
+ def get_valid_skus(resource_group_name, resource_name, custom_headers:nil)
532
+ first_page = get_valid_skus_as_lazy(resource_group_name, resource_name, custom_headers:custom_headers)
529
533
  first_page.get_all_items
530
534
  end
531
535
 
@@ -542,8 +546,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
542
546
  #
543
547
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
544
548
  #
545
- def get_valid_skus_with_http_info(resource_group_name, resource_name, custom_headers = nil)
546
- get_valid_skus_async(resource_group_name, resource_name, custom_headers).value!
549
+ def get_valid_skus_with_http_info(resource_group_name, resource_name, custom_headers:nil)
550
+ get_valid_skus_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
547
551
  end
548
552
 
549
553
  #
@@ -559,7 +563,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
559
563
  #
560
564
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
561
565
  #
562
- def get_valid_skus_async(resource_group_name, resource_name, custom_headers = nil)
566
+ def get_valid_skus_async(resource_group_name, resource_name, custom_headers:nil)
563
567
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
564
568
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
565
569
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -567,6 +571,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
567
571
 
568
572
 
569
573
  request_headers = {}
574
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
570
575
 
571
576
  # Set Headers
572
577
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -628,8 +633,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
628
633
  #
629
634
  # @return [Array<String>] operation results.
630
635
  #
631
- def list_event_hub_consumer_groups(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers = nil)
632
- first_page = list_event_hub_consumer_groups_as_lazy(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers)
636
+ def list_event_hub_consumer_groups(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:nil)
637
+ first_page = list_event_hub_consumer_groups_as_lazy(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:custom_headers)
633
638
  first_page.get_all_items
634
639
  end
635
640
 
@@ -650,8 +655,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
650
655
  #
651
656
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
652
657
  #
653
- def list_event_hub_consumer_groups_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers = nil)
654
- list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers).value!
658
+ def list_event_hub_consumer_groups_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:nil)
659
+ list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:custom_headers).value!
655
660
  end
656
661
 
657
662
  #
@@ -671,7 +676,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
671
676
  #
672
677
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
673
678
  #
674
- def list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers = nil)
679
+ def list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:nil)
675
680
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
676
681
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
677
682
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -680,6 +685,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
680
685
 
681
686
 
682
687
  request_headers = {}
688
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
683
689
 
684
690
  # Set Headers
685
691
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -742,8 +748,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
742
748
  #
743
749
  # @return [EventHubConsumerGroupInfo] operation results.
744
750
  #
745
- def get_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers = nil)
746
- response = get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers).value!
751
+ def get_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
752
+ response = get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
747
753
  response.body unless response.nil?
748
754
  end
749
755
 
@@ -765,8 +771,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
765
771
  #
766
772
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
767
773
  #
768
- def get_event_hub_consumer_group_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers = nil)
769
- get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers).value!
774
+ def get_event_hub_consumer_group_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
775
+ get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
770
776
  end
771
777
 
772
778
  #
@@ -787,7 +793,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
787
793
  #
788
794
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
789
795
  #
790
- def get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers = nil)
796
+ def get_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
791
797
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
792
798
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
793
799
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -797,6 +803,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
797
803
 
798
804
 
799
805
  request_headers = {}
806
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
800
807
 
801
808
  # Set Headers
802
809
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -857,8 +864,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
857
864
  #
858
865
  # @return [EventHubConsumerGroupInfo] operation results.
859
866
  #
860
- def create_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers = nil)
861
- response = create_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers).value!
867
+ def create_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
868
+ response = create_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
862
869
  response.body unless response.nil?
863
870
  end
864
871
 
@@ -878,8 +885,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
878
885
  #
879
886
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
880
887
  #
881
- def create_event_hub_consumer_group_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers = nil)
882
- create_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers).value!
888
+ def create_event_hub_consumer_group_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
889
+ create_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
883
890
  end
884
891
 
885
892
  #
@@ -898,7 +905,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
898
905
  #
899
906
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
900
907
  #
901
- def create_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers = nil)
908
+ def create_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
902
909
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
903
910
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
904
911
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -908,6 +915,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
908
915
 
909
916
 
910
917
  request_headers = {}
918
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
911
919
 
912
920
  # Set Headers
913
921
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -967,8 +975,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
967
975
  # will be added to the HTTP request.
968
976
  #
969
977
  #
970
- def delete_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers = nil)
971
- response = delete_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers).value!
978
+ def delete_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
979
+ response = delete_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
972
980
  nil
973
981
  end
974
982
 
@@ -988,8 +996,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
988
996
  #
989
997
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
990
998
  #
991
- def delete_event_hub_consumer_group_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers = nil)
992
- delete_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers).value!
999
+ def delete_event_hub_consumer_group_with_http_info(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
1000
+ delete_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
993
1001
  end
994
1002
 
995
1003
  #
@@ -1008,7 +1016,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1008
1016
  #
1009
1017
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1010
1018
  #
1011
- def delete_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers = nil)
1019
+ def delete_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
1012
1020
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1013
1021
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1014
1022
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -1018,6 +1026,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1018
1026
 
1019
1027
 
1020
1028
  request_headers = {}
1029
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1021
1030
 
1022
1031
  # Set Headers
1023
1032
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1067,8 +1076,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1067
1076
  #
1068
1077
  # @return [Array<JobResponse>] operation results.
1069
1078
  #
1070
- def list_jobs(resource_group_name, resource_name, custom_headers = nil)
1071
- first_page = list_jobs_as_lazy(resource_group_name, resource_name, custom_headers)
1079
+ def list_jobs(resource_group_name, resource_name, custom_headers:nil)
1080
+ first_page = list_jobs_as_lazy(resource_group_name, resource_name, custom_headers:custom_headers)
1072
1081
  first_page.get_all_items
1073
1082
  end
1074
1083
 
@@ -1087,8 +1096,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1087
1096
  #
1088
1097
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1089
1098
  #
1090
- def list_jobs_with_http_info(resource_group_name, resource_name, custom_headers = nil)
1091
- list_jobs_async(resource_group_name, resource_name, custom_headers).value!
1099
+ def list_jobs_with_http_info(resource_group_name, resource_name, custom_headers:nil)
1100
+ list_jobs_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
1092
1101
  end
1093
1102
 
1094
1103
  #
@@ -1106,7 +1115,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1106
1115
  #
1107
1116
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1108
1117
  #
1109
- def list_jobs_async(resource_group_name, resource_name, custom_headers = nil)
1118
+ def list_jobs_async(resource_group_name, resource_name, custom_headers:nil)
1110
1119
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1111
1120
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1112
1121
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -1114,6 +1123,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1114
1123
 
1115
1124
 
1116
1125
  request_headers = {}
1126
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1117
1127
 
1118
1128
  # Set Headers
1119
1129
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1174,8 +1184,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1174
1184
  #
1175
1185
  # @return [JobResponse] operation results.
1176
1186
  #
1177
- def get_job(resource_group_name, resource_name, job_id, custom_headers = nil)
1178
- response = get_job_async(resource_group_name, resource_name, job_id, custom_headers).value!
1187
+ def get_job(resource_group_name, resource_name, job_id, custom_headers:nil)
1188
+ response = get_job_async(resource_group_name, resource_name, job_id, custom_headers:custom_headers).value!
1179
1189
  response.body unless response.nil?
1180
1190
  end
1181
1191
 
@@ -1195,8 +1205,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1195
1205
  #
1196
1206
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1197
1207
  #
1198
- def get_job_with_http_info(resource_group_name, resource_name, job_id, custom_headers = nil)
1199
- get_job_async(resource_group_name, resource_name, job_id, custom_headers).value!
1208
+ def get_job_with_http_info(resource_group_name, resource_name, job_id, custom_headers:nil)
1209
+ get_job_async(resource_group_name, resource_name, job_id, custom_headers:custom_headers).value!
1200
1210
  end
1201
1211
 
1202
1212
  #
@@ -1215,7 +1225,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1215
1225
  #
1216
1226
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1217
1227
  #
1218
- def get_job_async(resource_group_name, resource_name, job_id, custom_headers = nil)
1228
+ def get_job_async(resource_group_name, resource_name, job_id, custom_headers:nil)
1219
1229
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1220
1230
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1221
1231
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -1224,6 +1234,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1224
1234
 
1225
1235
 
1226
1236
  request_headers = {}
1237
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1227
1238
 
1228
1239
  # Set Headers
1229
1240
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1281,8 +1292,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1281
1292
  #
1282
1293
  # @return [Array<IotHubQuotaMetricInfo>] operation results.
1283
1294
  #
1284
- def get_quota_metrics(resource_group_name, resource_name, custom_headers = nil)
1285
- first_page = get_quota_metrics_as_lazy(resource_group_name, resource_name, custom_headers)
1295
+ def get_quota_metrics(resource_group_name, resource_name, custom_headers:nil)
1296
+ first_page = get_quota_metrics_as_lazy(resource_group_name, resource_name, custom_headers:custom_headers)
1286
1297
  first_page.get_all_items
1287
1298
  end
1288
1299
 
@@ -1299,8 +1310,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1299
1310
  #
1300
1311
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1301
1312
  #
1302
- def get_quota_metrics_with_http_info(resource_group_name, resource_name, custom_headers = nil)
1303
- get_quota_metrics_async(resource_group_name, resource_name, custom_headers).value!
1313
+ def get_quota_metrics_with_http_info(resource_group_name, resource_name, custom_headers:nil)
1314
+ get_quota_metrics_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
1304
1315
  end
1305
1316
 
1306
1317
  #
@@ -1316,7 +1327,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1316
1327
  #
1317
1328
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1318
1329
  #
1319
- def get_quota_metrics_async(resource_group_name, resource_name, custom_headers = nil)
1330
+ def get_quota_metrics_async(resource_group_name, resource_name, custom_headers:nil)
1320
1331
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1321
1332
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1322
1333
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -1324,6 +1335,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1324
1335
 
1325
1336
 
1326
1337
  request_headers = {}
1338
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1327
1339
 
1328
1340
  # Set Headers
1329
1341
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1380,8 +1392,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1380
1392
  #
1381
1393
  # @return [IotHubNameAvailabilityInfo] operation results.
1382
1394
  #
1383
- def check_name_availability(operation_inputs, custom_headers = nil)
1384
- response = check_name_availability_async(operation_inputs, custom_headers).value!
1395
+ def check_name_availability(operation_inputs, custom_headers:nil)
1396
+ response = check_name_availability_async(operation_inputs, custom_headers:custom_headers).value!
1385
1397
  response.body unless response.nil?
1386
1398
  end
1387
1399
 
@@ -1397,8 +1409,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1397
1409
  #
1398
1410
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1399
1411
  #
1400
- def check_name_availability_with_http_info(operation_inputs, custom_headers = nil)
1401
- check_name_availability_async(operation_inputs, custom_headers).value!
1412
+ def check_name_availability_with_http_info(operation_inputs, custom_headers:nil)
1413
+ check_name_availability_async(operation_inputs, custom_headers:custom_headers).value!
1402
1414
  end
1403
1415
 
1404
1416
  #
@@ -1413,20 +1425,19 @@ module Azure::IotHub::Mgmt::V2017_01_19
1413
1425
  #
1414
1426
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1415
1427
  #
1416
- def check_name_availability_async(operation_inputs, custom_headers = nil)
1428
+ def check_name_availability_async(operation_inputs, custom_headers:nil)
1417
1429
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1418
1430
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1419
1431
  fail ArgumentError, 'operation_inputs is nil' if operation_inputs.nil?
1420
1432
 
1421
1433
 
1422
1434
  request_headers = {}
1435
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1423
1436
 
1424
1437
  # Set Headers
1425
1438
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1426
1439
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1427
1440
 
1428
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1429
-
1430
1441
  # Serialize Request
1431
1442
  request_mapper = Azure::IotHub::Mgmt::V2017_01_19::Models::OperationInputs.mapper()
1432
1443
  request_content = @client.serialize(request_mapper, operation_inputs)
@@ -1488,8 +1499,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1488
1499
  #
1489
1500
  # @return [Array<SharedAccessSignatureAuthorizationRule>] operation results.
1490
1501
  #
1491
- def list_keys(resource_group_name, resource_name, custom_headers = nil)
1492
- first_page = list_keys_as_lazy(resource_group_name, resource_name, custom_headers)
1502
+ def list_keys(resource_group_name, resource_name, custom_headers:nil)
1503
+ first_page = list_keys_as_lazy(resource_group_name, resource_name, custom_headers:custom_headers)
1493
1504
  first_page.get_all_items
1494
1505
  end
1495
1506
 
@@ -1508,8 +1519,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1508
1519
  #
1509
1520
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1510
1521
  #
1511
- def list_keys_with_http_info(resource_group_name, resource_name, custom_headers = nil)
1512
- list_keys_async(resource_group_name, resource_name, custom_headers).value!
1522
+ def list_keys_with_http_info(resource_group_name, resource_name, custom_headers:nil)
1523
+ list_keys_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
1513
1524
  end
1514
1525
 
1515
1526
  #
@@ -1527,7 +1538,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1527
1538
  #
1528
1539
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1529
1540
  #
1530
- def list_keys_async(resource_group_name, resource_name, custom_headers = nil)
1541
+ def list_keys_async(resource_group_name, resource_name, custom_headers:nil)
1531
1542
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1532
1543
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1533
1544
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -1535,6 +1546,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1535
1546
 
1536
1547
 
1537
1548
  request_headers = {}
1549
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1538
1550
 
1539
1551
  # Set Headers
1540
1552
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1595,8 +1607,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1595
1607
  #
1596
1608
  # @return [SharedAccessSignatureAuthorizationRule] operation results.
1597
1609
  #
1598
- def get_keys_for_key_name(resource_group_name, resource_name, key_name, custom_headers = nil)
1599
- response = get_keys_for_key_name_async(resource_group_name, resource_name, key_name, custom_headers).value!
1610
+ def get_keys_for_key_name(resource_group_name, resource_name, key_name, custom_headers:nil)
1611
+ response = get_keys_for_key_name_async(resource_group_name, resource_name, key_name, custom_headers:custom_headers).value!
1600
1612
  response.body unless response.nil?
1601
1613
  end
1602
1614
 
@@ -1616,8 +1628,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1616
1628
  #
1617
1629
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1618
1630
  #
1619
- def get_keys_for_key_name_with_http_info(resource_group_name, resource_name, key_name, custom_headers = nil)
1620
- get_keys_for_key_name_async(resource_group_name, resource_name, key_name, custom_headers).value!
1631
+ def get_keys_for_key_name_with_http_info(resource_group_name, resource_name, key_name, custom_headers:nil)
1632
+ get_keys_for_key_name_async(resource_group_name, resource_name, key_name, custom_headers:custom_headers).value!
1621
1633
  end
1622
1634
 
1623
1635
  #
@@ -1636,7 +1648,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1636
1648
  #
1637
1649
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1638
1650
  #
1639
- def get_keys_for_key_name_async(resource_group_name, resource_name, key_name, custom_headers = nil)
1651
+ def get_keys_for_key_name_async(resource_group_name, resource_name, key_name, custom_headers:nil)
1640
1652
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1641
1653
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1642
1654
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -1645,6 +1657,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1645
1657
 
1646
1658
 
1647
1659
  request_headers = {}
1660
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1648
1661
 
1649
1662
  # Set Headers
1650
1663
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1708,8 +1721,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1708
1721
  #
1709
1722
  # @return [JobResponse] operation results.
1710
1723
  #
1711
- def export_devices(resource_group_name, resource_name, export_devices_parameters, custom_headers = nil)
1712
- response = export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers).value!
1724
+ def export_devices(resource_group_name, resource_name, export_devices_parameters, custom_headers:nil)
1725
+ response = export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers:custom_headers).value!
1713
1726
  response.body unless response.nil?
1714
1727
  end
1715
1728
 
@@ -1732,8 +1745,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1732
1745
  #
1733
1746
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1734
1747
  #
1735
- def export_devices_with_http_info(resource_group_name, resource_name, export_devices_parameters, custom_headers = nil)
1736
- export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers).value!
1748
+ def export_devices_with_http_info(resource_group_name, resource_name, export_devices_parameters, custom_headers:nil)
1749
+ export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers:custom_headers).value!
1737
1750
  end
1738
1751
 
1739
1752
  #
@@ -1755,7 +1768,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1755
1768
  #
1756
1769
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1757
1770
  #
1758
- def export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers = nil)
1771
+ def export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers:nil)
1759
1772
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1760
1773
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1761
1774
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -1764,13 +1777,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
1764
1777
 
1765
1778
 
1766
1779
  request_headers = {}
1780
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1767
1781
 
1768
1782
  # Set Headers
1769
1783
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1770
1784
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1771
1785
 
1772
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1773
-
1774
1786
  # Serialize Request
1775
1787
  request_mapper = Azure::IotHub::Mgmt::V2017_01_19::Models::ExportDevicesRequest.mapper()
1776
1788
  request_content = @client.serialize(request_mapper, export_devices_parameters)
@@ -1836,8 +1848,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1836
1848
  #
1837
1849
  # @return [JobResponse] operation results.
1838
1850
  #
1839
- def import_devices(resource_group_name, resource_name, import_devices_parameters, custom_headers = nil)
1840
- response = import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers).value!
1851
+ def import_devices(resource_group_name, resource_name, import_devices_parameters, custom_headers:nil)
1852
+ response = import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers:custom_headers).value!
1841
1853
  response.body unless response.nil?
1842
1854
  end
1843
1855
 
@@ -1860,8 +1872,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1860
1872
  #
1861
1873
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1862
1874
  #
1863
- def import_devices_with_http_info(resource_group_name, resource_name, import_devices_parameters, custom_headers = nil)
1864
- import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers).value!
1875
+ def import_devices_with_http_info(resource_group_name, resource_name, import_devices_parameters, custom_headers:nil)
1876
+ import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers:custom_headers).value!
1865
1877
  end
1866
1878
 
1867
1879
  #
@@ -1883,7 +1895,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
1883
1895
  #
1884
1896
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1885
1897
  #
1886
- def import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers = nil)
1898
+ def import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers:nil)
1887
1899
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1888
1900
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1889
1901
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -1892,13 +1904,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
1892
1904
 
1893
1905
 
1894
1906
  request_headers = {}
1907
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1895
1908
 
1896
1909
  # Set Headers
1897
1910
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1898
1911
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1899
1912
 
1900
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1901
-
1902
1913
  # Serialize Request
1903
1914
  request_mapper = Azure::IotHub::Mgmt::V2017_01_19::Models::ImportDevicesRequest.mapper()
1904
1915
  request_content = @client.serialize(request_mapper, import_devices_parameters)
@@ -1962,8 +1973,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1962
1973
  #
1963
1974
  # @return [IotHubDescription] operation results.
1964
1975
  #
1965
- def begin_create_or_update(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
1966
- response = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value!
1976
+ def begin_create_or_update(resource_group_name, resource_name, iot_hub_description, custom_headers:nil)
1977
+ response = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers:custom_headers).value!
1967
1978
  response.body unless response.nil?
1968
1979
  end
1969
1980
 
@@ -1984,8 +1995,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
1984
1995
  #
1985
1996
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1986
1997
  #
1987
- def begin_create_or_update_with_http_info(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
1988
- begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value!
1998
+ def begin_create_or_update_with_http_info(resource_group_name, resource_name, iot_hub_description, custom_headers:nil)
1999
+ begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers:custom_headers).value!
1989
2000
  end
1990
2001
 
1991
2002
  #
@@ -2005,7 +2016,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
2005
2016
  #
2006
2017
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2007
2018
  #
2008
- def begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
2019
+ def begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers:nil)
2009
2020
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2010
2021
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2011
2022
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -2014,13 +2025,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2014
2025
 
2015
2026
 
2016
2027
  request_headers = {}
2028
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2017
2029
 
2018
2030
  # Set Headers
2019
2031
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2020
2032
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2021
2033
 
2022
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
2023
-
2024
2034
  # Serialize Request
2025
2035
  request_mapper = Azure::IotHub::Mgmt::V2017_01_19::Models::IotHubDescription.mapper()
2026
2036
  request_content = @client.serialize(request_mapper, iot_hub_description)
@@ -2090,8 +2100,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2090
2100
  #
2091
2101
  # @return [Object] operation results.
2092
2102
  #
2093
- def begin_delete(resource_group_name, resource_name, custom_headers = nil)
2094
- response = begin_delete_async(resource_group_name, resource_name, custom_headers).value!
2103
+ def begin_delete(resource_group_name, resource_name, custom_headers:nil)
2104
+ response = begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
2095
2105
  response.body unless response.nil?
2096
2106
  end
2097
2107
 
@@ -2108,8 +2118,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2108
2118
  #
2109
2119
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2110
2120
  #
2111
- def begin_delete_with_http_info(resource_group_name, resource_name, custom_headers = nil)
2112
- begin_delete_async(resource_group_name, resource_name, custom_headers).value!
2121
+ def begin_delete_with_http_info(resource_group_name, resource_name, custom_headers:nil)
2122
+ begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
2113
2123
  end
2114
2124
 
2115
2125
  #
@@ -2125,7 +2135,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
2125
2135
  #
2126
2136
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2127
2137
  #
2128
- def begin_delete_async(resource_group_name, resource_name, custom_headers = nil)
2138
+ def begin_delete_async(resource_group_name, resource_name, custom_headers:nil)
2129
2139
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2130
2140
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2131
2141
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -2133,6 +2143,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
2133
2143
 
2134
2144
 
2135
2145
  request_headers = {}
2146
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2136
2147
 
2137
2148
  # Set Headers
2138
2149
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -2209,8 +2220,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2209
2220
  #
2210
2221
  # @return [IotHubDescriptionListResult] operation results.
2211
2222
  #
2212
- def list_by_subscription_next(next_page_link, custom_headers = nil)
2213
- response = list_by_subscription_next_async(next_page_link, custom_headers).value!
2223
+ def list_by_subscription_next(next_page_link, custom_headers:nil)
2224
+ response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
2214
2225
  response.body unless response.nil?
2215
2226
  end
2216
2227
 
@@ -2226,8 +2237,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2226
2237
  #
2227
2238
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2228
2239
  #
2229
- def list_by_subscription_next_with_http_info(next_page_link, custom_headers = nil)
2230
- list_by_subscription_next_async(next_page_link, custom_headers).value!
2240
+ def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
2241
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
2231
2242
  end
2232
2243
 
2233
2244
  #
@@ -2242,11 +2253,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2242
2253
  #
2243
2254
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2244
2255
  #
2245
- def list_by_subscription_next_async(next_page_link, custom_headers = nil)
2256
+ def list_by_subscription_next_async(next_page_link, custom_headers:nil)
2246
2257
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2247
2258
 
2248
2259
 
2249
2260
  request_headers = {}
2261
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2250
2262
 
2251
2263
  # Set Headers
2252
2264
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -2302,8 +2314,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2302
2314
  #
2303
2315
  # @return [IotHubDescriptionListResult] operation results.
2304
2316
  #
2305
- def list_by_resource_group_next(next_page_link, custom_headers = nil)
2306
- response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
2317
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
2318
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
2307
2319
  response.body unless response.nil?
2308
2320
  end
2309
2321
 
@@ -2319,8 +2331,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2319
2331
  #
2320
2332
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2321
2333
  #
2322
- def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
2323
- list_by_resource_group_next_async(next_page_link, custom_headers).value!
2334
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
2335
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
2324
2336
  end
2325
2337
 
2326
2338
  #
@@ -2335,11 +2347,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2335
2347
  #
2336
2348
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2337
2349
  #
2338
- def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
2350
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
2339
2351
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2340
2352
 
2341
2353
 
2342
2354
  request_headers = {}
2355
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2343
2356
 
2344
2357
  # Set Headers
2345
2358
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -2395,8 +2408,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2395
2408
  #
2396
2409
  # @return [IotHubSkuDescriptionListResult] operation results.
2397
2410
  #
2398
- def get_valid_skus_next(next_page_link, custom_headers = nil)
2399
- response = get_valid_skus_next_async(next_page_link, custom_headers).value!
2411
+ def get_valid_skus_next(next_page_link, custom_headers:nil)
2412
+ response = get_valid_skus_next_async(next_page_link, custom_headers:custom_headers).value!
2400
2413
  response.body unless response.nil?
2401
2414
  end
2402
2415
 
@@ -2412,8 +2425,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2412
2425
  #
2413
2426
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2414
2427
  #
2415
- def get_valid_skus_next_with_http_info(next_page_link, custom_headers = nil)
2416
- get_valid_skus_next_async(next_page_link, custom_headers).value!
2428
+ def get_valid_skus_next_with_http_info(next_page_link, custom_headers:nil)
2429
+ get_valid_skus_next_async(next_page_link, custom_headers:custom_headers).value!
2417
2430
  end
2418
2431
 
2419
2432
  #
@@ -2428,11 +2441,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2428
2441
  #
2429
2442
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2430
2443
  #
2431
- def get_valid_skus_next_async(next_page_link, custom_headers = nil)
2444
+ def get_valid_skus_next_async(next_page_link, custom_headers:nil)
2432
2445
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2433
2446
 
2434
2447
 
2435
2448
  request_headers = {}
2449
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2436
2450
 
2437
2451
  # Set Headers
2438
2452
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -2490,8 +2504,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2490
2504
  #
2491
2505
  # @return [EventHubConsumerGroupsListResult] operation results.
2492
2506
  #
2493
- def list_event_hub_consumer_groups_next(next_page_link, custom_headers = nil)
2494
- response = list_event_hub_consumer_groups_next_async(next_page_link, custom_headers).value!
2507
+ def list_event_hub_consumer_groups_next(next_page_link, custom_headers:nil)
2508
+ response = list_event_hub_consumer_groups_next_async(next_page_link, custom_headers:custom_headers).value!
2495
2509
  response.body unless response.nil?
2496
2510
  end
2497
2511
 
@@ -2509,8 +2523,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2509
2523
  #
2510
2524
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2511
2525
  #
2512
- def list_event_hub_consumer_groups_next_with_http_info(next_page_link, custom_headers = nil)
2513
- list_event_hub_consumer_groups_next_async(next_page_link, custom_headers).value!
2526
+ def list_event_hub_consumer_groups_next_with_http_info(next_page_link, custom_headers:nil)
2527
+ list_event_hub_consumer_groups_next_async(next_page_link, custom_headers:custom_headers).value!
2514
2528
  end
2515
2529
 
2516
2530
  #
@@ -2527,11 +2541,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2527
2541
  #
2528
2542
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2529
2543
  #
2530
- def list_event_hub_consumer_groups_next_async(next_page_link, custom_headers = nil)
2544
+ def list_event_hub_consumer_groups_next_async(next_page_link, custom_headers:nil)
2531
2545
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2532
2546
 
2533
2547
 
2534
2548
  request_headers = {}
2549
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2535
2550
 
2536
2551
  # Set Headers
2537
2552
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -2589,8 +2604,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2589
2604
  #
2590
2605
  # @return [JobResponseListResult] operation results.
2591
2606
  #
2592
- def list_jobs_next(next_page_link, custom_headers = nil)
2593
- response = list_jobs_next_async(next_page_link, custom_headers).value!
2607
+ def list_jobs_next(next_page_link, custom_headers:nil)
2608
+ response = list_jobs_next_async(next_page_link, custom_headers:custom_headers).value!
2594
2609
  response.body unless response.nil?
2595
2610
  end
2596
2611
 
@@ -2608,8 +2623,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2608
2623
  #
2609
2624
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2610
2625
  #
2611
- def list_jobs_next_with_http_info(next_page_link, custom_headers = nil)
2612
- list_jobs_next_async(next_page_link, custom_headers).value!
2626
+ def list_jobs_next_with_http_info(next_page_link, custom_headers:nil)
2627
+ list_jobs_next_async(next_page_link, custom_headers:custom_headers).value!
2613
2628
  end
2614
2629
 
2615
2630
  #
@@ -2626,11 +2641,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2626
2641
  #
2627
2642
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2628
2643
  #
2629
- def list_jobs_next_async(next_page_link, custom_headers = nil)
2644
+ def list_jobs_next_async(next_page_link, custom_headers:nil)
2630
2645
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2631
2646
 
2632
2647
 
2633
2648
  request_headers = {}
2649
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2634
2650
 
2635
2651
  # Set Headers
2636
2652
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -2686,8 +2702,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2686
2702
  #
2687
2703
  # @return [IotHubQuotaMetricInfoListResult] operation results.
2688
2704
  #
2689
- def get_quota_metrics_next(next_page_link, custom_headers = nil)
2690
- response = get_quota_metrics_next_async(next_page_link, custom_headers).value!
2705
+ def get_quota_metrics_next(next_page_link, custom_headers:nil)
2706
+ response = get_quota_metrics_next_async(next_page_link, custom_headers:custom_headers).value!
2691
2707
  response.body unless response.nil?
2692
2708
  end
2693
2709
 
@@ -2703,8 +2719,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2703
2719
  #
2704
2720
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2705
2721
  #
2706
- def get_quota_metrics_next_with_http_info(next_page_link, custom_headers = nil)
2707
- get_quota_metrics_next_async(next_page_link, custom_headers).value!
2722
+ def get_quota_metrics_next_with_http_info(next_page_link, custom_headers:nil)
2723
+ get_quota_metrics_next_async(next_page_link, custom_headers:custom_headers).value!
2708
2724
  end
2709
2725
 
2710
2726
  #
@@ -2719,11 +2735,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2719
2735
  #
2720
2736
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2721
2737
  #
2722
- def get_quota_metrics_next_async(next_page_link, custom_headers = nil)
2738
+ def get_quota_metrics_next_async(next_page_link, custom_headers:nil)
2723
2739
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2724
2740
 
2725
2741
 
2726
2742
  request_headers = {}
2743
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2727
2744
 
2728
2745
  # Set Headers
2729
2746
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -2781,8 +2798,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2781
2798
  #
2782
2799
  # @return [SharedAccessSignatureAuthorizationRuleListResult] operation results.
2783
2800
  #
2784
- def list_keys_next(next_page_link, custom_headers = nil)
2785
- response = list_keys_next_async(next_page_link, custom_headers).value!
2801
+ def list_keys_next(next_page_link, custom_headers:nil)
2802
+ response = list_keys_next_async(next_page_link, custom_headers:custom_headers).value!
2786
2803
  response.body unless response.nil?
2787
2804
  end
2788
2805
 
@@ -2800,8 +2817,8 @@ module Azure::IotHub::Mgmt::V2017_01_19
2800
2817
  #
2801
2818
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2802
2819
  #
2803
- def list_keys_next_with_http_info(next_page_link, custom_headers = nil)
2804
- list_keys_next_async(next_page_link, custom_headers).value!
2820
+ def list_keys_next_with_http_info(next_page_link, custom_headers:nil)
2821
+ list_keys_next_async(next_page_link, custom_headers:custom_headers).value!
2805
2822
  end
2806
2823
 
2807
2824
  #
@@ -2818,11 +2835,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2818
2835
  #
2819
2836
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2820
2837
  #
2821
- def list_keys_next_async(next_page_link, custom_headers = nil)
2838
+ def list_keys_next_async(next_page_link, custom_headers:nil)
2822
2839
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2823
2840
 
2824
2841
 
2825
2842
  request_headers = {}
2843
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2826
2844
 
2827
2845
  # Set Headers
2828
2846
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -2877,12 +2895,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2877
2895
  # @return [IotHubDescriptionListResult] which provide lazy access to pages of
2878
2896
  # the response.
2879
2897
  #
2880
- def list_by_subscription_as_lazy(custom_headers = nil)
2881
- response = list_by_subscription_async(custom_headers).value!
2898
+ def list_by_subscription_as_lazy(custom_headers:nil)
2899
+ response = list_by_subscription_async(custom_headers:custom_headers).value!
2882
2900
  unless response.nil?
2883
2901
  page = response.body
2884
2902
  page.next_method = Proc.new do |next_page_link|
2885
- list_by_subscription_next_async(next_page_link, custom_headers)
2903
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
2886
2904
  end
2887
2905
  page
2888
2906
  end
@@ -2901,12 +2919,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2901
2919
  # @return [IotHubDescriptionListResult] which provide lazy access to pages of
2902
2920
  # the response.
2903
2921
  #
2904
- def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
2905
- response = list_by_resource_group_async(resource_group_name, custom_headers).value!
2922
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
2923
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
2906
2924
  unless response.nil?
2907
2925
  page = response.body
2908
2926
  page.next_method = Proc.new do |next_page_link|
2909
- list_by_resource_group_next_async(next_page_link, custom_headers)
2927
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
2910
2928
  end
2911
2929
  page
2912
2930
  end
@@ -2926,12 +2944,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2926
2944
  # @return [IotHubSkuDescriptionListResult] which provide lazy access to pages
2927
2945
  # of the response.
2928
2946
  #
2929
- def get_valid_skus_as_lazy(resource_group_name, resource_name, custom_headers = nil)
2930
- response = get_valid_skus_async(resource_group_name, resource_name, custom_headers).value!
2947
+ def get_valid_skus_as_lazy(resource_group_name, resource_name, custom_headers:nil)
2948
+ response = get_valid_skus_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
2931
2949
  unless response.nil?
2932
2950
  page = response.body
2933
2951
  page.next_method = Proc.new do |next_page_link|
2934
- get_valid_skus_next_async(next_page_link, custom_headers)
2952
+ get_valid_skus_next_async(next_page_link, custom_headers:custom_headers)
2935
2953
  end
2936
2954
  page
2937
2955
  end
@@ -2955,12 +2973,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2955
2973
  # @return [EventHubConsumerGroupsListResult] which provide lazy access to pages
2956
2974
  # of the response.
2957
2975
  #
2958
- def list_event_hub_consumer_groups_as_lazy(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers = nil)
2959
- response = list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers).value!
2976
+ def list_event_hub_consumer_groups_as_lazy(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:nil)
2977
+ response = list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:custom_headers).value!
2960
2978
  unless response.nil?
2961
2979
  page = response.body
2962
2980
  page.next_method = Proc.new do |next_page_link|
2963
- list_event_hub_consumer_groups_next_async(next_page_link, custom_headers)
2981
+ list_event_hub_consumer_groups_next_async(next_page_link, custom_headers:custom_headers)
2964
2982
  end
2965
2983
  page
2966
2984
  end
@@ -2982,12 +3000,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
2982
3000
  # @return [JobResponseListResult] which provide lazy access to pages of the
2983
3001
  # response.
2984
3002
  #
2985
- def list_jobs_as_lazy(resource_group_name, resource_name, custom_headers = nil)
2986
- response = list_jobs_async(resource_group_name, resource_name, custom_headers).value!
3003
+ def list_jobs_as_lazy(resource_group_name, resource_name, custom_headers:nil)
3004
+ response = list_jobs_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
2987
3005
  unless response.nil?
2988
3006
  page = response.body
2989
3007
  page.next_method = Proc.new do |next_page_link|
2990
- list_jobs_next_async(next_page_link, custom_headers)
3008
+ list_jobs_next_async(next_page_link, custom_headers:custom_headers)
2991
3009
  end
2992
3010
  page
2993
3011
  end
@@ -3007,12 +3025,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
3007
3025
  # @return [IotHubQuotaMetricInfoListResult] which provide lazy access to pages
3008
3026
  # of the response.
3009
3027
  #
3010
- def get_quota_metrics_as_lazy(resource_group_name, resource_name, custom_headers = nil)
3011
- response = get_quota_metrics_async(resource_group_name, resource_name, custom_headers).value!
3028
+ def get_quota_metrics_as_lazy(resource_group_name, resource_name, custom_headers:nil)
3029
+ response = get_quota_metrics_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
3012
3030
  unless response.nil?
3013
3031
  page = response.body
3014
3032
  page.next_method = Proc.new do |next_page_link|
3015
- get_quota_metrics_next_async(next_page_link, custom_headers)
3033
+ get_quota_metrics_next_async(next_page_link, custom_headers:custom_headers)
3016
3034
  end
3017
3035
  page
3018
3036
  end
@@ -3034,12 +3052,12 @@ module Azure::IotHub::Mgmt::V2017_01_19
3034
3052
  # @return [SharedAccessSignatureAuthorizationRuleListResult] which provide lazy
3035
3053
  # access to pages of the response.
3036
3054
  #
3037
- def list_keys_as_lazy(resource_group_name, resource_name, custom_headers = nil)
3038
- response = list_keys_async(resource_group_name, resource_name, custom_headers).value!
3055
+ def list_keys_as_lazy(resource_group_name, resource_name, custom_headers:nil)
3056
+ response = list_keys_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
3039
3057
  unless response.nil?
3040
3058
  page = response.body
3041
3059
  page.next_method = Proc.new do |next_page_link|
3042
- list_keys_next_async(next_page_link, custom_headers)
3060
+ list_keys_next_async(next_page_link, custom_headers:custom_headers)
3043
3061
  end
3044
3062
  page
3045
3063
  end