fastly 4.2.0 → 4.4.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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -5
  3. data/Gemfile.lock +1 -1
  4. data/README.md +87 -8
  5. data/docs/AclEntryApi.md +1 -1
  6. data/docs/DomainOwnershipsApi.md +47 -0
  7. data/docs/InlineResponse2002.md +1 -2
  8. data/docs/InlineResponse2003.md +11 -0
  9. data/docs/{InlineResponse2002Meta.md → InlineResponse2003Meta.md} +1 -1
  10. data/docs/{ErrorResponseData.md → InlineResponse2004.md} +3 -3
  11. data/docs/{ErrorResponse.md → InlineResponse2004Meta.md} +3 -2
  12. data/docs/ObjectStoreApi.md +6 -2
  13. data/docs/ObjectStoreItemApi.md +195 -0
  14. data/docs/RealtimeMeasurements.md +6 -0
  15. data/docs/Results.md +6 -0
  16. data/lib/fastly/api/acl_entry_api.rb +2 -2
  17. data/lib/fastly/api/{tls_csrs_api.rb → domain_ownerships_api.rb} +17 -24
  18. data/lib/fastly/api/object_store_api.rb +9 -3
  19. data/lib/fastly/api/object_store_item_api.rb +331 -0
  20. data/lib/fastly/api/purge_api.rb +1 -1
  21. data/lib/fastly/models/inline_response2002.rb +8 -18
  22. data/lib/fastly/models/{tls_csr_response.rb → inline_response2003.rb} +19 -8
  23. data/lib/fastly/models/{inline_response2002_meta.rb → inline_response2003_meta.rb} +3 -3
  24. data/lib/fastly/models/{tls_csr.rb → inline_response2004.rb} +19 -8
  25. data/lib/fastly/models/{error_response_data.rb → inline_response2004_meta.rb} +16 -16
  26. data/lib/fastly/models/realtime_measurements.rb +64 -4
  27. data/lib/fastly/models/results.rb +64 -4
  28. data/lib/fastly/version.rb +1 -1
  29. data/lib/fastly.rb +6 -12
  30. data/sig.json +1 -1
  31. metadata +14 -26
  32. data/docs/RelationshipsForTlsCsr.md +0 -10
  33. data/docs/TlsCsr.md +0 -10
  34. data/docs/TlsCsrData.md +0 -12
  35. data/docs/TlsCsrDataAttributes.md +0 -19
  36. data/docs/TlsCsrResponse.md +0 -10
  37. data/docs/TlsCsrResponseAttributes.md +0 -10
  38. data/docs/TlsCsrResponseData.md +0 -13
  39. data/docs/TlsCsrsApi.md +0 -52
  40. data/docs/TypeTlsCsr.md +0 -9
  41. data/lib/fastly/models/error_response.rb +0 -218
  42. data/lib/fastly/models/relationships_for_tls_csr.rb +0 -235
  43. data/lib/fastly/models/tls_csr_data.rb +0 -236
  44. data/lib/fastly/models/tls_csr_data_attributes.rb +0 -314
  45. data/lib/fastly/models/tls_csr_response_attributes.rb +0 -217
  46. data/lib/fastly/models/tls_csr_response_data.rb +0 -245
  47. data/lib/fastly/models/type_tls_csr.rb +0 -34
@@ -11,32 +11,30 @@ Contact: oss@fastly.com
11
11
  require 'cgi'
12
12
 
13
13
  module Fastly
14
- class TlsCsrsApi
14
+ class DomainOwnershipsApi
15
15
  attr_accessor :api_client
16
16
 
17
17
  def initialize(api_client = ApiClient.default)
18
18
  @api_client = api_client
19
19
  end
