azure_mgmt_cdn 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-01/generated/azure_mgmt_cdn/cdn_management_client.rb +4 -1
  3. data/lib/2015-06-01/generated/azure_mgmt_cdn/custom_domains.rb +38 -37
  4. data/lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb +88 -88
  5. data/lib/2015-06-01/generated/azure_mgmt_cdn/name_availability.rb +6 -7
  6. data/lib/2015-06-01/generated/azure_mgmt_cdn/operations.rb +6 -5
  7. data/lib/2015-06-01/generated/azure_mgmt_cdn/origins.rb +42 -41
  8. data/lib/2015-06-01/generated/azure_mgmt_cdn/profiles.rb +54 -51
  9. data/lib/2016-04-02/generated/azure_mgmt_cdn.rb +70 -0
  10. data/lib/2016-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +151 -0
  11. data/lib/2016-04-02/generated/azure_mgmt_cdn/custom_domains.rb +719 -0
  12. data/lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb +1456 -0
  13. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  14. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +69 -0
  15. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain.rb +103 -0
  16. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +57 -0
  17. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +47 -0
  18. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  19. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/deep_created_origin.rb +82 -0
  20. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint.rb +249 -0
  21. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_create_parameters.rb +185 -0
  22. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +56 -0
  23. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  24. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +152 -0
  25. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/error_response.rb +58 -0
  26. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  27. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/operation.rb +58 -0
  28. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/operation_display.rb +70 -0
  29. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/operation_list_result.rb +57 -0
  30. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin.rb +128 -0
  31. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin_list_result.rb +56 -0
  32. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin_parameters.rb +71 -0
  33. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  34. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile.rb +128 -0
  35. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_create_parameters.rb +77 -0
  36. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_list_result.rb +56 -0
  37. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  38. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  39. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/provisioning_state.rb +17 -0
  40. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  41. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  42. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/resource.rb +72 -0
  43. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  44. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/sku.rb +49 -0
  45. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/sku_name.rb +18 -0
  46. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/sso_uri.rb +46 -0
  47. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
  48. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  49. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +70 -0
  50. data/lib/2016-04-02/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  51. data/lib/2016-04-02/generated/azure_mgmt_cdn/name_availability.rb +130 -0
  52. data/lib/2016-04-02/generated/azure_mgmt_cdn/operations.rb +110 -0
  53. data/lib/2016-04-02/generated/azure_mgmt_cdn/origins.rb +778 -0
  54. data/lib/2016-04-02/generated/azure_mgmt_cdn/profiles.rb +899 -0
  55. data/lib/2016-10-02/generated/azure_mgmt_cdn/cdn_management_client.rb +46 -38
  56. data/lib/2016-10-02/generated/azure_mgmt_cdn/custom_domains.rb +53 -48
  57. data/lib/2016-10-02/generated/azure_mgmt_cdn/edge_nodes.rb +15 -13
  58. data/lib/2016-10-02/generated/azure_mgmt_cdn/endpoints.rb +112 -109
  59. data/lib/2016-10-02/generated/azure_mgmt_cdn/origins.rb +31 -29
  60. data/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb +93 -85
  61. data/lib/2017-04-02/generated/azure_mgmt_cdn.rb +18 -16
  62. data/lib/2017-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +16 -15
  63. data/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb +53 -48
  64. data/lib/2017-04-02/generated/azure_mgmt_cdn/edge_nodes.rb +15 -13
  65. data/lib/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb +136 -113
  66. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/custom_domain.rb +1 -25
  67. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/edge_node.rb +1 -25
  68. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/endpoint.rb +6 -3
  69. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +5 -2
  70. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/origin.rb +1 -1
  71. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/profile.rb +1 -1
  72. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +1 -1
  73. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/proxy_resource.rb +63 -0
  74. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/resource.rb +1 -31
  75. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
  76. data/lib/2017-04-02/generated/azure_mgmt_cdn/operations.rb +15 -13
  77. data/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb +31 -29
  78. data/lib/2017-04-02/generated/azure_mgmt_cdn/profiles.rb +93 -85
  79. data/lib/2017-04-02/generated/azure_mgmt_cdn/resource_usage_operations.rb +15 -13
  80. data/lib/2017-10-12/generated/azure_mgmt_cdn.rb +93 -0
  81. data/lib/2017-10-12/generated/azure_mgmt_cdn/cdn_management_client.rb +358 -0
  82. data/lib/2017-10-12/generated/azure_mgmt_cdn/custom_domains.rb +970 -0
  83. data/lib/2017-10-12/generated/azure_mgmt_cdn/edge_nodes.rb +223 -0
  84. data/lib/2017-10-12/generated/azure_mgmt_cdn/endpoints.rb +1922 -0
  85. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/cache_expiration_action_parameters.rb +89 -0
  86. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  87. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +72 -0
  88. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +57 -0
  89. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain.rb +148 -0
  90. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +102 -0
  91. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +48 -0
  92. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  93. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
  94. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb +24 -0
  95. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/deep_created_origin.rb +91 -0
  96. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule.rb +96 -0
  97. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_action.rb +46 -0
  98. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_cache_expiration_action.rb +64 -0
  99. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_condition.rb +47 -0
  100. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_url_file_extension_condition.rb +64 -0
  101. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_url_path_condition.rb +64 -0
  102. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/edge_node.rb +83 -0
  103. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/edgenode_result.rb +101 -0
  104. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint.rb +318 -0
  105. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +101 -0
  106. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_delivery_policy.rb +67 -0
  107. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  108. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +223 -0
  109. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/error_response.rb +60 -0
  110. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/geo_filter.rb +80 -0
  111. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
  112. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/ip_address_group.rb +86 -0
  113. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  114. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operation.rb +59 -0
  115. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operation_display.rb +72 -0
  116. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operations_list_result.rb +102 -0
  117. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/optimization_type.rb +19 -0
  118. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin.rb +158 -0
  119. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_list_result.rb +101 -0
  120. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  121. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +79 -0
  122. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile.rb +125 -0
  123. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_list_result.rb +101 -0
  124. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  125. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  126. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/proxy_resource.rb +63 -0
  127. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  128. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  129. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource.rb +71 -0
  130. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  131. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_usage.rb +83 -0
  132. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +100 -0
  133. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/sku.rb +49 -0
  134. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/sku_name.rb +19 -0
  135. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/sso_uri.rb +48 -0
  136. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb +56 -0
  137. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
  138. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/url_file_extension_condition_parameters.rb +70 -0
  139. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/url_path_condition_parameters.rb +72 -0
  140. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  141. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +72 -0
  142. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_probe_input.rb +46 -0
  143. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_probe_output.rb +73 -0
  144. data/lib/2017-10-12/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  145. data/lib/2017-10-12/generated/azure_mgmt_cdn/operations.rb +217 -0
  146. data/lib/2017-10-12/generated/azure_mgmt_cdn/origins.rb +556 -0
  147. data/lib/2017-10-12/generated/azure_mgmt_cdn/profiles.rb +1460 -0
  148. data/lib/2017-10-12/generated/azure_mgmt_cdn/resource_usage_operations.rb +226 -0
  149. data/lib/azure_mgmt_cdn.rb +2 -0
  150. data/lib/profiles/latest/cdn_latest_profile_client.rb +28 -9
  151. data/lib/profiles/latest/cdn_module_definition.rb +0 -1
  152. data/lib/profiles/latest/modules/cdn_profile_module.rb +277 -210
  153. data/lib/version.rb +1 -1
  154. metadata +119 -2
