fastly 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +15 -8
  5. data/docs/BulkUpdateConfigStoreItem.md +12 -0
  6. data/docs/{BulkUpdateDictionaryItemAllOf.md → BulkUpdateConfigStoreItemAllOf.md} +1 -1
  7. data/docs/BulkUpdateConfigStoreListRequest.md +10 -0
  8. data/docs/ConfigStore.md +10 -0
  9. data/docs/ConfigStoreApi.md +277 -0
  10. data/docs/ConfigStoreInfoResponse.md +10 -0
  11. data/docs/ConfigStoreItem.md +11 -0
  12. data/docs/ConfigStoreItemApi.md +302 -0
  13. data/docs/ConfigStoreItemResponse.md +15 -0
  14. data/docs/ConfigStoreItemResponseAllOf.md +10 -0
  15. data/docs/ConfigStoreResponse.md +14 -0
  16. data/docs/ConfigStoreResponseAllOf.md +10 -0
  17. data/lib/fastly/api/config_store_api.rb +463 -0
  18. data/lib/fastly/api/config_store_item_api.rb +529 -0
  19. data/lib/fastly/models/bulk_update_config_store_item.rb +278 -0
  20. data/lib/fastly/models/{bulk_update_dictionary_item_all_of.rb → bulk_update_config_store_item_all_of.rb} +3 -3
  21. data/lib/fastly/models/bulk_update_config_store_list_request.rb +218 -0
  22. data/lib/fastly/models/bulk_update_dictionary_item.rb +1 -1
  23. data/lib/fastly/models/config_store.rb +217 -0
  24. data/lib/fastly/models/config_store_info_response.rb +217 -0
  25. data/lib/fastly/models/config_store_item.rb +227 -0
  26. data/lib/fastly/models/config_store_item_response.rb +278 -0
  27. data/lib/fastly/models/config_store_item_response_all_of.rb +216 -0
  28. data/lib/fastly/models/config_store_response.rb +269 -0
  29. data/lib/fastly/models/config_store_response_all_of.rb +217 -0
  30. data/lib/fastly/version.rb +1 -1
  31. data/lib/fastly.rb +12 -1
  32. data/sig.json +1 -1
  33. metadata +26 -4