20
- # Create CSR
21
- # Creates a certificate signing request (CSR).
22
- # @option opts [TlsCsr] :tls_csr
23
- # @return [TlsCsrResponse]
24
- def create_csr(opts = {})
25
- data, _status_code, _headers = create_csr_with_http_info(opts)
20
+ # List domain-ownerships
21
+ # List all domain-ownerships.
22
+ # @return [InlineResponse2002]
23
+ def list_domain_ownerships(opts = {})
24
+ data, _status_code, _headers = list_domain_ownerships_with_http_info(opts)
26
25
  data
27
26
  end
28
27
 
29
- # Create CSR
30
- # Creates a certificate signing request (CSR).
31
- # @option opts [TlsCsr] :tls_csr
32
- # @return [Array<(TlsCsrResponse, Integer, Hash)>] TlsCsrResponse data, response status code and response headers
33
- def create_csr_with_http_info(opts = {})
28
+ # List domain-ownerships
29
+ # List all domain-ownerships.
30
+ # @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
31
+ def list_domain_ownerships_with_http_info(opts = {})
34
32
  if @api_client.config.debugging
35
- @api_client.config.logger.debug 'Calling API: TlsCsrsApi.create_csr ...'
33
+ @api_client.config.logger.debug 'Calling API: DomainOwnershipsApi.list_domain_ownerships ...'
36
34
  end
37
35
  # unbox the parameters from the hash
38
36
  # resource path
39
- local_var_path = '/tls/certificate_signing_requests'
37
+ local_var_path = '/domain-ownerships'
40
38
 
41
39
  # query parameters
42
40
  query_params = opts[:query_params] || {}
@@ -45,26 +43,21 @@ module Fastly
45
43
  header_params = opts[:header_params] || {}
46
44
  # HTTP header 'Accept' (if needed)
47
45
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
48
- # HTTP header 'Content-Type'
49
- content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
50
- if !content_type.nil?
51
- header_params['Content-Type'] = content_type
52
- end
53
46
 
54
47
  # form parameters
55
48
  form_params = opts[:form_params] || {}
56
49
 
57
50
  # http body (model)
58
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'tls_csr'])
51
+ post_body = opts[:debug_body]
59
52
 
60
53
  # return_type
61
- return_type = opts[:debug_return_type] || 'TlsCsrResponse'
54
+ return_type = opts[:debug_return_type] || 'InlineResponse2002'
62
55
 
63
56
  # auth_names
64
57
  auth_names = opts[:debug_auth_names] || ['token']
65
58
 
66
59
  new_options = opts.merge(
67
- :operation => :"TlsCsrsApi.create_csr",
60
+ :operation => :"DomainOwnershipsApi.list_domain_ownerships",
68
61
  :header_params => header_params,
69
62
  :query_params => query_params,
70
63
  :form_params => form_params,
@@ -73,9 +66,9 @@ module Fastly
73
66
  :return_type => return_type
74
67
  )
75
68
 
76
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
69
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
77
70
  if @api_client.config.debugging
78
- @api_client.config.logger.debug "API called: TlsCsrsApi#create_csr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
71
+ @api_client.config.logger.debug "API called: DomainOwnershipsApi#list_domain_ownerships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
72
  end
80
73
  return data, status_code, headers
81
74
  end
@@ -19,6 +19,7 @@ module Fastly
19
19
  end
20
20
  # Create an object store.
21
21
  # Create a new object store.
22
+ # @option opts [String] :location
22
23
  # @option opts [Store] :store
23
24
  # @return [StoreResponse]
24
25
  def create_store(opts = {})
@@ -28,6 +29,7 @@ module Fastly
28
29
 
29
30
  # Create an object store.
30
31
  # Create a new object store.
32
+ # @option opts [String] :location
31
33
  # @option opts [Store] :store
32
34
  # @return [Array<(StoreResponse, Integer, Hash)>] StoreResponse data, response status code and response headers
33
35
  def create_store_with_http_info(opts = {})
@@ -40,6 +42,7 @@ module Fastly
40
42
 
41
43
  # query parameters
42
44
  query_params = opts[:query_params] || {}
45
+ query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
43
46
 