@@ -32,8 +32,8 @@ module Azure::CDN::Mgmt::V2017_04_02
32
32
  #
33
33
  # @return [Array<EdgeNode>] operation results.
34
34
  #
35
- def list(custom_headers = nil)
36
- first_page = list_as_lazy(custom_headers)
35
+ def list(custom_headers:nil)
36
+ first_page = list_as_lazy(custom_headers:custom_headers)
37
37
  first_page.get_all_items
38
38
  end
39
39
 
@@ -46,8 +46,8 @@ module Azure::CDN::Mgmt::V2017_04_02
46
46
  #
47
47
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
48
  #
49
- def list_with_http_info(custom_headers = nil)
50
- list_async(custom_headers).value!
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
51
  end
52
52
 
53
53
  #
@@ -59,11 +59,12 @@ module Azure::CDN::Mgmt::V2017_04_02
59
59
  #
60
60
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
61
61
  #
62
- def list_async(custom_headers = nil)
62
+ def list_async(custom_headers:nil)
63
63
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
64
64
 
65
65
 
66
66
  request_headers = {}
67
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
67
68
 
68
69
  # Set Headers
69
70
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -118,8 +119,8 @@ module Azure::CDN::Mgmt::V2017_04_02
118
119
  #
119
120
  # @return [EdgenodeResult] operation results.
120
121
  #
121
- def list_next(next_page_link, custom_headers = nil)
122
- response = list_next_async(next_page_link, custom_headers).value!
122
+ def list_next(next_page_link, custom_headers:nil)
123
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
123
124
  response.body unless response.nil?
124
125
  end
125
126
 
@@ -134,8 +135,8 @@ module Azure::CDN::Mgmt::V2017_04_02
134
135
  #
135
136
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
136
137
  #
