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.
@@ -30,8 +30,8 @@ module Azure::Relay::Mgmt::V2017_04_01
30
30
  #
31
31
  # @return [Array<Operation>] operation results.
32
32
  #
33
- def list(custom_headers = nil)
34
- first_page = list_as_lazy(custom_headers)
33
+ def list(custom_headers:nil)
34
+ first_page = list_as_lazy(custom_headers:custom_headers)
35
35
  first_page.get_all_items
36
36
  end
37
37
 
@@ -43,8 +43,8 @@ module Azure::Relay::Mgmt::V2017_04_01
43
43
  #
44
44
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
45
45
  #
46
- def list_with_http_info(custom_headers = nil)
47
- list_async(custom_headers).value!
46
+ def list_with_http_info(custom_headers:nil)
47
+ list_async(custom_headers:custom_headers).value!
48
48
  end
49
49
 
50
50
  #
@@ -55,11 +55,12 @@ module Azure::Relay::Mgmt::V2017_04_01
55
55
  #
56
56
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
57
57
  #
58
- def list_async(custom_headers = nil)
58
+ def list_async(custom_headers:nil)
59
59
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
60
60
 
61
61
 
62
62
  request_headers = {}
63
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
64
 
64
65
  # Set Headers
65
66
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -113,8 +114,8 @@ module Azure::Relay::Mgmt::V2017_04_01
113
114
  #
114
115
  # @return [OperationListResult] operation results.
115
116
  #
116
- def list_next(next_page_link, custom_headers = nil)
117
- response = list_next_async(next_page_link, custom_headers).value!
117
+ def list_next(next_page_link, custom_headers:nil)
118
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
118
119
  response.body unless response.nil?
119
120
  end
120
121
 
@@ -128,8 +129,8 @@ module Azure::Relay::Mgmt::V2017_04_01
128
129
  #
129
130
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
130
131
  #
131
- def list_next_with_http_info(next_page_link, custom_headers = nil)
132
- list_next_async(next_page_link, custom_headers).value!
132
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
133
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
133
134
  end
134
135
 
135
136
  #
@@ -142,11 +143,12 @@ module Azure::Relay::Mgmt::V2017_04_01
142
143
  #
143
144
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
144
145
  #
145
- def list_next_async(next_page_link, custom_headers = nil)
146
+ def list_next_async(next_page_link, custom_headers:nil)
146
147
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
147
148
 
148
149
 
149
150
  request_headers = {}
151
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
150
152
 
151
153
  # Set Headers
152
154
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -199,12 +201,12 @@ module Azure::Relay::Mgmt::V2017_04_01
199
201
  # @return [OperationListResult] which provide lazy access to pages of the
200
202
  # response.
201
203
  #
202
- def list_as_lazy(custom_headers = nil)
203
- response = list_async(custom_headers).value!
204
+ def list_as_lazy(custom_headers:nil)
205
+ response = list_async(custom_headers:custom_headers).value!
204
206
  unless response.nil?
205
207
  page = response.body
206
208
  page.next_method = Proc.new do |next_page_link|
207
- list_next_async(next_page_link, custom_headers)
209
+ list_next_async(next_page_link, custom_headers:custom_headers)
208
210
  end
209
211
  page
210
212
  end
@@ -118,6 +118,9 @@ module Azure::Relay::Mgmt::V2017_04_01
118
118
  fail ArgumentError, 'path is nil' if path.nil?
119
119
 
120
120
  request_url = options[:base_url] || @base_url
121
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
122
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
123
+ end
121
124
 
122
125
  request_headers = @request_headers
123
126
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
@@ -134,7 +137,7 @@ module Azure::Relay::Mgmt::V2017_04_01
134
137
  #
135
138
  def add_telemetry
136
139
  sdk_information = 'azure_mgmt_relay'
137
- sdk_information = "#{sdk_information}/0.15.2"
140
+ sdk_information = "#{sdk_information}/0.16.0"
138
141
  add_user_agent_information(sdk_information)
139
142
  end
140
143
  end
@@ -33,8 +33,8 @@ module Azure::Relay::Mgmt::V2017_04_01
33
33
  #
34
34
  # @return [Array<WcfRelay>] operation results.
35
35
  #