44
47
  # header parameters
45
48
  header_params = opts[:header_params] || {}
@@ -83,6 +86,7 @@ module Fastly
83
86
  # Delete an object store.
84
87
  # An object store must be empty before it can be deleted. Deleting an object store that still contains keys will result in a `409` (Conflict).
85
88
  # @option opts [String] :store_id (required)
89
+ # @option opts [Boolean] :force
86
90
  # @return [nil]
87
91
  def delete_store(opts = {})
88
92
  delete_store_with_http_info(opts)
@@ -92,6 +96,7 @@ module Fastly
92
96
  # Delete an object store.
93
97
  # An object store must be empty before it can be deleted. Deleting an object store that still contains keys will result in a &#x60;409&#x60; (Conflict).
94
98
  # @option opts [String] :store_id (required)
99
+ # @option opts [Boolean] :force
95
100
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
96
101
  def delete_store_with_http_info(opts = {})
97
102
  if @api_client.config.debugging
@@ -111,6 +116,7 @@ module Fastly
111
116
 
112
117
  # header parameters
113
118
  header_params = opts[:header_params] || {}
119
+ header_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
114
120
 
115
121
  # form parameters
116
122
  form_params = opts[:form_params] || {}
@@ -208,7 +214,7 @@ module Fastly
208
214
  # Get all stores for a given customer.
209
215
  # @option opts [String] :cursor
210
216
  # @option opts [Integer] :limit (default to 100)
211
- # @return [InlineResponse2002]
217
+ # @return [InlineResponse2003]
212
218
  def get_stores(opts = {})
213
219
  data, _status_code, _headers = get_stores_with_http_info(opts)
214
220
  data
@@ -218,7 +224,7 @@ module Fastly
218
224
  # Get all stores for a given customer.
219
225
  # @option opts [String] :cursor
220
226
  # @option opts [Integer] :limit (default to 100)
221
- # @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
227
+ # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
222
228
  def get_stores_with_http_info(opts = {})
223
229
  if @api_client.config.debugging
224
230
  @api_client.config.logger.debug 'Calling API: ObjectStoreApi.get_stores ...'
@@ -244,7 +250,7 @@ module Fastly
244
250
  post_body = opts[:debug_body]
245
251
 
246
252
  # return_type
247
- return_type = opts[:debug_return_type] || 'InlineResponse2002'
253
+ return_type = opts[:debug_return_type] || 'InlineResponse2003'
248
254
 
249
255
  # auth_names
250
256
  auth_names = opts[:debug_auth_names] || ['token']
