azure_mgmt_relay 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,8 +32,8 @@ module Azure::Relay::Mgmt::V2017_04_01
32
32
  #
33
33
  # @return [CheckNameAvailabilityResult] operation results.
34
34
  #
35
- def check_name_availability_method(parameters, custom_headers = nil)
36
- response = check_name_availability_method_async(parameters, custom_headers).value!
35
+ def check_name_availability_method(parameters, custom_headers:nil)
36
+ response = check_name_availability_method_async(parameters, custom_headers:custom_headers).value!
37
37
  response.body unless response.nil?
38
38
  end
39
39
 
@@ -47,8 +47,8 @@ module Azure::Relay::Mgmt::V2017_04_01
47
47
  #
48
48
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
49
49
  #
50
- def check_name_availability_method_with_http_info(parameters, custom_headers = nil)
51
- check_name_availability_method_async(parameters, custom_headers).value!
50
+ def check_name_availability_method_with_http_info(parameters, custom_headers:nil)
51
+ check_name_availability_method_async(parameters, custom_headers:custom_headers).value!
52
52
  end
53
53
 
54
54
  #
@@ -61,20 +61,19 @@ module Azure::Relay::Mgmt::V2017_04_01
61
61
  #
62
62
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
63
63
  #
64
- def check_name_availability_method_async(parameters, custom_headers = nil)
64
+ def check_name_availability_method_async(parameters, custom_headers:nil)
65
65
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
66
66
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
67
67
  fail ArgumentError, 'parameters is nil' if parameters.nil?
68
68
 
69
69
 
70
70
  request_headers = {}
71
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
71
72
 
72
73
  # Set Headers
73
74
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
74
75
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
75
76
 
76
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
77
-
78
77
  # Serialize Request
79
78
  request_mapper = Azure::Relay::Mgmt::V2017_04_01::Models::CheckNameAvailability.mapper()
80
79
  request_content = @client.serialize(request_mapper, parameters)
@@ -130,8 +129,8 @@ module Azure::Relay::Mgmt::V2017_04_01
130
129
  #
131
130
  # @return [Array<RelayNamespace>] operation results.
132
131
  #
133
- def list(custom_headers = nil)
134
- first_page = list_as_lazy(custom_headers)
132
+ def list(custom_headers:nil)
133
+ first_page = list_as_lazy(custom_headers:custom_headers)
135
134
  first_page.get_all_items
136
135
  end
137
136
 
@@ -144,8 +143,8 @@ module Azure::Relay::Mgmt::V2017_04_01
144
143
  #
145
144
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
146
145
  #
147
- def list_with_http_info(custom_headers = nil)
148
- list_async(custom_headers).value!
146
+ def list_with_http_info(custom_headers:nil)
147
+ list_async(custom_headers:custom_headers).value!
149
148
  end
150
149
 
151
150
  #
@@ -157,12 +156,13 @@ module Azure::Relay::Mgmt::V2017_04_01
157
156
  #
158
157
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
159
158
  #
160
- def list_async(custom_headers = nil)
159
+ def list_async(custom_headers:nil)
161
160
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
162
161
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
163
162
 
164
163
 
165
164
  request_headers = {}
165
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
166
166
 
167
167
  # Set Headers
168
168
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -217,8 +217,8 @@ module Azure::Relay::Mgmt::V2017_04_01
217
217
  #
218
218
  # @return [Array<RelayNamespace>] operation results.
219
219
  #
220
- def list_by_resource_group(resource_group_name, custom_headers = nil)
221
- first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
220
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
221
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
222
222
  first_page.get_all_items
223
223
  end
224
224
 
@@ -232,8 +232,8 @@ module Azure::Relay::Mgmt::V2017_04_01
232
232
  #
233
233
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
234
234
  #
235
- def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
236
- list_by_resource_group_async(resource_group_name, custom_headers).value!
235
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
236
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
237
237
  end
238
238
 
239
239
  #
@@ -246,7 +246,7 @@ module Azure::Relay::Mgmt::V2017_04_01
246
246
  #