137
- def list_next_with_http_info(next_page_link, custom_headers = nil)
138
- list_next_async(next_page_link, custom_headers).value!
138
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
139
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
139
140
  end
140
141
 
141
142
  #
@@ -149,11 +150,12 @@ module Azure::CDN::Mgmt::V2017_04_02
149
150
  #
150
151
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
151
152
  #
152
- def list_next_async(next_page_link, custom_headers = nil)
153
+ def list_next_async(next_page_link, custom_headers:nil)
153
154
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
154
155
 
155
156
 
156
157
  request_headers = {}
158
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
157
159
 
158
160
  # Set Headers
159
161
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -206,12 +208,12 @@ module Azure::CDN::Mgmt::V2017_04_02
206
208
  #
207
209
  # @return [EdgenodeResult] which provide lazy access to pages of the response.
208
210
  #
209
- def list_as_lazy(custom_headers = nil)
210
- response = list_async(custom_headers).value!
211
+ def list_as_lazy(custom_headers:nil)
212
+ response = list_async(custom_headers:custom_headers).value!
211
213
  unless response.nil?
212
214
  page = response.body
213
215
  page.next_method = Proc.new do |next_page_link|
214
- list_next_async(next_page_link, custom_headers)
216
+ list_next_async(next_page_link, custom_headers:custom_headers)
215
217
  end
216
218
  page
217
219
  end
@@ -35,8 +35,8 @@ module Azure::CDN::Mgmt::V2017_04_02
35
35
  #
36
36
  # @return [Array<Endpoint>] operation results.
37
37
  #
38
- def list_by_profile(resource_group_name, profile_name, custom_headers = nil)
39
- first_page = list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers)
38
+ def list_by_profile(resource_group_name, profile_name, custom_headers:nil)
39
+ first_page = list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers:custom_headers)
40
40
  first_page.get_all_items
41
41
  end
42
42
 
@@ -52,8 +52,8 @@ module Azure::CDN::Mgmt::V2017_04_02
52
52
  #
53
53
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
54
  #
55
- def list_by_profile_with_http_info(resource_group_name, profile_name, custom_headers = nil)
56
- list_by_profile_async(resource_group_name, profile_name, custom_headers).value!
55
+ def list_by_profile_with_http_info(resource_group_name, profile_name, custom_headers:nil)
56
+ list_by_profile_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
57
57
  end
58
58
 
59
59
  #
@@ -68,7 +68,7 @@ module Azure::CDN::Mgmt::V2017_04_02
68
68
  #
69
69
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
70
70
  #
71
- def list_by_profile_async(resource_group_name, profile_name, custom_headers = nil)
71
+ def list_by_profile_async(resource_group_name, profile_name, custom_headers:nil)
72
72
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
73
73
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
74
74
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -79,6 +79,7 @@ module Azure::CDN::Mgmt::V2017_04_02
79
79
 
80
80
 
81
81
  request_headers = {}
82
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
82
83
 
83
84
  # Set Headers
84
85
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -138,8 +139,8 @@ module Azure::CDN::Mgmt::V2017_04_02
138
139
  #
139
140
  # @return [Endpoint] operation results.
140
141
  #
141
- def get(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
142
- response = get_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
142
+ def get(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
143
+ response = get_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
143
144
  response.body unless response.nil?
144
145
  end
145
146
 
@@ -158,8 +159,8 @@ module Azure::CDN::Mgmt::V2017_04_02
158
159
  #
159
160
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
160
161
  #
161
- def get_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
162
- get_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
162
+ def get_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
163
+ get_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
163
164
  end
164
165
 
165
166
  #
@@ -177,7 +178,7 @@ module Azure::CDN::Mgmt::V2017_04_02
177
178
  #
178
179
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
179
180
  #
180
- def get_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
181
+ def get_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
181
182
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
182
183
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
183
184
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -189,6 +190,7 @@ module Azure::CDN::Mgmt::V2017_04_02
189
190
 
190
191
 
191
192
  request_headers = {}
193
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
192
194
 
193
195
  # Set Headers
194
196
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -249,8 +251,8 @@ module Azure::CDN::Mgmt::V2017_04_02
249
251
  #
250
252
  # @return [Endpoint] operation results.
251
253
  #
252
- def create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
253
- response = create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers).value!
254
+ def create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
255
+ response = create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers).value!
254
256
  response.body unless response.nil?
255
257
  end
256
258
 
@@ -268,9 +270,9 @@ module Azure::CDN::Mgmt::V2017_04_02
268
270
  # @return [Concurrent::Promise] promise which provides async access to http
269
271
  # response.
270
272
  #
271
- def create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
273
+ def create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
272
274
  # Send request
