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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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::V2016_07_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
@@ -184,13 +185,12 @@ module Azure::Relay::Mgmt::V2016_07_01
184
185
 
185
186
 
186
187
  request_headers = {}
188
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
187
189
 
188
190
  # Set Headers
189
191
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
190
192
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
191
193
 
192
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
193
-
194
194
  # Serialize Request
195
195
  request_mapper = Azure::Relay::Mgmt::V2016_07_01::Models::WcfRelay.mapper()
196
196
  request_content = @client.serialize(request_mapper, parameters)
@@ -248,8 +248,8 @@ module Azure::Relay::Mgmt::V2016_07_01
248
248
  # will be added to the HTTP request.
249
249
  #
250
250
  #
251
- def delete(resource_group_name, namespace_name, relay_name, custom_headers = nil)
252
- response = delete_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
251
+ def delete(resource_group_name, namespace_name, relay_name, custom_headers:nil)
252
+ response = delete_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
253
253
  nil
254
254
  end
255
255
 
@@ -265,8 +265,8 @@ module Azure::Relay::Mgmt::V2016_07_01
265
265
  #
266
266
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
267
267
  #
268
- def delete_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers = nil)
269
- delete_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
268
+ def delete_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers:nil)
269
+ delete_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
270
270
  end
271
271
 
272
272
  #
@@ -281,7 +281,7 @@ module Azure::Relay::Mgmt::V2016_07_01
281
281
  #
282
282
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
283
283
  #
284
- def delete_async(resource_group_name, namespace_name, relay_name, custom_headers = nil)
284
+ def delete_async(resource_group_name, namespace_name, relay_name, custom_headers:nil)
285
285
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
286
286
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
287
287
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -296,6 +296,7 @@ module Azure::Relay::Mgmt::V2016_07_01
296
296
 
297
297
 
298
298
  request_headers = {}
299
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
299
300
 
300
301
  # Set Headers
301
302
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -342,8 +343,8 @@ module Azure::Relay::Mgmt::V2016_07_01
342
343
  #
343
344
  # @return [WcfRelay] operation results.
344
345
  #
345
- def get(resource_group_name, namespace_name, relay_name, custom_headers = nil)
346
- response = get_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
346
+ def get(resource_group_name, namespace_name, relay_name, custom_headers:nil)
347
+ response = get_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
347
348
  response.body unless response.nil?
348
349
  end
349
350
 
@@ -359,8 +360,8 @@ module Azure::Relay::Mgmt::V2016_07_01
359
360
  #
360
361
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
361
362
  #
362
- def get_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers = nil)
363
- get_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
363
+ def get_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers:nil)
364
+ get_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
364
365
  end
365
366
 
366
367
  #
@@ -375,7 +376,7 @@ module Azure::Relay::Mgmt::V2016_07_01
375
376
  #
376
377
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
377
378
  #
378
- def get_async(resource_group_name, namespace_name, relay_name, custom_headers = nil)
379
+ def get_async(resource_group_name, namespace_name, relay_name, custom_headers:nil)
379
380
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
380
381
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
381
382
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -390,6 +391,7 @@ module Azure::Relay::Mgmt::V2016_07_01
390
391
 
391
392
 
392
393
  request_headers = {}
394
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
393
395
 
394
396
  # Set Headers
395
397
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -446,8 +448,8 @@ module Azure::Relay::Mgmt::V2016_07_01
446
448
  #
447
449
  # @return [Array<AuthorizationRule>] operation results.
448
450
  #
449
- def list_authorization_rules(resource_group_name, namespace_name, relay_name, custom_headers = nil)
450
- first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers)
451
+ def list_authorization_rules(resource_group_name, namespace_name, relay_name, custom_headers:nil)
452
+ first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers)
451
453
  first_page.get_all_items
452
454
  end
453
455
 
@@ -463,8 +465,8 @@ module Azure::Relay::Mgmt::V2016_07_01
463
465
  #
464
466
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
465
467
  #
466
- def list_authorization_rules_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers = nil)
467
- list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
468
+ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers:nil)
469
+ list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
468
470
  end
469
471
 
470
472
  #
@@ -479,7 +481,7 @@ module Azure::Relay::Mgmt::V2016_07_01
479
481
  #
480
482
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
481
483
  #
482
- def list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers = nil)
484
+ def list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers:nil)
483
485
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
484
486
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
485
487
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -494,6 +496,7 @@ module Azure::Relay::Mgmt::V2016_07_01
494
496
 
495
497
 
496
498
  request_headers = {}
499
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
497
500
 
498
501
  # Set Headers
499
502
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -552,8 +555,8 @@ module Azure::Relay::Mgmt::V2016_07_01
552
555
  #
553
556
  # @return [AuthorizationRule] operation results.
554
557
  #
555
- def create_or_update_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
556
- response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value!
558
+ def create_or_update_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
559
+ response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
557
560
  response.body unless response.nil?
558
561
  end
559
562
 
@@ -571,8 +574,8 @@ module Azure::Relay::Mgmt::V2016_07_01
571
574
  #
