azure_mgmt_automation 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_mgmt_automation.rb +6 -0
  4. data/lib/generated/azure_mgmt_automation.rb +183 -0
  5. data/lib/generated/azure_mgmt_automation/activity_operations.rb +332 -0
  6. data/lib/generated/azure_mgmt_automation/agent_registration_information.rb +223 -0
  7. data/lib/generated/azure_mgmt_automation/automation_account_operations.rb +822 -0
  8. data/lib/generated/azure_mgmt_automation/automation_client.rb +245 -0
  9. data/lib/generated/azure_mgmt_automation/certificate_operations.rb +642 -0
  10. data/lib/generated/azure_mgmt_automation/connection_operations.rb +653 -0
  11. data/lib/generated/azure_mgmt_automation/connection_type_operations.rb +528 -0
  12. data/lib/generated/azure_mgmt_automation/credential_operations.rb +642 -0
  13. data/lib/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb +534 -0
  14. data/lib/generated/azure_mgmt_automation/dsc_configuration_operations.rb +629 -0
  15. data/lib/generated/azure_mgmt_automation/dsc_node_configuration_operations.rb +532 -0
  16. data/lib/generated/azure_mgmt_automation/dsc_node_operations.rb +530 -0
  17. data/lib/generated/azure_mgmt_automation/fields.rb +124 -0
  18. data/lib/generated/azure_mgmt_automation/hybrid_runbook_worker_group_operations.rb +524 -0
  19. data/lib/generated/azure_mgmt_automation/job_operations.rb +888 -0
  20. data/lib/generated/azure_mgmt_automation/job_schedule_operations.rb +515 -0
  21. data/lib/generated/azure_mgmt_automation/job_stream_operations.rb +333 -0
  22. data/lib/generated/azure_mgmt_automation/models/activity.rb +133 -0
  23. data/lib/generated/azure_mgmt_automation/models/activity_list_result.rb +94 -0
  24. data/lib/generated/azure_mgmt_automation/models/activity_output_type.rb +54 -0
  25. data/lib/generated/azure_mgmt_automation/models/activity_parameter.rb +129 -0
  26. data/lib/generated/azure_mgmt_automation/models/activity_parameter_set.rb +63 -0
  27. data/lib/generated/azure_mgmt_automation/models/advanced_schedule.rb +89 -0
  28. data/lib/generated/azure_mgmt_automation/models/advanced_schedule_monthly_occurrence.rb +58 -0
  29. data/lib/generated/azure_mgmt_automation/models/agent_registration.rb +76 -0
  30. data/lib/generated/azure_mgmt_automation/models/agent_registration_key_name.rb +16 -0
  31. data/lib/generated/azure_mgmt_automation/models/agent_registration_keys.rb +54 -0
  32. data/lib/generated/azure_mgmt_automation/models/agent_registration_regenerate_key_parameter.rb +84 -0
  33. data/lib/generated/azure_mgmt_automation/models/automation_account.rb +154 -0
  34. data/lib/generated/azure_mgmt_automation/models/automation_account_create_or_update_parameters.rb +85 -0
  35. data/lib/generated/azure_mgmt_automation/models/automation_account_list_result.rb +94 -0
  36. data/lib/generated/azure_mgmt_automation/models/automation_account_state.rb +17 -0
  37. data/lib/generated/azure_mgmt_automation/models/automation_account_update_parameters.rb +83 -0
  38. data/lib/generated/azure_mgmt_automation/models/certificate.rb +121 -0
  39. data/lib/generated/azure_mgmt_automation/models/certificate_create_or_update_parameters.rb +87 -0
  40. data/lib/generated/azure_mgmt_automation/models/certificate_list_result.rb +94 -0
  41. data/lib/generated/azure_mgmt_automation/models/certificate_update_parameters.rb +54 -0
  42. data/lib/generated/azure_mgmt_automation/models/connection.rb +119 -0
  43. data/lib/generated/azure_mgmt_automation/models/connection_create_or_update_parameters.rb +84 -0
  44. data/lib/generated/azure_mgmt_automation/models/connection_list_result.rb +94 -0
  45. data/lib/generated/azure_mgmt_automation/models/connection_type.rb +118 -0
  46. data/lib/generated/azure_mgmt_automation/models/connection_type_association_property.rb +44 -0
  47. data/lib/generated/azure_mgmt_automation/models/connection_type_create_or_update_parameters.rb +75 -0
  48. data/lib/generated/azure_mgmt_automation/models/connection_type_list_result.rb +95 -0
  49. data/lib/generated/azure_mgmt_automation/models/connection_update_parameters.rb +72 -0
  50. data/lib/generated/azure_mgmt_automation/models/content_hash.rb +55 -0
  51. data/lib/generated/azure_mgmt_automation/models/content_link.rb +65 -0
  52. data/lib/generated/azure_mgmt_automation/models/content_source.rb +77 -0
  53. data/lib/generated/azure_mgmt_automation/models/content_source_type.rb +16 -0
  54. data/lib/generated/azure_mgmt_automation/models/credential.rb +98 -0
  55. data/lib/generated/azure_mgmt_automation/models/credential_create_or_update_parameters.rb +74 -0
  56. data/lib/generated/azure_mgmt_automation/models/credential_list_result.rb +94 -0
  57. data/lib/generated/azure_mgmt_automation/models/credential_update_parameters.rb +74 -0
  58. data/lib/generated/azure_mgmt_automation/models/dsc_compilation_job.rb +186 -0
  59. data/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_create_parameters.rb +102 -0
  60. data/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_list_result.rb +95 -0
  61. data/lib/generated/azure_mgmt_automation/models/dsc_configuration.rb +193 -0
  62. data/lib/generated/azure_mgmt_automation/models/dsc_configuration_association_property.rb +44 -0
  63. data/lib/generated/azure_mgmt_automation/models/dsc_configuration_create_or_update_parameters.rb +132 -0
  64. data/lib/generated/azure_mgmt_automation/models/dsc_configuration_list_result.rb +95 -0
  65. data/lib/generated/azure_mgmt_automation/models/dsc_configuration_parameter.rb +75 -0
  66. data/lib/generated/azure_mgmt_automation/models/dsc_configuration_provisioning_state.rb +15 -0
  67. data/lib/generated/azure_mgmt_automation/models/dsc_configuration_state.rb +17 -0
  68. data/lib/generated/azure_mgmt_automation/models/dsc_meta_configuration.rb +111 -0
  69. data/lib/generated/azure_mgmt_automation/models/dsc_node.rb +161 -0
  70. data/lib/generated/azure_mgmt_automation/models/dsc_node_configuration.rb +86 -0
  71. data/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_association_property.rb +44 -0
  72. data/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_create_or_update_parameters.rb +69 -0
  73. data/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_list_result.rb +95 -0
  74. data/lib/generated/azure_mgmt_automation/models/dsc_node_list_result.rb +94 -0
  75. data/lib/generated/azure_mgmt_automation/models/dsc_node_report.rb +265 -0
  76. data/lib/generated/azure_mgmt_automation/models/dsc_node_report_list_result.rb +94 -0
  77. data/lib/generated/azure_mgmt_automation/models/dsc_node_update_parameters.rb +56 -0
  78. data/lib/generated/azure_mgmt_automation/models/dsc_report_error.rb +95 -0
  79. data/lib/generated/azure_mgmt_automation/models/dsc_report_resource.rb +143 -0
  80. data/lib/generated/azure_mgmt_automation/models/dsc_report_resource_navigation.rb +44 -0
  81. data/lib/generated/azure_mgmt_automation/models/error_response.rb +54 -0
  82. data/lib/generated/azure_mgmt_automation/models/field_definition.rb +67 -0
  83. data/lib/generated/azure_mgmt_automation/models/http_status_code.rb +61 -0
  84. data/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker.rb +65 -0
  85. data/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group.rb +85 -0
  86. data/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group_update_parameters.rb +46 -0
  87. data/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_groups_list_result.rb +95 -0
  88. data/lib/generated/azure_mgmt_automation/models/job.rb +188 -0
  89. data/lib/generated/azure_mgmt_automation/models/job_create_parameters.rb +112 -0
  90. data/lib/generated/azure_mgmt_automation/models/job_list_result.rb +94 -0
  91. data/lib/generated/azure_mgmt_automation/models/job_schedule.rb +105 -0
  92. data/lib/generated/azure_mgmt_automation/models/job_schedule_create_parameters.rb +84 -0
  93. data/lib/generated/azure_mgmt_automation/models/job_schedule_list_result.rb +94 -0
  94. data/lib/generated/azure_mgmt_automation/models/job_status.rb +27 -0
  95. data/lib/generated/azure_mgmt_automation/models/job_stream.rb +113 -0
  96. data/lib/generated/azure_mgmt_automation/models/job_stream_list_result.rb +94 -0
  97. data/lib/generated/azure_mgmt_automation/models/job_stream_type.rb +21 -0
  98. data/lib/generated/azure_mgmt_automation/models/module_create_or_update_parameters.rb +83 -0
  99. data/lib/generated/azure_mgmt_automation/models/module_error_info.rb +54 -0
  100. data/lib/generated/azure_mgmt_automation/models/module_list_result.rb +94 -0
  101. data/lib/generated/azure_mgmt_automation/models/module_model.rb +198 -0
  102. data/lib/generated/azure_mgmt_automation/models/module_provisioning_state.rb +30 -0
  103. data/lib/generated/azure_mgmt_automation/models/module_update_parameters.rb +83 -0
  104. data/lib/generated/azure_mgmt_automation/models/operation.rb +55 -0
  105. data/lib/generated/azure_mgmt_automation/models/operation_display.rb +65 -0
  106. data/lib/generated/azure_mgmt_automation/models/operation_list_result.rb +53 -0
  107. data/lib/generated/azure_mgmt_automation/models/resource.rb +94 -0
  108. data/lib/generated/azure_mgmt_automation/models/run_as_credential_association_property.rb +44 -0
  109. data/lib/generated/azure_mgmt_automation/models/runbook.rb +263 -0
  110. data/lib/generated/azure_mgmt_automation/models/runbook_association_property.rb +44 -0
  111. data/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_parameters.rb +44 -0
  112. data/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_properties.rb +99 -0
  113. data/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_parameters.rb +147 -0
  114. data/lib/generated/azure_mgmt_automation/models/runbook_draft.rb +112 -0
  115. data/lib/generated/azure_mgmt_automation/models/runbook_draft_undo_edit_result.rb +68 -0
  116. data/lib/generated/azure_mgmt_automation/models/runbook_list_result.rb +94 -0
  117. data/lib/generated/azure_mgmt_automation/models/runbook_parameter.rb +75 -0
  118. data/lib/generated/azure_mgmt_automation/models/runbook_provisioning_state.rb +15 -0
  119. data/lib/generated/azure_mgmt_automation/models/runbook_state.rb +17 -0
  120. data/lib/generated/azure_mgmt_automation/models/runbook_type_enum.rb +20 -0
  121. data/lib/generated/azure_mgmt_automation/models/runbook_update_parameters.rb +113 -0
  122. data/lib/generated/azure_mgmt_automation/models/schedule.rb +199 -0
  123. data/lib/generated/azure_mgmt_automation/models/schedule_association_property.rb +44 -0
  124. data/lib/generated/azure_mgmt_automation/models/schedule_create_or_update_parameters.rb +116 -0
  125. data/lib/generated/azure_mgmt_automation/models/schedule_day.rb +21 -0
  126. data/lib/generated/azure_mgmt_automation/models/schedule_frequency.rb +19 -0
  127. data/lib/generated/azure_mgmt_automation/models/schedule_list_result.rb +94 -0
  128. data/lib/generated/azure_mgmt_automation/models/schedule_update_parameters.rb +65 -0
  129. data/lib/generated/azure_mgmt_automation/models/sku.rb +65 -0
  130. data/lib/generated/azure_mgmt_automation/models/sku_name_enum.rb +16 -0
  131. data/lib/generated/azure_mgmt_automation/models/statistics.rb +89 -0
  132. data/lib/generated/azure_mgmt_automation/models/statistics_list_result.rb +52 -0
  133. data/lib/generated/azure_mgmt_automation/models/sub_resource.rb +44 -0
  134. data/lib/generated/azure_mgmt_automation/models/test_job.rb +144 -0
  135. data/lib/generated/azure_mgmt_automation/models/test_job_create_parameters.rb +73 -0
  136. data/lib/generated/azure_mgmt_automation/models/type_field.rb +54 -0
  137. data/lib/generated/azure_mgmt_automation/models/type_field_list_result.rb +52 -0
  138. data/lib/generated/azure_mgmt_automation/models/usage.rb +95 -0
  139. data/lib/generated/azure_mgmt_automation/models/usage_counter_name.rb +54 -0
  140. data/lib/generated/azure_mgmt_automation/models/usage_list_result.rb +52 -0
  141. data/lib/generated/azure_mgmt_automation/models/variable.rb +104 -0
  142. data/lib/generated/azure_mgmt_automation/models/variable_create_or_update_parameters.rb +74 -0
  143. data/lib/generated/azure_mgmt_automation/models/variable_list_result.rb +94 -0
  144. data/lib/generated/azure_mgmt_automation/models/variable_update_parameters.rb +64 -0
  145. data/lib/generated/azure_mgmt_automation/models/webhook.rb +168 -0
  146. data/lib/generated/azure_mgmt_automation/models/webhook_create_or_update_parameters.rb +115 -0
  147. data/lib/generated/azure_mgmt_automation/models/webhook_list_result.rb +94 -0
  148. data/lib/generated/azure_mgmt_automation/models/webhook_update_parameters.rb +94 -0
  149. data/lib/generated/azure_mgmt_automation/module_definition.rb +8 -0
  150. data/lib/generated/azure_mgmt_automation/module_model_operations.rb +633 -0
  151. data/lib/generated/azure_mgmt_automation/node_reports.rb +438 -0
  152. data/lib/generated/azure_mgmt_automation/object_data_types.rb +219 -0
  153. data/lib/generated/azure_mgmt_automation/operations.rb +106 -0
  154. data/lib/generated/azure_mgmt_automation/runbook_draft_operations.rb +605 -0
  155. data/lib/generated/azure_mgmt_automation/runbook_operations.rb +719 -0
  156. data/lib/generated/azure_mgmt_automation/schedule_operations.rb +626 -0
  157. data/lib/generated/azure_mgmt_automation/statistics_operations.rb +119 -0
  158. data/lib/generated/azure_mgmt_automation/test_job_streams.rb +333 -0
  159. data/lib/generated/azure_mgmt_automation/test_jobs.rb +486 -0
  160. data/lib/generated/azure_mgmt_automation/usages.rb +116 -0
  161. data/lib/generated/azure_mgmt_automation/variable_operations.rb +636 -0
  162. data/lib/generated/azure_mgmt_automation/version.rb +8 -0
  163. data/lib/generated/azure_mgmt_automation/webhook_operations.rb +737 -0
  164. metadata +275 -0
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Automation
7
+ VERSION = '0.14.0'
8
+ end
@@ -0,0 +1,737 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Automation
7
+ #
8
+ # Automation Client
9
+ #
10
+ class WebhookOperations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the WebhookOperations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AutomationClient] reference to the AutomationClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Generates a Uri for use in creating a webhook.
26
+ #
27
+ # @param resource_group_name [String] The resource group name.
28
+ # @param automation_account_name [String] The automation account name.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [String] operation results.
33
+ #
34
+ def generate_uri(resource_group_name, automation_account_name, custom_headers = nil)
35
+ response = generate_uri_async(resource_group_name, automation_account_name, custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Generates a Uri for use in creating a webhook.
41
+ #
42
+ # @param resource_group_name [String] The resource group name.
43
+ # @param automation_account_name [String] The automation account name.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def generate_uri_with_http_info(resource_group_name, automation_account_name, custom_headers = nil)
50
+ generate_uri_async(resource_group_name, automation_account_name, custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Generates a Uri for use in creating a webhook.
55
+ #
56
+ # @param resource_group_name [String] The resource group name.
57
+ # @param automation_account_name [String] The automation account name.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def generate_uri_async(resource_group_name, automation_account_name, custom_headers = nil)
64
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
65
+ fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
66
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+
69
+
70
+ request_headers = {}
71
+
72
+ # Set Headers
73
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
74
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
75
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri'
76
+
77
+ request_url = @base_url || @client.base_url
78
+
79
+ options = {
80
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
81
+ path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id},
82
+ query_params: {'api-version' => @client.api_version},
83
+ headers: request_headers.merge(custom_headers || {}),
84
+ base_url: request_url
85
+ }
86
+ promise = @client.make_request_async(:post, path_template, options)
87
+
88
+ promise = promise.then do |result|
89
+ http_response = result.response
90
+ status_code = http_response.status
91
+ response_content = http_response.body
92
+ unless status_code == 200
93
+ error_model = JSON.load(response_content)
94
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
95
+ end
96
+
97
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
98
+ # Deserialize Response
99
+ if status_code == 200
100
+ begin
101
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
102
+ result_mapper = {
103
+ required: false,
104
+ serialized_name: 'parsed_response',
105
+ type: {
106
+ name: 'String'
107
+ }
108
+ }
109
+ result.body = @client.deserialize(result_mapper, parsed_response)
110
+ rescue Exception => e
111
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
112
+ end
113
+ end
114
+
115
+ result
116
+ end
117
+
118
+ promise.execute
119
+ end
120
+
121
+ #
122
+ # Delete the webhook by name.
123
+ #
124
+ # @param resource_group_name [String] The resource group name.
125
+ # @param automation_account_name [String] The automation account name.
126
+ # @param webhook_name [String] The webhook name.
127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
128
+ # will be added to the HTTP request.
129
+ #
130
+ #
131
+ def delete(resource_group_name, automation_account_name, webhook_name, custom_headers = nil)
132
+ response = delete_async(resource_group_name, automation_account_name, webhook_name, custom_headers).value!
133
+ nil
134
+ end
135
+
136
+ #
137
+ # Delete the webhook by name.
138
+ #
139
+ # @param resource_group_name [String] The resource group name.
140
+ # @param automation_account_name [String] The automation account name.
141
+ # @param webhook_name [String] The webhook name.
142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
143
+ # will be added to the HTTP request.
144
+ #
145
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
146
+ #
147
+ def delete_with_http_info(resource_group_name, automation_account_name, webhook_name, custom_headers = nil)
148
+ delete_async(resource_group_name, automation_account_name, webhook_name, custom_headers).value!
149
+ end
150
+
151
+ #
152
+ # Delete the webhook by name.
153
+ #
154
+ # @param resource_group_name [String] The resource group name.
155
+ # @param automation_account_name [String] The automation account name.
156
+ # @param webhook_name [String] The webhook name.
157
+ # @param [Hash{String => String}] A hash of custom headers that will be added
158
+ # to the HTTP request.
159
+ #
160
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
161
+ #
162
+ def delete_async(resource_group_name, automation_account_name, webhook_name, custom_headers = nil)
163
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
164
+ fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
165
+ fail ArgumentError, 'webhook_name is nil' if webhook_name.nil?
166
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
167
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
168
+
169
+
170
+ request_headers = {}
171
+
172
+ # Set Headers
173
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
174
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
175
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'
176
+
177
+ request_url = @base_url || @client.base_url
178
+
179
+ options = {
180
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
181
+ path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'webhookName' => webhook_name,'subscriptionId' => @client.subscription_id},
182
+ query_params: {'api-version' => @client.api_version},
183
+ headers: request_headers.merge(custom_headers || {}),
184
+ base_url: request_url
185
+ }
186
+ promise = @client.make_request_async(:delete, path_template, options)
187
+
188
+ promise = promise.then do |result|
189
+ http_response = result.response
190
+ status_code = http_response.status
191
+ response_content = http_response.body
192
+ unless status_code == 200
193
+ error_model = JSON.load(response_content)
194
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
195
+ end
196
+
197
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
198
+
199
+ result
200
+ end
201
+
202
+ promise.execute
203
+ end
204
+
205
+ #
206
+ # Retrieve the webhook identified by webhook name.
207
+ #
208
+ # @param resource_group_name [String] The resource group name.
209
+ # @param automation_account_name [String] The automation account name.
210
+ # @param webhook_name [String] The webhook name.
211
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
212
+ # will be added to the HTTP request.
213
+ #
214
+ # @return [Webhook] operation results.
215
+ #
216
+ def get(resource_group_name, automation_account_name, webhook_name, custom_headers = nil)
217
+ response = get_async(resource_group_name, automation_account_name, webhook_name, custom_headers).value!
218
+ response.body unless response.nil?
219
+ end
220
+
221
+ #
222
+ # Retrieve the webhook identified by webhook name.
223
+ #
224
+ # @param resource_group_name [String] The resource group name.
225
+ # @param automation_account_name [String] The automation account name.
226
+ # @param webhook_name [String] The webhook name.
227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
+ # will be added to the HTTP request.
229
+ #
230
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
231
+ #
232
+ def get_with_http_info(resource_group_name, automation_account_name, webhook_name, custom_headers = nil)
233
+ get_async(resource_group_name, automation_account_name, webhook_name, custom_headers).value!
234
+ end
235
+
236
+ #
237
+ # Retrieve the webhook identified by webhook name.
238
+ #
239
+ # @param resource_group_name [String] The resource group name.
240
+ # @param automation_account_name [String] The automation account name.
241
+ # @param webhook_name [String] The webhook name.
242
+ # @param [Hash{String => String}] A hash of custom headers that will be added
243
+ # to the HTTP request.
244
+ #
245
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
246
+ #
247
+ def get_async(resource_group_name, automation_account_name, webhook_name, custom_headers = nil)
248
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
249
+ fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
250
+ fail ArgumentError, 'webhook_name is nil' if webhook_name.nil?
251
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
252
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
253
+
254
+
255
+ request_headers = {}
256
+
257
+ # Set Headers
258
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
259
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
260
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'
261
+
262
+ request_url = @base_url || @client.base_url
263
+
264
+ options = {
265
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
266
+ path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'webhookName' => webhook_name,'subscriptionId' => @client.subscription_id},
267
+ query_params: {'api-version' => @client.api_version},
268
+ headers: request_headers.merge(custom_headers || {}),
269
+ base_url: request_url
270
+ }
271
+ promise = @client.make_request_async(:get, path_template, options)
272
+
273
+ promise = promise.then do |result|
274
+ http_response = result.response
275
+ status_code = http_response.status
276
+ response_content = http_response.body
277
+ unless status_code == 200
278
+ error_model = JSON.load(response_content)
279
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
280
+ end
281
+
282
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
283
+ # Deserialize Response
284
+ if status_code == 200
285
+ begin
286
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
287
+ result_mapper = Azure::ARM::Automation::Models::Webhook.mapper()
288
+ result.body = @client.deserialize(result_mapper, parsed_response)
289
+ rescue Exception => e
290
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
291
+ end
292
+ end
293
+
294
+ result
295
+ end
296
+
297
+ promise.execute
298
+ end
299
+
300
+ #
301
+ # Create the webhook identified by webhook name.
302
+ #
303
+ # @param resource_group_name [String] The resource group name.
304
+ # @param automation_account_name [String] The automation account name.
305
+ # @param webhook_name [String] The webhook name.
306
+ # @param parameters [WebhookCreateOrUpdateParameters] The create or update
307
+ # parameters for webhook.
308
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
309
+ # will be added to the HTTP request.
310
+ #
311
+ # @return [Webhook] operation results.
312
+ #
313
+ def create_or_update(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers = nil)
314
+ response = create_or_update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers).value!
315
+ response.body unless response.nil?
316
+ end
317
+
318
+ #
319
+ # Create the webhook identified by webhook name.
320
+ #
321
+ # @param resource_group_name [String] The resource group name.
322
+ # @param automation_account_name [String] The automation account name.
323
+ # @param webhook_name [String] The webhook name.
324
+ # @param parameters [WebhookCreateOrUpdateParameters] The create or update
325
+ # parameters for webhook.
326
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
327
+ # will be added to the HTTP request.
328
+ #
329
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
330
+ #
331
+ def create_or_update_with_http_info(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers = nil)
332
+ create_or_update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers).value!
333
+ end
334
+
335
+ #
336
+ # Create the webhook identified by webhook name.
337
+ #
338
+ # @param resource_group_name [String] The resource group name.
339
+ # @param automation_account_name [String] The automation account name.
340
+ # @param webhook_name [String] The webhook name.
341
+ # @param parameters [WebhookCreateOrUpdateParameters] The create or update
342
+ # parameters for webhook.
343
+ # @param [Hash{String => String}] A hash of custom headers that will be added
344
+ # to the HTTP request.
345
+ #
346
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
347
+ #
348
+ def create_or_update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers = nil)
349
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
350
+ fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
351
+ fail ArgumentError, 'webhook_name is nil' if webhook_name.nil?
352
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
353
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
354
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
355
+
356
+
357
+ request_headers = {}
358
+
359
+ # Set Headers
360
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
361
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
362
+
363
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
364
+
365
+ # Serialize Request
366
+ request_mapper = Azure::ARM::Automation::Models::WebhookCreateOrUpdateParameters.mapper()
367
+ request_content = @client.serialize(request_mapper, parameters)
368
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
369
+
370
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'
371
+
372
+ request_url = @base_url || @client.base_url
373
+
374
+ options = {
375
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
376
+ path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'webhookName' => webhook_name,'subscriptionId' => @client.subscription_id},
377
+ query_params: {'api-version' => @client.api_version},
378
+ body: request_content,
379
+ headers: request_headers.merge(custom_headers || {}),
380
+ base_url: request_url
381
+ }
382
+ promise = @client.make_request_async(:put, path_template, options)
383
+
384
+ promise = promise.then do |result|
385
+ http_response = result.response
386
+ status_code = http_response.status
387
+ response_content = http_response.body
388
+ unless status_code == 200 || status_code == 201
389
+ error_model = JSON.load(response_content)
390
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
391
+ end
392
+
393
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
394
+ # Deserialize Response
395
+ if status_code == 200
396
+ begin
397
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
398
+ result_mapper = Azure::ARM::Automation::Models::Webhook.mapper()
399
+ result.body = @client.deserialize(result_mapper, parsed_response)
400
+ rescue Exception => e
401
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
402
+ end
403
+ end
404
+ # Deserialize Response
405
+ if status_code == 201
406
+ begin
407
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
408
+ result_mapper = Azure::ARM::Automation::Models::Webhook.mapper()
409
+ result.body = @client.deserialize(result_mapper, parsed_response)
410
+ rescue Exception => e
411
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
412
+ end
413
+ end
414
+
415
+ result
416
+ end
417
+
418
+ promise.execute
419
+ end
420
+
421
+ #
422
+ # Update the webhook identified by webhook name.
423
+ #
424
+ # @param resource_group_name [String] The resource group name.
425
+ # @param automation_account_name [String] The automation account name.
426
+ # @param webhook_name [String] The webhook name.
427
+ # @param parameters [WebhookUpdateParameters] The update parameters for
428
+ # webhook.
429
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
430
+ # will be added to the HTTP request.
431
+ #
432
+ # @return [Webhook] operation results.
433
+ #
434
+ def update(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers = nil)
435
+ response = update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers).value!
436
+ response.body unless response.nil?
437
+ end
438
+
439
+ #
440
+ # Update the webhook identified by webhook name.
441
+ #
442
+ # @param resource_group_name [String] The resource group name.
443
+ # @param automation_account_name [String] The automation account name.
444
+ # @param webhook_name [String] The webhook name.
445
+ # @param parameters [WebhookUpdateParameters] The update parameters for
446
+ # webhook.
447
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
448
+ # will be added to the HTTP request.
449
+ #
450
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
451
+ #
452
+ def update_with_http_info(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers = nil)
453
+ update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers).value!
454
+ end
455
+
456
+ #
457
+ # Update the webhook identified by webhook name.
458
+ #
459
+ # @param resource_group_name [String] The resource group name.
460
+ # @param automation_account_name [String] The automation account name.
461
+ # @param webhook_name [String] The webhook name.
462
+ # @param parameters [WebhookUpdateParameters] The update parameters for
463
+ # webhook.
464
+ # @param [Hash{String => String}] A hash of custom headers that will be added
465
+ # to the HTTP request.
466
+ #
467
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
468
+ #
469
+ def update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers = nil)
470
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
471
+ fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
472
+ fail ArgumentError, 'webhook_name is nil' if webhook_name.nil?
473
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
474
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
475
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
476
+
477
+
478
+ request_headers = {}
479
+
480
+ # Set Headers
481
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
482
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
483
+
484
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
485
+
486
+ # Serialize Request
487
+ request_mapper = Azure::ARM::Automation::Models::WebhookUpdateParameters.mapper()
488
+ request_content = @client.serialize(request_mapper, parameters)
489
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
490
+
491
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'
492
+
493
+ request_url = @base_url || @client.base_url
494
+
495
+ options = {
496
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
497
+ path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'webhookName' => webhook_name,'subscriptionId' => @client.subscription_id},
498
+ query_params: {'api-version' => @client.api_version},
499
+ body: request_content,
500
+ headers: request_headers.merge(custom_headers || {}),
501
+ base_url: request_url
502
+ }
503
+ promise = @client.make_request_async(:patch, path_template, options)
504
+
505
+ promise = promise.then do |result|
506
+ http_response = result.response
507
+ status_code = http_response.status
508
+ response_content = http_response.body
509
+ unless status_code == 200
510
+ error_model = JSON.load(response_content)
511
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
512
+ end
513
+
514
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
515
+ # Deserialize Response
516
+ if status_code == 200
517
+ begin
518
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
519
+ result_mapper = Azure::ARM::Automation::Models::Webhook.mapper()
520
+ result.body = @client.deserialize(result_mapper, parsed_response)
521
+ rescue Exception => e
522
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
523
+ end
524
+ end
525
+
526
+ result
527
+ end
528
+
529
+ promise.execute
530
+ end
531
+
532
+ #
533
+ # Retrieve a list of webhooks.
534
+ #
535
+ # @param resource_group_name [String] The resource group name.
536
+ # @param automation_account_name [String] The automation account name.
537
+ # @param filter [String] The filter to apply on the operation.
538
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
539
+ # will be added to the HTTP request.
540
+ #
541
+ # @return [Array<Webhook>] operation results.
542
+ #
543
+ def list_by_automation_account(resource_group_name, automation_account_name, filter = nil, custom_headers = nil)
544
+ first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter, custom_headers)
545
+ first_page.get_all_items
546
+ end
547
+
548
+ #
549
+ # Retrieve a list of webhooks.
550
+ #
551
+ # @param resource_group_name [String] The resource group name.
552
+ # @param automation_account_name [String] The automation account name.
553
+ # @param filter [String] The filter to apply on the operation.
554
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
555
+ # will be added to the HTTP request.
556
+ #
557
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
558
+ #
559
+ def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, filter = nil, custom_headers = nil)
560
+ list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value!
561
+ end
562
+
563
+ #
564
+ # Retrieve a list of webhooks.
565
+ #
566
+ # @param resource_group_name [String] The resource group name.
567
+ # @param automation_account_name [String] The automation account name.
568
+ # @param filter [String] The filter to apply on the operation.
569
+ # @param [Hash{String => String}] A hash of custom headers that will be added
570
+ # to the HTTP request.
571
+ #
572
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
573
+ #
574
+ def list_by_automation_account_async(resource_group_name, automation_account_name, filter = nil, custom_headers = nil)
575
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
576
+ fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
577
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
578
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
579
+
580
+
581
+ request_headers = {}
582
+
583
+ # Set Headers
584
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
585
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
586
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks'
587
+
588
+ request_url = @base_url || @client.base_url
589
+
590
+ options = {
591
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
592
+ path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id},
593
+ query_params: {'$filter' => filter,'api-version' => @client.api_version},
594
+ headers: request_headers.merge(custom_headers || {}),
595
+ base_url: request_url
596
+ }
597
+ promise = @client.make_request_async(:get, path_template, options)
598
+
599
+ promise = promise.then do |result|
600
+ http_response = result.response
601
+ status_code = http_response.status
602
+ response_content = http_response.body
603
+ unless status_code == 200
604
+ error_model = JSON.load(response_content)
605
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
606
+ end
607
+
608
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
609
+ # Deserialize Response
610
+ if status_code == 200
611
+ begin
612
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
613
+ result_mapper = Azure::ARM::Automation::Models::WebhookListResult.mapper()
614
+ result.body = @client.deserialize(result_mapper, parsed_response)
615
+ rescue Exception => e
616
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
617
+ end
618
+ end
619
+
620
+ result
621
+ end
622
+
623
+ promise.execute
624
+ end
625
+
626
+ #
627
+ # Retrieve a list of webhooks.
628
+ #
629
+ # @param next_page_link [String] The NextLink from the previous successful call
630
+ # to List operation.
631
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
632
+ # will be added to the HTTP request.
633
+ #
634
+ # @return [WebhookListResult] operation results.
635
+ #
636
+ def list_by_automation_account_next(next_page_link, custom_headers = nil)
637
+ response = list_by_automation_account_next_async(next_page_link, custom_headers).value!
638
+ response.body unless response.nil?
639
+ end
640
+
641
+ #
642
+ # Retrieve a list of webhooks.
643
+ #
644
+ # @param next_page_link [String] The NextLink from the previous successful call
645
+ # to List operation.
646
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
647
+ # will be added to the HTTP request.
648
+ #
649
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
650
+ #
651
+ def list_by_automation_account_next_with_http_info(next_page_link, custom_headers = nil)
652
+ list_by_automation_account_next_async(next_page_link, custom_headers).value!
653
+ end
654
+
655
+ #
656
+ # Retrieve a list of webhooks.
657
+ #
658
+ # @param next_page_link [String] The NextLink from the previous successful call
659
+ # to List operation.
660
+ # @param [Hash{String => String}] A hash of custom headers that will be added
661
+ # to the HTTP request.
662
+ #
663
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
664
+ #
665
+ def list_by_automation_account_next_async(next_page_link, custom_headers = nil)
666
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
667
+
668
+
669
+ request_headers = {}
670
+
671
+ # Set Headers
672
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
673
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
674
+ path_template = '{nextLink}'
675
+
676
+ request_url = @base_url || @client.base_url
677
+
678
+ options = {
679
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
680
+ skip_encoding_path_params: {'nextLink' => next_page_link},
681
+ headers: request_headers.merge(custom_headers || {}),
682
+ base_url: request_url
683
+ }
684
+ promise = @client.make_request_async(:get, path_template, options)
685
+
686
+ promise = promise.then do |result|
687
+ http_response = result.response
688
+ status_code = http_response.status
689
+ response_content = http_response.body
690
+ unless status_code == 200
691
+ error_model = JSON.load(response_content)
692
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
693
+ end
694
+
695
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
696
+ # Deserialize Response
697
+ if status_code == 200
698
+ begin
699
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
700
+ result_mapper = Azure::ARM::Automation::Models::WebhookListResult.mapper()
701
+ result.body = @client.deserialize(result_mapper, parsed_response)
702
+ rescue Exception => e
703
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
704
+ end
705
+ end
706
+
707
+ result
708
+ end
709
+
710
+ promise.execute
711
+ end
712
+
713
+ #
714
+ # Retrieve a list of webhooks.
715
+ #
716
+ # @param resource_group_name [String] The resource group name.
717
+ # @param automation_account_name [String] The automation account name.
718
+ # @param filter [String] The filter to apply on the operation.
719
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
720
+ # will be added to the HTTP request.
721
+ #
722
+ # @return [WebhookListResult] which provide lazy access to pages of the
723
+ # response.
724
+ #
725
+ def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter = nil, custom_headers = nil)
726
+ response = list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value!
727
+ unless response.nil?
728
+ page = response.body
729
+ page.next_method = Proc.new do |next_page_link|
730
+ list_by_automation_account_next_async(next_page_link, custom_headers)
731
+ end
732
+ page
733
+ end
734
+ end
735
+
736
+ end
737
+ end