@@ -0,0 +1,331 @@
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 ObjectStoreItemApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Delete object store item.
21
+ # Delete an item from an object store
22
+ # @option opts [String] :store_id (required)
23
+ # @option opts [String] :key_name (required)
24
+ # @option opts [Boolean] :force
25
+ # @return [nil]
26
+ def delete_key_from_store(opts = {})
27
+ delete_key_from_store_with_http_info(opts)
28
+ nil
29
+ end
30
+
31
+ # Delete object store item.
32
+ # Delete an item from an object store
33
+ # @option opts [String] :store_id (required)
34
+ # @option opts [String] :key_name (required)
35
+ # @option opts [Boolean] :force
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def delete_key_from_store_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ObjectStoreItemApi.delete_key_from_store ...'
40
+ end
41
+ # unbox the parameters from the hash
42
+ store_id = opts[:'store_id']
43
+ key_name = opts[:'key_name']
44
+ # verify the required parameter 'store_id' is set
45
+ if @api_client.config.client_side_validation && store_id.nil?
46
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreItemApi.delete_key_from_store"
47
+ end
48
+ # verify the required parameter 'key_name' is set
49
+ if @api_client.config.client_side_validation && key_name.nil?
50
+ fail ArgumentError, "Missing the required parameter 'key_name' when calling ObjectStoreItemApi.delete_key_from_store"
51
+ end
52
+ # resource path
53
+ local_var_path = '/resources/stores/object/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
54
+
55
+ # query parameters
56
+ query_params = opts[:query_params] || {}
57
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body]
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type]
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['token']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"ObjectStoreItemApi.delete_key_from_store",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: ObjectStoreItemApi#delete_key_from_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ # List object store keys.
92
+ # List the keys of all items within an object store.
93
+ # @option opts [String] :store_id (required)
94
+ # @option opts [String] :cursor
95
+ # @option opts [Integer] :limit (default to 100)
96
+ # @option opts [String] :prefix
97
+ # @return [InlineResponse2004]
98
+ def get_keys(opts = {})
99
+ data, _status_code, _headers = get_keys_with_http_info(opts)
100
+ data
101
+ end
102
+
103
+ # List object store keys.
104
+ # List the keys of all items within an object store.
105
+ # @option opts [String] :store_id (required)
106
+ # @option opts [String] :cursor
107
+ # @option opts [Integer] :limit (default to 100)
108
+ # @option opts [String] :prefix
109
+ # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
110
+ def get_keys_with_http_info(opts = {})
111
+ if @api_client.config.debugging
112
+ @api_client.config.logger.debug 'Calling API: ObjectStoreItemApi.get_keys ...'
113
+ end
114
+ # unbox the parameters from the hash
115
+ store_id = opts[:'store_id']
116
+ # verify the required parameter 'store_id' is set
117
+ if @api_client.config.client_side_validation && store_id.nil?
118
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreItemApi.get_keys"
119
+ end
120
+ # resource path
121
+ local_var_path = '/resources/stores/object/{store_id}/keys'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
122
+
123
+ # query parameters
124
+ query_params = opts[:query_params] || {}
125
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
126
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
127
+ query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?
128
+
129
+ # header parameters
130
+ header_params = opts[:header_params] || {}
131
+ # HTTP header 'Accept' (if needed)
132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
133
+
134
+ # form parameters
135
+ form_params = opts[:form_params] || {}
136
+
137
+ # http body (model)
138
+ post_body = opts[:debug_body]
139
+
140
+ # return_type
141
+ return_type = opts[:debug_return_type] || 'InlineResponse2004'
142
+
143
+ # auth_names
144
+ auth_names = opts[:debug_auth_names] || ['token']
145
+
146
+ new_options = opts.merge(
147
+ :operation => :"ObjectStoreItemApi.get_keys",
148
+ :header_params => header_params,
149
+ :query_params => query_params,
150
+ :form_params => form_params,
151
+ :body => post_body,
152
+ :auth_names => auth_names,
153
+ :return_type => return_type
154
+ )
155
+
156
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug "API called: ObjectStoreItemApi#get_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
159
+ end
160
+ return data, status_code, headers
161
+ end
162
+
163
+ # Get the value of an object store item
164
+ # Get the value associated with a key.
165
+ # @option opts [String] :store_id (required)
166
+ # @option opts [String] :key_name (required)
167
+ # @return [String]
168
+ def get_value_for_key(opts = {})
169
+ data, _status_code, _headers = get_value_for_key_with_http_info(opts)
170
+ data
171
+ end
172
+
173
+ # Get the value of an object store item
174
+ # Get the value associated with a key.
175
+ # @option opts [String] :store_id (required)
176
+ # @option opts [String] :key_name (required)
177
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
178
+ def get_value_for_key_with_http_info(opts = {})
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug 'Calling API: ObjectStoreItemApi.get_value_for_key ...'
181
+ end
182
+ # unbox the parameters from the hash
183
+ store_id = opts[:'store_id']
184
+ key_name = opts[:'key_name']
185
+ # verify the required parameter 'store_id' is set
186
+ if @api_client.config.client_side_validation && store_id.nil?
187
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreItemApi.get_value_for_key"
188
+ end
189
+ # verify the required parameter 'key_name' is set
190
+ if @api_client.config.client_side_validation && key_name.nil?
191
+ fail ArgumentError, "Missing the required parameter 'key_name' when calling ObjectStoreItemApi.get_value_for_key"
192
+ end
193
+ # resource path
194
+ local_var_path = '/resources/stores/object/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
195
+
196
+ # query parameters
197
+ query_params = opts[:query_params] || {}
198
+
199
+ # header parameters
200
+ header_params = opts[:header_params] || {}
201
+ # HTTP header 'Accept' (if needed)
202
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
203
+
204
+ # form parameters
205
+ form_params = opts[:form_params] || {}
206
+
207
+ # http body (model)
208
+ post_body = opts[:debug_body]
209
+
210
+ # return_type
211
+ return_type = opts[:debug_return_type] || 'String'
212
+
213
+ # auth_names
214
+ auth_names = opts[:debug_auth_names] || ['token']
215
+
216
+ new_options = opts.merge(
217
+ :operation => :"ObjectStoreItemApi.get_value_for_key",
218
+ :header_params => header_params,
219
+ :query_params => query_params,
220
+ :form_params => form_params,
221
+ :body => post_body,
222
+ :auth_names => auth_names,
223
+ :return_type => return_type
224
+ )
225
+
226
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug "API called: ObjectStoreItemApi#get_value_for_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
229
+ end
230
+ return data, status_code, headers
231
+ end
232
+
233
+ # Insert an item into an object store
234
+ # Set a new value for a new or existing key in an object store.
235
+ # @option opts [String] :store_id (required)
236
+ # @option opts [String] :key_name (required)
237
+ # @option opts [Integer] :if_generation_match
238
+ # @option opts [Integer] :time_to_live_sec
239
+ # @option opts [String] :metadata
240
+ # @option opts [Boolean] :add
241
+ # @option opts [Boolean] :append
242
+ # @option opts [Boolean] :prepend
243
+ # @option opts [Boolean] :background_fetch
244
+ # @option opts [String] :body
245
+ # @return [String]
246
+ def set_value_for_key(opts = {})
247
+ data, _status_code, _headers = set_value_for_key_with_http_info(opts)
248
+ data
249
+ end
250
+
251
+ # Insert an item into an object store
252
+ # Set a new value for a new or existing key in an object store.
253
+ # @option opts [String] :store_id (required)
254
+ # @option opts [String] :key_name (required)
255
+ # @option opts [Integer] :if_generation_match
256
+ # @option opts [Integer] :time_to_live_sec
257
+ # @option opts [String] :metadata
258
+ # @option opts [Boolean] :add
259
+ # @option opts [Boolean] :append
260
+ # @option opts [Boolean] :prepend
261
+ # @option opts [Boolean] :background_fetch
262
+ # @option opts [String] :body
263
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
264
+ def set_value_for_key_with_http_info(opts = {})
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug 'Calling API: ObjectStoreItemApi.set_value_for_key ...'
267
+ end
268
+ # unbox the parameters from the hash
269
+ store_id = opts[:'store_id']
270
+ key_name = opts[:'key_name']
271
+ # verify the required parameter 'store_id' is set
272
+ if @api_client.config.client_side_validation && store_id.nil?
273
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreItemApi.set_value_for_key"
274
+ end
275
+ # verify the required parameter 'key_name' is set
276
+ if @api_client.config.client_side_validation && key_name.nil?
277
+ fail ArgumentError, "Missing the required parameter 'key_name' when calling ObjectStoreItemApi.set_value_for_key"
278
+ end
279
+ # resource path
280
+ local_var_path = '/resources/stores/object/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
281
+
282
+ # query parameters
283
+ query_params = opts[:query_params] || {}
284
+ query_params[:'add'] = opts[:'add'] if !opts[:'add'].nil?
285
+ query_params[:'append'] = opts[:'append'] if !opts[:'append'].nil?
286
+ query_params[:'prepend'] = opts[:'prepend'] if !opts[:'prepend'].nil?
287
+ query_params[:'background_fetch'] = opts[:'background_fetch'] if !opts[:'background_fetch'].nil?
288
+
289
+ # header parameters
290
+ header_params = opts[:header_params] || {}
291
+ # HTTP header 'Accept' (if needed)
292
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
293
+ # HTTP header 'Content-Type'
294
+ content_type = @api_client.select_header_content_type(['application/octet-stream'])
295
+ if !content_type.nil?
296
+ header_params['Content-Type'] = content_type
297
+ end
298
+ header_params[:'if-generation-match'] = opts[:'if_generation_match'] if !opts[:'if_generation_match'].nil?
299
+ header_params[:'time_to_live_sec'] = opts[:'time_to_live_sec'] if !opts[:'time_to_live_sec'].nil?
300
+ header_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].nil?
301
+
302
+ # form parameters
303
+ form_params = opts[:form_params] || {}
304
+
305
+ # http body (model)
306
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
307
+
308
+ # return_type
309
+ return_type = opts[:debug_return_type] || 'String'
310
+
311
+ # auth_names
312
+ auth_names = opts[:debug_auth_names] || ['token']
313
+
314
+ new_options = opts.merge(
315
+ :operation => :"ObjectStoreItemApi.set_value_for_key",
316
+ :header_params => header_params,
317
+ :query_params => query_params,
318
+ :form_params => form_params,
319
+ :body => post_body,
320
+ :auth_names => auth_names,
321
+ :return_type => return_type
322
+ )
323
+
324
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
325
+ if @api_client.config.debugging
326
+ @api_client.config.logger.debug "API called: ObjectStoreItemApi#set_value_for_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
327
+ end
328
+ return data, status_code, headers
329
+ end
330
+ end
331
+ end
@@ -182,7 +182,7 @@ module Fastly
182
182
  fail ArgumentError, "Missing the required parameter 'cached_url' when calling PurgeApi.purge_single_url"
