azure_mgmt_policy 0.15.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,6 +108,9 @@ module Azure::Policy::Mgmt::V2016_12_01
108
108
  fail ArgumentError, 'path is nil' if path.nil?
109
109
 
110
110
  request_url = options[:base_url] || @base_url
111
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
112
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
113
+ end
111
114
 
112
115
  request_headers = @request_headers
113
116
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
@@ -124,7 +127,7 @@ module Azure::Policy::Mgmt::V2016_12_01
124
127
  #
125
128
  def add_telemetry
126
129
  sdk_information = 'azure_mgmt_policy'
127
- sdk_information = "#{sdk_information}/0.15.2"
130
+ sdk_information = "#{sdk_information}/0.16.0"
128
131
  add_user_agent_information(sdk_information)
129
132
  end
130
133
  end
@@ -33,8 +33,8 @@ module Azure::Policy::Mgmt::V2016_12_01
33
33
  #
34
34
  # @return [PolicyDefinition] operation results.
35
35
  #
36
- def create_or_update(policy_definition_name, parameters, custom_headers = nil)
37
- response = create_or_update_async(policy_definition_name, parameters, custom_headers).value!
36
+ def create_or_update(policy_definition_name, parameters, custom_headers:nil)
37
+ response = create_or_update_async(policy_definition_name, parameters, custom_headers:custom_headers).value!
38
38
  response.body unless response.nil?
39
39
  end
40
40
 
@@ -49,8 +49,8 @@ module Azure::Policy::Mgmt::V2016_12_01
49
49
  #
50
50
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
51
  #
52
- def create_or_update_with_http_info(policy_definition_name, parameters, custom_headers = nil)
53
- create_or_update_async(policy_definition_name, parameters, custom_headers).value!
52
+ def create_or_update_with_http_info(policy_definition_name, parameters, custom_headers:nil)
53
+ create_or_update_async(policy_definition_name, parameters, custom_headers:custom_headers).value!
54
54
  end
55
55
 
56
56
  #
@@ -64,7 +64,7 @@ module Azure::Policy::Mgmt::V2016_12_01
64
64
  #
65
65
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
66
  #
67
- def create_or_update_async(policy_definition_name, parameters, custom_headers = nil)
67
+ def create_or_update_async(policy_definition_name, parameters, custom_headers:nil)
68
68
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
69
69
  fail ArgumentError, 'parameters is nil' if parameters.nil?
70
70
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -72,13 +72,12 @@ module Azure::Policy::Mgmt::V2016_12_01
72
72
 
73
73
 
74
74
  request_headers = {}
75
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
75
76
 
76
77
  # Set Headers
77
78
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
79
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
80
 
80
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
-
82
81
  # Serialize Request
83
82
  request_mapper = Azure::Policy::Mgmt::V2016_12_01::Models::PolicyDefinition.mapper()
84
83
  request_content = @client.serialize(request_mapper, parameters)
@@ -134,8 +133,8 @@ module Azure::Policy::Mgmt::V2016_12_01
134
133
  # will be added to the HTTP request.
135
134
  #
136
135
  #
137
- def delete(policy_definition_name, custom_headers = nil)
138
- response = delete_async(policy_definition_name, custom_headers).value!
136
+ def delete(policy_definition_name, custom_headers:nil)
137
+ response = delete_async(policy_definition_name, custom_headers:custom_headers).value!
139
138
  nil
140
139
  end
141
140
 
@@ -149,8 +148,8 @@ module Azure::Policy::Mgmt::V2016_12_01
149
148
  #
150
149
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
151
150
  #
152
- def delete_with_http_info(policy_definition_name, custom_headers = nil)
153
- delete_async(policy_definition_name, custom_headers).value!
151
+ def delete_with_http_info(policy_definition_name, custom_headers:nil)
152
+ delete_async(policy_definition_name, custom_headers:custom_headers).value!
154
153
  end
155
154
 
156
155
  #
@@ -163,13 +162,14 @@ module Azure::Policy::Mgmt::V2016_12_01
163
162
  #
164
163
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
165
164
  #