247
247
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
248
248
  #
249
- def list_by_resource_group_async(resource_group_name, custom_headers = nil)
249
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
250
250
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
251
251
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
252
252
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -255,6 +255,7 @@ module Azure::Relay::Mgmt::V2017_04_01
255
255
 
256
256
 
257
257
  request_headers = {}
258
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
258
259
 
259
260
  # Set Headers
260
261
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -312,8 +313,8 @@ module Azure::Relay::Mgmt::V2017_04_01
312
313
  #
313
314
  # @return [RelayNamespace] operation results.
314
315
  #
315
- def create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
316
- response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
316
+ def create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil)
317
+ response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
317
318
  response.body unless response.nil?
318
319
  end
319
320
 
@@ -329,9 +330,9 @@ module Azure::Relay::Mgmt::V2017_04_01
329
330
  # @return [Concurrent::Promise] promise which provides async access to http
330
331
  # response.
331
332
  #
332
- def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers = nil)
333
+ def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
333
334
  # Send request
334
- promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers)
335
+ promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers)
335
336
 
336
337
  promise = promise.then do |response|
337
338
  # Defining deserialization method.
@@ -357,8 +358,8 @@ module Azure::Relay::Mgmt::V2017_04_01
357
358
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
358
359
  # will be added to the HTTP request.
359
360
  #
360
- def delete(resource_group_name, namespace_name, custom_headers = nil)
361
- response = delete_async(resource_group_name, namespace_name, custom_headers).value!
361
+ def delete(resource_group_name, namespace_name, custom_headers:nil)
362
+ response = delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
362
363
  nil
363
364
  end
364
365
 
@@ -372,9 +373,9 @@ module Azure::Relay::Mgmt::V2017_04_01
372
373
  # @return [Concurrent::Promise] promise which provides async access to http
373
374
  # response.
374
375
  #
375
- def delete_async(resource_group_name, namespace_name, custom_headers = nil)
376
+ def delete_async(resource_group_name, namespace_name, custom_headers:nil)
376
377
  # Send request
377
- promise = begin_delete_async(resource_group_name, namespace_name, custom_headers)
378
+ promise = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers)
378
379
 
379
380
  promise = promise.then do |response|
380
381
  # Defining deserialization method.
@@ -399,8 +400,8 @@ module Azure::Relay::Mgmt::V2017_04_01
399
400
  #
400
401
  # @return [RelayNamespace] operation results.
401
402
  #
402
- def get(resource_group_name, namespace_name, custom_headers = nil)
403
- response = get_async(resource_group_name, namespace_name, custom_headers).value!
403
+ def get(resource_group_name, namespace_name, custom_headers:nil)
404
+ response = get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
404
405
  response.body unless response.nil?
405
406
  end
406
407
 
@@ -415,8 +416,8 @@ module Azure::Relay::Mgmt::V2017_04_01
415
416
  #
416
417
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
417
418
  #
418
- def get_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
419
- get_async(resource_group_name, namespace_name, custom_headers).value!
419
+ def get_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
420
+ get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
420
421
  end
421
422
 
422
423
  #
@@ -430,7 +431,7 @@ module Azure::Relay::Mgmt::V2017_04_01
430
431
  #
431
432
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
432
433
  #
433
- def get_async(resource_group_name, namespace_name, custom_headers = nil)
434
+ def get_async(resource_group_name, namespace_name, custom_headers:nil)
434
435
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
435
436
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
436
437
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -442,6 +443,7 @@ module Azure::Relay::Mgmt::V2017_04_01
442
443
 
443
444
 
444
445
  request_headers = {}
446
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
445
447
 
446
448
  # Set Headers
447
449
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -500,8 +502,8 @@ module Azure::Relay::Mgmt::V2017_04_01
500
502
  #
501
503
  # @return [RelayNamespace] operation results.
502
504
  #
503
- def update(resource_group_name, namespace_name, parameters, custom_headers = nil)
504
- response = update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
505
+ def update(resource_group_name, namespace_name, parameters, custom_headers:nil)
506
+ response = update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
505
507
  response.body unless response.nil?
