xbim_comms 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +210 -0
  4. data/Rakefile +10 -0
  5. data/lib/xbim_comms/api/contacts_api.rb +206 -0
  6. data/lib/xbim_comms/api/conversations_api.rb +2670 -0
  7. data/lib/xbim_comms/api/files_api.rb +107 -0
  8. data/lib/xbim_comms/api/snapshots_api.rb +100 -0
  9. data/lib/xbim_comms/api_client.rb +390 -0
  10. data/lib/xbim_comms/api_error.rb +57 -0
  11. data/lib/xbim_comms/configuration.rb +278 -0
  12. data/lib/xbim_comms/models/aggregate.rb +227 -0
  13. data/lib/xbim_comms/models/aggregate_list_value.rb +220 -0
  14. data/lib/xbim_comms/models/analytical_result.rb +270 -0
  15. data/lib/xbim_comms/models/analytical_result_all_of.rb +258 -0
  16. data/lib/xbim_comms/models/animation.rb +232 -0
  17. data/lib/xbim_comms/models/animation_all_of.rb +220 -0
  18. data/lib/xbim_comms/models/bitmap.rb +303 -0
  19. data/lib/xbim_comms/models/blob.rb +245 -0
  20. data/lib/xbim_comms/models/boolean_value.rb +218 -0
  21. data/lib/xbim_comms/models/clipping_plane.rb +231 -0
  22. data/lib/xbim_comms/models/coloring.rb +229 -0
  23. data/lib/xbim_comms/models/column_request.rb +279 -0
  24. data/lib/xbim_comms/models/component.rb +236 -0
  25. data/lib/xbim_comms/models/components.rb +240 -0
  26. data/lib/xbim_comms/models/contact.rb +227 -0
  27. data/lib/xbim_comms/models/contact_list.rb +238 -0
  28. data/lib/xbim_comms/models/conversation.rb +392 -0
  29. data/lib/xbim_comms/models/conversation_create.rb +273 -0
  30. data/lib/xbim_comms/models/conversation_list.rb +238 -0
  31. data/lib/xbim_comms/models/conversation_tenant.rb +254 -0
  32. data/lib/xbim_comms/models/conversation_update.rb +302 -0
  33. data/lib/xbim_comms/models/entity_key.rb +227 -0
  34. data/lib/xbim_comms/models/exception_message.rb +245 -0
  35. data/lib/xbim_comms/models/file.rb +266 -0
  36. data/lib/xbim_comms/models/file_all_of.rb +254 -0
  37. data/lib/xbim_comms/models/int32_value.rb +218 -0
  38. data/lib/xbim_comms/models/key_frame.rb +236 -0
  39. data/lib/xbim_comms/models/line.rb +231 -0
  40. data/lib/xbim_comms/models/message.rb +416 -0
  41. data/lib/xbim_comms/models/message_content.rb +220 -0
  42. data/lib/xbim_comms/models/message_create.rb +273 -0
  43. data/lib/xbim_comms/models/message_list.rb +238 -0
  44. data/lib/xbim_comms/models/message_part.rb +246 -0
  45. data/lib/xbim_comms/models/message_update.rb +297 -0
  46. data/lib/xbim_comms/models/orthogonal_camera.rb +269 -0
  47. data/lib/xbim_comms/models/participant.rb +232 -0
  48. data/lib/xbim_comms/models/participant_with_role.rb +293 -0
  49. data/lib/xbim_comms/models/participant_with_role_create.rb +266 -0
  50. data/lib/xbim_comms/models/participant_with_role_list.rb +238 -0
  51. data/lib/xbim_comms/models/participant_with_role_update.rb +261 -0
  52. data/lib/xbim_comms/models/perspective_camera.rb +269 -0
  53. data/lib/xbim_comms/models/pie_chart.rb +257 -0
  54. data/lib/xbim_comms/models/pie_chart_all_of.rb +245 -0
  55. data/lib/xbim_comms/models/point.rb +227 -0
  56. data/lib/xbim_comms/models/preview_row.rb +220 -0
  57. data/lib/xbim_comms/models/schedule.rb +270 -0
  58. data/lib/xbim_comms/models/schedule_all_of.rb +258 -0
  59. data/lib/xbim_comms/models/schedule_column.rb +384 -0
  60. data/lib/xbim_comms/models/schedule_request.rb +252 -0
  61. data/lib/xbim_comms/models/schedule_request_all_of.rb +240 -0
  62. data/lib/xbim_comms/models/section_box.rb +274 -0
  63. data/lib/xbim_comms/models/sheet.rb +268 -0
  64. data/lib/xbim_comms/models/sheet_all_of.rb +256 -0
  65. data/lib/xbim_comms/models/sheet_part.rb +254 -0
  66. data/lib/xbim_comms/models/snapshot.rb +270 -0
  67. data/lib/xbim_comms/models/text.rb +220 -0
  68. data/lib/xbim_comms/models/view.rb +239 -0
  69. data/lib/xbim_comms/models/view_all_of.rb +227 -0
  70. data/lib/xbim_comms/models/view_setup_hints.rb +236 -0
  71. data/lib/xbim_comms/models/viewpoint.rb +296 -0
  72. data/lib/xbim_comms/models/visibility.rb +238 -0
  73. data/lib/xbim_comms/version.rb +15 -0
  74. data/lib/xbim_comms.rb +104 -0
  75. data/spec/api/contacts_api_spec.rb +74 -0
  76. data/spec/api/conversations_api_spec.rb +521 -0
  77. data/spec/api/files_api_spec.rb +50 -0
  78. data/spec/api/snapshots_api_spec.rb +49 -0
  79. data/spec/api_client_spec.rb +226 -0
  80. data/spec/configuration_spec.rb +42 -0
  81. data/spec/models/aggregate_list_value_spec.rb +34 -0
  82. data/spec/models/aggregate_spec.rb +40 -0
  83. data/spec/models/analytical_result_all_of_spec.rb +58 -0
  84. data/spec/models/analytical_result_spec.rb +58 -0
  85. data/spec/models/animation_all_of_spec.rb +34 -0
  86. data/spec/models/animation_spec.rb +34 -0
  87. data/spec/models/bitmap_spec.rb +68 -0
  88. data/spec/models/blob_spec.rb +52 -0
  89. data/spec/models/boolean_value_spec.rb +34 -0
  90. data/spec/models/clipping_plane_spec.rb +40 -0
  91. data/spec/models/coloring_spec.rb +40 -0
  92. data/spec/models/column_request_spec.rb +56 -0
  93. data/spec/models/component_spec.rb +46 -0
  94. data/spec/models/components_spec.rb +46 -0
  95. data/spec/models/contact_list_spec.rb +46 -0
  96. data/spec/models/contact_spec.rb +40 -0
  97. data/spec/models/conversation_create_spec.rb +64 -0
  98. data/spec/models/conversation_list_spec.rb +46 -0
  99. data/spec/models/conversation_spec.rb +122 -0
  100. data/spec/models/conversation_tenant_spec.rb +58 -0
  101. data/spec/models/conversation_update_spec.rb +68 -0
  102. data/spec/models/entity_key_spec.rb +40 -0
  103. data/spec/models/exception_message_spec.rb +52 -0
  104. data/spec/models/file_all_of_spec.rb +58 -0
  105. data/spec/models/file_spec.rb +58 -0
  106. data/spec/models/int32_value_spec.rb +34 -0
  107. data/spec/models/key_frame_spec.rb +46 -0
  108. data/spec/models/line_spec.rb +40 -0
  109. data/spec/models/message_content_spec.rb +34 -0
  110. data/spec/models/message_create_spec.rb +64 -0
  111. data/spec/models/message_list_spec.rb +46 -0
  112. data/spec/models/message_part_spec.rb +46 -0
  113. data/spec/models/message_spec.rb +146 -0
  114. data/spec/models/message_update_spec.rb +68 -0
  115. data/spec/models/orthogonal_camera_spec.rb +64 -0
  116. data/spec/models/participant_spec.rb +40 -0
  117. data/spec/models/participant_with_role_create_spec.rb +44 -0
  118. data/spec/models/participant_with_role_list_spec.rb +46 -0
  119. data/spec/models/participant_with_role_spec.rb +62 -0
  120. data/spec/models/participant_with_role_update_spec.rb +44 -0
  121. data/spec/models/perspective_camera_spec.rb +64 -0
  122. data/spec/models/pie_chart_all_of_spec.rb +52 -0
  123. data/spec/models/pie_chart_spec.rb +52 -0
  124. data/spec/models/point_spec.rb +40 -0
  125. data/spec/models/preview_row_spec.rb +34 -0
  126. data/spec/models/schedule_all_of_spec.rb +58 -0
  127. data/spec/models/schedule_column_spec.rb +118 -0
  128. data/spec/models/schedule_request_all_of_spec.rb +46 -0
  129. data/spec/models/schedule_request_spec.rb +46 -0
  130. data/spec/models/schedule_spec.rb +58 -0
  131. data/spec/models/section_box_spec.rb +70 -0
  132. data/spec/models/sheet_all_of_spec.rb +58 -0
  133. data/spec/models/sheet_part_spec.rb +58 -0
  134. data/spec/models/sheet_spec.rb +58 -0
  135. data/spec/models/snapshot_spec.rb +50 -0
  136. data/spec/models/text_spec.rb +28 -0
  137. data/spec/models/view_all_of_spec.rb +40 -0
  138. data/spec/models/view_setup_hints_spec.rb +46 -0
  139. data/spec/models/view_spec.rb +40 -0
  140. data/spec/models/viewpoint_spec.rb +82 -0
  141. data/spec/models/visibility_spec.rb +46 -0
  142. data/spec/spec_helper.rb +111 -0
  143. data/xbim_comms-1.0.0.gem +0 -0
  144. data/xbim_comms.gemspec +38 -0
  145. metadata +226 -0
