fastly 5.0.0 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,463 @@
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 ConfigStoreApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Create a config store
21
+ # Create a config store.
22
+ # @option opts [String] :name The name of the config store.
23
+ # @return [ConfigStoreResponse]
24
+ def create_config_store(opts = {})
25
+ data, _status_code, _headers = create_config_store_with_http_info(opts)
26
+ data
27
+ end
28
+
29
+ # Create a config store
30
+ # Create a config store.
31
+ # @option opts [String] :name The name of the config store.
32
+ # @return [Array<(ConfigStoreResponse, Integer, Hash)>] ConfigStoreResponse data, response status code and response headers
33
+ def create_config_store_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: ConfigStoreApi.create_config_store ...'
36
+ end
37
+ # unbox the parameters from the hash
38
+ # resource path
39
+ local_var_path = '/resources/stores/config'
40
+
41
+ # query parameters
42
+ query_params = opts[:query_params] || {}
43
+
44
+ # header parameters
45
+ header_params = opts[:header_params] || {}
46
+ # HTTP header 'Accept' (if needed)
47
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
48
+ # HTTP header 'Content-Type'
49
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
50
+ if !content_type.nil?
51
+ header_params['Content-Type'] = content_type
52
+ end
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+ form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
57
+
58
+ # http body (model)
59
+ post_body = opts[:debug_body]
60
+
61
+ # return_type
62
+ return_type = opts[:debug_return_type] || 'ConfigStoreResponse'
63
+
64
+ # auth_names
65
+ auth_names = opts[:debug_auth_names] || ['token']
66
+
67
+ new_options = opts.merge(
68
+ :operation => :"ConfigStoreApi.create_config_store",
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type
75
+ )
76
+
77
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: ConfigStoreApi#create_config_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # Delete a config store
85
+ # Delete a config store.
86
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
87
+ # @return [InlineResponse200]
88
+ def delete_config_store(opts = {})
89
+ data, _status_code, _headers = delete_config_store_with_http_info(opts)
90
+ data
91
+ end
92
+
93
+ # Delete a config store
94
+ # Delete a config store.
95
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
96
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
97
+ def delete_config_store_with_http_info(opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: ConfigStoreApi.delete_config_store ...'
100
+ end
101
+ # unbox the parameters from the hash
102
+ config_store_id = opts[:'config_store_id']
103
+ # verify the required parameter 'config_store_id' is set
104
+ if @api_client.config.client_side_validation && config_store_id.nil?
105
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreApi.delete_config_store"
106
+ end
107
+ # resource path
108
+ local_var_path = '/resources/stores/config/{config_store_id}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
109
+
110
+ # query parameters
111
+ query_params = opts[:query_params] || {}
112
+
113
+ # header parameters
114
+ header_params = opts[:header_params] || {}
115
+ # HTTP header 'Accept' (if needed)
116
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:debug_body]
123
+
124
+ # return_type
125
+ return_type = opts[:debug_return_type] || 'InlineResponse200'
126
+
127
+ # auth_names
128
+ auth_names = opts[:debug_auth_names] || ['token']
129
+
130
+ new_options = opts.merge(
131
+ :operation => :"ConfigStoreApi.delete_config_store",
132
+ :header_params => header_params,
133
+ :query_params => query_params,
134
+ :form_params => form_params,
135
+ :body => post_body,
136
+ :auth_names => auth_names,
137
+ :return_type => return_type
138
+ )
139
+
140
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: ConfigStoreApi#delete_config_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
146
+
147
+ # Describe a config store
148
+ # Describe a config store by its identifier.
149
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
150
+ # @return [ConfigStoreResponse]
151
+ def get_config_store(opts = {})
152
+ data, _status_code, _headers = get_config_store_with_http_info(opts)
153
+ data
154
+ end
155
+
156
+ # Describe a config store
157
+ # Describe a config store by its identifier.
158
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
159
+ # @return [Array<(ConfigStoreResponse, Integer, Hash)>] ConfigStoreResponse data, response status code and response headers
160
+ def get_config_store_with_http_info(opts = {})
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug 'Calling API: ConfigStoreApi.get_config_store ...'
163
+ end
164
+ # unbox the parameters from the hash
165
+ config_store_id = opts[:'config_store_id']
166
+ # verify the required parameter 'config_store_id' is set
167
+ if @api_client.config.client_side_validation && config_store_id.nil?
168
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreApi.get_config_store"
169
+ end
170
+ # resource path
171
+ local_var_path = '/resources/stores/config/{config_store_id}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
172
+
173
+ # query parameters
174
+ query_params = opts[:query_params] || {}
175
+
176
+ # header parameters
177
+ header_params = opts[:header_params] || {}
178
+ # HTTP header 'Accept' (if needed)
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
180
+
181
+ # form parameters
182
+ form_params = opts[:form_params] || {}
183
+
184
+ # http body (model)
185
+ post_body = opts[:debug_body]
186
+
187
+ # return_type
188
+ return_type = opts[:debug_return_type] || 'ConfigStoreResponse'
189
+
190
+ # auth_names
191
+ auth_names = opts[:debug_auth_names] || ['token']
192
+
193
+ new_options = opts.merge(
194
+ :operation => :"ConfigStoreApi.get_config_store",
195
+ :header_params => header_params,
196
+ :query_params => query_params,
197
+ :form_params => form_params,
198
+ :body => post_body,
199
+ :auth_names => auth_names,
200
+ :return_type => return_type
201
+ )
202
+
203
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: ConfigStoreApi#get_config_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ return data, status_code, headers
208
+ end
209
+
210
+ # Get config store metadata
211
+ # Retrieve metadata for a single config store.
212
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
213
+ # @return [ConfigStoreInfoResponse]
214
+ def get_config_store_info(opts = {})
215
+ data, _status_code, _headers = get_config_store_info_with_http_info(opts)
216
+ data
217
+ end
218
+
219
+ # Get config store metadata
220
+ # Retrieve metadata for a single config store.
221
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
222
+ # @return [Array<(ConfigStoreInfoResponse, Integer, Hash)>] ConfigStoreInfoResponse data, response status code and response headers
223
+ def get_config_store_info_with_http_info(opts = {})
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug 'Calling API: ConfigStoreApi.get_config_store_info ...'
226
+ end
227
+ # unbox the parameters from the hash
228
+ config_store_id = opts[:'config_store_id']
229
+ # verify the required parameter 'config_store_id' is set
230
+ if @api_client.config.client_side_validation && config_store_id.nil?
231
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreApi.get_config_store_info"
232
+ end
233
+ # resource path
234
+ local_var_path = '/resources/stores/config/{config_store_id}/info'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
235
+
236
+ # query parameters
237
+ query_params = opts[:query_params] || {}
238
+
239
+ # header parameters
240
+ header_params = opts[:header_params] || {}
241
+ # HTTP header 'Accept' (if needed)
242
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
243
+
244
+ # form parameters
245
+ form_params = opts[:form_params] || {}
246
+
247
+ # http body (model)
248
+ post_body = opts[:debug_body]
249
+
250
+ # return_type
251
+ return_type = opts[:debug_return_type] || 'ConfigStoreInfoResponse'
252
+
253
+ # auth_names
254
+ auth_names = opts[:debug_auth_names] || ['token']
255
+
256
+ new_options = opts.merge(
257
+ :operation => :"ConfigStoreApi.get_config_store_info",
258
+ :header_params => header_params,
259
+ :query_params => query_params,
260
+ :form_params => form_params,
261
+ :body => post_body,
262
+ :auth_names => auth_names,
263
+ :return_type => return_type
264
+ )
265
+
266
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
267
+ if @api_client.config.debugging
268
+ @api_client.config.logger.debug "API called: ConfigStoreApi#get_config_store_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
+ end
270
+ return data, status_code, headers
271
+ end
272
+
273
+ # List linked services
274
+ # List services linked to a config store
275
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
276
+ # @return [Object]
277
+ def list_config_store_services(opts = {})
278
+ data, _status_code, _headers = list_config_store_services_with_http_info(opts)
279
+ data
280
+ end
281
+
282
+ # List linked services
283
+ # List services linked to a config store
284
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
285
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
286
+ def list_config_store_services_with_http_info(opts = {})
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug 'Calling API: ConfigStoreApi.list_config_store_services ...'
289
+ end
290
+ # unbox the parameters from the hash
291
+ config_store_id = opts[:'config_store_id']
292
+ # verify the required parameter 'config_store_id' is set
293
+ if @api_client.config.client_side_validation && config_store_id.nil?
294
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreApi.list_config_store_services"
295
+ end
296
+ # resource path
297
+ local_var_path = '/resources/stores/config/{config_store_id}/services'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
298
+
299
+ # query parameters
300
+ query_params = opts[:query_params] || {}
301
+
302
+ # header parameters
303
+ header_params = opts[:header_params] || {}
304
+ # HTTP header 'Accept' (if needed)
305
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
306
+
307
+ # form parameters
308
+ form_params = opts[:form_params] || {}
309
+
310
+ # http body (model)
311
+ post_body = opts[:debug_body]
312
+
313
+ # return_type
314
+ return_type = opts[:debug_return_type] || 'Object'
315
+
316
+ # auth_names
317
+ auth_names = opts[:debug_auth_names] || ['token']
318
+
319
+ new_options = opts.merge(
320
+ :operation => :"ConfigStoreApi.list_config_store_services",
321
+ :header_params => header_params,
322
+ :query_params => query_params,
323
+ :form_params => form_params,
324
+ :body => post_body,
325
+ :auth_names => auth_names,
326
+ :return_type => return_type
327
+ )
328
+
329
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
330
+ if @api_client.config.debugging
331
+ @api_client.config.logger.debug "API called: ConfigStoreApi#list_config_store_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
332
+ end
333
+ return data, status_code, headers
334
+ end
335
+
336
+ # List config stores
337
+ # List config stores.
338
+ # @return [Array<ConfigStoreResponse>]
339
+ def list_config_stores(opts = {})
340
+ data, _status_code, _headers = list_config_stores_with_http_info(opts)
341
+ data
342
+ end
343
+
344
+ # List config stores
345
+ # List config stores.
346
+ # @return [Array<(Array<ConfigStoreResponse>, Integer, Hash)>] Array<ConfigStoreResponse> data, response status code and response headers
347
+ def list_config_stores_with_http_info(opts = {})
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug 'Calling API: ConfigStoreApi.list_config_stores ...'
350
+ end
351
+ # unbox the parameters from the hash
352
+ # resource path
353
+ local_var_path = '/resources/stores/config'
354
+
355
+ # query parameters
356
+ query_params = opts[:query_params] || {}
357
+
358
+ # header parameters
359
+ header_params = opts[:header_params] || {}
360
+ # HTTP header 'Accept' (if needed)
361
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
362
+
363
+ # form parameters
364
+ form_params = opts[:form_params] || {}
365
+
366
+ # http body (model)
367
+ post_body = opts[:debug_body]
368
+
369
+ # return_type
370
+ return_type = opts[:debug_return_type] || 'Array<ConfigStoreResponse>'
371
+
372
+ # auth_names
373
+ auth_names = opts[:debug_auth_names] || ['token']
374
+
375
+ new_options = opts.merge(
376
+ :operation => :"ConfigStoreApi.list_config_stores",
377
+ :header_params => header_params,
378
+ :query_params => query_params,
379
+ :form_params => form_params,
380
+ :body => post_body,
381
+ :auth_names => auth_names,
382
+ :return_type => return_type
383
+ )
384
+
385
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug "API called: ConfigStoreApi#list_config_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
388
+ end
389
+ return data, status_code, headers
390
+ end
391
+
392
+ # Update a config store
393
+ # Update a config store.
394
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
395
+ # @option opts [String] :name The name of the config store.
396
+ # @return [ConfigStoreResponse]
397
+ def update_config_store(opts = {})
398
+ data, _status_code, _headers = update_config_store_with_http_info(opts)
399
+ data
400
+ end
401
+
402
+ # Update a config store
403
+ # Update a config store.
404
+ # @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
405
+ # @option opts [String] :name The name of the config store.
406
+ # @return [Array<(ConfigStoreResponse, Integer, Hash)>] ConfigStoreResponse data, response status code and response headers
407
+ def update_config_store_with_http_info(opts = {})
408
+ if @api_client.config.debugging
409
+ @api_client.config.logger.debug 'Calling API: ConfigStoreApi.update_config_store ...'
410
+ end
411
+ # unbox the parameters from the hash
412
+ config_store_id = opts[:'config_store_id']
413
+ # verify the required parameter 'config_store_id' is set
414
+ if @api_client.config.client_side_validation && config_store_id.nil?
415
+ fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreApi.update_config_store"
416
+ end
417
+ # resource path
418
+ local_var_path = '/resources/stores/config/{config_store_id}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
419
+
420
+ # query parameters
421
+ query_params = opts[:query_params] || {}
422
+
423
+ # header parameters
424
+ header_params = opts[:header_params] || {}
425
+ # HTTP header 'Accept' (if needed)
426
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
427
+ # HTTP header 'Content-Type'
428
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
429
+ if !content_type.nil?
430
+ header_params['Content-Type'] = content_type
431
+ end
432
+
433
+ # form parameters
434
+ form_params = opts[:form_params] || {}
435
+ form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
436
+
437
+ # http body (model)
438
+ post_body = opts[:debug_body]
439
+
440
+ # return_type
441
+ return_type = opts[:debug_return_type] || 'ConfigStoreResponse'
442
+
443
+ # auth_names
444
+ auth_names = opts[:debug_auth_names] || ['token']
445
+
446
+ new_options = opts.merge(
447
+ :operation => :"ConfigStoreApi.update_config_store",
448
+ :header_params => header_params,
449
+ :query_params => query_params,
450
+ :form_params => form_params,
451
+ :body => post_body,
452
+ :auth_names => auth_names,
453
+ :return_type => return_type
454
+ )
455
+
456
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
457
+ if @api_client.config.debugging
458
+ @api_client.config.logger.debug "API called: ConfigStoreApi#update_config_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
459
+ end
460
+ return data, status_code, headers
461
+ end
462
+ end
463
+ end