cloudreactor_api_client 0.1.0.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +92 -0
  4. data/cloudreactor_api_client.md +226 -0
  5. data/lib/cloudreactor_api_client/api/alert_methods_api.rb +482 -0
  6. data/lib/cloudreactor_api_client/api/email_notification_profiles_api.rb +482 -0
  7. data/lib/cloudreactor_api_client/api/pagerduty_profiles_api.rb +482 -0
  8. data/lib/cloudreactor_api_client/api/run_environments_api.rb +479 -0
  9. data/lib/cloudreactor_api_client/api/task_executions_api.rb +409 -0
  10. data/lib/cloudreactor_api_client/api/tasks_api.rb +412 -0
  11. data/lib/cloudreactor_api_client/api/workflow_executions_api.rb +549 -0
  12. data/lib/cloudreactor_api_client/api/workflow_task_instances_api.rb +424 -0
  13. data/lib/cloudreactor_api_client/api/workflow_transitions_api.rb +406 -0
  14. data/lib/cloudreactor_api_client/api/workflows_api.rb +482 -0
  15. data/lib/cloudreactor_api_client/api_client.rb +390 -0
  16. data/lib/cloudreactor_api_client/api_error.rb +57 -0
  17. data/lib/cloudreactor_api_client/configuration.rb +277 -0
  18. data/lib/cloudreactor_api_client/models/alert_method.rb +449 -0
  19. data/lib/cloudreactor_api_client/models/aws_ecs_execution_method.rb +517 -0
  20. data/lib/cloudreactor_api_client/models/aws_ecs_execution_method_capability.rb +565 -0
  21. data/lib/cloudreactor_api_client/models/aws_ecs_launch_type.rb +37 -0
  22. data/lib/cloudreactor_api_client/models/aws_ecs_run_environment_execution_method_capability.rb +476 -0
  23. data/lib/cloudreactor_api_client/models/aws_ecs_service_load_balancer_details.rb +307 -0
  24. data/lib/cloudreactor_api_client/models/aws_ecs_service_options.rb +308 -0
  25. data/lib/cloudreactor_api_client/models/current_service_info.rb +255 -0
  26. data/lib/cloudreactor_api_client/models/email_notification_profile.rb +454 -0
  27. data/lib/cloudreactor_api_client/models/execution_method_capability.rb +54 -0
  28. data/lib/cloudreactor_api_client/models/failure_behavior_enum.rb +38 -0
  29. data/lib/cloudreactor_api_client/models/group.rb +268 -0
  30. data/lib/cloudreactor_api_client/models/link.rb +301 -0
  31. data/lib/cloudreactor_api_client/models/name_and_uuid.rb +236 -0
  32. data/lib/cloudreactor_api_client/models/notification_severity.rb +39 -0
  33. data/lib/cloudreactor_api_client/models/pager_duty_profile.rb +484 -0
  34. data/lib/cloudreactor_api_client/models/paginated_alert_method_list.rb +247 -0
  35. data/lib/cloudreactor_api_client/models/paginated_email_notification_profile_list.rb +247 -0
  36. data/lib/cloudreactor_api_client/models/paginated_pager_duty_profile_list.rb +247 -0
  37. data/lib/cloudreactor_api_client/models/paginated_run_environment_list.rb +247 -0
  38. data/lib/cloudreactor_api_client/models/paginated_task_execution_list.rb +247 -0
  39. data/lib/cloudreactor_api_client/models/paginated_task_list.rb +247 -0
  40. data/lib/cloudreactor_api_client/models/paginated_workflow_execution_summary_list.rb +247 -0
  41. data/lib/cloudreactor_api_client/models/paginated_workflow_summary_list.rb +247 -0
  42. data/lib/cloudreactor_api_client/models/paginated_workflow_task_instance_list.rb +247 -0
  43. data/lib/cloudreactor_api_client/models/paginated_workflow_transition_list.rb +247 -0
  44. data/lib/cloudreactor_api_client/models/patched_alert_method.rb +405 -0
  45. data/lib/cloudreactor_api_client/models/patched_email_notification_profile.rb +415 -0
  46. data/lib/cloudreactor_api_client/models/patched_pager_duty_profile.rb +436 -0
  47. data/lib/cloudreactor_api_client/models/patched_run_environment.rb +511 -0
  48. data/lib/cloudreactor_api_client/models/patched_task.rb +897 -0
  49. data/lib/cloudreactor_api_client/models/patched_task_execution.rb +1904 -0
  50. data/lib/cloudreactor_api_client/models/patched_workflow.rb +507 -0
  51. data/lib/cloudreactor_api_client/models/patched_workflow_execution.rb +559 -0
  52. data/lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb +676 -0
  53. data/lib/cloudreactor_api_client/models/patched_workflow_transition.rb +432 -0
  54. data/lib/cloudreactor_api_client/models/propagate_tags_enum.rb +37 -0
  55. data/lib/cloudreactor_api_client/models/rule_type_enum.rb +43 -0
  56. data/lib/cloudreactor_api_client/models/run_environment.rb +555 -0
  57. data/lib/cloudreactor_api_client/models/start_transition_condition_enum.rb +39 -0
  58. data/lib/cloudreactor_api_client/models/stop_reason_enum.rb +42 -0
  59. data/lib/cloudreactor_api_client/models/task.rb +941 -0
  60. data/lib/cloudreactor_api_client/models/task_execution.rb +1954 -0
  61. data/lib/cloudreactor_api_client/models/task_execution_status.rb +46 -0
  62. data/lib/cloudreactor_api_client/models/threshold_property_enum.rb +39 -0
  63. data/lib/cloudreactor_api_client/models/timeout_behavior_enum.rb +40 -0
  64. data/lib/cloudreactor_api_client/models/unknown_execution_method_capability.rb +238 -0
  65. data/lib/cloudreactor_api_client/models/workflow.rb +556 -0
  66. data/lib/cloudreactor_api_client/models/workflow_execution.rb +629 -0
  67. data/lib/cloudreactor_api_client/models/workflow_execution_status.rb +42 -0
  68. data/lib/cloudreactor_api_client/models/workflow_execution_summary.rb +523 -0
  69. data/lib/cloudreactor_api_client/models/workflow_summary.rb +513 -0
  70. data/lib/cloudreactor_api_client/models/workflow_task_instance.rb +715 -0
  71. data/lib/cloudreactor_api_client/models/workflow_task_instance_execution.rb +280 -0
  72. data/lib/cloudreactor_api_client/models/workflow_task_instance_execution_base.rb +270 -0
  73. data/lib/cloudreactor_api_client/models/workflow_transition.rb +467 -0
  74. data/lib/cloudreactor_api_client/models/workflow_transition_evaluation.rb +280 -0
  75. data/lib/cloudreactor_api_client/version.rb +15 -0
  76. data/lib/cloudreactor_api_client.rb +121 -0
  77. data/lib/cloudreactor_wrapper_io/status_updater.rb +124 -0
  78. data/lib/cloudreactor_wrapper_io.rb +13 -0
  79. data/spec/api/alert_methods_api_spec.rb +114 -0
  80. data/spec/api/email_notification_profiles_api_spec.rb +114 -0
  81. data/spec/api/pagerduty_profiles_api_spec.rb +114 -0
  82. data/spec/api/run_environments_api_spec.rb +113 -0
  83. data/spec/api/task_executions_api_spec.rb +102 -0
  84. data/spec/api/tasks_api_spec.rb +103 -0
  85. data/spec/api/workflow_executions_api_spec.rb +124 -0
  86. data/spec/api/workflow_task_instances_api_spec.rb +107 -0
  87. data/spec/api/workflow_transitions_api_spec.rb +101 -0
  88. data/spec/api/workflows_api_spec.rb +114 -0
  89. data/spec/api_client_spec.rb +226 -0
  90. data/spec/configuration_spec.rb +42 -0
  91. data/spec/integration/task_execution_integration_spec.rb +51 -0
  92. data/spec/models/alert_method_spec.rb +136 -0
  93. data/spec/models/aws_ecs_execution_method_capability_spec.rb +166 -0
  94. data/spec/models/aws_ecs_execution_method_spec.rb +148 -0
  95. data/spec/models/aws_ecs_launch_type_spec.rb +28 -0
  96. data/spec/models/aws_ecs_run_environment_execution_method_capability_spec.rb +130 -0
  97. data/spec/models/aws_ecs_service_load_balancer_details_spec.rb +46 -0
  98. data/spec/models/aws_ecs_service_options_spec.rb +88 -0
  99. data/spec/models/current_service_info_spec.rb +52 -0
  100. data/spec/models/email_notification_profile_spec.rb +118 -0
  101. data/spec/models/execution_method_capability_spec.rb +43 -0
  102. data/spec/models/failure_behavior_enum_spec.rb +28 -0
  103. data/spec/models/group_spec.rb +46 -0
  104. data/spec/models/link_spec.rb +70 -0
  105. data/spec/models/name_and_uuid_spec.rb +46 -0
  106. data/spec/models/notification_severity_spec.rb +28 -0
  107. data/spec/models/pager_duty_profile_spec.rb +118 -0
  108. data/spec/models/paginated_alert_method_list_spec.rb +52 -0
  109. data/spec/models/paginated_email_notification_profile_list_spec.rb +52 -0
  110. data/spec/models/paginated_pager_duty_profile_list_spec.rb +52 -0
  111. data/spec/models/paginated_run_environment_list_spec.rb +52 -0
  112. data/spec/models/paginated_task_execution_list_spec.rb +52 -0
  113. data/spec/models/paginated_task_list_spec.rb +52 -0
  114. data/spec/models/paginated_workflow_execution_summary_list_spec.rb +52 -0
  115. data/spec/models/paginated_workflow_summary_list_spec.rb +52 -0
  116. data/spec/models/paginated_workflow_task_instance_list_spec.rb +52 -0
  117. data/spec/models/paginated_workflow_transition_list_spec.rb +52 -0
  118. data/spec/models/patched_alert_method_spec.rb +136 -0
  119. data/spec/models/patched_email_notification_profile_spec.rb +118 -0
  120. data/spec/models/patched_pager_duty_profile_spec.rb +118 -0
  121. data/spec/models/patched_run_environment_spec.rb +136 -0
  122. data/spec/models/patched_task_execution_spec.rb +466 -0
  123. data/spec/models/patched_task_spec.rb +244 -0
  124. data/spec/models/patched_workflow_execution_spec.rb +172 -0
  125. data/spec/models/patched_workflow_spec.rb +142 -0
  126. data/spec/models/patched_workflow_task_instance_spec.rb +196 -0
  127. data/spec/models/patched_workflow_transition_spec.rb +118 -0
  128. data/spec/models/propagate_tags_enum_spec.rb +28 -0
  129. data/spec/models/rule_type_enum_spec.rb +28 -0
  130. data/spec/models/run_environment_spec.rb +136 -0
  131. data/spec/models/start_transition_condition_enum_spec.rb +28 -0
  132. data/spec/models/stop_reason_enum_spec.rb +28 -0
  133. data/spec/models/task_execution_spec.rb +466 -0
  134. data/spec/models/task_execution_status_spec.rb +28 -0
  135. data/spec/models/task_spec.rb +244 -0
  136. data/spec/models/threshold_property_enum_spec.rb +28 -0
  137. data/spec/models/timeout_behavior_enum_spec.rb +28 -0
  138. data/spec/models/unknown_execution_method_capability_spec.rb +40 -0
  139. data/spec/models/workflow_execution_spec.rb +172 -0
  140. data/spec/models/workflow_execution_status_spec.rb +28 -0
  141. data/spec/models/workflow_execution_summary_spec.rb +130 -0
  142. data/spec/models/workflow_spec.rb +142 -0
  143. data/spec/models/workflow_summary_spec.rb +124 -0
  144. data/spec/models/workflow_task_instance_execution_base_spec.rb +58 -0
  145. data/spec/models/workflow_task_instance_execution_spec.rb +64 -0
  146. data/spec/models/workflow_task_instance_spec.rb +196 -0
  147. data/spec/models/workflow_transition_evaluation_spec.rb +64 -0
  148. data/spec/models/workflow_transition_spec.rb +118 -0
  149. data/spec/spec_helper.rb +111 -0
  150. data/spec/wrapper_io/status_updater_spec.rb +147 -0
  151. metadata +305 -0