506
508
  end
507
509
 
@@ -519,8 +521,8 @@ module Azure::Relay::Mgmt::V2017_04_01
519
521
  #
520
522
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
521
523
  #
522
- def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil)
523
- update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
524
+ def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
525
+ update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
524
526
  end
525
527
 
526
528
  #
@@ -537,7 +539,7 @@ module Azure::Relay::Mgmt::V2017_04_01
537
539
  #
538
540
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
539
541
  #
540
- def update_async(resource_group_name, namespace_name, parameters, custom_headers = nil)
542
+ def update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
541
543
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
542
544
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
543
545
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -550,13 +552,12 @@ module Azure::Relay::Mgmt::V2017_04_01
550
552
 
551
553
 
552
554
  request_headers = {}
555
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
553
556
 
554
557
  # Set Headers
555
558
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
556
559
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
557
560
 
558
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
559
-
560
561
  # Serialize Request
561
562
  request_mapper = Azure::Relay::Mgmt::V2017_04_01::Models::RelayUpdateParameters.mapper()
562
563
  request_content = @client.serialize(request_mapper, parameters)
@@ -624,8 +625,8 @@ module Azure::Relay::Mgmt::V2017_04_01
624
625
  #
625
626
  # @return [Array<AuthorizationRule>] operation results.
626
627
  #
627
- def list_authorization_rules(resource_group_name, namespace_name, custom_headers = nil)
628
- first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers)
628
+ def list_authorization_rules(resource_group_name, namespace_name, custom_headers:nil)
629
+ first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
629
630
  first_page.get_all_items
630
631
  end
631
632
 
@@ -640,8 +641,8 @@ module Azure::Relay::Mgmt::V2017_04_01
640
641
  #
641
642
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
642
643
  #
643
- def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
644
- list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value!
644
+ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
645
+ list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
645
646
  end
646
647
 
647
648
  #
@@ -655,7 +656,7 @@ module Azure::Relay::Mgmt::V2017_04_01
655
656
  #
656
657
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
657
658
  #
658
- def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers = nil)
659
+ def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:nil)
659
660
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
660
661
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
661
662
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -667,6 +668,7 @@ module Azure::Relay::Mgmt::V2017_04_01
667
668
 
668
669
 
669
670
  request_headers = {}
671
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
670
672
 
671
673
  # Set Headers
672
674
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -724,8 +726,8 @@ module Azure::Relay::Mgmt::V2017_04_01
724
726
  #
725
727
  # @return [AuthorizationRule] operation results.
726
728
  #
727
- def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
728
- response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
729
+ def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
730
+ response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
729
731
  response.body unless response.nil?
730
732
  end
731
733
 
@@ -742,8 +744,8 @@ module Azure::Relay::Mgmt::V2017_04_01
742
744
  #
743
745
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
744
746
  #
745
- def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
746
- create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
747
+ def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
748
+ create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
747
749
  end
748
750
 
749
751
  #
@@ -759,7 +761,7 @@ module Azure::Relay::Mgmt::V2017_04_01
759
761
  #
760
762
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
761
763
  #
762
- def create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
764
+ def create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
763
765
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
764
766
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
765
767
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -774,13 +776,12 @@ module Azure::Relay::Mgmt::V2017_04_01
774
776
 
775
777
 
776
778
  request_headers = {}
779
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
777
780
 
778
781
  # Set Headers
779
782
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
780
783
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
781
784
 
782
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
783
-
784
785
  # Serialize Request
785
786
  request_mapper = Azure::Relay::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
786
787
  request_content = @client.serialize(request_mapper, parameters)
@@ -838,8 +839,8 @@ module Azure::Relay::Mgmt::V2017_04_01
838
839
  # will be added to the HTTP request.
839
840
  #
840
841
  #
841
- def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
842
- response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
842
+ def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
843
+ response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
843
844
  nil
844
845
  end
845
846
 