572
575
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
573
576
  #
574
- def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
575
- create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value!
577
+ def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
578
+ create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
576
579
  end
577
580
 
578
581
  #
@@ -589,7 +592,7 @@ module Azure::Relay::Mgmt::V2016_07_01
589
592
  #
590
593
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
591
594
  #
592
- def create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
595
+ def create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
593
596
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
594
597
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
595
598
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -608,13 +611,12 @@ module Azure::Relay::Mgmt::V2016_07_01
608
611
 
609
612
 
610
613
  request_headers = {}
614
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
611
615
 
612
616
  # Set Headers
613
617
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
614
618
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
615
619
 
616
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
617
-
618
620
  # Serialize Request
619
621
  request_mapper = Azure::Relay::Mgmt::V2016_07_01::Models::AuthorizationRule.mapper()
620
622
  request_content = @client.serialize(request_mapper, parameters)
@@ -673,8 +675,8 @@ module Azure::Relay::Mgmt::V2016_07_01
673
675
  # will be added to the HTTP request.
674
676
  #
675
677
  #
676
- def delete_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
677
- response = delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
678
+ def delete_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
679
+ response = delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
678
680
  nil
679
681
  end
680
682
 
@@ -691,8 +693,8 @@ module Azure::Relay::Mgmt::V2016_07_01
691
693
  #
692
694
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
693
695
  #
694
- def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
695
- delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
696
+ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
697
+ delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
696
698
  end
697
699
 
698
700
  #
@@ -708,7 +710,7 @@ module Azure::Relay::Mgmt::V2016_07_01
708
710
  #
709
711
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
710
712
  #
711
- def delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
713
+ def delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
712
714
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
713
715
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
714
716
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -726,6 +728,7 @@ module Azure::Relay::Mgmt::V2016_07_01
726
728
 
727
729
 
728
730
  request_headers = {}
731
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
729
732
 
730
733
  # Set Headers
731
734
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -773,8 +776,8 @@ module Azure::Relay::Mgmt::V2016_07_01
773
776
  #
774
777
  # @return [AuthorizationRule] operation results.
775
778
  #
776
- def get_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
777
- response = get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
779
+ def get_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
780
+ response = get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
778
781
  response.body unless response.nil?
779
782
  end
780
783
 
@@ -791,8 +794,8 @@ module Azure::Relay::Mgmt::V2016_07_01
791
794
  #
792
795
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
793
796
  #
794
- def get_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
795
- get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
797
+ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
798
+ get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
796
799
  end
797
800
 
798
801
  #
@@ -808,7 +811,7 @@ module Azure::Relay::Mgmt::V2016_07_01
808
811
  #
809
812
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
810
813
  #
811
- def get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
814
+ def get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
812
815
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
813
816
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
814
817
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -826,6 +829,7 @@ module Azure::Relay::Mgmt::V2016_07_01
826
829
 
827
830
 
828
831
  request_headers = {}
832
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
829
833
 
830
834
  # Set Headers
831
835
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -883,8 +887,8 @@ module Azure::Relay::Mgmt::V2016_07_01
883
887
  #
884
888
  # @return [AuthorizationRuleKeys] operation results.
885
889
  #
886
- def list_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
887
- response = list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
890
+ def list_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
891
+ response = list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
888
892
  response.body unless response.nil?
889
893
  end
890
894
 
@@ -901,8 +905,8 @@ module Azure::Relay::Mgmt::V2016_07_01
901
905
  #
902
906
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
903
907
  #
904
- def list_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
905
- list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value!
908
+ def list_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
909
+ list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:custom_headers).value!
906
910
  end
907
911
 
908
912
  #
@@ -918,7 +922,7 @@ module Azure::Relay::Mgmt::V2016_07_01
918
922
  #
919
923
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
920
924
  #
921
- def list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil)
925
+ def list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers:nil)
922
926
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
923
927
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
924
928
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -936,6 +940,7 @@ module Azure::Relay::Mgmt::V2016_07_01
936
940
 
937
941
 
938
942
  request_headers = {}
943
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
939
944
 
940
945
  # Set Headers
941
946
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -995,8 +1000,8 @@ module Azure::Relay::Mgmt::V2016_07_01
995
1000
  #
996
1001
  # @return [AuthorizationRuleKeys] operation results.
997
1002
  #
998
- def regenerate_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
999
- response = regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value!
1003
+ def regenerate_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
1004
+ response = regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1000
1005
  response.body unless response.nil?
1001
1006
  end
1002
1007
 
@@ -1015,8 +1020,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1015
1020
  #
1016
1021
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1017
1022
  #
1018
- def regenerate_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
1019
- regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value!
1023
+ def regenerate_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
1024
+ regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:custom_headers).value!
1020
1025
  end
1021
1026
 
1022
1027
  #
@@ -1034,7 +1039,7 @@ module Azure::Relay::Mgmt::V2016_07_01
1034
1039
  #
1035
1040
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1036
1041
  #
