fastly 4.1.0 → 4.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/Gemfile.lock +1 -1
- data/README.md +93 -11
- data/docs/Backend.md +1 -1
- data/docs/BackendApi.md +4 -4
- data/docs/BackendResponse.md +1 -1
- data/docs/DomainOwnershipsApi.md +47 -0
- data/docs/EnabledProductResponse.md +12 -0
- data/docs/EnabledProductResponseLinks.md +11 -0
- data/docs/{EnabledProductProduct.md → EnabledProductResponseProduct.md} +3 -3
- data/docs/EnabledProductResponseService.md +11 -0
- data/docs/EnabledProductsApi.md +7 -7
- data/docs/EventsApi.md +2 -0
- data/docs/HistoricalApi.md +10 -10
- data/docs/{EnabledProductLinks.md → InlineResponse2002.md} +2 -3
- data/docs/{GetStoresResponse.md → InlineResponse2003.md} +2 -2
- data/docs/{GetStoresResponseMeta.md → InlineResponse2003Meta.md} +1 -1
- data/docs/{KeyResponse.md → InlineResponse2004.md} +2 -2
- data/docs/{ResourceCreateAllOf.md → InlineResponse2004Meta.md} +3 -2
- data/docs/ObjectStoreApi.md +3 -166
- data/docs/ObjectStoreItemApi.md +177 -0
- data/docs/Pop.md +7 -4
- data/docs/PopCoordinates.md +2 -4
- data/docs/RealtimeMeasurements.md +10 -2
- data/docs/Resource.md +2 -1
- data/docs/ResourceApi.md +34 -32
- data/docs/ResourceResponse.md +3 -3
- data/docs/ResourceResponseAllOf.md +1 -1
- data/docs/Results.md +11 -3
- data/docs/TlsSubscriptionResponseAttributes.md +1 -1
- data/docs/TlsSubscriptionResponseAttributesAllOf.md +1 -1
- data/docs/TlsSubscriptionsApi.md +3 -3
- data/lib/fastly/api/backend_api.rb +4 -4
- data/lib/fastly/api/domain_ownerships_api.rb +76 -0
- data/lib/fastly/api/enabled_products_api.rb +12 -12
- data/lib/fastly/api/events_api.rb +3 -0
- data/lib/fastly/api/historical_api.rb +10 -10
- data/lib/fastly/api/object_store_api.rb +5 -289
- data/lib/fastly/api/object_store_item_api.rb +304 -0
- data/lib/fastly/api/purge_api.rb +2 -2
- data/lib/fastly/api/resource_api.rb +51 -48
- data/lib/fastly/api/tls_subscriptions_api.rb +4 -4
- data/lib/fastly/models/backend.rb +1 -1
- data/lib/fastly/models/backend_response.rb +1 -1
- data/lib/fastly/models/{enabled_product.rb → enabled_product_response.rb} +6 -6
- data/lib/fastly/models/{enabled_product_links.rb → enabled_product_response_links.rb} +5 -3
- data/lib/fastly/models/{enabled_product_product.rb → enabled_product_response_product.rb} +5 -3
- data/lib/fastly/models/enabled_product_response_service.rb +227 -0
- data/lib/fastly/models/{resource_create_all_of.rb → inline_response2002.rb} +11 -11
- data/lib/fastly/models/{get_stores_response.rb → inline_response2003.rb} +4 -4
- data/lib/fastly/models/{get_stores_response_meta.rb → inline_response2003_meta.rb} +3 -3
- data/lib/fastly/models/{key_response.rb → inline_response2004.rb} +4 -4
- data/lib/fastly/models/inline_response2004_meta.rb +225 -0
- data/lib/fastly/models/pop.rb +121 -1
- data/lib/fastly/models/pop_coordinates.rb +12 -19
- data/lib/fastly/models/realtime_measurements.rb +86 -6
- data/lib/fastly/models/resource.rb +12 -2
- data/lib/fastly/models/resource_response.rb +23 -23
- data/lib/fastly/models/resource_response_all_of.rb +1 -1
- data/lib/fastly/models/results.rb +87 -7
- data/lib/fastly/models/tls_subscription_response_attributes.rb +2 -2
- data/lib/fastly/models/tls_subscription_response_attributes_all_of.rb +2 -2
- data/lib/fastly/models/type_resource.rb +2 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +11 -8
- data/sig.json +1 -1
- metadata +24 -18
- data/docs/EnabledProduct.md +0 -12
- data/docs/ResourceCreate.md +0 -11
- data/lib/fastly/models/resource_create.rb +0 -235
@@ -17,24 +17,24 @@ module Fastly
|
|
17
17
|
def initialize(api_client = ApiClient.default)
|
18
18
|
@api_client = api_client
|
19
19
|
end
|
20
|
-
# Create a resource
|
21
|
-
# Create a resource.
|
20
|
+
# Create a resource link
|
21
|
+
# Create a link between a resource and a service version.
|
22
22
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
23
23
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
24
|
-
# @option opts [String] :
|
25
|
-
# @option opts [String] :
|
24
|
+
# @option opts [String] :resource_id The ID of the underlying linked resource.
|
25
|
+
# @option opts [String] :name The name of the resource link.
|
26
26
|
# @return [ResourceResponse]
|
27
27
|
def create_resource(opts = {})
|
28
28
|
data, _status_code, _headers = create_resource_with_http_info(opts)
|
29
29
|
data
|
30
30
|
end
|
31
31
|
|
32
|
-
# Create a resource
|
33
|
-
# Create a resource.
|
32
|
+
# Create a resource link
|
33
|
+
# Create a link between a resource and a service version.
|
34
34
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
35
35
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
36
|
-
# @option opts [String] :
|
37
|
-
# @option opts [String] :
|
36
|
+
# @option opts [String] :resource_id The ID of the underlying linked resource.
|
37
|
+
# @option opts [String] :name The name of the resource link.
|
38
38
|
# @return [Array<(ResourceResponse, Integer, Hash)>] ResourceResponse data, response status code and response headers
|
39
39
|
def create_resource_with_http_info(opts = {})
|
40
40
|
if @api_client.config.debugging
|
@@ -69,8 +69,8 @@ module Fastly
|
|
69
69
|
|
70
70
|
# form parameters
|
71
71
|
form_params = opts[:form_params] || {}
|
72
|
-
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
73
72
|
form_params['resource_id'] = opts[:'resource_id'] if !opts[:'resource_id'].nil?
|
73
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
74
74
|
|
75
75
|
# http body (model)
|
76
76
|
post_body = opts[:debug_body]
|
@@ -98,22 +98,22 @@ module Fastly
|
|
98
98
|
return data, status_code, headers
|
99
99
|
end
|
100
100
|
|
101
|
-
# Delete a resource
|
102
|
-
# Delete a resource.
|
101
|
+
# Delete a resource link
|
102
|
+
# Delete a link between a resource and a service version.
|
103
103
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
104
104
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
105
|
-
# @option opts [String] :
|
105
|
+
# @option opts [String] :id An alphanumeric string identifying the resource link. (required)
|
106
106
|
# @return [InlineResponse200]
|
107
107
|
def delete_resource(opts = {})
|
108
108
|
data, _status_code, _headers = delete_resource_with_http_info(opts)
|
109
109
|
data
|
110
110
|
end
|
111
111
|
|
112
|
-
# Delete a resource
|
113
|
-
# Delete a resource.
|
112
|
+
# Delete a resource link
|
113
|
+
# Delete a link between a resource and a service version.
|
114
114
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
115
115
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
116
|
-
# @option opts [String] :
|
116
|
+
# @option opts [String] :id An alphanumeric string identifying the resource link. (required)
|
117
117
|
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
118
118
|
def delete_resource_with_http_info(opts = {})
|
119
119
|
if @api_client.config.debugging
|
@@ -122,7 +122,7 @@ module Fastly
|
|
122
122
|
# unbox the parameters from the hash
|
123
123
|
service_id = opts[:'service_id']
|
124
124
|
version_id = opts[:'version_id']
|
125
|
-
|
125
|
+
id = opts[:'id']
|
126
126
|
# verify the required parameter 'service_id' is set
|
127
127
|
if @api_client.config.client_side_validation && service_id.nil?
|
128
128
|
fail ArgumentError, "Missing the required parameter 'service_id' when calling ResourceApi.delete_resource"
|
@@ -131,12 +131,12 @@ module Fastly
|
|
131
131
|
if @api_client.config.client_side_validation && version_id.nil?
|
132
132
|
fail ArgumentError, "Missing the required parameter 'version_id' when calling ResourceApi.delete_resource"
|
133
133
|
end
|
134
|
-
# verify the required parameter '
|
135
|
-
if @api_client.config.client_side_validation &&
|
136
|
-
fail ArgumentError, "Missing the required parameter '
|
134
|
+
# verify the required parameter 'id' is set
|
135
|
+
if @api_client.config.client_side_validation && id.nil?
|
136
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ResourceApi.delete_resource"
|
137
137
|
end
|
138
138
|
# resource path
|
139
|
-
local_var_path = '/service/{service_id}/version/{version_id}/resource/{
|
139
|
+
local_var_path = '/service/{service_id}/version/{version_id}/resource/{id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
140
140
|
|
141
141
|
# query parameters
|
142
142
|
query_params = opts[:query_params] || {}
|
@@ -175,22 +175,22 @@ module Fastly
|
|
175
175
|
return data, status_code, headers
|
176
176
|
end
|
177
177
|
|
178
|
-
# Display a resource
|
179
|
-
# Display a resource by its identifier.
|
178
|
+
# Display a resource link
|
179
|
+
# Display a resource link by its identifier.
|
180
180
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
181
181
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
182
|
-
# @option opts [String] :
|
182
|
+
# @option opts [String] :id An alphanumeric string identifying the resource link. (required)
|
183
183
|
# @return [ResourceResponse]
|
184
184
|
def get_resource(opts = {})
|
185
185
|
data, _status_code, _headers = get_resource_with_http_info(opts)
|
186
186
|
data
|
187
187
|
end
|
188
188
|
|
189
|
-
# Display a resource
|
190
|
-
# Display a resource by its identifier.
|
189
|
+
# Display a resource link
|
190
|
+
# Display a resource link by its identifier.
|
191
191
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
192
192
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
193
|
-
# @option opts [String] :
|
193
|
+
# @option opts [String] :id An alphanumeric string identifying the resource link. (required)
|
194
194
|
# @return [Array<(ResourceResponse, Integer, Hash)>] ResourceResponse data, response status code and response headers
|
195
195
|
def get_resource_with_http_info(opts = {})
|
196
196
|
if @api_client.config.debugging
|
@@ -199,7 +199,7 @@ module Fastly
|
|
199
199
|
# unbox the parameters from the hash
|
200
200
|
service_id = opts[:'service_id']
|
201
201
|
version_id = opts[:'version_id']
|
202
|
-
|
202
|
+
id = opts[:'id']
|
203
203
|
# verify the required parameter 'service_id' is set
|
204
204
|
if @api_client.config.client_side_validation && service_id.nil?
|
205
205
|
fail ArgumentError, "Missing the required parameter 'service_id' when calling ResourceApi.get_resource"
|
@@ -208,12 +208,12 @@ module Fastly
|
|
208
208
|
if @api_client.config.client_side_validation && version_id.nil?
|
209
209
|
fail ArgumentError, "Missing the required parameter 'version_id' when calling ResourceApi.get_resource"
|
210
210
|
end
|
211
|
-
# verify the required parameter '
|
212
|
-
if @api_client.config.client_side_validation &&
|
213
|
-
fail ArgumentError, "Missing the required parameter '
|
211
|
+
# verify the required parameter 'id' is set
|
212
|
+
if @api_client.config.client_side_validation && id.nil?
|
213
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ResourceApi.get_resource"
|
214
214
|
end
|
215
215
|
# resource path
|
216
|
-
local_var_path = '/service/{service_id}/version/{version_id}/resource/{
|
216
|
+
local_var_path = '/service/{service_id}/version/{version_id}/resource/{id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
217
217
|
|
218
218
|
# query parameters
|
219
219
|
query_params = opts[:query_params] || {}
|
@@ -252,8 +252,8 @@ module Fastly
|
|
252
252
|
return data, status_code, headers
|
253
253
|
end
|
254
254
|
|
255
|
-
# List
|
256
|
-
# List resources
|
255
|
+
# List resource links
|
256
|
+
# List links between resources and services
|
257
257
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
258
258
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
259
259
|
# @return [Array<ResourceResponse>]
|
@@ -262,8 +262,8 @@ module Fastly
|
|
262
262
|
data
|
263
263
|
end
|
264
264
|
|
265
|
-
# List
|
266
|
-
# List resources
|
265
|
+
# List resource links
|
266
|
+
# List links between resources and services
|
267
267
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
268
268
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
269
269
|
# @return [Array<(Array<ResourceResponse>, Integer, Hash)>] Array<ResourceResponse> data, response status code and response headers
|
@@ -322,24 +322,26 @@ module Fastly
|
|
322
322
|
return data, status_code, headers
|
323
323
|
end
|
324
324
|
|
325
|
-
# Update a resource
|
326
|
-
# Update a resource.
|
325
|
+
# Update a resource link
|
326
|
+
# Update a link between a resource and a service version.
|
327
327
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
328
328
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
329
|
-
# @option opts [String] :
|
330
|
-
# @option opts [String] :
|
329
|
+
# @option opts [String] :id An alphanumeric string identifying the resource link. (required)
|
330
|
+
# @option opts [String] :resource_id The ID of the underlying linked resource.
|
331
|
+
# @option opts [String] :name The name of the resource link.
|
331
332
|
# @return [ResourceResponse]
|
332
333
|
def update_resource(opts = {})
|
333
334
|
data, _status_code, _headers = update_resource_with_http_info(opts)
|
334
335
|
data
|
335
336
|
end
|
336
337
|
|
337
|
-
# Update a resource
|
338
|
-
# Update a resource.
|
338
|
+
# Update a resource link
|
339
|
+
# Update a link between a resource and a service version.
|
339
340
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
340
341
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
341
|
-
# @option opts [String] :
|
342
|
-
# @option opts [String] :
|
342
|
+
# @option opts [String] :id An alphanumeric string identifying the resource link. (required)
|
343
|
+
# @option opts [String] :resource_id The ID of the underlying linked resource.
|
344
|
+
# @option opts [String] :name The name of the resource link.
|
343
345
|
# @return [Array<(ResourceResponse, Integer, Hash)>] ResourceResponse data, response status code and response headers
|
344
346
|
def update_resource_with_http_info(opts = {})
|
345
347
|
if @api_client.config.debugging
|
@@ -348,7 +350,7 @@ module Fastly
|
|
348
350
|
# unbox the parameters from the hash
|
349
351
|
service_id = opts[:'service_id']
|
350
352
|
version_id = opts[:'version_id']
|
351
|
-
|
353
|
+
id = opts[:'id']
|
352
354
|
# verify the required parameter 'service_id' is set
|
353
355
|
if @api_client.config.client_side_validation && service_id.nil?
|
354
356
|
fail ArgumentError, "Missing the required parameter 'service_id' when calling ResourceApi.update_resource"
|
@@ -357,12 +359,12 @@ module Fastly
|
|
357
359
|
if @api_client.config.client_side_validation && version_id.nil?
|
358
360
|
fail ArgumentError, "Missing the required parameter 'version_id' when calling ResourceApi.update_resource"
|
359
361
|
end
|
360
|
-
# verify the required parameter '
|
361
|
-
if @api_client.config.client_side_validation &&
|
362
|
-
fail ArgumentError, "Missing the required parameter '
|
362
|
+
# verify the required parameter 'id' is set
|
363
|
+
if @api_client.config.client_side_validation && id.nil?
|
364
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ResourceApi.update_resource"
|
363
365
|
end
|
364
366
|
# resource path
|
365
|
-
local_var_path = '/service/{service_id}/version/{version_id}/resource/{
|
367
|
+
local_var_path = '/service/{service_id}/version/{version_id}/resource/{id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
366
368
|
|
367
369
|
# query parameters
|
368
370
|
query_params = opts[:query_params] || {}
|
@@ -379,6 +381,7 @@ module Fastly
|
|
379
381
|
|
380
382
|
# form parameters
|
381
383
|
form_params = opts[:form_params] || {}
|
384
|
+
form_params['resource_id'] = opts[:'resource_id'] if !opts[:'resource_id'].nil?
|
382
385
|
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
383
386
|
|
384
387
|
# http body (model)
|
@@ -364,7 +364,7 @@ module Fastly
|
|
364
364
|
|
365
365
|
# List TLS subscriptions
|
366
366
|
# List all TLS subscriptions.
|
367
|
-
# @option opts [String] :filter_state Limit the returned subscriptions by state. Valid values are `pending`, `processing`, `issued`, and `
|
367
|
+
# @option opts [String] :filter_state Limit the returned subscriptions by state. Valid values are `pending`, `processing`, `issued`, `renewing`, and `failed`. Accepts parameters: `not` (e.g., `filter[state][not]=renewing`).
|
368
368
|
# @option opts [String] :filter_tls_domains_id Limit the returned subscriptions to those that include the specific domain.
|
369
369
|
# @option opts [Boolean] :filter_has_active_order Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`.
|
370
370
|
# @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`.
|
@@ -379,7 +379,7 @@ module Fastly
|
|
379
379
|
|
380
380
|
# List TLS subscriptions
|
381
381
|
# List all TLS subscriptions.
|
382
|
-
# @option opts [String] :filter_state Limit the returned subscriptions by state. Valid values are `pending`, `processing`, `issued`, and `
|
382
|
+
# @option opts [String] :filter_state Limit the returned subscriptions by state. Valid values are `pending`, `processing`, `issued`, `renewing`, and `failed`. Accepts parameters: `not` (e.g., `filter[state][not]=renewing`).
|
383
383
|
# @option opts [String] :filter_tls_domains_id Limit the returned subscriptions to those that include the specific domain.
|
384
384
|
# @option opts [Boolean] :filter_has_active_order Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`.
|
385
385
|
# @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`.
|
@@ -452,7 +452,7 @@ module Fastly
|
|
452
452
|
end
|
453
453
|
|
454
454
|
# Update a TLS subscription
|
455
|
-
# Change the TLS domains or common name associated with this subscription,
|
455
|
+
# Change the TLS domains or common name associated with this subscription, update the TLS configuration for this set of domains, or retry a subscription with state `failed` by setting the state to `retry`.
|
456
456
|
# @option opts [String] :tls_subscription_id Alphanumeric string identifying a TLS subscription. (required)
|
457
457
|
# @option opts [Boolean] :force A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain.
|
458
458
|
# @option opts [TlsSubscription] :tls_subscription
|
@@ -463,7 +463,7 @@ module Fastly
|
|
463
463
|
end
|
464
464
|
|
465
465
|
# Update a TLS subscription
|
466
|
-
# Change the TLS domains or common name associated with this subscription,
|
466
|
+
# Change the TLS domains or common name associated with this subscription, update the TLS configuration for this set of domains, or retry a subscription with state `failed` by setting the state to `retry`.
|
467
467
|
# @option opts [String] :tls_subscription_id Alphanumeric string identifying a TLS subscription. (required)
|
468
468
|
# @option opts [Boolean] :force A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain.
|
469
469
|
# @option opts [TlsSubscription] :tls_subscription
|
@@ -46,7 +46,7 @@ module Fastly
|
|
46
46
|
# IPv6 address of the backend. May be used as an alternative to `address` to set the backend location.
|
47
47
|
attr_accessor :ipv6
|
48
48
|
|
49
|
-
# How long to keep a persistent connection to the backend between requests.
|
49
|
+
# How long in seconds to keep a persistent connection to the backend between requests.
|
50
50
|
attr_accessor :keepalive_time
|
51
51
|
|
52
52
|
# Maximum number of concurrent connections this backend will accept.
|
@@ -46,7 +46,7 @@ module Fastly
|
|
46
46
|
# IPv6 address of the backend. May be used as an alternative to `address` to set the backend location.
|
47
47
|
attr_accessor :ipv6
|
48
48
|
|
49
|
-
# How long to keep a persistent connection to the backend between requests.
|
49
|
+
# How long in seconds to keep a persistent connection to the backend between requests.
|
50
50
|
attr_accessor :keepalive_time
|
51
51
|
|
52
52
|
# Maximum number of concurrent connections this backend will accept.
|
@@ -12,7 +12,7 @@ require 'date'
|
|
12
12
|
require 'time'
|
13
13
|
|
14
14
|
module Fastly
|
15
|
-
class
|
15
|
+
class EnabledProductResponse
|
16
16
|
attr_accessor :product
|
17
17
|
|
18
18
|
attr_accessor :service
|
@@ -36,9 +36,9 @@ module Fastly
|
|
36
36
|
# Attribute type mapping.
|
37
37
|
def self.fastly_types
|
38
38
|
{
|
39
|
-
:'product' => :'
|
40
|
-
:'service' => :'
|
41
|
-
:'_links' => :'
|
39
|
+
:'product' => :'EnabledProductResponseProduct',
|
40
|
+
:'service' => :'EnabledProductResponseService',
|
41
|
+
:'_links' => :'EnabledProductResponseLinks'
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
@@ -52,13 +52,13 @@ module Fastly
|
|
52
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
53
53
|
def initialize(attributes = {})
|
54
54
|
if (!attributes.is_a?(Hash))
|
55
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::EnabledProductResponse` initialize method"
|
56
56
|
end
|
57
57
|
|
58
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
59
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
60
|
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::EnabledProductResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
62
|
end
|
63
63
|
h[k.to_sym] = v
|
64
64
|
}
|
@@ -12,9 +12,11 @@ require 'date'
|
|
12
12
|
require 'time'
|
13
13
|
|
14
14
|
module Fastly
|
15
|
-
class
|
15
|
+
class EnabledProductResponseLinks
|
16
|
+
# Location of resource
|
16
17
|
attr_accessor :_self
|
17
18
|
|
19
|
+
# Location of the service resource
|
18
20
|
attr_accessor :service
|
19
21
|
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -48,13 +50,13 @@ module Fastly
|
|
48
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
49
51
|
def initialize(attributes = {})
|
50
52
|
if (!attributes.is_a?(Hash))
|
51
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::EnabledProductResponseLinks` initialize method"
|
52
54
|
end
|
53
55
|
|
54
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
55
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::EnabledProductResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
60
|
end
|
59
61
|
h[k.to_sym] = v
|
60
62
|
}
|
@@ -12,9 +12,11 @@ require 'date'
|
|
12
12
|
require 'time'
|
13
13
|
|
14
14
|
module Fastly
|
15
|
-
class
|
15
|
+
class EnabledProductResponseProduct
|
16
|
+
# Product identifier
|
16
17
|
attr_accessor :id
|
17
18
|
|
19
|
+
# Name of the object
|
18
20
|
attr_accessor :object
|
19
21
|
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -48,13 +50,13 @@ module Fastly
|
|
48
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
49
51
|
def initialize(attributes = {})
|
50
52
|
if (!attributes.is_a?(Hash))
|
51
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::EnabledProductResponseProduct` initialize method"
|
52
54
|
end
|
53
55
|
|
54
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
55
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::EnabledProductResponseProduct`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
60
|
end
|
59
61
|
h[k.to_sym] = v
|
60
62
|
}
|
@@ -0,0 +1,227 @@
|
|
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 'date'
|
12
|
+
require 'time'
|
13
|
+
|
14
|
+
module Fastly
|
15
|
+
class EnabledProductResponseService
|
16
|
+
# Service identifier
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# Name of the object
|
20
|
+
attr_accessor :object
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'id' => :'id',
|
26
|
+
:'object' => :'object'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.fastly_types
|
37
|
+
{
|
38
|
+
:'id' => :'String',
|
39
|
+
:'object' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.fastly_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::EnabledProductResponseService` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::EnabledProductResponseService`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'id')
|
65
|
+
self.id = attributes[:'id']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'object')
|
69
|
+
self.object = attributes[:'object']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
invalid_properties = Array.new
|
77
|
+
invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
id == o.id &&
|
92
|
+
object == o.object
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[id, object].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
new.build_from_hash(attributes)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
self.class.fastly_types.each_pair do |key, type|
|
120
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :Time
|
143
|
+
Time.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :Boolean
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
# models (e.g. Pet) or oneOf
|
174
|
+
klass = Fastly.const_get(type)
|
175
|
+
klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
if value.nil?
|
198
|
+
is_nullable = self.class.fastly_nullable.include?(attr)
|
199
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
|
+
end
|
201
|
+
|
202
|
+
hash[param] = _to_hash(value)
|
203
|
+
end
|
204
|
+
hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Outputs non-array value in the form of hash
|
208
|
+
# For object, use to_hash. Otherwise, just return the value
|
209
|
+
# @param [Object] value Any valid value
|
210
|
+
# @return [Hash] Returns the value in the form of hash
|
211
|
+
def _to_hash(value)
|
212
|
+
if value.is_a?(Array)
|
213
|
+
value.compact.map { |v| _to_hash(v) }
|
214
|
+
elsif value.is_a?(Hash)
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
217
|
+
end
|
218
|
+
elsif value.respond_to? :to_hash
|
219
|
+
value.to_hash
|
220
|
+
else
|
221
|
+
value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|