@@ -855,8 +856,8 @@ module Azure::Relay::Mgmt::V2017_04_01
855
856
  #
856
857
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
857
858
  #
858
- def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
859
- delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
859
+ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
860
+ delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
860
861
  end
861
862
 
862
863
  #
@@ -871,7 +872,7 @@ module Azure::Relay::Mgmt::V2017_04_01
871
872
  #
872
873
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
873
874
  #
874
- def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
875
+ def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
875
876
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
876
877
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
877
878
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -885,6 +886,7 @@ module Azure::Relay::Mgmt::V2017_04_01
885
886
 
886
887
 
887
888
  request_headers = {}
889
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
888
890
 
889
891
  # Set Headers
890
892
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -931,8 +933,8 @@ module Azure::Relay::Mgmt::V2017_04_01
931
933
  #
932
934
  # @return [AuthorizationRule] operation results.
933
935
  #
934
- def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
935
- response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
936
+ def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
937
+ response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
936
938
  response.body unless response.nil?
937
939
  end
938
940
 
@@ -948,8 +950,8 @@ module Azure::Relay::Mgmt::V2017_04_01
948
950
  #
949
951
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
950
952
  #
951
- def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
952
- get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
953
+ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
954
+ get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
953
955
  end
954
956
 
955
957
  #
@@ -964,7 +966,7 @@ module Azure::Relay::Mgmt::V2017_04_01
964
966
  #
965
967
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
966
968
  #
967
- def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
969
+ def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
968
970
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
969
971
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
970
972
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -978,6 +980,7 @@ module Azure::Relay::Mgmt::V2017_04_01
978
980
 
979
981
 
980
982
  request_headers = {}
983
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
981
984
 
982
985
  # Set Headers
983
986
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1034,8 +1037,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1034
1037
  #
1035
1038
  # @return [AccessKeys] operation results.
1036
1039
  #
1037
- def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
1038
- response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
1040
+ def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1041
+ response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
1039
1042
  response.body unless response.nil?
1040
1043
  end
1041
1044
 
@@ -1051,8 +1054,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1051
1054
  #
1052
1055
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1053
1056
  #
1054
- def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
1055
- list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
1057
+ def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1058
+ list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:custom_headers).value!
1056
1059
  end
1057
1060
 
1058
1061
  #
@@ -1067,7 +1070,7 @@ module Azure::Relay::Mgmt::V2017_04_01
1067
1070
  #
1068
1071
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1069
1072
  #
1070
- def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
1073
+ def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers:nil)
1071
1074
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1072
1075
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1073
1076
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1081,6 +1084,7 @@ module Azure::Relay::Mgmt::V2017_04_01
1081
1084
 
1082
1085
 
1083
1086
  request_headers = {}
1087
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1084
1088
 
1085
1089
  # Set Headers
1086
1090
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1139,8 +1143,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1139
1143
  #
1140
1144
  # @return [AccessKeys] operation results.
1141
1145
  #
1142
- def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
1143
- response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
1146
+ def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
1147
+ response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1144
1148
  response.body unless response.nil?
1145
1149
  end
1146
1150
 
@@ -1158,8 +1162,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1158
1162
  #
1159
1163
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1160
1164
  #
1161
- def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
1162
- regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
1165
+ def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
1166
+ regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1163
1167
  end
1164
1168
 
1165
1169
  #
@@ -1176,7 +1180,7 @@ module Azure::Relay::Mgmt::V2017_04_01
1176
1180
  #
1177
1181
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1178
1182
  #
1179
- def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
1183
+ def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers:nil)
1180
1184
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1181
1185
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1182
1186
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1191,13 +1195,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1191
1195
 
1192
1196
 
1193
1197
  request_headers = {}
1198
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1194
1199
 
1195
1200
  # Set Headers
1196
1201
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1197
1202
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1198
1203
 
1199
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1200
-
1201
1204
  # Serialize Request
1202
1205
  request_mapper = Azure::Relay::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters.mapper()
1203
1206
  request_content = @client.serialize(request_mapper, parameters)