273
- promise = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers)
275
+ promise = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers)
274
276
 
275
277
  promise = promise.then do |response|
276
278
  # Defining deserialization method.
@@ -306,8 +308,8 @@ module Azure::CDN::Mgmt::V2017_04_02
306
308
  #
307
309
  # @return [Endpoint] operation results.
308
310
  #
309
- def update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
310
- response = update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers).value!
311
+ def update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
312
+ response = update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers).value!
311
313
  response.body unless response.nil?
312
314
  end
313
315
 
@@ -326,9 +328,9 @@ module Azure::CDN::Mgmt::V2017_04_02
326
328
  # @return [Concurrent::Promise] promise which provides async access to http
327
329
  # response.
328
330
  #
329
- def update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
331
+ def update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
330
332
  # Send request
331
- promise = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers)
333
+ promise = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers)
332
334
 
333
335
  promise = promise.then do |response|
334
336
  # Defining deserialization method.
@@ -357,8 +359,8 @@ module Azure::CDN::Mgmt::V2017_04_02
357
359
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
358
360
  # will be added to the HTTP request.
359
361
  #
360
- def delete(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
361
- response = delete_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
362
+ def delete(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
363
+ response = delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
362
364
  nil
363
365
  end
364
366
 
@@ -375,9 +377,9 @@ module Azure::CDN::Mgmt::V2017_04_02
375
377
  # @return [Concurrent::Promise] promise which provides async access to http
376
378
  # response.
377
379
  #
378
- def delete_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
380
+ def delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
379
381
  # Send request
380
- promise = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers)
382
+ promise = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
381
383
 
382
384
  promise = promise.then do |response|
383
385
  # Defining deserialization method.
@@ -405,8 +407,8 @@ module Azure::CDN::Mgmt::V2017_04_02
405
407
  #
406
408
  # @return [Endpoint] operation results.
407
409
  #
408
- def start(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
409
- response = start_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
410
+ def start(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
411
+ response = start_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
410
412
  response.body unless response.nil?
411
413
  end
412
414
 
@@ -423,9 +425,9 @@ module Azure::CDN::Mgmt::V2017_04_02
423
425
  # @return [Concurrent::Promise] promise which provides async access to http
424
426
  # response.
425
427
  #
426
- def start_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
428
+ def start_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
427
429
  # Send request
428
- promise = begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers)
430
+ promise = begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
429
431
 
430
432
  promise = promise.then do |response|
431
433
  # Defining deserialization method.
@@ -455,8 +457,8 @@ module Azure::CDN::Mgmt::V2017_04_02
455
457
  #
456
458
  # @return [Endpoint] operation results.
457
459
  #
458
- def stop(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
459
- response = stop_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
460
+ def stop(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
461
+ response = stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
460
462
  response.body unless response.nil?
461
463
  end
462
464
 
@@ -473,9 +475,9 @@ module Azure::CDN::Mgmt::V2017_04_02
473
475
  # @return [Concurrent::Promise] promise which provides async access to http
474
476
  # response.
475
477
  #
476
- def stop_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
478
+ def stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
477
479
  # Send request
478
- promise = begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers)
480
+ promise = begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
479
481
 
480
482
  promise = promise.then do |response|
481
483
  # Defining deserialization method.
@@ -507,8 +509,8 @@ module Azure::CDN::Mgmt::V2017_04_02
507
509
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
508
510
  # will be added to the HTTP request.
509
511
  #
510
- def purge_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
511
- response = purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
512
+ def purge_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
513
+ response = purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
512
514
  nil
513
515
  end
514
516
 
@@ -529,9 +531,9 @@ module Azure::CDN::Mgmt::V2017_04_02
529
531
  # @return [Concurrent::Promise] promise which provides async access to http
530
532
  # response.
531
533
  #
532
- def purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
534
+ def purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
533
535
  # Send request
534
- promise = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers)
536
+ promise = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers)
535
537
 
536
538
  promise = promise.then do |response|
537
539
  # Defining deserialization method.
@@ -560,8 +562,8 @@ module Azure::CDN::Mgmt::V2017_04_02
560
562
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
561
563
  # will be added to the HTTP request.
562
564
  #
563
- def load_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
564
- response = load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
565
+ def load_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
566
+ response = load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
565
567
  nil
566
568
  end
567
569
 
@@ -581,9 +583,9 @@ module Azure::CDN::Mgmt::V2017_04_02
581
583
  # @return [Concurrent::Promise] promise which provides async access to http
582
584
  # response.
583
585
  #
584
- def load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
586
+ def load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
585
587
  # Send request
586
- promise = begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers)
588
+ promise = begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers)
587
589
 