@@ -0,0 +1,529 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'cgi'
12
+
13
+ module Fastly
14
+ class ConfigStoreItemApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Update multiple entries in a config store
21
+ # Add multiple key-value pairs to an individual config store, specified by ID.
22
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
23
+ # @option opts [BulkUpdateConfigStoreListRequest] :bulk_update_config_store_list_request
24
+ # @return [InlineResponse200]
25
+ def bulk_update_config_store_item(opts = {})
26
+ data, _status_code, _headers = bulk_update_config_store_item_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # Update multiple entries in a config store
31
+ # Add multiple key-value pairs to an individual config store, specified by ID.
32
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
33
+ # @option opts [BulkUpdateConfigStoreListRequest] :bulk_update_config_store_list_request
34
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
35
+ def bulk_update_config_store_item_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.bulk_update_config_store_item ...'
38
+ end
39
+ # unbox the parameters from the hash
40
+ config_store_id = opts[:'config_store_id']
41
+ # verify the required parameter 'config_store_id' is set
42
+ if @api_client.config.client_side_validation && config_store_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.bulk_update_config_store_item"
44
+ end
45
+ # resource path
46
+ local_var_path = '/resources/stores/config/{config_store_id}/items'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'bulk_update_config_store_list_request'])
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'InlineResponse200'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['token']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"ConfigStoreItemApi.bulk_update_config_store_item",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: ConfigStoreItemApi#bulk_update_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Create an entry in a config store
91
+ # Add a single key-value pair to an individual config store, specified by ID.
92
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
93
+ # @option opts [String] :item_key Item key, maximum 256 characters.
94
+ # @option opts [String] :item_value Item value, maximum 8000 characters.
95
+ # @return [ConfigStoreItemResponse]
96
+ def create_config_store_item(opts = {})
97
+ data, _status_code, _headers = create_config_store_item_with_http_info(opts)
98
+ data
99
+ end
100
+
101
+ # Create an entry in a config store
102
+ # Add a single key-value pair to an individual config store, specified by ID.
103
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
104
+ # @option opts [String] :item_key Item key, maximum 256 characters.
105
+ # @option opts [String] :item_value Item value, maximum 8000 characters.
106
+ # @return [Array<(ConfigStoreItemResponse, Integer, Hash)>] ConfigStoreItemResponse data, response status code and response headers
107
+ def create_config_store_item_with_http_info(opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.create_config_store_item ...'
110
+ end
111
+ # unbox the parameters from the hash
112
+ config_store_id = opts[:'config_store_id']
113
+ # verify the required parameter 'config_store_id' is set
114
+ if @api_client.config.client_side_validation && config_store_id.nil?
115
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.create_config_store_item"
116
+ end
117
+ # resource path
118
+ local_var_path = '/resources/stores/config/{config_store_id}/item'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
119
+
120
+ # query parameters
121
+ query_params = opts[:query_params] || {}
122
+
123
+ # header parameters
124
+ header_params = opts[:header_params] || {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+ # HTTP header 'Content-Type'
128
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
129
+ if !content_type.nil?
130
+ header_params['Content-Type'] = content_type
131
+ end
132
+
133
+ # form parameters
134
+ form_params = opts[:form_params] || {}
135
+ form_params['item_key'] = opts[:'item_key'] if !opts[:'item_key'].nil?
136
+ form_params['item_value'] = opts[:'item_value'] if !opts[:'item_value'].nil?
137
+
138
+ # http body (model)
139
+ post_body = opts[:debug_body]
140
+
141
+ # return_type
142
+ return_type = opts[:debug_return_type] || 'ConfigStoreItemResponse'
143
+
144
+ # auth_names
145
+ auth_names = opts[:debug_auth_names] || ['token']
146
+
147
+ new_options = opts.merge(
148
+ :operation => :"ConfigStoreItemApi.create_config_store_item",
149
+ :header_params => header_params,
150
+ :query_params => query_params,
151
+ :form_params => form_params,
152
+ :body => post_body,
153
+ :auth_names => auth_names,
154
+ :return_type => return_type
155
+ )
156
+
157
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug "API called: ConfigStoreItemApi#create_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
160
+ end
161
+ return data, status_code, headers
162
+ end
163
+
164
+ # Delete an item from a config store
165
+ # Delete an entry in a config store given a config store ID, and item key.
166
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
167
+ # @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
168
+ # @return [InlineResponse200]
169
+ def delete_config_store_item(opts = {})
170
+ data, _status_code, _headers = delete_config_store_item_with_http_info(opts)
171
+ data
172
+ end
173
+
174
+ # Delete an item from a config store
175
+ # Delete an entry in a config store given a config store ID, and item key.
176
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
177
+ # @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
178
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
179
+ def delete_config_store_item_with_http_info(opts = {})
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.delete_config_store_item ...'
182
+ end
183
+ # unbox the parameters from the hash
184
+ config_store_id = opts[:'config_store_id']
185
+ config_store_item_key = opts[:'config_store_item_key']
186
+ # verify the required parameter 'config_store_id' is set
187
+ if @api_client.config.client_side_validation && config_store_id.nil?
188
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.delete_config_store_item"
189
+ end
190
+ # verify the required parameter 'config_store_item_key' is set
191
+ if @api_client.config.client_side_validation && config_store_item_key.nil?
192
+ fail ArgumentError, "Missing the required parameter 'config_store_item_key' when calling ConfigStoreItemApi.delete_config_store_item"
193
+ end
194
+ # resource path
195
+ local_var_path = '/resources/stores/config/{config_store_id}/item/{config_store_item_key}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s)).sub('{' + 'config_store_item_key' + '}', CGI.escape(config_store_item_key.to_s))
196
+
197
+ # query parameters
198
+ query_params = opts[:query_params] || {}
199
+
200
+ # header parameters
201
+ header_params = opts[:header_params] || {}
202
+ # HTTP header 'Accept' (if needed)
203
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
204
+
205
+ # form parameters
206
+ form_params = opts[:form_params] || {}
207
+
208
+ # http body (model)
209
+ post_body = opts[:debug_body]
210
+
211
+ # return_type
212
+ return_type = opts[:debug_return_type] || 'InlineResponse200'
213
+
214
+ # auth_names
215
+ auth_names = opts[:debug_auth_names] || ['token']
216
+
217
+ new_options = opts.merge(
218
+ :operation => :"ConfigStoreItemApi.delete_config_store_item",
219
+ :header_params => header_params,
220
+ :query_params => query_params,
221
+ :form_params => form_params,
222
+ :body => post_body,
223
+ :auth_names => auth_names,
224
+ :return_type => return_type
225
+ )
226
+
227
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug "API called: ConfigStoreItemApi#delete_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
230
+ end
231
+ return data, status_code, headers
232
+ end
233
+
234
+ # Get an item from a config store
235
+ # Retrieve a config store entry given a config store ID and item key.
236
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
237
+ # @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
238
+ # @return [ConfigStoreItemResponse]
239
+ def get_config_store_item(opts = {})
240
+ data, _status_code, _headers = get_config_store_item_with_http_info(opts)
241
+ data
242
+ end
243
+
244
+ # Get an item from a config store
245
+ # Retrieve a config store entry given a config store ID and item key.
246
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
247
+ # @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
248
+ # @return [Array<(ConfigStoreItemResponse, Integer, Hash)>] ConfigStoreItemResponse data, response status code and response headers
249
+ def get_config_store_item_with_http_info(opts = {})
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.get_config_store_item ...'
252
+ end
253
+ # unbox the parameters from the hash
254
+ config_store_id = opts[:'config_store_id']
255
+ config_store_item_key = opts[:'config_store_item_key']
256
+ # verify the required parameter 'config_store_id' is set
257
+ if @api_client.config.client_side_validation && config_store_id.nil?
258
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.get_config_store_item"
259
+ end
260
+ # verify the required parameter 'config_store_item_key' is set
261
+ if @api_client.config.client_side_validation && config_store_item_key.nil?
262
+ fail ArgumentError, "Missing the required parameter 'config_store_item_key' when calling ConfigStoreItemApi.get_config_store_item"
263
+ end
264
+ # resource path
265
+ local_var_path = '/resources/stores/config/{config_store_id}/item/{config_store_item_key}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s)).sub('{' + 'config_store_item_key' + '}', CGI.escape(config_store_item_key.to_s))
266
+
267
+ # query parameters
268
+ query_params = opts[:query_params] || {}
269
+
270
+ # header parameters
271
+ header_params = opts[:header_params] || {}
272
+ # HTTP header 'Accept' (if needed)
273
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
274
+
275
+ # form parameters
276
+ form_params = opts[:form_params] || {}
277
+
278
+ # http body (model)
279
+ post_body = opts[:debug_body]
280
+
281
+ # return_type
282
+ return_type = opts[:debug_return_type] || 'ConfigStoreItemResponse'
283
+
284
+ # auth_names
285
+ auth_names = opts[:debug_auth_names] || ['token']
286
+
287
+ new_options = opts.merge(
288
+ :operation => :"ConfigStoreItemApi.get_config_store_item",
289
+ :header_params => header_params,
290
+ :query_params => query_params,
291
+ :form_params => form_params,
292
+ :body => post_body,
293
+ :auth_names => auth_names,
294
+ :return_type => return_type
295
+ )
296
+
297
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
298
+ if @api_client.config.debugging
299
+ @api_client.config.logger.debug "API called: ConfigStoreItemApi#get_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
300
+ end
301
+ return data, status_code, headers
302
+ end
303
+
304
+ # List items in a config store
305
+ # List the key-value pairs associated with a given config store ID.
306
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
307
+ # @return [Array<ConfigStoreItemResponse>]
308
+ def list_config_store_items(opts = {})
309
+ data, _status_code, _headers = list_config_store_items_with_http_info(opts)
310
+ data
311
+ end
312
+
313
+ # List items in a config store
314
+ # List the key-value pairs associated with a given config store ID.
315
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
316
+ # @return [Array<(Array<ConfigStoreItemResponse>, Integer, Hash)>] Array<ConfigStoreItemResponse> data, response status code and response headers
317
+ def list_config_store_items_with_http_info(opts = {})
318
+ if @api_client.config.debugging
319
+ @api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.list_config_store_items ...'
320
+ end
321
+ # unbox the parameters from the hash
322
+ config_store_id = opts[:'config_store_id']
323
+ # verify the required parameter 'config_store_id' is set
324
+ if @api_client.config.client_side_validation && config_store_id.nil?
325
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.list_config_store_items"
326
+ end
327
+ # resource path
328
+ local_var_path = '/resources/stores/config/{config_store_id}/items'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
329
+
330
+ # query parameters
331
+ query_params = opts[:query_params] || {}
332
+
333
+ # header parameters
334
+ header_params = opts[:header_params] || {}
335
+ # HTTP header 'Accept' (if needed)
336
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
337
+
338
+ # form parameters
339
+ form_params = opts[:form_params] || {}
340
+
341
+ # http body (model)
342
+ post_body = opts[:debug_body]
343
+
344
+ # return_type
345
+ return_type = opts[:debug_return_type] || 'Array<ConfigStoreItemResponse>'
346
+
347
+ # auth_names
348
+ auth_names = opts[:debug_auth_names] || ['token']
349
+
350
+ new_options = opts.merge(
351
+ :operation => :"ConfigStoreItemApi.list_config_store_items",
352
+ :header_params => header_params,
353
+ :query_params => query_params,
354
+ :form_params => form_params,
355
+ :body => post_body,
356
+ :auth_names => auth_names,
357
+ :return_type => return_type
358
+ )
359
+
360
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug "API called: ConfigStoreItemApi#list_config_store_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
363
+ end
364
+ return data, status_code, headers
365
+ end
366
+
367
+ # Update an entry in a config store
368
+ # Update an entry in a config store given a config store ID, item key, and item value.
369
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
370
+ # @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
371
+ # @option opts [String] :item_key Item key, maximum 256 characters.
372
+ # @option opts [String] :item_value Item value, maximum 8000 characters.
373
+ # @return [ConfigStoreItemResponse]
374
+ def update_config_store_item(opts = {})
375
+ data, _status_code, _headers = update_config_store_item_with_http_info(opts)
376
+ data
377
+ end
378
+
379
+ # Update an entry in a config store
380
+ # Update an entry in a config store given a config store ID, item key, and item value.
381
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
382
+ # @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
383
+ # @option opts [String] :item_key Item key, maximum 256 characters.
384
+ # @option opts [String] :item_value Item value, maximum 8000 characters.
385
+ # @return [Array<(ConfigStoreItemResponse, Integer, Hash)>] ConfigStoreItemResponse data, response status code and response headers
386
+ def update_config_store_item_with_http_info(opts = {})
387
+ if @api_client.config.debugging
388
+ @api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.update_config_store_item ...'
389
+ end
390
+ # unbox the parameters from the hash
391
+ config_store_id = opts[:'config_store_id']
392
+ config_store_item_key = opts[:'config_store_item_key']
393
+ # verify the required parameter 'config_store_id' is set
394
+ if @api_client.config.client_side_validation && config_store_id.nil?
395
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.update_config_store_item"
396
+ end
397
+ # verify the required parameter 'config_store_item_key' is set
398
+ if @api_client.config.client_side_validation && config_store_item_key.nil?
399
+ fail ArgumentError, "Missing the required parameter 'config_store_item_key' when calling ConfigStoreItemApi.update_config_store_item"
400
+ end
401
+ # resource path
402
+ local_var_path = '/resources/stores/config/{config_store_id}/item/{config_store_item_key}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s)).sub('{' + 'config_store_item_key' + '}', CGI.escape(config_store_item_key.to_s))
403
+
404
+ # query parameters
405
+ query_params = opts[:query_params] || {}
406
+
407
+ # header parameters
408
+ header_params = opts[:header_params] || {}
409
+ # HTTP header 'Accept' (if needed)
410
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
411
+ # HTTP header 'Content-Type'
412
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
413
+ if !content_type.nil?
414
+ header_params['Content-Type'] = content_type
415
+ end
416
+
417
+ # form parameters
418
+ form_params = opts[:form_params] || {}
419
+ form_params['item_key'] = opts[:'item_key'] if !opts[:'item_key'].nil?
420
+ form_params['item_value'] = opts[:'item_value'] if !opts[:'item_value'].nil?
421
+
422
+ # http body (model)
423
+ post_body = opts[:debug_body]
424
+
425
+ # return_type
426
+ return_type = opts[:debug_return_type] || 'ConfigStoreItemResponse'
427
+
428
+ # auth_names
429
+ auth_names = opts[:debug_auth_names] || ['token']
430
+
431
+ new_options = opts.merge(
432
+ :operation => :"ConfigStoreItemApi.update_config_store_item",
433
+ :header_params => header_params,
434
+ :query_params => query_params,
435
+ :form_params => form_params,
436
+ :body => post_body,
437
+ :auth_names => auth_names,
438
+ :return_type => return_type
439
+ )
440
+
441
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
442
+ if @api_client.config.debugging
443
+ @api_client.config.logger.debug "API called: ConfigStoreItemApi#update_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
444
+ end
445
+ return data, status_code, headers
446
+ end
447
+
448
+ # Insert or update an entry in a config store
449
+ # Insert or update an entry in a config store given a config store ID, item key, and item value.
450
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
451
+ # @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
452
+ # @option opts [String] :item_key Item key, maximum 256 characters.
453
+ # @option opts [String] :item_value Item value, maximum 8000 characters.
454
+ # @return [ConfigStoreItemResponse]
455
+ def upsert_config_store_item(opts = {})
456
+ data, _status_code, _headers = upsert_config_store_item_with_http_info(opts)
457
+ data
458
+ end
459
+
460
+ # Insert or update an entry in a config store
461
+ # Insert or update an entry in a config store given a config store ID, item key, and item value.
462
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
463
+ # @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
464
+ # @option opts [String] :item_key Item key, maximum 256 characters.
465
+ # @option opts [String] :item_value Item value, maximum 8000 characters.
466
+ # @return [Array<(ConfigStoreItemResponse, Integer, Hash)>] ConfigStoreItemResponse data, response status code and response headers
467
+ def upsert_config_store_item_with_http_info(opts = {})
468
+ if @api_client.config.debugging
469
+ @api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.upsert_config_store_item ...'
470
+ end
471
+ # unbox the parameters from the hash
472
+ config_store_id = opts[:'config_store_id']
473
+ config_store_item_key = opts[:'config_store_item_key']
474
+ # verify the required parameter 'config_store_id' is set
475
+ if @api_client.config.client_side_validation && config_store_id.nil?
476
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.upsert_config_store_item"
477
+ end
478
+ # verify the required parameter 'config_store_item_key' is set
479
+ if @api_client.config.client_side_validation && config_store_item_key.nil?
480
+ fail ArgumentError, "Missing the required parameter 'config_store_item_key' when calling ConfigStoreItemApi.upsert_config_store_item"
481
+ end
482
+ # resource path
483
+ local_var_path = '/resources/stores/config/{config_store_id}/item/{config_store_item_key}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s)).sub('{' + 'config_store_item_key' + '}', CGI.escape(config_store_item_key.to_s))
484
+
485
+ # query parameters
486
+ query_params = opts[:query_params] || {}
487
+
488
+ # header parameters
489
+ header_params = opts[:header_params] || {}
490
+ # HTTP header 'Accept' (if needed)
491
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
492
+ # HTTP header 'Content-Type'
493
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
494
+ if !content_type.nil?
495
+ header_params['Content-Type'] = content_type
496
+ end
497
+
498
+ # form parameters
499
+ form_params = opts[:form_params] || {}
500
+ form_params['item_key'] = opts[:'item_key'] if !opts[:'item_key'].nil?
501
+ form_params['item_value'] = opts[:'item_value'] if !opts[:'item_value'].nil?
502
+
503
+ # http body (model)
504
+ post_body = opts[:debug_body]
505
+
506
+ # return_type
507
+ return_type = opts[:debug_return_type] || 'ConfigStoreItemResponse'
508
+
509
+ # auth_names
510
+ auth_names = opts[:debug_auth_names] || ['token']
511
+
512
+ new_options = opts.merge(
513
+ :operation => :"ConfigStoreItemApi.upsert_config_store_item",
514
+ :header_params => header_params,
515
+ :query_params => query_params,
516
+ :form_params => form_params,
517
+ :body => post_body,
518
+ :auth_names => auth_names,
519
+ :return_type => return_type
520
+ )
521
+
522
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
523
+ if @api_client.config.debugging
524
+ @api_client.config.logger.debug "API called: ConfigStoreItemApi#upsert_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
525
+ end
526
+ return data, status_code, headers
527
+ end
528
+ end
529
+ end