@@ -1257,8 +1260,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1257
1260
  #
1258
1261
  # @return [RelayNamespace] operation results.
1259
1262
  #
1260
- def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
1261
- response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
1263
+ def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil)
1264
+ response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1262
1265
  response.body unless response.nil?
1263
1266
  end
1264
1267
 
@@ -1275,8 +1278,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1275
1278
  #
1276
1279
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1277
1280
  #
1278
- def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil)
1279
- begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
1281
+ def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
1282
+ begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1280
1283
  end
1281
1284
 
1282
1285
  #
@@ -1292,7 +1295,7 @@ module Azure::Relay::Mgmt::V2017_04_01
1292
1295
  #
1293
1296
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1294
1297
  #
1295
- def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers = nil)
1298
+ def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
1296
1299
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1297
1300
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1298
1301
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1305,13 +1308,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1305
1308
 
1306
1309
 
1307
1310
  request_headers = {}
1311
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1308
1312
 
1309
1313
  # Set Headers
1310
1314
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1311
1315
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1312
1316
 
1313
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1314
-
1315
1317
  # Serialize Request
1316
1318
  request_mapper = Azure::Relay::Mgmt::V2017_04_01::Models::RelayNamespace.mapper()
1317
1319
  request_content = @client.serialize(request_mapper, parameters)
@@ -1379,8 +1381,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1379
1381
  # will be added to the HTTP request.
1380
1382
  #
1381
1383
  #
1382
- def begin_delete(resource_group_name, namespace_name, custom_headers = nil)
1383
- response = begin_delete_async(resource_group_name, namespace_name, custom_headers).value!
1384
+ def begin_delete(resource_group_name, namespace_name, custom_headers:nil)
1385
+ response = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1384
1386
  nil
1385
1387
  end
1386
1388
 
@@ -1396,8 +1398,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1396
1398
  #
1397
1399
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1398
1400
  #
1399
- def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
1400
- begin_delete_async(resource_group_name, namespace_name, custom_headers).value!
1401
+ def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
1402
+ begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1401
1403
  end
1402
1404
 
1403
1405
  #
@@ -1412,7 +1414,7 @@ module Azure::Relay::Mgmt::V2017_04_01
1412
1414
  #
1413
1415
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1414
1416
  #
1415
- def begin_delete_async(resource_group_name, namespace_name, custom_headers = nil)
1417
+ def begin_delete_async(resource_group_name, namespace_name, custom_headers:nil)
1416
1418
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1417
1419
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1418
1420
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1424,6 +1426,7 @@ module Azure::Relay::Mgmt::V2017_04_01
1424
1426
 
1425
1427
 
1426
1428
  request_headers = {}
1429
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1427
1430
 
1428
1431
  # Set Headers
1429
1432
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1469,8 +1472,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1469
1472
  #
1470
1473
  # @return [RelayNamespaceListResult] operation results.
1471
1474
  #
1472
- def list_next(next_page_link, custom_headers = nil)
1473
- response = list_next_async(next_page_link, custom_headers).value!
1475
+ def list_next(next_page_link, custom_headers:nil)
1476
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1474
1477
  response.body unless response.nil?
1475
1478
  end
1476
1479
 
@@ -1485,8 +1488,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1485
1488
  #
1486
1489
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1487
1490
  #
1488
- def list_next_with_http_info(next_page_link, custom_headers = nil)
1489
- list_next_async(next_page_link, custom_headers).value!
1491
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1492
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1490
1493
  end
1491
1494
 
1492
1495
  #
@@ -1500,11 +1503,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1500
1503
  #
1501
1504
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1502
1505
  #
1503
- def list_next_async(next_page_link, custom_headers = nil)
1506
+ def list_next_async(next_page_link, custom_headers:nil)
1504
1507
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1505
1508
 
1506
1509
 
1507
1510
  request_headers = {}
1511
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1508
1512
 
1509
1513
  # Set Headers
1510
1514
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1558,8 +1562,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1558
1562
  #
