From c09afc220cf619f9b60668fb4dae076cdab3856d Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 13 Sep 2024 07:03:13 +0000 Subject: [PATCH] Generated v8.9.0 --- CHANGELOG.md | 23 + README.md | 33 +- docs/AclsInComputeApi.md | 284 +++++++++++ ...rded.md => ComputeAclCreateAclsRequest.md} | 3 +- docs/ComputeAclCreateAclsResponse.md | 11 + docs/ComputeAclListEntries.md | 11 + docs/ComputeAclListEntriesItem.md | 11 + docs/ComputeAclListEntriesMeta.md | 11 + docs/ComputeAclLookup.md | 12 + docs/ComputeAclUpdateEntry.md | 12 + docs/ConfiguredProductResponse.md | 13 + .../ConfiguredProductResponseConfiguration.md | 11 + docs/ConfiguredProductResponseLinks.md | 11 + docs/ConfiguredProductResponseProduct.md | 11 + docs/ContactApi.md | 2 +- docs/CustomerAddress.md | 16 + docs/CustomerAddressesApi.md | 127 +++++ docs/DomainInspector.md | 2 +- docs/DomainInspectorRealtimeEntry.md | 2 +- docs/EnabledProductsApi.md | 102 +++- docs/Environment.md | 12 + ...ecordedTimestamp.md => EnvironmentName.md} | 2 +- ...questTimestamp.md => InlineResponse201.md} | 3 +- ...mp.md => ListCustomerAddressesResponse.md} | 3 +- docs/OriginInspector.md | 2 +- docs/OriginInspectorRealtimeEntry.md | 2 +- docs/RealtimeEntryAggregated.md | 1 + docs/RealtimeMeasurements.md | 1 + docs/Results.md | 1 + docs/SchemasVersionResponse.md | 1 + docs/ServiceDetail.md | 1 + docs/ServiceListResponse.md | 1 + docs/ServiceListResponseAllOf.md | 1 + docs/ServiceResponse.md | 1 + docs/ServiceResponseAllOf.md | 1 + docs/ServiceVersionDetail.md | 1 + docs/ServiceVersionDetailOrNull.md | 1 + docs/SetConfiguration.md | 11 + docs/SetWorkspaceId.md | 10 + docs/TlsCertificatesApi.md | 4 +- docs/TlsDomainsApi.md | 4 +- docs/TlsSubscriptionsApi.md | 4 +- docs/VersionApi.md | 84 ++++ docs/VersionResponse.md | 1 + docs/VersionResponseAllOf.md | 1 + lib/fastly.rb | 24 +- lib/fastly/api/acls_in_compute_api.rb | 470 ++++++++++++++++++ lib/fastly/api/contact_api.rb | 2 +- lib/fastly/api/customer_addresses_api.rb | 224 +++++++++ lib/fastly/api/enabled_products_api.rb | 174 ++++++- lib/fastly/api/tls_certificates_api.rb | 14 +- lib/fastly/api/tls_domains_api.rb | 14 +- lib/fastly/api/tls_subscriptions_api.rb | 14 +- lib/fastly/api/version_api.rb | 154 ++++++ lib/fastly/configuration.rb | 84 ++++ .../models/billing_response_line_item.rb | 10 + ....rb => compute_acl_create_acls_request.rb} | 21 +- .../compute_acl_create_acls_response.rb | 227 +++++++++ lib/fastly/models/compute_acl_list_entries.rb | 228 +++++++++ .../models/compute_acl_list_entries_item.rb | 227 +++++++++ .../models/compute_acl_list_entries_meta.rb | 227 +++++++++ lib/fastly/models/compute_acl_lookup.rb | 238 +++++++++ lib/fastly/models/compute_acl_update_entry.rb | 238 +++++++++ .../models/configured_product_response.rb | 243 +++++++++ ...nfigured_product_response_configuration.rb | 227 +++++++++ .../configured_product_response_links.rb | 227 +++++++++ .../configured_product_response_product.rb | 227 +++++++++ lib/fastly/models/customer_address.rb | 294 +++++++++++ lib/fastly/models/domain_inspector.rb | 3 +- .../models/domain_inspector_realtime_entry.rb | 3 +- lib/fastly/models/environment.rb | 235 +++++++++ lib/fastly/models/environment_name.rb | 34 ++ lib/fastly/models/event_attributes.rb | 4 +- ...ded_timestamp.rb => inline_response201.rb} | 21 +- lib/fastly/models/line_item_data.rb | 10 + ...rb => list_customer_addresses_response.rb} | 22 +- lib/fastly/models/origin_inspector.rb | 3 +- .../models/origin_inspector_realtime_entry.rb | 3 +- .../models/realtime_entry_aggregated.rb | 18 +- lib/fastly/models/realtime_measurements.rb | 18 +- lib/fastly/models/results.rb | 12 +- lib/fastly/models/schemas_version_response.rb | 20 +- lib/fastly/models/service_detail.rb | 14 +- lib/fastly/models/service_list_response.rb | 20 +- .../models/service_list_response_all_of.rb | 20 +- lib/fastly/models/service_response.rb | 20 +- lib/fastly/models/service_response_all_of.rb | 20 +- lib/fastly/models/service_version_detail.rb | 14 +- .../models/service_version_detail_or_null.rb | 14 +- lib/fastly/models/set_configuration.rb | 227 +++++++++ ...quest_timestamp.rb => set_workspace_id.rb} | 21 +- lib/fastly/models/version_response.rb | 20 +- lib/fastly/models/version_response_all_of.rb | 20 +- lib/fastly/version.rb | 2 +- sig.json | 2 +- 95 files changed, 5355 insertions(+), 135 deletions(-) create mode 100644 docs/AclsInComputeApi.md rename docs/{OriginInspectorRealtimeEntryRecorded.md => ComputeAclCreateAclsRequest.md} (62%) create mode 100644 docs/ComputeAclCreateAclsResponse.md create mode 100644 docs/ComputeAclListEntries.md create mode 100644 docs/ComputeAclListEntriesItem.md create mode 100644 docs/ComputeAclListEntriesMeta.md create mode 100644 docs/ComputeAclLookup.md create mode 100644 docs/ComputeAclUpdateEntry.md create mode 100644 docs/ConfiguredProductResponse.md create mode 100644 docs/ConfiguredProductResponseConfiguration.md create mode 100644 docs/ConfiguredProductResponseLinks.md create mode 100644 docs/ConfiguredProductResponseProduct.md create mode 100644 docs/CustomerAddress.md create mode 100644 docs/CustomerAddressesApi.md create mode 100644 docs/Environment.md rename docs/{RecordedTimestamp.md => EnvironmentName.md} (86%) rename docs/{OriginInspectorSubsequentRequestTimestamp.md => InlineResponse201.md} (61%) rename docs/{SubsequentRequestTimestamp.md => ListCustomerAddressesResponse.md} (58%) create mode 100644 docs/SetConfiguration.md create mode 100644 docs/SetWorkspaceId.md create mode 100644 lib/fastly/api/acls_in_compute_api.rb create mode 100644 lib/fastly/api/customer_addresses_api.rb rename lib/fastly/models/{origin_inspector_realtime_entry_recorded.rb => compute_acl_create_acls_request.rb} (92%) create mode 100644 lib/fastly/models/compute_acl_create_acls_response.rb create mode 100644 lib/fastly/models/compute_acl_list_entries.rb create mode 100644 lib/fastly/models/compute_acl_list_entries_item.rb create mode 100644 lib/fastly/models/compute_acl_list_entries_meta.rb create mode 100644 lib/fastly/models/compute_acl_lookup.rb create mode 100644 lib/fastly/models/compute_acl_update_entry.rb create mode 100644 lib/fastly/models/configured_product_response.rb create mode 100644 lib/fastly/models/configured_product_response_configuration.rb create mode 100644 lib/fastly/models/configured_product_response_links.rb create mode 100644 lib/fastly/models/configured_product_response_product.rb create mode 100644 lib/fastly/models/customer_address.rb create mode 100644 lib/fastly/models/environment.rb create mode 100644 lib/fastly/models/environment_name.rb rename lib/fastly/models/{recorded_timestamp.rb => inline_response201.rb} (93%) rename lib/fastly/models/{origin_inspector_subsequent_request_timestamp.rb => list_customer_addresses_response.rb} (91%) create mode 100644 lib/fastly/models/set_configuration.rb rename lib/fastly/models/{subsequent_request_timestamp.rb => set_workspace_id.rb} (90%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f83523c..cad9d654 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [v8.9.0](https://github.com/fastly/fastly-ruby/releases/tag/release/v8.9.0) (2024-09-13) + +**Bug fixes:** + +- bugfix(rust): Implement std::fmt::Display instead of std::string::ToString for enum models. +- fix(contact): Corrected endpoint called by `delete-contact` operation +- fix(origin-inspector, domain-inspector): Use integer type for Timestamp. +- fix(billing): Make all fields on billing list item data nullable + +**Enhancements:** + +- feat(acls-in-compute): Add ACLs in Compute API +- feat(enabled-products): Updated to use `v1` versioned endpoints. +- feat(enabled-products): Added `get-product-configuration`, `set-product-configuration` operations. +- feat(realtime, historical): Added `request_denied_get_head_body` metric. +- feat(tls): Add definitions for values of sort parameter +- feat(staging): Add activate/deactivate endpoints for staging +- feat(customer-addresses): Add Customer Addresses API + +**Documentation:** + +- doc(enabled-products): Added support for product IDs `bot_management` and `ngwaf`. + ## [v8.8.0](https://github.com/fastly/fastly-ruby/releases/tag/release/v8.8.0) (2024-08-21) **Bug fixes:** diff --git a/README.md b/README.md index 826fb981..20eb2194 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A Ruby client library for interacting with most facets of the [Fastly API](https To install via RubyGems, add the following to your project's `Gemfile`: ```ruby -gem 'fastly', '~> 8.8.0' +gem 'fastly', '~> 8.9.0' ``` Then run `bundle install`. @@ -79,6 +79,13 @@ Class | Method | Description [*Fastly::AclEntryApi*](docs/AclEntryApi.md) | [**get_acl_entry**](docs/AclEntryApi.md#get_acl_entry) | Describe an ACL entry [*Fastly::AclEntryApi*](docs/AclEntryApi.md) | [**list_acl_entries**](docs/AclEntryApi.md#list_acl_entries) | List ACL entries [*Fastly::AclEntryApi*](docs/AclEntryApi.md) | [**update_acl_entry**](docs/AclEntryApi.md#update_acl_entry) | Update an ACL entry +[*Fastly::AclsInComputeApi*](docs/AclsInComputeApi.md) | [**compute_acl_create_acls**](docs/AclsInComputeApi.md#compute_acl_create_acls) | Create a new ACL +[*Fastly::AclsInComputeApi*](docs/AclsInComputeApi.md) | [**compute_acl_delete_s_acl_id**](docs/AclsInComputeApi.md#compute_acl_delete_s_acl_id) | Delete an ACL +[*Fastly::AclsInComputeApi*](docs/AclsInComputeApi.md) | [**compute_acl_list_acl_entries**](docs/AclsInComputeApi.md#compute_acl_list_acl_entries) | List an ACL +[*Fastly::AclsInComputeApi*](docs/AclsInComputeApi.md) | [**compute_acl_list_acls**](docs/AclsInComputeApi.md#compute_acl_list_acls) | List ACLs +[*Fastly::AclsInComputeApi*](docs/AclsInComputeApi.md) | [**compute_acl_list_acls_s_acl_id**](docs/AclsInComputeApi.md#compute_acl_list_acls_s_acl_id) | Describe an ACL +[*Fastly::AclsInComputeApi*](docs/AclsInComputeApi.md) | [**compute_acl_lookup_acls**](docs/AclsInComputeApi.md#compute_acl_lookup_acls) | Lookup an ACL +[*Fastly::AclsInComputeApi*](docs/AclsInComputeApi.md) | [**compute_acl_update_acls**](docs/AclsInComputeApi.md#compute_acl_update_acls) | Update an ACL [*Fastly::ApexRedirectApi*](docs/ApexRedirectApi.md) | [**create_apex_redirect**](docs/ApexRedirectApi.md#create_apex_redirect) | Create an apex redirect [*Fastly::ApexRedirectApi*](docs/ApexRedirectApi.md) | [**delete_apex_redirect**](docs/ApexRedirectApi.md#delete_apex_redirect) | Delete an apex redirect [*Fastly::ApexRedirectApi*](docs/ApexRedirectApi.md) | [**get_apex_redirect**](docs/ApexRedirectApi.md#get_apex_redirect) | Get an apex redirect @@ -139,6 +146,9 @@ Class | Method | Description [*Fastly::CustomerApi*](docs/CustomerApi.md) | [**get_logged_in_customer**](docs/CustomerApi.md#get_logged_in_customer) | Get the logged in customer [*Fastly::CustomerApi*](docs/CustomerApi.md) | [**list_users**](docs/CustomerApi.md#list_users) | List users [*Fastly::CustomerApi*](docs/CustomerApi.md) | [**update_customer**](docs/CustomerApi.md#update_customer) | Update a customer +[*Fastly::CustomerAddressesApi*](docs/CustomerAddressesApi.md) | [**create_customer_address**](docs/CustomerAddressesApi.md#create_customer_address) | Creates an address associated with a customer account. +[*Fastly::CustomerAddressesApi*](docs/CustomerAddressesApi.md) | [**list_customer_addresses**](docs/CustomerAddressesApi.md#list_customer_addresses) | Return the list of addresses associated with a customer account. +[*Fastly::CustomerAddressesApi*](docs/CustomerAddressesApi.md) | [**update_customer_address**](docs/CustomerAddressesApi.md#update_customer_address) | Updates an address associated with a customer account. [*Fastly::DictionaryApi*](docs/DictionaryApi.md) | [**create_dictionary**](docs/DictionaryApi.md#create_dictionary) | Create an edge dictionary [*Fastly::DictionaryApi*](docs/DictionaryApi.md) | [**delete_dictionary**](docs/DictionaryApi.md#delete_dictionary) | Delete an edge dictionary [*Fastly::DictionaryApi*](docs/DictionaryApi.md) | [**get_dictionary**](docs/DictionaryApi.md#get_dictionary) | Get an edge dictionary @@ -176,6 +186,8 @@ Class | Method | Description [*Fastly::EnabledProductsApi*](docs/EnabledProductsApi.md) | [**disable_product**](docs/EnabledProductsApi.md#disable_product) | Disable a product [*Fastly::EnabledProductsApi*](docs/EnabledProductsApi.md) | [**enable_product**](docs/EnabledProductsApi.md#enable_product) | Enable a product [*Fastly::EnabledProductsApi*](docs/EnabledProductsApi.md) | [**get_enabled_product**](docs/EnabledProductsApi.md#get_enabled_product) | Get enabled product +[*Fastly::EnabledProductsApi*](docs/EnabledProductsApi.md) | [**get_product_configuration**](docs/EnabledProductsApi.md#get_product_configuration) | Get configuration for a product +[*Fastly::EnabledProductsApi*](docs/EnabledProductsApi.md) | [**set_product_configuration**](docs/EnabledProductsApi.md#set_product_configuration) | Update configuration for a product [*Fastly::EventsApi*](docs/EventsApi.md) | [**get_event**](docs/EventsApi.md#get_event) | Get an event [*Fastly::EventsApi*](docs/EventsApi.md) | [**list_events**](docs/EventsApi.md#list_events) | List events [*Fastly::GzipApi*](docs/GzipApi.md) | [**create_gzip_config**](docs/GzipApi.md#create_gzip_config) | Create a gzip configuration @@ -572,9 +584,11 @@ Class | Method | Description [*Fastly::VclApi*](docs/VclApi.md) | [**update_custom_vcl**](docs/VclApi.md#update_custom_vcl) | Update a custom VCL file [*Fastly::VclDiffApi*](docs/VclDiffApi.md) | [**vcl_diff_service_versions**](docs/VclDiffApi.md#vcl_diff_service_versions) | Get a comparison of the VCL changes between two service versions [*Fastly::VersionApi*](docs/VersionApi.md) | [**activate_service_version**](docs/VersionApi.md#activate_service_version) | Activate a service version +[*Fastly::VersionApi*](docs/VersionApi.md) | [**activate_service_version_environment**](docs/VersionApi.md#activate_service_version_environment) | Activate a service version on the specified environment [*Fastly::VersionApi*](docs/VersionApi.md) | [**clone_service_version**](docs/VersionApi.md#clone_service_version) | Clone a service version [*Fastly::VersionApi*](docs/VersionApi.md) | [**create_service_version**](docs/VersionApi.md#create_service_version) | Create a service version [*Fastly::VersionApi*](docs/VersionApi.md) | [**deactivate_service_version**](docs/VersionApi.md#deactivate_service_version) | Deactivate a service version +[*Fastly::VersionApi*](docs/VersionApi.md) | [**deactivate_service_version_environment**](docs/VersionApi.md#deactivate_service_version_environment) | Deactivate a service version on an environment [*Fastly::VersionApi*](docs/VersionApi.md) | [**get_service_version**](docs/VersionApi.md#get_service_version) | Get a version of a service [*Fastly::VersionApi*](docs/VersionApi.md) | [**list_service_versions**](docs/VersionApi.md#list_service_versions) | List versions of a service [*Fastly::VersionApi*](docs/VersionApi.md) | [**lock_service_version**](docs/VersionApi.md#lock_service_version) | Lock a service version @@ -623,6 +637,8 @@ The fastly-ruby API client currently does not support the following endpoints: - [`/alerts/history`](https://www.fastly.com/documentation/reference/api/observability/alerts/history) (GET) - [`/dns/configurations/{dns_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/dns/configurations`](https://www.fastly.com/documentation/reference/api/) (GET, POST) +- [`/domains/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) +- [`/domains`](https://www.fastly.com/documentation/reference/api/) (GET, POST) - [`/notifications/integration-types`](https://developer.fastly.com/reference/api/observability/notification) (GET) - [`/notifications/integrations/{integration_id}/rotateSigningKey`](https://developer.fastly.com/reference/api/observability/notification) (POST) - [`/notifications/integrations/{integration_id}/signingKey`](https://developer.fastly.com/reference/api/observability/notification) (GET) @@ -630,12 +646,23 @@ The fastly-ruby API client currently does not support the following endpoints: - [`/notifications/integrations`](https://developer.fastly.com/reference/api/observability/notification) (GET, POST) - [`/notifications/mailinglist-confirmations`](https://developer.fastly.com/reference/api/observability/notification) (POST) - [`/resources/stores/kv/{store_id}/batch`](https://www.fastly.com/documentation/reference/api/services/resources/kv-store-item) (PUT) +- [`/security/workspaces/{workspace_id}/events/{event_id}`](https://docs.fastly.com/en/ngwaf/) (GET, PATCH) +- [`/security/workspaces/{workspace_id}/events`](https://docs.fastly.com/en/ngwaf/) (GET) +- [`/security/workspaces/{workspace_id}/redactions/{redaction_id}`](https://docs.fastly.com/en/ngwaf/) (DELETE, GET, PATCH) +- [`/security/workspaces/{workspace_id}/redactions`](https://docs.fastly.com/en/ngwaf/) (GET, POST) +- [`/security/workspaces/{workspace_id}/requests/{request_id}`](https://docs.fastly.com/en/ngwaf/) (GET) +- [`/security/workspaces/{workspace_id}/requests`](https://docs.fastly.com/en/ngwaf/) (GET) +- [`/security/workspaces/{workspace_id}/rules/{rule_id}`](https://docs.fastly.com/en/ngwaf/) (DELETE, GET, PATCH) +- [`/security/workspaces/{workspace_id}/rules`](https://docs.fastly.com/en/ngwaf/) (GET, POST) +- [`/security/workspaces/{workspace_id}/timeseries`](https://docs.fastly.com/en/ngwaf/) (GET) +- [`/security/workspaces/{workspace_id}/virtual-patches/{virtual_patch_id}`](https://docs.fastly.com/en/ngwaf/) (GET, PATCH) +- [`/security/workspaces/{workspace_id}/virtual-patches`](https://docs.fastly.com/en/ngwaf/) (GET) +- [`/security/workspaces/{workspace_id}`](https://docs.fastly.com/en/ngwaf/) (DELETE, GET, PATCH) +- [`/security/workspaces`](https://docs.fastly.com/en/ngwaf/) (GET, POST) - [`/tls/activations/{tls_activation_id}`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET, PATCH) - [`/tls/activations`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET) - [`/tls/configurations/{tls_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/tls/configurations`](https://www.fastly.com/documentation/reference/api/) (GET, POST) -- [`/tls/preview/domains/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (GET, PATCH) -- [`/tls/preview/domains`](https://www.fastly.com/documentation/reference/api/) (GET, POST) - [`/v1/channel/{service_id}/ts/h/limit/{max_entries}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) - [`/v1/channel/{service_id}/ts/h`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) - [`/v1/channel/{service_id}/ts/{start_timestamp}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) diff --git a/docs/AclsInComputeApi.md b/docs/AclsInComputeApi.md new file mode 100644 index 00000000..0fe92734 --- /dev/null +++ b/docs/AclsInComputeApi.md @@ -0,0 +1,284 @@ +# Fastly::AclsInComputeApi + + +```ruby +require 'fastly' +api_instance = Fastly::AclsInComputeApi.new +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**compute_acl_create_acls**](AclsInComputeApi.md#compute_acl_create_acls) | **POST** /resources/acls | Create a new ACL +[**compute_acl_delete_s_acl_id**](AclsInComputeApi.md#compute_acl_delete_s_acl_id) | **DELETE** /resources/acls/{acl_id} | Delete an ACL +[**compute_acl_list_acl_entries**](AclsInComputeApi.md#compute_acl_list_acl_entries) | **GET** /resources/acls/{acl_id}/entries | List an ACL +[**compute_acl_list_acls**](AclsInComputeApi.md#compute_acl_list_acls) | **GET** /resources/acls | List ACLs +[**compute_acl_list_acls_s_acl_id**](AclsInComputeApi.md#compute_acl_list_acls_s_acl_id) | **GET** /resources/acls/{acl_id} | Describe an ACL +[**compute_acl_lookup_acls**](AclsInComputeApi.md#compute_acl_lookup_acls) | **GET** /resources/acls/{acl_id}/entry/{acl_ip} | Lookup an ACL +[**compute_acl_update_acls**](AclsInComputeApi.md#compute_acl_update_acls) | **PATCH** /resources/acls/{acl_id}/entries | Update an ACL + + +## `compute_acl_create_acls()` + +```ruby +compute_acl_create_acls(opts): # Create a new ACL +``` + +Create a new ACL. + +### Examples + +```ruby +api_instance = Fastly::AclsInComputeApi.new +opts = { + compute_acl_create_acls_request: Fastly::ComputeAclCreateAclsRequest.new, # ComputeAclCreateAclsRequest | +} + +begin + # Create a new ACL + result = api_instance.compute_acl_create_acls(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling AclsInComputeApi->compute_acl_create_acls: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **compute_acl_create_acls_request** | [**ComputeAclCreateAclsRequest**](ComputeAclCreateAclsRequest.md) | | [optional] | + +### Return type + +[**ComputeAclCreateAclsResponse**](ComputeAclCreateAclsResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `compute_acl_delete_s_acl_id()` + +```ruby +compute_acl_delete_s_acl_id(opts) # Delete an ACL +``` + +Delete an ACL. + +### Examples + +```ruby +api_instance = Fastly::AclsInComputeApi.new +opts = { + acl_id: 'acl_id_example', # String | +} + +begin + # Delete an ACL + api_instance.compute_acl_delete_s_acl_id(opts) +rescue Fastly::ApiError => e + puts "Error when calling AclsInComputeApi->compute_acl_delete_s_acl_id: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **acl_id** | **String** | | | + +### Return type + +nil (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `compute_acl_list_acl_entries()` + +```ruby +compute_acl_list_acl_entries(opts): # List an ACL +``` + +List an ACL. + +### Examples + +```ruby +api_instance = Fastly::AclsInComputeApi.new +opts = { + acl_id: 'acl_id_example', # String | + cursor: 'cursor_example', # String | + limit: 56, # Integer | +} + +begin + # List an ACL + result = api_instance.compute_acl_list_acl_entries(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling AclsInComputeApi->compute_acl_list_acl_entries: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **acl_id** | **String** | | | +| **cursor** | **String** | | [optional] | +| **limit** | **Integer** | | [optional][default to 100] | + +### Return type + +[**ComputeAclListEntries**](ComputeAclListEntries.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `compute_acl_list_acls()` + +```ruby +compute_acl_list_acls: > # List ACLs +``` + +List all ACLs. + +### Examples + +```ruby +api_instance = Fastly::AclsInComputeApi.new + +begin + # List ACLs + result = api_instance.compute_acl_list_acls + p result +rescue Fastly::ApiError => e + puts "Error when calling AclsInComputeApi->compute_acl_list_acls: #{e}" +end +``` + +### Options + +This endpoint does not need any parameter. + +### Return type + +[**Array<ComputeAclCreateAclsResponse>**](ComputeAclCreateAclsResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `compute_acl_list_acls_s_acl_id()` + +```ruby +compute_acl_list_acls_s_acl_id(opts): # Describe an ACL +``` + +Describe an ACL. + +### Examples + +```ruby +api_instance = Fastly::AclsInComputeApi.new +opts = { + acl_id: 'acl_id_example', # String | +} + +begin + # Describe an ACL + result = api_instance.compute_acl_list_acls_s_acl_id(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling AclsInComputeApi->compute_acl_list_acls_s_acl_id: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **acl_id** | **String** | | | + +### Return type + +[**ComputeAclCreateAclsResponse**](ComputeAclCreateAclsResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `compute_acl_lookup_acls()` + +```ruby +compute_acl_lookup_acls(opts): # Lookup an ACL +``` + +Find a matching ACL entry for an IP address. + +### Examples + +```ruby +api_instance = Fastly::AclsInComputeApi.new +opts = { + acl_id: 'acl_id_example', # String | + acl_ip: 'acl_ip_example', # String | +} + +begin + # Lookup an ACL + result = api_instance.compute_acl_lookup_acls(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling AclsInComputeApi->compute_acl_lookup_acls: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **acl_id** | **String** | | | +| **acl_ip** | **String** | | | + +### Return type + +[**ComputeAclLookup**](ComputeAclLookup.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `compute_acl_update_acls()` + +```ruby +compute_acl_update_acls(opts) # Update an ACL +``` + +Update an ACL. + +### Examples + +```ruby +api_instance = Fastly::AclsInComputeApi.new +opts = { + acl_id: 'acl_id_example', # String | + compute_acl_update_entry: [Fastly::ComputeAclUpdateEntry.new], # Array | +} + +begin + # Update an ACL + api_instance.compute_acl_update_acls(opts) +rescue Fastly::ApiError => e + puts "Error when calling AclsInComputeApi->compute_acl_update_acls: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **acl_id** | **String** | | | +| **compute_acl_update_entry** | [**Array<ComputeAclUpdateEntry>**](ComputeAclUpdateEntry.md) | | [optional] | + +### Return type + +nil (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/OriginInspectorRealtimeEntryRecorded.md b/docs/ComputeAclCreateAclsRequest.md similarity index 62% rename from docs/OriginInspectorRealtimeEntryRecorded.md rename to docs/ComputeAclCreateAclsRequest.md index 7273b052..4d432a9e 100644 --- a/docs/OriginInspectorRealtimeEntryRecorded.md +++ b/docs/ComputeAclCreateAclsRequest.md @@ -1,9 +1,10 @@ -# Fastly::OriginInspectorRealtimeEntryRecorded +# Fastly::ComputeAclCreateAclsRequest ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **name** | **String** | Human readable name of store | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/ComputeAclCreateAclsResponse.md b/docs/ComputeAclCreateAclsResponse.md new file mode 100644 index 00000000..c02a15e3 --- /dev/null +++ b/docs/ComputeAclCreateAclsResponse.md @@ -0,0 +1,11 @@ +# Fastly::ComputeAclCreateAclsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | Human readable name of store | [optional] | +| **id** | **String** | An example identifier (UUID). | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ComputeAclListEntries.md b/docs/ComputeAclListEntries.md new file mode 100644 index 00000000..070de755 --- /dev/null +++ b/docs/ComputeAclListEntries.md @@ -0,0 +1,11 @@ +# Fastly::ComputeAclListEntries + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **meta** | [**ComputeAclListEntriesMeta**](ComputeAclListEntriesMeta.md) | | [optional] | +| **entries** | [**Array<ComputeAclListEntriesItem>**](ComputeAclListEntriesItem.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ComputeAclListEntriesItem.md b/docs/ComputeAclListEntriesItem.md new file mode 100644 index 00000000..c14b9f02 --- /dev/null +++ b/docs/ComputeAclListEntriesItem.md @@ -0,0 +1,11 @@ +# Fastly::ComputeAclListEntriesItem + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **prefix** | **String** | An IP prefix defined in Classless Inter-Domain Routing (CIDR) format, i.e. a valid IP address (v4 or v6) followed by a forward slash (/) and a prefix length (0-32 or 0-128, depending on address family). | [optional] | +| **action** | **String** | One of \"ALLOW\" or \"BLOCK\". | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ComputeAclListEntriesMeta.md b/docs/ComputeAclListEntriesMeta.md new file mode 100644 index 00000000..6802b6df --- /dev/null +++ b/docs/ComputeAclListEntriesMeta.md @@ -0,0 +1,11 @@ +# Fastly::ComputeAclListEntriesMeta + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **limit** | **String** | The maximum number of results shown in this response. | [optional] | +| **next_cursor** | **String** | Used for pagination, supply to the next request to get the next block of results. | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ComputeAclLookup.md b/docs/ComputeAclLookup.md new file mode 100644 index 00000000..bf7dc47c --- /dev/null +++ b/docs/ComputeAclLookup.md @@ -0,0 +1,12 @@ +# Fastly::ComputeAclLookup + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **prefix** | **String** | A valid IPv4 or IPv6 address. | [optional] | +| **length** | **Integer** | The length of address in the IP addressing space. | [optional] | +| **action** | **String** | One of \"ALLOW\" or \"BLOCK\". | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ComputeAclUpdateEntry.md b/docs/ComputeAclUpdateEntry.md new file mode 100644 index 00000000..4634aae3 --- /dev/null +++ b/docs/ComputeAclUpdateEntry.md @@ -0,0 +1,12 @@ +# Fastly::ComputeAclUpdateEntry + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **op** | **String** | One of \"create\" or \"update\", indicating that the rest of this entry is to be added to/updated in the ACL. | [optional] | +| **prefix** | **String** | An IP prefix defined in Classless Inter-Domain Routing (CIDR) format, i.e. a valid IP address (v4 or v6) followed by a forward slash (/) and a prefix length (0-32 or 0-128, depending on address family). | [optional] | +| **action** | **String** | The action taken on the IP address, either \"block\" or \"allow\". | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ConfiguredProductResponse.md b/docs/ConfiguredProductResponse.md new file mode 100644 index 00000000..bec604e7 --- /dev/null +++ b/docs/ConfiguredProductResponse.md @@ -0,0 +1,13 @@ +# Fastly::ConfiguredProductResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **product** | [**ConfiguredProductResponseProduct**](ConfiguredProductResponseProduct.md) | | [optional] | +| **service** | [**EnabledProductResponseService**](EnabledProductResponseService.md) | | [optional] | +| **configuration** | [**ConfiguredProductResponseConfiguration**](ConfiguredProductResponseConfiguration.md) | | [optional] | +| **_links** | [**ConfiguredProductResponseLinks**](ConfiguredProductResponseLinks.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ConfiguredProductResponseConfiguration.md b/docs/ConfiguredProductResponseConfiguration.md new file mode 100644 index 00000000..bbe109bd --- /dev/null +++ b/docs/ConfiguredProductResponseConfiguration.md @@ -0,0 +1,11 @@ +# Fastly::ConfiguredProductResponseConfiguration + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **workspace_id** | **String** | Workspace ID | [optional] | +| **traffic_ramp** | **String** | Traffic ramp | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ConfiguredProductResponseLinks.md b/docs/ConfiguredProductResponseLinks.md new file mode 100644 index 00000000..d37456f5 --- /dev/null +++ b/docs/ConfiguredProductResponseLinks.md @@ -0,0 +1,11 @@ +# Fastly::ConfiguredProductResponseLinks + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_self** | **String** | Location of resource | [optional] | +| **service** | **String** | Location of the service resource | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ConfiguredProductResponseProduct.md b/docs/ConfiguredProductResponseProduct.md new file mode 100644 index 00000000..8c7cd6ed --- /dev/null +++ b/docs/ConfiguredProductResponseProduct.md @@ -0,0 +1,11 @@ +# Fastly::ConfiguredProductResponseProduct + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Product identifier | [optional] | +| **object** | **String** | Name of the object | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ContactApi.md b/docs/ContactApi.md index 06f3dd77..1b498d0d 100644 --- a/docs/ContactApi.md +++ b/docs/ContactApi.md @@ -14,7 +14,7 @@ api_instance = Fastly::ContactApi.new Method | HTTP request | Description ------ | ------------ | ----------- [**create_contacts**](ContactApi.md#create_contacts) | **POST** /customer/{customer_id}/contacts | Add a new customer contact -[**delete_contact**](ContactApi.md#delete_contact) | **DELETE** /customer/{customer_id}/contact/{contact_id} | Delete a contact +[**delete_contact**](ContactApi.md#delete_contact) | **DELETE** /customer/{customer_id}/contacts/{contact_id} | Delete a contact [**list_contacts**](ContactApi.md#list_contacts) | **GET** /customer/{customer_id}/contacts | List contacts diff --git a/docs/CustomerAddress.md b/docs/CustomerAddress.md new file mode 100644 index 00000000..f6f6ea31 --- /dev/null +++ b/docs/CustomerAddress.md @@ -0,0 +1,16 @@ +# Fastly::CustomerAddress + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | The type of the address. | [optional] | +| **address_1** | **String** | The street number and name of the address. | [optional] | +| **address_2** | **String** | Additional address line for unit number, P.O. Box, etc. | [optional] | +| **locality** | **String** | City, town, or locality name the address is located. | [optional] | +| **region** | **String** | State, province, or region of the address. | [optional] | +| **country** | **String** | ISO 3166-1 alpha-2 country code (e.g., \"US\", \"CA\", \"NZ\") | [optional] | +| **postal_code** | **String** | Postal or Zip code of the address. | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/CustomerAddressesApi.md b/docs/CustomerAddressesApi.md new file mode 100644 index 00000000..e5a28b31 --- /dev/null +++ b/docs/CustomerAddressesApi.md @@ -0,0 +1,127 @@ +# Fastly::CustomerAddressesApi + + +```ruby +require 'fastly' +api_instance = Fastly::CustomerAddressesApi.new +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**create_customer_address**](CustomerAddressesApi.md#create_customer_address) | **POST** /billing/v3/customer-addresses | Creates an address associated with a customer account. +[**list_customer_addresses**](CustomerAddressesApi.md#list_customer_addresses) | **GET** /billing/v3/customer-addresses | Return the list of addresses associated with a customer account. +[**update_customer_address**](CustomerAddressesApi.md#update_customer_address) | **PUT** /billing/v3/customer-addresses/{type} | Updates an address associated with a customer account. + + +## `create_customer_address()` + +```ruby +create_customer_address(opts): # Creates an address associated with a customer account. +``` + +Creates an address associated with a customer account. + +### Examples + +```ruby +api_instance = Fastly::CustomerAddressesApi.new +opts = { + customer_address: Fastly::CustomerAddress.new, # CustomerAddress | +} + +begin + # Creates an address associated with a customer account. + result = api_instance.create_customer_address(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling CustomerAddressesApi->create_customer_address: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **customer_address** | [**CustomerAddress**](CustomerAddress.md) | | | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `list_customer_addresses()` + +```ruby +list_customer_addresses: # Return the list of addresses associated with a customer account. +``` + +Return the list of addresses associated with a customer account. + +### Examples + +```ruby +api_instance = Fastly::CustomerAddressesApi.new + +begin + # Return the list of addresses associated with a customer account. + result = api_instance.list_customer_addresses + p result +rescue Fastly::ApiError => e + puts "Error when calling CustomerAddressesApi->list_customer_addresses: #{e}" +end +``` + +### Options + +This endpoint does not need any parameter. + +### Return type + +[**ListCustomerAddressesResponse**](ListCustomerAddressesResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `update_customer_address()` + +```ruby +update_customer_address(opts) # Updates an address associated with a customer account. +``` + +Updates an address associated with a customer account. + +### Examples + +```ruby +api_instance = Fastly::CustomerAddressesApi.new +opts = { + type: 'type_example', # String | Alphanumeric type of the address being modified. + customer_address: Fastly::CustomerAddress.new, # CustomerAddress | +} + +begin + # Updates an address associated with a customer account. + api_instance.update_customer_address(opts) +rescue Fastly::ApiError => e + puts "Error when calling CustomerAddressesApi->update_customer_address: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | Alphanumeric type of the address being modified. | | +| **customer_address** | [**CustomerAddress**](CustomerAddress.md) | | | + +### Return type + +nil (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/DomainInspector.md b/docs/DomainInspector.md index 8ab4b59e..72db164d 100644 --- a/docs/DomainInspector.md +++ b/docs/DomainInspector.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **timestamp** | [**SubsequentRequestTimestamp**](SubsequentRequestTimestamp.md) | | [optional] | +| **timestamp** | **Integer** | Value to use for subsequent requests. | [optional] | | **aggregate_delay** | **Integer** | Offset of entry timestamps from the current time due to processing time. | [optional] | | **data** | [**Array<DomainInspectorRealtimeEntry>**](DomainInspectorRealtimeEntry.md) | A list of report [entries](#entry-data-model), each representing one second of time. | [optional] | diff --git a/docs/DomainInspectorRealtimeEntry.md b/docs/DomainInspectorRealtimeEntry.md index a9f6af74..f09894c2 100644 --- a/docs/DomainInspectorRealtimeEntry.md +++ b/docs/DomainInspectorRealtimeEntry.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **recorded** | [**RecordedTimestamp**](RecordedTimestamp.md) | | [optional] | +| **recorded** | **Integer** | The Unix timestamp at which this record's data was generated. | [optional] | | **aggregated** | [**Hash<String, DomainInspectorMeasurements>**](DomainInspectorMeasurements.md) | Groups [measurements](#measurements-data-model) by backend name and then by IP address. | [optional] | | **datacenter** | **Hash<String, Hash<String, DomainInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. | [optional] | diff --git a/docs/EnabledProductsApi.md b/docs/EnabledProductsApi.md index 2ccf3291..181a49fb 100644 --- a/docs/EnabledProductsApi.md +++ b/docs/EnabledProductsApi.md @@ -13,9 +13,11 @@ api_instance = Fastly::EnabledProductsApi.new Method | HTTP request | Description ------ | ------------ | ----------- -[**disable_product**](EnabledProductsApi.md#disable_product) | **DELETE** /enabled-products/{product_id}/services/{service_id} | Disable a product -[**enable_product**](EnabledProductsApi.md#enable_product) | **PUT** /enabled-products/{product_id}/services/{service_id} | Enable a product -[**get_enabled_product**](EnabledProductsApi.md#get_enabled_product) | **GET** /enabled-products/{product_id}/services/{service_id} | Get enabled product +[**disable_product**](EnabledProductsApi.md#disable_product) | **DELETE** /enabled-products/v1/{product_id}/services/{service_id} | Disable a product +[**enable_product**](EnabledProductsApi.md#enable_product) | **PUT** /enabled-products/v1/{product_id}/services/{service_id} | Enable a product +[**get_enabled_product**](EnabledProductsApi.md#get_enabled_product) | **GET** /enabled-products/v1/{product_id}/services/{service_id} | Get enabled product +[**get_product_configuration**](EnabledProductsApi.md#get_product_configuration) | **GET** /enabled-products/v1/{product_id}/services/{service_id}/configuration | Get configuration for a product +[**set_product_configuration**](EnabledProductsApi.md#set_product_configuration) | **PATCH** /enabled-products/v1/{product_id}/services/{service_id}/configuration | Update configuration for a product ## `disable_product()` @@ -24,14 +26,14 @@ Method | HTTP request | Description disable_product(opts) # Disable a product ``` -Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`. +Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. ### Examples ```ruby api_instance = Fastly::EnabledProductsApi.new opts = { - product_id: 'origin_inspector', # String | + product_id: 'ngwaf', # String | service_id: 'service_id_example', # String | Alphanumeric string identifying the service. } @@ -62,15 +64,16 @@ nil (empty response body) enable_product(opts): # Enable a product ``` -Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`. +Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. ### Examples ```ruby api_instance = Fastly::EnabledProductsApi.new opts = { - product_id: 'origin_inspector', # String | + product_id: 'ngwaf', # String | service_id: 'service_id_example', # String | Alphanumeric string identifying the service. + set_workspace_id: Fastly::SetWorkspaceId.new, # SetWorkspaceId | } begin @@ -88,6 +91,7 @@ end | ---- | ---- | ----------- | ----- | | **product_id** | **String** | | | | **service_id** | **String** | Alphanumeric string identifying the service. | | +| **set_workspace_id** | [**SetWorkspaceId**](SetWorkspaceId.md) | | [optional] | ### Return type @@ -101,14 +105,14 @@ end get_enabled_product(opts): # Get enabled product ``` -Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`. +Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. ### Examples ```ruby api_instance = Fastly::EnabledProductsApi.new opts = { - product_id: 'origin_inspector', # String | + product_id: 'ngwaf', # String | service_id: 'service_id_example', # String | Alphanumeric string identifying the service. } @@ -134,3 +138,83 @@ end [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) +## `get_product_configuration()` + +```ruby +get_product_configuration(opts): # Get configuration for a product +``` + +Get configuration for an enabled product on a service. Supported product IDs: `ngwaf`. + +### Examples + +```ruby +api_instance = Fastly::EnabledProductsApi.new +opts = { + product_id: 'ngwaf', # String | + service_id: 'service_id_example', # String | Alphanumeric string identifying the service. +} + +begin + # Get configuration for a product + result = api_instance.get_product_configuration(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling EnabledProductsApi->get_product_configuration: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **product_id** | **String** | | | +| **service_id** | **String** | Alphanumeric string identifying the service. | | + +### Return type + +[**ConfiguredProductResponse**](ConfiguredProductResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `set_product_configuration()` + +```ruby +set_product_configuration(opts): # Update configuration for a product +``` + +Update configuration for an enabled product on a service. Supported product IDs: `ngwaf`. + +### Examples + +```ruby +api_instance = Fastly::EnabledProductsApi.new +opts = { + product_id: 'ngwaf', # String | + service_id: 'service_id_example', # String | Alphanumeric string identifying the service. + set_configuration: Fastly::SetConfiguration.new, # SetConfiguration | +} + +begin + # Update configuration for a product + result = api_instance.set_product_configuration(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling EnabledProductsApi->set_product_configuration: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **product_id** | **String** | | | +| **service_id** | **String** | Alphanumeric string identifying the service. | | +| **set_configuration** | [**SetConfiguration**](SetConfiguration.md) | | [optional] | + +### Return type + +[**ConfiguredProductResponse**](ConfiguredProductResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Environment.md b/docs/Environment.md new file mode 100644 index 00000000..964a35c5 --- /dev/null +++ b/docs/Environment.md @@ -0,0 +1,12 @@ +# Fastly::Environment + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | [optional][readonly] | +| **service_id** | **String** | Alphanumeric string identifying the service. | [optional][readonly] | +| **active_version** | **Integer** | | [optional][readonly] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/RecordedTimestamp.md b/docs/EnvironmentName.md similarity index 86% rename from docs/RecordedTimestamp.md rename to docs/EnvironmentName.md index 409534c4..b45e0c41 100644 --- a/docs/RecordedTimestamp.md +++ b/docs/EnvironmentName.md @@ -1,4 +1,4 @@ -# Fastly::RecordedTimestamp +# Fastly::EnvironmentName ## Properties diff --git a/docs/OriginInspectorSubsequentRequestTimestamp.md b/docs/InlineResponse201.md similarity index 61% rename from docs/OriginInspectorSubsequentRequestTimestamp.md rename to docs/InlineResponse201.md index 924b4c25..8c54ef89 100644 --- a/docs/OriginInspectorSubsequentRequestTimestamp.md +++ b/docs/InlineResponse201.md @@ -1,9 +1,10 @@ -# Fastly::OriginInspectorSubsequentRequestTimestamp +# Fastly::InlineResponse201 ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **id** | **String** | Alphanumeric string identifying the address. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/SubsequentRequestTimestamp.md b/docs/ListCustomerAddressesResponse.md similarity index 58% rename from docs/SubsequentRequestTimestamp.md rename to docs/ListCustomerAddressesResponse.md index 124f8e7d..55e9291c 100644 --- a/docs/SubsequentRequestTimestamp.md +++ b/docs/ListCustomerAddressesResponse.md @@ -1,9 +1,10 @@ -# Fastly::SubsequentRequestTimestamp +# Fastly::ListCustomerAddressesResponse ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **data** | [**Array<CustomerAddress>**](CustomerAddress.md) | | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/OriginInspector.md b/docs/OriginInspector.md index e7999735..7f5d180c 100644 --- a/docs/OriginInspector.md +++ b/docs/OriginInspector.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **timestamp** | [**OriginInspectorSubsequentRequestTimestamp**](OriginInspectorSubsequentRequestTimestamp.md) | | [optional] | +| **timestamp** | **Integer** | Value to use for subsequent requests. | [optional] | | **aggregate_delay** | **Integer** | Offset of entry timestamps from the current time due to processing time. | [optional] | | **data** | [**Array<OriginInspectorRealtimeEntry>**](OriginInspectorRealtimeEntry.md) | A list of report [entries](#entry-data-model), each representing one second of time. | [optional] | diff --git a/docs/OriginInspectorRealtimeEntry.md b/docs/OriginInspectorRealtimeEntry.md index dcc6ee20..699c2d5f 100644 --- a/docs/OriginInspectorRealtimeEntry.md +++ b/docs/OriginInspectorRealtimeEntry.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **recorded** | [**OriginInspectorRealtimeEntryRecorded**](OriginInspectorRealtimeEntryRecorded.md) | | [optional] | +| **recorded** | **Integer** | The Unix timestamp at which this record's data was generated. | [optional] | | **aggregated** | [**Hash<String, OriginInspectorMeasurements>**](OriginInspectorMeasurements.md) | Groups [measurements](#measurements-data-model) by backend name. | [optional] | | **datacenter** | **Hash<String, Hash<String, OriginInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. | [optional] | diff --git a/docs/RealtimeEntryAggregated.md b/docs/RealtimeEntryAggregated.md index 7eae5506..2cff6781 100644 --- a/docs/RealtimeEntryAggregated.md +++ b/docs/RealtimeEntryAggregated.md @@ -253,6 +253,7 @@ | **all_status_4xx** | **Integer** | Number of \"Client Error\" codes delivered for all sources. | [optional] | | **all_status_5xx** | **Integer** | Number of \"Server Error\" codes delivered for all sources. | [optional] | | **origin_offload** | **Float** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] | +| **request_denied_get_head_body** | **Integer** | Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/RealtimeMeasurements.md b/docs/RealtimeMeasurements.md index 0f962fad..8b2c1969 100644 --- a/docs/RealtimeMeasurements.md +++ b/docs/RealtimeMeasurements.md @@ -253,6 +253,7 @@ | **all_status_4xx** | **Integer** | Number of \"Client Error\" codes delivered for all sources. | [optional] | | **all_status_5xx** | **Integer** | Number of \"Server Error\" codes delivered for all sources. | [optional] | | **origin_offload** | **Float** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] | +| **request_denied_get_head_body** | **Integer** | Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Results.md b/docs/Results.md index 40fe6d31..32c41bc0 100644 --- a/docs/Results.md +++ b/docs/Results.md @@ -253,6 +253,7 @@ | **all_status_4xx** | **Integer** | Number of \"Client Error\" codes delivered for all sources. | [optional] | | **all_status_5xx** | **Integer** | Number of \"Server Error\" codes delivered for all sources. | [optional] | | **origin_offload** | **Float** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] | +| **request_denied_get_head_body** | **Integer** | Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. | [optional] | | **service_id** | **String** | | [optional][readonly] | | **start_time** | **Integer** | Timestamp for the start of the time period being reported | [optional] | diff --git a/docs/SchemasVersionResponse.md b/docs/SchemasVersionResponse.md index d3693696..ee9d1dab 100644 --- a/docs/SchemasVersionResponse.md +++ b/docs/SchemasVersionResponse.md @@ -15,6 +15,7 @@ | **deleted_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **updated_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **service_id** | **String** | | [optional][readonly] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/ServiceDetail.md b/docs/ServiceDetail.md index 18e965f8..b6691a5b 100644 --- a/docs/ServiceDetail.md +++ b/docs/ServiceDetail.md @@ -15,6 +15,7 @@ | **publish_key** | **String** | Unused at this time. | [optional] | | **paused** | **Boolean** | Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. | [optional] | | **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | | **active_version** | [**ServiceVersionDetailOrNull**](ServiceVersionDetailOrNull.md) | | [optional] | | **version** | [**ServiceVersionDetail**](ServiceVersionDetail.md) | | [optional] | diff --git a/docs/ServiceListResponse.md b/docs/ServiceListResponse.md index f6d0eea1..fe7dd70d 100644 --- a/docs/ServiceListResponse.md +++ b/docs/ServiceListResponse.md @@ -14,6 +14,7 @@ | **id** | **String** | | [optional][readonly] | | **version** | **Integer** | Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. | [optional] | | **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/ServiceListResponseAllOf.md b/docs/ServiceListResponseAllOf.md index fec375f1..1b8ef598 100644 --- a/docs/ServiceListResponseAllOf.md +++ b/docs/ServiceListResponseAllOf.md @@ -7,6 +7,7 @@ | **id** | **String** | | [optional][readonly] | | **version** | **Integer** | Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. | [optional] | | **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/ServiceResponse.md b/docs/ServiceResponse.md index 83061884..9b63aa65 100644 --- a/docs/ServiceResponse.md +++ b/docs/ServiceResponse.md @@ -15,6 +15,7 @@ | **publish_key** | **String** | Unused at this time. | [optional] | | **paused** | **Boolean** | Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. | [optional] | | **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/ServiceResponseAllOf.md b/docs/ServiceResponseAllOf.md index 3b1388e2..bdb08869 100644 --- a/docs/ServiceResponseAllOf.md +++ b/docs/ServiceResponseAllOf.md @@ -8,6 +8,7 @@ | **publish_key** | **String** | Unused at this time. | [optional] | | **paused** | **Boolean** | Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. | [optional] | | **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/ServiceVersionDetail.md b/docs/ServiceVersionDetail.md index fb9a3730..fc3deeba 100644 --- a/docs/ServiceVersionDetail.md +++ b/docs/ServiceVersionDetail.md @@ -15,6 +15,7 @@ | **deleted_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **updated_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **service_id** | **String** | | [optional][readonly] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | | **backends** | [**Array<BackendResponse>**](BackendResponse.md) | List of backends associated to this service. | [optional] | | **cache_settings** | [**Array<CacheSettingResponse>**](CacheSettingResponse.md) | List of cache settings associated to this service. | [optional] | | **conditions** | [**Array<ConditionResponse>**](ConditionResponse.md) | List of conditions associated to this service. | [optional] | diff --git a/docs/ServiceVersionDetailOrNull.md b/docs/ServiceVersionDetailOrNull.md index aca80438..ddaad219 100644 --- a/docs/ServiceVersionDetailOrNull.md +++ b/docs/ServiceVersionDetailOrNull.md @@ -15,6 +15,7 @@ | **deleted_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **updated_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **service_id** | **String** | | [optional][readonly] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | | **backends** | [**Array<BackendResponse>**](BackendResponse.md) | List of backends associated to this service. | [optional] | | **cache_settings** | [**Array<CacheSettingResponse>**](CacheSettingResponse.md) | List of cache settings associated to this service. | [optional] | | **conditions** | [**Array<ConditionResponse>**](ConditionResponse.md) | List of conditions associated to this service. | [optional] | diff --git a/docs/SetConfiguration.md b/docs/SetConfiguration.md new file mode 100644 index 00000000..75981178 --- /dev/null +++ b/docs/SetConfiguration.md @@ -0,0 +1,11 @@ +# Fastly::SetConfiguration + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **workspace_id** | **String** | The new workspace_id. Required in the `PUT` request body when `product_id` is `ngwaf`. Optional in the `PATCH` request body for `ngwaf`. | [optional] | +| **traffic_ramp** | **String** | The new traffic ramp. Optional in the `PATCH` request body for `ngwaf`. | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/SetWorkspaceId.md b/docs/SetWorkspaceId.md new file mode 100644 index 00000000..f4c5bf61 --- /dev/null +++ b/docs/SetWorkspaceId.md @@ -0,0 +1,10 @@ +# Fastly::SetWorkspaceId + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **workspace_id** | **String** | The workspace to link with the Next-Gen WAF product. Note this body is only supported and required when `product_id` is `ngwaf` | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/TlsCertificatesApi.md b/docs/TlsCertificatesApi.md index 8523cacb..d188dca3 100644 --- a/docs/TlsCertificatesApi.md +++ b/docs/TlsCertificatesApi.md @@ -185,9 +185,9 @@ opts = { filter_not_after: 'filter_not_after_example', # String | Limit the returned certificates to those that expire prior to the specified date in UTC. Accepts parameters: lte (e.g., filter[not_after][lte]=2020-05-05). filter_tls_domains_id: 'filter_tls_domains_id_example', # String | Limit the returned certificates to those that include the specific domain. include: 'include_example', # String | Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`. + sort: 'created_at', # String | The order in which to list the results. page_number: 1, # Integer | Current page. page_size: 20, # Integer | Number of records per page. - sort: 'created_at', # String | The order in which to list the results by creation date. } begin @@ -207,9 +207,9 @@ end | **filter_not_after** | **String** | Limit the returned certificates to those that expire prior to the specified date in UTC. Accepts parameters: lte (e.g., filter[not_after][lte]=2020-05-05). | [optional] | | **filter_tls_domains_id** | **String** | Limit the returned certificates to those that include the specific domain. | [optional] | | **include** | **String** | Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`. | [optional] | +| **sort** | **String** | The order in which to list the results. | [optional][default to '-created_at'] | | **page_number** | **Integer** | Current page. | [optional] | | **page_size** | **Integer** | Number of records per page. | [optional][default to 20] | -| **sort** | **String** | The order in which to list the results by creation date. | [optional][default to 'created_at'] | ### Return type diff --git a/docs/TlsDomainsApi.md b/docs/TlsDomainsApi.md index b30bf92d..0ecdb111 100644 --- a/docs/TlsDomainsApi.md +++ b/docs/TlsDomainsApi.md @@ -33,9 +33,9 @@ opts = { filter_tls_certificates_id: 'filter_tls_certificates_id_example', # String | Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list. filter_tls_subscriptions_id: 'filter_tls_subscriptions_id_example', # String | Optional. Limit the returned domains to those for a given TLS subscription. include: 'include_example', # String | Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. + sort: 'tls_activations.created_at', # String | The order in which to list the results. page_number: 1, # Integer | Current page. page_size: 20, # Integer | Number of records per page. - sort: 'created_at', # String | The order in which to list the results by creation date. } begin @@ -55,9 +55,9 @@ end | **filter_tls_certificates_id** | **String** | Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list. | [optional] | | **filter_tls_subscriptions_id** | **String** | Optional. Limit the returned domains to those for a given TLS subscription. | [optional] | | **include** | **String** | Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. | [optional] | +| **sort** | **String** | The order in which to list the results. | [optional][default to 'id'] | | **page_number** | **Integer** | Current page. | [optional] | | **page_size** | **Integer** | Number of records per page. | [optional][default to 20] | -| **sort** | **String** | The order in which to list the results by creation date. | [optional][default to 'created_at'] | ### Return type diff --git a/docs/TlsSubscriptionsApi.md b/docs/TlsSubscriptionsApi.md index 826a0762..50835161 100644 --- a/docs/TlsSubscriptionsApi.md +++ b/docs/TlsSubscriptionsApi.md @@ -234,10 +234,10 @@ opts = { filter_tls_domains_id: 'filter_tls_domains_id_example', # String | Limit the returned subscriptions to those that include the specific domain. filter_has_active_order: true, # Boolean | Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. filter_certificate_authority: 'filter_certificate_authority_example', # String | Limit the returned subscriptions to a specific certification authority. Values may include `certainly`, `lets-encrypt`, or `globalsign`. + sort: 'created_at', # String | The order in which to list the results. include: 'tls_authorizations', # String | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, `tls_authorizations.self_managed_http_challenge`, and `tls_certificates`. page_number: 1, # Integer | Current page. page_size: 20, # Integer | Number of records per page. - sort: 'created_at', # String | The order in which to list the results by creation date. } begin @@ -257,10 +257,10 @@ end | **filter_tls_domains_id** | **String** | Limit the returned subscriptions to those that include the specific domain. | [optional] | | **filter_has_active_order** | **Boolean** | Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. | [optional] | | **filter_certificate_authority** | **String** | Limit the returned subscriptions to a specific certification authority. Values may include `certainly`, `lets-encrypt`, or `globalsign`. | [optional] | +| **sort** | **String** | The order in which to list the results. | [optional][default to '-created_at'] | | **include** | **String** | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, `tls_authorizations.self_managed_http_challenge`, and `tls_certificates`. | [optional] | | **page_number** | **Integer** | Current page. | [optional] | | **page_size** | **Integer** | Number of records per page. | [optional][default to 20] | -| **sort** | **String** | The order in which to list the results by creation date. | [optional][default to 'created_at'] | ### Return type diff --git a/docs/VersionApi.md b/docs/VersionApi.md index 6a0b80ce..5659a262 100644 --- a/docs/VersionApi.md +++ b/docs/VersionApi.md @@ -14,9 +14,11 @@ api_instance = Fastly::VersionApi.new Method | HTTP request | Description ------ | ------------ | ----------- [**activate_service_version**](VersionApi.md#activate_service_version) | **PUT** /service/{service_id}/version/{version_id}/activate | Activate a service version +[**activate_service_version_environment**](VersionApi.md#activate_service_version_environment) | **PUT** /service/{service_id}/version/{version_id}/activate/{environment_name} | Activate a service version on the specified environment [**clone_service_version**](VersionApi.md#clone_service_version) | **PUT** /service/{service_id}/version/{version_id}/clone | Clone a service version [**create_service_version**](VersionApi.md#create_service_version) | **POST** /service/{service_id}/version | Create a service version [**deactivate_service_version**](VersionApi.md#deactivate_service_version) | **PUT** /service/{service_id}/version/{version_id}/deactivate | Deactivate a service version +[**deactivate_service_version_environment**](VersionApi.md#deactivate_service_version_environment) | **PUT** /service/{service_id}/version/{version_id}/deactivate/{environment_name} | Deactivate a service version on an environment [**get_service_version**](VersionApi.md#get_service_version) | **GET** /service/{service_id}/version/{version_id} | Get a version of a service [**list_service_versions**](VersionApi.md#list_service_versions) | **GET** /service/{service_id}/version | List versions of a service [**lock_service_version**](VersionApi.md#lock_service_version) | **PUT** /service/{service_id}/version/{version_id}/lock | Lock a service version @@ -61,6 +63,47 @@ end [**VersionResponse**](VersionResponse.md) +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `activate_service_version_environment()` + +```ruby +activate_service_version_environment(opts): # Activate a service version on the specified environment +``` + +Activate a version on a given environment, i.e. \"staging\" + +### Examples + +```ruby +api_instance = Fastly::VersionApi.new +opts = { + service_id: 'service_id_example', # String | Alphanumeric string identifying the service. + version_id: 56, # Integer | Integer identifying a service version. + environment_name: Fastly::EnvironmentName::STAGING, # EnvironmentName | +} + +begin + # Activate a service version on the specified environment + result = api_instance.activate_service_version_environment(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling VersionApi->activate_service_version_environment: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **service_id** | **String** | Alphanumeric string identifying the service. | | +| **version_id** | **Integer** | Integer identifying a service version. | | +| **environment_name** | [**EnvironmentName**](.md) | | | + +### Return type + +[**VersionResponse**](VersionResponse.md) + [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) ## `clone_service_version()` @@ -176,6 +219,47 @@ end [**VersionResponse**](VersionResponse.md) +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `deactivate_service_version_environment()` + +```ruby +deactivate_service_version_environment(opts): # Deactivate a service version on an environment +``` + +Deactivate the current version on a given environment, i.e. \"staging\" + +### Examples + +```ruby +api_instance = Fastly::VersionApi.new +opts = { + service_id: 'service_id_example', # String | Alphanumeric string identifying the service. + version_id: 56, # Integer | Integer identifying a service version. + environment_name: Fastly::EnvironmentName::STAGING, # EnvironmentName | +} + +begin + # Deactivate a service version on an environment + result = api_instance.deactivate_service_version_environment(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling VersionApi->deactivate_service_version_environment: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **service_id** | **String** | Alphanumeric string identifying the service. | | +| **version_id** | **Integer** | Integer identifying a service version. | | +| **environment_name** | [**EnvironmentName**](.md) | | | + +### Return type + +[**VersionResponse**](VersionResponse.md) + [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) ## `get_service_version()` diff --git a/docs/VersionResponse.md b/docs/VersionResponse.md index 4ba42c6d..55b4e06b 100644 --- a/docs/VersionResponse.md +++ b/docs/VersionResponse.md @@ -15,6 +15,7 @@ | **deleted_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **updated_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **service_id** | **String** | | [optional][readonly] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/VersionResponseAllOf.md b/docs/VersionResponseAllOf.md index 93311c0c..47c548cc 100644 --- a/docs/VersionResponseAllOf.md +++ b/docs/VersionResponseAllOf.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **service_id** | **String** | | [optional][readonly] | +| **environments** | [**Array<Environment>**](Environment.md) | A list of environments where the service has been deployed. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/fastly.rb b/lib/fastly.rb index 63a75b96..698ae8c2 100644 --- a/lib/fastly.rb +++ b/lib/fastly.rb @@ -72,6 +72,13 @@ require 'fastly/models/cache_setting' require 'fastly/models/cache_setting_response' require 'fastly/models/client_key' +require 'fastly/models/compute_acl_create_acls_request' +require 'fastly/models/compute_acl_create_acls_response' +require 'fastly/models/compute_acl_list_entries' +require 'fastly/models/compute_acl_list_entries_item' +require 'fastly/models/compute_acl_list_entries_meta' +require 'fastly/models/compute_acl_lookup' +require 'fastly/models/compute_acl_update_entry' require 'fastly/models/condition' require 'fastly/models/condition_response' require 'fastly/models/config_store' @@ -81,6 +88,10 @@ require 'fastly/models/config_store_item_response_all_of' require 'fastly/models/config_store_response' require 'fastly/models/config_store_response_all_of' +require 'fastly/models/configured_product_response' +require 'fastly/models/configured_product_response_configuration' +require 'fastly/models/configured_product_response_links' +require 'fastly/models/configured_product_response_product' require 'fastly/models/contact' require 'fastly/models/contact_response' require 'fastly/models/contact_response_all_of' @@ -88,6 +99,7 @@ require 'fastly/models/create_dashboard_request' require 'fastly/models/create_response_object_request' require 'fastly/models/customer' +require 'fastly/models/customer_address' require 'fastly/models/customer_response' require 'fastly/models/customer_response_all_of' require 'fastly/models/dashboard' @@ -124,6 +136,8 @@ require 'fastly/models/enabled_product_response_links' require 'fastly/models/enabled_product_response_product' require 'fastly/models/enabled_product_response_service' +require 'fastly/models/environment' +require 'fastly/models/environment_name' require 'fastly/models/eom_invoice_response' require 'fastly/models/error' require 'fastly/models/error_response_data' @@ -198,6 +212,7 @@ require 'fastly/models/inline_response2005' require 'fastly/models/inline_response2006' require 'fastly/models/inline_response2007' +require 'fastly/models/inline_response201' require 'fastly/models/inline_response400' require 'fastly/models/invitation' require 'fastly/models/invitation_data' @@ -219,6 +234,7 @@ require 'fastly/models/legacy_waf_tag' require 'fastly/models/legacy_waf_update_status' require 'fastly/models/line_item_data' +require 'fastly/models/list_customer_addresses_response' require 'fastly/models/list_dashboards_response' require 'fastly/models/list_eom_invoices_response' require 'fastly/models/listinvoices' @@ -318,8 +334,6 @@ require 'fastly/models/origin_inspector_historical_meta_filters' require 'fastly/models/origin_inspector_measurements' require 'fastly/models/origin_inspector_realtime_entry' -require 'fastly/models/origin_inspector_realtime_entry_recorded' -require 'fastly/models/origin_inspector_subsequent_request_timestamp' require 'fastly/models/origin_inspector_values' require 'fastly/models/package' require 'fastly/models/package_metadata' @@ -361,7 +375,6 @@ require 'fastly/models/realtime_entry_aggregated' require 'fastly/models/realtime_entry_recorded' require 'fastly/models/realtime_measurements' -require 'fastly/models/recorded_timestamp' require 'fastly/models/relationship_common_name' require 'fastly/models/relationship_customer' require 'fastly/models/relationship_customer_customer' @@ -524,6 +537,8 @@ require 'fastly/models/serviceusagemetrics_data' require 'fastly/models/serviceusagetype' require 'fastly/models/serviceusagetypes' +require 'fastly/models/set_configuration' +require 'fastly/models/set_workspace_id' require 'fastly/models/settings' require 'fastly/models/settings_response' require 'fastly/models/signing_key' @@ -543,7 +558,6 @@ require 'fastly/models/stats' require 'fastly/models/store' require 'fastly/models/store_response' -require 'fastly/models/subsequent_request_timestamp' require 'fastly/models/sudo_generic_token_error' require 'fastly/models/sudo_request' require 'fastly/models/sudo_response' @@ -743,6 +757,7 @@ # APIs require 'fastly/api/acl_api' require 'fastly/api/acl_entry_api' +require 'fastly/api/acls_in_compute_api' require 'fastly/api/apex_redirect_api' require 'fastly/api/automation_tokens_api' require 'fastly/api/backend_api' @@ -757,6 +772,7 @@ require 'fastly/api/contact_api' require 'fastly/api/content_api' require 'fastly/api/customer_api' +require 'fastly/api/customer_addresses_api' require 'fastly/api/dictionary_api' require 'fastly/api/dictionary_info_api' require 'fastly/api/dictionary_item_api' diff --git a/lib/fastly/api/acls_in_compute_api.rb b/lib/fastly/api/acls_in_compute_api.rb new file mode 100644 index 00000000..568af2c8 --- /dev/null +++ b/lib/fastly/api/acls_in_compute_api.rb @@ -0,0 +1,470 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'cgi' + +module Fastly + class AclsInComputeApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create a new ACL + # Create a new ACL. + # @option opts [ComputeAclCreateAclsRequest] :compute_acl_create_acls_request + # @return [ComputeAclCreateAclsResponse] + def compute_acl_create_acls(opts = {}) + data, _status_code, _headers = compute_acl_create_acls_with_http_info(opts) + data + end + + # Create a new ACL + # Create a new ACL. + # @option opts [ComputeAclCreateAclsRequest] :compute_acl_create_acls_request + # @return [Array<(ComputeAclCreateAclsResponse, Integer, Hash)>] ComputeAclCreateAclsResponse data, response status code and response headers + def compute_acl_create_acls_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AclsInComputeApi.compute_acl_create_acls ...' + end + # unbox the parameters from the hash + # resource path + local_var_path = '/resources/acls' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'compute_acl_create_acls_request']) + + # return_type + return_type = opts[:debug_return_type] || 'ComputeAclCreateAclsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"AclsInComputeApi.compute_acl_create_acls", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AclsInComputeApi#compute_acl_create_acls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete an ACL + # Delete an ACL. + # @option opts [String] :acl_id (required) + # @return [nil] + def compute_acl_delete_s_acl_id(opts = {}) + compute_acl_delete_s_acl_id_with_http_info(opts) + nil + end + + # Delete an ACL + # Delete an ACL. + # @option opts [String] :acl_id (required) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def compute_acl_delete_s_acl_id_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AclsInComputeApi.compute_acl_delete_s_acl_id ...' + end + # unbox the parameters from the hash + acl_id = opts[:'acl_id'] + # verify the required parameter 'acl_id' is set + if @api_client.config.client_side_validation && acl_id.nil? + fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclsInComputeApi.compute_acl_delete_s_acl_id" + end + # resource path + local_var_path = '/resources/acls/{acl_id}'.sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"AclsInComputeApi.compute_acl_delete_s_acl_id", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AclsInComputeApi#compute_acl_delete_s_acl_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List an ACL + # List an ACL. + # @option opts [String] :acl_id (required) + # @option opts [String] :cursor + # @option opts [Integer] :limit (default to 100) + # @return [ComputeAclListEntries] + def compute_acl_list_acl_entries(opts = {}) + data, _status_code, _headers = compute_acl_list_acl_entries_with_http_info(opts) + data + end + + # List an ACL + # List an ACL. + # @option opts [String] :acl_id (required) + # @option opts [String] :cursor + # @option opts [Integer] :limit (default to 100) + # @return [Array<(ComputeAclListEntries, Integer, Hash)>] ComputeAclListEntries data, response status code and response headers + def compute_acl_list_acl_entries_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AclsInComputeApi.compute_acl_list_acl_entries ...' + end + # unbox the parameters from the hash + acl_id = opts[:'acl_id'] + # verify the required parameter 'acl_id' is set + if @api_client.config.client_side_validation && acl_id.nil? + fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclsInComputeApi.compute_acl_list_acl_entries" + end + # resource path + local_var_path = '/resources/acls/{acl_id}/entries'.sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ComputeAclListEntries' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"AclsInComputeApi.compute_acl_list_acl_entries", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AclsInComputeApi#compute_acl_list_acl_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List ACLs + # List all ACLs. + # @return [Array] + def compute_acl_list_acls(opts = {}) + data, _status_code, _headers = compute_acl_list_acls_with_http_info(opts) + data + end + + # List ACLs + # List all ACLs. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def compute_acl_list_acls_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AclsInComputeApi.compute_acl_list_acls ...' + end + # unbox the parameters from the hash + # resource path + local_var_path = '/resources/acls' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"AclsInComputeApi.compute_acl_list_acls", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AclsInComputeApi#compute_acl_list_acls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Describe an ACL + # Describe an ACL. + # @option opts [String] :acl_id (required) + # @return [ComputeAclCreateAclsResponse] + def compute_acl_list_acls_s_acl_id(opts = {}) + data, _status_code, _headers = compute_acl_list_acls_s_acl_id_with_http_info(opts) + data + end + + # Describe an ACL + # Describe an ACL. + # @option opts [String] :acl_id (required) + # @return [Array<(ComputeAclCreateAclsResponse, Integer, Hash)>] ComputeAclCreateAclsResponse data, response status code and response headers + def compute_acl_list_acls_s_acl_id_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AclsInComputeApi.compute_acl_list_acls_s_acl_id ...' + end + # unbox the parameters from the hash + acl_id = opts[:'acl_id'] + # verify the required parameter 'acl_id' is set + if @api_client.config.client_side_validation && acl_id.nil? + fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclsInComputeApi.compute_acl_list_acls_s_acl_id" + end + # resource path + local_var_path = '/resources/acls/{acl_id}'.sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ComputeAclCreateAclsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"AclsInComputeApi.compute_acl_list_acls_s_acl_id", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AclsInComputeApi#compute_acl_list_acls_s_acl_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Lookup an ACL + # Find a matching ACL entry for an IP address. + # @option opts [String] :acl_id (required) + # @option opts [String] :acl_ip (required) + # @return [ComputeAclLookup] + def compute_acl_lookup_acls(opts = {}) + data, _status_code, _headers = compute_acl_lookup_acls_with_http_info(opts) + data + end + + # Lookup an ACL + # Find a matching ACL entry for an IP address. + # @option opts [String] :acl_id (required) + # @option opts [String] :acl_ip (required) + # @return [Array<(ComputeAclLookup, Integer, Hash)>] ComputeAclLookup data, response status code and response headers + def compute_acl_lookup_acls_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AclsInComputeApi.compute_acl_lookup_acls ...' + end + # unbox the parameters from the hash + acl_id = opts[:'acl_id'] + acl_ip = opts[:'acl_ip'] + # verify the required parameter 'acl_id' is set + if @api_client.config.client_side_validation && acl_id.nil? + fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclsInComputeApi.compute_acl_lookup_acls" + end + # verify the required parameter 'acl_ip' is set + if @api_client.config.client_side_validation && acl_ip.nil? + fail ArgumentError, "Missing the required parameter 'acl_ip' when calling AclsInComputeApi.compute_acl_lookup_acls" + end + # resource path + local_var_path = '/resources/acls/{acl_id}/entry/{acl_ip}'.sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s)).sub('{' + 'acl_ip' + '}', CGI.escape(acl_ip.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ComputeAclLookup' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"AclsInComputeApi.compute_acl_lookup_acls", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AclsInComputeApi#compute_acl_lookup_acls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update an ACL + # Update an ACL. + # @option opts [String] :acl_id (required) + # @option opts [Array] :compute_acl_update_entry + # @return [nil] + def compute_acl_update_acls(opts = {}) + compute_acl_update_acls_with_http_info(opts) + nil + end + + # Update an ACL + # Update an ACL. + # @option opts [String] :acl_id (required) + # @option opts [Array] :compute_acl_update_entry + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def compute_acl_update_acls_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AclsInComputeApi.compute_acl_update_acls ...' + end + # unbox the parameters from the hash + acl_id = opts[:'acl_id'] + # verify the required parameter 'acl_id' is set + if @api_client.config.client_side_validation && acl_id.nil? + fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclsInComputeApi.compute_acl_update_acls" + end + # resource path + local_var_path = '/resources/acls/{acl_id}/entries'.sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'compute_acl_update_entry']) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"AclsInComputeApi.compute_acl_update_acls", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AclsInComputeApi#compute_acl_update_acls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/fastly/api/contact_api.rb b/lib/fastly/api/contact_api.rb index 6b2006ef..a50c7310 100644 --- a/lib/fastly/api/contact_api.rb +++ b/lib/fastly/api/contact_api.rb @@ -138,7 +138,7 @@ def delete_contact_with_http_info(opts = {}) fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactApi.delete_contact" end # resource path - local_var_path = '/customer/{customer_id}/contact/{contact_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)).sub('{' + 'contact_id' + '}', CGI.escape(contact_id.to_s)) + local_var_path = '/customer/{customer_id}/contacts/{contact_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s)).sub('{' + 'contact_id' + '}', CGI.escape(contact_id.to_s)) # query parameters query_params = opts[:query_params] || {} diff --git a/lib/fastly/api/customer_addresses_api.rb b/lib/fastly/api/customer_addresses_api.rb new file mode 100644 index 00000000..609ef241 --- /dev/null +++ b/lib/fastly/api/customer_addresses_api.rb @@ -0,0 +1,224 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'cgi' + +module Fastly + class CustomerAddressesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Creates an address associated with a customer account. + # Creates an address associated with a customer account. + # @option opts [CustomerAddress] :customer_address (required) + # @return [InlineResponse201] + def create_customer_address(opts = {}) + data, _status_code, _headers = create_customer_address_with_http_info(opts) + data + end + + # Creates an address associated with a customer account. + # Creates an address associated with a customer account. + # @option opts [CustomerAddress] :customer_address (required) + # @return [Array<(InlineResponse201, Integer, Hash)>] InlineResponse201 data, response status code and response headers + def create_customer_address_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomerAddressesApi.create_customer_address ...' + end + # unbox the parameters from the hash + customer_address = opts[:'customer_address'] + # verify the required parameter 'customer_address' is set + if @api_client.config.client_side_validation && customer_address.nil? + fail ArgumentError, "Missing the required parameter 'customer_address' when calling CustomerAddressesApi.create_customer_address" + end + # resource path + local_var_path = '/billing/v3/customer-addresses' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(customer_address) + + # return_type + return_type = opts[:debug_return_type] || 'InlineResponse201' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"CustomerAddressesApi.create_customer_address", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CustomerAddressesApi#create_customer_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Return the list of addresses associated with a customer account. + # Return the list of addresses associated with a customer account. + # @return [ListCustomerAddressesResponse] + def list_customer_addresses(opts = {}) + data, _status_code, _headers = list_customer_addresses_with_http_info(opts) + data + end + + # Return the list of addresses associated with a customer account. + # Return the list of addresses associated with a customer account. + # @return [Array<(ListCustomerAddressesResponse, Integer, Hash)>] ListCustomerAddressesResponse data, response status code and response headers + def list_customer_addresses_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomerAddressesApi.list_customer_addresses ...' + end + # unbox the parameters from the hash + # resource path + local_var_path = '/billing/v3/customer-addresses' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ListCustomerAddressesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"CustomerAddressesApi.list_customer_addresses", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CustomerAddressesApi#list_customer_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Updates an address associated with a customer account. + # Updates an address associated with a customer account. + # @option opts [String] :type Alphanumeric type of the address being modified. (required) + # @option opts [CustomerAddress] :customer_address (required) + # @return [nil] + def update_customer_address(opts = {}) + update_customer_address_with_http_info(opts) + nil + end + + # Updates an address associated with a customer account. + # Updates an address associated with a customer account. + # @option opts [String] :type Alphanumeric type of the address being modified. (required) + # @option opts [CustomerAddress] :customer_address (required) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def update_customer_address_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomerAddressesApi.update_customer_address ...' + end + # unbox the parameters from the hash + type = opts[:'type'] + customer_address = opts[:'customer_address'] + # verify the required parameter 'type' is set + if @api_client.config.client_side_validation && type.nil? + fail ArgumentError, "Missing the required parameter 'type' when calling CustomerAddressesApi.update_customer_address" + end + pattern = Regexp.new(/^(tax|billing)$/) + if @api_client.config.client_side_validation && type !~ pattern + fail ArgumentError, "invalid value for 'type' when calling CustomerAddressesApi.update_customer_address, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'customer_address' is set + if @api_client.config.client_side_validation && customer_address.nil? + fail ArgumentError, "Missing the required parameter 'customer_address' when calling CustomerAddressesApi.update_customer_address" + end + # resource path + local_var_path = '/billing/v3/customer-addresses/{type}'.sub('{' + 'type' + '}', CGI.escape(type.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(customer_address) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"CustomerAddressesApi.update_customer_address", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CustomerAddressesApi#update_customer_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/fastly/api/enabled_products_api.rb b/lib/fastly/api/enabled_products_api.rb index 791311f5..5dfab789 100644 --- a/lib/fastly/api/enabled_products_api.rb +++ b/lib/fastly/api/enabled_products_api.rb @@ -18,7 +18,7 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end # Disable a product - # Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`. + # Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. # @option opts [String] :product_id (required) # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @return [nil] @@ -28,7 +28,7 @@ def disable_product(opts = {}) end # Disable a product - # Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`. + # Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. # @option opts [String] :product_id (required) # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers @@ -48,7 +48,7 @@ def disable_product_with_http_info(opts = {}) fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.disable_product" end # resource path - local_var_path = '/enabled-products/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) + local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -86,9 +86,10 @@ def disable_product_with_http_info(opts = {}) end # Enable a product - # Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`. + # Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. # @option opts [String] :product_id (required) # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @option opts [SetWorkspaceId] :set_workspace_id # @return [EnabledProductResponse] def enable_product(opts = {}) data, _status_code, _headers = enable_product_with_http_info(opts) @@ -96,9 +97,10 @@ def enable_product(opts = {}) end # Enable a product - # Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`. + # Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. # @option opts [String] :product_id (required) # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @option opts [SetWorkspaceId] :set_workspace_id # @return [Array<(EnabledProductResponse, Integer, Hash)>] EnabledProductResponse data, response status code and response headers def enable_product_with_http_info(opts = {}) if @api_client.config.debugging @@ -116,7 +118,7 @@ def enable_product_with_http_info(opts = {}) fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.enable_product" end # resource path - local_var_path = '/enabled-products/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) + local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -125,12 +127,17 @@ def enable_product_with_http_info(opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'set_workspace_id']) # return_type return_type = opts[:debug_return_type] || 'EnabledProductResponse' @@ -156,7 +163,7 @@ def enable_product_with_http_info(opts = {}) end # Get enabled product - # Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`. + # Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. # @option opts [String] :product_id (required) # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @return [EnabledProductResponse] @@ -166,7 +173,7 @@ def get_enabled_product(opts = {}) end # Get enabled product - # Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`. + # Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. # @option opts [String] :product_id (required) # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @return [Array<(EnabledProductResponse, Integer, Hash)>] EnabledProductResponse data, response status code and response headers @@ -186,7 +193,7 @@ def get_enabled_product_with_http_info(opts = {}) fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.get_enabled_product" end # resource path - local_var_path = '/enabled-products/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) + local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -224,5 +231,152 @@ def get_enabled_product_with_http_info(opts = {}) end return data, status_code, headers end + + # Get configuration for a product + # Get configuration for an enabled product on a service. Supported product IDs: `ngwaf`. + # @option opts [String] :product_id (required) + # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @return [ConfiguredProductResponse] + def get_product_configuration(opts = {}) + data, _status_code, _headers = get_product_configuration_with_http_info(opts) + data + end + + # Get configuration for a product + # Get configuration for an enabled product on a service. Supported product IDs: `ngwaf`. + # @option opts [String] :product_id (required) + # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @return [Array<(ConfiguredProductResponse, Integer, Hash)>] ConfiguredProductResponse data, response status code and response headers + def get_product_configuration_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EnabledProductsApi.get_product_configuration ...' + end + # unbox the parameters from the hash + product_id = opts[:'product_id'] + service_id = opts[:'service_id'] + # verify the required parameter 'product_id' is set + if @api_client.config.client_side_validation && product_id.nil? + fail ArgumentError, "Missing the required parameter 'product_id' when calling EnabledProductsApi.get_product_configuration" + end + # verify the required parameter 'service_id' is set + if @api_client.config.client_side_validation && service_id.nil? + fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.get_product_configuration" + end + # resource path + local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}/configuration'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ConfiguredProductResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"EnabledProductsApi.get_product_configuration", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: EnabledProductsApi#get_product_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update configuration for a product + # Update configuration for an enabled product on a service. Supported product IDs: `ngwaf`. + # @option opts [String] :product_id (required) + # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @option opts [SetConfiguration] :set_configuration + # @return [ConfiguredProductResponse] + def set_product_configuration(opts = {}) + data, _status_code, _headers = set_product_configuration_with_http_info(opts) + data + end + + # Update configuration for a product + # Update configuration for an enabled product on a service. Supported product IDs: `ngwaf`. + # @option opts [String] :product_id (required) + # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @option opts [SetConfiguration] :set_configuration + # @return [Array<(ConfiguredProductResponse, Integer, Hash)>] ConfiguredProductResponse data, response status code and response headers + def set_product_configuration_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EnabledProductsApi.set_product_configuration ...' + end + # unbox the parameters from the hash + product_id = opts[:'product_id'] + service_id = opts[:'service_id'] + # verify the required parameter 'product_id' is set + if @api_client.config.client_side_validation && product_id.nil? + fail ArgumentError, "Missing the required parameter 'product_id' when calling EnabledProductsApi.set_product_configuration" + end + # verify the required parameter 'service_id' is set + if @api_client.config.client_side_validation && service_id.nil? + fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.set_product_configuration" + end + # resource path + local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}/configuration'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'set_configuration']) + + # return_type + return_type = opts[:debug_return_type] || 'ConfiguredProductResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"EnabledProductsApi.set_product_configuration", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: EnabledProductsApi#set_product_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/lib/fastly/api/tls_certificates_api.rb b/lib/fastly/api/tls_certificates_api.rb index 232727cc..ee315f79 100644 --- a/lib/fastly/api/tls_certificates_api.rb +++ b/lib/fastly/api/tls_certificates_api.rb @@ -273,9 +273,9 @@ def get_tls_cert_blob_with_http_info(opts = {}) # @option opts [String] :filter_not_after Limit the returned certificates to those that expire prior to the specified date in UTC. Accepts parameters: lte (e.g., filter[not_after][lte]=2020-05-05). # @option opts [String] :filter_tls_domains_id Limit the returned certificates to those that include the specific domain. # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`. + # @option opts [String] :sort The order in which to list the results. (default to '-created_at') # @option opts [Integer] :page_number Current page. # @option opts [Integer] :page_size Number of records per page. (default to 20) - # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at') # @return [TlsCertificatesResponse] def list_tls_certs(opts = {}) data, _status_code, _headers = list_tls_certs_with_http_info(opts) @@ -288,15 +288,19 @@ def list_tls_certs(opts = {}) # @option opts [String] :filter_not_after Limit the returned certificates to those that expire prior to the specified date in UTC. Accepts parameters: lte (e.g., filter[not_after][lte]=2020-05-05). # @option opts [String] :filter_tls_domains_id Limit the returned certificates to those that include the specific domain. # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`. + # @option opts [String] :sort The order in which to list the results. (default to '-created_at') # @option opts [Integer] :page_number Current page. # @option opts [Integer] :page_size Number of records per page. (default to 20) - # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at') # @return [Array<(TlsCertificatesResponse, Integer, Hash)>] TlsCertificatesResponse data, response status code and response headers def list_tls_certs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TlsCertificatesApi.list_tls_certs ...' end # unbox the parameters from the hash + allowable_values = ["created_at", "-created_at", "not_before", "-not_before", "not_after", "-not_after", "tls_activations.created_at", "-tls_activations.created_at"] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsCertificatesApi.list_tls_certs, must be smaller than or equal to 100.' end @@ -305,10 +309,6 @@ def list_tls_certs_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsCertificatesApi.list_tls_certs, must be greater than or equal to 1.' end - allowable_values = ["created_at", "-created_at"] - if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) - fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" - end # resource path local_var_path = '/tls/certificates' @@ -318,9 +318,9 @@ def list_tls_certs_with_http_info(opts = {}) query_params[:'filter[not_after]'] = opts[:'filter_not_after'] if !opts[:'filter_not_after'].nil? query_params[:'filter[tls_domains.id]'] = opts[:'filter_tls_domains_id'] if !opts[:'filter_tls_domains_id'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/fastly/api/tls_domains_api.rb b/lib/fastly/api/tls_domains_api.rb index 35b2d400..4a9074f8 100644 --- a/lib/fastly/api/tls_domains_api.rb +++ b/lib/fastly/api/tls_domains_api.rb @@ -23,9 +23,9 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :filter_tls_certificates_id Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list. # @option opts [String] :filter_tls_subscriptions_id Optional. Limit the returned domains to those for a given TLS subscription. # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. + # @option opts [String] :sort The order in which to list the results. (default to 'id') # @option opts [Integer] :page_number Current page. # @option opts [Integer] :page_size Number of records per page. (default to 20) - # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at') # @return [TlsDomainsResponse] def list_tls_domains(opts = {}) data, _status_code, _headers = list_tls_domains_with_http_info(opts) @@ -38,15 +38,19 @@ def list_tls_domains(opts = {}) # @option opts [String] :filter_tls_certificates_id Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list. # @option opts [String] :filter_tls_subscriptions_id Optional. Limit the returned domains to those for a given TLS subscription. # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. + # @option opts [String] :sort The order in which to list the results. (default to 'id') # @option opts [Integer] :page_number Current page. # @option opts [Integer] :page_size Number of records per page. (default to 20) - # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at') # @return [Array<(TlsDomainsResponse, Integer, Hash)>] TlsDomainsResponse data, response status code and response headers def list_tls_domains_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TlsDomainsApi.list_tls_domains ...' end # unbox the parameters from the hash + allowable_values = ["tls_activations.created_at", "-tls_activations.created_at", "id", "-id"] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsDomainsApi.list_tls_domains, must be smaller than or equal to 100.' end @@ -55,10 +59,6 @@ def list_tls_domains_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsDomainsApi.list_tls_domains, must be greater than or equal to 1.' end - allowable_values = ["created_at", "-created_at"] - if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) - fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" - end # resource path local_var_path = '/tls/domains' @@ -68,9 +68,9 @@ def list_tls_domains_with_http_info(opts = {}) query_params[:'filter[tls_certificates.id]'] = opts[:'filter_tls_certificates_id'] if !opts[:'filter_tls_certificates_id'].nil? query_params[:'filter[tls_subscriptions.id]'] = opts[:'filter_tls_subscriptions_id'] if !opts[:'filter_tls_subscriptions_id'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/fastly/api/tls_subscriptions_api.rb b/lib/fastly/api/tls_subscriptions_api.rb index fa059d8f..5406b3a1 100644 --- a/lib/fastly/api/tls_subscriptions_api.rb +++ b/lib/fastly/api/tls_subscriptions_api.rb @@ -368,10 +368,10 @@ def get_tls_sub_with_http_info(opts = {}) # @option opts [String] :filter_tls_domains_id Limit the returned subscriptions to those that include the specific domain. # @option opts [Boolean] :filter_has_active_order Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. # @option opts [String] :filter_certificate_authority Limit the returned subscriptions to a specific certification authority. Values may include `certainly`, `lets-encrypt`, or `globalsign`. + # @option opts [String] :sort The order in which to list the results. (default to '-created_at') # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, `tls_authorizations.self_managed_http_challenge`, and `tls_certificates`. # @option opts [Integer] :page_number Current page. # @option opts [Integer] :page_size Number of records per page. (default to 20) - # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at') # @return [TlsSubscriptionsResponse] def list_tls_subs(opts = {}) data, _status_code, _headers = list_tls_subs_with_http_info(opts) @@ -384,16 +384,20 @@ def list_tls_subs(opts = {}) # @option opts [String] :filter_tls_domains_id Limit the returned subscriptions to those that include the specific domain. # @option opts [Boolean] :filter_has_active_order Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. # @option opts [String] :filter_certificate_authority Limit the returned subscriptions to a specific certification authority. Values may include `certainly`, `lets-encrypt`, or `globalsign`. + # @option opts [String] :sort The order in which to list the results. (default to '-created_at') # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, `tls_authorizations.self_managed_http_challenge`, and `tls_certificates`. # @option opts [Integer] :page_number Current page. # @option opts [Integer] :page_size Number of records per page. (default to 20) - # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at') # @return [Array<(TlsSubscriptionsResponse, Integer, Hash)>] TlsSubscriptionsResponse data, response status code and response headers def list_tls_subs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TlsSubscriptionsApi.list_tls_subs ...' end # unbox the parameters from the hash + allowable_values = ["created_at", "-created_at", "tls_certificates.not_after", "-tls_certificates.not_after"] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsSubscriptionsApi.list_tls_subs, must be smaller than or equal to 100.' end @@ -402,10 +406,6 @@ def list_tls_subs_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsSubscriptionsApi.list_tls_subs, must be greater than or equal to 1.' end - allowable_values = ["created_at", "-created_at"] - if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) - fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" - end # resource path local_var_path = '/tls/subscriptions' @@ -415,10 +415,10 @@ def list_tls_subs_with_http_info(opts = {}) query_params[:'filter[tls_domains.id]'] = opts[:'filter_tls_domains_id'] if !opts[:'filter_tls_domains_id'].nil? query_params[:'filter[has_active_order]'] = opts[:'filter_has_active_order'] if !opts[:'filter_has_active_order'].nil? query_params[:'filter[certificate_authority]'] = opts[:'filter_certificate_authority'] if !opts[:'filter_certificate_authority'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/fastly/api/version_api.rb b/lib/fastly/api/version_api.rb index 0813541f..bc1a93fc 100644 --- a/lib/fastly/api/version_api.rb +++ b/lib/fastly/api/version_api.rb @@ -87,6 +87,83 @@ def activate_service_version_with_http_info(opts = {}) return data, status_code, headers end + # Activate a service version on the specified environment + # Activate a version on a given environment, i.e. \"staging\" + # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @option opts [Integer] :version_id Integer identifying a service version. (required) + # @option opts [EnvironmentName] :environment_name (required) + # @return [VersionResponse] + def activate_service_version_environment(opts = {}) + data, _status_code, _headers = activate_service_version_environment_with_http_info(opts) + data + end + + # Activate a service version on the specified environment + # Activate a version on a given environment, i.e. \"staging\" + # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @option opts [Integer] :version_id Integer identifying a service version. (required) + # @option opts [EnvironmentName] :environment_name (required) + # @return [Array<(VersionResponse, Integer, Hash)>] VersionResponse data, response status code and response headers + def activate_service_version_environment_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: VersionApi.activate_service_version_environment ...' + end + # unbox the parameters from the hash + service_id = opts[:'service_id'] + version_id = opts[:'version_id'] + environment_name = opts[:'environment_name'] + # verify the required parameter 'service_id' is set + if @api_client.config.client_side_validation && service_id.nil? + fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.activate_service_version_environment" + end + # verify the required parameter 'version_id' is set + if @api_client.config.client_side_validation && version_id.nil? + fail ArgumentError, "Missing the required parameter 'version_id' when calling VersionApi.activate_service_version_environment" + end + # verify the required parameter 'environment_name' is set + if @api_client.config.client_side_validation && environment_name.nil? + fail ArgumentError, "Missing the required parameter 'environment_name' when calling VersionApi.activate_service_version_environment" + end + # resource path + local_var_path = '/service/{service_id}/version/{version_id}/activate/{environment_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'environment_name' + '}', CGI.escape(environment_name.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'VersionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"VersionApi.activate_service_version_environment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: VersionApi#activate_service_version_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Clone a service version # Clone the current configuration into a new version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) @@ -290,6 +367,83 @@ def deactivate_service_version_with_http_info(opts = {}) return data, status_code, headers end + # Deactivate a service version on an environment + # Deactivate the current version on a given environment, i.e. \"staging\" + # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @option opts [Integer] :version_id Integer identifying a service version. (required) + # @option opts [EnvironmentName] :environment_name (required) + # @return [VersionResponse] + def deactivate_service_version_environment(opts = {}) + data, _status_code, _headers = deactivate_service_version_environment_with_http_info(opts) + data + end + + # Deactivate a service version on an environment + # Deactivate the current version on a given environment, i.e. \"staging\" + # @option opts [String] :service_id Alphanumeric string identifying the service. (required) + # @option opts [Integer] :version_id Integer identifying a service version. (required) + # @option opts [EnvironmentName] :environment_name (required) + # @return [Array<(VersionResponse, Integer, Hash)>] VersionResponse data, response status code and response headers + def deactivate_service_version_environment_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: VersionApi.deactivate_service_version_environment ...' + end + # unbox the parameters from the hash + service_id = opts[:'service_id'] + version_id = opts[:'version_id'] + environment_name = opts[:'environment_name'] + # verify the required parameter 'service_id' is set + if @api_client.config.client_side_validation && service_id.nil? + fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.deactivate_service_version_environment" + end + # verify the required parameter 'version_id' is set + if @api_client.config.client_side_validation && version_id.nil? + fail ArgumentError, "Missing the required parameter 'version_id' when calling VersionApi.deactivate_service_version_environment" + end + # verify the required parameter 'environment_name' is set + if @api_client.config.client_side_validation && environment_name.nil? + fail ArgumentError, "Missing the required parameter 'environment_name' when calling VersionApi.deactivate_service_version_environment" + end + # resource path + local_var_path = '/service/{service_id}/version/{version_id}/deactivate/{environment_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'environment_name' + '}', CGI.escape(environment_name.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'VersionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"VersionApi.deactivate_service_version_environment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: VersionApi#deactivate_service_version_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a version of a service # Get the version for a particular service. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) diff --git a/lib/fastly/configuration.rb b/lib/fastly/configuration.rb index 7f879009..b93410db 100644 --- a/lib/fastly/configuration.rb +++ b/lib/fastly/configuration.rb @@ -344,6 +344,48 @@ def operation_server_settings description: "No description provided", } ], + "AclsInComputeApi.compute_acl_create_acls": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "AclsInComputeApi.compute_acl_delete_s_acl_id": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "AclsInComputeApi.compute_acl_list_acl_entries": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "AclsInComputeApi.compute_acl_list_acls": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "AclsInComputeApi.compute_acl_list_acls_s_acl_id": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "AclsInComputeApi.compute_acl_lookup_acls": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "AclsInComputeApi.compute_acl_update_acls": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], "ApexRedirectApi.create_apex_redirect": [ { url: "https://api.fastly.com", @@ -704,6 +746,24 @@ def operation_server_settings description: "No description provided", } ], + "CustomerAddressesApi.create_customer_address": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "CustomerAddressesApi.list_customer_addresses": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "CustomerAddressesApi.update_customer_address": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], "DictionaryApi.create_dictionary": [ { url: "https://api.fastly.com", @@ -926,6 +986,18 @@ def operation_server_settings description: "No description provided", } ], + "EnabledProductsApi.get_product_configuration": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "EnabledProductsApi.set_product_configuration": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], "EventsApi.get_event": [ { url: "https://api.fastly.com", @@ -3302,6 +3374,12 @@ def operation_server_settings description: "No description provided", } ], + "VersionApi.activate_service_version_environment": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], "VersionApi.clone_service_version": [ { url: "https://api.fastly.com", @@ -3320,6 +3398,12 @@ def operation_server_settings description: "No description provided", } ], + "VersionApi.deactivate_service_version_environment": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], "VersionApi.get_service_version": [ { url: "https://api.fastly.com", diff --git a/lib/fastly/models/billing_response_line_item.rb b/lib/fastly/models/billing_response_line_item.rb index 27719f8c..d4099a06 100644 --- a/lib/fastly/models/billing_response_line_item.rb +++ b/lib/fastly/models/billing_response_line_item.rb @@ -120,10 +120,20 @@ def self.fastly_nullable :'created_at', :'deleted_at', :'updated_at', + :'amount', + :'aria_invoice_id', + :'client_service_id', :'credit_coupon_code', + :'description', + :'line_number', + :'plan_name', + :'plan_no', :'rate_per_unit', :'rate_schedule_no', :'rate_schedule_tier_no', + :'service_name', + :'service_no', + :'units', :'usage_type_cd', :'usage_type_no' ]) diff --git a/lib/fastly/models/origin_inspector_realtime_entry_recorded.rb b/lib/fastly/models/compute_acl_create_acls_request.rb similarity index 92% rename from lib/fastly/models/origin_inspector_realtime_entry_recorded.rb rename to lib/fastly/models/compute_acl_create_acls_request.rb index 7a7d8be8..5b1c6085 100644 --- a/lib/fastly/models/origin_inspector_realtime_entry_recorded.rb +++ b/lib/fastly/models/compute_acl_create_acls_request.rb @@ -12,11 +12,14 @@ require 'time' module Fastly - # The Unix timestamp at which this record's data was generated. - class OriginInspectorRealtimeEntryRecorded + class ComputeAclCreateAclsRequest + # Human readable name of store + attr_accessor :name + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'name' => :'name' } end @@ -28,6 +31,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { + :'name' => :'String' } end @@ -41,16 +45,20 @@ def self.fastly_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::OriginInspectorRealtimeEntryRecorded` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclCreateAclsRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::OriginInspectorRealtimeEntryRecorded`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclCreateAclsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -70,7 +78,8 @@ def valid? # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) - self.class == o.class + self.class == o.class && + name == o.name end # @see the `==` method @@ -82,7 +91,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [].hash + [name].hash end # Builds the object from hash diff --git a/lib/fastly/models/compute_acl_create_acls_response.rb b/lib/fastly/models/compute_acl_create_acls_response.rb new file mode 100644 index 00000000..32b03373 --- /dev/null +++ b/lib/fastly/models/compute_acl_create_acls_response.rb @@ -0,0 +1,227 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class ComputeAclCreateAclsResponse + # Human readable name of store + attr_accessor :name + + # An example identifier (UUID). + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'name' => :'String', + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclCreateAclsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclCreateAclsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/compute_acl_list_entries.rb b/lib/fastly/models/compute_acl_list_entries.rb new file mode 100644 index 00000000..d8caa6b3 --- /dev/null +++ b/lib/fastly/models/compute_acl_list_entries.rb @@ -0,0 +1,228 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + # An example of an ACL List Response. + class ComputeAclListEntries + attr_accessor :meta + + attr_accessor :entries + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'meta' => :'meta', + :'entries' => :'entries' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'meta' => :'ComputeAclListEntriesMeta', + :'entries' => :'Array' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclListEntries` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclListEntries`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'entries') + if (value = attributes[:'entries']).is_a?(Array) + self.entries = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + meta == o.meta && + entries == o.entries + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [meta, entries].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/compute_acl_list_entries_item.rb b/lib/fastly/models/compute_acl_list_entries_item.rb new file mode 100644 index 00000000..8e3f8ec5 --- /dev/null +++ b/lib/fastly/models/compute_acl_list_entries_item.rb @@ -0,0 +1,227 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class ComputeAclListEntriesItem + # An IP prefix defined in Classless Inter-Domain Routing (CIDR) format, i.e. a valid IP address (v4 or v6) followed by a forward slash (/) and a prefix length (0-32 or 0-128, depending on address family). + attr_accessor :prefix + + # One of \"ALLOW\" or \"BLOCK\". + attr_accessor :action + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'prefix' => :'prefix', + :'action' => :'action' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'prefix' => :'String', + :'action' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclListEntriesItem` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclListEntriesItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'prefix') + self.prefix = attributes[:'prefix'] + end + + if attributes.key?(:'action') + self.action = attributes[:'action'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + prefix == o.prefix && + action == o.action + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [prefix, action].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/compute_acl_list_entries_meta.rb b/lib/fastly/models/compute_acl_list_entries_meta.rb new file mode 100644 index 00000000..ebf0932e --- /dev/null +++ b/lib/fastly/models/compute_acl_list_entries_meta.rb @@ -0,0 +1,227 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class ComputeAclListEntriesMeta + # The maximum number of results shown in this response. + attr_accessor :limit + + # Used for pagination, supply to the next request to get the next block of results. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'limit' => :'limit', + :'next_cursor' => :'next_cursor' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'limit' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclListEntriesMeta` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclListEntriesMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + limit == o.limit && + next_cursor == o.next_cursor + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [limit, next_cursor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/compute_acl_lookup.rb b/lib/fastly/models/compute_acl_lookup.rb new file mode 100644 index 00000000..a10463b8 --- /dev/null +++ b/lib/fastly/models/compute_acl_lookup.rb @@ -0,0 +1,238 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + # An example of an ACL Lookup response. + class ComputeAclLookup + # A valid IPv4 or IPv6 address. + attr_accessor :prefix + + # The length of address in the IP addressing space. + attr_accessor :length + + # One of \"ALLOW\" or \"BLOCK\". + attr_accessor :action + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'prefix' => :'prefix', + :'length' => :'length', + :'action' => :'action' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'prefix' => :'String', + :'length' => :'Integer', + :'action' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclLookup` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclLookup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'prefix') + self.prefix = attributes[:'prefix'] + end + + if attributes.key?(:'length') + self.length = attributes[:'length'] + end + + if attributes.key?(:'action') + self.action = attributes[:'action'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + prefix == o.prefix && + length == o.length && + action == o.action + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [prefix, length, action].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/compute_acl_update_entry.rb b/lib/fastly/models/compute_acl_update_entry.rb new file mode 100644 index 00000000..71b160fb --- /dev/null +++ b/lib/fastly/models/compute_acl_update_entry.rb @@ -0,0 +1,238 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + # An example of an ACL update request entry. + class ComputeAclUpdateEntry + # One of \"create\" or \"update\", indicating that the rest of this entry is to be added to/updated in the ACL. + attr_accessor :op + + # An IP prefix defined in Classless Inter-Domain Routing (CIDR) format, i.e. a valid IP address (v4 or v6) followed by a forward slash (/) and a prefix length (0-32 or 0-128, depending on address family). + attr_accessor :prefix + + # The action taken on the IP address, either \"block\" or \"allow\". + attr_accessor :action + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'op' => :'op', + :'prefix' => :'prefix', + :'action' => :'action' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'op' => :'String', + :'prefix' => :'String', + :'action' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclUpdateEntry` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclUpdateEntry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'op') + self.op = attributes[:'op'] + end + + if attributes.key?(:'prefix') + self.prefix = attributes[:'prefix'] + end + + if attributes.key?(:'action') + self.action = attributes[:'action'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + op == o.op && + prefix == o.prefix && + action == o.action + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [op, prefix, action].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/configured_product_response.rb b/lib/fastly/models/configured_product_response.rb new file mode 100644 index 00000000..32d2abd5 --- /dev/null +++ b/lib/fastly/models/configured_product_response.rb @@ -0,0 +1,243 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class ConfiguredProductResponse + attr_accessor :product + + attr_accessor :service + + attr_accessor :configuration + + attr_accessor :_links + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'product' => :'product', + :'service' => :'service', + :'configuration' => :'configuration', + :'_links' => :'_links' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'product' => :'ConfiguredProductResponseProduct', + :'service' => :'EnabledProductResponseService', + :'configuration' => :'ConfiguredProductResponseConfiguration', + :'_links' => :'ConfiguredProductResponseLinks' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ConfiguredProductResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ConfiguredProductResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'product') + self.product = attributes[:'product'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'configuration') + self.configuration = attributes[:'configuration'] + end + + if attributes.key?(:'_links') + self._links = attributes[:'_links'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + product == o.product && + service == o.service && + configuration == o.configuration && + _links == o._links + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [product, service, configuration, _links].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/configured_product_response_configuration.rb b/lib/fastly/models/configured_product_response_configuration.rb new file mode 100644 index 00000000..1e9a46fd --- /dev/null +++ b/lib/fastly/models/configured_product_response_configuration.rb @@ -0,0 +1,227 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class ConfiguredProductResponseConfiguration + # Workspace ID + attr_accessor :workspace_id + + # Traffic ramp + attr_accessor :traffic_ramp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'workspace_id' => :'workspace_id', + :'traffic_ramp' => :'traffic_ramp' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'workspace_id' => :'String', + :'traffic_ramp' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ConfiguredProductResponseConfiguration` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ConfiguredProductResponseConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'workspace_id') + self.workspace_id = attributes[:'workspace_id'] + end + + if attributes.key?(:'traffic_ramp') + self.traffic_ramp = attributes[:'traffic_ramp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + workspace_id == o.workspace_id && + traffic_ramp == o.traffic_ramp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [workspace_id, traffic_ramp].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/configured_product_response_links.rb b/lib/fastly/models/configured_product_response_links.rb new file mode 100644 index 00000000..66178e0d --- /dev/null +++ b/lib/fastly/models/configured_product_response_links.rb @@ -0,0 +1,227 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class ConfiguredProductResponseLinks + # Location of resource + attr_accessor :_self + + # Location of the service resource + attr_accessor :service + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_self' => :'self', + :'service' => :'service' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'_self' => :'String', + :'service' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ConfiguredProductResponseLinks` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ConfiguredProductResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'_self') + self._self = attributes[:'_self'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _self == o._self && + service == o.service + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_self, service].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/configured_product_response_product.rb b/lib/fastly/models/configured_product_response_product.rb new file mode 100644 index 00000000..f86bed12 --- /dev/null +++ b/lib/fastly/models/configured_product_response_product.rb @@ -0,0 +1,227 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class ConfiguredProductResponseProduct + # Product identifier + attr_accessor :id + + # Name of the object + attr_accessor :object + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'object' => :'object' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'id' => :'String', + :'object' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ConfiguredProductResponseProduct` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ConfiguredProductResponseProduct`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'object') + self.object = attributes[:'object'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + object == o.object + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, object].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/customer_address.rb b/lib/fastly/models/customer_address.rb new file mode 100644 index 00000000..56019485 --- /dev/null +++ b/lib/fastly/models/customer_address.rb @@ -0,0 +1,294 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class CustomerAddress + # The type of the address. + attr_accessor :type + + # The street number and name of the address. + attr_accessor :address_1 + + # Additional address line for unit number, P.O. Box, etc. + attr_accessor :address_2 + + # City, town, or locality name the address is located. + attr_accessor :locality + + # State, province, or region of the address. + attr_accessor :region + + # ISO 3166-1 alpha-2 country code (e.g., \"US\", \"CA\", \"NZ\") + attr_accessor :country + + # Postal or Zip code of the address. + attr_accessor :postal_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'address_1' => :'address_1', + :'address_2' => :'address_2', + :'locality' => :'locality', + :'region' => :'region', + :'country' => :'country', + :'postal_code' => :'postal_code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'type' => :'String', + :'address_1' => :'String', + :'address_2' => :'String', + :'locality' => :'String', + :'region' => :'String', + :'country' => :'String', + :'postal_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::CustomerAddress` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::CustomerAddress`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'address_1') + self.address_1 = attributes[:'address_1'] + end + + if attributes.key?(:'address_2') + self.address_2 = attributes[:'address_2'] + end + + if attributes.key?(:'locality') + self.locality = attributes[:'locality'] + end + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.key?(:'postal_code') + self.postal_code = attributes[:'postal_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + pattern = Regexp.new(/^(tax|billing)$/) + if !@type.nil? && @type !~ pattern + invalid_properties.push("invalid value for \"type\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@type.nil? && @type !~ Regexp.new(/^(tax|billing)$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + pattern = Regexp.new(/^(tax|billing)$/) + if !type.nil? && type !~ pattern + fail ArgumentError, "invalid value for \"type\", must conform to the pattern #{pattern}." + end + + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + address_1 == o.address_1 && + address_2 == o.address_2 && + locality == o.locality && + region == o.region && + country == o.country && + postal_code == o.postal_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, address_1, address_2, locality, region, country, postal_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/domain_inspector.rb b/lib/fastly/models/domain_inspector.rb index bd208241..3890cb88 100644 --- a/lib/fastly/models/domain_inspector.rb +++ b/lib/fastly/models/domain_inspector.rb @@ -13,6 +13,7 @@ module Fastly class DomainInspector + # Value to use for subsequent requests. attr_accessor :timestamp # Offset of entry timestamps from the current time due to processing time. @@ -38,7 +39,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { - :'timestamp' => :'SubsequentRequestTimestamp', + :'timestamp' => :'Integer', :'aggregate_delay' => :'Integer', :'data' => :'Array' } diff --git a/lib/fastly/models/domain_inspector_realtime_entry.rb b/lib/fastly/models/domain_inspector_realtime_entry.rb index d360e969..3307e965 100644 --- a/lib/fastly/models/domain_inspector_realtime_entry.rb +++ b/lib/fastly/models/domain_inspector_realtime_entry.rb @@ -14,6 +14,7 @@ module Fastly # Each reporting period is represented by an entry in the `Data` property of the top level response and provides access to [measurement data](#measurements-data-model) for that time period, grouped in various ways: by domain name, domain IP address, and optionally by POP. The `datacenter` property organizes the measurements by Fastly POP, while the `aggregated` property combines the measurements of all POPs (but still splits by backend name and IP). class DomainInspectorRealtimeEntry + # The Unix timestamp at which this record's data was generated. attr_accessor :recorded # Groups [measurements](#measurements-data-model) by backend name and then by IP address. @@ -39,7 +40,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { - :'recorded' => :'RecordedTimestamp', + :'recorded' => :'Integer', :'aggregated' => :'Hash', :'datacenter' => :'Hash>' } diff --git a/lib/fastly/models/environment.rb b/lib/fastly/models/environment.rb new file mode 100644 index 00000000..50a7bab7 --- /dev/null +++ b/lib/fastly/models/environment.rb @@ -0,0 +1,235 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class Environment + attr_accessor :name + + # Alphanumeric string identifying the service. + attr_accessor :service_id + + attr_accessor :active_version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'service_id' => :'service_id', + :'active_version' => :'active_version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'name' => :'String', + :'service_id' => :'String', + :'active_version' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Environment` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Environment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'service_id') + self.service_id = attributes[:'service_id'] + end + + if attributes.key?(:'active_version') + self.active_version = attributes[:'active_version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + service_id == o.service_id && + active_version == o.active_version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, service_id, active_version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/environment_name.rb b/lib/fastly/models/environment_name.rb new file mode 100644 index 00000000..0744f5d9 --- /dev/null +++ b/lib/fastly/models/environment_name.rb @@ -0,0 +1,34 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class EnvironmentName + STAGING = "staging".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = EnvironmentName.constants.select { |c| EnvironmentName::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #EnvironmentName" if constantValues.empty? + value + end + end +end diff --git a/lib/fastly/models/event_attributes.rb b/lib/fastly/models/event_attributes.rb index 61155b19..a0c0f4c5 100644 --- a/lib/fastly/models/event_attributes.rb +++ b/lib/fastly/models/event_attributes.rb @@ -173,7 +173,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - event_type_validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "alerts.definition.create", "alerts.definition.delete", "alerts.definition.test", "alerts.definition.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"]) + event_type_validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "alerts.definition.create", "alerts.definition.delete", "alerts.definition.test", "alerts.definition.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "security.workspace.create", "security.workspace.update", "security.workspace.delete", "security.redaction.create", "security.redaction.update", "security.redaction.delete", "security.rule.create", "security.rule.update", "security.rule.delete", "security.virtual_patch.create", "security.virtual_patch.update", "security.virtual_patch.delete", "security.event.update", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"]) return false unless event_type_validator.valid?(@event_type) true end @@ -181,7 +181,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] event_type Object to be assigned def event_type=(event_type) - validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "alerts.definition.create", "alerts.definition.delete", "alerts.definition.test", "alerts.definition.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"]) + validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "alerts.definition.create", "alerts.definition.delete", "alerts.definition.test", "alerts.definition.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "security.workspace.create", "security.workspace.update", "security.workspace.delete", "security.redaction.create", "security.redaction.update", "security.redaction.delete", "security.rule.create", "security.rule.update", "security.rule.delete", "security.virtual_patch.create", "security.virtual_patch.update", "security.virtual_patch.delete", "security.event.update", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"]) unless validator.valid?(event_type) fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}." end diff --git a/lib/fastly/models/recorded_timestamp.rb b/lib/fastly/models/inline_response201.rb similarity index 93% rename from lib/fastly/models/recorded_timestamp.rb rename to lib/fastly/models/inline_response201.rb index 7f5c02b7..7ca62097 100644 --- a/lib/fastly/models/recorded_timestamp.rb +++ b/lib/fastly/models/inline_response201.rb @@ -12,11 +12,14 @@ require 'time' module Fastly - # The Unix timestamp at which this record's data was generated. - class RecordedTimestamp + class InlineResponse201 + # Alphanumeric string identifying the address. + attr_accessor :id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'id' => :'id' } end @@ -28,6 +31,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { + :'id' => :'String' } end @@ -41,16 +45,20 @@ def self.fastly_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::RecordedTimestamp` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InlineResponse201` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::RecordedTimestamp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InlineResponse201`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -70,7 +78,8 @@ def valid? # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) - self.class == o.class + self.class == o.class && + id == o.id end # @see the `==` method @@ -82,7 +91,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [].hash + [id].hash end # Builds the object from hash diff --git a/lib/fastly/models/line_item_data.rb b/lib/fastly/models/line_item_data.rb index 72c8a9be..12ca88f0 100644 --- a/lib/fastly/models/line_item_data.rb +++ b/lib/fastly/models/line_item_data.rb @@ -102,10 +102,20 @@ def self.fastly_types # List of attributes with nullable: true def self.fastly_nullable Set.new([ + :'amount', + :'aria_invoice_id', + :'client_service_id', :'credit_coupon_code', + :'description', + :'line_number', + :'plan_name', + :'plan_no', :'rate_per_unit', :'rate_schedule_no', :'rate_schedule_tier_no', + :'service_name', + :'service_no', + :'units', :'usage_type_cd', :'usage_type_no' ]) diff --git a/lib/fastly/models/origin_inspector_subsequent_request_timestamp.rb b/lib/fastly/models/list_customer_addresses_response.rb similarity index 91% rename from lib/fastly/models/origin_inspector_subsequent_request_timestamp.rb rename to lib/fastly/models/list_customer_addresses_response.rb index 59b969df..c9ea0411 100644 --- a/lib/fastly/models/origin_inspector_subsequent_request_timestamp.rb +++ b/lib/fastly/models/list_customer_addresses_response.rb @@ -12,11 +12,13 @@ require 'time' module Fastly - # Value to use for subsequent requests. - class OriginInspectorSubsequentRequestTimestamp + class ListCustomerAddressesResponse + attr_accessor :data + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'data' => :'data' } end @@ -28,6 +30,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { + :'data' => :'Array' } end @@ -41,16 +44,22 @@ def self.fastly_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::OriginInspectorSubsequentRequestTimestamp` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ListCustomerAddressesResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::OriginInspectorSubsequentRequestTimestamp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ListCustomerAddressesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -70,7 +79,8 @@ def valid? # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) - self.class == o.class + self.class == o.class && + data == o.data end # @see the `==` method @@ -82,7 +92,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [].hash + [data].hash end # Builds the object from hash diff --git a/lib/fastly/models/origin_inspector.rb b/lib/fastly/models/origin_inspector.rb index 2a8f19d4..082e7c6d 100644 --- a/lib/fastly/models/origin_inspector.rb +++ b/lib/fastly/models/origin_inspector.rb @@ -13,6 +13,7 @@ module Fastly class OriginInspector + # Value to use for subsequent requests. attr_accessor :timestamp # Offset of entry timestamps from the current time due to processing time. @@ -38,7 +39,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { - :'timestamp' => :'OriginInspectorSubsequentRequestTimestamp', + :'timestamp' => :'Integer', :'aggregate_delay' => :'Integer', :'data' => :'Array' } diff --git a/lib/fastly/models/origin_inspector_realtime_entry.rb b/lib/fastly/models/origin_inspector_realtime_entry.rb index bc8b4e2d..b79b94ad 100644 --- a/lib/fastly/models/origin_inspector_realtime_entry.rb +++ b/lib/fastly/models/origin_inspector_realtime_entry.rb @@ -14,6 +14,7 @@ module Fastly # Each reporting period is represented by an entry in the `Data` property of the top level response and provides access to [measurement data](#measurements-data-model) for that time period, grouped by origin name and optionally by POP. The `datacenter` property organizes the measurements by Fastly POP, while the `aggregated` property combines the measurements of all POPs. class OriginInspectorRealtimeEntry + # The Unix timestamp at which this record's data was generated. attr_accessor :recorded # Groups [measurements](#measurements-data-model) by backend name. @@ -39,7 +40,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { - :'recorded' => :'OriginInspectorRealtimeEntryRecorded', + :'recorded' => :'Integer', :'aggregated' => :'Hash', :'datacenter' => :'Hash>' } diff --git a/lib/fastly/models/realtime_entry_aggregated.rb b/lib/fastly/models/realtime_entry_aggregated.rb index 154ced4a..59d5bf80 100644 --- a/lib/fastly/models/realtime_entry_aggregated.rb +++ b/lib/fastly/models/realtime_entry_aggregated.rb @@ -761,6 +761,9 @@ class RealtimeEntryAggregated # Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). attr_accessor :origin_offload + # Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. + attr_accessor :request_denied_get_head_body + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -1012,7 +1015,8 @@ def self.attribute_map :'all_status_3xx' => :'all_status_3xx', :'all_status_4xx' => :'all_status_4xx', :'all_status_5xx' => :'all_status_5xx', - :'origin_offload' => :'origin_offload' + :'origin_offload' => :'origin_offload', + :'request_denied_get_head_body' => :'request_denied_get_head_body' } end @@ -1272,7 +1276,8 @@ def self.fastly_types :'all_status_3xx' => :'Integer', :'all_status_4xx' => :'Integer', :'all_status_5xx' => :'Integer', - :'origin_offload' => :'Float' + :'origin_offload' => :'Float', + :'request_denied_get_head_body' => :'Integer' } end @@ -2301,6 +2306,10 @@ def initialize(attributes = {}) if attributes.key?(:'origin_offload') self.origin_offload = attributes[:'origin_offload'] end + + if attributes.key?(:'request_denied_get_head_body') + self.request_denied_get_head_body = attributes[:'request_denied_get_head_body'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -2569,7 +2578,8 @@ def ==(o) all_status_3xx == o.all_status_3xx && all_status_4xx == o.all_status_4xx && all_status_5xx == o.all_status_5xx && - origin_offload == o.origin_offload + origin_offload == o.origin_offload && + request_denied_get_head_body == o.request_denied_get_head_body end # @see the `==` method @@ -2581,7 +2591,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [requests, logging, log, resp_header_bytes, header_size, resp_body_bytes, body_size, hits, miss, pass, synth, errors, hits_time, miss_time, miss_histogram, compute_requests, compute_execution_time_ms, compute_ram_used, compute_request_time_ms, compute_request_time_billed_ms, shield, ipv6, imgopto, imgopto_shield, imgopto_transforms, otfp, otfp_shield, otfp_manifests, video, pci, http2, http3, restarts, req_header_bytes, req_body_bytes, bereq_header_bytes, bereq_body_bytes, waf_blocked, waf_logged, waf_passed, attack_req_header_bytes, attack_req_body_bytes, attack_resp_synth_bytes, attack_logged_req_header_bytes, attack_logged_req_body_bytes, attack_blocked_req_header_bytes, attack_blocked_req_body_bytes, attack_passed_req_header_bytes, attack_passed_req_body_bytes, shield_resp_header_bytes, shield_resp_body_bytes, otfp_resp_header_bytes, otfp_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_time, otfp_deliver_time, imgopto_resp_header_bytes, imgopto_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_shield_resp_body_bytes, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, uncacheable, pass_time, tls, tls_v10, tls_v11, tls_v12, tls_v13, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, object_size_other, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, log_bytes, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, origin_revalidations, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, shield_revalidations, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, edge_hit_requests, edge_miss_requests, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, origin_cache_fetches, shield_cache_fetches, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, websocket_resp_body_bytes, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, bot_challenge_complete_tokens_issued, ddos_action_downgrade, ddos_action_downgraded_connections, vcl_on_compute_hit_requests, vcl_on_compute_miss_requests, vcl_on_compute_pass_requests, vcl_on_compute_error_requests, vcl_on_compute_synth_requests, vcl_on_compute_edge_hit_requests, vcl_on_compute_edge_miss_requests, all_hit_requests, all_miss_requests, all_pass_requests, all_error_requests, all_synth_requests, all_edge_hit_requests, all_edge_miss_requests, all_status_1xx, all_status_2xx, all_status_3xx, all_status_4xx, all_status_5xx, origin_offload].hash + [requests, logging, log, resp_header_bytes, header_size, resp_body_bytes, body_size, hits, miss, pass, synth, errors, hits_time, miss_time, miss_histogram, compute_requests, compute_execution_time_ms, compute_ram_used, compute_request_time_ms, compute_request_time_billed_ms, shield, ipv6, imgopto, imgopto_shield, imgopto_transforms, otfp, otfp_shield, otfp_manifests, video, pci, http2, http3, restarts, req_header_bytes, req_body_bytes, bereq_header_bytes, bereq_body_bytes, waf_blocked, waf_logged, waf_passed, attack_req_header_bytes, attack_req_body_bytes, attack_resp_synth_bytes, attack_logged_req_header_bytes, attack_logged_req_body_bytes, attack_blocked_req_header_bytes, attack_blocked_req_body_bytes, attack_passed_req_header_bytes, attack_passed_req_body_bytes, shield_resp_header_bytes, shield_resp_body_bytes, otfp_resp_header_bytes, otfp_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_time, otfp_deliver_time, imgopto_resp_header_bytes, imgopto_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_shield_resp_body_bytes, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, uncacheable, pass_time, tls, tls_v10, tls_v11, tls_v12, tls_v13, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, object_size_other, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, log_bytes, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, origin_revalidations, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, shield_revalidations, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, edge_hit_requests, edge_miss_requests, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, origin_cache_fetches, shield_cache_fetches, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, websocket_resp_body_bytes, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, bot_challenge_complete_tokens_issued, ddos_action_downgrade, ddos_action_downgraded_connections, vcl_on_compute_hit_requests, vcl_on_compute_miss_requests, vcl_on_compute_pass_requests, vcl_on_compute_error_requests, vcl_on_compute_synth_requests, vcl_on_compute_edge_hit_requests, vcl_on_compute_edge_miss_requests, all_hit_requests, all_miss_requests, all_pass_requests, all_error_requests, all_synth_requests, all_edge_hit_requests, all_edge_miss_requests, all_status_1xx, all_status_2xx, all_status_3xx, all_status_4xx, all_status_5xx, origin_offload, request_denied_get_head_body].hash end # Builds the object from hash diff --git a/lib/fastly/models/realtime_measurements.rb b/lib/fastly/models/realtime_measurements.rb index ac942861..14a3eca0 100644 --- a/lib/fastly/models/realtime_measurements.rb +++ b/lib/fastly/models/realtime_measurements.rb @@ -761,6 +761,9 @@ class RealtimeMeasurements # Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). attr_accessor :origin_offload + # Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. + attr_accessor :request_denied_get_head_body + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -1012,7 +1015,8 @@ def self.attribute_map :'all_status_3xx' => :'all_status_3xx', :'all_status_4xx' => :'all_status_4xx', :'all_status_5xx' => :'all_status_5xx', - :'origin_offload' => :'origin_offload' + :'origin_offload' => :'origin_offload', + :'request_denied_get_head_body' => :'request_denied_get_head_body' } end @@ -1272,7 +1276,8 @@ def self.fastly_types :'all_status_3xx' => :'Integer', :'all_status_4xx' => :'Integer', :'all_status_5xx' => :'Integer', - :'origin_offload' => :'Float' + :'origin_offload' => :'Float', + :'request_denied_get_head_body' => :'Integer' } end @@ -2294,6 +2299,10 @@ def initialize(attributes = {}) if attributes.key?(:'origin_offload') self.origin_offload = attributes[:'origin_offload'] end + + if attributes.key?(:'request_denied_get_head_body') + self.request_denied_get_head_body = attributes[:'request_denied_get_head_body'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -2562,7 +2571,8 @@ def ==(o) all_status_3xx == o.all_status_3xx && all_status_4xx == o.all_status_4xx && all_status_5xx == o.all_status_5xx && - origin_offload == o.origin_offload + origin_offload == o.origin_offload && + request_denied_get_head_body == o.request_denied_get_head_body end # @see the `==` method @@ -2574,7 +2584,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [requests, logging, log, resp_header_bytes, header_size, resp_body_bytes, body_size, hits, miss, pass, synth, errors, hits_time, miss_time, miss_histogram, compute_requests, compute_execution_time_ms, compute_ram_used, compute_request_time_ms, compute_request_time_billed_ms, shield, ipv6, imgopto, imgopto_shield, imgopto_transforms, otfp, otfp_shield, otfp_manifests, video, pci, http2, http3, restarts, req_header_bytes, req_body_bytes, bereq_header_bytes, bereq_body_bytes, waf_blocked, waf_logged, waf_passed, attack_req_header_bytes, attack_req_body_bytes, attack_resp_synth_bytes, attack_logged_req_header_bytes, attack_logged_req_body_bytes, attack_blocked_req_header_bytes, attack_blocked_req_body_bytes, attack_passed_req_header_bytes, attack_passed_req_body_bytes, shield_resp_header_bytes, shield_resp_body_bytes, otfp_resp_header_bytes, otfp_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_time, otfp_deliver_time, imgopto_resp_header_bytes, imgopto_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_shield_resp_body_bytes, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, uncacheable, pass_time, tls, tls_v10, tls_v11, tls_v12, tls_v13, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, object_size_other, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, log_bytes, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, origin_revalidations, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, shield_revalidations, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, edge_hit_requests, edge_miss_requests, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, origin_cache_fetches, shield_cache_fetches, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, websocket_resp_body_bytes, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, bot_challenge_complete_tokens_issued, ddos_action_downgrade, ddos_action_downgraded_connections, vcl_on_compute_hit_requests, vcl_on_compute_miss_requests, vcl_on_compute_pass_requests, vcl_on_compute_error_requests, vcl_on_compute_synth_requests, vcl_on_compute_edge_hit_requests, vcl_on_compute_edge_miss_requests, all_hit_requests, all_miss_requests, all_pass_requests, all_error_requests, all_synth_requests, all_edge_hit_requests, all_edge_miss_requests, all_status_1xx, all_status_2xx, all_status_3xx, all_status_4xx, all_status_5xx, origin_offload].hash + [requests, logging, log, resp_header_bytes, header_size, resp_body_bytes, body_size, hits, miss, pass, synth, errors, hits_time, miss_time, miss_histogram, compute_requests, compute_execution_time_ms, compute_ram_used, compute_request_time_ms, compute_request_time_billed_ms, shield, ipv6, imgopto, imgopto_shield, imgopto_transforms, otfp, otfp_shield, otfp_manifests, video, pci, http2, http3, restarts, req_header_bytes, req_body_bytes, bereq_header_bytes, bereq_body_bytes, waf_blocked, waf_logged, waf_passed, attack_req_header_bytes, attack_req_body_bytes, attack_resp_synth_bytes, attack_logged_req_header_bytes, attack_logged_req_body_bytes, attack_blocked_req_header_bytes, attack_blocked_req_body_bytes, attack_passed_req_header_bytes, attack_passed_req_body_bytes, shield_resp_header_bytes, shield_resp_body_bytes, otfp_resp_header_bytes, otfp_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_time, otfp_deliver_time, imgopto_resp_header_bytes, imgopto_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_shield_resp_body_bytes, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, uncacheable, pass_time, tls, tls_v10, tls_v11, tls_v12, tls_v13, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, object_size_other, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, log_bytes, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, origin_revalidations, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, shield_revalidations, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, edge_hit_requests, edge_miss_requests, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, origin_cache_fetches, shield_cache_fetches, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, websocket_resp_body_bytes, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, bot_challenge_complete_tokens_issued, ddos_action_downgrade, ddos_action_downgraded_connections, vcl_on_compute_hit_requests, vcl_on_compute_miss_requests, vcl_on_compute_pass_requests, vcl_on_compute_error_requests, vcl_on_compute_synth_requests, vcl_on_compute_edge_hit_requests, vcl_on_compute_edge_miss_requests, all_hit_requests, all_miss_requests, all_pass_requests, all_error_requests, all_synth_requests, all_edge_hit_requests, all_edge_miss_requests, all_status_1xx, all_status_2xx, all_status_3xx, all_status_4xx, all_status_5xx, origin_offload, request_denied_get_head_body].hash end # Builds the object from hash diff --git a/lib/fastly/models/results.rb b/lib/fastly/models/results.rb index 76adc5cc..fbd755be 100644 --- a/lib/fastly/models/results.rb +++ b/lib/fastly/models/results.rb @@ -761,6 +761,9 @@ class Results # Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). attr_accessor :origin_offload + # Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. + attr_accessor :request_denied_get_head_body + attr_accessor :service_id # Timestamp for the start of the time period being reported @@ -1018,6 +1021,7 @@ def self.attribute_map :'all_status_4xx' => :'all_status_4xx', :'all_status_5xx' => :'all_status_5xx', :'origin_offload' => :'origin_offload', + :'request_denied_get_head_body' => :'request_denied_get_head_body', :'service_id' => :'service_id', :'start_time' => :'start_time' } @@ -1280,6 +1284,7 @@ def self.fastly_types :'all_status_4xx' => :'Integer', :'all_status_5xx' => :'Integer', :'origin_offload' => :'Float', + :'request_denied_get_head_body' => :'Integer', :'service_id' => :'String', :'start_time' => :'Integer' } @@ -2303,6 +2308,10 @@ def initialize(attributes = {}) self.origin_offload = attributes[:'origin_offload'] end + if attributes.key?(:'request_denied_get_head_body') + self.request_denied_get_head_body = attributes[:'request_denied_get_head_body'] + end + if attributes.key?(:'service_id') self.service_id = attributes[:'service_id'] end @@ -2579,6 +2588,7 @@ def ==(o) all_status_4xx == o.all_status_4xx && all_status_5xx == o.all_status_5xx && origin_offload == o.origin_offload && + request_denied_get_head_body == o.request_denied_get_head_body && service_id == o.service_id && start_time == o.start_time end @@ -2592,7 +2602,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_transforms, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenge_complete_tokens_issued, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, ddos_action_downgrade, ddos_action_downgraded_connections, vcl_on_compute_hit_requests, vcl_on_compute_miss_requests, vcl_on_compute_pass_requests, vcl_on_compute_error_requests, vcl_on_compute_synth_requests, vcl_on_compute_edge_hit_requests, vcl_on_compute_edge_miss_requests, all_hit_requests, all_miss_requests, all_pass_requests, all_error_requests, all_synth_requests, all_edge_hit_requests, all_edge_miss_requests, all_status_1xx, all_status_2xx, all_status_3xx, all_status_4xx, all_status_5xx, origin_offload, service_id, start_time].hash + [requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_transforms, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenge_complete_tokens_issued, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, ddos_action_downgrade, ddos_action_downgraded_connections, vcl_on_compute_hit_requests, vcl_on_compute_miss_requests, vcl_on_compute_pass_requests, vcl_on_compute_error_requests, vcl_on_compute_synth_requests, vcl_on_compute_edge_hit_requests, vcl_on_compute_edge_miss_requests, all_hit_requests, all_miss_requests, all_pass_requests, all_error_requests, all_synth_requests, all_edge_hit_requests, all_edge_miss_requests, all_status_1xx, all_status_2xx, all_status_3xx, all_status_4xx, all_status_5xx, origin_offload, request_denied_get_head_body, service_id, start_time].hash end # Builds the object from hash diff --git a/lib/fastly/models/schemas_version_response.rb b/lib/fastly/models/schemas_version_response.rb index 15c95c03..70754965 100644 --- a/lib/fastly/models/schemas_version_response.rb +++ b/lib/fastly/models/schemas_version_response.rb @@ -45,6 +45,9 @@ class SchemasVersionResponse attr_accessor :service_id + # A list of environments where the service has been deployed. + attr_accessor :environments + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -58,7 +61,8 @@ def self.attribute_map :'created_at' => :'created_at', :'deleted_at' => :'deleted_at', :'updated_at' => :'updated_at', - :'service_id' => :'service_id' + :'service_id' => :'service_id', + :'environments' => :'environments' } end @@ -80,7 +84,8 @@ def self.fastly_types :'created_at' => :'Time', :'deleted_at' => :'Time', :'updated_at' => :'Time', - :'service_id' => :'String' + :'service_id' => :'String', + :'environments' => :'Array' } end @@ -169,6 +174,12 @@ def initialize(attributes = {}) if attributes.key?(:'service_id') self.service_id = attributes[:'service_id'] end + + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -199,7 +210,8 @@ def ==(o) created_at == o.created_at && deleted_at == o.deleted_at && updated_at == o.updated_at && - service_id == o.service_id + service_id == o.service_id && + environments == o.environments end # @see the `==` method @@ -211,7 +223,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [active, comment, deployed, locked, number, staging, testing, created_at, deleted_at, updated_at, service_id].hash + [active, comment, deployed, locked, number, staging, testing, created_at, deleted_at, updated_at, service_id, environments].hash end # Builds the object from hash diff --git a/lib/fastly/models/service_detail.rb b/lib/fastly/models/service_detail.rb index 21ddbdab..d2a4e9ed 100644 --- a/lib/fastly/models/service_detail.rb +++ b/lib/fastly/models/service_detail.rb @@ -45,6 +45,9 @@ class ServiceDetail # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions + # A list of environments where the service has been deployed. + attr_accessor :environments + attr_accessor :active_version attr_accessor :version @@ -85,6 +88,7 @@ def self.attribute_map :'publish_key' => :'publish_key', :'paused' => :'paused', :'versions' => :'versions', + :'environments' => :'environments', :'active_version' => :'active_version', :'version' => :'version' } @@ -109,6 +113,7 @@ def self.fastly_types :'publish_key' => :'String', :'paused' => :'Boolean', :'versions' => :'Array', + :'environments' => :'Array', :'active_version' => :'ServiceVersionDetailOrNull', :'version' => :'ServiceVersionDetail' } @@ -194,6 +199,12 @@ def initialize(attributes = {}) end end + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end + if attributes.key?(:'active_version') self.active_version = attributes[:'active_version'] end @@ -244,6 +255,7 @@ def ==(o) publish_key == o.publish_key && paused == o.paused && versions == o.versions && + environments == o.environments && active_version == o.active_version && version == o.version end @@ -257,7 +269,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, deleted_at, updated_at, comment, name, customer_id, type, id, publish_key, paused, versions, active_version, version].hash + [created_at, deleted_at, updated_at, comment, name, customer_id, type, id, publish_key, paused, versions, environments, active_version, version].hash end # Builds the object from hash diff --git a/lib/fastly/models/service_list_response.rb b/lib/fastly/models/service_list_response.rb index 9b66e404..3a6699eb 100644 --- a/lib/fastly/models/service_list_response.rb +++ b/lib/fastly/models/service_list_response.rb @@ -42,6 +42,9 @@ class ServiceListResponse # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions + # A list of environments where the service has been deployed. + attr_accessor :environments + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -76,7 +79,8 @@ def self.attribute_map :'type' => :'type', :'id' => :'id', :'version' => :'version', - :'versions' => :'versions' + :'versions' => :'versions', + :'environments' => :'environments' } end @@ -97,7 +101,8 @@ def self.fastly_types :'type' => :'String', :'id' => :'String', :'version' => :'Integer', - :'versions' => :'Array' + :'versions' => :'Array', + :'environments' => :'Array' } end @@ -176,6 +181,12 @@ def initialize(attributes = {}) self.versions = value end end + + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -217,7 +228,8 @@ def ==(o) type == o.type && id == o.id && version == o.version && - versions == o.versions + versions == o.versions && + environments == o.environments end # @see the `==` method @@ -229,7 +241,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, deleted_at, updated_at, comment, name, customer_id, type, id, version, versions].hash + [created_at, deleted_at, updated_at, comment, name, customer_id, type, id, version, versions, environments].hash end # Builds the object from hash diff --git a/lib/fastly/models/service_list_response_all_of.rb b/lib/fastly/models/service_list_response_all_of.rb index d0b8b85c..14683de1 100644 --- a/lib/fastly/models/service_list_response_all_of.rb +++ b/lib/fastly/models/service_list_response_all_of.rb @@ -21,12 +21,16 @@ class ServiceListResponseAllOf # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions + # A list of environments where the service has been deployed. + attr_accessor :environments + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'id' => :'id', :'version' => :'version', - :'versions' => :'versions' + :'versions' => :'versions', + :'environments' => :'environments' } end @@ -40,7 +44,8 @@ def self.fastly_types { :'id' => :'String', :'version' => :'Integer', - :'versions' => :'Array' + :'versions' => :'Array', + :'environments' => :'Array' } end @@ -78,6 +83,12 @@ def initialize(attributes = {}) self.versions = value end end + + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -100,7 +111,8 @@ def ==(o) self.class == o.class && id == o.id && version == o.version && - versions == o.versions + versions == o.versions && + environments == o.environments end # @see the `==` method @@ -112,7 +124,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, version, versions].hash + [id, version, versions, environments].hash end # Builds the object from hash diff --git a/lib/fastly/models/service_response.rb b/lib/fastly/models/service_response.rb index 7c780f13..11d45d41 100644 --- a/lib/fastly/models/service_response.rb +++ b/lib/fastly/models/service_response.rb @@ -45,6 +45,9 @@ class ServiceResponse # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions + # A list of environments where the service has been deployed. + attr_accessor :environments + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -80,7 +83,8 @@ def self.attribute_map :'id' => :'id', :'publish_key' => :'publish_key', :'paused' => :'paused', - :'versions' => :'versions' + :'versions' => :'versions', + :'environments' => :'environments' } end @@ -102,7 +106,8 @@ def self.fastly_types :'id' => :'String', :'publish_key' => :'String', :'paused' => :'Boolean', - :'versions' => :'Array' + :'versions' => :'Array', + :'environments' => :'Array' } end @@ -185,6 +190,12 @@ def initialize(attributes = {}) self.versions = value end end + + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -227,7 +238,8 @@ def ==(o) id == o.id && publish_key == o.publish_key && paused == o.paused && - versions == o.versions + versions == o.versions && + environments == o.environments end # @see the `==` method @@ -239,7 +251,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, deleted_at, updated_at, comment, name, customer_id, type, id, publish_key, paused, versions].hash + [created_at, deleted_at, updated_at, comment, name, customer_id, type, id, publish_key, paused, versions, environments].hash end # Builds the object from hash diff --git a/lib/fastly/models/service_response_all_of.rb b/lib/fastly/models/service_response_all_of.rb index 0ff787b1..10ae491a 100644 --- a/lib/fastly/models/service_response_all_of.rb +++ b/lib/fastly/models/service_response_all_of.rb @@ -24,13 +24,17 @@ class ServiceResponseAllOf # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions + # A list of environments where the service has been deployed. + attr_accessor :environments + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'id' => :'id', :'publish_key' => :'publish_key', :'paused' => :'paused', - :'versions' => :'versions' + :'versions' => :'versions', + :'environments' => :'environments' } end @@ -45,7 +49,8 @@ def self.fastly_types :'id' => :'String', :'publish_key' => :'String', :'paused' => :'Boolean', - :'versions' => :'Array' + :'versions' => :'Array', + :'environments' => :'Array' } end @@ -87,6 +92,12 @@ def initialize(attributes = {}) self.versions = value end end + + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -110,7 +121,8 @@ def ==(o) id == o.id && publish_key == o.publish_key && paused == o.paused && - versions == o.versions + versions == o.versions && + environments == o.environments end # @see the `==` method @@ -122,7 +134,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, publish_key, paused, versions].hash + [id, publish_key, paused, versions, environments].hash end # Builds the object from hash diff --git a/lib/fastly/models/service_version_detail.rb b/lib/fastly/models/service_version_detail.rb index e2be6c4b..9b4ea8d8 100644 --- a/lib/fastly/models/service_version_detail.rb +++ b/lib/fastly/models/service_version_detail.rb @@ -45,6 +45,9 @@ class ServiceVersionDetail attr_accessor :service_id + # A list of environments where the service has been deployed. + attr_accessor :environments + # List of backends associated to this service. attr_accessor :backends @@ -100,6 +103,7 @@ def self.attribute_map :'deleted_at' => :'deleted_at', :'updated_at' => :'updated_at', :'service_id' => :'service_id', + :'environments' => :'environments', :'backends' => :'backends', :'cache_settings' => :'cache_settings', :'conditions' => :'conditions', @@ -136,6 +140,7 @@ def self.fastly_types :'deleted_at' => :'Time', :'updated_at' => :'Time', :'service_id' => :'String', + :'environments' => :'Array', :'backends' => :'Array', :'cache_settings' => :'Array', :'conditions' => :'Array', @@ -238,6 +243,12 @@ def initialize(attributes = {}) self.service_id = attributes[:'service_id'] end + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end + if attributes.key?(:'backends') if (value = attributes[:'backends']).is_a?(Array) self.backends = value @@ -350,6 +361,7 @@ def ==(o) deleted_at == o.deleted_at && updated_at == o.updated_at && service_id == o.service_id && + environments == o.environments && backends == o.backends && cache_settings == o.cache_settings && conditions == o.conditions && @@ -375,7 +387,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [active, comment, deployed, locked, number, staging, testing, created_at, deleted_at, updated_at, service_id, backends, cache_settings, conditions, directors, domains, gzips, headers, healthchecks, request_settings, response_objects, settings, snippets, vcls, wordpress].hash + [active, comment, deployed, locked, number, staging, testing, created_at, deleted_at, updated_at, service_id, environments, backends, cache_settings, conditions, directors, domains, gzips, headers, healthchecks, request_settings, response_objects, settings, snippets, vcls, wordpress].hash end # Builds the object from hash diff --git a/lib/fastly/models/service_version_detail_or_null.rb b/lib/fastly/models/service_version_detail_or_null.rb index a1f75ae2..2c081286 100644 --- a/lib/fastly/models/service_version_detail_or_null.rb +++ b/lib/fastly/models/service_version_detail_or_null.rb @@ -45,6 +45,9 @@ class ServiceVersionDetailOrNull attr_accessor :service_id + # A list of environments where the service has been deployed. + attr_accessor :environments + # List of backends associated to this service. attr_accessor :backends @@ -100,6 +103,7 @@ def self.attribute_map :'deleted_at' => :'deleted_at', :'updated_at' => :'updated_at', :'service_id' => :'service_id', + :'environments' => :'environments', :'backends' => :'backends', :'cache_settings' => :'cache_settings', :'conditions' => :'conditions', @@ -136,6 +140,7 @@ def self.fastly_types :'deleted_at' => :'Time', :'updated_at' => :'Time', :'service_id' => :'String', + :'environments' => :'Array', :'backends' => :'Array', :'cache_settings' => :'Array', :'conditions' => :'Array', @@ -238,6 +243,12 @@ def initialize(attributes = {}) self.service_id = attributes[:'service_id'] end + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end + if attributes.key?(:'backends') if (value = attributes[:'backends']).is_a?(Array) self.backends = value @@ -350,6 +361,7 @@ def ==(o) deleted_at == o.deleted_at && updated_at == o.updated_at && service_id == o.service_id && + environments == o.environments && backends == o.backends && cache_settings == o.cache_settings && conditions == o.conditions && @@ -375,7 +387,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [active, comment, deployed, locked, number, staging, testing, created_at, deleted_at, updated_at, service_id, backends, cache_settings, conditions, directors, domains, gzips, headers, healthchecks, request_settings, response_objects, settings, snippets, vcls, wordpress].hash + [active, comment, deployed, locked, number, staging, testing, created_at, deleted_at, updated_at, service_id, environments, backends, cache_settings, conditions, directors, domains, gzips, headers, healthchecks, request_settings, response_objects, settings, snippets, vcls, wordpress].hash end # Builds the object from hash diff --git a/lib/fastly/models/set_configuration.rb b/lib/fastly/models/set_configuration.rb new file mode 100644 index 00000000..e584cff9 --- /dev/null +++ b/lib/fastly/models/set_configuration.rb @@ -0,0 +1,227 @@ +=begin +#Fastly API + +#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://www.fastly.com/documentation/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class SetConfiguration + # The new workspace_id. Required in the `PUT` request body when `product_id` is `ngwaf`. Optional in the `PATCH` request body for `ngwaf`. + attr_accessor :workspace_id + + # The new traffic ramp. Optional in the `PATCH` request body for `ngwaf`. + attr_accessor :traffic_ramp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'workspace_id' => :'workspace_id', + :'traffic_ramp' => :'traffic_ramp' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'workspace_id' => :'String', + :'traffic_ramp' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::SetConfiguration` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::SetConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'workspace_id') + self.workspace_id = attributes[:'workspace_id'] + end + + if attributes.key?(:'traffic_ramp') + self.traffic_ramp = attributes[:'traffic_ramp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + workspace_id == o.workspace_id && + traffic_ramp == o.traffic_ramp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [workspace_id, traffic_ramp].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/subsequent_request_timestamp.rb b/lib/fastly/models/set_workspace_id.rb similarity index 90% rename from lib/fastly/models/subsequent_request_timestamp.rb rename to lib/fastly/models/set_workspace_id.rb index a6562b67..2ce2669e 100644 --- a/lib/fastly/models/subsequent_request_timestamp.rb +++ b/lib/fastly/models/set_workspace_id.rb @@ -12,11 +12,14 @@ require 'time' module Fastly - # Value to use for subsequent requests. - class SubsequentRequestTimestamp + class SetWorkspaceId + # The workspace to link with the Next-Gen WAF product. Note this body is only supported and required when `product_id` is `ngwaf` + attr_accessor :workspace_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'workspace_id' => :'workspace_id' } end @@ -28,6 +31,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { + :'workspace_id' => :'String' } end @@ -41,16 +45,20 @@ def self.fastly_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::SubsequentRequestTimestamp` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::SetWorkspaceId` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::SubsequentRequestTimestamp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::SetWorkspaceId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } + + if attributes.key?(:'workspace_id') + self.workspace_id = attributes[:'workspace_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -70,7 +78,8 @@ def valid? # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) - self.class == o.class + self.class == o.class && + workspace_id == o.workspace_id end # @see the `==` method @@ -82,7 +91,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [].hash + [workspace_id].hash end # Builds the object from hash diff --git a/lib/fastly/models/version_response.rb b/lib/fastly/models/version_response.rb index e4829fd1..0a1548f1 100644 --- a/lib/fastly/models/version_response.rb +++ b/lib/fastly/models/version_response.rb @@ -45,6 +45,9 @@ class VersionResponse attr_accessor :service_id + # A list of environments where the service has been deployed. + attr_accessor :environments + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -58,7 +61,8 @@ def self.attribute_map :'created_at' => :'created_at', :'deleted_at' => :'deleted_at', :'updated_at' => :'updated_at', - :'service_id' => :'service_id' + :'service_id' => :'service_id', + :'environments' => :'environments' } end @@ -80,7 +84,8 @@ def self.fastly_types :'created_at' => :'Time', :'deleted_at' => :'Time', :'updated_at' => :'Time', - :'service_id' => :'String' + :'service_id' => :'String', + :'environments' => :'Array' } end @@ -169,6 +174,12 @@ def initialize(attributes = {}) if attributes.key?(:'service_id') self.service_id = attributes[:'service_id'] end + + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -199,7 +210,8 @@ def ==(o) created_at == o.created_at && deleted_at == o.deleted_at && updated_at == o.updated_at && - service_id == o.service_id + service_id == o.service_id && + environments == o.environments end # @see the `==` method @@ -211,7 +223,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [active, comment, deployed, locked, number, staging, testing, created_at, deleted_at, updated_at, service_id].hash + [active, comment, deployed, locked, number, staging, testing, created_at, deleted_at, updated_at, service_id, environments].hash end # Builds the object from hash diff --git a/lib/fastly/models/version_response_all_of.rb b/lib/fastly/models/version_response_all_of.rb index 6db91efd..20647ce4 100644 --- a/lib/fastly/models/version_response_all_of.rb +++ b/lib/fastly/models/version_response_all_of.rb @@ -15,10 +15,14 @@ module Fastly class VersionResponseAllOf attr_accessor :service_id + # A list of environments where the service has been deployed. + attr_accessor :environments + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'service_id' => :'service_id' + :'service_id' => :'service_id', + :'environments' => :'environments' } end @@ -30,7 +34,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { - :'service_id' => :'String' + :'service_id' => :'String', + :'environments' => :'Array' } end @@ -58,6 +63,12 @@ def initialize(attributes = {}) if attributes.key?(:'service_id') self.service_id = attributes[:'service_id'] end + + if attributes.key?(:'environments') + if (value = attributes[:'environments']).is_a?(Array) + self.environments = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -78,7 +89,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - service_id == o.service_id + service_id == o.service_id && + environments == o.environments end # @see the `==` method @@ -90,7 +102,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [service_id].hash + [service_id, environments].hash end # Builds the object from hash diff --git a/lib/fastly/version.rb b/lib/fastly/version.rb index 6005232f..5ebdd089 100644 --- a/lib/fastly/version.rb +++ b/lib/fastly/version.rb @@ -9,5 +9,5 @@ =end module Fastly - VERSION = '8.8.0' + VERSION = '8.9.0' end diff --git a/sig.json b/sig.json index 442b4f5b..d9facb92 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "6c487eff", "D": "8fce7d1c"} +{"G": "1827dbb1", "D": "1f27800e"}