166
- def delete_async(policy_definition_name, custom_headers = nil)
165
+ def delete_async(policy_definition_name, custom_headers:nil)
167
166
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
168
167
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
169
168
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
170
169
 
171
170
 
172
171
  request_headers = {}
172
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
173
173
 
174
174
  # Set Headers
175
175
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -214,8 +214,8 @@ module Azure::Policy::Mgmt::V2016_12_01
214
214
  #
215
215
  # @return [PolicyDefinition] operation results.
216
216
  #
217
- def get(policy_definition_name, custom_headers = nil)
218
- response = get_async(policy_definition_name, custom_headers).value!
217
+ def get(policy_definition_name, custom_headers:nil)
218
+ response = get_async(policy_definition_name, custom_headers:custom_headers).value!
219
219
  response.body unless response.nil?
220
220
  end
221
221
 
@@ -229,8 +229,8 @@ module Azure::Policy::Mgmt::V2016_12_01
229
229
  #
230
230
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
231
231
  #
232
- def get_with_http_info(policy_definition_name, custom_headers = nil)
233
- get_async(policy_definition_name, custom_headers).value!
232
+ def get_with_http_info(policy_definition_name, custom_headers:nil)
233
+ get_async(policy_definition_name, custom_headers:custom_headers).value!
234
234
  end
235
235
 
236
236
  #
@@ -243,13 +243,14 @@ module Azure::Policy::Mgmt::V2016_12_01
243
243
  #
244
244
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
245
245
  #
246
- def get_async(policy_definition_name, custom_headers = nil)
246
+ def get_async(policy_definition_name, custom_headers:nil)
247
247
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
248
248
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
249
249
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
250
250
 
251
251
 
252
252
  request_headers = {}
253
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
253
254
 
254
255
  # Set Headers
255
256
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -304,8 +305,8 @@ module Azure::Policy::Mgmt::V2016_12_01
304
305
  #
305
306
  # @return [PolicyDefinition] operation results.
306
307
  #
307
- def get_built_in(policy_definition_name, custom_headers = nil)
308
- response = get_built_in_async(policy_definition_name, custom_headers).value!
308
+ def get_built_in(policy_definition_name, custom_headers:nil)
309
+ response = get_built_in_async(policy_definition_name, custom_headers:custom_headers).value!
309
310
  response.body unless response.nil?
310
311
  end
311
312
 
@@ -319,8 +320,8 @@ module Azure::Policy::Mgmt::V2016_12_01
319
320
  #
320
321
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
321
322
  #
322
- def get_built_in_with_http_info(policy_definition_name, custom_headers = nil)
323
- get_built_in_async(policy_definition_name, custom_headers).value!
323
+ def get_built_in_with_http_info(policy_definition_name, custom_headers:nil)
324
+ get_built_in_async(policy_definition_name, custom_headers:custom_headers).value!
324
325
  end
325
326
 
326
327
  #
@@ -333,12 +334,13 @@ module Azure::Policy::Mgmt::V2016_12_01
333
334
  #
334
335
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
335
336
  #
336
- def get_built_in_async(policy_definition_name, custom_headers = nil)
337
+ def get_built_in_async(policy_definition_name, custom_headers:nil)
337
338
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
338
339
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
339
340
 
340
341
 
341
342
  request_headers = {}
343
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
342
344
 
343
345
  # Set Headers
344
346
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -395,8 +397,8 @@ module Azure::Policy::Mgmt::V2016_12_01
395
397
  #
396
398
  # @return [PolicyDefinition] operation results.
397
399
  #
398
- def create_or_update_at_management_group(policy_definition_name, parameters, management_group_id, custom_headers = nil)
399
- response = create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers).value!
400
+ def create_or_update_at_management_group(policy_definition_name, parameters, management_group_id, custom_headers:nil)
401
+ response = create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers:custom_headers).value!
400
402
  response.body unless response.nil?
401
403
  end
402
404
 
@@ -412,8 +414,8 @@ module Azure::Policy::Mgmt::V2016_12_01
412
414
  #
