diff --git a/CHANGELOG.md b/CHANGELOG.md index 426e7aa..3dd990f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [v5.6.0](https://github.com/fastly/fastly-py/releases/tag/release/v5.6.0) (2024-08-04) + +**Enhancements:** + +- feat(observability): Adds new Observability Custom Dashboards API +- feat(billing-invoices): Adds month-to-date invoice information +- feat(billing-usage-metrics): Adds information on service-level usage. +- feat(tls): Adds an endpoint to get a TLS certificate blob (Limited Availability) +- feat(stats): Add `origin_offload` metric + ## [v5.5.0](https://github.com/fastly/fastly-py/releases/tag/release/v5.5.0) (2024-07-01) **Bug fixes:** diff --git a/README.md b/README.md index 76ac537..c733a50 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,10 @@ Class | Method | Description *BillingAddressApi* | [**get_billing_addr**](docs/BillingAddressApi.md#get_billing_addr) | Get a billing address *BillingAddressApi* | [**update_billing_addr**](docs/BillingAddressApi.md#update_billing_addr) | Update a billing address *BillingInvoicesApi* | [**get_invoice_by_invoice_id**](docs/BillingInvoicesApi.md#get_invoice_by_invoice_id) | Get invoice by ID. +*BillingInvoicesApi* | [**get_month_to_date_invoice**](docs/BillingInvoicesApi.md#get_month_to_date_invoice) | Get month-to-date invoice. *BillingInvoicesApi* | [**list_invoices**](docs/BillingInvoicesApi.md#list_invoices) | List of invoices. +*BillingUsageMetricsApi* | [**get_service_level_usage**](docs/BillingUsageMetricsApi.md#get_service_level_usage) | Retrieve service-level usage metrics for a product. +*BillingUsageMetricsApi* | [**get_service_level_usage_types**](docs/BillingUsageMetricsApi.md#get_service_level_usage_types) | Retrieve product usage types for a customer. *CacheSettingsApi* | [**create_cache_settings**](docs/CacheSettingsApi.md#create_cache_settings) | Create a cache settings object *CacheSettingsApi* | [**delete_cache_settings**](docs/CacheSettingsApi.md#delete_cache_settings) | Delete a cache settings object *CacheSettingsApi* | [**get_cache_settings**](docs/CacheSettingsApi.md#get_cache_settings) | Get a cache settings object @@ -409,6 +412,11 @@ Class | Method | Description *MutualAuthenticationApi* | [**get_mutual_authentication**](docs/MutualAuthenticationApi.md#get_mutual_authentication) | Get a Mutual Authentication *MutualAuthenticationApi* | [**list_mutual_authentications**](docs/MutualAuthenticationApi.md#list_mutual_authentications) | List Mutual Authentications *MutualAuthenticationApi* | [**patch_mutual_authentication**](docs/MutualAuthenticationApi.md#patch_mutual_authentication) | Update a Mutual Authentication +*ObservabilityCustomDashboardsApi* | [**create_dashboard**](docs/ObservabilityCustomDashboardsApi.md#create_dashboard) | Create a new dashboard +*ObservabilityCustomDashboardsApi* | [**delete_dashboard**](docs/ObservabilityCustomDashboardsApi.md#delete_dashboard) | Delete an existing dashboard +*ObservabilityCustomDashboardsApi* | [**get_dashboard**](docs/ObservabilityCustomDashboardsApi.md#get_dashboard) | Retrieve a dashboard by ID +*ObservabilityCustomDashboardsApi* | [**list_dashboards**](docs/ObservabilityCustomDashboardsApi.md#list_dashboards) | List all custom dashboards +*ObservabilityCustomDashboardsApi* | [**update_dashboard**](docs/ObservabilityCustomDashboardsApi.md#update_dashboard) | Update an existing dashboard *OriginInspectorHistoricalApi* | [**get_origin_inspector_historical**](docs/OriginInspectorHistoricalApi.md#get_origin_inspector_historical) | Get historical origin data for a service *OriginInspectorRealtimeApi* | [**get_origin_inspector_last120_seconds**](docs/OriginInspectorRealtimeApi.md#get_origin_inspector_last120_seconds) | Get real-time origin data for the last 120 seconds *OriginInspectorRealtimeApi* | [**get_origin_inspector_last_max_entries**](docs/OriginInspectorRealtimeApi.md#get_origin_inspector_last_max_entries) | Get a limited number of real-time origin data entries @@ -510,6 +518,7 @@ Class | Method | Description *TlsCertificatesApi* | [**create_tls_cert**](docs/TlsCertificatesApi.md#create_tls_cert) | Create a TLS certificate *TlsCertificatesApi* | [**delete_tls_cert**](docs/TlsCertificatesApi.md#delete_tls_cert) | Delete a TLS certificate *TlsCertificatesApi* | [**get_tls_cert**](docs/TlsCertificatesApi.md#get_tls_cert) | Get a TLS certificate +*TlsCertificatesApi* | [**get_tls_cert_blob**](docs/TlsCertificatesApi.md#get_tls_cert_blob) | Get a TLS certificate blob (Limited Availability) *TlsCertificatesApi* | [**list_tls_certs**](docs/TlsCertificatesApi.md#list_tls_certs) | List TLS certificates *TlsCertificatesApi* | [**update_tls_cert**](docs/TlsCertificatesApi.md#update_tls_cert) | Update a TLS certificate *TlsConfigurationsApi* | [**get_tls_config**](docs/TlsConfigurationsApi.md#get_tls_config) | Get a TLS configuration @@ -607,6 +616,8 @@ The fastly-py API client currently does not support the following endpoints: - [`/alerts/definitions/{definition_id}`](https://www.fastly.com/documentation/reference/api/observability/alerts/definitions) (DELETE, GET, PUT) - [`/alerts/definitions`](https://www.fastly.com/documentation/reference/api/observability/alerts/definitions) (GET, POST) - [`/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) - [`/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) @@ -616,7 +627,9 @@ The fastly-py API client currently does not support the following endpoints: - [`/resources/stores/kv/{store_id}/batch`](https://www.fastly.com/documentation/reference/api/services/resources/kv-store-item) (PUT) - [`/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/preview/domains/{tls_preview_domain_id}`](https://www.fastly.com/documentation/reference/api/) (GET, PATCH) +- [`/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) diff --git a/docs/RelationshipTlsDnsRecordDnsRecord.md b/docs/AsyncResponse.md similarity index 76% rename from docs/RelationshipTlsDnsRecordDnsRecord.md rename to docs/AsyncResponse.md index 5b24713..3b0d899 100644 --- a/docs/RelationshipTlsDnsRecordDnsRecord.md +++ b/docs/AsyncResponse.md @@ -1,10 +1,11 @@ -# RelationshipTlsDnsRecordDnsRecord +# AsyncResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**[RelationshipMemberTlsDnsRecord]**](RelationshipMemberTlsDnsRecord.md) | | [optional] +**title** | **str** | | [optional] +**status** | **str** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BillingInvoicesApi.md b/docs/BillingInvoicesApi.md index 6a80d17..b275206 100644 --- a/docs/BillingInvoicesApi.md +++ b/docs/BillingInvoicesApi.md @@ -6,11 +6,12 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**get_invoice_by_invoice_id**](BillingInvoicesApi.md#get_invoice_by_invoice_id) | **GET** /billing/v3/invoices/{invoice_id} | Get invoice by ID. +[**get_month_to_date_invoice**](BillingInvoicesApi.md#get_month_to_date_invoice) | **GET** /billing/v3/invoices/month-to-date | Get month-to-date invoice. [**list_invoices**](BillingInvoicesApi.md#list_invoices) | **GET** /billing/v3/invoices | List of invoices. # **get_invoice_by_invoice_id** -> InvoiceResponse get_invoice_by_invoice_id(invoice_id) +> EomInvoiceResponse get_invoice_by_invoice_id(invoice_id) Get invoice by ID. @@ -24,7 +25,7 @@ Returns invoice associated with the invoice id. import time import fastly from fastly.api import billing_invoices_api -from fastly.model.invoice_response import InvoiceResponse +from fastly.model.eom_invoice_response import EomInvoiceResponse from fastly.model.error import Error from pprint import pprint # Defining the host is optional and defaults to https://api.fastly.com @@ -68,7 +69,7 @@ Name | Type | Description | Notes ### Return type -[**InvoiceResponse**](InvoiceResponse.md) +[**EomInvoiceResponse**](EomInvoiceResponse.md) ### Authorization @@ -91,8 +92,89 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_month_to_date_invoice** +> MtdInvoiceResponse get_month_to_date_invoice() + +Get month-to-date invoice. + +Returns month-to-date invoice for the current month. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import billing_invoices_api +from fastly.model.mtd_invoice_response import MtdInvoiceResponse +from fastly.model.error import Error +from fastly.model.async_response import AsyncResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_invoices_api.BillingInvoicesApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get month-to-date invoice. + api_response = api_instance.get_month_to_date_invoice() + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling BillingInvoicesApi->get_month_to_date_invoice: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**MtdInvoiceResponse**](MtdInvoiceResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**202** | Accepted | - | +**401** | Unauthorized | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **list_invoices** -> ListInvoicesResponse list_invoices() +> ListEomInvoicesResponse list_invoices() List of invoices. @@ -106,8 +188,8 @@ Returns the list of invoices, sorted by billing start date (newest to oldest). import time import fastly from fastly.api import billing_invoices_api +from fastly.model.list_eom_invoices_response import ListEomInvoicesResponse from fastly.model.error import Error -from fastly.model.list_invoices_response import ListInvoicesResponse from pprint import pprint # Defining the host is optional and defaults to https://api.fastly.com # See configuration.py for a list of all supported configuration parameters. @@ -157,7 +239,7 @@ Name | Type | Description | Notes ### Return type -[**ListInvoicesResponse**](ListInvoicesResponse.md) +[**ListEomInvoicesResponse**](ListEomInvoicesResponse.md) ### Authorization diff --git a/docs/BillingUsageMetricsApi.md b/docs/BillingUsageMetricsApi.md new file mode 100644 index 0000000..2c65582 --- /dev/null +++ b/docs/BillingUsageMetricsApi.md @@ -0,0 +1,202 @@ +# fastly.BillingUsageMetricsApi + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_service_level_usage**](BillingUsageMetricsApi.md#get_service_level_usage) | **GET** /billing/v2/account_customers/{customer_id}/service-usage-metrics | Retrieve service-level usage metrics for a product. +[**get_service_level_usage_types**](BillingUsageMetricsApi.md#get_service_level_usage_types) | **GET** /billing/v2/account_customers/{customer_id}/service-usage-types | Retrieve product usage types for a customer. + + +# **get_service_level_usage** +> Serviceusagemetrics get_service_level_usage(customer_id, product_id, usage_type_name, time_granularity) + +Retrieve service-level usage metrics for a product. + +Returns product usage, broken down by service. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import billing_usage_metrics_api +from fastly.model.serviceusagemetrics import Serviceusagemetrics +from fastly.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_usage_metrics_api.BillingUsageMetricsApi(api_client) + customer_id = "x4xCwxxJxGCx123Rx5xTx" # str | Alphanumeric string identifying the customer. + product_id = "product_id_example" # str | The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. + usage_type_name = "usage_type_name_example" # str | The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. + time_granularity = "month" # str | + start_date = "2023-01-01" # str | (optional) + end_date = "2023-01-31" # str | (optional) + start_month = "2023-01" # str | (optional) + end_month = "2023-03" # str | (optional) + limit = "5" # str | Number of results per page. The maximum is 100. (optional) if omitted the server will use the default value of "5" + cursor = "cursor_example" # str | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + + # example passing only required values which don't have defaults set + try: + # Retrieve service-level usage metrics for a product. + api_response = api_instance.get_service_level_usage(customer_id, product_id, usage_type_name, time_granularity) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling BillingUsageMetricsApi->get_service_level_usage: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Retrieve service-level usage metrics for a product. + api_response = api_instance.get_service_level_usage(customer_id, product_id, usage_type_name, time_granularity, start_date=start_date, end_date=end_date, start_month=start_month, end_month=end_month, limit=limit, cursor=cursor) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling BillingUsageMetricsApi->get_service_level_usage: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_id** | **str**| Alphanumeric string identifying the customer. | + **product_id** | **str**| The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. | + **usage_type_name** | **str**| The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. | + **time_granularity** | **str**| | + **start_date** | **str**| | [optional] + **end_date** | **str**| | [optional] + **start_month** | **str**| | [optional] + **end_month** | **str**| | [optional] + **limit** | **str**| Number of results per page. The maximum is 100. | [optional] if omitted the server will use the default value of "5" + **cursor** | **str**| Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] + +### Return type + +[**Serviceusagemetrics**](Serviceusagemetrics.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A response containing usage elements. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_service_level_usage_types** +> Serviceusagetypes get_service_level_usage_types(customer_id) + +Retrieve product usage types for a customer. + +Returns product usage types reported by the customer's services. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import billing_usage_metrics_api +from fastly.model.error import Error +from fastly.model.serviceusagetypes import Serviceusagetypes +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_usage_metrics_api.BillingUsageMetricsApi(api_client) + customer_id = "x4xCwxxJxGCx123Rx5xTx" # str | Alphanumeric string identifying the customer. + + # example passing only required values which don't have defaults set + try: + # Retrieve product usage types for a customer. + api_response = api_instance.get_service_level_usage_types(customer_id) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling BillingUsageMetricsApi->get_service_level_usage_types: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_id** | **str**| Alphanumeric string identifying the customer. | + +### Return type + +[**Serviceusagetypes**](Serviceusagetypes.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A response containing usage elements. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CreateDashboardRequest.md b/docs/CreateDashboardRequest.md new file mode 100644 index 0000000..54b2b27 --- /dev/null +++ b/docs/CreateDashboardRequest.md @@ -0,0 +1,14 @@ +# CreateDashboardRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A human-readable name | +**description** | **str** | A short description of the dashboard | [optional] +**items** | [**DashboardPropertyItems**](DashboardPropertyItems.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Dashboard.md b/docs/Dashboard.md new file mode 100644 index 0000000..f6eb5c9 --- /dev/null +++ b/docs/Dashboard.md @@ -0,0 +1,19 @@ +# Dashboard + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Dashboard identifier (UUID) | [optional] [readonly] +**name** | **str** | A human-readable name | [optional] +**description** | **str** | A short description of the dashboard | [optional] +**items** | [**DashboardPropertyItems**](DashboardPropertyItems.md) | | [optional] +**created_at** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] +**updated_at** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] +**created_by** | [**DashboardPropertyCreatedBy**](DashboardPropertyCreatedBy.md) | | [optional] +**updated_by** | [**DashboardPropertyUpdatedBy**](DashboardPropertyUpdatedBy.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardItem.md b/docs/DashboardItem.md new file mode 100644 index 0000000..9a4d97c --- /dev/null +++ b/docs/DashboardItem.md @@ -0,0 +1,18 @@ +# DashboardItem + +A dashboard item. Typically a data visualization like a chart. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | [**DashboardItemPropertyTitle**](DashboardItemPropertyTitle.md) | | +**subtitle** | [**DashboardItemPropertySubtitle**](DashboardItemPropertySubtitle.md) | | +**data_source** | [**DashboardItemPropertyDataSource**](DashboardItemPropertyDataSource.md) | | +**visualization** | [**DashboardItemPropertyVisualization**](DashboardItemPropertyVisualization.md) | | +**id** | **str** | Dashboard item identifier (UUID) | [optional] [readonly] +**span** | [**DashboardItemPropertySpan**](DashboardItemPropertySpan.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardItemPropertyDataSource.md b/docs/DashboardItemPropertyDataSource.md new file mode 100644 index 0000000..ea22e7d --- /dev/null +++ b/docs/DashboardItemPropertyDataSource.md @@ -0,0 +1,14 @@ +# DashboardItemPropertyDataSource + +[An object](#data-source) which describes the data to display. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The source of the data to display. | +**config** | [**DashboardItemPropertyDataSourcePropertyConfig**](DashboardItemPropertyDataSourcePropertyConfig.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardItemPropertyDataSourcePropertyConfig.md b/docs/DashboardItemPropertyDataSourcePropertyConfig.md new file mode 100644 index 0000000..bb6758b --- /dev/null +++ b/docs/DashboardItemPropertyDataSourcePropertyConfig.md @@ -0,0 +1,13 @@ +# DashboardItemPropertyDataSourcePropertyConfig + +[Configuration options](#data-source-config) for the selected data source. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metrics** | **[str]** | The metrics to visualize. Valid options are defined by the selected [data source](#field_data_source). | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardItemPropertySpan.md b/docs/DashboardItemPropertySpan.md new file mode 100644 index 0000000..455ac90 --- /dev/null +++ b/docs/DashboardItemPropertySpan.md @@ -0,0 +1,12 @@ +# DashboardItemPropertySpan + +The number of columns for the dashboard item to span. Dashboards are rendered on a 12-column grid on \"desktop\" screen sizes. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | The number of columns for the dashboard item to span. Dashboards are rendered on a 12-column grid on \"desktop\" screen sizes. | defaults to 4 + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardItemPropertySubtitle.md b/docs/DashboardItemPropertySubtitle.md new file mode 100644 index 0000000..3423239 --- /dev/null +++ b/docs/DashboardItemPropertySubtitle.md @@ -0,0 +1,12 @@ +# DashboardItemPropertySubtitle + +A human-readable subtitle for the dashboard item. Often a description of the visualization. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | A human-readable subtitle for the dashboard item. Often a description of the visualization. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardItemPropertyTitle.md b/docs/DashboardItemPropertyTitle.md new file mode 100644 index 0000000..53fa409 --- /dev/null +++ b/docs/DashboardItemPropertyTitle.md @@ -0,0 +1,12 @@ +# DashboardItemPropertyTitle + +A human-readable title for the dashboard item + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | A human-readable title for the dashboard item | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardItemPropertyVisualization.md b/docs/DashboardItemPropertyVisualization.md new file mode 100644 index 0000000..40b6ee5 --- /dev/null +++ b/docs/DashboardItemPropertyVisualization.md @@ -0,0 +1,14 @@ +# DashboardItemPropertyVisualization + +[An object](#visualization) which describes the data visualization to display. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | [**DashboardItemPropertyVisualizationPropertyConfig**](DashboardItemPropertyVisualizationPropertyConfig.md) | | +**type** | **str** | The type of visualization to display. | defaults to "chart" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardItemPropertyVisualizationPropertyConfig.md b/docs/DashboardItemPropertyVisualizationPropertyConfig.md new file mode 100644 index 0000000..b06add2 --- /dev/null +++ b/docs/DashboardItemPropertyVisualizationPropertyConfig.md @@ -0,0 +1,15 @@ +# DashboardItemPropertyVisualizationPropertyConfig + +[Configuration options](#visualization-config) for the given visualization. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plot_type** | **str** | The type of chart to display. | +**format** | **str** | (Optional) The units to use to format the data. | [optional] if omitted the server will use the default value of "number" +**calculation_method** | **str** | (Optional) The aggregation function to apply to the dataset. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardPropertyCreatedBy.md b/docs/DashboardPropertyCreatedBy.md new file mode 100644 index 0000000..82705bf --- /dev/null +++ b/docs/DashboardPropertyCreatedBy.md @@ -0,0 +1,11 @@ +# DashboardPropertyCreatedBy + +The ID of the user who created the dashboard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardPropertyItems.md b/docs/DashboardPropertyItems.md new file mode 100644 index 0000000..dabac55 --- /dev/null +++ b/docs/DashboardPropertyItems.md @@ -0,0 +1,12 @@ +# DashboardPropertyItems + +A list of [dashboard items](#dashboard-item). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[DashboardItem], none_type**](DashboardItem.md) | A list of [dashboard items](#dashboard-item). | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardPropertyUpdatedBy.md b/docs/DashboardPropertyUpdatedBy.md new file mode 100644 index 0000000..25759ba --- /dev/null +++ b/docs/DashboardPropertyUpdatedBy.md @@ -0,0 +1,11 @@ +# DashboardPropertyUpdatedBy + +The ID of the user who last modified the dashboard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainInspectorMeasurements.md b/docs/DomainInspectorMeasurements.md index b5f2bde..cfde269 100644 --- a/docs/DomainInspectorMeasurements.md +++ b/docs/DomainInspectorMeasurements.md @@ -43,7 +43,7 @@ Name | Type | Description | Notes **origin_fetch_resp_body_bytes** | **int** | Total body bytes received from origin. | [optional] **bandwidth** | **int** | Total bytes delivered (`resp_header_bytes` + `resp_body_bytes` + `bereq_header_bytes` + `bereq_body_bytes`). | [optional] **edge_hit_ratio** | **float** | Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)). | [optional] -**origin_offload** | **float** | Ratio of response bytes delivered from the edge compared to what is delivered from origin, 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] +**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`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric). | [optional] **origin_status_200** | **int** | Number of responses received from origin with status code 200 (Success). | [optional] **origin_status_204** | **int** | Number of responses received from origin with status code 204 (No Content). | [optional] **origin_status_206** | **int** | Number of responses received from origin with status code 206 (Partial Content). | [optional] diff --git a/docs/InvoiceResponse.md b/docs/EomInvoiceResponse.md similarity index 98% rename from docs/InvoiceResponse.md rename to docs/EomInvoiceResponse.md index 4151b06..817b480 100644 --- a/docs/InvoiceResponse.md +++ b/docs/EomInvoiceResponse.md @@ -1,4 +1,4 @@ -# InvoiceResponse +# EomInvoiceResponse ## Properties diff --git a/docs/RelationshipTlsDnsRecord.md b/docs/GetServiceLevelUsageResponse.md similarity index 76% rename from docs/RelationshipTlsDnsRecord.md rename to docs/GetServiceLevelUsageResponse.md index c95a9dc..fd862b9 100644 --- a/docs/RelationshipTlsDnsRecord.md +++ b/docs/GetServiceLevelUsageResponse.md @@ -1,10 +1,10 @@ -# RelationshipTlsDnsRecord +# GetServiceLevelUsageResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dns_record** | [**RelationshipTlsDnsRecordDnsRecord**](RelationshipTlsDnsRecordDnsRecord.md) | | [optional] +**data** | [**ServiceusagemetricsData**](ServiceusagemetricsData.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RelationshipTlsDnsRecords.md b/docs/GetServiceLevelUsageTypesResponse.md similarity index 75% rename from docs/RelationshipTlsDnsRecords.md rename to docs/GetServiceLevelUsageTypesResponse.md index 389d9fe..38fac05 100644 --- a/docs/RelationshipTlsDnsRecords.md +++ b/docs/GetServiceLevelUsageTypesResponse.md @@ -1,10 +1,10 @@ -# RelationshipTlsDnsRecords +# GetServiceLevelUsageTypesResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dns_records** | [**RelationshipTlsDnsRecordDnsRecord**](RelationshipTlsDnsRecordDnsRecord.md) | | [optional] +**data** | [**[Serviceusagetype]**](Serviceusagetype.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IncludedWithTlsConfiguration.md b/docs/IncludedWithTlsConfiguration.md new file mode 100644 index 0000000..aaa88e6 --- /dev/null +++ b/docs/IncludedWithTlsConfiguration.md @@ -0,0 +1,12 @@ +# IncludedWithTlsConfiguration + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**included** | [**[IncludedWithTlsConfigurationItem]**](IncludedWithTlsConfigurationItem.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncludedWithTlsConfigurationItem.md b/docs/IncludedWithTlsConfigurationItem.md new file mode 100644 index 0000000..ecdacaf --- /dev/null +++ b/docs/IncludedWithTlsConfigurationItem.md @@ -0,0 +1,14 @@ +# IncludedWithTlsConfigurationItem + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The IP address or hostname of the DNS record. | [optional] +**type** | [**TypeTlsDnsRecord**](TypeTlsDnsRecord.md) | | [optional] +**attributes** | [**TlsDnsRecord**](TlsDnsRecord.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListDashboardsResponse.md b/docs/ListDashboardsResponse.md new file mode 100644 index 0000000..9a555ea --- /dev/null +++ b/docs/ListDashboardsResponse.md @@ -0,0 +1,13 @@ +# ListDashboardsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Dashboard]**](Dashboard.md) | | [optional] +**meta** | **bool, date, datetime, dict, float, int, list, str, none_type** | Meta for the pagination. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListInvoicesResponse.md b/docs/ListEomInvoicesResponse.md similarity index 95% rename from docs/ListInvoicesResponse.md rename to docs/ListEomInvoicesResponse.md index b44e675..1bb1f39 100644 --- a/docs/ListInvoicesResponse.md +++ b/docs/ListEomInvoicesResponse.md @@ -1,4 +1,4 @@ -# ListInvoicesResponse +# ListEomInvoicesResponse ## Properties diff --git a/docs/MetaPerPage.md b/docs/MetaPerPage.md new file mode 100644 index 0000000..30a86d2 --- /dev/null +++ b/docs/MetaPerPage.md @@ -0,0 +1,12 @@ +# MetaPerPage + +Number of records per page. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | Number of records per page. | defaults to 20 + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MtdInvoiceResponse.md b/docs/MtdInvoiceResponse.md new file mode 100644 index 0000000..a4583fb --- /dev/null +++ b/docs/MtdInvoiceResponse.md @@ -0,0 +1,17 @@ +# MtdInvoiceResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | The Customer ID associated with the invoice. | [optional] +**invoice_id** | **str** | An alphanumeric string identifying the invoice. | [optional] +**billing_start_date** | **datetime** | The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] +**billing_end_date** | **datetime** | The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] +**monthly_transaction_amount** | **str** | The total billable amount for invoiced services charged within a single month. | [optional] +**transaction_line_items** | [**[Mtdlineitems]**](Mtdlineitems.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Mtdinvoice.md b/docs/Mtdinvoice.md new file mode 100644 index 0000000..d7caf08 --- /dev/null +++ b/docs/Mtdinvoice.md @@ -0,0 +1,17 @@ +# Mtdinvoice + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | The Customer ID associated with the invoice. | [optional] +**invoice_id** | **str** | An alphanumeric string identifying the invoice. | [optional] +**billing_start_date** | **datetime** | The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] +**billing_end_date** | **datetime** | The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] +**monthly_transaction_amount** | **str** | The total billable amount for invoiced services charged within a single month. | [optional] +**transaction_line_items** | [**[Mtdlineitems]**](Mtdlineitems.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Mtdlineitems.md b/docs/Mtdlineitems.md new file mode 100644 index 0000000..5a59eed --- /dev/null +++ b/docs/Mtdlineitems.md @@ -0,0 +1,20 @@ +# Mtdlineitems + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Invoice line item transaction name. | [optional] +**amount** | **float** | Billed amount for line item. | [optional] +**rate** | **float** | Price per unit. | [optional] +**units** | **float** | Total number of units of usage. | [optional] +**product_name** | **str** | The name of the product. | [optional] +**product_group** | **str** | The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). | [optional] +**product_line** | **str** | The broader classification of the product (e.g., `Network Services` or `Security`). | [optional] +**region** | **str** | The geographical area applicable for regionally based products. | [optional] +**usage_type** | **str** | The unit of measure (e.g., `requests` or `bandwidth`). | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ObservabilityCustomDashboardsApi.md b/docs/ObservabilityCustomDashboardsApi.md new file mode 100644 index 0000000..62e26b9 --- /dev/null +++ b/docs/ObservabilityCustomDashboardsApi.md @@ -0,0 +1,464 @@ +# fastly.ObservabilityCustomDashboardsApi + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_dashboard**](ObservabilityCustomDashboardsApi.md#create_dashboard) | **POST** /observability/dashboards | Create a new dashboard +[**delete_dashboard**](ObservabilityCustomDashboardsApi.md#delete_dashboard) | **DELETE** /observability/dashboards/{dashboard_id} | Delete an existing dashboard +[**get_dashboard**](ObservabilityCustomDashboardsApi.md#get_dashboard) | **GET** /observability/dashboards/{dashboard_id} | Retrieve a dashboard by ID +[**list_dashboards**](ObservabilityCustomDashboardsApi.md#list_dashboards) | **GET** /observability/dashboards | List all custom dashboards +[**update_dashboard**](ObservabilityCustomDashboardsApi.md#update_dashboard) | **PATCH** /observability/dashboards/{dashboard_id} | Update an existing dashboard + + +# **create_dashboard** +> Dashboard create_dashboard() + +Create a new dashboard + +Create a new dashboard + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import observability_custom_dashboards_api +from fastly.model.dashboard import Dashboard +from fastly.model.create_dashboard_request import CreateDashboardRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = observability_custom_dashboards_api.ObservabilityCustomDashboardsApi(api_client) + create_dashboard_request = CreateDashboardRequest( + name="name_example", + description="description_example", + items=DashboardPropertyItems([ + DashboardItem( + title=DashboardItemPropertyTitle("title_example"), + subtitle=DashboardItemPropertySubtitle("subtitle_example"), + data_source=DashboardItemPropertyDataSource( + type="stats.edge", + config=DashboardItemPropertyDataSourcePropertyConfig( + metrics=[ + "metrics_example", + ], + ), + ), + visualization=DashboardItemPropertyVisualization( + type="chart", + config=DashboardItemPropertyVisualizationPropertyConfig( + plot_type="line", + format="number", + calculation_method="avg", + ), + ), + span=DashboardItemPropertySpan(4), + ), + ]), + ) # CreateDashboardRequest | (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create a new dashboard + api_response = api_instance.create_dashboard(create_dashboard_request=create_dashboard_request) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling ObservabilityCustomDashboardsApi->create_dashboard: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_dashboard_request** | [**CreateDashboardRequest**](CreateDashboardRequest.md)| | [optional] + +### Return type + +[**Dashboard**](Dashboard.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Requested dashboard | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_dashboard** +> delete_dashboard(dashboard_id) + +Delete an existing dashboard + +Delete an existing dashboard + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import observability_custom_dashboards_api +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = observability_custom_dashboards_api.ObservabilityCustomDashboardsApi(api_client) + dashboard_id = "2eGFXF4F4kTxd4gU39Bg3e" # str | + + # example passing only required values which don't have defaults set + try: + # Delete an existing dashboard + api_instance.delete_dashboard(dashboard_id) + except fastly.ApiException as e: + print("Exception when calling ObservabilityCustomDashboardsApi->delete_dashboard: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboard_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_dashboard** +> Dashboard get_dashboard(dashboard_id) + +Retrieve a dashboard by ID + +Retrieve a dashboard by ID + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import observability_custom_dashboards_api +from fastly.model.dashboard import Dashboard +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = observability_custom_dashboards_api.ObservabilityCustomDashboardsApi(api_client) + dashboard_id = "2eGFXF4F4kTxd4gU39Bg3e" # str | + + # example passing only required values which don't have defaults set + try: + # Retrieve a dashboard by ID + api_response = api_instance.get_dashboard(dashboard_id) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling ObservabilityCustomDashboardsApi->get_dashboard: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboard_id** | **str**| | + +### Return type + +[**Dashboard**](Dashboard.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Requested dashboard | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_dashboards** +> ListDashboardsResponse list_dashboards() + +List all custom dashboards + +List all custom dashboards + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import observability_custom_dashboards_api +from fastly.model.list_dashboards_response import ListDashboardsResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = observability_custom_dashboards_api.ObservabilityCustomDashboardsApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # List all custom dashboards + api_response = api_instance.list_dashboards() + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling ObservabilityCustomDashboardsApi->list_dashboards: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListDashboardsResponse**](ListDashboardsResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List all custom dashboards | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_dashboard** +> Dashboard update_dashboard(dashboard_id) + +Update an existing dashboard + +Update an existing dashboard + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import observability_custom_dashboards_api +from fastly.model.dashboard import Dashboard +from fastly.model.update_dashboard_request import UpdateDashboardRequest +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = observability_custom_dashboards_api.ObservabilityCustomDashboardsApi(api_client) + dashboard_id = "2eGFXF4F4kTxd4gU39Bg3e" # str | + update_dashboard_request = UpdateDashboardRequest( + name="name_example", + description="description_example", + items=DashboardPropertyItems([ + DashboardItem( + title=DashboardItemPropertyTitle("title_example"), + subtitle=DashboardItemPropertySubtitle("subtitle_example"), + data_source=DashboardItemPropertyDataSource( + type="stats.edge", + config=DashboardItemPropertyDataSourcePropertyConfig( + metrics=[ + "metrics_example", + ], + ), + ), + visualization=DashboardItemPropertyVisualization( + type="chart", + config=DashboardItemPropertyVisualizationPropertyConfig( + plot_type="line", + format="number", + calculation_method="avg", + ), + ), + span=DashboardItemPropertySpan(4), + ), + ]), + ) # UpdateDashboardRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Update an existing dashboard + api_response = api_instance.update_dashboard(dashboard_id) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling ObservabilityCustomDashboardsApi->update_dashboard: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Update an existing dashboard + api_response = api_instance.update_dashboard(dashboard_id, update_dashboard_request=update_dashboard_request) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling ObservabilityCustomDashboardsApi->update_dashboard: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboard_id** | **str**| | + **update_dashboard_request** | [**UpdateDashboardRequest**](UpdateDashboardRequest.md)| | [optional] + +### Return type + +[**Dashboard**](Dashboard.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Update was successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RealtimeEntryAggregated.md b/docs/RealtimeEntryAggregated.md index fa528f7..157dc76 100644 --- a/docs/RealtimeEntryAggregated.md +++ b/docs/RealtimeEntryAggregated.md @@ -253,6 +253,7 @@ Name | Type | Description | Notes **all_status_3xx** | **int** | Number of \"Redirection\" codes delivered for all sources. | [optional] **all_status_4xx** | **int** | Number of \"Client Error\" codes delivered for all sources. | [optional] **all_status_5xx** | **int** | 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] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RealtimeMeasurements.md b/docs/RealtimeMeasurements.md index 832e67a..5bbfcda 100644 --- a/docs/RealtimeMeasurements.md +++ b/docs/RealtimeMeasurements.md @@ -253,6 +253,7 @@ Name | Type | Description | Notes **all_status_3xx** | **int** | Number of \"Redirection\" codes delivered for all sources. | [optional] **all_status_4xx** | **int** | Number of \"Client Error\" codes delivered for all sources. | [optional] **all_status_5xx** | **int** | 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] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RelationshipDefaultEcdsaTlsCertificate.md b/docs/RelationshipDefaultEcdsaTlsCertificate.md new file mode 100644 index 0000000..fbb83d8 --- /dev/null +++ b/docs/RelationshipDefaultEcdsaTlsCertificate.md @@ -0,0 +1,12 @@ +# RelationshipDefaultEcdsaTlsCertificate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_ecdsa_certificate** | [**RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate**](RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate.md b/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate.md new file mode 100644 index 0000000..414026b --- /dev/null +++ b/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate.md @@ -0,0 +1,12 @@ +# RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData**](RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData.md b/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData.md new file mode 100644 index 0000000..e251d08 --- /dev/null +++ b/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData.md @@ -0,0 +1,13 @@ +# RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**TypeTlsCertificate**](TypeTlsCertificate.md) | | [optional] +**id** | **str** | Alphanumeric string identifying the default ECDSA TLS certificate. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipDefaultTlsCertificate.md b/docs/RelationshipDefaultTlsCertificate.md new file mode 100644 index 0000000..16fc599 --- /dev/null +++ b/docs/RelationshipDefaultTlsCertificate.md @@ -0,0 +1,12 @@ +# RelationshipDefaultTlsCertificate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_certificate** | [**RelationshipDefaultTlsCertificateDefaultCertificate**](RelationshipDefaultTlsCertificateDefaultCertificate.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipDefaultTlsCertificateDefaultCertificate.md b/docs/RelationshipDefaultTlsCertificateDefaultCertificate.md new file mode 100644 index 0000000..222c2da --- /dev/null +++ b/docs/RelationshipDefaultTlsCertificateDefaultCertificate.md @@ -0,0 +1,12 @@ +# RelationshipDefaultTlsCertificateDefaultCertificate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**RelationshipDefaultTlsCertificateDefaultCertificateData**](RelationshipDefaultTlsCertificateDefaultCertificateData.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipDefaultTlsCertificateDefaultCertificateData.md b/docs/RelationshipDefaultTlsCertificateDefaultCertificateData.md new file mode 100644 index 0000000..62515f9 --- /dev/null +++ b/docs/RelationshipDefaultTlsCertificateDefaultCertificateData.md @@ -0,0 +1,13 @@ +# RelationshipDefaultTlsCertificateDefaultCertificateData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**TypeTlsCertificate**](TypeTlsCertificate.md) | | [optional] +**id** | **str** | Alphanumeric string identifying the default TLS certificate. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipTlsDnsRecordsRequest.md b/docs/RelationshipTlsDnsRecordsRequest.md new file mode 100644 index 0000000..e8008d2 --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsRequest.md @@ -0,0 +1,12 @@ +# RelationshipTlsDnsRecordsRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dns_records** | [**RelationshipTlsDnsRecordsRequestDnsRecords**](RelationshipTlsDnsRecordsRequestDnsRecords.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipTlsDnsRecordsRequestDnsRecords.md b/docs/RelationshipTlsDnsRecordsRequestDnsRecords.md new file mode 100644 index 0000000..887fd46 --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsRequestDnsRecords.md @@ -0,0 +1,12 @@ +# RelationshipTlsDnsRecordsRequestDnsRecords + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[RelationshipTlsDnsRecordsRequestDnsRecordsData]**](RelationshipTlsDnsRecordsRequestDnsRecordsData.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipTlsDnsRecordsRequestDnsRecordsData.md b/docs/RelationshipTlsDnsRecordsRequestDnsRecordsData.md new file mode 100644 index 0000000..8bfe88c --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsRequestDnsRecordsData.md @@ -0,0 +1,13 @@ +# RelationshipTlsDnsRecordsRequestDnsRecordsData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**TypeTlsDnsRecord**](TypeTlsDnsRecord.md) | | [optional] +**id** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipTlsDnsRecordsResponse.md b/docs/RelationshipTlsDnsRecordsResponse.md new file mode 100644 index 0000000..8edafbd --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsResponse.md @@ -0,0 +1,12 @@ +# RelationshipTlsDnsRecordsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dns_records** | [**RelationshipTlsDnsRecordsResponseDnsRecords**](RelationshipTlsDnsRecordsResponseDnsRecords.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipTlsDnsRecordsResponseDnsRecords.md b/docs/RelationshipTlsDnsRecordsResponseDnsRecords.md new file mode 100644 index 0000000..779c618 --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsResponseDnsRecords.md @@ -0,0 +1,12 @@ +# RelationshipTlsDnsRecordsResponseDnsRecords + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[RelationshipTlsDnsRecordsResponseDnsRecordsData]**](RelationshipTlsDnsRecordsResponseDnsRecordsData.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RelationshipMemberTlsDnsRecord.md b/docs/RelationshipTlsDnsRecordsResponseDnsRecordsData.md similarity index 91% rename from docs/RelationshipMemberTlsDnsRecord.md rename to docs/RelationshipTlsDnsRecordsResponseDnsRecordsData.md index 4e5a59e..b79cc8c 100644 --- a/docs/RelationshipMemberTlsDnsRecord.md +++ b/docs/RelationshipTlsDnsRecordsResponseDnsRecordsData.md @@ -1,4 +1,4 @@ -# RelationshipMemberTlsDnsRecord +# RelationshipTlsDnsRecordsResponseDnsRecordsData ## Properties diff --git a/docs/Results.md b/docs/Results.md index 093aa0d..1a86636 100644 --- a/docs/Results.md +++ b/docs/Results.md @@ -253,6 +253,7 @@ Name | Type | Description | Notes **all_status_3xx** | **int** | Number of \"Redirection\" codes delivered for all sources. | [optional] **all_status_4xx** | **int** | Number of \"Client Error\" codes delivered for all sources. | [optional] **all_status_5xx** | **int** | 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] **service_id** | **str** | | [optional] [readonly] **start_time** | **int** | Timestamp for the start of the time period being reported | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/Serviceusagemetric.md b/docs/Serviceusagemetric.md new file mode 100644 index 0000000..f479a9d --- /dev/null +++ b/docs/Serviceusagemetric.md @@ -0,0 +1,15 @@ +# Serviceusagemetric + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | | [optional] [readonly] +**service_id** | **str** | Service ID associated with the usage. | [optional] +**service_name** | **str** | Name of the service associated with the usage. | [optional] +**usage_units** | **float** | The quantity of the usage for the billing period. Amount will be in the units provided in the parent object (e.g., a quantity of `1.3` with a unit of `gb` would have a usage amount of 1.3 gigabytes). | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Serviceusagemetrics.md b/docs/Serviceusagemetrics.md new file mode 100644 index 0000000..88d31df --- /dev/null +++ b/docs/Serviceusagemetrics.md @@ -0,0 +1,12 @@ +# Serviceusagemetrics + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ServiceusagemetricsData**](ServiceusagemetricsData.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServiceusagemetricsData.md b/docs/ServiceusagemetricsData.md new file mode 100644 index 0000000..07609f5 --- /dev/null +++ b/docs/ServiceusagemetricsData.md @@ -0,0 +1,18 @@ +# ServiceusagemetricsData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | | [optional] [readonly] +**start_time** | **datetime** | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] +**end_time** | **datetime** | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] +**usage_type** | **str** | The usage type identifier for the usage. This is a single, billable metric for the product. | [optional] +**unit** | **str** | The unit for the usage as shown on an invoice. If there is no explicit unit, this field will be \"unit\" (e.g., a request with `product_id` of 'cdn_usage' and `usage_type` of 'North America Requests' has no unit, and will return \"unit\"). | [optional] +**details** | [**[Serviceusagemetric]**](Serviceusagemetric.md) | | [optional] +**meta** | [**Metadata**](Metadata.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Serviceusagetype.md b/docs/Serviceusagetype.md new file mode 100644 index 0000000..b934c48 --- /dev/null +++ b/docs/Serviceusagetype.md @@ -0,0 +1,13 @@ +# Serviceusagetype + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_id** | **str** | The product identifier associated with the usage type. This corresponds to a Fastly product offering. | [optional] +**name** | **str** | Full name of the product usage type as it might appear on a customer's invoice. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Serviceusagetypes.md b/docs/Serviceusagetypes.md new file mode 100644 index 0000000..01129fa --- /dev/null +++ b/docs/Serviceusagetypes.md @@ -0,0 +1,12 @@ +# Serviceusagetypes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Serviceusagetype]**](Serviceusagetype.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TlsCertificateBlobResponse.md b/docs/TlsCertificateBlobResponse.md new file mode 100644 index 0000000..702540d --- /dev/null +++ b/docs/TlsCertificateBlobResponse.md @@ -0,0 +1,12 @@ +# TlsCertificateBlobResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cert_blob** | **str** | A certificate blob | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TlsCertificatesApi.md b/docs/TlsCertificatesApi.md index 14ad2ab..0351306 100644 --- a/docs/TlsCertificatesApi.md +++ b/docs/TlsCertificatesApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_tls_cert**](TlsCertificatesApi.md#create_tls_cert) | **POST** /tls/certificates | Create a TLS certificate [**delete_tls_cert**](TlsCertificatesApi.md#delete_tls_cert) | **DELETE** /tls/certificates/{tls_certificate_id} | Delete a TLS certificate [**get_tls_cert**](TlsCertificatesApi.md#get_tls_cert) | **GET** /tls/certificates/{tls_certificate_id} | Get a TLS certificate +[**get_tls_cert_blob**](TlsCertificatesApi.md#get_tls_cert_blob) | **GET** /tls/certificates/{tls_certificate_id}/blob | Get a TLS certificate blob (Limited Availability) [**list_tls_certs**](TlsCertificatesApi.md#list_tls_certs) | **GET** /tls/certificates | List TLS certificates [**update_tls_cert**](TlsCertificatesApi.md#update_tls_cert) | **PATCH** /tls/certificates/{tls_certificate_id} | Update a TLS certificate @@ -254,6 +255,84 @@ Name | Type | Description | Notes - **Accept**: application/vnd.api+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_tls_cert_blob** +> TlsCertificateBlobResponse get_tls_cert_blob(tls_certificate_id) + +Get a TLS certificate blob (Limited Availability) + +Retrieve a TLS certificate blob. This feature is part of a [limited availability](https://docs.fastly.com/products/fastly-product-lifecycle#limited-availability) release. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import tls_certificates_api +from fastly.model.tls_certificate_blob_response import TlsCertificateBlobResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tls_certificates_api.TlsCertificatesApi(api_client) + tls_certificate_id = "cRTguUGZzb2W9Euo4moOr" # str | Alphanumeric string identifying a TLS certificate. + + # example passing only required values which don't have defaults set + try: + # Get a TLS certificate blob (Limited Availability) + api_response = api_instance.get_tls_cert_blob(tls_certificate_id) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling TlsCertificatesApi->get_tls_cert_blob: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tls_certificate_id** | **str**| Alphanumeric string identifying a TLS certificate. | + +### Return type + +[**TlsCertificateBlobResponse**](TlsCertificateBlobResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/TlsDnsRecord.md b/docs/TlsDnsRecord.md index 8dd20f1..6828ece 100644 --- a/docs/TlsDnsRecord.md +++ b/docs/TlsDnsRecord.md @@ -4,8 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The IP address or hostname of the DNS record. | [optional] -**region** | **str** | Specifies the regions that will be used to route traffic. Select DNS Records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `us-eu` region to exclusively land traffic on North American and European POPs. | [optional] +**region** | **str** | Specifies the regions that will be used to route traffic. Select DNS records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `na/eu` region to exclusively land traffic on North American and European POPs. | [optional] **record_type** | **str** | The type of the DNS record. `A` specifies an IPv4 address to be used for an A record to be used for apex domains (e.g., `example.com`). `AAAA` specifies an IPv6 address for use in an A record for apex domains. `CNAME` specifies the hostname to be used for a CNAME record for subdomains or wildcard domains (e.g., `www.example.com` or `*.example.com`). | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/UpdateDashboardRequest.md b/docs/UpdateDashboardRequest.md new file mode 100644 index 0000000..9b60d54 --- /dev/null +++ b/docs/UpdateDashboardRequest.md @@ -0,0 +1,14 @@ +# UpdateDashboardRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A human-readable name | [optional] +**description** | **str** | A short description of the dashboard | [optional] +**items** | [**DashboardPropertyItems**](DashboardPropertyItems.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Values.md b/docs/Values.md index 1286a46..af19d58 100644 --- a/docs/Values.md +++ b/docs/Values.md @@ -43,7 +43,7 @@ Name | Type | Description | Notes **origin_fetch_resp_body_bytes** | **int** | Total body bytes received from origin. | [optional] **bandwidth** | **int** | Total bytes delivered (`resp_header_bytes` + `resp_body_bytes` + `bereq_header_bytes` + `bereq_body_bytes`). | [optional] **edge_hit_ratio** | **float** | Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)). | [optional] -**origin_offload** | **float** | Ratio of response bytes delivered from the edge compared to what is delivered from origin, 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] +**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`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric). | [optional] **origin_status_200** | **int** | Number of responses received from origin with status code 200 (Success). | [optional] **origin_status_204** | **int** | Number of responses received from origin with status code 204 (No Content). | [optional] **origin_status_206** | **int** | Number of responses received from origin with status code 206 (Partial Content). | [optional] diff --git a/fastly/__init__.py b/fastly/__init__.py index 11b798f..22f5a10 100644 --- a/fastly/__init__.py +++ b/fastly/__init__.py @@ -10,7 +10,7 @@ """ -__version__ = "5.5.0" +__version__ = "5.6.0" # import ApiClient from fastly.api_client import ApiClient diff --git a/fastly/api/billing_invoices_api.py b/fastly/api/billing_invoices_api.py index f857ddc..2c3c643 100644 --- a/fastly/api/billing_invoices_api.py +++ b/fastly/api/billing_invoices_api.py @@ -21,9 +21,11 @@ none_type, validate_and_convert_types ) +from fastly.model.async_response import AsyncResponse +from fastly.model.eom_invoice_response import EomInvoiceResponse from fastly.model.error import Error -from fastly.model.invoice_response import InvoiceResponse -from fastly.model.list_invoices_response import ListInvoicesResponse +from fastly.model.list_eom_invoices_response import ListEomInvoicesResponse +from fastly.model.mtd_invoice_response import MtdInvoiceResponse class BillingInvoicesApi(object): @@ -37,7 +39,7 @@ def __init__(self, api_client=None): self.api_client = api_client self.get_invoice_by_invoice_id_endpoint = _Endpoint( settings={ - 'response_type': (InvoiceResponse,), + 'response_type': (EomInvoiceResponse,), 'auth': [ 'token' ], @@ -93,9 +95,60 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.get_month_to_date_invoice_endpoint = _Endpoint( + settings={ + 'response_type': (MtdInvoiceResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/billing/v3/invoices/month-to-date', + 'operation_id': 'get_month_to_date_invoice', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.list_invoices_endpoint = _Endpoint( settings={ - 'response_type': (ListInvoicesResponse,), + 'response_type': (ListEomInvoicesResponse,), 'auth': [ 'token' ], @@ -211,7 +264,7 @@ def get_invoice_by_invoice_id( async_req (bool): execute request asynchronously Returns: - InvoiceResponse + EomInvoiceResponse If the method is called asynchronously, returns the request thread. """ @@ -243,6 +296,79 @@ def get_invoice_by_invoice_id( invoice_id return self.get_invoice_by_invoice_id_endpoint.call_with_http_info(**kwargs) + def get_month_to_date_invoice( + self, + **kwargs + ): + """Get month-to-date invoice. # noqa: E501 + + Returns month-to-date invoice for the current month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_month_to_date_invoice(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + MtdInvoiceResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + return self.get_month_to_date_invoice_endpoint.call_with_http_info(**kwargs) + def list_invoices( self, **kwargs @@ -290,7 +416,7 @@ def list_invoices( async_req (bool): execute request asynchronously Returns: - ListInvoicesResponse + ListEomInvoicesResponse If the method is called asynchronously, returns the request thread. """ diff --git a/fastly/api/billing_usage_metrics_api.py b/fastly/api/billing_usage_metrics_api.py new file mode 100644 index 0000000..5db9e3b --- /dev/null +++ b/fastly/api/billing_usage_metrics_api.py @@ -0,0 +1,411 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.api_client import ApiClient, Endpoint as _Endpoint +from fastly.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from fastly.model.error import Error +from fastly.model.serviceusagemetrics import Serviceusagemetrics +from fastly.model.serviceusagetypes import Serviceusagetypes + + +class BillingUsageMetricsApi(object): + """NOTE: This class is auto generated. + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_service_level_usage_endpoint = _Endpoint( + settings={ + 'response_type': (Serviceusagemetrics,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/billing/v2/account_customers/{customer_id}/service-usage-metrics', + 'operation_id': 'get_service_level_usage', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'customer_id', + 'product_id', + 'usage_type_name', + 'time_granularity', + 'start_date', + 'end_date', + 'start_month', + 'end_month', + 'limit', + 'cursor', + ], + 'required': [ + 'customer_id', + 'product_id', + 'usage_type_name', + 'time_granularity', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'time_granularity', + 'start_date', + 'end_date', + 'start_month', + 'end_month', + ] + }, + root_map={ + 'validations': { + ('time_granularity',): { + + 'regex': { + 'pattern': r'^day$|^month$', # noqa: E501 + }, + }, + ('start_date',): { + + 'regex': { + 'pattern': r'^[0-9]{4}-[0-9]{2}-[0-9]{2}$', # noqa: E501 + }, + }, + ('end_date',): { + + 'regex': { + 'pattern': r'^[0-9]{4}-[0-9]{2}-[0-9]{2}$', # noqa: E501 + }, + }, + ('start_month',): { + + 'regex': { + 'pattern': r'^[0-9]{4}-[0-9]{2}$', # noqa: E501 + }, + }, + ('end_month',): { + + 'regex': { + 'pattern': r'^[0-9]{4}-[0-9]{2}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'customer_id': + (str,), + 'product_id': + (str,), + 'usage_type_name': + (str,), + 'time_granularity': + (str,), + 'start_date': + (str,), + 'end_date': + (str,), + 'start_month': + (str,), + 'end_month': + (str,), + 'limit': + (str,), + 'cursor': + (str,), + }, + 'attribute_map': { + 'customer_id': 'customer_id', + 'product_id': 'product_id', + 'usage_type_name': 'usage_type_name', + 'time_granularity': 'time_granularity', + 'start_date': 'start_date', + 'end_date': 'end_date', + 'start_month': 'start_month', + 'end_month': 'end_month', + 'limit': 'limit', + 'cursor': 'cursor', + }, + 'location_map': { + 'customer_id': 'path', + 'product_id': 'query', + 'usage_type_name': 'query', + 'time_granularity': 'query', + 'start_date': 'query', + 'end_date': 'query', + 'start_month': 'query', + 'end_month': 'query', + 'limit': 'query', + 'cursor': 'query', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_service_level_usage_types_endpoint = _Endpoint( + settings={ + 'response_type': (Serviceusagetypes,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/billing/v2/account_customers/{customer_id}/service-usage-types', + 'operation_id': 'get_service_level_usage_types', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'customer_id', + ], + 'required': [ + 'customer_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'customer_id': + (str,), + }, + 'attribute_map': { + 'customer_id': 'customer_id', + }, + 'location_map': { + 'customer_id': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_service_level_usage( + self, + customer_id, + product_id, + usage_type_name, + time_granularity, + **kwargs + ): + """Retrieve service-level usage metrics for a product. # noqa: E501 + + Returns product usage, broken down by service. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_service_level_usage(customer_id, product_id, usage_type_name, time_granularity, async_req=True) + >>> result = thread.get() + + Args: + customer_id (str): Alphanumeric string identifying the customer. + product_id (str): The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. + usage_type_name (str): The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. + time_granularity (str): + + Keyword Args: + start_date (str): [optional] + end_date (str): [optional] + start_month (str): [optional] + end_month (str): [optional] + limit (str): Number of results per page. The maximum is 100.. [optional] if omitted the server will use the default value of "5" + cursor (str): Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Serviceusagemetrics + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['customer_id'] = \ + customer_id + kwargs['product_id'] = \ + product_id + kwargs['usage_type_name'] = \ + usage_type_name + kwargs['time_granularity'] = \ + time_granularity + return self.get_service_level_usage_endpoint.call_with_http_info(**kwargs) + + def get_service_level_usage_types( + self, + customer_id, + **kwargs + ): + """Retrieve product usage types for a customer. # noqa: E501 + + Returns product usage types reported by the customer's services. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_service_level_usage_types(customer_id, async_req=True) + >>> result = thread.get() + + Args: + customer_id (str): Alphanumeric string identifying the customer. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Serviceusagetypes + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['customer_id'] = \ + customer_id + return self.get_service_level_usage_types_endpoint.call_with_http_info(**kwargs) + diff --git a/fastly/api/observability_custom_dashboards_api.py b/fastly/api/observability_custom_dashboards_api.py new file mode 100644 index 0000000..6763c13 --- /dev/null +++ b/fastly/api/observability_custom_dashboards_api.py @@ -0,0 +1,707 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.api_client import ApiClient, Endpoint as _Endpoint +from fastly.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from fastly.model.create_dashboard_request import CreateDashboardRequest +from fastly.model.dashboard import Dashboard +from fastly.model.list_dashboards_response import ListDashboardsResponse +from fastly.model.update_dashboard_request import UpdateDashboardRequest + + +class ObservabilityCustomDashboardsApi(object): + """NOTE: This class is auto generated. + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_dashboard_endpoint = _Endpoint( + settings={ + 'response_type': (Dashboard,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/observability/dashboards', + 'operation_id': 'create_dashboard', + 'http_method': 'POST', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'create_dashboard_request', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'create_dashboard_request': + (CreateDashboardRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'create_dashboard_request': 'body', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_dashboard_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'token' + ], + 'endpoint_path': '/observability/dashboards/{dashboard_id}', + 'operation_id': 'delete_dashboard', + 'http_method': 'DELETE', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'dashboard_id', + ], + 'required': [ + 'dashboard_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'dashboard_id': + (str,), + }, + 'attribute_map': { + 'dashboard_id': 'dashboard_id', + }, + 'location_map': { + 'dashboard_id': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_dashboard_endpoint = _Endpoint( + settings={ + 'response_type': (Dashboard,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/observability/dashboards/{dashboard_id}', + 'operation_id': 'get_dashboard', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'dashboard_id', + ], + 'required': [ + 'dashboard_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'dashboard_id': + (str,), + }, + 'attribute_map': { + 'dashboard_id': 'dashboard_id', + }, + 'location_map': { + 'dashboard_id': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_dashboards_endpoint = _Endpoint( + settings={ + 'response_type': (ListDashboardsResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/observability/dashboards', + 'operation_id': 'list_dashboards', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_dashboard_endpoint = _Endpoint( + settings={ + 'response_type': (Dashboard,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/observability/dashboards/{dashboard_id}', + 'operation_id': 'update_dashboard', + 'http_method': 'PATCH', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'dashboard_id', + 'update_dashboard_request', + ], + 'required': [ + 'dashboard_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'dashboard_id': + (str,), + 'update_dashboard_request': + (UpdateDashboardRequest,), + }, + 'attribute_map': { + 'dashboard_id': 'dashboard_id', + }, + 'location_map': { + 'dashboard_id': 'path', + 'update_dashboard_request': 'body', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def create_dashboard( + self, + **kwargs + ): + """Create a new dashboard # noqa: E501 + + Create a new dashboard # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_dashboard(async_req=True) + >>> result = thread.get() + + + Keyword Args: + create_dashboard_request (CreateDashboardRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Dashboard + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + return self.create_dashboard_endpoint.call_with_http_info(**kwargs) + + def delete_dashboard( + self, + dashboard_id, + **kwargs + ): + """Delete an existing dashboard # noqa: E501 + + Delete an existing dashboard # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_dashboard(dashboard_id, async_req=True) + >>> result = thread.get() + + Args: + dashboard_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['dashboard_id'] = \ + dashboard_id + return self.delete_dashboard_endpoint.call_with_http_info(**kwargs) + + def get_dashboard( + self, + dashboard_id, + **kwargs + ): + """Retrieve a dashboard by ID # noqa: E501 + + Retrieve a dashboard by ID # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_dashboard(dashboard_id, async_req=True) + >>> result = thread.get() + + Args: + dashboard_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Dashboard + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['dashboard_id'] = \ + dashboard_id + return self.get_dashboard_endpoint.call_with_http_info(**kwargs) + + def list_dashboards( + self, + **kwargs + ): + """List all custom dashboards # noqa: E501 + + List all custom dashboards # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_dashboards(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ListDashboardsResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + return self.list_dashboards_endpoint.call_with_http_info(**kwargs) + + def update_dashboard( + self, + dashboard_id, + **kwargs + ): + """Update an existing dashboard # noqa: E501 + + Update an existing dashboard # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_dashboard(dashboard_id, async_req=True) + >>> result = thread.get() + + Args: + dashboard_id (str): + + Keyword Args: + update_dashboard_request (UpdateDashboardRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Dashboard + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['dashboard_id'] = \ + dashboard_id + return self.update_dashboard_endpoint.call_with_http_info(**kwargs) + diff --git a/fastly/api/tls_certificates_api.py b/fastly/api/tls_certificates_api.py index cb4f9f6..452688e 100644 --- a/fastly/api/tls_certificates_api.py +++ b/fastly/api/tls_certificates_api.py @@ -22,6 +22,7 @@ validate_and_convert_types ) from fastly.model.tls_certificate import TlsCertificate +from fastly.model.tls_certificate_blob_response import TlsCertificateBlobResponse from fastly.model.tls_certificate_response import TlsCertificateResponse from fastly.model.tls_certificates_response import TlsCertificatesResponse @@ -206,6 +207,64 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.get_tls_cert_blob_endpoint = _Endpoint( + settings={ + 'response_type': (TlsCertificateBlobResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/tls/certificates/{tls_certificate_id}/blob', + 'operation_id': 'get_tls_cert_blob', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'tls_certificate_id', + ], + 'required': [ + 'tls_certificate_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'tls_certificate_id': + (str,), + }, + 'attribute_map': { + 'tls_certificate_id': 'tls_certificate_id', + }, + 'location_map': { + 'tls_certificate_id': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.list_tls_certs_endpoint = _Endpoint( settings={ 'response_type': (TlsCertificatesResponse,), @@ -599,6 +658,84 @@ def get_tls_cert( tls_certificate_id return self.get_tls_cert_endpoint.call_with_http_info(**kwargs) + def get_tls_cert_blob( + self, + tls_certificate_id, + **kwargs + ): + """Get a TLS certificate blob (Limited Availability) # noqa: E501 + + Retrieve a TLS certificate blob. This feature is part of a [limited availability](https://docs.fastly.com/products/fastly-product-lifecycle#limited-availability) release. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tls_cert_blob(tls_certificate_id, async_req=True) + >>> result = thread.get() + + Args: + tls_certificate_id (str): Alphanumeric string identifying a TLS certificate. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + TlsCertificateBlobResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['tls_certificate_id'] = \ + tls_certificate_id + return self.get_tls_cert_blob_endpoint.call_with_http_info(**kwargs) + def list_tls_certs( self, **kwargs diff --git a/fastly/api_client.py b/fastly/api_client.py index af5361f..5416e76 100644 --- a/fastly/api_client.py +++ b/fastly/api_client.py @@ -79,7 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'fastly-py/5.5.0' + self.user_agent = 'fastly-py/5.6.0' # The last observed value of http header Fastly-RateLimit-Remaining self.rate_limit_remaining = DEFAULT_RATELIMIT diff --git a/fastly/apis/__init__.py b/fastly/apis/__init__.py index 4067298..b3add02 100644 --- a/fastly/apis/__init__.py +++ b/fastly/apis/__init__.py @@ -22,6 +22,7 @@ from fastly.api.billing_api import BillingApi from fastly.api.billing_address_api import BillingAddressApi from fastly.api.billing_invoices_api import BillingInvoicesApi +from fastly.api.billing_usage_metrics_api import BillingUsageMetricsApi from fastly.api.cache_settings_api import CacheSettingsApi from fastly.api.condition_api import ConditionApi from fastly.api.config_store_api import ConfigStoreApi @@ -90,6 +91,7 @@ from fastly.api.logging_sumologic_api import LoggingSumologicApi from fastly.api.logging_syslog_api import LoggingSyslogApi from fastly.api.mutual_authentication_api import MutualAuthenticationApi +from fastly.api.observability_custom_dashboards_api import ObservabilityCustomDashboardsApi from fastly.api.origin_inspector_historical_api import OriginInspectorHistoricalApi from fastly.api.origin_inspector_realtime_api import OriginInspectorRealtimeApi from fastly.api.package_api import PackageApi diff --git a/fastly/configuration.py b/fastly/configuration.py index 8473f30..2914148 100644 --- a/fastly/configuration.py +++ b/fastly/configuration.py @@ -446,7 +446,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 5.5.0".\ + "SDK Package Version: 5.6.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/fastly/model/async_response.py b/fastly/model/async_response.py new file mode 100644 index 0000000..078bc88 --- /dev/null +++ b/fastly/model/async_response.py @@ -0,0 +1,257 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class AsyncResponse(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AsyncResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AsyncResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/create_dashboard_request.py b/fastly/model/create_dashboard_request.py new file mode 100644 index 0000000..c56d8dd --- /dev/null +++ b/fastly/model/create_dashboard_request.py @@ -0,0 +1,273 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.dashboard_property_items import DashboardPropertyItems + globals()['DashboardPropertyItems'] = DashboardPropertyItems + + +class CreateDashboardRequest(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'items': (DashboardPropertyItems,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """CreateDashboardRequest - a model defined in OpenAPI + + Args: + name (str): A human-readable name + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str): A short description of the dashboard. [optional] # noqa: E501 + items (DashboardPropertyItems): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, *args, **kwargs): # noqa: E501 + """CreateDashboardRequest - a model defined in OpenAPI + + Args: + name (str): A human-readable name + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str): A short description of the dashboard. [optional] # noqa: E501 + items (DashboardPropertyItems): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/dashboard.py b/fastly/model/dashboard.py new file mode 100644 index 0000000..42096a1 --- /dev/null +++ b/fastly/model/dashboard.py @@ -0,0 +1,294 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.dashboard_property_created_by import DashboardPropertyCreatedBy + from fastly.model.dashboard_property_items import DashboardPropertyItems + from fastly.model.dashboard_property_updated_by import DashboardPropertyUpdatedBy + globals()['DashboardPropertyCreatedBy'] = DashboardPropertyCreatedBy + globals()['DashboardPropertyItems'] = DashboardPropertyItems + globals()['DashboardPropertyUpdatedBy'] = DashboardPropertyUpdatedBy + + +class Dashboard(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'items': (DashboardPropertyItems,), # noqa: E501 + 'created_at': (datetime, none_type,), # noqa: E501 + 'updated_at': (datetime, none_type,), # noqa: E501 + 'created_by': (DashboardPropertyCreatedBy,), # noqa: E501 + 'updated_by': (DashboardPropertyUpdatedBy,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'items': 'items', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'created_by': 'created_by', # noqa: E501 + 'updated_by': 'updated_by', # noqa: E501 + } + + read_only_vars = { + 'id', # noqa: E501 + 'created_at', # noqa: E501 + 'updated_at', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Dashboard - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Dashboard identifier (UUID). [optional] # noqa: E501 + name (str): A human-readable name. [optional] # noqa: E501 + description (str): A short description of the dashboard. [optional] # noqa: E501 + items (DashboardPropertyItems): [optional] # noqa: E501 + created_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + updated_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + created_by (DashboardPropertyCreatedBy): [optional] # noqa: E501 + updated_by (DashboardPropertyUpdatedBy): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Dashboard - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Dashboard identifier (UUID). [optional] # noqa: E501 + name (str): A human-readable name. [optional] # noqa: E501 + description (str): A short description of the dashboard. [optional] # noqa: E501 + items (DashboardPropertyItems): [optional] # noqa: E501 + created_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + updated_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + created_by (DashboardPropertyCreatedBy): [optional] # noqa: E501 + updated_by (DashboardPropertyUpdatedBy): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/dashboard_item.py b/fastly/model/dashboard_item.py new file mode 100644 index 0000000..4dd2d7c --- /dev/null +++ b/fastly/model/dashboard_item.py @@ -0,0 +1,300 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.dashboard_item_property_data_source import DashboardItemPropertyDataSource + from fastly.model.dashboard_item_property_span import DashboardItemPropertySpan + from fastly.model.dashboard_item_property_subtitle import DashboardItemPropertySubtitle + from fastly.model.dashboard_item_property_title import DashboardItemPropertyTitle + from fastly.model.dashboard_item_property_visualization import DashboardItemPropertyVisualization + globals()['DashboardItemPropertyDataSource'] = DashboardItemPropertyDataSource + globals()['DashboardItemPropertySpan'] = DashboardItemPropertySpan + globals()['DashboardItemPropertySubtitle'] = DashboardItemPropertySubtitle + globals()['DashboardItemPropertyTitle'] = DashboardItemPropertyTitle + globals()['DashboardItemPropertyVisualization'] = DashboardItemPropertyVisualization + + +class DashboardItem(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (DashboardItemPropertyTitle,), # noqa: E501 + 'subtitle': (DashboardItemPropertySubtitle,), # noqa: E501 + 'data_source': (DashboardItemPropertyDataSource,), # noqa: E501 + 'visualization': (DashboardItemPropertyVisualization,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'span': (DashboardItemPropertySpan,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'subtitle': 'subtitle', # noqa: E501 + 'data_source': 'data_source', # noqa: E501 + 'visualization': 'visualization', # noqa: E501 + 'id': 'id', # noqa: E501 + 'span': 'span', # noqa: E501 + } + + read_only_vars = { + 'id', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, title, subtitle, data_source, visualization, *args, **kwargs): # noqa: E501 + """DashboardItem - a model defined in OpenAPI + + Args: + title (DashboardItemPropertyTitle): + subtitle (DashboardItemPropertySubtitle): + data_source (DashboardItemPropertyDataSource): + visualization (DashboardItemPropertyVisualization): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Dashboard item identifier (UUID). [optional] # noqa: E501 + span (DashboardItemPropertySpan): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.subtitle = subtitle + self.data_source = data_source + self.visualization = visualization + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, title, subtitle, data_source, visualization, *args, **kwargs): # noqa: E501 + """DashboardItem - a model defined in OpenAPI + + Args: + title (DashboardItemPropertyTitle): + subtitle (DashboardItemPropertySubtitle): + data_source (DashboardItemPropertyDataSource): + visualization (DashboardItemPropertyVisualization): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Dashboard item identifier (UUID). [optional] # noqa: E501 + span (DashboardItemPropertySpan): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.subtitle = subtitle + self.data_source = data_source + self.visualization = visualization + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/dashboard_item_property_data_source.py b/fastly/model/dashboard_item_property_data_source.py new file mode 100644 index 0000000..798cfe5 --- /dev/null +++ b/fastly/model/dashboard_item_property_data_source.py @@ -0,0 +1,276 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.dashboard_item_property_data_source_property_config import DashboardItemPropertyDataSourcePropertyConfig + globals()['DashboardItemPropertyDataSourcePropertyConfig'] = DashboardItemPropertyDataSourcePropertyConfig + + +class DashboardItemPropertyDataSource(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'EDGE': "stats.edge", + 'DOMAIN': "stats.domain", + 'ORIGIN': "stats.origin", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'config': (DashboardItemPropertyDataSourcePropertyConfig,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'config': 'config', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, config, *args, **kwargs): # noqa: E501 + """DashboardItemPropertyDataSource - a model defined in OpenAPI + + Args: + type (str): The source of the data to display. + config (DashboardItemPropertyDataSourcePropertyConfig): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.config = config + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, config, *args, **kwargs): # noqa: E501 + """DashboardItemPropertyDataSource - a model defined in OpenAPI + + Args: + type (str): The source of the data to display. + config (DashboardItemPropertyDataSourcePropertyConfig): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.config = config + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/dashboard_item_property_data_source_property_config.py b/fastly/model/dashboard_item_property_data_source_property_config.py new file mode 100644 index 0000000..76b8d65 --- /dev/null +++ b/fastly/model/dashboard_item_property_data_source_property_config.py @@ -0,0 +1,262 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class DashboardItemPropertyDataSourcePropertyConfig(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('metrics',): { + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'metrics': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'metrics': 'metrics', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, metrics, *args, **kwargs): # noqa: E501 + """DashboardItemPropertyDataSourcePropertyConfig - a model defined in OpenAPI + + Args: + metrics ([str]): The metrics to visualize. Valid options are defined by the selected [data source](#field_data_source). + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.metrics = metrics + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, metrics, *args, **kwargs): # noqa: E501 + """DashboardItemPropertyDataSourcePropertyConfig - a model defined in OpenAPI + + Args: + metrics ([str]): The metrics to visualize. Valid options are defined by the selected [data source](#field_data_source). + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.metrics = metrics + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/dashboard_item_property_span.py b/fastly/model/dashboard_item_property_span.py new file mode 100644 index 0000000..ad0edf8 --- /dev/null +++ b/fastly/model/dashboard_item_property_span.py @@ -0,0 +1,272 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class DashboardItemPropertySpan(ModelSimple): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('value',): { + 'inclusive_maximum': 12, + 'inclusive_minimum': 1, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (int,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """DashboardItemPropertySpan - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): The number of columns for the dashboard item to span. Dashboards are rendered on a 12-column grid on \"desktop\" screen sizes.. if omitted defaults to 4 # noqa: E501 + + Keyword Args: + value (int): The number of columns for the dashboard item to span. Dashboards are rendered on a 12-column grid on \"desktop\" screen sizes.. if omitted defaults to 4 # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = 4 + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """DashboardItemPropertySpan - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): The number of columns for the dashboard item to span. Dashboards are rendered on a 12-column grid on \"desktop\" screen sizes.. if omitted defaults to 4 # noqa: E501 + + Keyword Args: + value (int): The number of columns for the dashboard item to span. Dashboards are rendered on a 12-column grid on \"desktop\" screen sizes.. if omitted defaults to 4 # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = 4 + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/fastly/model/dashboard_item_property_subtitle.py b/fastly/model/dashboard_item_property_subtitle.py new file mode 100644 index 0000000..e647558 --- /dev/null +++ b/fastly/model/dashboard_item_property_subtitle.py @@ -0,0 +1,280 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class DashboardItemPropertySubtitle(ModelSimple): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('value',): { + 'max_length': 255, + 'min_length': 1, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """DashboardItemPropertySubtitle - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): A human-readable subtitle for the dashboard item. Often a description of the visualization.. # noqa: E501 + + Keyword Args: + value (str): A human-readable subtitle for the dashboard item. Often a description of the visualization.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """DashboardItemPropertySubtitle - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): A human-readable subtitle for the dashboard item. Often a description of the visualization.. # noqa: E501 + + Keyword Args: + value (str): A human-readable subtitle for the dashboard item. Often a description of the visualization.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/fastly/model/dashboard_item_property_title.py b/fastly/model/dashboard_item_property_title.py new file mode 100644 index 0000000..11ffe7b --- /dev/null +++ b/fastly/model/dashboard_item_property_title.py @@ -0,0 +1,280 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class DashboardItemPropertyTitle(ModelSimple): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('value',): { + 'max_length': 255, + 'min_length': 1, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """DashboardItemPropertyTitle - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): A human-readable title for the dashboard item. # noqa: E501 + + Keyword Args: + value (str): A human-readable title for the dashboard item. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """DashboardItemPropertyTitle - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): A human-readable title for the dashboard item. # noqa: E501 + + Keyword Args: + value (str): A human-readable title for the dashboard item. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/fastly/model/dashboard_item_property_visualization.py b/fastly/model/dashboard_item_property_visualization.py new file mode 100644 index 0000000..75c8df0 --- /dev/null +++ b/fastly/model/dashboard_item_property_visualization.py @@ -0,0 +1,276 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.dashboard_item_property_visualization_property_config import DashboardItemPropertyVisualizationPropertyConfig + globals()['DashboardItemPropertyVisualizationPropertyConfig'] = DashboardItemPropertyVisualizationPropertyConfig + + +class DashboardItemPropertyVisualization(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'CHART': "chart", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'config': (DashboardItemPropertyVisualizationPropertyConfig,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'config': 'config', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, config, *args, **kwargs): # noqa: E501 + """DashboardItemPropertyVisualization - a model defined in OpenAPI + + Args: + config (DashboardItemPropertyVisualizationPropertyConfig): + + Keyword Args: + type (str): The type of visualization to display. . defaults to "chart", must be one of ["chart", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "chart") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.config = config + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, config, *args, **kwargs): # noqa: E501 + """DashboardItemPropertyVisualization - a model defined in OpenAPI + + Args: + config (DashboardItemPropertyVisualizationPropertyConfig): + + Keyword Args: + type (str): The type of visualization to display. . defaults to "chart", must be one of ["chart", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "chart") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.config = config + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/dashboard_item_property_visualization_property_config.py b/fastly/model/dashboard_item_property_visualization_property_config.py new file mode 100644 index 0000000..0315c0f --- /dev/null +++ b/fastly/model/dashboard_item_property_visualization_property_config.py @@ -0,0 +1,292 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class DashboardItemPropertyVisualizationPropertyConfig(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('plot_type',): { + 'LINE': "line", + 'BAR': "bar", + 'SINGLE-METRIC': "single-metric", + 'DONUT': "donut", + }, + ('format',): { + 'NUMBER': "number", + 'BYTES': "bytes", + 'PERCENT': "percent", + 'REQUESTS': "requests", + 'RESPONSES': "responses", + 'SECONDS': "seconds", + 'MILLISECONDS': "milliseconds", + 'RATIO': "ratio", + 'BITRATE': "bitrate", + }, + ('calculation_method',): { + 'AVG': "avg", + 'SUM': "sum", + 'MIN': "min", + 'MAX': "max", + 'LATEST': "latest", + 'P95': "p95", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'plot_type': (str,), # noqa: E501 + 'format': (str,), # noqa: E501 + 'calculation_method': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'plot_type': 'plot_type', # noqa: E501 + 'format': 'format', # noqa: E501 + 'calculation_method': 'calculation_method', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, plot_type, *args, **kwargs): # noqa: E501 + """DashboardItemPropertyVisualizationPropertyConfig - a model defined in OpenAPI + + Args: + plot_type (str): The type of chart to display. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + format (str): (Optional) The units to use to format the data. . [optional] if omitted the server will use the default value of "number" # noqa: E501 + calculation_method (str): (Optional) The aggregation function to apply to the dataset. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.plot_type = plot_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, plot_type, *args, **kwargs): # noqa: E501 + """DashboardItemPropertyVisualizationPropertyConfig - a model defined in OpenAPI + + Args: + plot_type (str): The type of chart to display. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + format (str): (Optional) The units to use to format the data. . [optional] if omitted the server will use the default value of "number" # noqa: E501 + calculation_method (str): (Optional) The aggregation function to apply to the dataset. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.plot_type = plot_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/dashboard_property_created_by.py b/fastly/model/dashboard_property_created_by.py new file mode 100644 index 0000000..2b89a60 --- /dev/null +++ b/fastly/model/dashboard_property_created_by.py @@ -0,0 +1,243 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class DashboardPropertyCreatedBy(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DashboardPropertyCreatedBy - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DashboardPropertyCreatedBy - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/dashboard_property_items.py b/fastly/model/dashboard_property_items.py new file mode 100644 index 0000000..267c8fd --- /dev/null +++ b/fastly/model/dashboard_property_items.py @@ -0,0 +1,281 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.dashboard_item import DashboardItem + globals()['DashboardItem'] = DashboardItem + + +class DashboardPropertyItems(ModelSimple): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'value': ([DashboardItem], none_type,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """DashboardPropertyItems - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([DashboardItem], none_type): A list of [dashboard items](#dashboard-item).. # noqa: E501 + + Keyword Args: + value ([DashboardItem], none_type): A list of [dashboard items](#dashboard-item).. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """DashboardPropertyItems - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([DashboardItem], none_type): A list of [dashboard items](#dashboard-item).. # noqa: E501 + + Keyword Args: + value ([DashboardItem], none_type): A list of [dashboard items](#dashboard-item).. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/fastly/model/dashboard_property_updated_by.py b/fastly/model/dashboard_property_updated_by.py new file mode 100644 index 0000000..4310552 --- /dev/null +++ b/fastly/model/dashboard_property_updated_by.py @@ -0,0 +1,243 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class DashboardPropertyUpdatedBy(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DashboardPropertyUpdatedBy - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DashboardPropertyUpdatedBy - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/domain_inspector_measurements.py b/fastly/model/domain_inspector_measurements.py index 845684c..4267bc4 100644 --- a/fastly/model/domain_inspector_measurements.py +++ b/fastly/model/domain_inspector_measurements.py @@ -292,7 +292,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 origin_fetch_resp_body_bytes (int): Total body bytes received from origin.. [optional] # noqa: E501 bandwidth (int): Total bytes delivered (`resp_header_bytes` + `resp_body_bytes` + `bereq_header_bytes` + `bereq_body_bytes`).. [optional] # noqa: E501 edge_hit_ratio (float): Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)).. [optional] # noqa: E501 - origin_offload (float): Ratio of response bytes delivered from the edge compared to what is delivered from origin, 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] # noqa: E501 + 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`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric).. [optional] # noqa: E501 origin_status_200 (int): Number of responses received from origin with status code 200 (Success).. [optional] # noqa: E501 origin_status_204 (int): Number of responses received from origin with status code 204 (No Content).. [optional] # noqa: E501 origin_status_206 (int): Number of responses received from origin with status code 206 (Partial Content).. [optional] # noqa: E501 @@ -435,7 +435,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 origin_fetch_resp_body_bytes (int): Total body bytes received from origin.. [optional] # noqa: E501 bandwidth (int): Total bytes delivered (`resp_header_bytes` + `resp_body_bytes` + `bereq_header_bytes` + `bereq_body_bytes`).. [optional] # noqa: E501 edge_hit_ratio (float): Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)).. [optional] # noqa: E501 - origin_offload (float): Ratio of response bytes delivered from the edge compared to what is delivered from origin, 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] # noqa: E501 + 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`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric).. [optional] # noqa: E501 origin_status_200 (int): Number of responses received from origin with status code 200 (Success).. [optional] # noqa: E501 origin_status_204 (int): Number of responses received from origin with status code 204 (No Content).. [optional] # noqa: E501 origin_status_206 (int): Number of responses received from origin with status code 206 (Partial Content).. [optional] # noqa: E501 diff --git a/fastly/model/invoice_response.py b/fastly/model/eom_invoice_response.py similarity index 99% rename from fastly/model/invoice_response.py rename to fastly/model/eom_invoice_response.py index 8ea229c..7fff332 100644 --- a/fastly/model/invoice_response.py +++ b/fastly/model/eom_invoice_response.py @@ -36,7 +36,7 @@ def lazy_import(): globals()['Invoicelineitems'] = Invoicelineitems -class InvoiceResponse(ModelComposed): +class EomInvoiceResponse(ModelComposed): """NOTE: This class is auto generated. Do not edit the class manually. @@ -121,7 +121,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """InvoiceResponse - a model defined in OpenAPI + """EomInvoiceResponse - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -229,7 +229,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """InvoiceResponse - a model defined in OpenAPI + """EomInvoiceResponse - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/fastly/model/get_service_level_usage_response.py b/fastly/model/get_service_level_usage_response.py new file mode 100644 index 0000000..6790f3a --- /dev/null +++ b/fastly/model/get_service_level_usage_response.py @@ -0,0 +1,311 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.serviceusagemetrics import Serviceusagemetrics + from fastly.model.serviceusagemetrics_data import ServiceusagemetricsData + globals()['Serviceusagemetrics'] = Serviceusagemetrics + globals()['ServiceusagemetricsData'] = ServiceusagemetricsData + + +class GetServiceLevelUsageResponse(ModelComposed): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (ServiceusagemetricsData,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GetServiceLevelUsageResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data (ServiceusagemetricsData): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """GetServiceLevelUsageResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data (ServiceusagemetricsData): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Serviceusagemetrics, + ], + 'oneOf': [ + ], + } diff --git a/fastly/model/get_service_level_usage_types_response.py b/fastly/model/get_service_level_usage_types_response.py new file mode 100644 index 0000000..7f0c3e4 --- /dev/null +++ b/fastly/model/get_service_level_usage_types_response.py @@ -0,0 +1,311 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.serviceusagetype import Serviceusagetype + from fastly.model.serviceusagetypes import Serviceusagetypes + globals()['Serviceusagetype'] = Serviceusagetype + globals()['Serviceusagetypes'] = Serviceusagetypes + + +class GetServiceLevelUsageTypesResponse(ModelComposed): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': ([Serviceusagetype],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GetServiceLevelUsageTypesResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ([Serviceusagetype]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """GetServiceLevelUsageTypesResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ([Serviceusagetype]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Serviceusagetypes, + ], + 'oneOf': [ + ], + } diff --git a/fastly/model/relationship_tls_dns_record.py b/fastly/model/included_with_tls_configuration.py similarity index 94% rename from fastly/model/relationship_tls_dns_record.py rename to fastly/model/included_with_tls_configuration.py index 9cff4f0..e2666fa 100644 --- a/fastly/model/relationship_tls_dns_record.py +++ b/fastly/model/included_with_tls_configuration.py @@ -30,11 +30,11 @@ def lazy_import(): - from fastly.model.relationship_tls_dns_record_dns_record import RelationshipTlsDnsRecordDnsRecord - globals()['RelationshipTlsDnsRecordDnsRecord'] = RelationshipTlsDnsRecordDnsRecord + from fastly.model.included_with_tls_configuration_item import IncludedWithTlsConfigurationItem + globals()['IncludedWithTlsConfigurationItem'] = IncludedWithTlsConfigurationItem -class RelationshipTlsDnsRecord(ModelNormal): +class IncludedWithTlsConfiguration(ModelNormal): """NOTE: This class is auto generated. Do not edit the class manually. @@ -85,7 +85,7 @@ def openapi_types(): """ lazy_import() return { - 'dns_record': (RelationshipTlsDnsRecordDnsRecord,), # noqa: E501 + 'included': ([IncludedWithTlsConfigurationItem],), # noqa: E501 } @cached_property @@ -94,7 +94,7 @@ def discriminator(): attribute_map = { - 'dns_record': 'dns_record', # noqa: E501 + 'included': 'included', # noqa: E501 } read_only_vars = { @@ -105,7 +105,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RelationshipTlsDnsRecord - a model defined in OpenAPI + """IncludedWithTlsConfiguration - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dns_record (RelationshipTlsDnsRecordDnsRecord): [optional] # noqa: E501 + included ([IncludedWithTlsConfigurationItem]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -187,7 +187,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """RelationshipTlsDnsRecord - a model defined in OpenAPI + """IncludedWithTlsConfiguration - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -220,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dns_record (RelationshipTlsDnsRecordDnsRecord): [optional] # noqa: E501 + included ([IncludedWithTlsConfigurationItem]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/fastly/model/included_with_tls_configuration_item.py b/fastly/model/included_with_tls_configuration_item.py new file mode 100644 index 0000000..905e018 --- /dev/null +++ b/fastly/model/included_with_tls_configuration_item.py @@ -0,0 +1,269 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.tls_dns_record import TlsDnsRecord + from fastly.model.type_tls_dns_record import TypeTlsDnsRecord + globals()['TlsDnsRecord'] = TlsDnsRecord + globals()['TypeTlsDnsRecord'] = TypeTlsDnsRecord + + +class IncludedWithTlsConfigurationItem(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (TypeTlsDnsRecord,), # noqa: E501 + 'attributes': (TlsDnsRecord,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """IncludedWithTlsConfigurationItem - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The IP address or hostname of the DNS record.. [optional] # noqa: E501 + type (TypeTlsDnsRecord): [optional] # noqa: E501 + attributes (TlsDnsRecord): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """IncludedWithTlsConfigurationItem - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The IP address or hostname of the DNS record.. [optional] # noqa: E501 + type (TypeTlsDnsRecord): [optional] # noqa: E501 + attributes (TlsDnsRecord): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/invoicelineitems.py b/fastly/model/invoicelineitems.py index f3a1d38..fd943af 100644 --- a/fastly/model/invoicelineitems.py +++ b/fastly/model/invoicelineitems.py @@ -102,11 +102,11 @@ def discriminator(): 'credit_coupon_code': 'credit_coupon_code', # noqa: E501 'rate': 'rate', # noqa: E501 'units': 'units', # noqa: E501 - 'product_name': 'ProductName', # noqa: E501 - 'product_group': 'ProductGroup', # noqa: E501 - 'product_line': 'ProductLine', # noqa: E501 - 'region': 'Region', # noqa: E501 - 'usage_type': 'UsageType', # noqa: E501 + 'product_name': 'product_name', # noqa: E501 + 'product_group': 'product_group', # noqa: E501 + 'product_line': 'product_line', # noqa: E501 + 'region': 'region', # noqa: E501 + 'usage_type': 'usage_type', # noqa: E501 } read_only_vars = { diff --git a/fastly/model/list_dashboards_response.py b/fastly/model/list_dashboards_response.py new file mode 100644 index 0000000..ee01c05 --- /dev/null +++ b/fastly/model/list_dashboards_response.py @@ -0,0 +1,263 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.dashboard import Dashboard + globals()['Dashboard'] = Dashboard + + +class ListDashboardsResponse(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': ([Dashboard],), # noqa: E501 + 'meta': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'meta': 'meta', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ListDashboardsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ([Dashboard]): [optional] # noqa: E501 + meta (bool, date, datetime, dict, float, int, list, str, none_type): Meta for the pagination.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ListDashboardsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ([Dashboard]): [optional] # noqa: E501 + meta (bool, date, datetime, dict, float, int, list, str, none_type): Meta for the pagination.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/list_invoices_response.py b/fastly/model/list_eom_invoices_response.py similarity index 98% rename from fastly/model/list_invoices_response.py rename to fastly/model/list_eom_invoices_response.py index ac7baf3..27d0634 100644 --- a/fastly/model/list_invoices_response.py +++ b/fastly/model/list_eom_invoices_response.py @@ -38,7 +38,7 @@ def lazy_import(): globals()['Metadata'] = Metadata -class ListInvoicesResponse(ModelComposed): +class ListEomInvoicesResponse(ModelComposed): """NOTE: This class is auto generated. Do not edit the class manually. @@ -109,7 +109,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ListInvoicesResponse - a model defined in OpenAPI + """ListEomInvoicesResponse - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -210,7 +210,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """ListInvoicesResponse - a model defined in OpenAPI + """ListEomInvoicesResponse - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/fastly/model/meta_per_page.py b/fastly/model/meta_per_page.py new file mode 100644 index 0000000..b75fa85 --- /dev/null +++ b/fastly/model/meta_per_page.py @@ -0,0 +1,272 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class MetaPerPage(ModelSimple): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('value',): { + 'inclusive_maximum': 100, + 'inclusive_minimum': 1, + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (int,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """MetaPerPage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): Number of records per page.. if omitted defaults to 20 # noqa: E501 + + Keyword Args: + value (int): Number of records per page.. if omitted defaults to 20 # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = 20 + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """MetaPerPage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): Number of records per page.. if omitted defaults to 20 # noqa: E501 + + Keyword Args: + value (int): Number of records per page.. if omitted defaults to 20 # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = 20 + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/fastly/model/mtd_invoice_response.py b/fastly/model/mtd_invoice_response.py new file mode 100644 index 0000000..d33d2c0 --- /dev/null +++ b/fastly/model/mtd_invoice_response.py @@ -0,0 +1,331 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.mtdinvoice import Mtdinvoice + from fastly.model.mtdlineitems import Mtdlineitems + globals()['Mtdinvoice'] = Mtdinvoice + globals()['Mtdlineitems'] = Mtdlineitems + + +class MtdInvoiceResponse(ModelComposed): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'customer_id': (str,), # noqa: E501 + 'invoice_id': (str,), # noqa: E501 + 'billing_start_date': (datetime,), # noqa: E501 + 'billing_end_date': (datetime,), # noqa: E501 + 'monthly_transaction_amount': (str,), # noqa: E501 + 'transaction_line_items': ([Mtdlineitems],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_id': 'customer_id', # noqa: E501 + 'invoice_id': 'invoice_id', # noqa: E501 + 'billing_start_date': 'billing_start_date', # noqa: E501 + 'billing_end_date': 'billing_end_date', # noqa: E501 + 'monthly_transaction_amount': 'monthly_transaction_amount', # noqa: E501 + 'transaction_line_items': 'transaction_line_items', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """MtdInvoiceResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): The Customer ID associated with the invoice.. [optional] # noqa: E501 + invoice_id (str): An alphanumeric string identifying the invoice.. [optional] # noqa: E501 + billing_start_date (datetime): The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 + billing_end_date (datetime): The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 + monthly_transaction_amount (str): The total billable amount for invoiced services charged within a single month.. [optional] # noqa: E501 + transaction_line_items ([Mtdlineitems]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """MtdInvoiceResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): The Customer ID associated with the invoice.. [optional] # noqa: E501 + invoice_id (str): An alphanumeric string identifying the invoice.. [optional] # noqa: E501 + billing_start_date (datetime): The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 + billing_end_date (datetime): The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 + monthly_transaction_amount (str): The total billable amount for invoiced services charged within a single month.. [optional] # noqa: E501 + transaction_line_items ([Mtdlineitems]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Mtdinvoice, + ], + 'oneOf': [ + ], + } diff --git a/fastly/model/mtdinvoice.py b/fastly/model/mtdinvoice.py new file mode 100644 index 0000000..0352661 --- /dev/null +++ b/fastly/model/mtdinvoice.py @@ -0,0 +1,279 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.mtdlineitems import Mtdlineitems + globals()['Mtdlineitems'] = Mtdlineitems + + +class Mtdinvoice(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'customer_id': (str,), # noqa: E501 + 'invoice_id': (str,), # noqa: E501 + 'billing_start_date': (datetime,), # noqa: E501 + 'billing_end_date': (datetime,), # noqa: E501 + 'monthly_transaction_amount': (str,), # noqa: E501 + 'transaction_line_items': ([Mtdlineitems],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_id': 'customer_id', # noqa: E501 + 'invoice_id': 'invoice_id', # noqa: E501 + 'billing_start_date': 'billing_start_date', # noqa: E501 + 'billing_end_date': 'billing_end_date', # noqa: E501 + 'monthly_transaction_amount': 'monthly_transaction_amount', # noqa: E501 + 'transaction_line_items': 'transaction_line_items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Mtdinvoice - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): The Customer ID associated with the invoice.. [optional] # noqa: E501 + invoice_id (str): An alphanumeric string identifying the invoice.. [optional] # noqa: E501 + billing_start_date (datetime): The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 + billing_end_date (datetime): The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 + monthly_transaction_amount (str): The total billable amount for invoiced services charged within a single month.. [optional] # noqa: E501 + transaction_line_items ([Mtdlineitems]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Mtdinvoice - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): The Customer ID associated with the invoice.. [optional] # noqa: E501 + invoice_id (str): An alphanumeric string identifying the invoice.. [optional] # noqa: E501 + billing_start_date (datetime): The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 + billing_end_date (datetime): The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 + monthly_transaction_amount (str): The total billable amount for invoiced services charged within a single month.. [optional] # noqa: E501 + transaction_line_items ([Mtdlineitems]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/mtdlineitems.py b/fastly/model/mtdlineitems.py new file mode 100644 index 0000000..8d0292d --- /dev/null +++ b/fastly/model/mtdlineitems.py @@ -0,0 +1,285 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class Mtdlineitems(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'description': (str,), # noqa: E501 + 'amount': (float,), # noqa: E501 + 'rate': (float,), # noqa: E501 + 'units': (float,), # noqa: E501 + 'product_name': (str,), # noqa: E501 + 'product_group': (str,), # noqa: E501 + 'product_line': (str,), # noqa: E501 + 'region': (str,), # noqa: E501 + 'usage_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'description': 'description', # noqa: E501 + 'amount': 'amount', # noqa: E501 + 'rate': 'rate', # noqa: E501 + 'units': 'units', # noqa: E501 + 'product_name': 'product_name', # noqa: E501 + 'product_group': 'product_group', # noqa: E501 + 'product_line': 'product_line', # noqa: E501 + 'region': 'region', # noqa: E501 + 'usage_type': 'usage_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Mtdlineitems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str): Invoice line item transaction name.. [optional] # noqa: E501 + amount (float): Billed amount for line item.. [optional] # noqa: E501 + rate (float): Price per unit.. [optional] # noqa: E501 + units (float): Total number of units of usage.. [optional] # noqa: E501 + product_name (str): The name of the product.. [optional] # noqa: E501 + product_group (str): The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`).. [optional] # noqa: E501 + product_line (str): The broader classification of the product (e.g., `Network Services` or `Security`).. [optional] # noqa: E501 + region (str): The geographical area applicable for regionally based products.. [optional] # noqa: E501 + usage_type (str): The unit of measure (e.g., `requests` or `bandwidth`).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Mtdlineitems - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str): Invoice line item transaction name.. [optional] # noqa: E501 + amount (float): Billed amount for line item.. [optional] # noqa: E501 + rate (float): Price per unit.. [optional] # noqa: E501 + units (float): Total number of units of usage.. [optional] # noqa: E501 + product_name (str): The name of the product.. [optional] # noqa: E501 + product_group (str): The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`).. [optional] # noqa: E501 + product_line (str): The broader classification of the product (e.g., `Network Services` or `Security`).. [optional] # noqa: E501 + region (str): The geographical area applicable for regionally based products.. [optional] # noqa: E501 + usage_type (str): The unit of measure (e.g., `requests` or `bandwidth`).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/realtime_entry_aggregated.py b/fastly/model/realtime_entry_aggregated.py index 4d2da21..80d0656 100644 --- a/fastly/model/realtime_entry_aggregated.py +++ b/fastly/model/realtime_entry_aggregated.py @@ -333,6 +333,7 @@ def openapi_types(): 'all_status_3xx': (int,), # noqa: E501 'all_status_4xx': (int,), # noqa: E501 'all_status_5xx': (int,), # noqa: E501 + 'origin_offload': (float,), # noqa: E501 } @cached_property @@ -589,6 +590,7 @@ def discriminator(): 'all_status_3xx': 'all_status_3xx', # noqa: E501 'all_status_4xx': 'all_status_4xx', # noqa: E501 'all_status_5xx': 'all_status_5xx', # noqa: E501 + 'origin_offload': 'origin_offload', # noqa: E501 } read_only_vars = { @@ -878,6 +880,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 all_status_3xx (int): Number of \"Redirection\" codes delivered for all sources.. [optional] # noqa: E501 all_status_4xx (int): Number of \"Client Error\" codes delivered for all sources.. [optional] # noqa: E501 all_status_5xx (int): Number of \"Server Error\" codes delivered for all sources.. [optional] # noqa: E501 + 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] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -1225,6 +1228,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 all_status_3xx (int): Number of \"Redirection\" codes delivered for all sources.. [optional] # noqa: E501 all_status_4xx (int): Number of \"Client Error\" codes delivered for all sources.. [optional] # noqa: E501 all_status_5xx (int): Number of \"Server Error\" codes delivered for all sources.. [optional] # noqa: E501 + 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] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/fastly/model/realtime_measurements.py b/fastly/model/realtime_measurements.py index 6fe43bf..1026e6c 100644 --- a/fastly/model/realtime_measurements.py +++ b/fastly/model/realtime_measurements.py @@ -327,6 +327,7 @@ def openapi_types(): 'all_status_3xx': (int,), # noqa: E501 'all_status_4xx': (int,), # noqa: E501 'all_status_5xx': (int,), # noqa: E501 + 'origin_offload': (float,), # noqa: E501 } @cached_property @@ -583,6 +584,7 @@ def discriminator(): 'all_status_3xx': 'all_status_3xx', # noqa: E501 'all_status_4xx': 'all_status_4xx', # noqa: E501 'all_status_5xx': 'all_status_5xx', # noqa: E501 + 'origin_offload': 'origin_offload', # noqa: E501 } read_only_vars = { @@ -874,6 +876,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 all_status_3xx (int): Number of \"Redirection\" codes delivered for all sources.. [optional] # noqa: E501 all_status_4xx (int): Number of \"Client Error\" codes delivered for all sources.. [optional] # noqa: E501 all_status_5xx (int): Number of \"Server Error\" codes delivered for all sources.. [optional] # noqa: E501 + 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] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -1203,6 +1206,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 all_status_3xx (int): Number of \"Redirection\" codes delivered for all sources.. [optional] # noqa: E501 all_status_4xx (int): Number of \"Client Error\" codes delivered for all sources.. [optional] # noqa: E501 all_status_5xx (int): Number of \"Server Error\" codes delivered for all sources.. [optional] # noqa: E501 + 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] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/fastly/model/relationship_default_ecdsa_tls_certificate.py b/fastly/model/relationship_default_ecdsa_tls_certificate.py new file mode 100644 index 0000000..879954e --- /dev/null +++ b/fastly/model/relationship_default_ecdsa_tls_certificate.py @@ -0,0 +1,259 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate import RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate + globals()['RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate'] = RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate + + +class RelationshipDefaultEcdsaTlsCertificate(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'default_ecdsa_certificate': (RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'default_ecdsa_certificate': 'default_ecdsa_certificate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipDefaultEcdsaTlsCertificate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_ecdsa_certificate (RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipDefaultEcdsaTlsCertificate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_ecdsa_certificate (RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate.py b/fastly/model/relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate.py new file mode 100644 index 0000000..bc72d13 --- /dev/null +++ b/fastly/model/relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate.py @@ -0,0 +1,259 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate_data import RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData + globals()['RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData'] = RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData + + +class RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data (RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data (RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate_data.py b/fastly/model/relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate_data.py new file mode 100644 index 0000000..de8c8ee --- /dev/null +++ b/fastly/model/relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate_data.py @@ -0,0 +1,263 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.type_tls_certificate import TypeTlsCertificate + globals()['TypeTlsCertificate'] = TypeTlsCertificate + + +class RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (TypeTlsCertificate,), # noqa: E501 + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (TypeTlsCertificate): [optional] # noqa: E501 + id (str): Alphanumeric string identifying the default ECDSA TLS certificate.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (TypeTlsCertificate): [optional] # noqa: E501 + id (str): Alphanumeric string identifying the default ECDSA TLS certificate.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_default_tls_certificate.py b/fastly/model/relationship_default_tls_certificate.py new file mode 100644 index 0000000..18129b0 --- /dev/null +++ b/fastly/model/relationship_default_tls_certificate.py @@ -0,0 +1,259 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.relationship_default_tls_certificate_default_certificate import RelationshipDefaultTlsCertificateDefaultCertificate + globals()['RelationshipDefaultTlsCertificateDefaultCertificate'] = RelationshipDefaultTlsCertificateDefaultCertificate + + +class RelationshipDefaultTlsCertificate(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'default_certificate': (RelationshipDefaultTlsCertificateDefaultCertificate,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'default_certificate': 'default_certificate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipDefaultTlsCertificate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_certificate (RelationshipDefaultTlsCertificateDefaultCertificate): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipDefaultTlsCertificate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_certificate (RelationshipDefaultTlsCertificateDefaultCertificate): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_default_tls_certificate_default_certificate.py b/fastly/model/relationship_default_tls_certificate_default_certificate.py new file mode 100644 index 0000000..c628880 --- /dev/null +++ b/fastly/model/relationship_default_tls_certificate_default_certificate.py @@ -0,0 +1,259 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.relationship_default_tls_certificate_default_certificate_data import RelationshipDefaultTlsCertificateDefaultCertificateData + globals()['RelationshipDefaultTlsCertificateDefaultCertificateData'] = RelationshipDefaultTlsCertificateDefaultCertificateData + + +class RelationshipDefaultTlsCertificateDefaultCertificate(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (RelationshipDefaultTlsCertificateDefaultCertificateData,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipDefaultTlsCertificateDefaultCertificate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data (RelationshipDefaultTlsCertificateDefaultCertificateData): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipDefaultTlsCertificateDefaultCertificate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data (RelationshipDefaultTlsCertificateDefaultCertificateData): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_default_tls_certificate_default_certificate_data.py b/fastly/model/relationship_default_tls_certificate_default_certificate_data.py new file mode 100644 index 0000000..2d38b53 --- /dev/null +++ b/fastly/model/relationship_default_tls_certificate_default_certificate_data.py @@ -0,0 +1,263 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.type_tls_certificate import TypeTlsCertificate + globals()['TypeTlsCertificate'] = TypeTlsCertificate + + +class RelationshipDefaultTlsCertificateDefaultCertificateData(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (TypeTlsCertificate,), # noqa: E501 + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipDefaultTlsCertificateDefaultCertificateData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (TypeTlsCertificate): [optional] # noqa: E501 + id (str): Alphanumeric string identifying the default TLS certificate.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipDefaultTlsCertificateDefaultCertificateData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (TypeTlsCertificate): [optional] # noqa: E501 + id (str): Alphanumeric string identifying the default TLS certificate.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_tls_dns_records_request.py b/fastly/model/relationship_tls_dns_records_request.py new file mode 100644 index 0000000..1bd1172 --- /dev/null +++ b/fastly/model/relationship_tls_dns_records_request.py @@ -0,0 +1,259 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.relationship_tls_dns_records_request_dns_records import RelationshipTlsDnsRecordsRequestDnsRecords + globals()['RelationshipTlsDnsRecordsRequestDnsRecords'] = RelationshipTlsDnsRecordsRequestDnsRecords + + +class RelationshipTlsDnsRecordsRequest(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dns_records': (RelationshipTlsDnsRecordsRequestDnsRecords,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dns_records': 'dns_records', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + dns_records (RelationshipTlsDnsRecordsRequestDnsRecords): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + dns_records (RelationshipTlsDnsRecordsRequestDnsRecords): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_tls_dns_records_request_dns_records.py b/fastly/model/relationship_tls_dns_records_request_dns_records.py new file mode 100644 index 0000000..c67098f --- /dev/null +++ b/fastly/model/relationship_tls_dns_records_request_dns_records.py @@ -0,0 +1,259 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.relationship_tls_dns_records_request_dns_records_data import RelationshipTlsDnsRecordsRequestDnsRecordsData + globals()['RelationshipTlsDnsRecordsRequestDnsRecordsData'] = RelationshipTlsDnsRecordsRequestDnsRecordsData + + +class RelationshipTlsDnsRecordsRequestDnsRecords(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': ([RelationshipTlsDnsRecordsRequestDnsRecordsData],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsRequestDnsRecords - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ([RelationshipTlsDnsRecordsRequestDnsRecordsData]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsRequestDnsRecords - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ([RelationshipTlsDnsRecordsRequestDnsRecordsData]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_member_tls_dns_record.py b/fastly/model/relationship_tls_dns_records_request_dns_records_data.py similarity index 97% rename from fastly/model/relationship_member_tls_dns_record.py rename to fastly/model/relationship_tls_dns_records_request_dns_records_data.py index 4cf6f58..ae31898 100644 --- a/fastly/model/relationship_member_tls_dns_record.py +++ b/fastly/model/relationship_tls_dns_records_request_dns_records_data.py @@ -34,7 +34,7 @@ def lazy_import(): globals()['TypeTlsDnsRecord'] = TypeTlsDnsRecord -class RelationshipMemberTlsDnsRecord(ModelNormal): +class RelationshipTlsDnsRecordsRequestDnsRecordsData(ModelNormal): """NOTE: This class is auto generated. Do not edit the class manually. @@ -100,7 +100,6 @@ def discriminator(): } read_only_vars = { - 'id', # noqa: E501 } _composed_schemas = {} @@ -108,7 +107,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RelationshipMemberTlsDnsRecord - a model defined in OpenAPI + """RelationshipTlsDnsRecordsRequestDnsRecordsData - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -191,7 +190,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """RelationshipMemberTlsDnsRecord - a model defined in OpenAPI + """RelationshipTlsDnsRecordsRequestDnsRecordsData - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/fastly/model/relationship_tls_dns_records_response.py b/fastly/model/relationship_tls_dns_records_response.py new file mode 100644 index 0000000..f16d47e --- /dev/null +++ b/fastly/model/relationship_tls_dns_records_response.py @@ -0,0 +1,259 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.relationship_tls_dns_records_response_dns_records import RelationshipTlsDnsRecordsResponseDnsRecords + globals()['RelationshipTlsDnsRecordsResponseDnsRecords'] = RelationshipTlsDnsRecordsResponseDnsRecords + + +class RelationshipTlsDnsRecordsResponse(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dns_records': (RelationshipTlsDnsRecordsResponseDnsRecords,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dns_records': 'dns_records', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + dns_records (RelationshipTlsDnsRecordsResponseDnsRecords): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + dns_records (RelationshipTlsDnsRecordsResponseDnsRecords): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_tls_dns_records_response_dns_records.py b/fastly/model/relationship_tls_dns_records_response_dns_records.py new file mode 100644 index 0000000..e7ff12f --- /dev/null +++ b/fastly/model/relationship_tls_dns_records_response_dns_records.py @@ -0,0 +1,259 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.relationship_tls_dns_records_response_dns_records_data import RelationshipTlsDnsRecordsResponseDnsRecordsData + globals()['RelationshipTlsDnsRecordsResponseDnsRecordsData'] = RelationshipTlsDnsRecordsResponseDnsRecordsData + + +class RelationshipTlsDnsRecordsResponseDnsRecords(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': ([RelationshipTlsDnsRecordsResponseDnsRecordsData],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsResponseDnsRecords - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ([RelationshipTlsDnsRecordsResponseDnsRecordsData]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsResponseDnsRecords - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ([RelationshipTlsDnsRecordsResponseDnsRecordsData]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_tls_dns_records_response_dns_records_data.py b/fastly/model/relationship_tls_dns_records_response_dns_records_data.py new file mode 100644 index 0000000..01e0502 --- /dev/null +++ b/fastly/model/relationship_tls_dns_records_response_dns_records_data.py @@ -0,0 +1,264 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.type_tls_dns_record import TypeTlsDnsRecord + globals()['TypeTlsDnsRecord'] = TypeTlsDnsRecord + + +class RelationshipTlsDnsRecordsResponseDnsRecordsData(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (TypeTlsDnsRecord,), # noqa: E501 + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + 'id', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsResponseDnsRecordsData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (TypeTlsDnsRecord): [optional] # noqa: E501 + id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RelationshipTlsDnsRecordsResponseDnsRecordsData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (TypeTlsDnsRecord): [optional] # noqa: E501 + id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/results.py b/fastly/model/results.py index 376d1b4..2542ffe 100644 --- a/fastly/model/results.py +++ b/fastly/model/results.py @@ -327,6 +327,7 @@ def openapi_types(): 'all_status_3xx': (int,), # noqa: E501 'all_status_4xx': (int,), # noqa: E501 'all_status_5xx': (int,), # noqa: E501 + 'origin_offload': (float,), # noqa: E501 'service_id': (str,), # noqa: E501 'start_time': (int,), # noqa: E501 } @@ -585,6 +586,7 @@ def discriminator(): 'all_status_3xx': 'all_status_3xx', # noqa: E501 'all_status_4xx': 'all_status_4xx', # noqa: E501 'all_status_5xx': 'all_status_5xx', # noqa: E501 + 'origin_offload': 'origin_offload', # noqa: E501 'service_id': 'service_id', # noqa: E501 'start_time': 'start_time', # noqa: E501 } @@ -879,6 +881,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 all_status_3xx (int): Number of \"Redirection\" codes delivered for all sources.. [optional] # noqa: E501 all_status_4xx (int): Number of \"Client Error\" codes delivered for all sources.. [optional] # noqa: E501 all_status_5xx (int): Number of \"Server Error\" codes delivered for all sources.. [optional] # noqa: E501 + 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] # noqa: E501 service_id (str): [optional] # noqa: E501 start_time (int): Timestamp for the start of the time period being reported. [optional] # noqa: E501 """ @@ -1210,6 +1213,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 all_status_3xx (int): Number of \"Redirection\" codes delivered for all sources.. [optional] # noqa: E501 all_status_4xx (int): Number of \"Client Error\" codes delivered for all sources.. [optional] # noqa: E501 all_status_5xx (int): Number of \"Server Error\" codes delivered for all sources.. [optional] # noqa: E501 + 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] # noqa: E501 service_id (str): [optional] # noqa: E501 start_time (int): Timestamp for the start of the time period being reported. [optional] # noqa: E501 """ diff --git a/fastly/model/serviceusagemetric.py b/fastly/model/serviceusagemetric.py new file mode 100644 index 0000000..c115450 --- /dev/null +++ b/fastly/model/serviceusagemetric.py @@ -0,0 +1,266 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class Serviceusagemetric(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'customer_id': (str,), # noqa: E501 + 'service_id': (str,), # noqa: E501 + 'service_name': (str,), # noqa: E501 + 'usage_units': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_id': 'customer_id', # noqa: E501 + 'service_id': 'service_id', # noqa: E501 + 'service_name': 'service_name', # noqa: E501 + 'usage_units': 'usage_units', # noqa: E501 + } + + read_only_vars = { + 'customer_id', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Serviceusagemetric - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): [optional] # noqa: E501 + service_id (str): Service ID associated with the usage.. [optional] # noqa: E501 + service_name (str): Name of the service associated with the usage.. [optional] # noqa: E501 + usage_units (float): The quantity of the usage for the billing period. Amount will be in the units provided in the parent object (e.g., a quantity of `1.3` with a unit of `gb` would have a usage amount of 1.3 gigabytes).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Serviceusagemetric - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): [optional] # noqa: E501 + service_id (str): Service ID associated with the usage.. [optional] # noqa: E501 + service_name (str): Name of the service associated with the usage.. [optional] # noqa: E501 + usage_units (float): The quantity of the usage for the billing period. Amount will be in the units provided in the parent object (e.g., a quantity of `1.3` with a unit of `gb` would have a usage amount of 1.3 gigabytes).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_tls_dns_record_dns_record.py b/fastly/model/serviceusagemetrics.py similarity index 94% rename from fastly/model/relationship_tls_dns_record_dns_record.py rename to fastly/model/serviceusagemetrics.py index 300d886..2ddba7a 100644 --- a/fastly/model/relationship_tls_dns_record_dns_record.py +++ b/fastly/model/serviceusagemetrics.py @@ -30,11 +30,11 @@ def lazy_import(): - from fastly.model.relationship_member_tls_dns_record import RelationshipMemberTlsDnsRecord - globals()['RelationshipMemberTlsDnsRecord'] = RelationshipMemberTlsDnsRecord + from fastly.model.serviceusagemetrics_data import ServiceusagemetricsData + globals()['ServiceusagemetricsData'] = ServiceusagemetricsData -class RelationshipTlsDnsRecordDnsRecord(ModelNormal): +class Serviceusagemetrics(ModelNormal): """NOTE: This class is auto generated. Do not edit the class manually. @@ -85,7 +85,7 @@ def openapi_types(): """ lazy_import() return { - 'data': ([RelationshipMemberTlsDnsRecord],), # noqa: E501 + 'data': (ServiceusagemetricsData,), # noqa: E501 } @cached_property @@ -105,7 +105,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RelationshipTlsDnsRecordDnsRecord - a model defined in OpenAPI + """Serviceusagemetrics - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - data ([RelationshipMemberTlsDnsRecord]): [optional] # noqa: E501 + data (ServiceusagemetricsData): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -187,7 +187,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """RelationshipTlsDnsRecordDnsRecord - a model defined in OpenAPI + """Serviceusagemetrics - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -220,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - data ([RelationshipMemberTlsDnsRecord]): [optional] # noqa: E501 + data (ServiceusagemetricsData): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/fastly/model/serviceusagemetrics_data.py b/fastly/model/serviceusagemetrics_data.py new file mode 100644 index 0000000..f175582 --- /dev/null +++ b/fastly/model/serviceusagemetrics_data.py @@ -0,0 +1,286 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.metadata import Metadata + from fastly.model.serviceusagemetric import Serviceusagemetric + globals()['Metadata'] = Metadata + globals()['Serviceusagemetric'] = Serviceusagemetric + + +class ServiceusagemetricsData(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'customer_id': (str,), # noqa: E501 + 'start_time': (datetime,), # noqa: E501 + 'end_time': (datetime,), # noqa: E501 + 'usage_type': (str,), # noqa: E501 + 'unit': (str,), # noqa: E501 + 'details': ([Serviceusagemetric],), # noqa: E501 + 'meta': (Metadata,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_id': 'customer_id', # noqa: E501 + 'start_time': 'start_time', # noqa: E501 + 'end_time': 'end_time', # noqa: E501 + 'usage_type': 'usage_type', # noqa: E501 + 'unit': 'unit', # noqa: E501 + 'details': 'details', # noqa: E501 + 'meta': 'meta', # noqa: E501 + } + + read_only_vars = { + 'customer_id', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ServiceusagemetricsData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): [optional] # noqa: E501 + start_time (datetime): Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 + end_time (datetime): Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 + usage_type (str): The usage type identifier for the usage. This is a single, billable metric for the product.. [optional] # noqa: E501 + unit (str): The unit for the usage as shown on an invoice. If there is no explicit unit, this field will be \"unit\" (e.g., a request with `product_id` of 'cdn_usage' and `usage_type` of 'North America Requests' has no unit, and will return \"unit\").. [optional] # noqa: E501 + details ([Serviceusagemetric]): [optional] # noqa: E501 + meta (Metadata): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ServiceusagemetricsData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): [optional] # noqa: E501 + start_time (datetime): Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 + end_time (datetime): Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 + usage_type (str): The usage type identifier for the usage. This is a single, billable metric for the product.. [optional] # noqa: E501 + unit (str): The unit for the usage as shown on an invoice. If there is no explicit unit, this field will be \"unit\" (e.g., a request with `product_id` of 'cdn_usage' and `usage_type` of 'North America Requests' has no unit, and will return \"unit\").. [optional] # noqa: E501 + details ([Serviceusagemetric]): [optional] # noqa: E501 + meta (Metadata): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/serviceusagetype.py b/fastly/model/serviceusagetype.py new file mode 100644 index 0000000..ba0b964 --- /dev/null +++ b/fastly/model/serviceusagetype.py @@ -0,0 +1,257 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class Serviceusagetype(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'product_id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'product_id': 'product_id', # noqa: E501 + 'name': 'name', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Serviceusagetype - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + product_id (str): The product identifier associated with the usage type. This corresponds to a Fastly product offering.. [optional] # noqa: E501 + name (str): Full name of the product usage type as it might appear on a customer's invoice.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Serviceusagetype - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + product_id (str): The product identifier associated with the usage type. This corresponds to a Fastly product offering.. [optional] # noqa: E501 + name (str): Full name of the product usage type as it might appear on a customer's invoice.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/relationship_tls_dns_records.py b/fastly/model/serviceusagetypes.py similarity index 94% rename from fastly/model/relationship_tls_dns_records.py rename to fastly/model/serviceusagetypes.py index b770e0b..de2ecd5 100644 --- a/fastly/model/relationship_tls_dns_records.py +++ b/fastly/model/serviceusagetypes.py @@ -30,11 +30,11 @@ def lazy_import(): - from fastly.model.relationship_tls_dns_record_dns_record import RelationshipTlsDnsRecordDnsRecord - globals()['RelationshipTlsDnsRecordDnsRecord'] = RelationshipTlsDnsRecordDnsRecord + from fastly.model.serviceusagetype import Serviceusagetype + globals()['Serviceusagetype'] = Serviceusagetype -class RelationshipTlsDnsRecords(ModelNormal): +class Serviceusagetypes(ModelNormal): """NOTE: This class is auto generated. Do not edit the class manually. @@ -85,7 +85,7 @@ def openapi_types(): """ lazy_import() return { - 'dns_records': (RelationshipTlsDnsRecordDnsRecord,), # noqa: E501 + 'data': ([Serviceusagetype],), # noqa: E501 } @cached_property @@ -94,7 +94,7 @@ def discriminator(): attribute_map = { - 'dns_records': 'dns_records', # noqa: E501 + 'data': 'data', # noqa: E501 } read_only_vars = { @@ -105,7 +105,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RelationshipTlsDnsRecords - a model defined in OpenAPI + """Serviceusagetypes - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -138,7 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dns_records (RelationshipTlsDnsRecordDnsRecord): [optional] # noqa: E501 + data ([Serviceusagetype]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -187,7 +187,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """RelationshipTlsDnsRecords - a model defined in OpenAPI + """Serviceusagetypes - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -220,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dns_records (RelationshipTlsDnsRecordDnsRecord): [optional] # noqa: E501 + data ([Serviceusagetype]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/fastly/model/tls_certificate_blob_response.py b/fastly/model/tls_certificate_blob_response.py new file mode 100644 index 0000000..b698f7f --- /dev/null +++ b/fastly/model/tls_certificate_blob_response.py @@ -0,0 +1,254 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class TlsCertificateBlobResponse(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'cert_blob': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cert_blob': 'cert_blob', # noqa: E501 + } + + read_only_vars = { + 'cert_blob', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TlsCertificateBlobResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cert_blob (str): A certificate blob. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TlsCertificateBlobResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cert_blob (str): A certificate blob. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/tls_dns_record.py b/fastly/model/tls_dns_record.py index 635c738..61e0a50 100644 --- a/fastly/model/tls_dns_record.py +++ b/fastly/model/tls_dns_record.py @@ -53,6 +53,16 @@ class TlsDnsRecord(ModelNormal): """ allowed_values = { + ('region',): { + 'CUSTOM': "custom", + 'GLOBAL': "global", + 'NA/EU': "na/eu", + }, + ('record_type',): { + 'CNAME': "CNAME", + 'A': "A", + 'AAAA': "AAAA", + }, } validations = { @@ -79,7 +89,6 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 'region': (str,), # noqa: E501 'record_type': (str,), # noqa: E501 } @@ -90,7 +99,6 @@ def discriminator(): attribute_map = { - 'id': 'id', # noqa: E501 'region': 'region', # noqa: E501 'record_type': 'record_type', # noqa: E501 } @@ -136,8 +144,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): The IP address or hostname of the DNS record.. [optional] # noqa: E501 - region (str): Specifies the regions that will be used to route traffic. Select DNS Records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `us-eu` region to exclusively land traffic on North American and European POPs.. [optional] # noqa: E501 + region (str): Specifies the regions that will be used to route traffic. Select DNS records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `na/eu` region to exclusively land traffic on North American and European POPs.. [optional] # noqa: E501 record_type (str): The type of the DNS record. `A` specifies an IPv4 address to be used for an A record to be used for apex domains (e.g., `example.com`). `AAAA` specifies an IPv6 address for use in an A record for apex domains. `CNAME` specifies the hostname to be used for a CNAME record for subdomains or wildcard domains (e.g., `www.example.com` or `*.example.com`).. [optional] # noqa: E501 """ @@ -220,8 +227,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - id (str): The IP address or hostname of the DNS record.. [optional] # noqa: E501 - region (str): Specifies the regions that will be used to route traffic. Select DNS Records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `us-eu` region to exclusively land traffic on North American and European POPs.. [optional] # noqa: E501 + region (str): Specifies the regions that will be used to route traffic. Select DNS records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `na/eu` region to exclusively land traffic on North American and European POPs.. [optional] # noqa: E501 record_type (str): The type of the DNS record. `A` specifies an IPv4 address to be used for an A record to be used for apex domains (e.g., `example.com`). `AAAA` specifies an IPv6 address for use in an A record for apex domains. `CNAME` specifies the hostname to be used for a CNAME record for subdomains or wildcard domains (e.g., `www.example.com` or `*.example.com`).. [optional] # noqa: E501 """ diff --git a/fastly/model/update_dashboard_request.py b/fastly/model/update_dashboard_request.py new file mode 100644 index 0000000..15f1bc5 --- /dev/null +++ b/fastly/model/update_dashboard_request.py @@ -0,0 +1,267 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.dashboard_property_items import DashboardPropertyItems + globals()['DashboardPropertyItems'] = DashboardPropertyItems + + +class UpdateDashboardRequest(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'items': (DashboardPropertyItems,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateDashboardRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): A human-readable name. [optional] # noqa: E501 + description (str): A short description of the dashboard. [optional] # noqa: E501 + items (DashboardPropertyItems): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateDashboardRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): A human-readable name. [optional] # noqa: E501 + description (str): A short description of the dashboard. [optional] # noqa: E501 + items (DashboardPropertyItems): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/values.py b/fastly/model/values.py index 3d38c5c..f7bb5f9 100644 --- a/fastly/model/values.py +++ b/fastly/model/values.py @@ -292,7 +292,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 origin_fetch_resp_body_bytes (int): Total body bytes received from origin.. [optional] # noqa: E501 bandwidth (int): Total bytes delivered (`resp_header_bytes` + `resp_body_bytes` + `bereq_header_bytes` + `bereq_body_bytes`).. [optional] # noqa: E501 edge_hit_ratio (float): Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)).. [optional] # noqa: E501 - origin_offload (float): Ratio of response bytes delivered from the edge compared to what is delivered from origin, 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] # noqa: E501 + 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`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric).. [optional] # noqa: E501 origin_status_200 (int): Number of responses received from origin with status code 200 (Success).. [optional] # noqa: E501 origin_status_204 (int): Number of responses received from origin with status code 204 (No Content).. [optional] # noqa: E501 origin_status_206 (int): Number of responses received from origin with status code 206 (Partial Content).. [optional] # noqa: E501 @@ -435,7 +435,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 origin_fetch_resp_body_bytes (int): Total body bytes received from origin.. [optional] # noqa: E501 bandwidth (int): Total bytes delivered (`resp_header_bytes` + `resp_body_bytes` + `bereq_header_bytes` + `bereq_body_bytes`).. [optional] # noqa: E501 edge_hit_ratio (float): Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)).. [optional] # noqa: E501 - origin_offload (float): Ratio of response bytes delivered from the edge compared to what is delivered from origin, 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] # noqa: E501 + 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`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric).. [optional] # noqa: E501 origin_status_200 (int): Number of responses received from origin with status code 200 (Success).. [optional] # noqa: E501 origin_status_204 (int): Number of responses received from origin with status code 204 (No Content).. [optional] # noqa: E501 origin_status_206 (int): Number of responses received from origin with status code 206 (Partial Content).. [optional] # noqa: E501 diff --git a/fastly/models/__init__.py b/fastly/models/__init__.py index 8c9b18c..f6c0034 100644 --- a/fastly/models/__init__.py +++ b/fastly/models/__init__.py @@ -17,6 +17,7 @@ from fastly.model.acl_response_all_of import AclResponseAllOf from fastly.model.apex_redirect import ApexRedirect from fastly.model.apex_redirect_all_of import ApexRedirectAllOf +from fastly.model.async_response import AsyncResponse from fastly.model.automation_token import AutomationToken from fastly.model.automation_token_create_request import AutomationTokenCreateRequest from fastly.model.automation_token_create_request_attributes import AutomationTokenCreateRequestAttributes @@ -76,10 +77,23 @@ from fastly.model.contact_response import ContactResponse from fastly.model.contact_response_all_of import ContactResponseAllOf from fastly.model.content import Content +from fastly.model.create_dashboard_request import CreateDashboardRequest from fastly.model.create_response_object_request import CreateResponseObjectRequest from fastly.model.customer import Customer from fastly.model.customer_response import CustomerResponse from fastly.model.customer_response_all_of import CustomerResponseAllOf +from fastly.model.dashboard import Dashboard +from fastly.model.dashboard_item import DashboardItem +from fastly.model.dashboard_item_property_data_source import DashboardItemPropertyDataSource +from fastly.model.dashboard_item_property_data_source_property_config import DashboardItemPropertyDataSourcePropertyConfig +from fastly.model.dashboard_item_property_span import DashboardItemPropertySpan +from fastly.model.dashboard_item_property_subtitle import DashboardItemPropertySubtitle +from fastly.model.dashboard_item_property_title import DashboardItemPropertyTitle +from fastly.model.dashboard_item_property_visualization import DashboardItemPropertyVisualization +from fastly.model.dashboard_item_property_visualization_property_config import DashboardItemPropertyVisualizationPropertyConfig +from fastly.model.dashboard_property_created_by import DashboardPropertyCreatedBy +from fastly.model.dashboard_property_items import DashboardPropertyItems +from fastly.model.dashboard_property_updated_by import DashboardPropertyUpdatedBy from fastly.model.default_settings import DefaultSettings from fastly.model.default_settings_error import DefaultSettingsError from fastly.model.default_settings_response import DefaultSettingsResponse @@ -110,6 +124,7 @@ from fastly.model.enabled_product_response_links import EnabledProductResponseLinks from fastly.model.enabled_product_response_product import EnabledProductResponseProduct from fastly.model.enabled_product_response_service import EnabledProductResponseService +from fastly.model.eom_invoice_response import EomInvoiceResponse from fastly.model.error import Error from fastly.model.error_response_data import ErrorResponseData from fastly.model.event import Event @@ -119,6 +134,8 @@ from fastly.model.event_response import EventResponse from fastly.model.events_response import EventsResponse from fastly.model.generic_token_error import GenericTokenError +from fastly.model.get_service_level_usage_response import GetServiceLevelUsageResponse +from fastly.model.get_service_level_usage_types_response import GetServiceLevelUsageTypesResponse from fastly.model.gzip import Gzip from fastly.model.gzip_response import GzipResponse from fastly.model.header import Header @@ -165,6 +182,8 @@ from fastly.model.iam_service_group_all_of import IamServiceGroupAllOf from fastly.model.iam_user_group import IamUserGroup from fastly.model.iam_user_group_all_of import IamUserGroupAllOf +from fastly.model.included_with_tls_configuration import IncludedWithTlsConfiguration +from fastly.model.included_with_tls_configuration_item import IncludedWithTlsConfigurationItem from fastly.model.included_with_waf_active_rule import IncludedWithWafActiveRule from fastly.model.included_with_waf_active_rule_item import IncludedWithWafActiveRuleItem from fastly.model.included_with_waf_exclusion import IncludedWithWafExclusion @@ -198,7 +217,6 @@ from fastly.model.invitations_response import InvitationsResponse from fastly.model.invitations_response_all_of import InvitationsResponseAllOf from fastly.model.invoice import Invoice -from fastly.model.invoice_response import InvoiceResponse from fastly.model.invoicelineitems import Invoicelineitems from fastly.model.legacy_waf_configuration_set import LegacyWafConfigurationSet from fastly.model.legacy_waf_firewall import LegacyWafFirewall @@ -210,7 +228,8 @@ from fastly.model.legacy_waf_update_status import LegacyWafUpdateStatus from fastly.model.line_item_data import LineItemData from fastly.model.line_item_data_read_only_invoice_id import LineItemDataReadOnlyInvoiceId -from fastly.model.list_invoices_response import ListInvoicesResponse +from fastly.model.list_dashboards_response import ListDashboardsResponse +from fastly.model.list_eom_invoices_response import ListEomInvoicesResponse from fastly.model.listinvoices import Listinvoices from fastly.model.logging_address_and_port import LoggingAddressAndPort from fastly.model.logging_azureblob_additional import LoggingAzureblobAdditional @@ -285,7 +304,11 @@ from fastly.model.logging_syslog_response import LoggingSyslogResponse from fastly.model.logging_tls_common import LoggingTlsCommon from fastly.model.logging_use_tls_string import LoggingUseTlsString +from fastly.model.meta_per_page import MetaPerPage from fastly.model.metadata import Metadata +from fastly.model.mtd_invoice_response import MtdInvoiceResponse +from fastly.model.mtdinvoice import Mtdinvoice +from fastly.model.mtdlineitems import Mtdlineitems from fastly.model.mutual_authentication import MutualAuthentication from fastly.model.mutual_authentication_data import MutualAuthenticationData from fastly.model.mutual_authentication_data_attributes import MutualAuthenticationDataAttributes @@ -357,6 +380,12 @@ from fastly.model.relationship_common_name import RelationshipCommonName from fastly.model.relationship_customer import RelationshipCustomer from fastly.model.relationship_customer_customer import RelationshipCustomerCustomer +from fastly.model.relationship_default_ecdsa_tls_certificate import RelationshipDefaultEcdsaTlsCertificate +from fastly.model.relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate import RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate +from fastly.model.relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate_data import RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData +from fastly.model.relationship_default_tls_certificate import RelationshipDefaultTlsCertificate +from fastly.model.relationship_default_tls_certificate_default_certificate import RelationshipDefaultTlsCertificateDefaultCertificate +from fastly.model.relationship_default_tls_certificate_default_certificate_data import RelationshipDefaultTlsCertificateDefaultCertificateData from fastly.model.relationship_member_customer import RelationshipMemberCustomer from fastly.model.relationship_member_mutual_authentication import RelationshipMemberMutualAuthentication from fastly.model.relationship_member_service import RelationshipMemberService @@ -365,7 +394,6 @@ from fastly.model.relationship_member_tls_bulk_certificate import RelationshipMemberTlsBulkCertificate from fastly.model.relationship_member_tls_certificate import RelationshipMemberTlsCertificate from fastly.model.relationship_member_tls_configuration import RelationshipMemberTlsConfiguration -from fastly.model.relationship_member_tls_dns_record import RelationshipMemberTlsDnsRecord from fastly.model.relationship_member_tls_domain import RelationshipMemberTlsDomain from fastly.model.relationship_member_tls_private_key import RelationshipMemberTlsPrivateKey from fastly.model.relationship_member_tls_subscription import RelationshipMemberTlsSubscription @@ -401,9 +429,12 @@ from fastly.model.relationship_tls_configuration_tls_configuration import RelationshipTlsConfigurationTlsConfiguration from fastly.model.relationship_tls_configurations import RelationshipTlsConfigurations from fastly.model.relationship_tls_configurations_tls_configurations import RelationshipTlsConfigurationsTlsConfigurations -from fastly.model.relationship_tls_dns_record import RelationshipTlsDnsRecord -from fastly.model.relationship_tls_dns_record_dns_record import RelationshipTlsDnsRecordDnsRecord -from fastly.model.relationship_tls_dns_records import RelationshipTlsDnsRecords +from fastly.model.relationship_tls_dns_records_request import RelationshipTlsDnsRecordsRequest +from fastly.model.relationship_tls_dns_records_request_dns_records import RelationshipTlsDnsRecordsRequestDnsRecords +from fastly.model.relationship_tls_dns_records_request_dns_records_data import RelationshipTlsDnsRecordsRequestDnsRecordsData +from fastly.model.relationship_tls_dns_records_response import RelationshipTlsDnsRecordsResponse +from fastly.model.relationship_tls_dns_records_response_dns_records import RelationshipTlsDnsRecordsResponseDnsRecords +from fastly.model.relationship_tls_dns_records_response_dns_records_data import RelationshipTlsDnsRecordsResponseDnsRecordsData from fastly.model.relationship_tls_domain import RelationshipTlsDomain from fastly.model.relationship_tls_domain_tls_domain import RelationshipTlsDomainTlsDomain from fastly.model.relationship_tls_domains import RelationshipTlsDomains @@ -503,6 +534,11 @@ from fastly.model.service_response_all_of import ServiceResponseAllOf from fastly.model.service_version_detail import ServiceVersionDetail from fastly.model.service_version_detail_or_null import ServiceVersionDetailOrNull +from fastly.model.serviceusagemetric import Serviceusagemetric +from fastly.model.serviceusagemetrics import Serviceusagemetrics +from fastly.model.serviceusagemetrics_data import ServiceusagemetricsData +from fastly.model.serviceusagetype import Serviceusagetype +from fastly.model.serviceusagetypes import Serviceusagetypes from fastly.model.settings import Settings from fastly.model.settings_response import SettingsResponse from fastly.model.signing_key import SigningKey @@ -546,6 +582,7 @@ from fastly.model.tls_bulk_certificates_response import TlsBulkCertificatesResponse from fastly.model.tls_bulk_certificates_response_all_of import TlsBulkCertificatesResponseAllOf from fastly.model.tls_certificate import TlsCertificate +from fastly.model.tls_certificate_blob_response import TlsCertificateBlobResponse from fastly.model.tls_certificate_data import TlsCertificateData from fastly.model.tls_certificate_data_attributes import TlsCertificateDataAttributes from fastly.model.tls_certificate_response import TlsCertificateResponse @@ -634,6 +671,7 @@ from fastly.model.type_waf_tag import TypeWafTag from fastly.model.update_billing_address_request import UpdateBillingAddressRequest from fastly.model.update_billing_address_request_data import UpdateBillingAddressRequestData +from fastly.model.update_dashboard_request import UpdateDashboardRequest from fastly.model.user import User from fastly.model.user_response import UserResponse from fastly.model.user_response_read_only import UserResponseReadOnly diff --git a/setup.py b/setup.py index 6de65d5..61b5301 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from pathlib import Path NAME = "fastly" -VERSION = "5.5.0" +VERSION = "5.6.0" # To install the library, run the following # # python setup.py install diff --git a/sig.json b/sig.json index 6614774..713aa7d 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "5a2ccc65", "D": "f9e684d4"} +{"G": "01161630", "D": "e05af2db"}