36
- def list_by_namespace(resource_group_name, namespace_name, custom_headers = nil)
37
- first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers)
36
+ def list_by_namespace(resource_group_name, namespace_name, custom_headers:nil)
37
+ first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
38
38
  first_page.get_all_items
39
39
  end
40
40
 
@@ -49,8 +49,8 @@ module Azure::Relay::Mgmt::V2017_04_01
49
49
  #
50
50
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
51
  #
52
- def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
53
- list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value!
52
+ def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
53
+ list_by_namespace_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
54
54
  end
55
55
 
56
56
  #
@@ -64,7 +64,7 @@ module Azure::Relay::Mgmt::V2017_04_01
64
64
  #
65
65
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
66
  #
67
- def list_by_namespace_async(resource_group_name, namespace_name, custom_headers = nil)
67
+ def list_by_namespace_async(resource_group_name, namespace_name, custom_headers:nil)
68
68
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
69
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
70
70
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -76,6 +76,7 @@ module Azure::Relay::Mgmt::V2017_04_01
76
76
 
77
77
 
78
78
  request_headers = {}
79
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
79
80
 
80
81
  # Set Headers
81
82
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -133,8 +134,8 @@ module Azure::Relay::Mgmt::V2017_04_01
133
134
  #
134
135
  # @return [WcfRelay] operation results.
135
136
  #
136
- def create_or_update(resource_group_name, namespace_name, relay_name, parameters, custom_headers = nil)
137
- response = create_or_update_async(resource_group_name, namespace_name, relay_name, parameters, custom_headers).value!
137
+ def create_or_update(resource_group_name, namespace_name, relay_name, parameters, custom_headers:nil)
138
+ response = create_or_update_async(resource_group_name, namespace_name, relay_name, parameters, custom_headers:custom_headers).value!
138
139
  response.body unless response.nil?
139
140
  end
140
141
 
@@ -151,8 +152,8 @@ module Azure::Relay::Mgmt::V2017_04_01
151
152
  #
152
153
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
153
154
  #
154
- def create_or_update_with_http_info(resource_group_name, namespace_name, relay_name, parameters, custom_headers = nil)
155
- create_or_update_async(resource_group_name, namespace_name, relay_name, parameters, custom_headers).value!
155
+ def create_or_update_with_http_info(resource_group_name, namespace_name, relay_name, parameters, custom_headers:nil)
156
+ create_or_update_async(resource_group_name, namespace_name, relay_name, parameters, custom_headers:custom_headers).value!
156
157
  end
157
158
 
158
159
  #
@@ -168,7 +169,7 @@ module Azure::Relay::Mgmt::V2017_04_01
168
169
  #
169
170
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
170
171
  #
171
- def create_or_update_async(resource_group_name, namespace_name, relay_name, parameters, custom_headers = nil)
172
+ def create_or_update_async(resource_group_name, namespace_name, relay_name, parameters, custom_headers:nil)
172
173
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
173
174
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
174
175
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -183,13 +184,12 @@ module Azure::Relay::Mgmt::V2017_04_01
183
184
 
184
185
 
185
186
  request_headers = {}
187
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
186
188
 
187
189
  # Set Headers
188
190
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
189
191
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
190
192
 
191
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
192
-
193
193
  # Serialize Request
194
194
  request_mapper = Azure::Relay::Mgmt::V2017_04_01::Models::WcfRelay.mapper()
195
195
  request_content = @client.serialize(request_mapper, parameters)
@@ -247,8 +247,8 @@ module Azure::Relay::Mgmt::V2017_04_01
247
247
  # will be added to the HTTP request.
248
248
  #
249
249
  #
250
- def delete(resource_group_name, namespace_name, relay_name, custom_headers = nil)
251
- response = delete_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
250
+ def delete(resource_group_name, namespace_name, relay_name, custom_headers:nil)
251
+ response = delete_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
252
252
  nil
253
253
  end
254
254
 
@@ -264,8 +264,8 @@ module Azure::Relay::Mgmt::V2017_04_01
264
264
  #
265
265
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
266
266
  #
267
- def delete_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers = nil)
268
- delete_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
267
+ def delete_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers:nil)
268
+ delete_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
269
269
  end
270
270
 
271
271
  #
@@ -280,7 +280,7 @@ module Azure::Relay::Mgmt::V2017_04_01
280
280
  #
281
281
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
282
282
  #