588
590
  promise = promise.then do |response|
589
591
  # Defining deserialization method.
@@ -614,8 +616,8 @@ module Azure::CDN::Mgmt::V2017_04_02
614
616
  #
615
617
  # @return [ValidateCustomDomainOutput] operation results.
616
618
  #
617
- def validate_custom_domain(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers = nil)
618
- response = validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers).value!
619
+ def validate_custom_domain(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
620
+ response = validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:custom_headers).value!
619
621
  response.body unless response.nil?
620
622
  end
621
623
 
@@ -636,8 +638,8 @@ module Azure::CDN::Mgmt::V2017_04_02
636
638
  #
637
639
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
638
640
  #
639
- def validate_custom_domain_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers = nil)
640
- validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers).value!
641
+ def validate_custom_domain_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
642
+ validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:custom_headers).value!
641
643
  end
642
644
 
643
645
  #
@@ -657,7 +659,7 @@ module Azure::CDN::Mgmt::V2017_04_02
657
659
  #
658
660
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
659
661
  #
660
- def validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers = nil)
662
+ def validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
661
663
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
662
664
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
663
665
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -670,13 +672,12 @@ module Azure::CDN::Mgmt::V2017_04_02
670
672
 
671
673
 
672
674
  request_headers = {}
675
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
673
676
 
674
677
  # Set Headers
675
678
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
676
679
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
677
680
 
678
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
679
-
680
681
  # Serialize Request
681
682
  request_mapper = Azure::CDN::Mgmt::V2017_04_02::Models::ValidateCustomDomainInput.mapper()
682
683
  request_content = @client.serialize(request_mapper, custom_domain_properties)
@@ -738,8 +739,8 @@ module Azure::CDN::Mgmt::V2017_04_02
738
739
  #
739
740
  # @return [Array<ResourceUsage>] operation results.
740
741
  #
741
- def list_resource_usage(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
742
- first_page = list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers)
742
+ def list_resource_usage(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
743
+ first_page = list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
743
744
  first_page.get_all_items
744
745
  end
745
746
 
@@ -758,8 +759,8 @@ module Azure::CDN::Mgmt::V2017_04_02
758
759
  #
759
760
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
760
761
  #
761
- def list_resource_usage_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
762
- list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
762
+ def list_resource_usage_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
763
+ list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
763
764
  end
764
765
 
765
766
  #
@@ -777,7 +778,7 @@ module Azure::CDN::Mgmt::V2017_04_02
777
778
  #
778
779
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
779
780
  #
780
- def list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
781
+ def list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
781
782
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
782
783
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
783
784
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -789,6 +790,7 @@ module Azure::CDN::Mgmt::V2017_04_02
789
790
 
790
791
 
791
792
  request_headers = {}
793
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
792
794
 
793
795
  # Set Headers
794
796
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -849,8 +851,8 @@ module Azure::CDN::Mgmt::V2017_04_02
849
851
  #
850
852
  # @return [Endpoint] operation results.
851
853
  #
852
- def begin_create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
853
- response = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers).value!
854
+ def begin_create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
855
+ response = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers).value!
854
856
  response.body unless response.nil?
855
857
  end
856
858
 
@@ -870,8 +872,8 @@ module Azure::CDN::Mgmt::V2017_04_02
870
872
  #
871
873
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
872
874
  #
873
- def begin_create_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
874
- begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers).value!
875
+ def begin_create_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
876
+ begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers).value!
875
877
  end
876
878
 
877
879
  #
@@ -890,7 +892,7 @@ module Azure::CDN::Mgmt::V2017_04_02
890
892
  #
891
893
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
892
894
  #
893
- def begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
895
+ def begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
894
896
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
895
897
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
896
898
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -903,13 +905,12 @@ module Azure::CDN::Mgmt::V2017_04_02
903
905
 
904
906
 
905
907
  request_headers = {}
908
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
906
909
 
907
910
  # Set Headers
908
911
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
909
912
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
910
913
 
911
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
912
-
913
914
  # Serialize Request
914
915
  request_mapper = Azure::CDN::Mgmt::V2017_04_02::Models::Endpoint.mapper()
915
916
  request_content = @client.serialize(request_mapper, endpoint)
@@ -996,8 +997,8 @@ module Azure::CDN::Mgmt::V2017_04_02
996
997
  #
997
998
  # @return [Endpoint] operation results.
998
999
  #
999
- def begin_update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
1000
- response = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers).value!
1000
+ def begin_update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
1001
+ response = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers).value!
1001
1002
  response.body unless response.nil?
1002
1003
  end
1003
1004
 