@@ -0,0 +1,482 @@
1
+ =begin
2
+ #CloudReactor API
3
+
4
+ #CloudReactor API Documentation
5
+
6
+ The version of the OpenAPI document: 0.2.0
7
+ Contact: jeff@cloudreactor.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module CloudReactorAPIClient
16
+ class PagerdutyProfilesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # @param uuid [String]
23
+ # @param pager_duty_profile [PagerDutyProfile]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [PagerDutyProfile]
26
+ def pagerduty_profiles_clone_create(uuid, pager_duty_profile, opts = {})
27
+ data, _status_code, _headers = pagerduty_profiles_clone_create_with_http_info(uuid, pager_duty_profile, opts)
28
+ data
29
+ end
30
+
31
+ # @param uuid [String]
32
+ # @param pager_duty_profile [PagerDutyProfile]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(PagerDutyProfile, Integer, Hash)>] PagerDutyProfile data, response status code and response headers
35
+ def pagerduty_profiles_clone_create_with_http_info(uuid, pager_duty_profile, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: PagerdutyProfilesApi.pagerduty_profiles_clone_create ...'
38
+ end
39
+ # verify the required parameter 'uuid' is set
40
+ if @api_client.config.client_side_validation && uuid.nil?
41
+ fail ArgumentError, "Missing the required parameter 'uuid' when calling PagerdutyProfilesApi.pagerduty_profiles_clone_create"
42
+ end
43
+ # verify the required parameter 'pager_duty_profile' is set
44
+ if @api_client.config.client_side_validation && pager_duty_profile.nil?
45
+ fail ArgumentError, "Missing the required parameter 'pager_duty_profile' when calling PagerdutyProfilesApi.pagerduty_profiles_clone_create"
46
+ end
47
+ # resource path
48
+ local_var_path = '/pagerduty_profiles/{uuid}/clone/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ # HTTP header 'Content-Type'
58
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
59
+ if !content_type.nil?
60
+ header_params['Content-Type'] = content_type
61
+ end
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pager_duty_profile)
68
+
69
+ # return_type
70
+ return_type = opts[:debug_return_type] || 'PagerDutyProfile'
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
74
+
75
+ new_options = opts.merge(
76
+ :operation => :"PagerdutyProfilesApi.pagerduty_profiles_clone_create",
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: PagerdutyProfilesApi#pagerduty_profiles_clone_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # @param pager_duty_profile [PagerDutyProfile]
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [PagerDutyProfile]
95
+ def pagerduty_profiles_create(pager_duty_profile, opts = {})
96
+ data, _status_code, _headers = pagerduty_profiles_create_with_http_info(pager_duty_profile, opts)
97
+ data
98
+ end
99
+
100
+ # @param pager_duty_profile [PagerDutyProfile]
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [Array<(PagerDutyProfile, Integer, Hash)>] PagerDutyProfile data, response status code and response headers
103
+ def pagerduty_profiles_create_with_http_info(pager_duty_profile, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: PagerdutyProfilesApi.pagerduty_profiles_create ...'
106
+ end
107
+ # verify the required parameter 'pager_duty_profile' is set
108
+ if @api_client.config.client_side_validation && pager_duty_profile.nil?
109
+ fail ArgumentError, "Missing the required parameter 'pager_duty_profile' when calling PagerdutyProfilesApi.pagerduty_profiles_create"
110
+ end
111
+ # resource path
112
+ local_var_path = '/pagerduty_profiles/'
113
+
114
+ # query parameters
115
+ query_params = opts[:query_params] || {}
116
+
117
+ # header parameters
118
+ header_params = opts[:header_params] || {}
119
+ # HTTP header 'Accept' (if needed)
120
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121
+ # HTTP header 'Content-Type'
122
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
123
+ if !content_type.nil?
124
+ header_params['Content-Type'] = content_type
125
+ end
126
+
127
+ # form parameters
128
+ form_params = opts[:form_params] || {}
129
+
130
+ # http body (model)
131
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pager_duty_profile)
132
+
133
+ # return_type
134
+ return_type = opts[:debug_return_type] || 'PagerDutyProfile'
135
+
136
+ # auth_names
137
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
138
+
139
+ new_options = opts.merge(
140
+ :operation => :"PagerdutyProfilesApi.pagerduty_profiles_create",
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: PagerdutyProfilesApi#pagerduty_profiles_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # @param uuid [String]
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [nil]
159
+ def pagerduty_profiles_destroy(uuid, opts = {})
160
+ pagerduty_profiles_destroy_with_http_info(uuid, opts)
161
+ nil
162
+ end
163
+
164
+ # @param uuid [String]
165
+ # @param [Hash] opts the optional parameters
166
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
167
+ def pagerduty_profiles_destroy_with_http_info(uuid, opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug 'Calling API: PagerdutyProfilesApi.pagerduty_profiles_destroy ...'
170
+ end
171
+ # verify the required parameter 'uuid' is set
172
+ if @api_client.config.client_side_validation && uuid.nil?
173
+ fail ArgumentError, "Missing the required parameter 'uuid' when calling PagerdutyProfilesApi.pagerduty_profiles_destroy"
174
+ end
175
+ # resource path
176
+ local_var_path = '/pagerduty_profiles/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
177
+
178
+ # query parameters
179
+ query_params = opts[:query_params] || {}
180
+
181
+ # header parameters
182
+ header_params = opts[:header_params] || {}
183
+
184
+ # form parameters
185
+ form_params = opts[:form_params] || {}
186
+
187
+ # http body (model)
188
+ post_body = opts[:debug_body]
189
+
190
+ # return_type
191
+ return_type = opts[:debug_return_type]
192
+
193
+ # auth_names
194
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
195
+
196
+ new_options = opts.merge(
197
+ :operation => :"PagerdutyProfilesApi.pagerduty_profiles_destroy",
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names,
203
+ :return_type => return_type
204
+ )
205
+
206
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: PagerdutyProfilesApi#pagerduty_profiles_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+
213
+ # @param [Hash] opts the optional parameters
214
+ # @option opts [Integer] :created_by_group__id
215
+ # @option opts [Integer] :limit Number of results to return per page.
216
+ # @option opts [String] :name
217
+ # @option opts [Integer] :offset The initial index from which to return the results.
218
+ # @option opts [String] :ordering Which field to use when ordering the results.
219
+ # @option opts [String] :run_environment__uuid
220
+ # @option opts [String] :search A search term.
221
+ # @return [PaginatedPagerDutyProfileList]
222
+ def pagerduty_profiles_list(opts = {})
223
+ data, _status_code, _headers = pagerduty_profiles_list_with_http_info(opts)
224
+ data
225
+ end
226
+
227
+ # @param [Hash] opts the optional parameters
228
+ # @option opts [Integer] :created_by_group__id
229
+ # @option opts [Integer] :limit Number of results to return per page.
230
+ # @option opts [String] :name
231
+ # @option opts [Integer] :offset The initial index from which to return the results.
232
+ # @option opts [String] :ordering Which field to use when ordering the results.
233
+ # @option opts [String] :run_environment__uuid
234
+ # @option opts [String] :search A search term.
235
+ # @return [Array<(PaginatedPagerDutyProfileList, Integer, Hash)>] PaginatedPagerDutyProfileList data, response status code and response headers
236
+ def pagerduty_profiles_list_with_http_info(opts = {})
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug 'Calling API: PagerdutyProfilesApi.pagerduty_profiles_list ...'
239
+ end
240
+ # resource path
241
+ local_var_path = '/pagerduty_profiles/'
242
+
243
+ # query parameters
244
+ query_params = opts[:query_params] || {}
245
+ query_params[:'created_by_group__id'] = opts[:'created_by_group__id'] if !opts[:'created_by_group__id'].nil?
246
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
247
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
248
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
249
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
250
+ query_params[:'run_environment__uuid'] = opts[:'run_environment__uuid'] if !opts[:'run_environment__uuid'].nil?
251
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
252
+
253
+ # header parameters
254
+ header_params = opts[:header_params] || {}
255
+ # HTTP header 'Accept' (if needed)
256
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
257
+
258
+ # form parameters
259
+ form_params = opts[:form_params] || {}
260
+
261
+ # http body (model)
262
+ post_body = opts[:debug_body]
263
+
264
+ # return_type
265
+ return_type = opts[:debug_return_type] || 'PaginatedPagerDutyProfileList'
266
+
267
+ # auth_names
268
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
269
+
270
+ new_options = opts.merge(
271
+ :operation => :"PagerdutyProfilesApi.pagerduty_profiles_list",
272
+ :header_params => header_params,
273
+ :query_params => query_params,
274
+ :form_params => form_params,
275
+ :body => post_body,
276
+ :auth_names => auth_names,
277
+ :return_type => return_type
278
+ )
279
+
280
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
281
+ if @api_client.config.debugging
282
+ @api_client.config.logger.debug "API called: PagerdutyProfilesApi#pagerduty_profiles_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
283
+ end
284
+ return data, status_code, headers
285
+ end
286
+
287
+ # @param uuid [String]
288
+ # @param [Hash] opts the optional parameters
289
+ # @option opts [PatchedPagerDutyProfile] :patched_pager_duty_profile
290
+ # @return [PagerDutyProfile]
291
+ def pagerduty_profiles_partial_update(uuid, opts = {})
292
+ data, _status_code, _headers = pagerduty_profiles_partial_update_with_http_info(uuid, opts)
293
+ data
294
+ end
295
+
296
+ # @param uuid [String]
297
+ # @param [Hash] opts the optional parameters
298
+ # @option opts [PatchedPagerDutyProfile] :patched_pager_duty_profile
299
+ # @return [Array<(PagerDutyProfile, Integer, Hash)>] PagerDutyProfile data, response status code and response headers
300
+ def pagerduty_profiles_partial_update_with_http_info(uuid, opts = {})
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug 'Calling API: PagerdutyProfilesApi.pagerduty_profiles_partial_update ...'
303
+ end
304
+ # verify the required parameter 'uuid' is set
305
+ if @api_client.config.client_side_validation && uuid.nil?
306
+ fail ArgumentError, "Missing the required parameter 'uuid' when calling PagerdutyProfilesApi.pagerduty_profiles_partial_update"
307
+ end
308
+ # resource path
309
+ local_var_path = '/pagerduty_profiles/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
310
+
311
+ # query parameters
312
+ query_params = opts[:query_params] || {}
313
+
314
+ # header parameters
315
+ header_params = opts[:header_params] || {}
316
+ # HTTP header 'Accept' (if needed)
317
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
318
+ # HTTP header 'Content-Type'
319
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
320
+ if !content_type.nil?
321
+ header_params['Content-Type'] = content_type
322
+ end
323
+
324
+ # form parameters
325
+ form_params = opts[:form_params] || {}
326
+
327
+ # http body (model)
328
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_pager_duty_profile'])
329
+
330
+ # return_type
331
+ return_type = opts[:debug_return_type] || 'PagerDutyProfile'
332
+
333
+ # auth_names
334
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
335
+
336
+ new_options = opts.merge(
337
+ :operation => :"PagerdutyProfilesApi.pagerduty_profiles_partial_update",
338
+ :header_params => header_params,
339
+ :query_params => query_params,
340
+ :form_params => form_params,
341
+ :body => post_body,
342
+ :auth_names => auth_names,
343
+ :return_type => return_type
344
+ )
345
+
346
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
347
+ if @api_client.config.debugging
348
+ @api_client.config.logger.debug "API called: PagerdutyProfilesApi#pagerduty_profiles_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
349
+ end
350
+ return data, status_code, headers
351
+ end
352
+
353
+ # @param uuid [String]
354
+ # @param [Hash] opts the optional parameters
355
+ # @return [PagerDutyProfile]
356
+ def pagerduty_profiles_retrieve(uuid, opts = {})
357
+ data, _status_code, _headers = pagerduty_profiles_retrieve_with_http_info(uuid, opts)
358
+ data
359
+ end
360
+
361
+ # @param uuid [String]
362
+ # @param [Hash] opts the optional parameters
363
+ # @return [Array<(PagerDutyProfile, Integer, Hash)>] PagerDutyProfile data, response status code and response headers
364
+ def pagerduty_profiles_retrieve_with_http_info(uuid, opts = {})
365
+ if @api_client.config.debugging
366
+ @api_client.config.logger.debug 'Calling API: PagerdutyProfilesApi.pagerduty_profiles_retrieve ...'
367
+ end
368
+ # verify the required parameter 'uuid' is set
369
+ if @api_client.config.client_side_validation && uuid.nil?
370
+ fail ArgumentError, "Missing the required parameter 'uuid' when calling PagerdutyProfilesApi.pagerduty_profiles_retrieve"
371
+ end
372
+ # resource path
373
+ local_var_path = '/pagerduty_profiles/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
374
+
375
+ # query parameters
376
+ query_params = opts[:query_params] || {}
377
+
378
+ # header parameters
379
+ header_params = opts[:header_params] || {}
380
+ # HTTP header 'Accept' (if needed)
381
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
382
+
383
+ # form parameters
384
+ form_params = opts[:form_params] || {}
385
+
386
+ # http body (model)
387
+ post_body = opts[:debug_body]
388
+
389
+ # return_type
390
+ return_type = opts[:debug_return_type] || 'PagerDutyProfile'
391
+
392
+ # auth_names
393
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
394
+
395
+ new_options = opts.merge(
396
+ :operation => :"PagerdutyProfilesApi.pagerduty_profiles_retrieve",
397
+ :header_params => header_params,
398
+ :query_params => query_params,
399
+ :form_params => form_params,
400
+ :body => post_body,
401
+ :auth_names => auth_names,
402
+ :return_type => return_type
403
+ )
404
+
405
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
406
+ if @api_client.config.debugging
407
+ @api_client.config.logger.debug "API called: PagerdutyProfilesApi#pagerduty_profiles_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
408
+ end
409
+ return data, status_code, headers
410
+ end
411
+
412
+ # @param uuid [String]
413
+ # @param pager_duty_profile [PagerDutyProfile]
414
+ # @param [Hash] opts the optional parameters
415
+ # @return [PagerDutyProfile]
416
+ def pagerduty_profiles_update(uuid, pager_duty_profile, opts = {})
417
+ data, _status_code, _headers = pagerduty_profiles_update_with_http_info(uuid, pager_duty_profile, opts)
418
+ data
419
+ end
420
+
421
+ # @param uuid [String]
422
+ # @param pager_duty_profile [PagerDutyProfile]
423
+ # @param [Hash] opts the optional parameters
424
+ # @return [Array<(PagerDutyProfile, Integer, Hash)>] PagerDutyProfile data, response status code and response headers
425
+ def pagerduty_profiles_update_with_http_info(uuid, pager_duty_profile, opts = {})
426
+ if @api_client.config.debugging
427
+ @api_client.config.logger.debug 'Calling API: PagerdutyProfilesApi.pagerduty_profiles_update ...'
428
+ end
429
+ # verify the required parameter 'uuid' is set
430
+ if @api_client.config.client_side_validation && uuid.nil?
431
+ fail ArgumentError, "Missing the required parameter 'uuid' when calling PagerdutyProfilesApi.pagerduty_profiles_update"
432
+ end
433
+ # verify the required parameter 'pager_duty_profile' is set
434
+ if @api_client.config.client_side_validation && pager_duty_profile.nil?
435
+ fail ArgumentError, "Missing the required parameter 'pager_duty_profile' when calling PagerdutyProfilesApi.pagerduty_profiles_update"
436
+ end
437
+ # resource path
438
+ local_var_path = '/pagerduty_profiles/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
439
+
440
+ # query parameters
441
+ query_params = opts[:query_params] || {}
442
+
443
+ # header parameters
444
+ header_params = opts[:header_params] || {}
445
+ # HTTP header 'Accept' (if needed)
446
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
447
+ # HTTP header 'Content-Type'
448
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
449
+ if !content_type.nil?
450
+ header_params['Content-Type'] = content_type
451
+ end
452
+
453
+ # form parameters
454
+ form_params = opts[:form_params] || {}
455
+
456
+ # http body (model)
457
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pager_duty_profile)
458
+
459
+ # return_type
460
+ return_type = opts[:debug_return_type] || 'PagerDutyProfile'
461
+
462
+ # auth_names
463
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
464
+
465
+ new_options = opts.merge(
466
+ :operation => :"PagerdutyProfilesApi.pagerduty_profiles_update",
467
+ :header_params => header_params,
468
+ :query_params => query_params,
469
+ :form_params => form_params,
470
+ :body => post_body,
471
+ :auth_names => auth_names,
472
+ :return_type => return_type
473
+ )
474
+
475
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
476
+ if @api_client.config.debugging
477
+ @api_client.config.logger.debug "API called: PagerdutyProfilesApi#pagerduty_profiles_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
478
+ end
479
+ return data, status_code, headers
480
+ end
481
+ end
482
+ end