283
- def delete_async(resource_group_name, namespace_name, relay_name, custom_headers = nil)
283
+ def delete_async(resource_group_name, namespace_name, relay_name, custom_headers:nil)
284
284
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
285
285
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
286
286
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -294,6 +294,7 @@ module Azure::Relay::Mgmt::V2017_04_01
294
294
 
295
295
 
296
296
  request_headers = {}
297
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
297
298
 
298
299
  # Set Headers
299
300
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -340,8 +341,8 @@ module Azure::Relay::Mgmt::V2017_04_01
340
341
  #
341
342
  # @return [WcfRelay] operation results.
342
343
  #
343
- def get(resource_group_name, namespace_name, relay_name, custom_headers = nil)
344
- response = get_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
344
+ def get(resource_group_name, namespace_name, relay_name, custom_headers:nil)
345
+ response = get_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
345
346
  response.body unless response.nil?
346
347
  end
347
348
 
@@ -357,8 +358,8 @@ module Azure::Relay::Mgmt::V2017_04_01
357
358
  #
358
359
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
359
360
  #
360
- def get_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers = nil)
361
- get_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
361
+ def get_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers:nil)
362
+ get_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
362
363
  end
363
364
 
364
365
  #
@@ -373,7 +374,7 @@ module Azure::Relay::Mgmt::V2017_04_01
373
374
  #
374
375
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
375
376
  #
376
- def get_async(resource_group_name, namespace_name, relay_name, custom_headers = nil)
377
+ def get_async(resource_group_name, namespace_name, relay_name, custom_headers:nil)
377
378
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
378
379
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
379
380
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -387,6 +388,7 @@ module Azure::Relay::Mgmt::V2017_04_01
387
388
 
388
389
 
389
390
  request_headers = {}
391
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
390
392
 
391
393
  # Set Headers
392
394
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -443,8 +445,8 @@ module Azure::Relay::Mgmt::V2017_04_01
443
445
  #
444
446
  # @return [Array<AuthorizationRule>] operation results.
445
447
  #
446
- def list_authorization_rules(resource_group_name, namespace_name, relay_name, custom_headers = nil)
447
- first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers)
448
+ def list_authorization_rules(resource_group_name, namespace_name, relay_name, custom_headers:nil)
449
+ first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers)
448
450
  first_page.get_all_items
449
451
  end
450
452
 
@@ -460,8 +462,8 @@ module Azure::Relay::Mgmt::V2017_04_01
460
462
  #
461
463
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
462
464
  #
463
- def list_authorization_rules_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers = nil)
464
- list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
465
+ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers:nil)
466
+ list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
465
467
  end
466
468
 
467
469
  #
@@ -476,7 +478,7 @@ module Azure::Relay::Mgmt::V2017_04_01
476
478
  #
477
479
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
478
480
  #
479
- def list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers = nil)
481
+ def list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers:nil)
480
482
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
481
483
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
482
484
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -490,6 +492,7 @@ module Azure::Relay::Mgmt::V2017_04_01
490
492
 
491
493
 
492
494
  request_headers = {}
495
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
493
496
 
494
497
  # Set Headers
495
498
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -548,8 +551,8 @@ module Azure::Relay::Mgmt::V2017_04_01
548
551
  #
549
552
  # @return [AuthorizationRule] operation results.
550
553
  #
551
- def create_or_update_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
552
- response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value!
554
+ def create_or_update_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
555
+ response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
553
556
  response.body unless response.nil?
554
557
  end
555
558
 
@@ -567,8 +570,8 @@ module Azure::Relay::Mgmt::V2017_04_01
567
570
  #
568
571
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
569
572
  #
570
- def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
571
- create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value!
573
+ def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
574
+ create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
572
575
  end
573
576
 
574
577
  #
@@ -585,7 +588,7 @@ module Azure::Relay::Mgmt::V2017_04_01
585
588
  #
586
589
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
587
590
  #
588
- def create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
591
+ def create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
589
592
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
590
593
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
591
594
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -602,13 +605,12 @@ module Azure::Relay::Mgmt::V2017_04_01
602
605
 
603
606
 
604
607
  request_headers = {}
608
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
605
609
 
606
610
  # Set Headers
607
611
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
608
612
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
609
613
 
610
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
611
-
612
614
  # Serialize Request
613
615
  request_mapper = Azure::Relay::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
614
616
  request_content = @client.serialize(request_mapper, parameters)