183
183
  end
184
184
  # resource path
185
- local_var_path = '/purge/{cached_url}'.sub('{' + 'cached_url' + '}', CGI.escape(cached_url.to_s))
185
+ local_var_path = '/purge/{cached_url}'.sub('{' + 'cached_url' + '}', cached_url.to_s)
186
186
 
187
187
  # query parameters
188
188
  query_params = opts[:query_params] || {}
@@ -13,15 +13,13 @@ require 'time'
13
13
 
14
14
  module Fastly
15
15
  class InlineResponse2002
16
- attr_accessor :data
17
-
18
- attr_accessor :meta
16
+ # Time-stamp (GMT) when the domain_ownership validation will expire.
17
+ attr_accessor :expires_at
19
18
 
20
19
  # Attribute mapping from ruby-style variable name to JSON key.
21
20
  def self.attribute_map
22
21
  {
23
- :'data' => :'data',
24
- :'meta' => :'meta'
22
+ :'expires_at' => :'expires_at'
25
23
  }
26
24
  end
27
25
 
@@ -33,8 +31,7 @@ module Fastly
33
31
  # Attribute type mapping.
34
32
  def self.fastly_types
35
33
  {
36
- :'data' => :'Array<StoreResponse>',
37
- :'meta' => :'InlineResponse2002Meta'
34
+ :'expires_at' => :'String'
38
35
  }