413
415
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
414
416
  #
415
- def create_or_update_at_management_group_with_http_info(policy_definition_name, parameters, management_group_id, custom_headers = nil)
416
- create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers).value!
417
+ def create_or_update_at_management_group_with_http_info(policy_definition_name, parameters, management_group_id, custom_headers:nil)
418
+ create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers:custom_headers).value!
417
419
  end
418
420
 
419
421
  #
@@ -428,7 +430,7 @@ module Azure::Policy::Mgmt::V2016_12_01
428
430
  #
429
431
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
430
432
  #
431
- def create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers = nil)
433
+ def create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers:nil)
432
434
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
433
435
  fail ArgumentError, 'parameters is nil' if parameters.nil?
434
436
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -436,13 +438,12 @@ module Azure::Policy::Mgmt::V2016_12_01
436
438
 
437
439
 
438
440
  request_headers = {}
441
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
439
442
 
440
443
  # Set Headers
441
444
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
442
445
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
443
446
 
444
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
445
-
446
447
  # Serialize Request
447
448
  request_mapper = Azure::Policy::Mgmt::V2016_12_01::Models::PolicyDefinition.mapper()
448
449
  request_content = @client.serialize(request_mapper, parameters)
@@ -499,8 +500,8 @@ module Azure::Policy::Mgmt::V2016_12_01
499
500
  # will be added to the HTTP request.
500
501
  #
501
502
  #
502
- def delete_at_management_group(policy_definition_name, management_group_id, custom_headers = nil)
503
- response = delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers).value!
503
+ def delete_at_management_group(policy_definition_name, management_group_id, custom_headers:nil)
504
+ response = delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers:custom_headers).value!
504
505
  nil
505
506
  end
506
507
 
@@ -515,8 +516,8 @@ module Azure::Policy::Mgmt::V2016_12_01
515
516
  #
516
517
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
517
518
  #
518
- def delete_at_management_group_with_http_info(policy_definition_name, management_group_id, custom_headers = nil)
519
- delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers).value!
519
+ def delete_at_management_group_with_http_info(policy_definition_name, management_group_id, custom_headers:nil)
520
+ delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers:custom_headers).value!
520
521
  end
521
522
 
522
523
  #
@@ -530,13 +531,14 @@ module Azure::Policy::Mgmt::V2016_12_01
530
531
  #
531
532
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
532
533
  #
533
- def delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers = nil)
534
+ def delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers:nil)
534
535
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
535
536
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
536
537
  fail ArgumentError, 'management_group_id is nil' if management_group_id.nil?
537
538
 
538
539
 
539
540
  request_headers = {}
541
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
540
542
 
541
543
  # Set Headers
542
544
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -582,8 +584,8 @@ module Azure::Policy::Mgmt::V2016_12_01
582
584
  #
583
585
  # @return [PolicyDefinition] operation results.
584
586
  #
585
- def get_at_management_group(policy_definition_name, management_group_id, custom_headers = nil)
586
- response = get_at_management_group_async(policy_definition_name, management_group_id, custom_headers).value!
587
+ def get_at_management_group(policy_definition_name, management_group_id, custom_headers:nil)
588
+ response = get_at_management_group_async(policy_definition_name, management_group_id, custom_headers:custom_headers).value!
587
589
  response.body unless response.nil?
588
590
  end
589
591
 
@@ -598,8 +600,8 @@ module Azure::Policy::Mgmt::V2016_12_01
598
600
  #
599
601
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
600
602
  #
601
- def get_at_management_group_with_http_info(policy_definition_name, management_group_id, custom_headers = nil)
602
- get_at_management_group_async(policy_definition_name, management_group_id, custom_headers).value!
603
+ def get_at_management_group_with_http_info(policy_definition_name, management_group_id, custom_headers:nil)
604
+ get_at_management_group_async(policy_definition_name, management_group_id, custom_headers:custom_headers).value!
603
605
  end
604
606
 
605
607
  #
@@ -613,13 +615,14 @@ module Azure::Policy::Mgmt::V2016_12_01
613
615
  #