@@ -667,8 +669,8 @@ module Azure::Relay::Mgmt::V2017_04_01
667
669
  # will be added to the HTTP request.
668
670
  #
669
671
  #
670
- def delete_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
671
- response = delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
672
+ def delete_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
673
+ response = delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
672
674
  nil
673
675
  end
674
676
 
@@ -685,8 +687,8 @@ module Azure::Relay::Mgmt::V2017_04_01
685
687
  #
686
688
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
687
689
  #
688
- def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
689
- delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
690
+ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
691
+ delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
690
692
  end
691
693
 
692
694
  #
@@ -702,7 +704,7 @@ module Azure::Relay::Mgmt::V2017_04_01
702
704
  #
703
705
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
704
706
  #
705
- def delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
707
+ def delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
706
708
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
707
709
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
708
710
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -718,6 +720,7 @@ module Azure::Relay::Mgmt::V2017_04_01
718
720
 
719
721
 
720
722
  request_headers = {}
723
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
721
724
 
722
725
  # Set Headers
723
726
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -765,8 +768,8 @@ module Azure::Relay::Mgmt::V2017_04_01
765
768
  #
766
769
  # @return [AuthorizationRule] operation results.
767
770
  #
768
- def get_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
769
- response = get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
771
+ def get_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
772
+ response = get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
770
773
  response.body unless response.nil?
771
774
  end
772
775
 
@@ -783,8 +786,8 @@ module Azure::Relay::Mgmt::V2017_04_01
783
786
  #
784
787
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
785
788
  #
786
- def get_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
787
- get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
789
+ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
790
+ get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
788
791
  end
789
792
 
790
793
  #
@@ -800,7 +803,7 @@ module Azure::Relay::Mgmt::V2017_04_01
800
803
  #
801
804
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
802
805
  #
803
- def get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
806
+ def get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
804
807
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
805
808
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
806
809
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -816,6 +819,7 @@ module Azure::Relay::Mgmt::V2017_04_01
816
819
 
817
820
 
818
821
  request_headers = {}
822
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
819
823
 
820
824
  # Set Headers
821
825
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -873,8 +877,8 @@ module Azure::Relay::Mgmt::V2017_04_01
873
877
  #
874
878
  # @return [AccessKeys] operation results.
875
879
  #
876
- def list_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
877
- response = list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
880
+ def list_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
881
+ response = list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
878
882
  response.body unless response.nil?
879
883
  end
880
884
 
@@ -891,8 +895,8 @@ module Azure::Relay::Mgmt::V2017_04_01
891
895
  #
892
896
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
893
897
  #
894
- def list_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
895
- list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
898
+ def list_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
899
+ list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
896
900
  end
897
901
 
898
902
  #
@@ -908,7 +912,7 @@ module Azure::Relay::Mgmt::V2017_04_01
908
912
  #
909
913
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
910
914
  #
911
- def list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
915
+ def list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
912
916
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
913
917
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
914
918
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -924,6 +928,7 @@ module Azure::Relay::Mgmt::V2017_04_01
924
928
 
925
929
 
926
930
  request_headers = {}
931
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
927
932
 
928
933
  # Set Headers
929
934
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -983,8 +988,8 @@ module Azure::Relay::Mgmt::V2017_04_01
983
988
  #
984
989
  # @return [AccessKeys] operation results.
985
990
  #
986
- def regenerate_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
987
- response = regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value!
991
+ def regenerate_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
992
+ response = regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
988
993
  response.body unless response.nil?
989
994
  end
990
995
 
@@ -1003,8 +1008,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1003
1008
  #
1004
1009
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1005
1010
  #
1006
- def regenerate_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
1007
- regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value!
1011
+ def regenerate_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
1012
+ regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1008
1013
  end
1009
1014
 
1010
1015
  #
@@ -1022,7 +1027,7 @@ module Azure::Relay::Mgmt::V2017_04_01
1022
1027
  #
1023
1028
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1024
1029
  #
1025
- def regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
1030
+ def regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
1026
1031
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1027
1032
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1028
1033
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1039,13 +1044,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1039
1044
 
1040
1045
 
1041
1046
  request_headers = {}
1047
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1042
1048
 
1043
1049
  # Set Headers
1044
1050
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1045
1051
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1046
1052
 