39
36
  end
40
37
 
@@ -59,14 +56,8 @@ module Fastly
59
56
  h[k.to_sym] = v
60
57
  }
61
58
 
62
- if attributes.key?(:'data')
63
- if (value = attributes[:'data']).is_a?(Array)
64
- self.data = value
65
- end
66
- end
67
-
68
- if attributes.key?(:'meta')
69
- self.meta = attributes[:'meta']
59
+ if attributes.key?(:'expires_at')
60
+ self.expires_at = attributes[:'expires_at']
70
61
  end
71
62
  end
72
63
 
@@ -88,8 +79,7 @@ module Fastly
88
79
  def ==(o)
89
80
  return true if self.equal?(o)
90
81
  self.class == o.class &&
91
- data == o.data &&
92
- meta == o.meta
82
+ expires_at == o.expires_at
93
83
  end
94
84
 
95
85
  # @see the `==` method
@@ -101,7 +91,7 @@ module Fastly
101
91
  # Calculates hash code according to all attributes.
102
92
  # @return [Integer] Hash code
103
93
  def hash
104
- [data, meta].hash
94
+ [expires_at].hash
105
95
  end
106
96
 
107
97
  # Builds the object from hash
@@ -12,13 +12,16 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class TlsCsrResponse
15
+ class InlineResponse2003
16
16
  attr_accessor :data