614
616
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
615
617
  #
616
- def get_at_management_group_async(policy_definition_name, management_group_id, custom_headers = nil)
618
+ def get_at_management_group_async(policy_definition_name, management_group_id, custom_headers:nil)
617
619
  fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil?
618
620
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
619
621
  fail ArgumentError, 'management_group_id is nil' if management_group_id.nil?
620
622
 
621
623
 
622
624
  request_headers = {}
625
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
623
626
 
624
627
  # Set Headers
625
628
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -672,8 +675,8 @@ module Azure::Policy::Mgmt::V2016_12_01
672
675
  #
673
676
  # @return [Array<PolicyDefinition>] operation results.
674
677
  #
675
- def list(custom_headers = nil)
676
- first_page = list_as_lazy(custom_headers)
678
+ def list(custom_headers:nil)
679
+ first_page = list_as_lazy(custom_headers:custom_headers)
677
680
  first_page.get_all_items
678
681
  end
679
682
 
@@ -685,8 +688,8 @@ module Azure::Policy::Mgmt::V2016_12_01
685
688
  #
686
689
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
687
690
  #
688
- def list_with_http_info(custom_headers = nil)
689
- list_async(custom_headers).value!
691
+ def list_with_http_info(custom_headers:nil)
692
+ list_async(custom_headers:custom_headers).value!
690
693
  end
691
694
 
692
695
  #
@@ -697,12 +700,13 @@ module Azure::Policy::Mgmt::V2016_12_01
697
700
  #
698
701
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
699
702
  #
700
- def list_async(custom_headers = nil)
703
+ def list_async(custom_headers:nil)
701
704
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
702
705
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
703
706
 
704
707
 
705
708
  request_headers = {}
709
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
706
710
 
707
711
  # Set Headers
708
712
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -755,8 +759,8 @@ module Azure::Policy::Mgmt::V2016_12_01
755
759
  #
756
760
  # @return [Array<PolicyDefinition>] operation results.
757
761
  #
758
- def list_built_in(custom_headers = nil)
759
- first_page = list_built_in_as_lazy(custom_headers)
762
+ def list_built_in(custom_headers:nil)
763
+ first_page = list_built_in_as_lazy(custom_headers:custom_headers)
760
764
  first_page.get_all_items
761
765
  end
762
766
 
@@ -768,8 +772,8 @@ module Azure::Policy::Mgmt::V2016_12_01
768
772
  #
769
773
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
770
774
  #
771
- def list_built_in_with_http_info(custom_headers = nil)
772
- list_built_in_async(custom_headers).value!
775
+ def list_built_in_with_http_info(custom_headers:nil)
776
+ list_built_in_async(custom_headers:custom_headers).value!
773
777
  end
774
778
 
775
779
  #
@@ -780,11 +784,12 @@ module Azure::Policy::Mgmt::V2016_12_01
780
784
  #
781
785
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
782
786
  #
783
- def list_built_in_async(custom_headers = nil)
787
+ def list_built_in_async(custom_headers:nil)
784
788
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
785
789
 
786
790
 
787
791
  request_headers = {}
792
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
788
793
 
789
794
  # Set Headers
790
795
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -837,8 +842,8 @@ module Azure::Policy::Mgmt::V2016_12_01
837
842
  #
838
843
  # @return [Array<PolicyDefinition>] operation results.
839
844
  #
840
- def list_by_management_group(management_group_id, custom_headers = nil)
841
- first_page = list_by_management_group_as_lazy(management_group_id, custom_headers)
845
+ def list_by_management_group(management_group_id, custom_headers:nil)
846
+ first_page = list_by_management_group_as_lazy(management_group_id, custom_headers:custom_headers)
842
847
  first_page.get_all_items
843
848
  end
844
849
 
@@ -851,8 +856,8 @@ module Azure::Policy::Mgmt::V2016_12_01
851
856
  #
852
857
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
853
858
  #