1047
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1048
-
1049
1053
  # Serialize Request
1050
1054
  request_mapper = Azure::Relay::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters.mapper()
1051
1055
  request_content = @client.serialize(request_mapper, parameters)
@@ -1102,8 +1106,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1102
1106
  #
1103
1107
  # @return [WcfRelaysListResult] operation results.
1104
1108
  #
1105
- def list_by_namespace_next(next_page_link, custom_headers = nil)
1106
- response = list_by_namespace_next_async(next_page_link, custom_headers).value!
1109
+ def list_by_namespace_next(next_page_link, custom_headers:nil)
1110
+ response = list_by_namespace_next_async(next_page_link, custom_headers:custom_headers).value!
1107
1111
  response.body unless response.nil?
1108
1112
  end
1109
1113
 
@@ -1117,8 +1121,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1117
1121
  #
1118
1122
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1119
1123
  #
1120
- def list_by_namespace_next_with_http_info(next_page_link, custom_headers = nil)
1121
- list_by_namespace_next_async(next_page_link, custom_headers).value!
1124
+ def list_by_namespace_next_with_http_info(next_page_link, custom_headers:nil)
1125
+ list_by_namespace_next_async(next_page_link, custom_headers:custom_headers).value!
1122
1126
  end
1123
1127
 
1124
1128
  #
@@ -1131,11 +1135,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1131
1135
  #
1132
1136
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1133
1137
  #
1134
- def list_by_namespace_next_async(next_page_link, custom_headers = nil)
1138
+ def list_by_namespace_next_async(next_page_link, custom_headers:nil)
1135
1139
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1136
1140
 
1137
1141
 
1138
1142
  request_headers = {}
1143
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1139
1144
 
1140
1145
  # Set Headers
1141
1146
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1189,8 +1194,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1189
1194
  #
1190
1195
  # @return [AuthorizationRuleListResult] operation results.
1191
1196
  #
1192
- def list_authorization_rules_next(next_page_link, custom_headers = nil)
1193
- response = list_authorization_rules_next_async(next_page_link, custom_headers).value!
1197
+ def list_authorization_rules_next(next_page_link, custom_headers:nil)
1198
+ response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1194
1199
  response.body unless response.nil?
1195
1200
  end
1196
1201
 
@@ -1204,8 +1209,8 @@ module Azure::Relay::Mgmt::V2017_04_01
1204
1209
  #
1205
1210
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1206
1211
  #
1207
- def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil)
1208
- list_authorization_rules_next_async(next_page_link, custom_headers).value!
1212
+ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil)
1213
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1209
1214
  end
1210
1215
 
1211
1216
  #
@@ -1218,11 +1223,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1218
1223
  #
1219
1224
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1220
1225
  #
1221
- def list_authorization_rules_next_async(next_page_link, custom_headers = nil)
1226
+ def list_authorization_rules_next_async(next_page_link, custom_headers:nil)
1222
1227
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1223
1228
 
1224
1229
 
1225
1230
  request_headers = {}
1231
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1226
1232
 
1227
1233
  # Set Headers
1228
1234
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1278,12 +1284,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1278
1284
  # @return [WcfRelaysListResult] which provide lazy access to pages of the
1279
1285
  # response.
1280
1286
  #
1281
- def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
1282
- response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value!
1287
+ def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
1288
+ response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1283
1289
  unless response.nil?
1284
1290
  page = response.body
1285
1291
  page.next_method = Proc.new do |next_page_link|
1286
- list_by_namespace_next_async(next_page_link, custom_headers)
1292
+ list_by_namespace_next_async(next_page_link, custom_headers:custom_headers)
1287
1293
  end
1288
1294
  page
1289
1295
  end
@@ -1302,12 +1308,12 @@ module Azure::Relay::Mgmt::V2017_04_01
1302
1308
  # @return [AuthorizationRuleListResult] which provide lazy access to pages of
1303
1309
  # the response.
1304
1310
  #
1305
- def list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers = nil)
1306
- response = list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
1311
+ def list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers:nil)
1312
+ response = list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
1307
1313
  unless response.nil?
1308
1314
  page = response.body
1309
1315
  page.next_method = Proc.new do |next_page_link|
1310
- list_authorization_rules_next_async(next_page_link, custom_headers)
1316
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers)
1311
1317
  end
1312
1318
  page
1313
1319
  end