17
17
 
18
+ attr_accessor :meta
19
+
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
21
- :'data' => :'data'
23
+ :'data' => :'data',
24
+ :'meta' => :'meta'
22
25
  }
23
26
  end
24
27
 
@@ -30,7 +33,8 @@ module Fastly
30
33
  # Attribute type mapping.
31
34
  def self.fastly_types
32
35
  {
33
- :'data' => :'TlsCsrResponseData'
36
+ :'data' => :'Array<StoreResponse>',
37
+ :'meta' => :'InlineResponse2003Meta'
34
38
  }
35
39
  end
36
40
 
@@ -44,19 +48,25 @@ module Fastly
44
48
  # @param [Hash] attributes Model attributes in the form of hash
45
49
  def initialize(attributes = {})
46
50
  if (!attributes.is_a?(Hash))
47
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TlsCsrResponse` initialize method"
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InlineResponse2003` initialize method"
48
52
  end
49
53
 
50
54
  # check to see if the attribute exists and convert string to symbol for hash key
51
55
  attributes = attributes.each_with_object({}) { |(k, v), h|
52
56
  if (!self.class.attribute_map.key?(k.to_sym))
53
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TlsCsrResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InlineResponse2003`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
58
  end
55
59
  h[k.to_sym] = v
56
60
  }
57
61
 
58
62
  if attributes.key?(:'data')
59
- self.data = attributes[:'data']
63
+ if (value = attributes[:'data']).is_a?(Array)
64
+ self.data = value
65
+ end
66
+ end
67
+
68
+ if attributes.key?(:'meta')
69
+ self.meta = attributes[:'meta']
60
70
  end
61
71
  end
62
72
 
@@ -78,7 +88,8 @@ module Fastly
78
88
  def ==(o)
79
89
  return true if self.equal?(o)
80
90
  self.class == o.class &&
81
- data == o.data
91
+ data == o.data &&
92
+ meta == o.meta
82
93
  end
83
94
 
84
95
  # @see the `==` method
@@ -90,7 +101,7 @@ module Fastly
90
101
  # Calculates hash code according to all attributes.
91
102
  # @return [Integer] Hash code
92
103
  def hash
93
- [data].hash
104
+ [data, meta].hash
94
105
  end
95
106
 
96
107
  # Builds the object from hash
@@ -13,7 +13,7 @@ require 'time'
13
13
 
14
14
  module Fastly
15
15
  # Meta for the pagination.
16
- class InlineResponse2002Meta
16
+ class InlineResponse2003Meta
17
17
  # Cursor for the next page.
18
18
  attr_accessor :next_cursor
19
19
 
@@ -51,13 +51,13 @@ module Fastly
51
51
  # @param [Hash] attributes Model attributes in the form of hash
52
52
  def initialize(attributes = {})
53
53
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InlineResponse2002Meta` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InlineResponse2003Meta` initialize method"
55
55
  end
56
56
 
57
57
  # check to see if the attribute exists and convert string to symbol for hash key
58
58
  attributes = attributes.each_with_object({}) { |(k, v), h|
59
59
  if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InlineResponse2002Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InlineResponse2003Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
61
  end
62
62
  h[k.to_sym] = v
63
63
  }