1037
- def regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil)
1042
+ def regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers:nil)
1038
1043
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1039
1044
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1040
1045
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1053,13 +1058,12 @@ module Azure::Relay::Mgmt::V2016_07_01
1053
1058
 
1054
1059
 
1055
1060
  request_headers = {}
1061
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1056
1062
 
1057
1063
  # Set Headers
1058
1064
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1059
1065
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1060
1066
 
1061
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1062
-
1063
1067
  # Serialize Request
1064
1068
  request_mapper = Azure::Relay::Mgmt::V2016_07_01::Models::RegenerateKeysParameters.mapper()
1065
1069
  request_content = @client.serialize(request_mapper, parameters)
@@ -1116,8 +1120,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1116
1120
  #
1117
1121
  # @return [WcfRelaysListResult] operation results.
1118
1122
  #
1119
- def list_by_namespace_next(next_page_link, custom_headers = nil)
1120
- response = list_by_namespace_next_async(next_page_link, custom_headers).value!
1123
+ def list_by_namespace_next(next_page_link, custom_headers:nil)
1124
+ response = list_by_namespace_next_async(next_page_link, custom_headers:custom_headers).value!
1121
1125
  response.body unless response.nil?
1122
1126
  end
1123
1127
 
@@ -1131,8 +1135,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1131
1135
  #
1132
1136
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1133
1137
  #
1134
- def list_by_namespace_next_with_http_info(next_page_link, custom_headers = nil)
1135
- list_by_namespace_next_async(next_page_link, custom_headers).value!
1138
+ def list_by_namespace_next_with_http_info(next_page_link, custom_headers:nil)
1139
+ list_by_namespace_next_async(next_page_link, custom_headers:custom_headers).value!
1136
1140
  end
1137
1141
 
1138
1142
  #
@@ -1145,11 +1149,12 @@ module Azure::Relay::Mgmt::V2016_07_01
1145
1149
  #
1146
1150
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1147
1151
  #
1148
- def list_by_namespace_next_async(next_page_link, custom_headers = nil)
1152
+ def list_by_namespace_next_async(next_page_link, custom_headers:nil)
1149
1153
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1150
1154
 
1151
1155
 
1152
1156
  request_headers = {}
1157
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1153
1158
 
1154
1159
  # Set Headers
1155
1160
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1203,8 +1208,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1203
1208
  #
1204
1209
  # @return [AuthorizationRuleListResult] operation results.
1205
1210
  #
1206
- def list_authorization_rules_next(next_page_link, custom_headers = nil)
1207
- response = list_authorization_rules_next_async(next_page_link, custom_headers).value!
1211
+ def list_authorization_rules_next(next_page_link, custom_headers:nil)
1212
+ response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1208
1213
  response.body unless response.nil?
1209
1214
  end
1210
1215
 
@@ -1218,8 +1223,8 @@ module Azure::Relay::Mgmt::V2016_07_01
1218
1223
  #
1219
1224
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1220
1225
  #
1221
- def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil)
1222
- list_authorization_rules_next_async(next_page_link, custom_headers).value!
1226
+ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil)
1227
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1223
1228
  end
1224
1229
 
1225
1230
  #
@@ -1232,11 +1237,12 @@ module Azure::Relay::Mgmt::V2016_07_01
1232
1237
  #
1233
1238
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1234
1239
  #
1235
- def list_authorization_rules_next_async(next_page_link, custom_headers = nil)
1240
+ def list_authorization_rules_next_async(next_page_link, custom_headers:nil)
1236
1241
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1237
1242
 
1238
1243
 
1239
1244
  request_headers = {}
1245
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1240
1246
 
1241
1247
  # Set Headers
1242
1248
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1292,12 +1298,12 @@ module Azure::Relay::Mgmt::V2016_07_01
1292
1298
  # @return [WcfRelaysListResult] which provide lazy access to pages of the
1293
1299
  # response.
1294
1300
  #
1295
- def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
1296
- response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value!
1301
+ def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
1302
+ response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1297
1303
  unless response.nil?
1298
1304
  page = response.body
1299
1305
  page.next_method = Proc.new do |next_page_link|
1300
- list_by_namespace_next_async(next_page_link, custom_headers)
1306
+ list_by_namespace_next_async(next_page_link, custom_headers:custom_headers)
1301
1307
  end
1302
1308
  page
1303
1309
  end
@@ -1316,12 +1322,12 @@ module Azure::Relay::Mgmt::V2016_07_01
1316
1322
  # @return [AuthorizationRuleListResult] which provide lazy access to pages of
1317
1323
  # the response.
1318
1324
  #
1319
- def list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers = nil)
1320
- response = list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers).value!
1325
+ def list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers:nil)
1326
+ response = list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers:custom_headers).value!
1321
1327
  unless response.nil?
1322
1328
  page = response.body
1323
1329
  page.next_method = Proc.new do |next_page_link|
1324
- list_authorization_rules_next_async(next_page_link, custom_headers)
1330
+ list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers)
1325
1331
  end
1326
1332
  page
1327
1333
  end