1559
1563
  # @return [RelayNamespaceListResult] operation results.
1560
1564
  #
1561
- def list_by_resource_group_next(next_page_link, custom_headers = nil)
1562
- response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
1565
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1566
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1563
1567
  response.body unless response.nil?
1564
1568
  end
1565
1569
 
@@ -1573,8 +1577,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1573
1577
  #
1574
1578
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1575
1579
  #
1576
- def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
1577
- list_by_resource_group_next_async(next_page_link, custom_headers).value!
1580
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1581
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1578
1582
  end
1579
1583
 
1580
1584
  #
@@ -1587,11 +1591,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1587
1591
  #
1588
1592
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1589
1593
  #
1590
- def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
1594
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1591
1595
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1592
1596
 
1593
1597
 
1594
1598
  request_headers = {}
1599
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1595
1600
 
1596
1601
  # Set Headers
1597
1602
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1645,8 +1650,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1645
1650
  #
1646
1651
  # @return [AuthorizationRuleListResult] operation results.
1647
1652
  #
1648
- def list_authorization_rules_next(next_page_link, custom_headers = nil)
1649
- response = list_authorization_rules_next_async(next_page_link, custom_headers).value!
1653
+ def list_authorization_rules_next(next_page_link, custom_headers:nil)
1654
+ response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1650
1655
  response.body unless response.nil?
1651
1656
  end
1652
1657
 
@@ -1660,8 +1665,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1660
1665
  #
1661
1666
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1662
1667
  #
1663
- def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil)
1664
- list_authorization_rules_next_async(next_page_link, custom_headers).value!
1668
+ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil)
1669
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1665
1670
  end
1666
1671
 
1667
1672
  #
@@ -1674,11 +1679,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1674
1679
  #
1675
1680
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1676
1681
  #
1677
- def list_authorization_rules_next_async(next_page_link, custom_headers = nil)
1682
+ def list_authorization_rules_next_async(next_page_link, custom_headers:nil)
1678
1683
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1679
1684
 
1680
1685
 
1681
1686
  request_headers = {}
1687
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1682
1688
 
1683
1689
  # Set Headers
1684
1690
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1732,12 +1738,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1732
1738
  # @return [RelayNamespaceListResult] which provide lazy access to pages of the
1733
1739
  # response.
1734
1740
  #
1735
- def list_as_lazy(custom_headers = nil)
1736
- response = list_async(custom_headers).value!
1741
+ def list_as_lazy(custom_headers:nil)
1742
+ response = list_async(custom_headers:custom_headers).value!
1737
1743
  unless response.nil?
1738
1744
  page = response.body
1739
1745
  page.next_method = Proc.new do |next_page_link|
1740
- list_next_async(next_page_link, custom_headers)
1746
+ list_next_async(next_page_link, custom_headers:custom_headers)
1741
1747
  end
1742
1748
  page
1743
1749
  end
@@ -1754,12 +1760,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1754
1760
  # @return [RelayNamespaceListResult] which provide lazy access to pages of the
1755
1761
  # response.
1756
1762
  #
1757
- def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
1758
- response = list_by_resource_group_async(resource_group_name, custom_headers).value!
1763
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1764
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1759
1765
  unless response.nil?
1760
1766
  page = response.body
1761
1767
  page.next_method = Proc.new do |next_page_link|
1762
- list_by_resource_group_next_async(next_page_link, custom_headers)
1768
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1763
1769
  end
1764
1770
  page
1765
1771
  end
@@ -1777,12 +1783,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1777
1783
  # @return [AuthorizationRuleListResult] which provide lazy access to pages of
1778
1784
  # the response.
1779
1785
  #
1780
- def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
1781
- response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value!
1786
+ def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
1787
+ response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1782
1788
  unless response.nil?
1783
1789
  page = response.body
1784
1790
  page.next_method = Proc.new do |next_page_link|
1785
- list_authorization_rules_next_async(next_page_link, custom_headers)
1791
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers)
1786
1792
  end
1787
1793
  page
1788
1794
  end