854
- def list_by_management_group_with_http_info(management_group_id, custom_headers = nil)
855
- list_by_management_group_async(management_group_id, custom_headers).value!
859
+ def list_by_management_group_with_http_info(management_group_id, custom_headers:nil)
860
+ list_by_management_group_async(management_group_id, custom_headers:custom_headers).value!
856
861
  end
857
862
 
858
863
  #
@@ -864,12 +869,13 @@ module Azure::Policy::Mgmt::V2016_12_01
864
869
  #
865
870
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
866
871
  #
867
- def list_by_management_group_async(management_group_id, custom_headers = nil)
872
+ def list_by_management_group_async(management_group_id, custom_headers:nil)
868
873
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
869
874
  fail ArgumentError, 'management_group_id is nil' if management_group_id.nil?
870
875
 
871
876
 
872
877
  request_headers = {}
878
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
873
879
 
874
880
  # Set Headers
875
881
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -924,8 +930,8 @@ module Azure::Policy::Mgmt::V2016_12_01
924
930
  #
925
931
  # @return [PolicyDefinitionListResult] operation results.
926
932
  #
927
- def list_next(next_page_link, custom_headers = nil)
928
- response = list_next_async(next_page_link, custom_headers).value!
933
+ def list_next(next_page_link, custom_headers:nil)
934
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
929
935
  response.body unless response.nil?
930
936
  end
931
937
 
@@ -939,8 +945,8 @@ module Azure::Policy::Mgmt::V2016_12_01
939
945
  #
940
946
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
941
947
  #
942
- def list_next_with_http_info(next_page_link, custom_headers = nil)
943
- list_next_async(next_page_link, custom_headers).value!
948
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
949
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
944
950
  end
945
951
 
946
952
  #
@@ -953,11 +959,12 @@ module Azure::Policy::Mgmt::V2016_12_01
953
959
  #
954
960
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
955
961
  #
956
- def list_next_async(next_page_link, custom_headers = nil)
962
+ def list_next_async(next_page_link, custom_headers:nil)
957
963
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
958
964
 
959
965
 
960
966
  request_headers = {}
967
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
961
968
 
962
969
  # Set Headers
963
970
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1011,8 +1018,8 @@ module Azure::Policy::Mgmt::V2016_12_01
1011
1018
  #
1012
1019
  # @return [PolicyDefinitionListResult] operation results.
1013
1020
  #
1014
- def list_built_in_next(next_page_link, custom_headers = nil)
1015
- response = list_built_in_next_async(next_page_link, custom_headers).value!
1021
+ def list_built_in_next(next_page_link, custom_headers:nil)
1022
+ response = list_built_in_next_async(next_page_link, custom_headers:custom_headers).value!
1016
1023
  response.body unless response.nil?
1017
1024
  end
1018
1025
 
@@ -1026,8 +1033,8 @@ module Azure::Policy::Mgmt::V2016_12_01
1026
1033
  #
1027
1034
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1028
1035
  #
1029
- def list_built_in_next_with_http_info(next_page_link, custom_headers = nil)
1030
- list_built_in_next_async(next_page_link, custom_headers).value!
1036
+ def list_built_in_next_with_http_info(next_page_link, custom_headers:nil)
1037
+ list_built_in_next_async(next_page_link, custom_headers:custom_headers).value!
1031
1038
  end
1032
1039
 
1033
1040
  #
@@ -1040,11 +1047,12 @@ module Azure::Policy::Mgmt::V2016_12_01
1040
1047
  #
1041
1048
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1042
1049
  #
1043
- def list_built_in_next_async(next_page_link, custom_headers = nil)
1050
+ def list_built_in_next_async(next_page_link, custom_headers:nil)
1044
1051
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1045
1052
 
1046
1053
 
1047
1054
  request_headers = {}
1055
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1048
1056
 
1049
1057
  # Set Headers
1050
1058
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1098,8 +1106,8 @@ module Azure::Policy::Mgmt::V2016_12_01
1098
1106
  #
1099
1107
  # @return [PolicyDefinitionListResult] operation results.
1100
1108
  #