@@ -0,0 +1,2670 @@
1
+ =begin
2
+ #Flex Comms API 2.0
3
+
4
+ #Communication centralised around construction data
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: info@xbim.net
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module XbimComms
16
+ class ConversationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Aggregates conversation data efficiently for reporting purposes
23
+ # <span style='font-size: 17px;'>Summary:</span>Aggregates conversation data efficiently for reporting purposes.<br/>Return Type: <b>AggregateListValue</b><br/><br/>
24
+ # @param region [String] The data center region the data resides in
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :expand
27
+ # @option opts [String] :filter
28
+ # @option opts [String] :select
29
+ # @option opts [String] :orderby
30
+ # @option opts [Boolean] :count
31
+ # @option opts [String] :field The field to aggregate on
32
+ # @return [AggregateListValue]
33
+ def aggregate_data(region, opts = {})
34
+ data, _status_code, _headers = aggregate_data_with_http_info(region, opts)
35
+ data
36
+ end
37
+
38
+ # Aggregates conversation data efficiently for reporting purposes
39
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Aggregates conversation data efficiently for reporting purposes.&lt;br/&gt;Return Type: &lt;b&gt;AggregateListValue&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
40
+ # @param region [String] The data center region the data resides in
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [String] :expand
43
+ # @option opts [String] :filter
44
+ # @option opts [String] :select
45
+ # @option opts [String] :orderby
46
+ # @option opts [Boolean] :count
47
+ # @option opts [String] :field The field to aggregate on
48
+ # @return [Array<(AggregateListValue, Integer, Hash)>] AggregateListValue data, response status code and response headers
49
+ def aggregate_data_with_http_info(region, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.aggregate_data ...'
52
+ end
53
+ # verify the required parameter 'region' is set
54
+ if @api_client.config.client_side_validation && region.nil?
55
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.aggregate_data"
56
+ end
57
+ # verify enum value
58
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
59
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
60
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
61
+ end
62
+ allowable_values = ["ConversationDateCreated", "MessageDateCreated", "State", "BuildingName", "Owner"]
63
+ if @api_client.config.client_side_validation && opts[:'field'] && !allowable_values.include?(opts[:'field'])
64
+ fail ArgumentError, "invalid value for \"field\", must be one of #{allowable_values}"
65
+ end
66
+ # resource path
67
+ local_var_path = '/{region}/comms/2.0/Conversations/Aggregate()'.sub('{' + 'region' + '}', CGI.escape(region.to_s))
68
+
69
+ # query parameters
70
+ query_params = opts[:query_params] || {}
71
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
72
+ query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
73
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
74
+ query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
75
+ query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
76
+ query_params[:'field'] = opts[:'field'] if !opts[:'field'].nil?
77
+
78
+ # header parameters
79
+ header_params = opts[:header_params] || {}
80
+ # HTTP header 'Accept' (if needed)
81
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
82
+
83
+ # form parameters
84
+ form_params = opts[:form_params] || {}
85
+
86
+ # http body (model)
87
+ post_body = opts[:debug_body]
88
+
89
+ # return_type
90
+ return_type = opts[:debug_return_type] || 'AggregateListValue'
91
+
92
+ # auth_names
93
+ auth_names = opts[:debug_auth_names] || ['oauth2']
94
+
95
+ new_options = opts.merge(
96
+ :operation => :"ConversationsApi.aggregate_data",
97
+ :header_params => header_params,
98
+ :query_params => query_params,
99
+ :form_params => form_params,
100
+ :body => post_body,
101
+ :auth_names => auth_names,
102
+ :return_type => return_type
103
+ )
104
+
105
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "API called: ConversationsApi#aggregate_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
108
+ end
109
+ return data, status_code, headers
110
+ end
111
+
112
+ # Get Conversations clone conversation
113
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>Int32Value</b><br/><br/>
114
+ # @param key [Integer]
115
+ # @param region [String] The data center region the data resides in
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [Int32Value]
118
+ def clone_conversation(key, region, opts = {})
119
+ data, _status_code, _headers = clone_conversation_with_http_info(key, region, opts)
120
+ data
121
+ end
122
+
123
+ # Get Conversations clone conversation
124
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;Int32Value&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
125
+ # @param key [Integer]
126
+ # @param region [String] The data center region the data resides in
127
+ # @param [Hash] opts the optional parameters
128
+ # @return [Array<(Int32Value, Integer, Hash)>] Int32Value data, response status code and response headers
129
+ def clone_conversation_with_http_info(key, region, opts = {})
130
+ if @api_client.config.debugging
131
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.clone_conversation ...'
132
+ end
133
+ # verify the required parameter 'key' is set
134
+ if @api_client.config.client_side_validation && key.nil?
135
+ fail ArgumentError, "Missing the required parameter 'key' when calling ConversationsApi.clone_conversation"
136
+ end
137
+ # verify the required parameter 'region' is set
138
+ if @api_client.config.client_side_validation && region.nil?
139
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.clone_conversation"
140
+ end
141
+ # verify enum value
142
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
143
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
144
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
145
+ end
146
+ # resource path
147
+ local_var_path = '/{region}/comms/2.0/Conversations/{key}/Clone'.sub('{' + 'key' + '}', CGI.escape(key.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
148
+
149
+ # query parameters
150
+ query_params = opts[:query_params] || {}
151
+
152
+ # header parameters
153
+ header_params = opts[:header_params] || {}
154
+ # HTTP header 'Accept' (if needed)
155
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
156
+
157
+ # form parameters
158
+ form_params = opts[:form_params] || {}
159
+
160
+ # http body (model)
161
+ post_body = opts[:debug_body]
162
+
163
+ # return_type
164
+ return_type = opts[:debug_return_type] || 'Int32Value'
165
+
166
+ # auth_names
167
+ auth_names = opts[:debug_auth_names] || ['oauth2']
168
+
169
+ new_options = opts.merge(
170
+ :operation => :"ConversationsApi.clone_conversation",
171
+ :header_params => header_params,
172
+ :query_params => query_params,
173
+ :form_params => form_params,
174
+ :body => post_body,
175
+ :auth_names => auth_names,
176
+ :return_type => return_type
177
+ )
178
+
179
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug "API called: ConversationsApi#clone_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
182
+ end
183
+ return data, status_code, headers
184
+ end
185
+
186
+ # Delete Conversations conversation
187
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
188
+ # @param key [Integer]
189
+ # @param region [String] The data center region the data resides in
190
+ # @param [Hash] opts the optional parameters
191
+ # @return [nil]
192
+ def delete_conversation(key, region, opts = {})
193
+ delete_conversation_with_http_info(key, region, opts)
194
+ nil
195
+ end
196
+
197
+ # Delete Conversations conversation
198
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
199
+ # @param key [Integer]
200
+ # @param region [String] The data center region the data resides in
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
203
+ def delete_conversation_with_http_info(key, region, opts = {})
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.delete_conversation ...'
206
+ end
207
+ # verify the required parameter 'key' is set
208
+ if @api_client.config.client_side_validation && key.nil?
209
+ fail ArgumentError, "Missing the required parameter 'key' when calling ConversationsApi.delete_conversation"
210
+ end
211
+ # verify the required parameter 'region' is set
212
+ if @api_client.config.client_side_validation && region.nil?
213
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.delete_conversation"
214
+ end
215
+ # verify enum value
216
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
217
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
218
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
219
+ end
220
+ # resource path
221
+ local_var_path = '/{region}/comms/2.0/Conversations/{key}'.sub('{' + 'key' + '}', CGI.escape(key.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
222
+
223
+ # query parameters
224
+ query_params = opts[:query_params] || {}
225
+
226
+ # header parameters
227
+ header_params = opts[:header_params] || {}
228
+ # HTTP header 'Accept' (if needed)
229
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
230
+
231
+ # form parameters
232
+ form_params = opts[:form_params] || {}
233
+
234
+ # http body (model)
235
+ post_body = opts[:debug_body]
236
+
237
+ # return_type
238
+ return_type = opts[:debug_return_type]
239
+
240
+ # auth_names
241
+ auth_names = opts[:debug_auth_names] || ['oauth2']
242
+
243
+ new_options = opts.merge(
244
+ :operation => :"ConversationsApi.delete_conversation",
245
+ :header_params => header_params,
246
+ :query_params => query_params,
247
+ :form_params => form_params,
248
+ :body => post_body,
249
+ :auth_names => auth_names,
250
+ :return_type => return_type
251
+ )
252
+
253
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug "API called: ConversationsApi#delete_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
256
+ end
257
+ return data, status_code, headers
258
+ end
259
+
260
+ # Delete Conversations file
261
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
262
+ # @param conversation_id [Integer]
263
+ # @param id [Integer]
264
+ # @param file_id [Integer]
265
+ # @param region [String] The data center region the data resides in
266
+ # @param [Hash] opts the optional parameters
267
+ # @return [nil]
268
+ def delete_file(conversation_id, id, file_id, region, opts = {})
269
+ delete_file_with_http_info(conversation_id, id, file_id, region, opts)
270
+ nil
271
+ end
272
+
273
+ # Delete Conversations file
274
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
275
+ # @param conversation_id [Integer]
276
+ # @param id [Integer]
277
+ # @param file_id [Integer]
278
+ # @param region [String] The data center region the data resides in
279
+ # @param [Hash] opts the optional parameters
280
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
281
+ def delete_file_with_http_info(conversation_id, id, file_id, region, opts = {})
282
+ if @api_client.config.debugging
283
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.delete_file ...'
284
+ end
285
+ # verify the required parameter 'conversation_id' is set
286
+ if @api_client.config.client_side_validation && conversation_id.nil?
287
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.delete_file"
288
+ end
289
+ # verify the required parameter 'id' is set
290
+ if @api_client.config.client_side_validation && id.nil?
291
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.delete_file"
292
+ end
293
+ # verify the required parameter 'file_id' is set
294
+ if @api_client.config.client_side_validation && file_id.nil?
295
+ fail ArgumentError, "Missing the required parameter 'file_id' when calling ConversationsApi.delete_file"
296
+ end
297
+ # verify the required parameter 'region' is set
298
+ if @api_client.config.client_side_validation && region.nil?
299
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.delete_file"
300
+ end
301
+ # verify enum value
302
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
303
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
304
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
305
+ end
306
+ # resource path
307
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Files({fileId})'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
308
+
309
+ # query parameters
310
+ query_params = opts[:query_params] || {}
311
+
312
+ # header parameters
313
+ header_params = opts[:header_params] || {}
314
+ # HTTP header 'Accept' (if needed)
315
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
316
+
317
+ # form parameters
318
+ form_params = opts[:form_params] || {}
319
+
320
+ # http body (model)
321
+ post_body = opts[:debug_body]
322
+
323
+ # return_type
324
+ return_type = opts[:debug_return_type]
325
+
326
+ # auth_names
327
+ auth_names = opts[:debug_auth_names] || ['oauth2']
328
+
329
+ new_options = opts.merge(
330
+ :operation => :"ConversationsApi.delete_file",
331
+ :header_params => header_params,
332
+ :query_params => query_params,
333
+ :form_params => form_params,
334
+ :body => post_body,
335
+ :auth_names => auth_names,
336
+ :return_type => return_type
337
+ )
338
+
339
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
340
+ if @api_client.config.debugging
341
+ @api_client.config.logger.debug "API called: ConversationsApi#delete_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
342
+ end
343
+ return data, status_code, headers
344
+ end
345
+
346
+ # Delete Conversations message
347
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
348
+ # @param conversation_id [Integer]
349
+ # @param id [Integer]
350
+ # @param region [String] The data center region the data resides in
351
+ # @param [Hash] opts the optional parameters
352
+ # @return [nil]
353
+ def delete_message(conversation_id, id, region, opts = {})
354
+ delete_message_with_http_info(conversation_id, id, region, opts)
355
+ nil
356
+ end
357
+
358
+ # Delete Conversations message
359
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
360
+ # @param conversation_id [Integer]
361
+ # @param id [Integer]
362
+ # @param region [String] The data center region the data resides in
363
+ # @param [Hash] opts the optional parameters
364
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
365
+ def delete_message_with_http_info(conversation_id, id, region, opts = {})
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.delete_message ...'
368
+ end
369
+ # verify the required parameter 'conversation_id' is set
370
+ if @api_client.config.client_side_validation && conversation_id.nil?
371
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.delete_message"
372
+ end
373
+ # verify the required parameter 'id' is set
374
+ if @api_client.config.client_side_validation && id.nil?
375
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.delete_message"
376
+ end
377
+ # verify the required parameter 'region' is set
378
+ if @api_client.config.client_side_validation && region.nil?
379
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.delete_message"
380
+ end
381
+ # verify enum value
382
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
383
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
384
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
385
+ end
386
+ # resource path
387
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
388
+
389
+ # query parameters
390
+ query_params = opts[:query_params] || {}
391
+
392
+ # header parameters
393
+ header_params = opts[:header_params] || {}
394
+ # HTTP header 'Accept' (if needed)
395
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
396
+
397
+ # form parameters
398
+ form_params = opts[:form_params] || {}
399
+
400
+ # http body (model)
401
+ post_body = opts[:debug_body]
402
+
403
+ # return_type
404
+ return_type = opts[:debug_return_type]
405
+
406
+ # auth_names
407
+ auth_names = opts[:debug_auth_names] || ['oauth2']
408
+
409
+ new_options = opts.merge(
410
+ :operation => :"ConversationsApi.delete_message",
411
+ :header_params => header_params,
412
+ :query_params => query_params,
413
+ :form_params => form_params,
414
+ :body => post_body,
415
+ :auth_names => auth_names,
416
+ :return_type => return_type
417
+ )
418
+
419
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
420
+ if @api_client.config.debugging
421
+ @api_client.config.logger.debug "API called: ConversationsApi#delete_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
422
+ end
423
+ return data, status_code, headers
424
+ end
425
+
426
+ # Delete Conversations message part
427
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
428
+ # @param conversation_id [Integer]
429
+ # @param id [Integer]
430
+ # @param region [String] The data center region the data resides in
431
+ # @param [Hash] opts the optional parameters
432
+ # @option opts [Integer] :index
433
+ # @option opts [String] :ref
434
+ # @return [nil]
435
+ def delete_message_part(conversation_id, id, region, opts = {})
436
+ delete_message_part_with_http_info(conversation_id, id, region, opts)
437
+ nil
438
+ end
439
+
440
+ # Delete Conversations message part
441
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
442
+ # @param conversation_id [Integer]
443
+ # @param id [Integer]
444
+ # @param region [String] The data center region the data resides in
445
+ # @param [Hash] opts the optional parameters
446
+ # @option opts [Integer] :index
447
+ # @option opts [String] :ref
448
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
449
+ def delete_message_part_with_http_info(conversation_id, id, region, opts = {})
450
+ if @api_client.config.debugging
451
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.delete_message_part ...'
452
+ end
453
+ # verify the required parameter 'conversation_id' is set
454
+ if @api_client.config.client_side_validation && conversation_id.nil?
455
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.delete_message_part"
456
+ end
457
+ # verify the required parameter 'id' is set
458
+ if @api_client.config.client_side_validation && id.nil?
459
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.delete_message_part"
460
+ end
461
+ # verify the required parameter 'region' is set
462
+ if @api_client.config.client_side_validation && region.nil?
463
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.delete_message_part"
464
+ end
465
+ # verify enum value
466
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
467
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
468
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
469
+ end
470
+ # resource path
471
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Delete'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
472
+
473
+ # query parameters
474
+ query_params = opts[:query_params] || {}
475
+ query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
476
+ query_params[:'ref'] = opts[:'ref'] if !opts[:'ref'].nil?
477
+
478
+ # header parameters
479
+ header_params = opts[:header_params] || {}
480
+ # HTTP header 'Accept' (if needed)
481
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
482
+
483
+ # form parameters
484
+ form_params = opts[:form_params] || {}
485
+
486
+ # http body (model)
487
+ post_body = opts[:debug_body]
488
+
489
+ # return_type
490
+ return_type = opts[:debug_return_type]
491
+
492
+ # auth_names
493
+ auth_names = opts[:debug_auth_names] || ['oauth2']
494
+
495
+ new_options = opts.merge(
496
+ :operation => :"ConversationsApi.delete_message_part",
497
+ :header_params => header_params,
498
+ :query_params => query_params,
499
+ :form_params => form_params,
500
+ :body => post_body,
501
+ :auth_names => auth_names,
502
+ :return_type => return_type
503
+ )
504
+
505
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
506
+ if @api_client.config.debugging
507
+ @api_client.config.logger.debug "API called: ConversationsApi#delete_message_part\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
508
+ end
509
+ return data, status_code, headers
510
+ end
511
+
512
+ # Delete Conversations participant
513
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
514
+ # @param conversation_id [Integer]
515
+ # @param id [Integer]
516
+ # @param region [String] The data center region the data resides in
517
+ # @param [Hash] opts the optional parameters
518
+ # @return [nil]
519
+ def delete_participant(conversation_id, id, region, opts = {})
520
+ delete_participant_with_http_info(conversation_id, id, region, opts)
521
+ nil
522
+ end
523
+
524
+ # Delete Conversations participant
525
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
526
+ # @param conversation_id [Integer]
527
+ # @param id [Integer]
528
+ # @param region [String] The data center region the data resides in
529
+ # @param [Hash] opts the optional parameters
530
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
531
+ def delete_participant_with_http_info(conversation_id, id, region, opts = {})
532
+ if @api_client.config.debugging
533
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.delete_participant ...'
534
+ end
535
+ # verify the required parameter 'conversation_id' is set
536
+ if @api_client.config.client_side_validation && conversation_id.nil?
537
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.delete_participant"
538
+ end
539
+ # verify the required parameter 'id' is set
540
+ if @api_client.config.client_side_validation && id.nil?
541
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.delete_participant"
542
+ end
543
+ # verify the required parameter 'region' is set
544
+ if @api_client.config.client_side_validation && region.nil?
545
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.delete_participant"
546
+ end
547
+ # verify enum value
548
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
549
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
550
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
551
+ end
552
+ # resource path
553
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Participants({id})'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
554
+
555
+ # query parameters
556
+ query_params = opts[:query_params] || {}
557
+
558
+ # header parameters
559
+ header_params = opts[:header_params] || {}
560
+ # HTTP header 'Accept' (if needed)
561
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
562
+
563
+ # form parameters
564
+ form_params = opts[:form_params] || {}
565
+
566
+ # http body (model)
567
+ post_body = opts[:debug_body]
568
+
569
+ # return_type
570
+ return_type = opts[:debug_return_type]
571
+
572
+ # auth_names
573
+ auth_names = opts[:debug_auth_names] || ['oauth2']
574
+
575
+ new_options = opts.merge(
576
+ :operation => :"ConversationsApi.delete_participant",
577
+ :header_params => header_params,
578
+ :query_params => query_params,
579
+ :form_params => form_params,
580
+ :body => post_body,
581
+ :auth_names => auth_names,
582
+ :return_type => return_type
583
+ )
584
+
585
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
586
+ if @api_client.config.debugging
587
+ @api_client.config.logger.debug "API called: ConversationsApi#delete_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
588
+ end
589
+ return data, status_code, headers
590
+ end
591
+
592
+ # Get Conversations
593
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>ConversationList</b><br/><br/>
594
+ # @param region [String] The data center region the data resides in
595
+ # @param [Hash] opts the optional parameters
596
+ # @option opts [String] :expand
597
+ # @option opts [String] :filter
598
+ # @option opts [String] :select
599
+ # @option opts [String] :orderby
600
+ # @option opts [Integer] :top
601
+ # @option opts [Integer] :skip
602
+ # @option opts [Boolean] :count
603
+ # @return [ConversationList]
604
+ def get_conversations(region, opts = {})
605
+ data, _status_code, _headers = get_conversations_with_http_info(region, opts)
606
+ data
607
+ end
608
+
609
+ # Get Conversations
610
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;ConversationList&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
611
+ # @param region [String] The data center region the data resides in
612
+ # @param [Hash] opts the optional parameters
613
+ # @option opts [String] :expand
614
+ # @option opts [String] :filter
615
+ # @option opts [String] :select
616
+ # @option opts [String] :orderby
617
+ # @option opts [Integer] :top
618
+ # @option opts [Integer] :skip
619
+ # @option opts [Boolean] :count
620
+ # @return [Array<(ConversationList, Integer, Hash)>] ConversationList data, response status code and response headers
621
+ def get_conversations_with_http_info(region, opts = {})
622
+ if @api_client.config.debugging
623
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.get_conversations ...'
624
+ end
625
+ # verify the required parameter 'region' is set
626
+ if @api_client.config.client_side_validation && region.nil?
627
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.get_conversations"
628
+ end
629
+ # verify enum value
630
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
631
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
632
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
633
+ end
634
+ # resource path
635
+ local_var_path = '/{region}/comms/2.0/Conversations'.sub('{' + 'region' + '}', CGI.escape(region.to_s))
636
+
637
+ # query parameters
638
+ query_params = opts[:query_params] || {}
639
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
640
+ query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
641
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
642
+ query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
643
+ query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
644
+ query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
645
+ query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
646
+
647
+ # header parameters
648
+ header_params = opts[:header_params] || {}
649
+ # HTTP header 'Accept' (if needed)
650
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
651
+
652
+ # form parameters
653
+ form_params = opts[:form_params] || {}
654
+
655
+ # http body (model)
656
+ post_body = opts[:debug_body]
657
+
658
+ # return_type
659
+ return_type = opts[:debug_return_type] || 'ConversationList'
660
+
661
+ # auth_names
662
+ auth_names = opts[:debug_auth_names] || ['oauth2']
663
+
664
+ new_options = opts.merge(
665
+ :operation => :"ConversationsApi.get_conversations",
666
+ :header_params => header_params,
667
+ :query_params => query_params,
668
+ :form_params => form_params,
669
+ :body => post_body,
670
+ :auth_names => auth_names,
671
+ :return_type => return_type
672
+ )
673
+
674
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
675
+ if @api_client.config.debugging
676
+ @api_client.config.logger.debug "API called: ConversationsApi#get_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
677
+ end
678
+ return data, status_code, headers
679
+ end
680
+
681
+ # Get Conversations by id
682
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>Conversation</b><br/><br/>
683
+ # @param key [Integer]
684
+ # @param region [String] The data center region the data resides in
685
+ # @param [Hash] opts the optional parameters
686
+ # @option opts [String] :expand
687
+ # @option opts [String] :select
688
+ # @return [Conversation]
689
+ def get_conversations_by_id(key, region, opts = {})
690
+ data, _status_code, _headers = get_conversations_by_id_with_http_info(key, region, opts)
691
+ data
692
+ end
693
+
694
+ # Get Conversations by id
695
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;Conversation&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
696
+ # @param key [Integer]
697
+ # @param region [String] The data center region the data resides in
698
+ # @param [Hash] opts the optional parameters
699
+ # @option opts [String] :expand
700
+ # @option opts [String] :select
701
+ # @return [Array<(Conversation, Integer, Hash)>] Conversation data, response status code and response headers
702
+ def get_conversations_by_id_with_http_info(key, region, opts = {})
703
+ if @api_client.config.debugging
704
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.get_conversations_by_id ...'
705
+ end
706
+ # verify the required parameter 'key' is set
707
+ if @api_client.config.client_side_validation && key.nil?
708
+ fail ArgumentError, "Missing the required parameter 'key' when calling ConversationsApi.get_conversations_by_id"
709
+ end
710
+ # verify the required parameter 'region' is set
711
+ if @api_client.config.client_side_validation && region.nil?
712
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.get_conversations_by_id"
713
+ end
714
+ # verify enum value
715
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
716
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
717
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
718
+ end
719
+ # resource path
720
+ local_var_path = '/{region}/comms/2.0/Conversations/{key}'.sub('{' + 'key' + '}', CGI.escape(key.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
721
+
722
+ # query parameters
723
+ query_params = opts[:query_params] || {}
724
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
725
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
726
+
727
+ # header parameters
728
+ header_params = opts[:header_params] || {}
729
+ # HTTP header 'Accept' (if needed)
730
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
731
+
732
+ # form parameters
733
+ form_params = opts[:form_params] || {}
734
+
735
+ # http body (model)
736
+ post_body = opts[:debug_body]
737
+
738
+ # return_type
739
+ return_type = opts[:debug_return_type] || 'Conversation'
740
+
741
+ # auth_names
742
+ auth_names = opts[:debug_auth_names] || ['oauth2']
743
+
744
+ new_options = opts.merge(
745
+ :operation => :"ConversationsApi.get_conversations_by_id",
746
+ :header_params => header_params,
747
+ :query_params => query_params,
748
+ :form_params => form_params,
749
+ :body => post_body,
750
+ :auth_names => auth_names,
751
+ :return_type => return_type
752
+ )
753
+
754
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
755
+ if @api_client.config.debugging
756
+ @api_client.config.logger.debug "API called: ConversationsApi#get_conversations_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
757
+ end
758
+ return data, status_code, headers
759
+ end
760
+
761
+ # Get Conversations demo conversation
762
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>ConversationTenant</b><br/><br/>
763
+ # @param region [String] The data center region the data resides in
764
+ # @param [Hash] opts the optional parameters
765
+ # @option opts [Integer] :original
766
+ # @option opts [Boolean] :as_owner
767
+ # @return [ConversationTenant]
768
+ def get_demo_conversation(region, opts = {})
769
+ data, _status_code, _headers = get_demo_conversation_with_http_info(region, opts)
770
+ data
771
+ end
772
+
773
+ # Get Conversations demo conversation
774
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;ConversationTenant&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
775
+ # @param region [String] The data center region the data resides in
776
+ # @param [Hash] opts the optional parameters
777
+ # @option opts [Integer] :original
778
+ # @option opts [Boolean] :as_owner
779
+ # @return [Array<(ConversationTenant, Integer, Hash)>] ConversationTenant data, response status code and response headers
780
+ def get_demo_conversation_with_http_info(region, opts = {})
781
+ if @api_client.config.debugging
782
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.get_demo_conversation ...'
783
+ end
784
+ # verify the required parameter 'region' is set
785
+ if @api_client.config.client_side_validation && region.nil?
786
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.get_demo_conversation"
787
+ end
788
+ # verify enum value
789
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
790
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
791
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
792
+ end
793
+ # resource path
794
+ local_var_path = '/{region}/comms/2.0/Conversations/Demo'.sub('{' + 'region' + '}', CGI.escape(region.to_s))
795
+
796
+ # query parameters
797
+ query_params = opts[:query_params] || {}
798
+ query_params[:'original'] = opts[:'original'] if !opts[:'original'].nil?
799
+ query_params[:'asOwner'] = opts[:'as_owner'] if !opts[:'as_owner'].nil?
800
+
801
+ # header parameters
802
+ header_params = opts[:header_params] || {}
803
+ # HTTP header 'Accept' (if needed)
804
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
805
+
806
+ # form parameters
807
+ form_params = opts[:form_params] || {}
808
+
809
+ # http body (model)
810
+ post_body = opts[:debug_body]
811
+
812
+ # return_type
813
+ return_type = opts[:debug_return_type] || 'ConversationTenant'
814
+
815
+ # auth_names
816
+ auth_names = opts[:debug_auth_names] || ['oauth2']
817
+
818
+ new_options = opts.merge(
819
+ :operation => :"ConversationsApi.get_demo_conversation",
820
+ :header_params => header_params,
821
+ :query_params => query_params,
822
+ :form_params => form_params,
823
+ :body => post_body,
824
+ :auth_names => auth_names,
825
+ :return_type => return_type
826
+ )
827
+
828
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
829
+ if @api_client.config.debugging
830
+ @api_client.config.logger.debug "API called: ConversationsApi#get_demo_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
831
+ end
832
+ return data, status_code, headers
833
+ end
834
+
835
+ # Get Conversations file
836
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>string</b><br/><br/>
837
+ # @param conversation_id [Integer]
838
+ # @param id [Integer]
839
+ # @param file_id [Integer]
840
+ # @param region [String] The data center region the data resides in
841
+ # @param [Hash] opts the optional parameters
842
+ # @option opts [String] :size (default to '0')
843
+ # @return [File]
844
+ def get_file(conversation_id, id, file_id, region, opts = {})
845
+ data, _status_code, _headers = get_file_with_http_info(conversation_id, id, file_id, region, opts)
846
+ data
847
+ end
848
+
849
+ # Get Conversations file
850
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;string&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
851
+ # @param conversation_id [Integer]
852
+ # @param id [Integer]
853
+ # @param file_id [Integer]
854
+ # @param region [String] The data center region the data resides in
855
+ # @param [Hash] opts the optional parameters
856
+ # @option opts [String] :size
857
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
858
+ def get_file_with_http_info(conversation_id, id, file_id, region, opts = {})
859
+ if @api_client.config.debugging
860
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.get_file ...'
861
+ end
862
+ # verify the required parameter 'conversation_id' is set
863
+ if @api_client.config.client_side_validation && conversation_id.nil?
864
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.get_file"
865
+ end
866
+ # verify the required parameter 'id' is set
867
+ if @api_client.config.client_side_validation && id.nil?
868
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.get_file"
869
+ end
870
+ # verify the required parameter 'file_id' is set
871
+ if @api_client.config.client_side_validation && file_id.nil?
872
+ fail ArgumentError, "Missing the required parameter 'file_id' when calling ConversationsApi.get_file"
873
+ end
874
+ # verify the required parameter 'region' is set
875
+ if @api_client.config.client_side_validation && region.nil?
876
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.get_file"
877
+ end
878
+ # verify enum value
879
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
880
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
881
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
882
+ end
883
+ allowable_values = ["Full", "Medium", "Small"]
884
+ if @api_client.config.client_side_validation && opts[:'size'] && !allowable_values.include?(opts[:'size'])
885
+ fail ArgumentError, "invalid value for \"size\", must be one of #{allowable_values}"
886
+ end
887
+ # resource path
888
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Files({fileId})'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
889
+
890
+ # query parameters
891
+ query_params = opts[:query_params] || {}
892
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
893
+
894
+ # header parameters
895
+ header_params = opts[:header_params] || {}
896
+ # HTTP header 'Accept' (if needed)
897
+ header_params['Accept'] = @api_client.select_header_accept(['image/png', 'image/jpg'])
898
+
899
+ # form parameters
900
+ form_params = opts[:form_params] || {}
901
+
902
+ # http body (model)
903
+ post_body = opts[:debug_body]
904
+
905
+ # return_type
906
+ return_type = opts[:debug_return_type] || 'File'
907
+
908
+ # auth_names
909
+ auth_names = opts[:debug_auth_names] || ['oauth2']
910
+
911
+ new_options = opts.merge(
912
+ :operation => :"ConversationsApi.get_file",
913
+ :header_params => header_params,
914
+ :query_params => query_params,
915
+ :form_params => form_params,
916
+ :body => post_body,
917
+ :auth_names => auth_names,
918
+ :return_type => return_type
919
+ )
920
+
921
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
922
+ if @api_client.config.debugging
923
+ @api_client.config.logger.debug "API called: ConversationsApi#get_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
924
+ end
925
+ return data, status_code, headers
926
+ end
927
+
928
+ # Get Conversations files
929
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>Blob</b><br/><br/>
930
+ # @param conversation_id [Integer]
931
+ # @param id [Integer]
932
+ # @param region [String] The data center region the data resides in
933
+ # @param [Hash] opts the optional parameters
934
+ # @option opts [String] :expand
935
+ # @option opts [String] :filter
936
+ # @option opts [String] :select
937
+ # @option opts [String] :orderby
938
+ # @option opts [Integer] :top
939
+ # @option opts [Integer] :skip
940
+ # @option opts [Boolean] :count
941
+ # @return [Array<Blob>]
942
+ def get_files(conversation_id, id, region, opts = {})
943
+ data, _status_code, _headers = get_files_with_http_info(conversation_id, id, region, opts)
944
+ data
945
+ end
946
+
947
+ # Get Conversations files
948
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;Blob&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
949
+ # @param conversation_id [Integer]
950
+ # @param id [Integer]
951
+ # @param region [String] The data center region the data resides in
952
+ # @param [Hash] opts the optional parameters
953
+ # @option opts [String] :expand
954
+ # @option opts [String] :filter
955
+ # @option opts [String] :select
956
+ # @option opts [String] :orderby
957
+ # @option opts [Integer] :top
958
+ # @option opts [Integer] :skip
959
+ # @option opts [Boolean] :count
960
+ # @return [Array<(Array<Blob>, Integer, Hash)>] Array<Blob> data, response status code and response headers
961
+ def get_files_with_http_info(conversation_id, id, region, opts = {})
962
+ if @api_client.config.debugging
963
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.get_files ...'
964
+ end
965
+ # verify the required parameter 'conversation_id' is set
966
+ if @api_client.config.client_side_validation && conversation_id.nil?
967
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.get_files"
968
+ end
969
+ # verify the required parameter 'id' is set
970
+ if @api_client.config.client_side_validation && id.nil?
971
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.get_files"
972
+ end
973
+ # verify the required parameter 'region' is set
974
+ if @api_client.config.client_side_validation && region.nil?
975
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.get_files"
976
+ end
977
+ # verify enum value
978
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
979
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
980
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
981
+ end
982
+ # resource path
983
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Files'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
984
+
985
+ # query parameters
986
+ query_params = opts[:query_params] || {}
987
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
988
+ query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
989
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
990
+ query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
991
+ query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
992
+ query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
993
+ query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
994
+
995
+ # header parameters
996
+ header_params = opts[:header_params] || {}
997
+ # HTTP header 'Accept' (if needed)
998
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
999
+
1000
+ # form parameters
1001
+ form_params = opts[:form_params] || {}
1002
+
1003
+ # http body (model)
1004
+ post_body = opts[:debug_body]
1005
+
1006
+ # return_type
1007
+ return_type = opts[:debug_return_type] || 'Array<Blob>'
1008
+
1009
+ # auth_names
1010
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1011
+
1012
+ new_options = opts.merge(
1013
+ :operation => :"ConversationsApi.get_files",
1014
+ :header_params => header_params,
1015
+ :query_params => query_params,
1016
+ :form_params => form_params,
1017
+ :body => post_body,
1018
+ :auth_names => auth_names,
1019
+ :return_type => return_type
1020
+ )
1021
+
1022
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1023
+ if @api_client.config.debugging
1024
+ @api_client.config.logger.debug "API called: ConversationsApi#get_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1025
+ end
1026
+ return data, status_code, headers
1027
+ end
1028
+
1029
+ # Get Conversations message by id
1030
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>Message</b><br/><br/>
1031
+ # @param conversation_id [Integer]
1032
+ # @param id [Integer]
1033
+ # @param region [String] The data center region the data resides in
1034
+ # @param [Hash] opts the optional parameters
1035
+ # @option opts [String] :expand
1036
+ # @option opts [String] :select
1037
+ # @return [Message]
1038
+ def get_message_by_id(conversation_id, id, region, opts = {})
1039
+ data, _status_code, _headers = get_message_by_id_with_http_info(conversation_id, id, region, opts)
1040
+ data
1041
+ end
1042
+
1043
+ # Get Conversations message by id
1044
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;Message&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1045
+ # @param conversation_id [Integer]
1046
+ # @param id [Integer]
1047
+ # @param region [String] The data center region the data resides in
1048
+ # @param [Hash] opts the optional parameters
1049
+ # @option opts [String] :expand
1050
+ # @option opts [String] :select
1051
+ # @return [Array<(Message, Integer, Hash)>] Message data, response status code and response headers
1052
+ def get_message_by_id_with_http_info(conversation_id, id, region, opts = {})
1053
+ if @api_client.config.debugging
1054
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.get_message_by_id ...'
1055
+ end
1056
+ # verify the required parameter 'conversation_id' is set
1057
+ if @api_client.config.client_side_validation && conversation_id.nil?
1058
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.get_message_by_id"
1059
+ end
1060
+ # verify the required parameter 'id' is set
1061
+ if @api_client.config.client_side_validation && id.nil?
1062
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.get_message_by_id"
1063
+ end
1064
+ # verify the required parameter 'region' is set
1065
+ if @api_client.config.client_side_validation && region.nil?
1066
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.get_message_by_id"
1067
+ end
1068
+ # verify enum value
1069
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1070
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1071
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1072
+ end
1073
+ # resource path
1074
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
1075
+
1076
+ # query parameters
1077
+ query_params = opts[:query_params] || {}
1078
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
1079
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
1080
+
1081
+ # header parameters
1082
+ header_params = opts[:header_params] || {}
1083
+ # HTTP header 'Accept' (if needed)
1084
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1085
+
1086
+ # form parameters
1087
+ form_params = opts[:form_params] || {}
1088
+
1089
+ # http body (model)
1090
+ post_body = opts[:debug_body]
1091
+
1092
+ # return_type
1093
+ return_type = opts[:debug_return_type] || 'Message'
1094
+
1095
+ # auth_names
1096
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1097
+
1098
+ new_options = opts.merge(
1099
+ :operation => :"ConversationsApi.get_message_by_id",
1100
+ :header_params => header_params,
1101
+ :query_params => query_params,
1102
+ :form_params => form_params,
1103
+ :body => post_body,
1104
+ :auth_names => auth_names,
1105
+ :return_type => return_type
1106
+ )
1107
+
1108
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1109
+ if @api_client.config.debugging
1110
+ @api_client.config.logger.debug "API called: ConversationsApi#get_message_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1111
+ end
1112
+ return data, status_code, headers
1113
+ end
1114
+
1115
+ # Get Conversations messages
1116
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>MessageList</b><br/><br/>
1117
+ # @param conversation_id [Integer]
1118
+ # @param region [String] The data center region the data resides in
1119
+ # @param [Hash] opts the optional parameters
1120
+ # @option opts [String] :expand
1121
+ # @option opts [String] :filter
1122
+ # @option opts [String] :select
1123
+ # @option opts [String] :orderby
1124
+ # @option opts [Integer] :top
1125
+ # @option opts [Integer] :skip
1126
+ # @option opts [Boolean] :count
1127
+ # @return [MessageList]
1128
+ def get_messages(conversation_id, region, opts = {})
1129
+ data, _status_code, _headers = get_messages_with_http_info(conversation_id, region, opts)
1130
+ data
1131
+ end
1132
+
1133
+ # Get Conversations messages
1134
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;MessageList&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1135
+ # @param conversation_id [Integer]
1136
+ # @param region [String] The data center region the data resides in
1137
+ # @param [Hash] opts the optional parameters
1138
+ # @option opts [String] :expand
1139
+ # @option opts [String] :filter
1140
+ # @option opts [String] :select
1141
+ # @option opts [String] :orderby
1142
+ # @option opts [Integer] :top
1143
+ # @option opts [Integer] :skip
1144
+ # @option opts [Boolean] :count
1145
+ # @return [Array<(MessageList, Integer, Hash)>] MessageList data, response status code and response headers
1146
+ def get_messages_with_http_info(conversation_id, region, opts = {})
1147
+ if @api_client.config.debugging
1148
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.get_messages ...'
1149
+ end
1150
+ # verify the required parameter 'conversation_id' is set
1151
+ if @api_client.config.client_side_validation && conversation_id.nil?
1152
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.get_messages"
1153
+ end
1154
+ # verify the required parameter 'region' is set
1155
+ if @api_client.config.client_side_validation && region.nil?
1156
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.get_messages"
1157
+ end
1158
+ # verify enum value
1159
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1160
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1161
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1162
+ end
1163
+ # resource path
1164
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
1165
+
1166
+ # query parameters
1167
+ query_params = opts[:query_params] || {}
1168
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
1169
+ query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1170
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
1171
+ query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
1172
+ query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
1173
+ query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
1174
+ query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
1175
+
1176
+ # header parameters
1177
+ header_params = opts[:header_params] || {}
1178
+ # HTTP header 'Accept' (if needed)
1179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1180
+
1181
+ # form parameters
1182
+ form_params = opts[:form_params] || {}
1183
+
1184
+ # http body (model)
1185
+ post_body = opts[:debug_body]
1186
+
1187
+ # return_type
1188
+ return_type = opts[:debug_return_type] || 'MessageList'
1189
+
1190
+ # auth_names
1191
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1192
+
1193
+ new_options = opts.merge(
1194
+ :operation => :"ConversationsApi.get_messages",
1195
+ :header_params => header_params,
1196
+ :query_params => query_params,
1197
+ :form_params => form_params,
1198
+ :body => post_body,
1199
+ :auth_names => auth_names,
1200
+ :return_type => return_type
1201
+ )
1202
+
1203
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1204
+ if @api_client.config.debugging
1205
+ @api_client.config.logger.debug "API called: ConversationsApi#get_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1206
+ end
1207
+ return data, status_code, headers
1208
+ end
1209
+
1210
+ # Get Conversations participiants
1211
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>ParticipantWithRoleList</b><br/><br/>
1212
+ # @param conversation_id [Integer]
1213
+ # @param region [String] The data center region the data resides in
1214
+ # @param [Hash] opts the optional parameters
1215
+ # @option opts [String] :expand
1216
+ # @option opts [String] :filter
1217
+ # @option opts [String] :select
1218
+ # @option opts [String] :orderby
1219
+ # @option opts [Integer] :top
1220
+ # @option opts [Integer] :skip
1221
+ # @option opts [Boolean] :count
1222
+ # @return [ParticipantWithRoleList]
1223
+ def get_participiants(conversation_id, region, opts = {})
1224
+ data, _status_code, _headers = get_participiants_with_http_info(conversation_id, region, opts)
1225
+ data
1226
+ end
1227
+
1228
+ # Get Conversations participiants
1229
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;ParticipantWithRoleList&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1230
+ # @param conversation_id [Integer]
1231
+ # @param region [String] The data center region the data resides in
1232
+ # @param [Hash] opts the optional parameters
1233
+ # @option opts [String] :expand
1234
+ # @option opts [String] :filter
1235
+ # @option opts [String] :select
1236
+ # @option opts [String] :orderby
1237
+ # @option opts [Integer] :top
1238
+ # @option opts [Integer] :skip
1239
+ # @option opts [Boolean] :count
1240
+ # @return [Array<(ParticipantWithRoleList, Integer, Hash)>] ParticipantWithRoleList data, response status code and response headers
1241
+ def get_participiants_with_http_info(conversation_id, region, opts = {})
1242
+ if @api_client.config.debugging
1243
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.get_participiants ...'
1244
+ end
1245
+ # verify the required parameter 'conversation_id' is set
1246
+ if @api_client.config.client_side_validation && conversation_id.nil?
1247
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.get_participiants"
1248
+ end
1249
+ # verify the required parameter 'region' is set
1250
+ if @api_client.config.client_side_validation && region.nil?
1251
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.get_participiants"
1252
+ end
1253
+ # verify enum value
1254
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1255
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1256
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1257
+ end
1258
+ # resource path
1259
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Participants'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
1260
+
1261
+ # query parameters
1262
+ query_params = opts[:query_params] || {}
1263
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
1264
+ query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1265
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
1266
+ query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
1267
+ query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
1268
+ query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
1269
+ query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
1270
+
1271
+ # header parameters
1272
+ header_params = opts[:header_params] || {}
1273
+ # HTTP header 'Accept' (if needed)
1274
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1275
+
1276
+ # form parameters
1277
+ form_params = opts[:form_params] || {}
1278
+
1279
+ # http body (model)
1280
+ post_body = opts[:debug_body]
1281
+
1282
+ # return_type
1283
+ return_type = opts[:debug_return_type] || 'ParticipantWithRoleList'
1284
+
1285
+ # auth_names
1286
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1287
+
1288
+ new_options = opts.merge(
1289
+ :operation => :"ConversationsApi.get_participiants",
1290
+ :header_params => header_params,
1291
+ :query_params => query_params,
1292
+ :form_params => form_params,
1293
+ :body => post_body,
1294
+ :auth_names => auth_names,
1295
+ :return_type => return_type
1296
+ )
1297
+
1298
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1299
+ if @api_client.config.debugging
1300
+ @api_client.config.logger.debug "API called: ConversationsApi#get_participiants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1301
+ end
1302
+ return data, status_code, headers
1303
+ end
1304
+
1305
+ # Imports a BCF File's Topics and Markup as one or more Flex conversations
1306
+ # <span style='font-size: 17px;'>Summary:</span>Imports a BCF File's Topics and Markup as one or more Flex conversations.<br/>Return Type: <b>ConversationList</b><br/><br/>
1307
+ # @param region [String] The data center region the data resides in
1308
+ # @param file [File] An arbitrary file which will get associated to the message.
1309
+ # @param [Hash] opts the optional parameters
1310
+ # @option opts [String] :tenant_id Either the tenant identifier string or GUID
1311
+ # @option opts [Integer] :asset_id An optional AssetId to help identify the asset hosting the referenced model
1312
+ # @option opts [Integer] :model_id An optional ModelId identifying the model to link the BCF to
1313
+ # @option opts [String] :file_name The name of the file
1314
+ # @return [ConversationList]
1315
+ def import_bcf_file(region, file, opts = {})
1316
+ data, _status_code, _headers = import_bcf_file_with_http_info(region, file, opts)
1317
+ data
1318
+ end
1319
+
1320
+ # Imports a BCF File&#39;s Topics and Markup as one or more Flex conversations
1321
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Imports a BCF File&#39;s Topics and Markup as one or more Flex conversations.&lt;br/&gt;Return Type: &lt;b&gt;ConversationList&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1322
+ # @param region [String] The data center region the data resides in
1323
+ # @param file [File] An arbitrary file which will get associated to the message.
1324
+ # @param [Hash] opts the optional parameters
1325
+ # @option opts [String] :tenant_id Either the tenant identifier string or GUID
1326
+ # @option opts [Integer] :asset_id An optional AssetId to help identify the asset hosting the referenced model
1327
+ # @option opts [Integer] :model_id An optional ModelId identifying the model to link the BCF to
1328
+ # @option opts [String] :file_name The name of the file
1329
+ # @return [Array<(ConversationList, Integer, Hash)>] ConversationList data, response status code and response headers
1330
+ def import_bcf_file_with_http_info(region, file, opts = {})
1331
+ if @api_client.config.debugging
1332
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.import_bcf_file ...'
1333
+ end
1334
+ # verify the required parameter 'region' is set
1335
+ if @api_client.config.client_side_validation && region.nil?
1336
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.import_bcf_file"
1337
+ end
1338
+ # verify enum value
1339
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1340
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1341
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1342
+ end
1343
+ # verify the required parameter 'file' is set
1344
+ if @api_client.config.client_side_validation && file.nil?
1345
+ fail ArgumentError, "Missing the required parameter 'file' when calling ConversationsApi.import_bcf_file"
1346
+ end
1347
+ # resource path
1348
+ local_var_path = '/{region}/comms/2.0/Conversations/ImportBcf'.sub('{' + 'region' + '}', CGI.escape(region.to_s))
1349
+
1350
+ # query parameters
1351
+ query_params = opts[:query_params] || {}
1352
+ query_params[:'tenantId'] = opts[:'tenant_id'] if !opts[:'tenant_id'].nil?
1353
+ query_params[:'assetId'] = opts[:'asset_id'] if !opts[:'asset_id'].nil?
1354
+ query_params[:'modelId'] = opts[:'model_id'] if !opts[:'model_id'].nil?
1355
+
1356
+ # header parameters
1357
+ header_params = opts[:header_params] || {}
1358
+ # HTTP header 'Accept' (if needed)
1359
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1360
+ # HTTP header 'Content-Type'
1361
+ content_type = @api_client.select_header_content_type(['multipart/form-data'])
1362
+ if !content_type.nil?
1363
+ header_params['Content-Type'] = content_type
1364
+ end
1365
+
1366
+ # form parameters
1367
+ form_params = opts[:form_params] || {}
1368
+ form_params['file'] = file
1369
+ form_params['fileName'] = opts[:'file_name'] if !opts[:'file_name'].nil?
1370
+
1371
+ # http body (model)
1372
+ post_body = opts[:debug_body]
1373
+
1374
+ # return_type
1375
+ return_type = opts[:debug_return_type] || 'ConversationList'
1376
+
1377
+ # auth_names
1378
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1379
+
1380
+ new_options = opts.merge(
1381
+ :operation => :"ConversationsApi.import_bcf_file",
1382
+ :header_params => header_params,
1383
+ :query_params => query_params,
1384
+ :form_params => form_params,
1385
+ :body => post_body,
1386
+ :auth_names => auth_names,
1387
+ :return_type => return_type
1388
+ )
1389
+
1390
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1391
+ if @api_client.config.debugging
1392
+ @api_client.config.logger.debug "API called: ConversationsApi#import_bcf_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1393
+ end
1394
+ return data, status_code, headers
1395
+ end
1396
+
1397
+ # Post Conversations insert message part
1398
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
1399
+ # @param conversation_id [Integer]
1400
+ # @param id [Integer]
1401
+ # @param region [String] The data center region the data resides in
1402
+ # @param [Hash] opts the optional parameters
1403
+ # @option opts [Integer] :index
1404
+ # @option opts [MessagePart] :part
1405
+ # @return [nil]
1406
+ def insert_message_part(conversation_id, id, region, opts = {})
1407
+ insert_message_part_with_http_info(conversation_id, id, region, opts)
1408
+ nil
1409
+ end
1410
+
1411
+ # Post Conversations insert message part
1412
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1413
+ # @param conversation_id [Integer]
1414
+ # @param id [Integer]
1415
+ # @param region [String] The data center region the data resides in
1416
+ # @param [Hash] opts the optional parameters
1417
+ # @option opts [Integer] :index
1418
+ # @option opts [MessagePart] :part
1419
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1420
+ def insert_message_part_with_http_info(conversation_id, id, region, opts = {})
1421
+ if @api_client.config.debugging
1422
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.insert_message_part ...'
1423
+ end
1424
+ # verify the required parameter 'conversation_id' is set
1425
+ if @api_client.config.client_side_validation && conversation_id.nil?
1426
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.insert_message_part"
1427
+ end
1428
+ # verify the required parameter 'id' is set
1429
+ if @api_client.config.client_side_validation && id.nil?
1430
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.insert_message_part"
1431
+ end
1432
+ # verify the required parameter 'region' is set
1433
+ if @api_client.config.client_side_validation && region.nil?
1434
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.insert_message_part"
1435
+ end
1436
+ # verify enum value
1437
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1438
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1439
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1440
+ end
1441
+ # resource path
1442
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Insert'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
1443
+
1444
+ # query parameters
1445
+ query_params = opts[:query_params] || {}
1446
+ query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
1447
+
1448
+ # header parameters
1449
+ header_params = opts[:header_params] || {}
1450
+ # HTTP header 'Accept' (if needed)
1451
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1452
+ # HTTP header 'Content-Type'
1453
+ content_type = @api_client.select_header_content_type(['application/json'])
1454
+ if !content_type.nil?
1455
+ header_params['Content-Type'] = content_type
1456
+ end
1457
+
1458
+ # form parameters
1459
+ form_params = opts[:form_params] || {}
1460
+
1461
+ # http body (model)
1462
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'part'])
1463
+
1464
+ # return_type
1465
+ return_type = opts[:debug_return_type]
1466
+
1467
+ # auth_names
1468
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1469
+
1470
+ new_options = opts.merge(
1471
+ :operation => :"ConversationsApi.insert_message_part",
1472
+ :header_params => header_params,
1473
+ :query_params => query_params,
1474
+ :form_params => form_params,
1475
+ :body => post_body,
1476
+ :auth_names => auth_names,
1477
+ :return_type => return_type
1478
+ )
1479
+
1480
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1481
+ if @api_client.config.debugging
1482
+ @api_client.config.logger.debug "API called: ConversationsApi#insert_message_part\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1483
+ end
1484
+ return data, status_code, headers
1485
+ end
1486
+
1487
+ # Post Conversations mode message part
1488
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
1489
+ # @param conversation_id [Integer]
1490
+ # @param id [Integer]
1491
+ # @param region [String] The data center region the data resides in
1492
+ # @param [Hash] opts the optional parameters
1493
+ # @option opts [Integer] :previous_index
1494
+ # @option opts [Integer] :current_index
1495
+ # @return [nil]
1496
+ def mode_message_part(conversation_id, id, region, opts = {})
1497
+ mode_message_part_with_http_info(conversation_id, id, region, opts)
1498
+ nil
1499
+ end
1500
+
1501
+ # Post Conversations mode message part
1502
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1503
+ # @param conversation_id [Integer]
1504
+ # @param id [Integer]
1505
+ # @param region [String] The data center region the data resides in
1506
+ # @param [Hash] opts the optional parameters
1507
+ # @option opts [Integer] :previous_index
1508
+ # @option opts [Integer] :current_index
1509
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1510
+ def mode_message_part_with_http_info(conversation_id, id, region, opts = {})
1511
+ if @api_client.config.debugging
1512
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.mode_message_part ...'
1513
+ end
1514
+ # verify the required parameter 'conversation_id' is set
1515
+ if @api_client.config.client_side_validation && conversation_id.nil?
1516
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.mode_message_part"
1517
+ end
1518
+ # verify the required parameter 'id' is set
1519
+ if @api_client.config.client_side_validation && id.nil?
1520
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.mode_message_part"
1521
+ end
1522
+ # verify the required parameter 'region' is set
1523
+ if @api_client.config.client_side_validation && region.nil?
1524
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.mode_message_part"
1525
+ end
1526
+ # verify enum value
1527
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1528
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1529
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1530
+ end
1531
+ # resource path
1532
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Move'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
1533
+
1534
+ # query parameters
1535
+ query_params = opts[:query_params] || {}
1536
+ query_params[:'previousIndex'] = opts[:'previous_index'] if !opts[:'previous_index'].nil?
1537
+ query_params[:'currentIndex'] = opts[:'current_index'] if !opts[:'current_index'].nil?
1538
+
1539
+ # header parameters
1540
+ header_params = opts[:header_params] || {}
1541
+ # HTTP header 'Accept' (if needed)
1542
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1543
+
1544
+ # form parameters
1545
+ form_params = opts[:form_params] || {}
1546
+
1547
+ # http body (model)
1548
+ post_body = opts[:debug_body]
1549
+
1550
+ # return_type
1551
+ return_type = opts[:debug_return_type]
1552
+
1553
+ # auth_names
1554
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1555
+
1556
+ new_options = opts.merge(
1557
+ :operation => :"ConversationsApi.mode_message_part",
1558
+ :header_params => header_params,
1559
+ :query_params => query_params,
1560
+ :form_params => form_params,
1561
+ :body => post_body,
1562
+ :auth_names => auth_names,
1563
+ :return_type => return_type
1564
+ )
1565
+
1566
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1567
+ if @api_client.config.debugging
1568
+ @api_client.config.logger.debug "API called: ConversationsApi#mode_message_part\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1569
+ end
1570
+ return data, status_code, headers
1571
+ end
1572
+
1573
+ # Patch Conversations conversation
1574
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
1575
+ # @param key [Integer]
1576
+ # @param region [String] The data center region the data resides in
1577
+ # @param [Hash] opts the optional parameters
1578
+ # @option opts [ConversationUpdate] :conversation
1579
+ # @return [nil]
1580
+ def patch_conversation(key, region, opts = {})
1581
+ patch_conversation_with_http_info(key, region, opts)
1582
+ nil
1583
+ end
1584
+
1585
+ # Patch Conversations conversation
1586
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1587
+ # @param key [Integer]
1588
+ # @param region [String] The data center region the data resides in
1589
+ # @param [Hash] opts the optional parameters
1590
+ # @option opts [ConversationUpdate] :conversation
1591
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1592
+ def patch_conversation_with_http_info(key, region, opts = {})
1593
+ if @api_client.config.debugging
1594
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.patch_conversation ...'
1595
+ end
1596
+ # verify the required parameter 'key' is set
1597
+ if @api_client.config.client_side_validation && key.nil?
1598
+ fail ArgumentError, "Missing the required parameter 'key' when calling ConversationsApi.patch_conversation"
1599
+ end
1600
+ # verify the required parameter 'region' is set
1601
+ if @api_client.config.client_side_validation && region.nil?
1602
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.patch_conversation"
1603
+ end
1604
+ # verify enum value
1605
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1606
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1607
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1608
+ end
1609
+ # resource path
1610
+ local_var_path = '/{region}/comms/2.0/Conversations/{key}'.sub('{' + 'key' + '}', CGI.escape(key.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
1611
+
1612
+ # query parameters
1613
+ query_params = opts[:query_params] || {}
1614
+
1615
+ # header parameters
1616
+ header_params = opts[:header_params] || {}
1617
+ # HTTP header 'Accept' (if needed)
1618
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1619
+ # HTTP header 'Content-Type'
1620
+ content_type = @api_client.select_header_content_type(['application/json'])
1621
+ if !content_type.nil?
1622
+ header_params['Content-Type'] = content_type
1623
+ end
1624
+
1625
+ # form parameters
1626
+ form_params = opts[:form_params] || {}
1627
+
1628
+ # http body (model)
1629
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'conversation'])
1630
+
1631
+ # return_type
1632
+ return_type = opts[:debug_return_type]
1633
+
1634
+ # auth_names
1635
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1636
+
1637
+ new_options = opts.merge(
1638
+ :operation => :"ConversationsApi.patch_conversation",
1639
+ :header_params => header_params,
1640
+ :query_params => query_params,
1641
+ :form_params => form_params,
1642
+ :body => post_body,
1643
+ :auth_names => auth_names,
1644
+ :return_type => return_type
1645
+ )
1646
+
1647
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1648
+ if @api_client.config.debugging
1649
+ @api_client.config.logger.debug "API called: ConversationsApi#patch_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1650
+ end
1651
+ return data, status_code, headers
1652
+ end
1653
+
1654
+ # Patch Conversations message
1655
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>Message</b><br/><br/>
1656
+ # @param conversation_id [Integer]
1657
+ # @param id [Integer]
1658
+ # @param region [String] The data center region the data resides in
1659
+ # @param [Hash] opts the optional parameters
1660
+ # @option opts [MessageUpdate] :message
1661
+ # @return [Message]
1662
+ def patch_message(conversation_id, id, region, opts = {})
1663
+ data, _status_code, _headers = patch_message_with_http_info(conversation_id, id, region, opts)
1664
+ data
1665
+ end
1666
+
1667
+ # Patch Conversations message
1668
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;Message&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1669
+ # @param conversation_id [Integer]
1670
+ # @param id [Integer]
1671
+ # @param region [String] The data center region the data resides in
1672
+ # @param [Hash] opts the optional parameters
1673
+ # @option opts [MessageUpdate] :message
1674
+ # @return [Array<(Message, Integer, Hash)>] Message data, response status code and response headers
1675
+ def patch_message_with_http_info(conversation_id, id, region, opts = {})
1676
+ if @api_client.config.debugging
1677
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.patch_message ...'
1678
+ end
1679
+ # verify the required parameter 'conversation_id' is set
1680
+ if @api_client.config.client_side_validation && conversation_id.nil?
1681
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.patch_message"
1682
+ end
1683
+ # verify the required parameter 'id' is set
1684
+ if @api_client.config.client_side_validation && id.nil?
1685
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.patch_message"
1686
+ end
1687
+ # verify the required parameter 'region' is set
1688
+ if @api_client.config.client_side_validation && region.nil?
1689
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.patch_message"
1690
+ end
1691
+ # verify enum value
1692
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1693
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1694
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1695
+ end
1696
+ # resource path
1697
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
1698
+
1699
+ # query parameters
1700
+ query_params = opts[:query_params] || {}
1701
+
1702
+ # header parameters
1703
+ header_params = opts[:header_params] || {}
1704
+ # HTTP header 'Accept' (if needed)
1705
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1706
+ # HTTP header 'Content-Type'
1707
+ content_type = @api_client.select_header_content_type(['application/json'])
1708
+ if !content_type.nil?
1709
+ header_params['Content-Type'] = content_type
1710
+ end
1711
+
1712
+ # form parameters
1713
+ form_params = opts[:form_params] || {}
1714
+
1715
+ # http body (model)
1716
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'message'])
1717
+
1718
+ # return_type
1719
+ return_type = opts[:debug_return_type] || 'Message'
1720
+
1721
+ # auth_names
1722
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1723
+
1724
+ new_options = opts.merge(
1725
+ :operation => :"ConversationsApi.patch_message",
1726
+ :header_params => header_params,
1727
+ :query_params => query_params,
1728
+ :form_params => form_params,
1729
+ :body => post_body,
1730
+ :auth_names => auth_names,
1731
+ :return_type => return_type
1732
+ )
1733
+
1734
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1735
+ if @api_client.config.debugging
1736
+ @api_client.config.logger.debug "API called: ConversationsApi#patch_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1737
+ end
1738
+ return data, status_code, headers
1739
+ end
1740
+
1741
+ # Patch Conversations participant
1742
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
1743
+ # @param conversation_id [Integer]
1744
+ # @param id [Integer]
1745
+ # @param region [String] The data center region the data resides in
1746
+ # @param [Hash] opts the optional parameters
1747
+ # @option opts [ParticipantWithRoleUpdate] :participant
1748
+ # @return [nil]
1749
+ def patch_participant(conversation_id, id, region, opts = {})
1750
+ patch_participant_with_http_info(conversation_id, id, region, opts)
1751
+ nil
1752
+ end
1753
+
1754
+ # Patch Conversations participant
1755
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1756
+ # @param conversation_id [Integer]
1757
+ # @param id [Integer]
1758
+ # @param region [String] The data center region the data resides in
1759
+ # @param [Hash] opts the optional parameters
1760
+ # @option opts [ParticipantWithRoleUpdate] :participant
1761
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1762
+ def patch_participant_with_http_info(conversation_id, id, region, opts = {})
1763
+ if @api_client.config.debugging
1764
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.patch_participant ...'
1765
+ end
1766
+ # verify the required parameter 'conversation_id' is set
1767
+ if @api_client.config.client_side_validation && conversation_id.nil?
1768
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.patch_participant"
1769
+ end
1770
+ # verify the required parameter 'id' is set
1771
+ if @api_client.config.client_side_validation && id.nil?
1772
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.patch_participant"
1773
+ end
1774
+ # verify the required parameter 'region' is set
1775
+ if @api_client.config.client_side_validation && region.nil?
1776
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.patch_participant"
1777
+ end
1778
+ # verify enum value
1779
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1780
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1781
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1782
+ end
1783
+ # resource path
1784
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Participants({id})'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
1785
+
1786
+ # query parameters
1787
+ query_params = opts[:query_params] || {}
1788
+
1789
+ # header parameters
1790
+ header_params = opts[:header_params] || {}
1791
+ # HTTP header 'Accept' (if needed)
1792
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1793
+ # HTTP header 'Content-Type'
1794
+ content_type = @api_client.select_header_content_type(['application/json'])
1795
+ if !content_type.nil?
1796
+ header_params['Content-Type'] = content_type
1797
+ end
1798
+
1799
+ # form parameters
1800
+ form_params = opts[:form_params] || {}
1801
+
1802
+ # http body (model)
1803
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'participant'])
1804
+
1805
+ # return_type
1806
+ return_type = opts[:debug_return_type]
1807
+
1808
+ # auth_names
1809
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1810
+
1811
+ new_options = opts.merge(
1812
+ :operation => :"ConversationsApi.patch_participant",
1813
+ :header_params => header_params,
1814
+ :query_params => query_params,
1815
+ :form_params => form_params,
1816
+ :body => post_body,
1817
+ :auth_names => auth_names,
1818
+ :return_type => return_type
1819
+ )
1820
+
1821
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1822
+ if @api_client.config.debugging
1823
+ @api_client.config.logger.debug "API called: ConversationsApi#patch_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1824
+ end
1825
+ return data, status_code, headers
1826
+ end
1827
+
1828
+ # Post Conversations conversation
1829
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>Conversation</b><br/><br/>
1830
+ # @param region [String] The data center region the data resides in
1831
+ # @param [Hash] opts the optional parameters
1832
+ # @option opts [ConversationCreate] :conversation
1833
+ # @return [Conversation]
1834
+ def post_conversation(region, opts = {})
1835
+ data, _status_code, _headers = post_conversation_with_http_info(region, opts)
1836
+ data
1837
+ end
1838
+
1839
+ # Post Conversations conversation
1840
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;Conversation&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1841
+ # @param region [String] The data center region the data resides in
1842
+ # @param [Hash] opts the optional parameters
1843
+ # @option opts [ConversationCreate] :conversation
1844
+ # @return [Array<(Conversation, Integer, Hash)>] Conversation data, response status code and response headers
1845
+ def post_conversation_with_http_info(region, opts = {})
1846
+ if @api_client.config.debugging
1847
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.post_conversation ...'
1848
+ end
1849
+ # verify the required parameter 'region' is set
1850
+ if @api_client.config.client_side_validation && region.nil?
1851
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.post_conversation"
1852
+ end
1853
+ # verify enum value
1854
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1855
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1856
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1857
+ end
1858
+ # resource path
1859
+ local_var_path = '/{region}/comms/2.0/Conversations'.sub('{' + 'region' + '}', CGI.escape(region.to_s))
1860
+
1861
+ # query parameters
1862
+ query_params = opts[:query_params] || {}
1863
+
1864
+ # header parameters
1865
+ header_params = opts[:header_params] || {}
1866
+ # HTTP header 'Accept' (if needed)
1867
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1868
+ # HTTP header 'Content-Type'
1869
+ content_type = @api_client.select_header_content_type(['application/json'])
1870
+ if !content_type.nil?
1871
+ header_params['Content-Type'] = content_type
1872
+ end
1873
+
1874
+ # form parameters
1875
+ form_params = opts[:form_params] || {}
1876
+
1877
+ # http body (model)
1878
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'conversation'])
1879
+
1880
+ # return_type
1881
+ return_type = opts[:debug_return_type] || 'Conversation'
1882
+
1883
+ # auth_names
1884
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1885
+
1886
+ new_options = opts.merge(
1887
+ :operation => :"ConversationsApi.post_conversation",
1888
+ :header_params => header_params,
1889
+ :query_params => query_params,
1890
+ :form_params => form_params,
1891
+ :body => post_body,
1892
+ :auth_names => auth_names,
1893
+ :return_type => return_type
1894
+ )
1895
+
1896
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1897
+ if @api_client.config.debugging
1898
+ @api_client.config.logger.debug "API called: ConversationsApi#post_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1899
+ end
1900
+ return data, status_code, headers
1901
+ end
1902
+
1903
+ # Post Conversations file
1904
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>Blob</b><br/><br/>
1905
+ # @param conversation_id [Integer]
1906
+ # @param id [Integer]
1907
+ # @param region [String] The data center region the data resides in
1908
+ # @param file [File] An arbitrary file which will get associated to the message.
1909
+ # @param [Hash] opts the optional parameters
1910
+ # @option opts [Integer] :part_index
1911
+ # @option opts [String] :ref
1912
+ # @option opts [String] :file_name The name of the file
1913
+ # @return [Blob]
1914
+ def post_file(conversation_id, id, region, file, opts = {})
1915
+ data, _status_code, _headers = post_file_with_http_info(conversation_id, id, region, file, opts)
1916
+ data
1917
+ end
1918
+
1919
+ # Post Conversations file
1920
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;Blob&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
1921
+ # @param conversation_id [Integer]
1922
+ # @param id [Integer]
1923
+ # @param region [String] The data center region the data resides in
1924
+ # @param file [File] An arbitrary file which will get associated to the message.
1925
+ # @param [Hash] opts the optional parameters
1926
+ # @option opts [Integer] :part_index
1927
+ # @option opts [String] :ref
1928
+ # @option opts [String] :file_name The name of the file
1929
+ # @return [Array<(Blob, Integer, Hash)>] Blob data, response status code and response headers
1930
+ def post_file_with_http_info(conversation_id, id, region, file, opts = {})
1931
+ if @api_client.config.debugging
1932
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.post_file ...'
1933
+ end
1934
+ # verify the required parameter 'conversation_id' is set
1935
+ if @api_client.config.client_side_validation && conversation_id.nil?
1936
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.post_file"
1937
+ end
1938
+ # verify the required parameter 'id' is set
1939
+ if @api_client.config.client_side_validation && id.nil?
1940
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.post_file"
1941
+ end
1942
+ # verify the required parameter 'region' is set
1943
+ if @api_client.config.client_side_validation && region.nil?
1944
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.post_file"
1945
+ end
1946
+ # verify enum value
1947
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
1948
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
1949
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
1950
+ end
1951
+ # verify the required parameter 'file' is set
1952
+ if @api_client.config.client_side_validation && file.nil?
1953
+ fail ArgumentError, "Missing the required parameter 'file' when calling ConversationsApi.post_file"
1954
+ end
1955
+ # resource path
1956
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Files'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
1957
+
1958
+ # query parameters
1959
+ query_params = opts[:query_params] || {}
1960
+ query_params[:'partIndex'] = opts[:'part_index'] if !opts[:'part_index'].nil?
1961
+ query_params[:'ref'] = opts[:'ref'] if !opts[:'ref'].nil?
1962
+
1963
+ # header parameters
1964
+ header_params = opts[:header_params] || {}
1965
+ # HTTP header 'Accept' (if needed)
1966
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
1967
+ # HTTP header 'Content-Type'
1968
+ content_type = @api_client.select_header_content_type(['multipart/form-data'])
1969
+ if !content_type.nil?
1970
+ header_params['Content-Type'] = content_type
1971
+ end
1972
+
1973
+ # form parameters
1974
+ form_params = opts[:form_params] || {}
1975
+ form_params['file'] = file
1976
+ form_params['fileName'] = opts[:'file_name'] if !opts[:'file_name'].nil?
1977
+
1978
+ # http body (model)
1979
+ post_body = opts[:debug_body]
1980
+
1981
+ # return_type
1982
+ return_type = opts[:debug_return_type] || 'Blob'
1983
+
1984
+ # auth_names
1985
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1986
+
1987
+ new_options = opts.merge(
1988
+ :operation => :"ConversationsApi.post_file",
1989
+ :header_params => header_params,
1990
+ :query_params => query_params,
1991
+ :form_params => form_params,
1992
+ :body => post_body,
1993
+ :auth_names => auth_names,
1994
+ :return_type => return_type
1995
+ )
1996
+
1997
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1998
+ if @api_client.config.debugging
1999
+ @api_client.config.logger.debug "API called: ConversationsApi#post_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2000
+ end
2001
+ return data, status_code, headers
2002
+ end
2003
+
2004
+ # Post Conversations message
2005
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>Message</b><br/><br/>
2006
+ # @param conversation_id [Integer]
2007
+ # @param region [String] The data center region the data resides in
2008
+ # @param [Hash] opts the optional parameters
2009
+ # @option opts [MessageCreate] :message
2010
+ # @return [Message]
2011
+ def post_message(conversation_id, region, opts = {})
2012
+ data, _status_code, _headers = post_message_with_http_info(conversation_id, region, opts)
2013
+ data
2014
+ end
2015
+
2016
+ # Post Conversations message
2017
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;Message&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
2018
+ # @param conversation_id [Integer]
2019
+ # @param region [String] The data center region the data resides in
2020
+ # @param [Hash] opts the optional parameters
2021
+ # @option opts [MessageCreate] :message
2022
+ # @return [Array<(Message, Integer, Hash)>] Message data, response status code and response headers
2023
+ def post_message_with_http_info(conversation_id, region, opts = {})
2024
+ if @api_client.config.debugging
2025
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.post_message ...'
2026
+ end
2027
+ # verify the required parameter 'conversation_id' is set
2028
+ if @api_client.config.client_side_validation && conversation_id.nil?
2029
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.post_message"
2030
+ end
2031
+ # verify the required parameter 'region' is set
2032
+ if @api_client.config.client_side_validation && region.nil?
2033
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.post_message"
2034
+ end
2035
+ # verify enum value
2036
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
2037
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
2038
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
2039
+ end
2040
+ # resource path
2041
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
2042
+
2043
+ # query parameters
2044
+ query_params = opts[:query_params] || {}
2045
+
2046
+ # header parameters
2047
+ header_params = opts[:header_params] || {}
2048
+ # HTTP header 'Accept' (if needed)
2049
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
2050
+ # HTTP header 'Content-Type'
2051
+ content_type = @api_client.select_header_content_type(['application/json'])
2052
+ if !content_type.nil?
2053
+ header_params['Content-Type'] = content_type
2054
+ end
2055
+
2056
+ # form parameters
2057
+ form_params = opts[:form_params] || {}
2058
+
2059
+ # http body (model)
2060
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'message'])
2061
+
2062
+ # return_type
2063
+ return_type = opts[:debug_return_type] || 'Message'
2064
+
2065
+ # auth_names
2066
+ auth_names = opts[:debug_auth_names] || ['oauth2']
2067
+
2068
+ new_options = opts.merge(
2069
+ :operation => :"ConversationsApi.post_message",
2070
+ :header_params => header_params,
2071
+ :query_params => query_params,
2072
+ :form_params => form_params,
2073
+ :body => post_body,
2074
+ :auth_names => auth_names,
2075
+ :return_type => return_type
2076
+ )
2077
+
2078
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2079
+ if @api_client.config.debugging
2080
+ @api_client.config.logger.debug "API called: ConversationsApi#post_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2081
+ end
2082
+ return data, status_code, headers
2083
+ end
2084
+
2085
+ # Post Conversations participant
2086
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>ParticipantWithRole</b><br/><br/>
2087
+ # @param conversation_id [Integer]
2088
+ # @param region [String] The data center region the data resides in
2089
+ # @param [Hash] opts the optional parameters
2090
+ # @option opts [ParticipantWithRoleCreate] :participant
2091
+ # @return [ParticipantWithRole]
2092
+ def post_participant(conversation_id, region, opts = {})
2093
+ data, _status_code, _headers = post_participant_with_http_info(conversation_id, region, opts)
2094
+ data
2095
+ end
2096
+
2097
+ # Post Conversations participant
2098
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;ParticipantWithRole&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
2099
+ # @param conversation_id [Integer]
2100
+ # @param region [String] The data center region the data resides in
2101
+ # @param [Hash] opts the optional parameters
2102
+ # @option opts [ParticipantWithRoleCreate] :participant
2103
+ # @return [Array<(ParticipantWithRole, Integer, Hash)>] ParticipantWithRole data, response status code and response headers
2104
+ def post_participant_with_http_info(conversation_id, region, opts = {})
2105
+ if @api_client.config.debugging
2106
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.post_participant ...'
2107
+ end
2108
+ # verify the required parameter 'conversation_id' is set
2109
+ if @api_client.config.client_side_validation && conversation_id.nil?
2110
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.post_participant"
2111
+ end
2112
+ # verify the required parameter 'region' is set
2113
+ if @api_client.config.client_side_validation && region.nil?
2114
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.post_participant"
2115
+ end
2116
+ # verify enum value
2117
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
2118
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
2119
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
2120
+ end
2121
+ # resource path
2122
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Participants'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
2123
+
2124
+ # query parameters
2125
+ query_params = opts[:query_params] || {}
2126
+
2127
+ # header parameters
2128
+ header_params = opts[:header_params] || {}
2129
+ # HTTP header 'Accept' (if needed)
2130
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
2131
+ # HTTP header 'Content-Type'
2132
+ content_type = @api_client.select_header_content_type(['application/json'])
2133
+ if !content_type.nil?
2134
+ header_params['Content-Type'] = content_type
2135
+ end
2136
+
2137
+ # form parameters
2138
+ form_params = opts[:form_params] || {}
2139
+
2140
+ # http body (model)
2141
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'participant'])
2142
+
2143
+ # return_type
2144
+ return_type = opts[:debug_return_type] || 'ParticipantWithRole'
2145
+
2146
+ # auth_names
2147
+ auth_names = opts[:debug_auth_names] || ['oauth2']
2148
+
2149
+ new_options = opts.merge(
2150
+ :operation => :"ConversationsApi.post_participant",
2151
+ :header_params => header_params,
2152
+ :query_params => query_params,
2153
+ :form_params => form_params,
2154
+ :body => post_body,
2155
+ :auth_names => auth_names,
2156
+ :return_type => return_type
2157
+ )
2158
+
2159
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2160
+ if @api_client.config.debugging
2161
+ @api_client.config.logger.debug "API called: ConversationsApi#post_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2162
+ end
2163
+ return data, status_code, headers
2164
+ end
2165
+
2166
+ # Put Conversations message part
2167
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
2168
+ # @param conversation_id [Integer]
2169
+ # @param id [Integer]
2170
+ # @param region [String] The data center region the data resides in
2171
+ # @param [Hash] opts the optional parameters
2172
+ # @option opts [Integer] :index
2173
+ # @option opts [String] :ref
2174
+ # @option opts [MessagePart] :part
2175
+ # @return [nil]
2176
+ def put_message_part(conversation_id, id, region, opts = {})
2177
+ put_message_part_with_http_info(conversation_id, id, region, opts)
2178
+ nil
2179
+ end
2180
+
2181
+ # Put Conversations message part
2182
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
2183
+ # @param conversation_id [Integer]
2184
+ # @param id [Integer]
2185
+ # @param region [String] The data center region the data resides in
2186
+ # @param [Hash] opts the optional parameters
2187
+ # @option opts [Integer] :index
2188
+ # @option opts [String] :ref
2189
+ # @option opts [MessagePart] :part
2190
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2191
+ def put_message_part_with_http_info(conversation_id, id, region, opts = {})
2192
+ if @api_client.config.debugging
2193
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.put_message_part ...'
2194
+ end
2195
+ # verify the required parameter 'conversation_id' is set
2196
+ if @api_client.config.client_side_validation && conversation_id.nil?
2197
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.put_message_part"
2198
+ end
2199
+ # verify the required parameter 'id' is set
2200
+ if @api_client.config.client_side_validation && id.nil?
2201
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.put_message_part"
2202
+ end
2203
+ # verify the required parameter 'region' is set
2204
+ if @api_client.config.client_side_validation && region.nil?
2205
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.put_message_part"
2206
+ end
2207
+ # verify enum value
2208
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
2209
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
2210
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
2211
+ end
2212
+ # resource path
2213
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Set'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
2214
+
2215
+ # query parameters
2216
+ query_params = opts[:query_params] || {}
2217
+ query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
2218
+ query_params[:'ref'] = opts[:'ref'] if !opts[:'ref'].nil?
2219
+
2220
+ # header parameters
2221
+ header_params = opts[:header_params] || {}
2222
+ # HTTP header 'Accept' (if needed)
2223
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
2224
+ # HTTP header 'Content-Type'
2225
+ content_type = @api_client.select_header_content_type(['application/json'])
2226
+ if !content_type.nil?
2227
+ header_params['Content-Type'] = content_type
2228
+ end
2229
+
2230
+ # form parameters
2231
+ form_params = opts[:form_params] || {}
2232
+
2233
+ # http body (model)
2234
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'part'])
2235
+
2236
+ # return_type
2237
+ return_type = opts[:debug_return_type]
2238
+
2239
+ # auth_names
2240
+ auth_names = opts[:debug_auth_names] || ['oauth2']
2241
+
2242
+ new_options = opts.merge(
2243
+ :operation => :"ConversationsApi.put_message_part",
2244
+ :header_params => header_params,
2245
+ :query_params => query_params,
2246
+ :form_params => form_params,
2247
+ :body => post_body,
2248
+ :auth_names => auth_names,
2249
+ :return_type => return_type
2250
+ )
2251
+
2252
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2253
+ if @api_client.config.debugging
2254
+ @api_client.config.logger.debug "API called: ConversationsApi#put_message_part\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2255
+ end
2256
+ return data, status_code, headers
2257
+ end
2258
+
2259
+ # Put Conversations participants
2260
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
2261
+ # @param conversation_id [Integer]
2262
+ # @param region [String] The data center region the data resides in
2263
+ # @param [Hash] opts the optional parameters
2264
+ # @option opts [Array<ParticipantWithRoleCreate>] :participants
2265
+ # @return [nil]
2266
+ def put_participants(conversation_id, region, opts = {})
2267
+ put_participants_with_http_info(conversation_id, region, opts)
2268
+ nil
2269
+ end
2270
+
2271
+ # Put Conversations participants
2272
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
2273
+ # @param conversation_id [Integer]
2274
+ # @param region [String] The data center region the data resides in
2275
+ # @param [Hash] opts the optional parameters
2276
+ # @option opts [Array<ParticipantWithRoleCreate>] :participants
2277
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2278
+ def put_participants_with_http_info(conversation_id, region, opts = {})
2279
+ if @api_client.config.debugging
2280
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.put_participants ...'
2281
+ end
2282
+ # verify the required parameter 'conversation_id' is set
2283
+ if @api_client.config.client_side_validation && conversation_id.nil?
2284
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.put_participants"
2285
+ end
2286
+ # verify the required parameter 'region' is set
2287
+ if @api_client.config.client_side_validation && region.nil?
2288
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.put_participants"
2289
+ end
2290
+ # verify enum value
2291
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
2292
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
2293
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
2294
+ end
2295
+ # resource path
2296
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Participants'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
2297
+
2298
+ # query parameters
2299
+ query_params = opts[:query_params] || {}
2300
+
2301
+ # header parameters
2302
+ header_params = opts[:header_params] || {}
2303
+ # HTTP header 'Accept' (if needed)
2304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
2305
+ # HTTP header 'Content-Type'
2306
+ content_type = @api_client.select_header_content_type(['application/json'])
2307
+ if !content_type.nil?
2308
+ header_params['Content-Type'] = content_type
2309
+ end
2310
+
2311
+ # form parameters
2312
+ form_params = opts[:form_params] || {}
2313
+
2314
+ # http body (model)
2315
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'participants'])
2316
+
2317
+ # return_type
2318
+ return_type = opts[:debug_return_type]
2319
+
2320
+ # auth_names
2321
+ auth_names = opts[:debug_auth_names] || ['oauth2']
2322
+
2323
+ new_options = opts.merge(
2324
+ :operation => :"ConversationsApi.put_participants",
2325
+ :header_params => header_params,
2326
+ :query_params => query_params,
2327
+ :form_params => form_params,
2328
+ :body => post_body,
2329
+ :auth_names => auth_names,
2330
+ :return_type => return_type
2331
+ )
2332
+
2333
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2334
+ if @api_client.config.debugging
2335
+ @api_client.config.logger.debug "API called: ConversationsApi#put_participants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2336
+ end
2337
+ return data, status_code, headers
2338
+ end
2339
+
2340
+ # Get Conversations send clone conversation
2341
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b>BooleanValue</b><br/><br/>
2342
+ # @param key [Integer]
2343
+ # @param region [String] The data center region the data resides in
2344
+ # @param [Hash] opts the optional parameters
2345
+ # @option opts [String] :email
2346
+ # @return [BooleanValue]
2347
+ def send_clone_conversation(key, region, opts = {})
2348
+ data, _status_code, _headers = send_clone_conversation_with_http_info(key, region, opts)
2349
+ data
2350
+ end
2351
+
2352
+ # Get Conversations send clone conversation
2353
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;BooleanValue&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
2354
+ # @param key [Integer]
2355
+ # @param region [String] The data center region the data resides in
2356
+ # @param [Hash] opts the optional parameters
2357
+ # @option opts [String] :email
2358
+ # @return [Array<(BooleanValue, Integer, Hash)>] BooleanValue data, response status code and response headers
2359
+ def send_clone_conversation_with_http_info(key, region, opts = {})
2360
+ if @api_client.config.debugging
2361
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.send_clone_conversation ...'
2362
+ end
2363
+ # verify the required parameter 'key' is set
2364
+ if @api_client.config.client_side_validation && key.nil?
2365
+ fail ArgumentError, "Missing the required parameter 'key' when calling ConversationsApi.send_clone_conversation"
2366
+ end
2367
+ # verify the required parameter 'region' is set
2368
+ if @api_client.config.client_side_validation && region.nil?
2369
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.send_clone_conversation"
2370
+ end
2371
+ # verify enum value
2372
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
2373
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
2374
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
2375
+ end
2376
+ # resource path
2377
+ local_var_path = '/{region}/comms/2.0/Conversations/{key}/SendClone'.sub('{' + 'key' + '}', CGI.escape(key.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
2378
+
2379
+ # query parameters
2380
+ query_params = opts[:query_params] || {}
2381
+ query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
2382
+
2383
+ # header parameters
2384
+ header_params = opts[:header_params] || {}
2385
+ # HTTP header 'Accept' (if needed)
2386
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
2387
+
2388
+ # form parameters
2389
+ form_params = opts[:form_params] || {}
2390
+
2391
+ # http body (model)
2392
+ post_body = opts[:debug_body]
2393
+
2394
+ # return_type
2395
+ return_type = opts[:debug_return_type] || 'BooleanValue'
2396
+
2397
+ # auth_names
2398
+ auth_names = opts[:debug_auth_names] || ['oauth2']
2399
+
2400
+ new_options = opts.merge(
2401
+ :operation => :"ConversationsApi.send_clone_conversation",
2402
+ :header_params => header_params,
2403
+ :query_params => query_params,
2404
+ :form_params => form_params,
2405
+ :body => post_body,
2406
+ :auth_names => auth_names,
2407
+ :return_type => return_type
2408
+ )
2409
+
2410
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2411
+ if @api_client.config.debugging
2412
+ @api_client.config.logger.debug "API called: ConversationsApi#send_clone_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2413
+ end
2414
+ return data, status_code, headers
2415
+ end
2416
+
2417
+ # Post Conversations send message
2418
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
2419
+ # @param conversation_id [Integer]
2420
+ # @param id [Integer]
2421
+ # @param region [String] The data center region the data resides in
2422
+ # @param [Hash] opts the optional parameters
2423
+ # @return [nil]
2424
+ def send_message(conversation_id, id, region, opts = {})
2425
+ send_message_with_http_info(conversation_id, id, region, opts)
2426
+ nil
2427
+ end
2428
+
2429
+ # Post Conversations send message
2430
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
2431
+ # @param conversation_id [Integer]
2432
+ # @param id [Integer]
2433
+ # @param region [String] The data center region the data resides in
2434
+ # @param [Hash] opts the optional parameters
2435
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2436
+ def send_message_with_http_info(conversation_id, id, region, opts = {})
2437
+ if @api_client.config.debugging
2438
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.send_message ...'
2439
+ end
2440
+ # verify the required parameter 'conversation_id' is set
2441
+ if @api_client.config.client_side_validation && conversation_id.nil?
2442
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.send_message"
2443
+ end
2444
+ # verify the required parameter 'id' is set
2445
+ if @api_client.config.client_side_validation && id.nil?
2446
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.send_message"
2447
+ end
2448
+ # verify the required parameter 'region' is set
2449
+ if @api_client.config.client_side_validation && region.nil?
2450
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.send_message"
2451
+ end
2452
+ # verify enum value
2453
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
2454
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
2455
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
2456
+ end
2457
+ # resource path
2458
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Send'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
2459
+
2460
+ # query parameters
2461
+ query_params = opts[:query_params] || {}
2462
+
2463
+ # header parameters
2464
+ header_params = opts[:header_params] || {}
2465
+ # HTTP header 'Accept' (if needed)
2466
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
2467
+
2468
+ # form parameters
2469
+ form_params = opts[:form_params] || {}
2470
+
2471
+ # http body (model)
2472
+ post_body = opts[:debug_body]
2473
+
2474
+ # return_type
2475
+ return_type = opts[:debug_return_type]
2476
+
2477
+ # auth_names
2478
+ auth_names = opts[:debug_auth_names] || ['oauth2']
2479
+
2480
+ new_options = opts.merge(
2481
+ :operation => :"ConversationsApi.send_message",
2482
+ :header_params => header_params,
2483
+ :query_params => query_params,
2484
+ :form_params => form_params,
2485
+ :body => post_body,
2486
+ :auth_names => auth_names,
2487
+ :return_type => return_type
2488
+ )
2489
+
2490
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2491
+ if @api_client.config.debugging
2492
+ @api_client.config.logger.debug "API called: ConversationsApi#send_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2493
+ end
2494
+ return data, status_code, headers
2495
+ end
2496
+
2497
+ # Put Conversations set message state
2498
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
2499
+ # @param conversation_id [Integer]
2500
+ # @param id [Integer]
2501
+ # @param region [String] The data center region the data resides in
2502
+ # @param [Hash] opts the optional parameters
2503
+ # @option opts [String] :state
2504
+ # @return [nil]
2505
+ def set_message_state(conversation_id, id, region, opts = {})
2506
+ set_message_state_with_http_info(conversation_id, id, region, opts)
2507
+ nil
2508
+ end
2509
+
2510
+ # Put Conversations set message state
2511
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
2512
+ # @param conversation_id [Integer]
2513
+ # @param id [Integer]
2514
+ # @param region [String] The data center region the data resides in
2515
+ # @param [Hash] opts the optional parameters
2516
+ # @option opts [String] :state
2517
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2518
+ def set_message_state_with_http_info(conversation_id, id, region, opts = {})
2519
+ if @api_client.config.debugging
2520
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.set_message_state ...'
2521
+ end
2522
+ # verify the required parameter 'conversation_id' is set
2523
+ if @api_client.config.client_side_validation && conversation_id.nil?
2524
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.set_message_state"
2525
+ end
2526
+ # verify the required parameter 'id' is set
2527
+ if @api_client.config.client_side_validation && id.nil?
2528
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.set_message_state"
2529
+ end
2530
+ # verify the required parameter 'region' is set
2531
+ if @api_client.config.client_side_validation && region.nil?
2532
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.set_message_state"
2533
+ end
2534
+ # verify enum value
2535
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
2536
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
2537
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
2538
+ end
2539
+ allowable_values = ["NotRead", "Read", "Dismissed"]
2540
+ if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
2541
+ fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
2542
+ end
2543
+ # resource path
2544
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/SetState'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
2545
+
2546
+ # query parameters
2547
+ query_params = opts[:query_params] || {}
2548
+ query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
2549
+
2550
+ # header parameters
2551
+ header_params = opts[:header_params] || {}
2552
+ # HTTP header 'Accept' (if needed)
2553
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
2554
+
2555
+ # form parameters
2556
+ form_params = opts[:form_params] || {}
2557
+
2558
+ # http body (model)
2559
+ post_body = opts[:debug_body]
2560
+
2561
+ # return_type
2562
+ return_type = opts[:debug_return_type]
2563
+
2564
+ # auth_names
2565
+ auth_names = opts[:debug_auth_names] || ['oauth2']
2566
+
2567
+ new_options = opts.merge(
2568
+ :operation => :"ConversationsApi.set_message_state",
2569
+ :header_params => header_params,
2570
+ :query_params => query_params,
2571
+ :form_params => form_params,
2572
+ :body => post_body,
2573
+ :auth_names => auth_names,
2574
+ :return_type => return_type
2575
+ )
2576
+
2577
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2578
+ if @api_client.config.debugging
2579
+ @api_client.config.logger.debug "API called: ConversationsApi#set_message_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2580
+ end
2581
+ return data, status_code, headers
2582
+ end
2583
+
2584
+ # Post Conversations swap message parts
2585
+ # <span style='font-size: 17px;'>Summary:</span>Return Type: <b></b><br/><br/>
2586
+ # @param conversation_id [Integer]
2587
+ # @param id [Integer]
2588
+ # @param region [String] The data center region the data resides in
2589
+ # @param [Hash] opts the optional parameters
2590
+ # @option opts [Integer] :index_a
2591
+ # @option opts [Integer] :index_b
2592
+ # @return [nil]
2593
+ def swap_message_parts(conversation_id, id, region, opts = {})
2594
+ swap_message_parts_with_http_info(conversation_id, id, region, opts)
2595
+ nil
2596
+ end
2597
+
2598
+ # Post Conversations swap message parts
2599
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
2600
+ # @param conversation_id [Integer]
2601
+ # @param id [Integer]
2602
+ # @param region [String] The data center region the data resides in
2603
+ # @param [Hash] opts the optional parameters
2604
+ # @option opts [Integer] :index_a
2605
+ # @option opts [Integer] :index_b
2606
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2607
+ def swap_message_parts_with_http_info(conversation_id, id, region, opts = {})
2608
+ if @api_client.config.debugging
2609
+ @api_client.config.logger.debug 'Calling API: ConversationsApi.swap_message_parts ...'
2610
+ end
2611
+ # verify the required parameter 'conversation_id' is set
2612
+ if @api_client.config.client_side_validation && conversation_id.nil?
2613
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ConversationsApi.swap_message_parts"
2614
+ end
2615
+ # verify the required parameter 'id' is set
2616
+ if @api_client.config.client_side_validation && id.nil?
2617
+ fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.swap_message_parts"
2618
+ end
2619
+ # verify the required parameter 'region' is set
2620
+ if @api_client.config.client_side_validation && region.nil?
2621
+ fail ArgumentError, "Missing the required parameter 'region' when calling ConversationsApi.swap_message_parts"
2622
+ end
2623
+ # verify enum value
2624
+ allowable_values = ["UK", "WestEurope", "Sandbox"]
2625
+ if @api_client.config.client_side_validation && !allowable_values.include?(region)
2626
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
2627
+ end
2628
+ # resource path
2629
+ local_var_path = '/{region}/comms/2.0/Conversations({conversationId})/Messages({id})/Swap'.sub('{' + 'conversationId' + '}', CGI.escape(conversation_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
2630
+
2631
+ # query parameters
2632
+ query_params = opts[:query_params] || {}
2633
+ query_params[:'indexA'] = opts[:'index_a'] if !opts[:'index_a'].nil?
2634
+ query_params[:'indexB'] = opts[:'index_b'] if !opts[:'index_b'].nil?
2635
+
2636
+ # header parameters
2637
+ header_params = opts[:header_params] || {}
2638
+ # HTTP header 'Accept' (if needed)
2639
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
2640
+
2641
+ # form parameters
2642
+ form_params = opts[:form_params] || {}
2643
+
2644
+ # http body (model)
2645
+ post_body = opts[:debug_body]
2646
+
2647
+ # return_type
2648
+ return_type = opts[:debug_return_type]
2649
+
2650
+ # auth_names
2651
+ auth_names = opts[:debug_auth_names] || ['oauth2']
2652
+
2653
+ new_options = opts.merge(
2654
+ :operation => :"ConversationsApi.swap_message_parts",
2655
+ :header_params => header_params,
2656
+ :query_params => query_params,
2657
+ :form_params => form_params,
2658
+ :body => post_body,
2659
+ :auth_names => auth_names,
2660
+ :return_type => return_type
2661
+ )
2662
+
2663
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2664
+ if @api_client.config.debugging
2665
+ @api_client.config.logger.debug "API called: ConversationsApi#swap_message_parts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2666
+ end
2667
+ return data, status_code, headers
2668
+ end
2669
+ end
2670
+ end