@@ -1021,8 +1022,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1021
1022
  #
1022
1023
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1023
1024
  #
1024
- def begin_update_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
1025
- begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers).value!
1025
+ def begin_update_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
1026
+ begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers).value!
1026
1027
  end
1027
1028
 
1028
1029
  #
@@ -1045,7 +1046,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1045
1046
  #
1046
1047
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1047
1048
  #
1048
- def begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
1049
+ def begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
1049
1050
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1050
1051
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1051
1052
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1058,13 +1059,12 @@ module Azure::CDN::Mgmt::V2017_04_02
1058
1059
 
1059
1060
 
1060
1061
  request_headers = {}
1062
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1061
1063
 
1062
1064
  # Set Headers
1063
1065
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1064
1066
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1065
1067
 
1066
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1067
-
1068
1068
  # Serialize Request
1069
1069
  request_mapper = Azure::CDN::Mgmt::V2017_04_02::Models::EndpointUpdateParameters.mapper()
1070
1070
  request_content = @client.serialize(request_mapper, endpoint_update_properties)
@@ -1135,8 +1135,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1135
1135
  # will be added to the HTTP request.
1136
1136
  #
1137
1137
  #
1138
- def begin_delete(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1139
- response = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
1138
+ def begin_delete(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1139
+ response = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1140
1140
  nil
1141
1141
  end
1142
1142
 
@@ -1155,8 +1155,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1155
1155
  #
1156
1156
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1157
1157
  #
1158
- def begin_delete_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1159
- begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
1158
+ def begin_delete_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1159
+ begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1160
1160
  end
1161
1161
 
1162
1162
  #
@@ -1174,7 +1174,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1174
1174
  #
1175
1175
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1176
1176
  #
1177
- def begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1177
+ def begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1178
1178
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1179
1179
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1180
1180
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1186,6 +1186,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1186
1186
 
1187
1187
 
1188
1188
  request_headers = {}
1189
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1189
1190
 
1190
1191
  # Set Headers
1191
1192
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1234,8 +1235,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1234
1235
  #
1235
1236
  # @return [Endpoint] operation results.
1236
1237
  #
1237
- def begin_start(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1238
- response = begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
1238
+ def begin_start(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1239
+ response = begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1239
1240
  response.body unless response.nil?
1240
1241
  end
1241
1242
 
@@ -1253,8 +1254,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1253
1254
  #
1254
1255
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1255
1256
  #
1256
- def begin_start_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1257
- begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
1257
+ def begin_start_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1258
+ begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1258
1259
  end
1259
1260
 
1260
1261
  #
@@ -1271,7 +1272,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1271
1272
  #
1272
1273
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1273
1274
  #
1274
- def begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1275
+ def begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1275
1276
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1276
1277
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1277
1278
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1283,6 +1284,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1283
1284
 
1284
1285
 
1285
1286
  request_headers = {}
1287
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1286
1288
 
1287
1289
  # Set Headers
1288
1290
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1304,13 +1306,23 @@ module Azure::CDN::Mgmt::V2017_04_02
1304
1306
  http_response = result.response
1305
1307
  status_code = http_response.status
1306
1308
  response_content = http_response.body
1307
- unless status_code == 202
1309
+ unless status_code == 200 || status_code == 202
1308
1310
  error_model = JSON.load(response_content)
1309
1311
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1310
1312
  end
1311
1313
 
1312
1314
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1313
1315
  # Deserialize Response
1316
+ if status_code == 200
1317
+ begin
1318
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1319
+ result_mapper = Azure::CDN::Mgmt::V2017_04_02::Models::Endpoint.mapper()
1320
+ result.body = @client.deserialize(result_mapper, parsed_response)
1321
+ rescue Exception => e
1322
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1323
+ end
1324
+ end
1325
+ # Deserialize Response
1314
1326
  if status_code == 202
1315
1327
  begin
1316
1328
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
@@ -1341,8 +1353,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1341
1353
  #
1342
1354
  # @return [Endpoint] operation results.
1343
1355
  #
1344
- def begin_stop(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1345
- response = begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
1356
+ def begin_stop(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1357
+ response = begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1346
1358
  response.body unless response.nil?
1347
1359
  end
1348
1360
 
@@ -1360,8 +1372,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1360
1372
  #
1361
1373
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1362
1374
  #
1363
- def begin_stop_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1364
- begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
1375
+ def begin_stop_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1376
+ begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1365
1377
  end
1366
1378
 
1367
1379
  #
@@ -1378,7 +1390,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1378
1390
  #
1379
1391
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1380
1392
  #
1381
- def begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1393
+ def begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1382
1394
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1383
1395
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1384
1396
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1390,6 +1402,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1390
1402
 
1391
1403
 
1392
1404
  request_headers = {}
1405
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1393
1406
 
1394
1407
  # Set Headers
1395
1408
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1411,13 +1424,23 @@ module Azure::CDN::Mgmt::V2017_04_02
1411
1424
  http_response = result.response
1412
1425
  status_code = http_response.status
1413
1426
  response_content = http_response.body
1414
- unless status_code == 202
1427
+ unless status_code == 200 || status_code == 202
1415
1428
  error_model = JSON.load(response_content)
1416
1429
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1417
1430
  end
1418
1431
 
1419
1432
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1420
1433
  # Deserialize Response
1434
+ if status_code == 200
1435
+ begin
1436
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1437
+ result_mapper = Azure::CDN::Mgmt::V2017_04_02::Models::Endpoint.mapper()
1438
+ result.body = @client.deserialize(result_mapper, parsed_response)
1439
+ rescue Exception => e
1440
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1441
+ end
1442
+ end
1443
+ # Deserialize Response
1421
1444
  if status_code == 202
1422
1445
  begin
1423
1446
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
@@ -1451,8 +1474,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1451
1474
  # will be added to the HTTP request.
1452
1475
  #
1453
1476
  #
1454
- def begin_purge_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1455
- response = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
1477
+ def begin_purge_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1478
+ response = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
1456
1479
  nil
1457
1480
  end
1458
1481
 
@@ -1474,8 +1497,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1474
1497
  #
1475
1498
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1476
1499
  #
1477
- def begin_purge_content_with_http_info(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1478
- begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
1500
+ def begin_purge_content_with_http_info(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1501
+ begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
1479
1502
  end
1480
1503
 
1481
1504
  #
@@ -1496,7 +1519,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1496
1519
  #
1497
1520
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1498
1521
  #
1499
- def begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1522
+ def begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1500
1523
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1501
1524
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1502
1525
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1509,13 +1532,12 @@ module Azure::CDN::Mgmt::V2017_04_02
1509
1532
 
1510
1533
 
1511
1534
  request_headers = {}
1535
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1512
1536
 
1513
1537
  # Set Headers
1514
1538
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1515
1539
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1516
1540
 
1517
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1518
-
1519
1541
  # Serialize Request
1520
1542
  request_mapper = Azure::CDN::Mgmt::V2017_04_02::Models::PurgeParameters.mapper()
1521
1543
  request_content = @client.serialize(request_mapper, content_file_paths)
@@ -1539,7 +1561,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1539
1561
  http_response = result.response
1540
1562
  status_code = http_response.status
1541
1563
  response_content = http_response.body
1542
- unless status_code == 202
1564
+ unless status_code == 200 || status_code == 202
1543
1565
  error_model = JSON.load(response_content)
1544
1566
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1545
1567
  end
@@ -1568,8 +1590,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1568
1590
  # will be added to the HTTP request.
1569
1591
  #
1570
1592
  #
1571
- def begin_load_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1572
- response = begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
1593
+ def begin_load_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1594
+ response = begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
1573
1595
  nil
1574
1596
  end
1575
1597
 
@@ -1590,8 +1612,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1590
1612
  #
1591
1613
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1592
1614
  #
1593
- def begin_load_content_with_http_info(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1594
- begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
1615
+ def begin_load_content_with_http_info(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1616
+ begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
1595
1617
  end
1596
1618
 
1597
1619
  #
@@ -1611,7 +1633,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1611
1633
  #
1612
1634
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1613
1635
  #
1614
- def begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1636
+ def begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1615
1637
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1616
1638
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1617
1639
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1624,13 +1646,12 @@ module Azure::CDN::Mgmt::V2017_04_02
1624
1646
 
1625
1647
 
1626
1648
  request_headers = {}
1649
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1627
1650
 
1628
1651
  # Set Headers
1629
1652
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1630
1653
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1631
1654
 
1632
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1633
-
1634
1655
  # Serialize Request
1635
1656
  request_mapper = Azure::CDN::Mgmt::V2017_04_02::Models::LoadParameters.mapper()
1636
1657
  request_content = @client.serialize(request_mapper, content_file_paths)
@@ -1654,7 +1675,7 @@ module Azure::CDN::Mgmt::V2017_04_02
1654
1675
  http_response = result.response
1655
1676
  status_code = http_response.status
1656
1677
  response_content = http_response.body
1657
- unless status_code == 202
1678
+ unless status_code == 200 || status_code == 202
1658
1679
  error_model = JSON.load(response_content)
1659
1680
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1660
1681
  end
@@ -1677,8 +1698,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1677
1698
  #
1678
1699
  # @return [EndpointListResult] operation results.
1679
1700
  #
1680
- def list_by_profile_next(next_page_link, custom_headers = nil)
1681
- response = list_by_profile_next_async(next_page_link, custom_headers).value!
1701
+ def list_by_profile_next(next_page_link, custom_headers:nil)
1702
+ response = list_by_profile_next_async(next_page_link, custom_headers:custom_headers).value!
1682
1703
  response.body unless response.nil?
1683
1704
  end
1684
1705
 
@@ -1692,8 +1713,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1692
1713
  #
1693
1714
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1694
1715
  #
1695
- def list_by_profile_next_with_http_info(next_page_link, custom_headers = nil)
1696
- list_by_profile_next_async(next_page_link, custom_headers).value!
1716
+ def list_by_profile_next_with_http_info(next_page_link, custom_headers:nil)
1717
+ list_by_profile_next_async(next_page_link, custom_headers:custom_headers).value!
1697
1718
  end
1698
1719
 
1699
1720
  #
@@ -1706,11 +1727,12 @@ module Azure::CDN::Mgmt::V2017_04_02
1706
1727
  #
1707
1728
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1708
1729
  #
1709
- def list_by_profile_next_async(next_page_link, custom_headers = nil)
1730
+ def list_by_profile_next_async(next_page_link, custom_headers:nil)
1710
1731
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1711
1732
 
1712
1733
 
1713
1734
  request_headers = {}
1735
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1714
1736
 
1715
1737
  # Set Headers
1716
1738
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1765,8 +1787,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1765
1787
  #
1766
1788
  # @return [ResourceUsageListResult] operation results.
1767
1789
  #
1768
- def list_resource_usage_next(next_page_link, custom_headers = nil)
1769
- response = list_resource_usage_next_async(next_page_link, custom_headers).value!
1790
+ def list_resource_usage_next(next_page_link, custom_headers:nil)
1791
+ response = list_resource_usage_next_async(next_page_link, custom_headers:custom_headers).value!
1770
1792
  response.body unless response.nil?
1771
1793
  end
1772
1794
 
@@ -1781,8 +1803,8 @@ module Azure::CDN::Mgmt::V2017_04_02
1781
1803
  #
1782
1804
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1783
1805
  #
1784
- def list_resource_usage_next_with_http_info(next_page_link, custom_headers = nil)
1785
- list_resource_usage_next_async(next_page_link, custom_headers).value!
1806
+ def list_resource_usage_next_with_http_info(next_page_link, custom_headers:nil)
1807
+ list_resource_usage_next_async(next_page_link, custom_headers:custom_headers).value!
1786
1808
  end
1787
1809
 
1788
1810
  #
@@ -1796,11 +1818,12 @@ module Azure::CDN::Mgmt::V2017_04_02
1796
1818
  #
1797
1819
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1798
1820
  #
1799
- def list_resource_usage_next_async(next_page_link, custom_headers = nil)
1821
+ def list_resource_usage_next_async(next_page_link, custom_headers:nil)
1800
1822
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1801
1823
 
1802
1824
 
1803
1825
  request_headers = {}
1826
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1804
1827
 
1805
1828
  # Set Headers
1806
1829
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -1857,12 +1880,12 @@ module Azure::CDN::Mgmt::V2017_04_02
1857
1880
  # @return [EndpointListResult] which provide lazy access to pages of the
1858
1881
  # response.
1859
1882
  #
1860
- def list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers = nil)
1861
- response = list_by_profile_async(resource_group_name, profile_name, custom_headers).value!
1883
+ def list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers:nil)
1884
+ response = list_by_profile_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
1862
1885
  unless response.nil?
1863
1886
  page = response.body
1864
1887
  page.next_method = Proc.new do |next_page_link|
1865
- list_by_profile_next_async(next_page_link, custom_headers)
1888
+ list_by_profile_next_async(next_page_link, custom_headers:custom_headers)
1866
1889
  end
1867
1890
  page
1868
1891
  end
@@ -1884,12 +1907,12 @@ module Azure::CDN::Mgmt::V2017_04_02
1884
1907
  # @return [ResourceUsageListResult] which provide lazy access to pages of the
1885
1908
  # response.
1886
1909
  #
1887
- def list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1888
- response = list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
1910
+ def list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1911
+ response = list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1889
1912
  unless response.nil?
1890
1913
  page = response.body
1891
1914
  page.next_method = Proc.new do |next_page_link|
1892
- list_resource_usage_next_async(next_page_link, custom_headers)
1915
+ list_resource_usage_next_async(next_page_link, custom_headers:custom_headers)
1893
1916
  end
1894
1917
  page
1895
1918
  end