1101
- def list_by_management_group_next(next_page_link, custom_headers = nil)
1102
- response = list_by_management_group_next_async(next_page_link, custom_headers).value!
1109
+ def list_by_management_group_next(next_page_link, custom_headers:nil)
1110
+ response = list_by_management_group_next_async(next_page_link, custom_headers:custom_headers).value!
1103
1111
  response.body unless response.nil?
1104
1112
  end
1105
1113
 
@@ -1113,8 +1121,8 @@ module Azure::Policy::Mgmt::V2016_12_01
1113
1121
  #
1114
1122
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1115
1123
  #
1116
- def list_by_management_group_next_with_http_info(next_page_link, custom_headers = nil)
1117
- list_by_management_group_next_async(next_page_link, custom_headers).value!
1124
+ def list_by_management_group_next_with_http_info(next_page_link, custom_headers:nil)
1125
+ list_by_management_group_next_async(next_page_link, custom_headers:custom_headers).value!
1118
1126
  end
1119
1127
 
1120
1128
  #
@@ -1127,11 +1135,12 @@ module Azure::Policy::Mgmt::V2016_12_01
1127
1135
  #
1128
1136
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1129
1137
  #
1130
- def list_by_management_group_next_async(next_page_link, custom_headers = nil)
1138
+ def list_by_management_group_next_async(next_page_link, custom_headers:nil)
1131
1139
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1132
1140
 
1133
1141
 
1134
1142
  request_headers = {}
1143
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1135
1144
 
1136
1145
  # Set Headers
1137
1146
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1184,12 +1193,12 @@ module Azure::Policy::Mgmt::V2016_12_01
1184
1193
  # @return [PolicyDefinitionListResult] which provide lazy access to pages of
1185
1194
  # the response.
1186
1195
  #
1187
- def list_as_lazy(custom_headers = nil)
1188
- response = list_async(custom_headers).value!
1196
+ def list_as_lazy(custom_headers:nil)
1197
+ response = list_async(custom_headers:custom_headers).value!
1189
1198
  unless response.nil?
1190
1199
  page = response.body
1191
1200
  page.next_method = Proc.new do |next_page_link|
1192
- list_next_async(next_page_link, custom_headers)
1201
+ list_next_async(next_page_link, custom_headers:custom_headers)
1193
1202
  end
1194
1203
  page
1195
1204
  end
@@ -1204,12 +1213,12 @@ module Azure::Policy::Mgmt::V2016_12_01
1204
1213
  # @return [PolicyDefinitionListResult] which provide lazy access to pages of
1205
1214
  # the response.
1206
1215
  #
1207
- def list_built_in_as_lazy(custom_headers = nil)
1208
- response = list_built_in_async(custom_headers).value!
1216
+ def list_built_in_as_lazy(custom_headers:nil)
1217
+ response = list_built_in_async(custom_headers:custom_headers).value!
1209
1218
  unless response.nil?
1210
1219
  page = response.body
1211
1220
  page.next_method = Proc.new do |next_page_link|
1212
- list_built_in_next_async(next_page_link, custom_headers)
1221
+ list_built_in_next_async(next_page_link, custom_headers:custom_headers)
1213
1222
  end
1214
1223
  page
1215
1224
  end
@@ -1225,12 +1234,12 @@ module Azure::Policy::Mgmt::V2016_12_01
1225
1234
  # @return [PolicyDefinitionListResult] which provide lazy access to pages of
1226
1235
  # the response.
1227
1236
  #
1228
- def list_by_management_group_as_lazy(management_group_id, custom_headers = nil)
1229
- response = list_by_management_group_async(management_group_id, custom_headers).value!
1237
+ def list_by_management_group_as_lazy(management_group_id, custom_headers:nil)
1238
+ response = list_by_management_group_async(management_group_id, custom_headers:custom_headers).value!
1230
1239
  unless response.nil?
1231
1240
  page = response.body
1232
1241
  page.next_method = Proc.new do |next_page_link|
1233
- list_by_management_group_next_async(next_page_link, custom_headers)
1242
+ list_by_management_group_next_async(next_page_link, custom_headers:custom_headers)
1234
1243
  end
1235
1244
  page
1236
1245
  end