diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ff1519..1e45732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,36 @@ # Changelog +## [v6.0.0](https://github.com/fastly/fastly-py/releases/tag/release/v6.0.0) (2024-12-05) + +**Breaking Changes:** + +- fix(udm-domains): Use v1 versioned HTTP endpoints for UDM domains +- fix(historical): Remove references to VCL on Compute metrics +- fix(realtime): Remove references to VCL on Compute metrics +- feat(billing-usage-metrics): Updated to v3 of the API + +**Bug fixes:** + +- fix(acls-in-compute): Corrected shape of `compute-acl-update` model. + +**Enhancements:** + +- feat(object-storage-access-keys): Added Object Storage Access Keys API +- feat(logging-grafanacloudlogs): Added Grafana Cloud Logs Loggin API +- feat(log-explorer): Added Log Explorer API +- feat(insights): Added Insights API +- feat(kv-store-item): Added `consistency` parameter to `get-keys` operation. +- feat(enabled-products): Added `mode` property to `set-configuration`. + +**Documentation:** + +- doc(observability-custom-dashboards): Fix bad link in custom dashboard documentation +- doc(observability-custom-dashboards): Reformat some enums to fix docs rendering +- doc(acls-in-compute): Corrections to descriptions of `compute-acl-lookup`, `compute-acl-list-entries`, + `compute-acl-update-entry`, and `compute-acl-update` structures +- doc(enabled-products): Added support for product ID `log_explorer_insights`. +- doc(enabled-products): Added support for product ID `ddos_protection`. + ## [v5.10.0](https://github.com/fastly/fastly-py/releases/tag/release/v5.10.0) (2024-10-23) **Bug fixes:** diff --git a/README.md b/README.md index 9c85f01..f677f3e 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ Class | Method | Description *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. +*BillingUsageMetricsApi* | [**get_usage_metrics**](docs/BillingUsageMetricsApi.md#get_usage_metrics) | Get monthly usage metrics *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 @@ -245,6 +245,7 @@ Class | Method | Description *IamUserGroupsApi* | [**update_a_user_group**](docs/IamUserGroupsApi.md#update_a_user_group) | Update a user group *ImageOptimizerDefaultSettingsApi* | [**get_default_settings**](docs/ImageOptimizerDefaultSettingsApi.md#get_default_settings) | Get current Image Optimizer Default Settings *ImageOptimizerDefaultSettingsApi* | [**update_default_settings**](docs/ImageOptimizerDefaultSettingsApi.md#update_default_settings) | Update Image Optimizer Default Settings +*InsightsApi* | [**get_log_insights**](docs/InsightsApi.md#get_log_insights) | Retrieve log insights *InvitationsApi* | [**create_invitation**](docs/InvitationsApi.md#create_invitation) | Create an invitation *InvitationsApi* | [**delete_invitation**](docs/InvitationsApi.md#delete_invitation) | Delete an invitation *InvitationsApi* | [**list_invitations**](docs/InvitationsApi.md#list_invitations) | List invitations @@ -284,6 +285,7 @@ Class | Method | Description *LegacyWafTagApi* | [**list_legacy_waf_tags**](docs/LegacyWafTagApi.md#list_legacy_waf_tags) | List WAF tags *LegacyWafUpdateStatusApi* | [**get_waf_update_status**](docs/LegacyWafUpdateStatusApi.md#get_waf_update_status) | Get the status of a WAF update *LegacyWafUpdateStatusApi* | [**list_waf_update_statuses**](docs/LegacyWafUpdateStatusApi.md#list_waf_update_statuses) | List update statuses +*LogExplorerApi* | [**get_log_records**](docs/LogExplorerApi.md#get_log_records) | Retrieve log records *LoggingAzureblobApi* | [**create_log_azure**](docs/LoggingAzureblobApi.md#create_log_azure) | Create an Azure Blob Storage log endpoint *LoggingAzureblobApi* | [**delete_log_azure**](docs/LoggingAzureblobApi.md#delete_log_azure) | Delete the Azure Blob Storage log endpoint *LoggingAzureblobApi* | [**get_log_azure**](docs/LoggingAzureblobApi.md#get_log_azure) | Get an Azure Blob Storage log endpoint @@ -324,6 +326,11 @@ Class | Method | Description *LoggingGcsApi* | [**get_log_gcs**](docs/LoggingGcsApi.md#get_log_gcs) | Get a GCS log endpoint *LoggingGcsApi* | [**list_log_gcs**](docs/LoggingGcsApi.md#list_log_gcs) | List GCS log endpoints *LoggingGcsApi* | [**update_log_gcs**](docs/LoggingGcsApi.md#update_log_gcs) | Update a GCS log endpoint +*LoggingGrafanacloudlogsApi* | [**create_log_grafanacloudlogs**](docs/LoggingGrafanacloudlogsApi.md#create_log_grafanacloudlogs) | Create a Grafana Cloud Logs log endpoint +*LoggingGrafanacloudlogsApi* | [**delete_log_grafanacloudlogs**](docs/LoggingGrafanacloudlogsApi.md#delete_log_grafanacloudlogs) | Delete the Grafana Cloud Logs log endpoint +*LoggingGrafanacloudlogsApi* | [**get_log_grafanacloudlogs**](docs/LoggingGrafanacloudlogsApi.md#get_log_grafanacloudlogs) | Get a Grafana Cloud Logs log endpoint +*LoggingGrafanacloudlogsApi* | [**list_log_grafanacloudlogs**](docs/LoggingGrafanacloudlogsApi.md#list_log_grafanacloudlogs) | List Grafana Cloud Logs log endpoints +*LoggingGrafanacloudlogsApi* | [**update_log_grafanacloudlogs**](docs/LoggingGrafanacloudlogsApi.md#update_log_grafanacloudlogs) | Update a Grafana Cloud Logs log endpoint *LoggingHerokuApi* | [**create_log_heroku**](docs/LoggingHerokuApi.md#create_log_heroku) | Create a Heroku log endpoint *LoggingHerokuApi* | [**delete_log_heroku**](docs/LoggingHerokuApi.md#delete_log_heroku) | Delete the Heroku log endpoint *LoggingHerokuApi* | [**get_log_heroku**](docs/LoggingHerokuApi.md#get_log_heroku) | Get a Heroku log endpoint @@ -424,6 +431,10 @@ 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 +*ObjectStorageAccessKeysApi* | [**create_access_key**](docs/ObjectStorageAccessKeysApi.md#create_access_key) | Create an access key +*ObjectStorageAccessKeysApi* | [**delete_access_key**](docs/ObjectStorageAccessKeysApi.md#delete_access_key) | Delete an access key +*ObjectStorageAccessKeysApi* | [**get_access_key**](docs/ObjectStorageAccessKeysApi.md#get_access_key) | Get an access key +*ObjectStorageAccessKeysApi* | [**list_access_keys**](docs/ObjectStorageAccessKeysApi.md#list_access_keys) | List access keys *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 @@ -632,8 +643,8 @@ The fastly-py API client currently does not support the following endpoints: - [`/alerts/history`](https://www.fastly.com/documentation/reference/api/observability/alerts/history) (GET) - [`/dns/configurations/{dns_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/dns/configurations`](https://www.fastly.com/documentation/reference/api/) (GET, POST) -- [`/domains/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) -- [`/domains`](https://www.fastly.com/documentation/reference/api/) (GET, POST) +- [`/domains/v1/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) +- [`/domains/v1`](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) diff --git a/docs/AccessKey.md b/docs/AccessKey.md new file mode 100644 index 0000000..9b2a91b --- /dev/null +++ b/docs/AccessKey.md @@ -0,0 +1,14 @@ +# AccessKey + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | A description of the access key. | +**permission** | **str** | The permissions granted to an access key. | +**buckets** | **[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/AccessKeyResponse.md b/docs/AccessKeyResponse.md new file mode 100644 index 0000000..ff10fe5 --- /dev/null +++ b/docs/AccessKeyResponse.md @@ -0,0 +1,17 @@ +# AccessKeyResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_key** | **str** | Generated access key. | [optional] +**secret_key** | **str** | Generated secret key. | [optional] +**description** | **str** | Description for the access key. | [optional] +**permission** | **str** | Permissions granted to an access key. | [optional] +**buckets** | **[str]** | | [optional] +**created_at** | **datetime, none_type** | Date and time in ISO 8601 format. | [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/AclsInComputeApi.md b/docs/AclsInComputeApi.md index 0d3eb5e..ef4f38a 100644 --- a/docs/AclsInComputeApi.md +++ b/docs/AclsInComputeApi.md @@ -536,13 +536,15 @@ with fastly.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = acls_in_compute_api.AclsInComputeApi(api_client) acl_id = "acl_id_example" # str | - compute_acl_update = ComputeAclUpdate([ - ComputeAclUpdateEntry( - op="op_example", - prefix="prefix_example", - action="action_example", - ), - ]) # ComputeAclUpdate | (optional) + compute_acl_update = ComputeAclUpdate( + entries=[ + ComputeAclUpdateEntry( + op="op_example", + prefix="prefix_example", + action="action_example", + ), + ], + ) # ComputeAclUpdate | (optional) # example passing only required values which don't have defaults set try: diff --git a/docs/BillingUsageMetricsApi.md b/docs/BillingUsageMetricsApi.md index 2c65582..edf7387 100644 --- a/docs/BillingUsageMetricsApi.md +++ b/docs/BillingUsageMetricsApi.md @@ -5,12 +5,12 @@ 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**](BillingUsageMetricsApi.md#get_service_level_usage) | **GET** /billing/v3/service-usage-metrics | Retrieve service-level usage metrics for a product. +[**get_usage_metrics**](BillingUsageMetricsApi.md#get_usage_metrics) | **GET** /billing/v3/usage-metrics | Get monthly usage metrics # **get_service_level_usage** -> Serviceusagemetrics get_service_level_usage(customer_id, product_id, usage_type_name, time_granularity) +> Serviceusagemetrics get_service_level_usage(product_id, usage_type_name) Retrieve service-level usage metrics for a product. @@ -48,12 +48,8 @@ configuration.api_key['token'] = 'YOUR_API_KEY' 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" @@ -62,7 +58,7 @@ with fastly.ApiClient(configuration) as api_client: # 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) + api_response = api_instance.get_service_level_usage(product_id, usage_type_name) pprint(api_response) except fastly.ApiException as e: print("Exception when calling BillingUsageMetricsApi->get_service_level_usage: %s\n" % e) @@ -71,7 +67,7 @@ with fastly.ApiClient(configuration) as api_client: # 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) + api_response = api_instance.get_service_level_usage(product_id, usage_type_name, 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) @@ -82,12 +78,8 @@ with fastly.ApiClient(configuration) as api_client: 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" @@ -118,12 +110,12 @@ 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_service_level_usage_types** -> Serviceusagetypes get_service_level_usage_types(customer_id) +# **get_usage_metrics** +> Usagemetric get_usage_metrics() -Retrieve product usage types for a customer. +Get monthly usage metrics -Returns product usage types reported by the customer's services. +Returns monthly usage metrics for customer by product. ### Example @@ -134,7 +126,7 @@ 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 fastly.model.usagemetric import Usagemetric 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,15 +149,17 @@ configuration.api_key['token'] = 'YOUR_API_KEY' 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. + start_month = "2023-01" # str | (optional) + end_month = "2023-03" # str | (optional) # example passing only required values which don't have defaults set + # and optional values try: - # Retrieve product usage types for a customer. - api_response = api_instance.get_service_level_usage_types(customer_id) + # Get monthly usage metrics + api_response = api_instance.get_usage_metrics(start_month=start_month, end_month=end_month) pprint(api_response) except fastly.ApiException as e: - print("Exception when calling BillingUsageMetricsApi->get_service_level_usage_types: %s\n" % e) + print("Exception when calling BillingUsageMetricsApi->get_usage_metrics: %s\n" % e) ``` @@ -173,11 +167,12 @@ with fastly.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **customer_id** | **str**| Alphanumeric string identifying the customer. | + **start_month** | **str**| | [optional] + **end_month** | **str**| | [optional] ### Return type -[**Serviceusagetypes**](Serviceusagetypes.md) +[**Usagemetric**](Usagemetric.md) ### Authorization @@ -193,7 +188,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A response containing usage elements. | - | +**200** | A response containing usage metric elements. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | diff --git a/docs/ComputeAclListEntries.md b/docs/ComputeAclListEntries.md index f40ac64..2273c2f 100644 --- a/docs/ComputeAclListEntries.md +++ b/docs/ComputeAclListEntries.md @@ -1,6 +1,6 @@ # ComputeAclListEntries -An example of an ACL List Response. +Defines the structure of what the ACL List endpoint returns. ## Properties Name | Type | Description | Notes diff --git a/docs/ComputeAclLookup.md b/docs/ComputeAclLookup.md index ff0d9fb..b32e9f4 100644 --- a/docs/ComputeAclLookup.md +++ b/docs/ComputeAclLookup.md @@ -1,6 +1,6 @@ # ComputeAclLookup -An example of an ACL Lookup response. +Defines the structure of an ACL Lookup response. ## Properties Name | Type | Description | Notes diff --git a/docs/ComputeAclUpdate.md b/docs/ComputeAclUpdate.md index c154739..2da27d3 100644 --- a/docs/ComputeAclUpdate.md +++ b/docs/ComputeAclUpdate.md @@ -1,11 +1,12 @@ # ComputeAclUpdate -An example of an ACL update request. +Defines the structure of an ACL update request array. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | [**[ComputeAclUpdateEntry]**](ComputeAclUpdateEntry.md) | An example of an ACL update request. | +**entries** | [**[ComputeAclUpdateEntry]**](ComputeAclUpdateEntry.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/ComputeAclUpdateEntry.md b/docs/ComputeAclUpdateEntry.md index 5b4414a..9350959 100644 --- a/docs/ComputeAclUpdateEntry.md +++ b/docs/ComputeAclUpdateEntry.md @@ -1,6 +1,6 @@ # ComputeAclUpdateEntry -An example of an ACL update request entry. +Defines the structure of an ACL update request entry. ## Properties Name | Type | Description | Notes diff --git a/docs/DimensionAttributesCountryStats.md b/docs/DimensionAttributesCountryStats.md new file mode 100644 index 0000000..fc3569c --- /dev/null +++ b/docs/DimensionAttributesCountryStats.md @@ -0,0 +1,14 @@ +# DimensionAttributesCountryStats + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country_chr** | **float** | The cache hit ratio for the country. | [optional] +**country_error_rate** | **float** | The error rate for the country. | [optional] +**country_request_rate** | **float** | This country's percentage of the total requests. | [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/DimensionAttributesRate.md b/docs/DimensionAttributesRate.md new file mode 100644 index 0000000..58fbdd5 --- /dev/null +++ b/docs/DimensionAttributesRate.md @@ -0,0 +1,12 @@ +# DimensionAttributesRate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rate** | **float** | The rate at which the value in the current dimension occurs. | [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/DimensionBrowser.md b/docs/DimensionBrowser.md new file mode 100644 index 0000000..708a437 --- /dev/null +++ b/docs/DimensionBrowser.md @@ -0,0 +1,12 @@ +# DimensionBrowser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**browser** | **str** | The client's browser for this dimension. | [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/DimensionContentType.md b/docs/DimensionContentType.md new file mode 100644 index 0000000..0def902 --- /dev/null +++ b/docs/DimensionContentType.md @@ -0,0 +1,12 @@ +# DimensionContentType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_type** | **str** | The content type of the response for this dimension. | [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/DimensionCountry.md b/docs/DimensionCountry.md new file mode 100644 index 0000000..55f21b9 --- /dev/null +++ b/docs/DimensionCountry.md @@ -0,0 +1,12 @@ +# DimensionCountry + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | **str** | The client's country for this dimension. | [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/DimensionDevice.md b/docs/DimensionDevice.md new file mode 100644 index 0000000..9247d6d --- /dev/null +++ b/docs/DimensionDevice.md @@ -0,0 +1,12 @@ +# DimensionDevice + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device** | **str** | The client's device type for this dimension. | [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/DimensionOs.md b/docs/DimensionOs.md new file mode 100644 index 0000000..29589f6 --- /dev/null +++ b/docs/DimensionOs.md @@ -0,0 +1,12 @@ +# DimensionOs + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**os** | **str** | The client's operating system for this dimension. | [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/DimensionResponse.md b/docs/DimensionResponse.md new file mode 100644 index 0000000..29e980a --- /dev/null +++ b/docs/DimensionResponse.md @@ -0,0 +1,12 @@ +# DimensionResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | **str** | The HTTP reason phrase for this dimension. | [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/DimensionStatusCode.md b/docs/DimensionStatusCode.md new file mode 100644 index 0000000..139e70a --- /dev/null +++ b/docs/DimensionStatusCode.md @@ -0,0 +1,12 @@ +# DimensionStatusCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status_code** | **str** | The HTTP response code for this dimension. | [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/DimensionUrl.md b/docs/DimensionUrl.md new file mode 100644 index 0000000..f7c56ad --- /dev/null +++ b/docs/DimensionUrl.md @@ -0,0 +1,12 @@ +# DimensionUrl + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The URL path for this dimension. | [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/EnabledProductsApi.md b/docs/EnabledProductsApi.md index ed3d0c5..6b19410 100644 --- a/docs/EnabledProductsApi.md +++ b/docs/EnabledProductsApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description Disable a product -Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. +Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`. ### Example @@ -95,7 +95,7 @@ void (empty response body) Enable a product -Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. +Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`. ### Example @@ -189,7 +189,7 @@ Name | Type | Description | Notes Get enabled product -Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. +Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`. ### Example @@ -269,7 +269,7 @@ Name | Type | Description | Notes Get configuration for a product -Get configuration for an enabled product on a service. Supported product IDs: `ngwaf`. +Get configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`. ### Example @@ -349,7 +349,7 @@ Name | Type | Description | Notes Update configuration for a product -Update configuration for an enabled product on a service. Supported product IDs: `ngwaf`. +Update configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`. ### Example @@ -388,6 +388,7 @@ with fastly.ApiClient(configuration) as api_client: set_configuration = SetConfiguration( workspace_id="workspace_id_example", traffic_ramp="traffic_ramp_example", + mode="mode_example", ) # SetConfiguration | (optional) # example passing only required values which don't have defaults set diff --git a/docs/FilterFieldItem.md b/docs/FilterFieldItem.md new file mode 100644 index 0000000..056171d --- /dev/null +++ b/docs/FilterFieldItem.md @@ -0,0 +1,15 @@ +# FilterFieldItem + +A filtering parameter. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **str** | The log field to which this filter should be applied. | [optional] +**operator** | **str** | The comparison operator used for this filter. | [optional] +**value** | [**ValueField**](ValueField.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/GetLogInsightsResponse.md b/docs/GetLogInsightsResponse.md new file mode 100644 index 0000000..7ce768d --- /dev/null +++ b/docs/GetLogInsightsResponse.md @@ -0,0 +1,13 @@ +# GetLogInsightsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[LogInsights]**](LogInsights.md) | | [optional] +**meta** | [**LogInsightsMeta**](LogInsightsMeta.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/GetLogRecordsResponse.md b/docs/GetLogRecordsResponse.md new file mode 100644 index 0000000..a7a4817 --- /dev/null +++ b/docs/GetLogRecordsResponse.md @@ -0,0 +1,13 @@ +# GetLogRecordsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[LogRecord]**](LogRecord.md) | | [optional] +**meta** | [**GetLogRecordsResponseMeta**](GetLogRecordsResponseMeta.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/GetLogRecordsResponseMeta.md b/docs/GetLogRecordsResponseMeta.md new file mode 100644 index 0000000..88d6b38 --- /dev/null +++ b/docs/GetLogRecordsResponseMeta.md @@ -0,0 +1,12 @@ +# GetLogRecordsResponseMeta + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filters** | [**GetLogRecordsResponseMetaFilters**](GetLogRecordsResponseMetaFilters.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/GetLogRecordsResponseMetaFilters.md b/docs/GetLogRecordsResponseMetaFilters.md new file mode 100644 index 0000000..84dff2d --- /dev/null +++ b/docs/GetLogRecordsResponseMetaFilters.md @@ -0,0 +1,19 @@ +# GetLogRecordsResponseMetaFilters + +Echoes the filters that were supplied in the request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service_id** | **str** | Specifies the ID of the service for which data should be returned. | [optional] +**start** | **str** | Start time for the query as supplied in the request. | [optional] +**end** | **str** | End time for the query as supplied in the request. | [optional] +**domain_exact_match** | **bool** | Value of the `domain_exact_match` filter as supplied in the request. | [optional] +**limit** | [**MetaPerPage**](MetaPerPage.md) | | [optional] +**next_cursor** | **str, none_type** | A cursor to specify the next page of results, if any. | [optional] +**filter_fields** | [**[FilterFieldItem], none_type**](FilterFieldItem.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/InsightsApi.md b/docs/InsightsApi.md new file mode 100644 index 0000000..7672662 --- /dev/null +++ b/docs/InsightsApi.md @@ -0,0 +1,111 @@ +# fastly.InsightsApi + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log_insights**](InsightsApi.md#get_log_insights) | **GET** /observability/log-insights | Retrieve log insights + + +# **get_log_insights** +> GetLogInsightsResponse get_log_insights(visualization, service_id, start, end) + +Retrieve log insights + +Retrieves statistics from sampled log records. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import insights_api +from fastly.model.get_log_insights_response import GetLogInsightsResponse +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 = insights_api.InsightsApi(api_client) + visualization = "top-url-by-bandwidth" # str | + service_id = "service_id_example" # str | + start = "start_example" # str | + end = "end_example" # str | + pops = "pops_example" # str | (optional) + domain = "domain_example" # str | (optional) + domain_exact_match = True # bool | (optional) + limit = 3.14 # float | (optional) + + # example passing only required values which don't have defaults set + try: + # Retrieve log insights + api_response = api_instance.get_log_insights(visualization, service_id, start, end) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling InsightsApi->get_log_insights: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Retrieve log insights + api_response = api_instance.get_log_insights(visualization, service_id, start, end, pops=pops, domain=domain, domain_exact_match=domain_exact_match, limit=limit) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling InsightsApi->get_log_insights: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **visualization** | **str**| | + **service_id** | **str**| | + **start** | **str**| | + **end** | **str**| | + **pops** | **str**| | [optional] + **domain** | **str**| | [optional] + **domain_exact_match** | **bool**| | [optional] + **limit** | **float**| | [optional] + +### Return type + +[**GetLogInsightsResponse**](GetLogInsightsResponse.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** | Retrieves log insights for the specified service and visualization. | - | + +[[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/KvStoreItemApi.md b/docs/KvStoreItemApi.md index 51dcfa2..a7ce191 100644 --- a/docs/KvStoreItemApi.md +++ b/docs/KvStoreItemApi.md @@ -131,6 +131,7 @@ with fastly.ApiClient(configuration) as api_client: cursor = "cursor_example" # str | (optional) limit = 100 # int | (optional) if omitted the server will use the default value of 100 prefix = "prefix_example" # str | (optional) + consistency = "consistency_example" # str | (optional) # example passing only required values which don't have defaults set try: @@ -144,7 +145,7 @@ with fastly.ApiClient(configuration) as api_client: # and optional values try: # List kv store keys. - api_response = api_instance.get_keys(store_id, cursor=cursor, limit=limit, prefix=prefix) + api_response = api_instance.get_keys(store_id, cursor=cursor, limit=limit, prefix=prefix, consistency=consistency) pprint(api_response) except fastly.ApiException as e: print("Exception when calling KvStoreItemApi->get_keys: %s\n" % e) @@ -159,6 +160,7 @@ Name | Type | Description | Notes **cursor** | **str**| | [optional] **limit** | **int**| | [optional] if omitted the server will use the default value of 100 **prefix** | **str**| | [optional] + **consistency** | **str**| | [optional] ### Return type diff --git a/docs/LogExplorerApi.md b/docs/LogExplorerApi.md new file mode 100644 index 0000000..2c05ac2 --- /dev/null +++ b/docs/LogExplorerApi.md @@ -0,0 +1,107 @@ +# fastly.LogExplorerApi + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log_records**](LogExplorerApi.md#get_log_records) | **GET** /observability/log-explorer | Retrieve log records + + +# **get_log_records** +> GetLogRecordsResponse get_log_records(service_id, start, end) + +Retrieve log records + +Retrieves log records. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import log_explorer_api +from fastly.model.get_log_records_response import GetLogRecordsResponse +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 = log_explorer_api.LogExplorerApi(api_client) + service_id = "service_id_example" # str | + start = "start_example" # str | + end = "end_example" # str | + limit = 3.14 # float | (optional) + next_cursor = "next_cursor_example" # str | (optional) + filter = "filter_example" # str | (optional) + + # example passing only required values which don't have defaults set + try: + # Retrieve log records + api_response = api_instance.get_log_records(service_id, start, end) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LogExplorerApi->get_log_records: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Retrieve log records + api_response = api_instance.get_log_records(service_id, start, end, limit=limit, next_cursor=next_cursor, filter=filter) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LogExplorerApi->get_log_records: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| | + **start** | **str**| | + **end** | **str**| | + **limit** | **float**| | [optional] + **next_cursor** | **str**| | [optional] + **filter** | **str**| | [optional] + +### Return type + +[**GetLogRecordsResponse**](GetLogRecordsResponse.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** | Retrieves log records. | - | + +[[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/LogInsights.md b/docs/LogInsights.md new file mode 100644 index 0000000..c8c96b4 --- /dev/null +++ b/docs/LogInsights.md @@ -0,0 +1,14 @@ +# LogInsights + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensions** | [**LogInsightsDimensions**](LogInsightsDimensions.md) | | [optional] +**dimension_attributes** | [**LogInsightsDimensionAttributes**](LogInsightsDimensionAttributes.md) | | [optional] +**values** | [**LogInsightsValues**](LogInsightsValues.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/LogInsightsDimensionAttributes.md b/docs/LogInsightsDimensionAttributes.md new file mode 100644 index 0000000..921c7c9 --- /dev/null +++ b/docs/LogInsightsDimensionAttributes.md @@ -0,0 +1,15 @@ +# LogInsightsDimensionAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rate** | **float** | The rate at which the value in the current dimension occurs. | [optional] +**country_chr** | **float** | The cache hit ratio for the country. | [optional] +**country_error_rate** | **float** | The error rate for the country. | [optional] +**country_request_rate** | **float** | This country's percentage of the total requests. | [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/LogInsightsDimensions.md b/docs/LogInsightsDimensions.md new file mode 100644 index 0000000..1f6e66f --- /dev/null +++ b/docs/LogInsightsDimensions.md @@ -0,0 +1,19 @@ +# LogInsightsDimensions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The URL path for this dimension. | [optional] +**country** | **str** | The client's country for this dimension. | [optional] +**status_code** | **str** | The HTTP response code for this dimension. | [optional] +**response** | **str** | The HTTP reason phrase for this dimension. | [optional] +**browser** | **str** | The client's browser for this dimension. | [optional] +**content_type** | **str** | The content type of the response for this dimension. | [optional] +**device** | **str** | The client's device type for this dimension. | [optional] +**os** | **str** | The client's operating system for this dimension. | [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/LogInsightsMeta.md b/docs/LogInsightsMeta.md new file mode 100644 index 0000000..ded8dc1 --- /dev/null +++ b/docs/LogInsightsMeta.md @@ -0,0 +1,13 @@ +# LogInsightsMeta + +Echoes the filters that were supplied in the request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filters** | [**LogInsightsMetaFilter**](LogInsightsMetaFilter.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/LogInsightsMetaFilter.md b/docs/LogInsightsMetaFilter.md new file mode 100644 index 0000000..536bb1d --- /dev/null +++ b/docs/LogInsightsMetaFilter.md @@ -0,0 +1,17 @@ +# LogInsightsMetaFilter + +The filters that were supplied in the request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service_id** | **str** | Specifies the ID of the service for which data should be returned. | [optional] +**start** | **str** | Start time for the query as supplied in the request. | [optional] +**end** | **str** | End time for the query as supplied in the request. | [optional] +**domain_exact_match** | **bool** | Value of the `domain_exact_match` filter as supplied in the request. | [optional] +**limit** | [**MetaPerPage**](MetaPerPage.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/LogInsightsValues.md b/docs/LogInsightsValues.md new file mode 100644 index 0000000..bc426db --- /dev/null +++ b/docs/LogInsightsValues.md @@ -0,0 +1,28 @@ +# LogInsightsValues + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cache_hit_ratio** | **float** | The cache hit ratio for the URL specified in the dimension. | [optional] +**region** | **str** | The client's country subdivision code as defined by ISO 3166-2. | [optional] +**region_chr** | **float** | The cache hit ratio for the region. | [optional] +**region_error_rate** | **float** | The error rate for the region. | [optional] +**url** | **str** | The HTTP request path. | [optional] +**rate_per_status** | **float** | The URL accounts for this percentage of the status code in this dimension. | [optional] +**rate_per_url** | **float** | The rate at which the reason in this dimension occurs among responses to this URL with a 503 status code. | [optional] +**_503_rate_per_url** | **float** | The rate at which 503 status codes are returned for this URL. | [optional] +**browser_version** | **str** | The version of the client's browser. | [optional] +**rate** | **float** | The percentage of requests matching the value in the current dimension. | [optional] +**average_bandwidth_bytes** | **float** | The average bandwidth in bytes for responses to requests to the URL in the current dimension. | [optional] +**bandwidth_percentage** | **float** | The total bandwidth percentage for all responses to requests to the URL in the current dimension. | [optional] +**average_response_time** | **float** | The average time in seconds to respond to requests to the URL in the current dimension. | [optional] +**p95_response_time** | **float** | The P95 time in seconds to respond to requests to the URL in the current dimension. | [optional] +**response_time_percentage** | **float** | The total percentage of time to respond to all requests to the URL in the current dimension. | [optional] +**miss_rate** | **float** | The miss rate for requests to the URL in the current dimension. | [optional] +**request_percentage** | **float** | The percentage of all requests made to the URL in the current dimension. | [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/LogPropertyServiceId.md b/docs/LogPropertyServiceId.md new file mode 100644 index 0000000..aa30d72 --- /dev/null +++ b/docs/LogPropertyServiceId.md @@ -0,0 +1,12 @@ +# LogPropertyServiceId + +The ID of the service that received the request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/LogRecord.md b/docs/LogRecord.md new file mode 100644 index 0000000..5d5cfe6 --- /dev/null +++ b/docs/LogRecord.md @@ -0,0 +1,39 @@ +# LogRecord + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | The ID of the Fastly customer that owns the service. | [optional] [readonly] +**service_id** | [**LogPropertyServiceId**](LogPropertyServiceId.md) | | [optional] +**timestamp** | **datetime** | Timestamp of the request in ISO 8601 format. | [optional] +**client_as_number** | **int** | The autonomous system (AS) number of the client. | [optional] [readonly] +**client_region** | **str** | The client's country subdivision code as found in ISO 3166-2. | [optional] [readonly] +**client_country_code** | **str** | The two-letter ISO 3166-1 country code for the client. | [optional] [readonly] +**client_os_name** | **str** | The name of the operating system installed on the client device. | [optional] [readonly] +**client_device_type** | **str** | The type of the client's device. | [optional] [readonly] +**client_browser_name** | **str** | The name of the browser in use on the client device. | [optional] [readonly] +**client_browser_version** | **str** | The version of the browser in use on client device. | [optional] [readonly] +**fastly_pop** | **str** | The name of the Fastly POP that served this request. | [optional] [readonly] +**origin_host** | **str** | The name of the origin host that served this request. | [optional] [readonly] +**request_protocol** | **str** | HTTP protocol version in use for this request. For example, HTTP/1.1. | [optional] [readonly] +**request_host** | **str** | The name of the request host used for this request. | [optional] [readonly] +**request_path** | **str** | The URL path supplied for this request. | [optional] [readonly] +**request_method** | **str** | HTTP method sent by the client such as \"GET\" or \"POST\". | [optional] [readonly] +**response_bytes_body** | **int** | Body bytes sent to the client in the response. | [optional] [readonly] +**response_bytes_header** | **int** | Header bytes sent to the client in the response. | [optional] [readonly] +**response_content_length** | **int** | Total bytes sent to the client in the response. | [optional] [readonly] +**response_content_type** | **str** | The content type of the response sent to the client. | [optional] [readonly] +**response_reason** | **str** | The HTTP reason phrase returned for this request, if any. | [optional] [readonly] +**response_state** | **str** | The state of the request with optional suffixes describing special cases. | [optional] [readonly] +**response_status** | **int** | The HTTP response code returned for this request. | [optional] [readonly] +**response_time** | **float** | The time since the request started in seconds. | [optional] [readonly] +**response_x_cache** | **str** | Indicates whether the request was a HIT or a MISS. | [optional] [readonly] +**is_cache_hit** | **bool** | Indicates whether this request was fulfilled from cache. | [optional] [readonly] +**is_edge** | **bool** | Indicates whether the request was handled by a Fastly edge POP. | [optional] [readonly] +**is_shield** | **bool** | Indicates whether the request was handled by a Fastly shield POP. | [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/LoggingGrafanacloudlogsAdditional.md b/docs/LoggingGrafanacloudlogsAdditional.md new file mode 100644 index 0000000..ef60cec --- /dev/null +++ b/docs/LoggingGrafanacloudlogsAdditional.md @@ -0,0 +1,16 @@ +# LoggingGrafanacloudlogsAdditional + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **str** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] +**user** | **str** | The Grafana Cloud Logs Dataset you want to log to. | [optional] +**url** | **str** | The URL of the Loki instance in your Grafana stack. | [optional] +**token** | **str** | The Grafana Access Policy token with `logs:write` access scoped to your Loki instance. | [optional] +**index** | **str** | The Stream Labels, a JSON string used to identify the stream. | [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/LoggingGrafanacloudlogsApi.md b/docs/LoggingGrafanacloudlogsApi.md new file mode 100644 index 0000000..dcf1da4 --- /dev/null +++ b/docs/LoggingGrafanacloudlogsApi.md @@ -0,0 +1,474 @@ +# fastly.LoggingGrafanacloudlogsApi + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_log_grafanacloudlogs**](LoggingGrafanacloudlogsApi.md#create_log_grafanacloudlogs) | **POST** /service/{service_id}/version/{version_id}/logging/grafanacloudlogs | Create a Grafana Cloud Logs log endpoint +[**delete_log_grafanacloudlogs**](LoggingGrafanacloudlogsApi.md#delete_log_grafanacloudlogs) | **DELETE** /service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name} | Delete the Grafana Cloud Logs log endpoint +[**get_log_grafanacloudlogs**](LoggingGrafanacloudlogsApi.md#get_log_grafanacloudlogs) | **GET** /service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name} | Get a Grafana Cloud Logs log endpoint +[**list_log_grafanacloudlogs**](LoggingGrafanacloudlogsApi.md#list_log_grafanacloudlogs) | **GET** /service/{service_id}/version/{version_id}/logging/grafanacloudlogs | List Grafana Cloud Logs log endpoints +[**update_log_grafanacloudlogs**](LoggingGrafanacloudlogsApi.md#update_log_grafanacloudlogs) | **PUT** /service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name} | Update a Grafana Cloud Logs log endpoint + + +# **create_log_grafanacloudlogs** +> LoggingGrafanacloudlogsResponse create_log_grafanacloudlogs(service_id, version_id) + +Create a Grafana Cloud Logs log endpoint + +Create a Grafana Cloud Logs logging object for a particular service and version. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_grafanacloudlogs_api +from fastly.model.logging_grafanacloudlogs_response import LoggingGrafanacloudlogsResponse +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 = logging_grafanacloudlogs_api.LoggingGrafanacloudlogsApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + name = "test-log-endpoint" # str | The name for the real-time logging configuration. (optional) + placement = "none" # str, none_type | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) + response_condition = "response_condition_example" # str, none_type | The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) + format = "format_example" # str | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + format_version = 2 # int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional) if omitted the server will use the default value of 2 + user = "user_example" # str | The Grafana Cloud Logs Dataset you want to log to. (optional) + url = "url_example" # str | The URL of the Loki instance in your Grafana stack. (optional) + token = "token_example" # str | The Grafana Access Policy token with `logs:write` access scoped to your Loki instance. (optional) + index = "index_example" # str | The Stream Labels, a JSON string used to identify the stream. (optional) + + # example passing only required values which don't have defaults set + try: + # Create a Grafana Cloud Logs log endpoint + api_response = api_instance.create_log_grafanacloudlogs(service_id, version_id) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingGrafanacloudlogsApi->create_log_grafanacloudlogs: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create a Grafana Cloud Logs log endpoint + api_response = api_instance.create_log_grafanacloudlogs(service_id, version_id, name=name, placement=placement, response_condition=response_condition, format=format, format_version=format_version, user=user, url=url, token=token, index=index) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingGrafanacloudlogsApi->create_log_grafanacloudlogs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **name** | **str**| The name for the real-time logging configuration. | [optional] + **placement** | **str, none_type**| Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] + **response_condition** | **str, none_type**| The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] + **format** | **str**| A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] + **format_version** | **int**| The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] if omitted the server will use the default value of 2 + **user** | **str**| The Grafana Cloud Logs Dataset you want to log to. | [optional] + **url** | **str**| The URL of the Loki instance in your Grafana stack. | [optional] + **token** | **str**| The Grafana Access Policy token with `logs:write` access scoped to your Loki instance. | [optional] + **index** | **str**| The Stream Labels, a JSON string used to identify the stream. | [optional] + +### Return type + +[**LoggingGrafanacloudlogsResponse**](LoggingGrafanacloudlogsResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/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) + +# **delete_log_grafanacloudlogs** +> InlineResponse200 delete_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name) + +Delete the Grafana Cloud Logs log endpoint + +Delete the Grafana Cloud Logs logging object for a particular service and version. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_grafanacloudlogs_api +from fastly.model.inline_response200 import InlineResponse200 +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 = logging_grafanacloudlogs_api.LoggingGrafanacloudlogsApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + logging_grafanacloudlogs_name = "test-log-endpoint" # str | The name for the real-time logging configuration. + + # example passing only required values which don't have defaults set + try: + # Delete the Grafana Cloud Logs log endpoint + api_response = api_instance.delete_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingGrafanacloudlogsApi->delete_log_grafanacloudlogs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **logging_grafanacloudlogs_name** | **str**| The name for the real-time logging configuration. | + +### Return type + +[**InlineResponse200**](InlineResponse200.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 | - | + +[[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_log_grafanacloudlogs** +> LoggingGrafanacloudlogsResponse get_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name) + +Get a Grafana Cloud Logs log endpoint + +Get the details of a Grafana Cloud Logs logging object for a particular service and version. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_grafanacloudlogs_api +from fastly.model.logging_grafanacloudlogs_response import LoggingGrafanacloudlogsResponse +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 = logging_grafanacloudlogs_api.LoggingGrafanacloudlogsApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + logging_grafanacloudlogs_name = "test-log-endpoint" # str | The name for the real-time logging configuration. + + # example passing only required values which don't have defaults set + try: + # Get a Grafana Cloud Logs log endpoint + api_response = api_instance.get_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingGrafanacloudlogsApi->get_log_grafanacloudlogs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **logging_grafanacloudlogs_name** | **str**| The name for the real-time logging configuration. | + +### Return type + +[**LoggingGrafanacloudlogsResponse**](LoggingGrafanacloudlogsResponse.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 | - | + +[[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_log_grafanacloudlogs** +> [LoggingGrafanacloudlogsResponse] list_log_grafanacloudlogs(service_id, version_id) + +List Grafana Cloud Logs log endpoints + +List all of the Grafana Cloud Logs logging objects for a particular service and version. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_grafanacloudlogs_api +from fastly.model.logging_grafanacloudlogs_response import LoggingGrafanacloudlogsResponse +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 = logging_grafanacloudlogs_api.LoggingGrafanacloudlogsApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + + # example passing only required values which don't have defaults set + try: + # List Grafana Cloud Logs log endpoints + api_response = api_instance.list_log_grafanacloudlogs(service_id, version_id) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingGrafanacloudlogsApi->list_log_grafanacloudlogs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + +### Return type + +[**[LoggingGrafanacloudlogsResponse]**](LoggingGrafanacloudlogsResponse.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 | - | + +[[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_log_grafanacloudlogs** +> LoggingGrafanacloudlogsResponse update_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name) + +Update a Grafana Cloud Logs log endpoint + +Update a Grafana Cloud Logs logging object for a particular service and version. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_grafanacloudlogs_api +from fastly.model.logging_grafanacloudlogs_response import LoggingGrafanacloudlogsResponse +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 = logging_grafanacloudlogs_api.LoggingGrafanacloudlogsApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + logging_grafanacloudlogs_name = "test-log-endpoint" # str | The name for the real-time logging configuration. + name = "test-log-endpoint" # str | The name for the real-time logging configuration. (optional) + placement = "none" # str, none_type | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) + response_condition = "response_condition_example" # str, none_type | The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) + format = "format_example" # str | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + format_version = 2 # int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional) if omitted the server will use the default value of 2 + user = "user_example" # str | The Grafana Cloud Logs Dataset you want to log to. (optional) + url = "url_example" # str | The URL of the Loki instance in your Grafana stack. (optional) + token = "token_example" # str | The Grafana Access Policy token with `logs:write` access scoped to your Loki instance. (optional) + index = "index_example" # str | The Stream Labels, a JSON string used to identify the stream. (optional) + + # example passing only required values which don't have defaults set + try: + # Update a Grafana Cloud Logs log endpoint + api_response = api_instance.update_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingGrafanacloudlogsApi->update_log_grafanacloudlogs: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Update a Grafana Cloud Logs log endpoint + api_response = api_instance.update_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name, name=name, placement=placement, response_condition=response_condition, format=format, format_version=format_version, user=user, url=url, token=token, index=index) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingGrafanacloudlogsApi->update_log_grafanacloudlogs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **logging_grafanacloudlogs_name** | **str**| The name for the real-time logging configuration. | + **name** | **str**| The name for the real-time logging configuration. | [optional] + **placement** | **str, none_type**| Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] + **response_condition** | **str, none_type**| The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] + **format** | **str**| A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] + **format_version** | **int**| The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] if omitted the server will use the default value of 2 + **user** | **str**| The Grafana Cloud Logs Dataset you want to log to. | [optional] + **url** | **str**| The URL of the Loki instance in your Grafana stack. | [optional] + **token** | **str**| The Grafana Access Policy token with `logs:write` access scoped to your Loki instance. | [optional] + **index** | **str**| The Stream Labels, a JSON string used to identify the stream. | [optional] + +### Return type + +[**LoggingGrafanacloudlogsResponse**](LoggingGrafanacloudlogsResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/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) + diff --git a/docs/LoggingGrafanacloudlogsResponse.md b/docs/LoggingGrafanacloudlogsResponse.md new file mode 100644 index 0000000..48a0c64 --- /dev/null +++ b/docs/LoggingGrafanacloudlogsResponse.md @@ -0,0 +1,25 @@ +# LoggingGrafanacloudlogsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name for the real-time logging configuration. | [optional] +**placement** | **str, none_type** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] +**response_condition** | **str, none_type** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] +**format** | **str** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] +**format_version** | **str** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] if omitted the server will use the default value of "2" +**user** | **str** | The Grafana Cloud Logs Dataset you want to log to. | [optional] +**url** | **str** | The URL of the Loki instance in your Grafana stack. | [optional] +**token** | **str** | The Grafana Access Policy token with `logs:write` access scoped to your Loki instance. | [optional] +**index** | **str** | The Stream Labels, a JSON string used to identify the stream. | [optional] +**created_at** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] +**deleted_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] +**service_id** | **str** | | [optional] [readonly] +**version** | **str** | | [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/ObjectStorageAccessKeysApi.md b/docs/ObjectStorageAccessKeysApi.md new file mode 100644 index 0000000..fbfaf1a --- /dev/null +++ b/docs/ObjectStorageAccessKeysApi.md @@ -0,0 +1,327 @@ +# fastly.ObjectStorageAccessKeysApi + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_access_key**](ObjectStorageAccessKeysApi.md#create_access_key) | **POST** /resources/object-storage/access-keys | Create an access key +[**delete_access_key**](ObjectStorageAccessKeysApi.md#delete_access_key) | **DELETE** /resources/object-storage/access-keys/{access_key} | Delete an access key +[**get_access_key**](ObjectStorageAccessKeysApi.md#get_access_key) | **GET** /resources/object-storage/access-keys/{access_key} | Get an access key +[**list_access_keys**](ObjectStorageAccessKeysApi.md#list_access_keys) | **GET** /resources/object-storage/access-keys | List access keys + + +# **create_access_key** +> AccessKeyResponse create_access_key() + +Create an access key + +Create an access key. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import object_storage_access_keys_api +from fastly.model.access_key_response import AccessKeyResponse +from fastly.model.access_key import AccessKey +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 = object_storage_access_keys_api.ObjectStorageAccessKeysApi(api_client) + access_key = AccessKey( + description="description_example", + permission="permission_example", + buckets=[ + "buckets_example", + ], + ) # AccessKey | (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create an access key + api_response = api_instance.create_access_key(access_key=access_key) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling ObjectStorageAccessKeysApi->create_access_key: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **access_key** | [**AccessKey**](AccessKey.md)| | [optional] + +### Return type + +[**AccessKeyResponse**](AccessKeyResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[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_access_key** +> delete_access_key(access_key) + +Delete an access key + +Delete an access key. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import object_storage_access_keys_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 = object_storage_access_keys_api.ObjectStorageAccessKeysApi(api_client) + access_key = "access_key_example" # str | + + # example passing only required values which don't have defaults set + try: + # Delete an access key + api_instance.delete_access_key(access_key) + except fastly.ApiException as e: + print("Exception when calling ObjectStorageAccessKeysApi->delete_access_key: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **access_key** | **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_access_key** +> AccessKey get_access_key(access_key) + +Get an access key + +Get an access key by its identifier. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import object_storage_access_keys_api +from fastly.model.access_key import AccessKey +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 = object_storage_access_keys_api.ObjectStorageAccessKeysApi(api_client) + access_key = "access_key_example" # str | + + # example passing only required values which don't have defaults set + try: + # Get an access key + api_response = api_instance.get_access_key(access_key) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling ObjectStorageAccessKeysApi->get_access_key: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **access_key** | **str**| | + +### Return type + +[**AccessKey**](AccessKey.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 | - | + +[[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_access_keys** +> AccessKeyResponse list_access_keys() + +List access keys + +List access keys. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import object_storage_access_keys_api +from fastly.model.access_key_response import AccessKeyResponse +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 = object_storage_access_keys_api.ObjectStorageAccessKeysApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # List access keys + api_response = api_instance.list_access_keys() + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling ObjectStorageAccessKeysApi->list_access_keys: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AccessKeyResponse**](AccessKeyResponse.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 | - | + +[[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 7207913..f50682d 100644 --- a/docs/RealtimeEntryAggregated.md +++ b/docs/RealtimeEntryAggregated.md @@ -234,13 +234,6 @@ Name | Type | Description | Notes **bot_challenge_complete_tokens_issued** | **int** | The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. | [optional] **ddos_action_downgrade** | **int** | The number of times the downgrade action was taken. The downgrade action restricts the client to http1. | [optional] **ddos_action_downgraded_connections** | **int** | The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1. | [optional] -**vcl_on_compute_hit_requests** | **int** | Number of cache hits for a VCL service running on Compute. | [optional] -**vcl_on_compute_miss_requests** | **int** | Number of cache misses for a VCL service running on Compute. | [optional] -**vcl_on_compute_pass_requests** | **int** | Number of requests that passed through the CDN without being cached for a VCL service running on Compute. | [optional] -**vcl_on_compute_error_requests** | **int** | Number of cache errors for a VCL service running on Compute. | [optional] -**vcl_on_compute_synth_requests** | **int** | Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute. | [optional] -**vcl_on_compute_edge_hit_requests** | **int** | Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute. | [optional] -**vcl_on_compute_edge_miss_requests** | **int** | Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute. | [optional] **all_hit_requests** | **int** | Number of cache hits for a VCL service. | [optional] **all_miss_requests** | **int** | Number of cache misses for a VCL service. | [optional] **all_pass_requests** | **int** | Number of requests that passed through the CDN without being cached for a VCL service. | [optional] @@ -255,6 +248,9 @@ Name | Type | Description | Notes **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] **request_denied_get_head_body** | **int** | Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. | [optional] +**service_ddos_requests_detected** | **int** | Number of requests classified as a DDoS attack against a customer origin or service. | [optional] +**service_ddos_requests_mitigated** | **int** | Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. | [optional] +**service_ddos_requests_allowed** | **int** | Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. | [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 fb23587..5daa66e 100644 --- a/docs/RealtimeMeasurements.md +++ b/docs/RealtimeMeasurements.md @@ -234,13 +234,6 @@ Name | Type | Description | Notes **bot_challenge_complete_tokens_issued** | **int** | The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. | [optional] **ddos_action_downgrade** | **int** | The number of times the downgrade action was taken. The downgrade action restricts the client to http1. | [optional] **ddos_action_downgraded_connections** | **int** | The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1. | [optional] -**vcl_on_compute_hit_requests** | **int** | Number of cache hits for a VCL service running on Compute. | [optional] -**vcl_on_compute_miss_requests** | **int** | Number of cache misses for a VCL service running on Compute. | [optional] -**vcl_on_compute_pass_requests** | **int** | Number of requests that passed through the CDN without being cached for a VCL service running on Compute. | [optional] -**vcl_on_compute_error_requests** | **int** | Number of cache errors for a VCL service running on Compute. | [optional] -**vcl_on_compute_synth_requests** | **int** | Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute. | [optional] -**vcl_on_compute_edge_hit_requests** | **int** | Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute. | [optional] -**vcl_on_compute_edge_miss_requests** | **int** | Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute. | [optional] **all_hit_requests** | **int** | Number of cache hits for a VCL service. | [optional] **all_miss_requests** | **int** | Number of cache misses for a VCL service. | [optional] **all_pass_requests** | **int** | Number of requests that passed through the CDN without being cached for a VCL service. | [optional] @@ -255,6 +248,9 @@ Name | Type | Description | Notes **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] **request_denied_get_head_body** | **int** | Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. | [optional] +**service_ddos_requests_detected** | **int** | Number of requests classified as a DDoS attack against a customer origin or service. | [optional] +**service_ddos_requests_mitigated** | **int** | Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. | [optional] +**service_ddos_requests_allowed** | **int** | Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. | [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/Results.md b/docs/Results.md index 7473d26..7939648 100644 --- a/docs/Results.md +++ b/docs/Results.md @@ -234,13 +234,6 @@ Name | Type | Description | Notes **bot_challenges_failed** | **int** | The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution. | [optional] **ddos_action_downgrade** | **int** | The number of times the downgrade action was taken. The downgrade action restricts the client to http1. | [optional] **ddos_action_downgraded_connections** | **int** | The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1. | [optional] -**vcl_on_compute_hit_requests** | **int** | Number of cache hits for a VCL service running on Compute. | [optional] -**vcl_on_compute_miss_requests** | **int** | Number of cache misses for a VCL service running on Compute. | [optional] -**vcl_on_compute_pass_requests** | **int** | Number of requests that passed through the CDN without being cached for a VCL service running on Compute. | [optional] -**vcl_on_compute_error_requests** | **int** | Number of cache errors for a VCL service running on Compute. | [optional] -**vcl_on_compute_synth_requests** | **int** | Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute. | [optional] -**vcl_on_compute_edge_hit_requests** | **int** | Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute. | [optional] -**vcl_on_compute_edge_miss_requests** | **int** | Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute. | [optional] **all_hit_requests** | **int** | Number of cache hits for a VCL service. | [optional] **all_miss_requests** | **int** | Number of cache misses for a VCL service. | [optional] **all_pass_requests** | **int** | Number of requests that passed through the CDN without being cached for a VCL service. | [optional] @@ -255,6 +248,9 @@ Name | Type | Description | Notes **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] **request_denied_get_head_body** | **int** | Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. | [optional] +**service_ddos_requests_detected** | **int** | Number of requests classified as a DDoS attack against a customer origin or service. | [optional] +**service_ddos_requests_mitigated** | **int** | Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. | [optional] +**service_ddos_requests_allowed** | **int** | Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. | [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/SetConfiguration.md b/docs/SetConfiguration.md index 618d1ed..a97a0b1 100644 --- a/docs/SetConfiguration.md +++ b/docs/SetConfiguration.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **workspace_id** | **str** | The new workspace_id. Required in the `PUT` request body when `product_id` is `ngwaf`. Optional in the `PATCH` request body for `ngwaf`. | [optional] **traffic_ramp** | **str** | The new traffic ramp. Optional in the `PATCH` request body for `ngwaf`. | [optional] +**mode** | **str** | The new mode to run the product in. One of `block`, `log`, or `off`. Optional in the `PATCH` request body for `ddos_protection`. | [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/Usagemetric.md b/docs/Usagemetric.md new file mode 100644 index 0000000..25e6758 --- /dev/null +++ b/docs/Usagemetric.md @@ -0,0 +1,20 @@ +# Usagemetric + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**month** | **str** | The year and month of the usage element. | [optional] +**usage_type** | **str** | The usage type identifier for the usage. This is a single, billable metric for the product. | [optional] +**name** | **str** | Full name of the product usage type as it might appear on a customer's invoice. | [optional] +**region** | **str** | The geographical area applicable for regionally based products. | [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] +**quantity** | **float** | The quantity of the usage for the product. | [optional] +**raw_quantity** | **float** | The raw units measured for the product. | [optional] +**product_id** | **str** | The product identifier associated with the usage type. This corresponds to a Fastly product offering. | [optional] +**last_updated_at** | **str** | The date when the usage metric was last updated. | [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/Usagemetrics.md b/docs/Usagemetrics.md new file mode 100644 index 0000000..143833f --- /dev/null +++ b/docs/Usagemetrics.md @@ -0,0 +1,12 @@ +# Usagemetrics + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Usagemetric]**](Usagemetric.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/ValueField.md b/docs/ValueField.md new file mode 100644 index 0000000..bfc3a10 --- /dev/null +++ b/docs/ValueField.md @@ -0,0 +1,11 @@ +# ValueField + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/ValueFloatArray.md b/docs/ValueFloatArray.md new file mode 100644 index 0000000..588b4b8 --- /dev/null +++ b/docs/ValueFloatArray.md @@ -0,0 +1,11 @@ +# ValueFloatArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **[float]** | | + +[[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/ValueIntegerArray.md b/docs/ValueIntegerArray.md new file mode 100644 index 0000000..e74d3f5 --- /dev/null +++ b/docs/ValueIntegerArray.md @@ -0,0 +1,11 @@ +# ValueIntegerArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **[int]** | | + +[[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/ValueStringArray.md b/docs/ValueStringArray.md new file mode 100644 index 0000000..1134700 --- /dev/null +++ b/docs/ValueStringArray.md @@ -0,0 +1,11 @@ +# ValueStringArray + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **[str]** | | + +[[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/Values503Responses.md b/docs/Values503Responses.md new file mode 100644 index 0000000..e76b6af --- /dev/null +++ b/docs/Values503Responses.md @@ -0,0 +1,14 @@ +# Values503Responses + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The HTTP request path. | [optional] +**rate_per_url** | **float** | The rate at which the reason in this dimension occurs among responses to this URL with a 503 status code. | [optional] +**_503_rate_per_url** | **float** | The rate at which 503 status codes are returned for this URL. | [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/ValuesBandwidth.md b/docs/ValuesBandwidth.md new file mode 100644 index 0000000..1a73438 --- /dev/null +++ b/docs/ValuesBandwidth.md @@ -0,0 +1,13 @@ +# ValuesBandwidth + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**average_bandwidth_bytes** | **float** | The average bandwidth in bytes for responses to requests to the URL in the current dimension. | [optional] +**bandwidth_percentage** | **float** | The total bandwidth percentage for all responses to requests to the URL in the current dimension. | [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/ValuesBrowser.md b/docs/ValuesBrowser.md new file mode 100644 index 0000000..c70a1b9 --- /dev/null +++ b/docs/ValuesBrowser.md @@ -0,0 +1,13 @@ +# ValuesBrowser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**browser_version** | **str** | The version of the client's browser. | [optional] +**rate** | **float** | The percentage of requests by this version of the browser specified in the dimension. | [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/ValuesCacheHitRatio.md b/docs/ValuesCacheHitRatio.md new file mode 100644 index 0000000..613cb81 --- /dev/null +++ b/docs/ValuesCacheHitRatio.md @@ -0,0 +1,12 @@ +# ValuesCacheHitRatio + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cache_hit_ratio** | **float** | The cache hit ratio for the URL specified in the dimension. | [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/ValuesCountryStats.md b/docs/ValuesCountryStats.md new file mode 100644 index 0000000..d0defdc --- /dev/null +++ b/docs/ValuesCountryStats.md @@ -0,0 +1,14 @@ +# ValuesCountryStats + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**region** | **str** | The client's country subdivision code as defined by ISO 3166-2. | [optional] +**region_chr** | **float** | The cache hit ratio for the region. | [optional] +**region_error_rate** | **float** | The error rate for the region. | [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/ValuesDuration.md b/docs/ValuesDuration.md new file mode 100644 index 0000000..e9f9f98 --- /dev/null +++ b/docs/ValuesDuration.md @@ -0,0 +1,14 @@ +# ValuesDuration + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**average_response_time** | **float** | The average time in seconds to respond to requests to the URL in the current dimension. | [optional] +**p95_response_time** | **float** | The P95 time in seconds to respond to requests to the URL in the current dimension. | [optional] +**response_time_percentage** | **float** | The total percentage of time to respond to all requests to the URL in the current dimension. | [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/ValuesMisses.md b/docs/ValuesMisses.md new file mode 100644 index 0000000..127e776 --- /dev/null +++ b/docs/ValuesMisses.md @@ -0,0 +1,12 @@ +# ValuesMisses + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**miss_rate** | **float** | The miss rate for requests to the URL in the current dimension. | [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/ValuesRate.md b/docs/ValuesRate.md new file mode 100644 index 0000000..5f61936 --- /dev/null +++ b/docs/ValuesRate.md @@ -0,0 +1,12 @@ +# ValuesRate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rate** | **float** | The percentage of requests matching the value in the current dimension. | [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/ValuesRequests.md b/docs/ValuesRequests.md new file mode 100644 index 0000000..579831e --- /dev/null +++ b/docs/ValuesRequests.md @@ -0,0 +1,12 @@ +# ValuesRequests + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_percentage** | **float** | The percentage of all requests made to the URL in the current dimension. | [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/ValuesStatusCodes.md b/docs/ValuesStatusCodes.md new file mode 100644 index 0000000..e929556 --- /dev/null +++ b/docs/ValuesStatusCodes.md @@ -0,0 +1,14 @@ +# ValuesStatusCodes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The HTTP request path. | [optional] +**rate_per_status** | **float** | The URL accounts for this percentage of the status code in this dimension. | [optional] +**rate_per_url** | **float** | The rate at which the status code in this dimension occurs for this URL. | [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/fastly/__init__.py b/fastly/__init__.py index a2ecc24..e12c80f 100644 --- a/fastly/__init__.py +++ b/fastly/__init__.py @@ -10,7 +10,7 @@ """ -__version__ = "5.10.0" +__version__ = "6.0.0" # import ApiClient from fastly.api_client import ApiClient diff --git a/fastly/api/billing_usage_metrics_api.py b/fastly/api/billing_usage_metrics_api.py index 5db9e3b..0298916 100644 --- a/fastly/api/billing_usage_metrics_api.py +++ b/fastly/api/billing_usage_metrics_api.py @@ -23,7 +23,7 @@ ) from fastly.model.error import Error from fastly.model.serviceusagemetrics import Serviceusagemetrics -from fastly.model.serviceusagetypes import Serviceusagetypes +from fastly.model.usagemetric import Usagemetric class BillingUsageMetricsApi(object): @@ -41,7 +41,7 @@ def __init__(self, api_client=None): 'auth': [ 'token' ], - 'endpoint_path': '/billing/v2/account_customers/{customer_id}/service-usage-metrics', + 'endpoint_path': '/billing/v3/service-usage-metrics', 'operation_id': 'get_service_level_usage', 'http_method': 'GET', 'servers': [ @@ -53,55 +53,28 @@ def __init__(self, api_client=None): }, 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': { @@ -118,18 +91,10 @@ def __init__(self, api_client=None): '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': @@ -140,24 +105,16 @@ def __init__(self, api_client=None): (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', @@ -176,14 +133,14 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.get_service_level_usage_types_endpoint = _Endpoint( + self.get_usage_metrics_endpoint = _Endpoint( settings={ - 'response_type': (Serviceusagetypes,), + 'response_type': (Usagemetric,), 'auth': [ 'token' ], - 'endpoint_path': '/billing/v2/account_customers/{customer_id}/service-usage-types', - 'operation_id': 'get_service_level_usage_types', + 'endpoint_path': '/billing/v3/usage-metrics', + 'operation_id': 'get_usage_metrics', 'http_method': 'GET', 'servers': [ { @@ -194,32 +151,49 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'customer_id', - ], - 'required': [ - 'customer_id', + 'start_month', + 'end_month', ], + 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ + 'start_month', + 'end_month', ] }, root_map={ 'validations': { + ('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': + 'start_month': + (str,), + 'end_month': (str,), }, 'attribute_map': { - 'customer_id': 'customer_id', + 'start_month': 'start_month', + 'end_month': 'end_month', }, 'location_map': { - 'customer_id': 'path', + 'start_month': 'query', + 'end_month': 'query', }, 'path_params_allow_reserved_map': { }, @@ -237,10 +211,8 @@ def __init__(self, api_client=None): 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 @@ -249,18 +221,14 @@ def get_service_level_usage( 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) + >>> thread = api.get_service_level_usage(product_id, usage_type_name, 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" @@ -321,34 +289,29 @@ def get_service_level_usage( 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( + def get_usage_metrics( self, - customer_id, **kwargs ): - """Retrieve product usage types for a customer. # noqa: E501 + """Get monthly usage metrics # noqa: E501 - Returns product usage types reported by the customer's services. # noqa: E501 + Returns monthly usage metrics for customer by product. # 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) + >>> thread = api.get_usage_metrics(async_req=True) >>> result = thread.get() - Args: - customer_id (str): Alphanumeric string identifying the customer. Keyword Args: + start_month (str): [optional] + end_month (str): [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 @@ -377,7 +340,7 @@ def get_service_level_usage_types( async_req (bool): execute request asynchronously Returns: - Serviceusagetypes + Usagemetric If the method is called asynchronously, returns the request thread. """ @@ -405,7 +368,5 @@ def get_service_level_usage_types( 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) + return self.get_usage_metrics_endpoint.call_with_http_info(**kwargs) diff --git a/fastly/api/enabled_products_api.py b/fastly/api/enabled_products_api.py index 9c9151a..155cd12 100644 --- a/fastly/api/enabled_products_api.py +++ b/fastly/api/enabled_products_api.py @@ -375,7 +375,7 @@ def disable_product( ): """Disable a product # noqa: E501 - Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. # noqa: E501 + Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -457,7 +457,7 @@ def enable_product( ): """Enable a product # noqa: E501 - Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. # noqa: E501 + Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -540,7 +540,7 @@ def get_enabled_product( ): """Get enabled product # noqa: E501 - Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`. # noqa: E501 + Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -622,7 +622,7 @@ def get_product_configuration( ): """Get configuration for a product # noqa: E501 - Get configuration for an enabled product on a service. Supported product IDs: `ngwaf`. # noqa: E501 + Get configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -704,7 +704,7 @@ def set_product_configuration( ): """Update configuration for a product # noqa: E501 - Update configuration for an enabled product on a service. Supported product IDs: `ngwaf`. # noqa: E501 + Update configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/fastly/api/insights_api.py b/fastly/api/insights_api.py new file mode 100644 index 0000000..f84dab7 --- /dev/null +++ b/fastly/api/insights_api.py @@ -0,0 +1,245 @@ +""" + 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.get_log_insights_response import GetLogInsightsResponse + + +class InsightsApi(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_log_insights_endpoint = _Endpoint( + settings={ + 'response_type': (GetLogInsightsResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/observability/log-insights', + 'operation_id': 'get_log_insights', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'visualization', + 'service_id', + 'start', + 'end', + 'pops', + 'domain', + 'domain_exact_match', + 'limit', + ], + 'required': [ + 'visualization', + 'service_id', + 'start', + 'end', + ], + 'nullable': [ + ], + 'enum': [ + 'visualization', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('visualization',): { + + "TOP-URL-BY-BANDWIDTH": "top-url-by-bandwidth", + "BOTTOM-URL-BY-CACHE-HIT-RATIO": "bottom-url-by-cache-hit-ratio", + "TOP-URL-BY-CACHE-HIT-RATIO": "top-url-by-cache-hit-ratio", + "COUNTRY-STATISTICS": "country-statistics", + "TOP-URL-BY-DURATION-SUM": "top-url-by-duration-sum", + "TOP-4XX-URLS": "top-4xx-urls", + "TOP-5XX-URLS": "top-5xx-urls", + "TOP-URL-BY-MISSES": "top-url-by-misses", + "TOP-URL-BY-REQUESTS": "top-url-by-requests", + "TOP-BROWSER-BY-REQUESTS": "top-browser-by-requests", + "TOP-CONTENT-TYPE-BY-REQUESTS": "top-content-type-by-requests", + "TOP-DEVICE-BY-REQUESTS": "top-device-by-requests", + "TOP-OS-BY-REQUESTS": "top-os-by-requests", + "RESPONSE-STATUS-CODES": "response-status-codes", + "TOP-503-RESPONSES": "top-503-responses" + }, + }, + 'openapi_types': { + 'visualization': + (str,), + 'service_id': + (str,), + 'start': + (str,), + 'end': + (str,), + 'pops': + (str,), + 'domain': + (str,), + 'domain_exact_match': + (bool,), + 'limit': + (float,), + }, + 'attribute_map': { + 'visualization': 'visualization', + 'service_id': 'service_id', + 'start': 'start', + 'end': 'end', + 'pops': 'pops', + 'domain': 'domain', + 'domain_exact_match': 'domain_exact_match', + 'limit': 'limit', + }, + 'location_map': { + 'visualization': 'query', + 'service_id': 'query', + 'start': 'query', + 'end': 'query', + 'pops': 'query', + 'domain': 'query', + 'domain_exact_match': 'query', + 'limit': 'query', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_log_insights( + self, + visualization, + service_id, + start, + end, + **kwargs + ): + """Retrieve log insights # noqa: E501 + + Retrieves statistics from sampled log records. # 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_log_insights(visualization, service_id, start, end, async_req=True) + >>> result = thread.get() + + Args: + visualization (str): + service_id (str): + start (str): + end (str): + + Keyword Args: + pops (str): [optional] + domain (str): [optional] + domain_exact_match (bool): [optional] + limit (float): [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: + GetLogInsightsResponse + 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['visualization'] = \ + visualization + kwargs['service_id'] = \ + service_id + kwargs['start'] = \ + start + kwargs['end'] = \ + end + return self.get_log_insights_endpoint.call_with_http_info(**kwargs) + diff --git a/fastly/api/kv_store_item_api.py b/fastly/api/kv_store_item_api.py index 0137cdb..cc95100 100644 --- a/fastly/api/kv_store_item_api.py +++ b/fastly/api/kv_store_item_api.py @@ -117,6 +117,7 @@ def __init__(self, api_client=None): 'cursor', 'limit', 'prefix', + 'consistency', ], 'required': [ 'store_id', @@ -142,18 +143,22 @@ def __init__(self, api_client=None): (int,), 'prefix': (str,), + 'consistency': + (str,), }, 'attribute_map': { 'store_id': 'store_id', 'cursor': 'cursor', 'limit': 'limit', 'prefix': 'prefix', + 'consistency': 'consistency', }, 'location_map': { 'store_id': 'path', 'cursor': 'query', 'limit': 'query', 'prefix': 'query', + 'consistency': 'query', }, 'path_params_allow_reserved_map': { }, @@ -441,6 +446,7 @@ def get_keys( cursor (str): [optional] limit (int): [optional] if omitted the server will use the default value of 100 prefix (str): [optional] + consistency (str): [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 diff --git a/fastly/api/log_explorer_api.py b/fastly/api/log_explorer_api.py new file mode 100644 index 0000000..47f5176 --- /dev/null +++ b/fastly/api/log_explorer_api.py @@ -0,0 +1,210 @@ +""" + 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.get_log_records_response import GetLogRecordsResponse + + +class LogExplorerApi(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_log_records_endpoint = _Endpoint( + settings={ + 'response_type': (GetLogRecordsResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/observability/log-explorer', + 'operation_id': 'get_log_records', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'start', + 'end', + 'limit', + 'next_cursor', + 'filter', + ], + 'required': [ + 'service_id', + 'start', + 'end', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'service_id': + (str,), + 'start': + (str,), + 'end': + (str,), + 'limit': + (float,), + 'next_cursor': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'service_id': 'service_id', + 'start': 'start', + 'end': 'end', + 'limit': 'limit', + 'next_cursor': 'next_cursor', + 'filter': 'filter', + }, + 'location_map': { + 'service_id': 'query', + 'start': 'query', + 'end': 'query', + 'limit': 'query', + 'next_cursor': 'query', + 'filter': 'query', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_log_records( + self, + service_id, + start, + end, + **kwargs + ): + """Retrieve log records # noqa: E501 + + Retrieves log records. # 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_log_records(service_id, start, end, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): + start (str): + end (str): + + Keyword Args: + limit (float): [optional] + next_cursor (str): [optional] + filter (str): [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: + GetLogRecordsResponse + 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['service_id'] = \ + service_id + kwargs['start'] = \ + start + kwargs['end'] = \ + end + return self.get_log_records_endpoint.call_with_http_info(**kwargs) + diff --git a/fastly/api/logging_grafanacloudlogs_api.py b/fastly/api/logging_grafanacloudlogs_api.py new file mode 100644 index 0000000..593dc45 --- /dev/null +++ b/fastly/api/logging_grafanacloudlogs_api.py @@ -0,0 +1,939 @@ +""" + 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.inline_response200 import InlineResponse200 +from fastly.model.logging_grafanacloudlogs_response import LoggingGrafanacloudlogsResponse + + +class LoggingGrafanacloudlogsApi(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_log_grafanacloudlogs_endpoint = _Endpoint( + settings={ + 'response_type': (LoggingGrafanacloudlogsResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs', + 'operation_id': 'create_log_grafanacloudlogs', + 'http_method': 'POST', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + 'name', + 'placement', + 'response_condition', + 'format', + 'format_version', + 'user', + 'url', + 'token', + 'index', + ], + 'required': [ + 'service_id', + 'version_id', + ], + 'nullable': [ + 'placement', + 'response_condition', + ], + 'enum': [ + 'placement', + 'format_version', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('placement',): { + 'None': None, + "NONE": "none", + "WAF_DEBUG": "waf_debug", + "NULL": "null" + }, + ('format_version',): { + + "v1": 1, + "v2": 2 + }, + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + 'name': + (str,), + 'placement': + (str, none_type,), + 'response_condition': + (str, none_type,), + 'format': + (str,), + 'format_version': + (int,), + 'user': + (str,), + 'url': + (str,), + 'token': + (str,), + 'index': + (str,), + }, + 'attribute_map': { + 'service_id': 'service_id', + 'version_id': 'version_id', + 'name': 'name', + 'placement': 'placement', + 'response_condition': 'response_condition', + 'format': 'format', + 'format_version': 'format_version', + 'user': 'user', + 'url': 'url', + 'token': 'token', + 'index': 'index', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + 'name': 'form', + 'placement': 'form', + 'response_condition': 'form', + 'format': 'form', + 'format_version': 'form', + 'user': 'form', + 'url': 'form', + 'token': 'form', + 'index': 'form', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/x-www-form-urlencoded' + ] + }, + api_client=api_client + ) + self.delete_log_grafanacloudlogs_endpoint = _Endpoint( + settings={ + 'response_type': (InlineResponse200,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name}', + 'operation_id': 'delete_log_grafanacloudlogs', + 'http_method': 'DELETE', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + 'logging_grafanacloudlogs_name', + ], + 'required': [ + 'service_id', + 'version_id', + 'logging_grafanacloudlogs_name', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + 'logging_grafanacloudlogs_name': + (str,), + }, + 'attribute_map': { + 'service_id': 'service_id', + 'version_id': 'version_id', + 'logging_grafanacloudlogs_name': 'logging_grafanacloudlogs_name', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + 'logging_grafanacloudlogs_name': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_log_grafanacloudlogs_endpoint = _Endpoint( + settings={ + 'response_type': (LoggingGrafanacloudlogsResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name}', + 'operation_id': 'get_log_grafanacloudlogs', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + 'logging_grafanacloudlogs_name', + ], + 'required': [ + 'service_id', + 'version_id', + 'logging_grafanacloudlogs_name', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + 'logging_grafanacloudlogs_name': + (str,), + }, + 'attribute_map': { + 'service_id': 'service_id', + 'version_id': 'version_id', + 'logging_grafanacloudlogs_name': 'logging_grafanacloudlogs_name', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + 'logging_grafanacloudlogs_name': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_log_grafanacloudlogs_endpoint = _Endpoint( + settings={ + 'response_type': ([LoggingGrafanacloudlogsResponse],), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs', + 'operation_id': 'list_log_grafanacloudlogs', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + ], + 'required': [ + 'service_id', + 'version_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + }, + 'attribute_map': { + 'service_id': 'service_id', + 'version_id': 'version_id', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_log_grafanacloudlogs_endpoint = _Endpoint( + settings={ + 'response_type': (LoggingGrafanacloudlogsResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name}', + 'operation_id': 'update_log_grafanacloudlogs', + 'http_method': 'PUT', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + 'logging_grafanacloudlogs_name', + 'name', + 'placement', + 'response_condition', + 'format', + 'format_version', + 'user', + 'url', + 'token', + 'index', + ], + 'required': [ + 'service_id', + 'version_id', + 'logging_grafanacloudlogs_name', + ], + 'nullable': [ + 'placement', + 'response_condition', + ], + 'enum': [ + 'placement', + 'format_version', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('placement',): { + 'None': None, + "NONE": "none", + "WAF_DEBUG": "waf_debug", + "NULL": "null" + }, + ('format_version',): { + + "v1": 1, + "v2": 2 + }, + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + 'logging_grafanacloudlogs_name': + (str,), + 'name': + (str,), + 'placement': + (str, none_type,), + 'response_condition': + (str, none_type,), + 'format': + (str,), + 'format_version': + (int,), + 'user': + (str,), + 'url': + (str,), + 'token': + (str,), + 'index': + (str,), + }, + 'attribute_map': { + 'service_id': 'service_id', + 'version_id': 'version_id', + 'logging_grafanacloudlogs_name': 'logging_grafanacloudlogs_name', + 'name': 'name', + 'placement': 'placement', + 'response_condition': 'response_condition', + 'format': 'format', + 'format_version': 'format_version', + 'user': 'user', + 'url': 'url', + 'token': 'token', + 'index': 'index', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + 'logging_grafanacloudlogs_name': 'path', + 'name': 'form', + 'placement': 'form', + 'response_condition': 'form', + 'format': 'form', + 'format_version': 'form', + 'user': 'form', + 'url': 'form', + 'token': 'form', + 'index': 'form', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/x-www-form-urlencoded' + ] + }, + api_client=api_client + ) + + def create_log_grafanacloudlogs( + self, + service_id, + version_id, + **kwargs + ): + """Create a Grafana Cloud Logs log endpoint # noqa: E501 + + Create a Grafana Cloud Logs logging object for a particular service and version. # 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_log_grafanacloudlogs(service_id, version_id, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + + Keyword Args: + name (str): The name for the real-time logging configuration.. [optional] + placement (str, none_type): Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. . [optional] + response_condition (str, none_type): The name of an existing condition in the configured endpoint, or leave blank to always execute.. [optional] + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] + format_version (int): The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. . [optional] if omitted the server will use the default value of 2 + user (str): The Grafana Cloud Logs Dataset you want to log to.. [optional] + url (str): The URL of the Loki instance in your Grafana stack.. [optional] + token (str): The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.. [optional] + index (str): The Stream Labels, a JSON string used to identify the stream.. [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: + LoggingGrafanacloudlogsResponse + 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['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + return self.create_log_grafanacloudlogs_endpoint.call_with_http_info(**kwargs) + + def delete_log_grafanacloudlogs( + self, + service_id, + version_id, + logging_grafanacloudlogs_name, + **kwargs + ): + """Delete the Grafana Cloud Logs log endpoint # noqa: E501 + + Delete the Grafana Cloud Logs logging object for a particular service and version. # 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_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + logging_grafanacloudlogs_name (str): The name for the real-time logging configuration. + + 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: + InlineResponse200 + 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['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + kwargs['logging_grafanacloudlogs_name'] = \ + logging_grafanacloudlogs_name + return self.delete_log_grafanacloudlogs_endpoint.call_with_http_info(**kwargs) + + def get_log_grafanacloudlogs( + self, + service_id, + version_id, + logging_grafanacloudlogs_name, + **kwargs + ): + """Get a Grafana Cloud Logs log endpoint # noqa: E501 + + Get the details of a Grafana Cloud Logs logging object for a particular service and version. # 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_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + logging_grafanacloudlogs_name (str): The name for the real-time logging configuration. + + 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: + LoggingGrafanacloudlogsResponse + 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['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + kwargs['logging_grafanacloudlogs_name'] = \ + logging_grafanacloudlogs_name + return self.get_log_grafanacloudlogs_endpoint.call_with_http_info(**kwargs) + + def list_log_grafanacloudlogs( + self, + service_id, + version_id, + **kwargs + ): + """List Grafana Cloud Logs log endpoints # noqa: E501 + + List all of the Grafana Cloud Logs logging objects for a particular service and version. # 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_log_grafanacloudlogs(service_id, version_id, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + + 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: + [LoggingGrafanacloudlogsResponse] + 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['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + return self.list_log_grafanacloudlogs_endpoint.call_with_http_info(**kwargs) + + def update_log_grafanacloudlogs( + self, + service_id, + version_id, + logging_grafanacloudlogs_name, + **kwargs + ): + """Update a Grafana Cloud Logs log endpoint # noqa: E501 + + Update a Grafana Cloud Logs logging object for a particular service and version. # 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_log_grafanacloudlogs(service_id, version_id, logging_grafanacloudlogs_name, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + logging_grafanacloudlogs_name (str): The name for the real-time logging configuration. + + Keyword Args: + name (str): The name for the real-time logging configuration.. [optional] + placement (str, none_type): Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. . [optional] + response_condition (str, none_type): The name of an existing condition in the configured endpoint, or leave blank to always execute.. [optional] + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] + format_version (int): The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. . [optional] if omitted the server will use the default value of 2 + user (str): The Grafana Cloud Logs Dataset you want to log to.. [optional] + url (str): The URL of the Loki instance in your Grafana stack.. [optional] + token (str): The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.. [optional] + index (str): The Stream Labels, a JSON string used to identify the stream.. [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: + LoggingGrafanacloudlogsResponse + 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['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + kwargs['logging_grafanacloudlogs_name'] = \ + logging_grafanacloudlogs_name + return self.update_log_grafanacloudlogs_endpoint.call_with_http_info(**kwargs) + diff --git a/fastly/api/object_storage_access_keys_api.py b/fastly/api/object_storage_access_keys_api.py new file mode 100644 index 0000000..c0a718e --- /dev/null +++ b/fastly/api/object_storage_access_keys_api.py @@ -0,0 +1,562 @@ +""" + 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.access_key import AccessKey +from fastly.model.access_key_response import AccessKeyResponse + + +class ObjectStorageAccessKeysApi(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_access_key_endpoint = _Endpoint( + settings={ + 'response_type': (AccessKeyResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/resources/object-storage/access-keys', + 'operation_id': 'create_access_key', + 'http_method': 'POST', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'access_key', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'access_key': + (AccessKey,), + }, + 'attribute_map': { + }, + 'location_map': { + 'access_key': 'body', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_access_key_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'token' + ], + 'endpoint_path': '/resources/object-storage/access-keys/{access_key}', + 'operation_id': 'delete_access_key', + 'http_method': 'DELETE', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'access_key', + ], + 'required': [ + 'access_key', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'access_key': + (str,), + }, + 'attribute_map': { + 'access_key': 'access_key', + }, + 'location_map': { + 'access_key': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_access_key_endpoint = _Endpoint( + settings={ + 'response_type': (AccessKey,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/resources/object-storage/access-keys/{access_key}', + 'operation_id': 'get_access_key', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'access_key', + ], + 'required': [ + 'access_key', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'access_key': + (str,), + }, + 'attribute_map': { + 'access_key': 'access_key', + }, + 'location_map': { + 'access_key': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_access_keys_endpoint = _Endpoint( + settings={ + 'response_type': (AccessKeyResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/resources/object-storage/access-keys', + 'operation_id': 'list_access_keys', + '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 + ) + + def create_access_key( + self, + **kwargs + ): + """Create an access key # noqa: E501 + + Create an access key. # 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_access_key(async_req=True) + >>> result = thread.get() + + + Keyword Args: + access_key (AccessKey): [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: + AccessKeyResponse + 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_access_key_endpoint.call_with_http_info(**kwargs) + + def delete_access_key( + self, + access_key, + **kwargs + ): + """Delete an access key # noqa: E501 + + Delete an access key. # 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_access_key(access_key, async_req=True) + >>> result = thread.get() + + Args: + access_key (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['access_key'] = \ + access_key + return self.delete_access_key_endpoint.call_with_http_info(**kwargs) + + def get_access_key( + self, + access_key, + **kwargs + ): + """Get an access key # noqa: E501 + + Get an access key by its identifier. # 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_access_key(access_key, async_req=True) + >>> result = thread.get() + + Args: + access_key (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: + AccessKey + 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['access_key'] = \ + access_key + return self.get_access_key_endpoint.call_with_http_info(**kwargs) + + def list_access_keys( + self, + **kwargs + ): + """List access keys # noqa: E501 + + List access keys. # 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_access_keys(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: + AccessKeyResponse + 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_access_keys_endpoint.call_with_http_info(**kwargs) + diff --git a/fastly/api_client.py b/fastly/api_client.py index a73e004..91be96c 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.10.0' + self.user_agent = 'fastly-py/6.0.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 406b9ed..efd350b 100644 --- a/fastly/apis/__init__.py +++ b/fastly/apis/__init__.py @@ -54,6 +54,7 @@ from fastly.api.iam_service_groups_api import IamServiceGroupsApi from fastly.api.iam_user_groups_api import IamUserGroupsApi from fastly.api.image_optimizer_default_settings_api import ImageOptimizerDefaultSettingsApi +from fastly.api.insights_api import InsightsApi from fastly.api.invitations_api import InvitationsApi from fastly.api.kv_store_api import KvStoreApi from fastly.api.kv_store_item_api import KvStoreItemApi @@ -65,6 +66,7 @@ from fastly.api.legacy_waf_ruleset_api import LegacyWafRulesetApi from fastly.api.legacy_waf_tag_api import LegacyWafTagApi from fastly.api.legacy_waf_update_status_api import LegacyWafUpdateStatusApi +from fastly.api.log_explorer_api import LogExplorerApi from fastly.api.logging_azureblob_api import LoggingAzureblobApi from fastly.api.logging_bigquery_api import LoggingBigqueryApi from fastly.api.logging_cloudfiles_api import LoggingCloudfilesApi @@ -73,6 +75,7 @@ from fastly.api.logging_elasticsearch_api import LoggingElasticsearchApi from fastly.api.logging_ftp_api import LoggingFtpApi from fastly.api.logging_gcs_api import LoggingGcsApi +from fastly.api.logging_grafanacloudlogs_api import LoggingGrafanacloudlogsApi from fastly.api.logging_heroku_api import LoggingHerokuApi from fastly.api.logging_honeycomb_api import LoggingHoneycombApi from fastly.api.logging_https_api import LoggingHttpsApi @@ -93,6 +96,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.object_storage_access_keys_api import ObjectStorageAccessKeysApi 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 diff --git a/fastly/configuration.py b/fastly/configuration.py index 5e407b9..89e6916 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.10.0".\ + "SDK Package Version: 6.0.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/fastly/model/access_key.py b/fastly/model/access_key.py new file mode 100644 index 0000000..56cb57d --- /dev/null +++ b/fastly/model/access_key.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 + + + +class AccessKey(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 + 'permission': (str,), # noqa: E501 + 'buckets': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'description': 'description', # noqa: E501 + 'permission': 'permission', # noqa: E501 + 'buckets': 'buckets', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, description, permission, *args, **kwargs): # noqa: E501 + """AccessKey - a model defined in OpenAPI + + Args: + description (str): A description of the access key. + permission (str): The permissions granted to an access key. + + 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,) + buckets ([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__,) + + self.description = description + self.permission = permission + 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, description, permission, *args, **kwargs): # noqa: E501 + """AccessKey - a model defined in OpenAPI + + Args: + description (str): A description of the access key. + permission (str): The permissions granted to an access key. + + 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,) + buckets ([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__,) + + self.description = description + self.permission = permission + 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/access_key_response.py b/fastly/model/access_key_response.py new file mode 100644 index 0000000..6e04cc2 --- /dev/null +++ b/fastly/model/access_key_response.py @@ -0,0 +1,274 @@ +""" + 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 AccessKeyResponse(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 { + 'access_key': (str,), # noqa: E501 + 'secret_key': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'permission': (str,), # noqa: E501 + 'buckets': ([str],), # noqa: E501 + 'created_at': (datetime, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_key': 'access_key', # noqa: E501 + 'secret_key': 'secret_key', # noqa: E501 + 'description': 'description', # noqa: E501 + 'permission': 'permission', # noqa: E501 + 'buckets': 'buckets', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + } + + read_only_vars = { + 'created_at', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AccessKeyResponse - 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,) + access_key (str): Generated access key.. [optional] # noqa: E501 + secret_key (str): Generated secret key.. [optional] # noqa: E501 + description (str): Description for the access key.. [optional] # noqa: E501 + permission (str): Permissions granted to an access key.. [optional] # noqa: E501 + buckets ([str]): [optional] # noqa: E501 + created_at (datetime, none_type): Date and time in ISO 8601 format.. [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 + """AccessKeyResponse - 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,) + access_key (str): Generated access key.. [optional] # noqa: E501 + secret_key (str): Generated secret key.. [optional] # noqa: E501 + description (str): Description for the access key.. [optional] # noqa: E501 + permission (str): Permissions granted to an access key.. [optional] # noqa: E501 + buckets ([str]): [optional] # noqa: E501 + created_at (datetime, none_type): Date and time in ISO 8601 format.. [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/compute_acl_update.py b/fastly/model/compute_acl_update.py index 1876781..b08eb3c 100644 --- a/fastly/model/compute_acl_update.py +++ b/fastly/model/compute_acl_update.py @@ -34,7 +34,7 @@ def lazy_import(): globals()['ComputeAclUpdateEntry'] = ComputeAclUpdateEntry -class ComputeAclUpdate(ModelSimple): +class ComputeAclUpdate(ModelNormal): """NOTE: This class is auto generated. Do not edit the class manually. @@ -43,6 +43,10 @@ class ComputeAclUpdate(ModelSimple): 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, @@ -58,7 +62,14 @@ class ComputeAclUpdate(ModelSimple): validations = { } - additional_properties_type = None + @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 @@ -74,7 +85,7 @@ def openapi_types(): """ lazy_import() return { - 'value': ([ComputeAclUpdateEntry],), + 'entries': ([ComputeAclUpdateEntry],), # noqa: E501 } @cached_property @@ -82,32 +93,21 @@ def discriminator(): return None - attribute_map = {} - - read_only_vars = set() + attribute_map = { + 'entries': 'entries', # noqa: E501 + } - _composed_schemas = None + read_only_vars = { + } - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) + _composed_schemas = {} + @classmethod @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ComputeAclUpdate - a model defined in OpenAPI - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([ComputeAclUpdateEntry]): An example of an ACL update request.. # noqa: E501 - Keyword Args: - value ([ComputeAclUpdateEntry]): An example of an ACL update request.. # 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. @@ -138,27 +138,17 @@ def __init__(self, *args, **kwargs): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + entries ([ComputeAclUpdateEntry]): [optional] # noqa: E501 """ - # 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) + _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." % ( @@ -175,29 +165,31 @@ def __init__(self, *args, **kwargs): 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): - """ComputeAclUpdate - a model defined in OpenAPI + 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 - Note that value can be passed either in args or in kwargs, but not in both. + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) - Args: - args[0] ([ComputeAclUpdateEntry]): An example of an ACL update request.. # noqa: E501 + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ComputeAclUpdate - a model defined in OpenAPI Keyword Args: - value ([ComputeAclUpdateEntry]): An example of an ACL update request.. # 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. @@ -228,26 +220,12 @@ def _from_openapi_data(cls, *args, **kwargs): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + entries ([ComputeAclUpdateEntry]): [optional] # noqa: E501 """ - # 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) + _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) @@ -267,15 +245,15 @@ def _from_openapi_data(cls, *args, **kwargs): 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 + 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/dimension_attributes_country_stats.py b/fastly/model/dimension_attributes_country_stats.py new file mode 100644 index 0000000..3231fbe --- /dev/null +++ b/fastly/model/dimension_attributes_country_stats.py @@ -0,0 +1,261 @@ +""" + 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 DimensionAttributesCountryStats(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 { + 'country_chr': (float,), # noqa: E501 + 'country_error_rate': (float,), # noqa: E501 + 'country_request_rate': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'country_chr': 'country_chr', # noqa: E501 + 'country_error_rate': 'country_error_rate', # noqa: E501 + 'country_request_rate': 'country_request_rate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionAttributesCountryStats - 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,) + country_chr (float): The cache hit ratio for the country.. [optional] # noqa: E501 + country_error_rate (float): The error rate for the country.. [optional] # noqa: E501 + country_request_rate (float): This country's percentage of the total requests.. [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 + """DimensionAttributesCountryStats - 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,) + country_chr (float): The cache hit ratio for the country.. [optional] # noqa: E501 + country_error_rate (float): The error rate for the country.. [optional] # noqa: E501 + country_request_rate (float): This country's percentage of the total requests.. [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/dimension_attributes_rate.py b/fastly/model/dimension_attributes_rate.py new file mode 100644 index 0000000..794ac80 --- /dev/null +++ b/fastly/model/dimension_attributes_rate.py @@ -0,0 +1,253 @@ +""" + 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 DimensionAttributesRate(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 { + 'rate': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'rate': 'rate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionAttributesRate - 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,) + rate (float): The rate at which the value in the current dimension occurs.. [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 + """DimensionAttributesRate - 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,) + rate (float): The rate at which the value in the current dimension occurs.. [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/dimension_browser.py b/fastly/model/dimension_browser.py new file mode 100644 index 0000000..424cf0c --- /dev/null +++ b/fastly/model/dimension_browser.py @@ -0,0 +1,253 @@ +""" + 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 DimensionBrowser(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 { + 'browser': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'browser': 'browser', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionBrowser - 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,) + browser (str): The client's browser for this dimension.. [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 + """DimensionBrowser - 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,) + browser (str): The client's browser for this dimension.. [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/dimension_content_type.py b/fastly/model/dimension_content_type.py new file mode 100644 index 0000000..ab96e87 --- /dev/null +++ b/fastly/model/dimension_content_type.py @@ -0,0 +1,253 @@ +""" + 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 DimensionContentType(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 { + 'content_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'content_type': 'content_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionContentType - 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,) + content_type (str): The content type of the response for this dimension.. [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 + """DimensionContentType - 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,) + content_type (str): The content type of the response for this dimension.. [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/dimension_country.py b/fastly/model/dimension_country.py new file mode 100644 index 0000000..eada9af --- /dev/null +++ b/fastly/model/dimension_country.py @@ -0,0 +1,253 @@ +""" + 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 DimensionCountry(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 { + 'country': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'country': 'country', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionCountry - 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,) + country (str): The client's country for this dimension.. [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 + """DimensionCountry - 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,) + country (str): The client's country for this dimension.. [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/dimension_device.py b/fastly/model/dimension_device.py new file mode 100644 index 0000000..9ae405e --- /dev/null +++ b/fastly/model/dimension_device.py @@ -0,0 +1,253 @@ +""" + 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 DimensionDevice(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 { + 'device': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'device': 'device', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionDevice - 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,) + device (str): The client's device type for this dimension.. [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 + """DimensionDevice - 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,) + device (str): The client's device type for this dimension.. [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/dimension_os.py b/fastly/model/dimension_os.py new file mode 100644 index 0000000..7fc3e3d --- /dev/null +++ b/fastly/model/dimension_os.py @@ -0,0 +1,253 @@ +""" + 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 DimensionOs(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 { + 'os': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'os': 'os', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionOs - 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,) + os (str): The client's operating system for this dimension.. [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 + """DimensionOs - 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,) + os (str): The client's operating system for this dimension.. [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/dimension_response.py b/fastly/model/dimension_response.py new file mode 100644 index 0000000..24f89ff --- /dev/null +++ b/fastly/model/dimension_response.py @@ -0,0 +1,253 @@ +""" + 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 DimensionResponse(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 { + 'response': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'response': 'response', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionResponse - 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,) + response (str): The HTTP reason phrase for this dimension.. [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 + """DimensionResponse - 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,) + response (str): The HTTP reason phrase for this dimension.. [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/dimension_status_code.py b/fastly/model/dimension_status_code.py new file mode 100644 index 0000000..1972c12 --- /dev/null +++ b/fastly/model/dimension_status_code.py @@ -0,0 +1,253 @@ +""" + 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 DimensionStatusCode(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 { + 'status_code': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status_code': 'status-code', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionStatusCode - 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,) + status_code (str): The HTTP response code for this dimension.. [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 + """DimensionStatusCode - 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,) + status_code (str): The HTTP response code for this dimension.. [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/dimension_url.py b/fastly/model/dimension_url.py new file mode 100644 index 0000000..e0d6293 --- /dev/null +++ b/fastly/model/dimension_url.py @@ -0,0 +1,253 @@ +""" + 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 DimensionUrl(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 { + 'url': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'url': 'url', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DimensionUrl - 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,) + url (str): The URL path for this dimension.. [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 + """DimensionUrl - 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,) + url (str): The URL path for this dimension.. [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/filter_field_item.py b/fastly/model/filter_field_item.py new file mode 100644 index 0000000..e887454 --- /dev/null +++ b/fastly/model/filter_field_item.py @@ -0,0 +1,277 @@ +""" + 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.value_field import ValueField + globals()['ValueField'] = ValueField + + +class FilterFieldItem(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 = { + ('operator',): { + 'EQ': "eq", + 'ENDS-WITH': "ends-with", + 'IN': "in", + 'NOT_IN': "not_in", + 'GT': "gt", + 'GTE': "gte", + 'LT': "lt", + 'LTE': "lte", + }, + } + + 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 { + 'field': (str,), # noqa: E501 + 'operator': (str,), # noqa: E501 + 'value': (ValueField,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'field': 'field', # noqa: E501 + 'operator': 'operator', # noqa: E501 + 'value': 'value', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FilterFieldItem - 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,) + field (str): The log field to which this filter should be applied.. [optional] # noqa: E501 + operator (str): The comparison operator used for this filter.. [optional] # noqa: E501 + value (ValueField): [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 + """FilterFieldItem - 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,) + field (str): The log field to which this filter should be applied.. [optional] # noqa: E501 + operator (str): The comparison operator used for this filter.. [optional] # noqa: E501 + value (ValueField): [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/get_log_insights_response.py b/fastly/model/get_log_insights_response.py new file mode 100644 index 0000000..88dadb3 --- /dev/null +++ b/fastly/model/get_log_insights_response.py @@ -0,0 +1,265 @@ +""" + 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.log_insights import LogInsights + from fastly.model.log_insights_meta import LogInsightsMeta + globals()['LogInsights'] = LogInsights + globals()['LogInsightsMeta'] = LogInsightsMeta + + +class GetLogInsightsResponse(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': ([LogInsights],), # noqa: E501 + 'meta': (LogInsightsMeta,), # 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 + """GetLogInsightsResponse - 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 ([LogInsights]): [optional] # noqa: E501 + meta (LogInsightsMeta): [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 + """GetLogInsightsResponse - 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 ([LogInsights]): [optional] # noqa: E501 + meta (LogInsightsMeta): [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/get_log_records_response.py b/fastly/model/get_log_records_response.py new file mode 100644 index 0000000..654b723 --- /dev/null +++ b/fastly/model/get_log_records_response.py @@ -0,0 +1,265 @@ +""" + 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.get_log_records_response_meta import GetLogRecordsResponseMeta + from fastly.model.log_record import LogRecord + globals()['GetLogRecordsResponseMeta'] = GetLogRecordsResponseMeta + globals()['LogRecord'] = LogRecord + + +class GetLogRecordsResponse(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': ([LogRecord],), # noqa: E501 + 'meta': (GetLogRecordsResponseMeta,), # 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 + """GetLogRecordsResponse - 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 ([LogRecord]): [optional] # noqa: E501 + meta (GetLogRecordsResponseMeta): [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 + """GetLogRecordsResponse - 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 ([LogRecord]): [optional] # noqa: E501 + meta (GetLogRecordsResponseMeta): [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/get_log_records_response_meta.py b/fastly/model/get_log_records_response_meta.py new file mode 100644 index 0000000..563f1d5 --- /dev/null +++ b/fastly/model/get_log_records_response_meta.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.get_log_records_response_meta_filters import GetLogRecordsResponseMetaFilters + globals()['GetLogRecordsResponseMetaFilters'] = GetLogRecordsResponseMetaFilters + + +class GetLogRecordsResponseMeta(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 { + 'filters': (GetLogRecordsResponseMetaFilters,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GetLogRecordsResponseMeta - 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,) + filters (GetLogRecordsResponseMetaFilters): [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 + """GetLogRecordsResponseMeta - 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,) + filters (GetLogRecordsResponseMetaFilters): [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/get_log_records_response_meta_filters.py b/fastly/model/get_log_records_response_meta_filters.py new file mode 100644 index 0000000..78602c2 --- /dev/null +++ b/fastly/model/get_log_records_response_meta_filters.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 + + +def lazy_import(): + from fastly.model.filter_field_item import FilterFieldItem + from fastly.model.meta_per_page import MetaPerPage + globals()['FilterFieldItem'] = FilterFieldItem + globals()['MetaPerPage'] = MetaPerPage + + +class GetLogRecordsResponseMetaFilters(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 { + 'service_id': (str,), # noqa: E501 + 'start': (str,), # noqa: E501 + 'end': (str,), # noqa: E501 + 'domain_exact_match': (bool,), # noqa: E501 + 'limit': (MetaPerPage,), # noqa: E501 + 'next_cursor': (str, none_type,), # noqa: E501 + 'filter_fields': ([FilterFieldItem], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'service_id': 'service_id', # noqa: E501 + 'start': 'start', # noqa: E501 + 'end': 'end', # noqa: E501 + 'domain_exact_match': 'domain_exact_match', # noqa: E501 + 'limit': 'limit', # noqa: E501 + 'next_cursor': 'next_cursor', # noqa: E501 + 'filter_fields': 'filter_fields', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GetLogRecordsResponseMetaFilters - 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,) + service_id (str): Specifies the ID of the service for which data should be returned.. [optional] # noqa: E501 + start (str): Start time for the query as supplied in the request.. [optional] # noqa: E501 + end (str): End time for the query as supplied in the request.. [optional] # noqa: E501 + domain_exact_match (bool): Value of the `domain_exact_match` filter as supplied in the request.. [optional] # noqa: E501 + limit (MetaPerPage): [optional] # noqa: E501 + next_cursor (str, none_type): A cursor to specify the next page of results, if any.. [optional] # noqa: E501 + filter_fields ([FilterFieldItem], none_type): [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 + """GetLogRecordsResponseMetaFilters - 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,) + service_id (str): Specifies the ID of the service for which data should be returned.. [optional] # noqa: E501 + start (str): Start time for the query as supplied in the request.. [optional] # noqa: E501 + end (str): End time for the query as supplied in the request.. [optional] # noqa: E501 + domain_exact_match (bool): Value of the `domain_exact_match` filter as supplied in the request.. [optional] # noqa: E501 + limit (MetaPerPage): [optional] # noqa: E501 + next_cursor (str, none_type): A cursor to specify the next page of results, if any.. [optional] # noqa: E501 + filter_fields ([FilterFieldItem], none_type): [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/log_insights.py b/fastly/model/log_insights.py new file mode 100644 index 0000000..2b6b00e --- /dev/null +++ b/fastly/model/log_insights.py @@ -0,0 +1,271 @@ +""" + 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.log_insights_dimension_attributes import LogInsightsDimensionAttributes + from fastly.model.log_insights_dimensions import LogInsightsDimensions + from fastly.model.log_insights_values import LogInsightsValues + globals()['LogInsightsDimensionAttributes'] = LogInsightsDimensionAttributes + globals()['LogInsightsDimensions'] = LogInsightsDimensions + globals()['LogInsightsValues'] = LogInsightsValues + + +class LogInsights(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 { + 'dimensions': (LogInsightsDimensions,), # noqa: E501 + 'dimension_attributes': (LogInsightsDimensionAttributes,), # noqa: E501 + 'values': (LogInsightsValues,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dimensions': 'dimensions', # noqa: E501 + 'dimension_attributes': 'dimension_attributes', # noqa: E501 + 'values': 'values', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LogInsights - 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,) + dimensions (LogInsightsDimensions): [optional] # noqa: E501 + dimension_attributes (LogInsightsDimensionAttributes): [optional] # noqa: E501 + values (LogInsightsValues): [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 + """LogInsights - 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,) + dimensions (LogInsightsDimensions): [optional] # noqa: E501 + dimension_attributes (LogInsightsDimensionAttributes): [optional] # noqa: E501 + values (LogInsightsValues): [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/log_insights_dimension_attributes.py b/fastly/model/log_insights_dimension_attributes.py new file mode 100644 index 0000000..4334d0c --- /dev/null +++ b/fastly/model/log_insights_dimension_attributes.py @@ -0,0 +1,324 @@ +""" + 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.dimension_attributes_country_stats import DimensionAttributesCountryStats + from fastly.model.dimension_attributes_rate import DimensionAttributesRate + globals()['DimensionAttributesCountryStats'] = DimensionAttributesCountryStats + globals()['DimensionAttributesRate'] = DimensionAttributesRate + + +class LogInsightsDimensionAttributes(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 { + 'rate': (float,), # noqa: E501 + 'country_chr': (float,), # noqa: E501 + 'country_error_rate': (float,), # noqa: E501 + 'country_request_rate': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'rate': 'rate', # noqa: E501 + 'country_chr': 'country_chr', # noqa: E501 + 'country_error_rate': 'country_error_rate', # noqa: E501 + 'country_request_rate': 'country_request_rate', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LogInsightsDimensionAttributes - 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,) + rate (float): The rate at which the value in the current dimension occurs.. [optional] # noqa: E501 + country_chr (float): The cache hit ratio for the country.. [optional] # noqa: E501 + country_error_rate (float): The error rate for the country.. [optional] # noqa: E501 + country_request_rate (float): This country's percentage of the total requests.. [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 + """LogInsightsDimensionAttributes - 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,) + rate (float): The rate at which the value in the current dimension occurs.. [optional] # noqa: E501 + country_chr (float): The cache hit ratio for the country.. [optional] # noqa: E501 + country_error_rate (float): The error rate for the country.. [optional] # noqa: E501 + country_request_rate (float): This country's percentage of the total requests.. [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': [ + ], + 'oneOf': [ + DimensionAttributesCountryStats, + DimensionAttributesRate, + ], + } diff --git a/fastly/model/log_insights_dimensions.py b/fastly/model/log_insights_dimensions.py new file mode 100644 index 0000000..4e64c30 --- /dev/null +++ b/fastly/model/log_insights_dimensions.py @@ -0,0 +1,358 @@ +""" + 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.dimension_browser import DimensionBrowser + from fastly.model.dimension_content_type import DimensionContentType + from fastly.model.dimension_country import DimensionCountry + from fastly.model.dimension_device import DimensionDevice + from fastly.model.dimension_os import DimensionOs + from fastly.model.dimension_response import DimensionResponse + from fastly.model.dimension_status_code import DimensionStatusCode + from fastly.model.dimension_url import DimensionUrl + globals()['DimensionBrowser'] = DimensionBrowser + globals()['DimensionContentType'] = DimensionContentType + globals()['DimensionCountry'] = DimensionCountry + globals()['DimensionDevice'] = DimensionDevice + globals()['DimensionOs'] = DimensionOs + globals()['DimensionResponse'] = DimensionResponse + globals()['DimensionStatusCode'] = DimensionStatusCode + globals()['DimensionUrl'] = DimensionUrl + + +class LogInsightsDimensions(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 { + 'url': (str,), # noqa: E501 + 'country': (str,), # noqa: E501 + 'status_code': (str,), # noqa: E501 + 'response': (str,), # noqa: E501 + 'browser': (str,), # noqa: E501 + 'content_type': (str,), # noqa: E501 + 'device': (str,), # noqa: E501 + 'os': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'url': 'url', # noqa: E501 + 'country': 'country', # noqa: E501 + 'status_code': 'status-code', # noqa: E501 + 'response': 'response', # noqa: E501 + 'browser': 'browser', # noqa: E501 + 'content_type': 'content_type', # noqa: E501 + 'device': 'device', # noqa: E501 + 'os': 'os', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LogInsightsDimensions - 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,) + url (str): The URL path for this dimension.. [optional] # noqa: E501 + country (str): The client's country for this dimension.. [optional] # noqa: E501 + status_code (str): The HTTP response code for this dimension.. [optional] # noqa: E501 + response (str): The HTTP reason phrase for this dimension.. [optional] # noqa: E501 + browser (str): The client's browser for this dimension.. [optional] # noqa: E501 + content_type (str): The content type of the response for this dimension.. [optional] # noqa: E501 + device (str): The client's device type for this dimension.. [optional] # noqa: E501 + os (str): The client's operating system for this dimension.. [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 + """LogInsightsDimensions - 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,) + url (str): The URL path for this dimension.. [optional] # noqa: E501 + country (str): The client's country for this dimension.. [optional] # noqa: E501 + status_code (str): The HTTP response code for this dimension.. [optional] # noqa: E501 + response (str): The HTTP reason phrase for this dimension.. [optional] # noqa: E501 + browser (str): The client's browser for this dimension.. [optional] # noqa: E501 + content_type (str): The content type of the response for this dimension.. [optional] # noqa: E501 + device (str): The client's device type for this dimension.. [optional] # noqa: E501 + os (str): The client's operating system for this dimension.. [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': [ + ], + 'oneOf': [ + DimensionBrowser, + DimensionContentType, + DimensionCountry, + DimensionDevice, + DimensionOs, + DimensionResponse, + DimensionStatusCode, + DimensionUrl, + ], + } diff --git a/fastly/model/log_insights_meta.py b/fastly/model/log_insights_meta.py new file mode 100644 index 0000000..26dfbbf --- /dev/null +++ b/fastly/model/log_insights_meta.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.log_insights_meta_filter import LogInsightsMetaFilter + globals()['LogInsightsMetaFilter'] = LogInsightsMetaFilter + + +class LogInsightsMeta(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 { + 'filters': (LogInsightsMetaFilter,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LogInsightsMeta - 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,) + filters (LogInsightsMetaFilter): [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 + """LogInsightsMeta - 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,) + filters (LogInsightsMetaFilter): [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/log_insights_meta_filter.py b/fastly/model/log_insights_meta_filter.py new file mode 100644 index 0000000..ac217be --- /dev/null +++ b/fastly/model/log_insights_meta_filter.py @@ -0,0 +1,275 @@ +""" + 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.meta_per_page import MetaPerPage + globals()['MetaPerPage'] = MetaPerPage + + +class LogInsightsMetaFilter(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 { + 'service_id': (str,), # noqa: E501 + 'start': (str,), # noqa: E501 + 'end': (str,), # noqa: E501 + 'domain_exact_match': (bool,), # noqa: E501 + 'limit': (MetaPerPage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'service_id': 'service_id', # noqa: E501 + 'start': 'start', # noqa: E501 + 'end': 'end', # noqa: E501 + 'domain_exact_match': 'domain_exact_match', # noqa: E501 + 'limit': 'limit', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LogInsightsMetaFilter - 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,) + service_id (str): Specifies the ID of the service for which data should be returned.. [optional] # noqa: E501 + start (str): Start time for the query as supplied in the request.. [optional] # noqa: E501 + end (str): End time for the query as supplied in the request.. [optional] # noqa: E501 + domain_exact_match (bool): Value of the `domain_exact_match` filter as supplied in the request.. [optional] # noqa: E501 + limit (MetaPerPage): [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 + """LogInsightsMetaFilter - 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,) + service_id (str): Specifies the ID of the service for which data should be returned.. [optional] # noqa: E501 + start (str): Start time for the query as supplied in the request.. [optional] # noqa: E501 + end (str): End time for the query as supplied in the request.. [optional] # noqa: E501 + domain_exact_match (bool): Value of the `domain_exact_match` filter as supplied in the request.. [optional] # noqa: E501 + limit (MetaPerPage): [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/log_insights_values.py b/fastly/model/log_insights_values.py new file mode 100644 index 0000000..bb45d0e --- /dev/null +++ b/fastly/model/log_insights_values.py @@ -0,0 +1,400 @@ +""" + 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.values503_responses import Values503Responses + from fastly.model.values_bandwidth import ValuesBandwidth + from fastly.model.values_browser import ValuesBrowser + from fastly.model.values_cache_hit_ratio import ValuesCacheHitRatio + from fastly.model.values_country_stats import ValuesCountryStats + from fastly.model.values_duration import ValuesDuration + from fastly.model.values_misses import ValuesMisses + from fastly.model.values_rate import ValuesRate + from fastly.model.values_requests import ValuesRequests + from fastly.model.values_status_codes import ValuesStatusCodes + globals()['Values503Responses'] = Values503Responses + globals()['ValuesBandwidth'] = ValuesBandwidth + globals()['ValuesBrowser'] = ValuesBrowser + globals()['ValuesCacheHitRatio'] = ValuesCacheHitRatio + globals()['ValuesCountryStats'] = ValuesCountryStats + globals()['ValuesDuration'] = ValuesDuration + globals()['ValuesMisses'] = ValuesMisses + globals()['ValuesRate'] = ValuesRate + globals()['ValuesRequests'] = ValuesRequests + globals()['ValuesStatusCodes'] = ValuesStatusCodes + + +class LogInsightsValues(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 { + 'cache_hit_ratio': (float,), # noqa: E501 + 'region': (str,), # noqa: E501 + 'region_chr': (float,), # noqa: E501 + 'region_error_rate': (float,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'rate_per_status': (float,), # noqa: E501 + 'rate_per_url': (float,), # noqa: E501 + '_503_rate_per_url': (float,), # noqa: E501 + 'browser_version': (str,), # noqa: E501 + 'rate': (float,), # noqa: E501 + 'average_bandwidth_bytes': (float,), # noqa: E501 + 'bandwidth_percentage': (float,), # noqa: E501 + 'average_response_time': (float,), # noqa: E501 + 'p95_response_time': (float,), # noqa: E501 + 'response_time_percentage': (float,), # noqa: E501 + 'miss_rate': (float,), # noqa: E501 + 'request_percentage': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cache_hit_ratio': 'cache_hit_ratio', # noqa: E501 + 'region': 'region', # noqa: E501 + 'region_chr': 'region_chr', # noqa: E501 + 'region_error_rate': 'region_error_rate', # noqa: E501 + 'url': 'url', # noqa: E501 + 'rate_per_status': 'rate_per_status', # noqa: E501 + 'rate_per_url': 'rate_per_url', # noqa: E501 + '_503_rate_per_url': '503_rate_per_url', # noqa: E501 + 'browser_version': 'browser_version', # noqa: E501 + 'rate': 'rate', # noqa: E501 + 'average_bandwidth_bytes': 'average_bandwidth_bytes', # noqa: E501 + 'bandwidth_percentage': 'bandwidth_percentage', # noqa: E501 + 'average_response_time': 'average_response_time', # noqa: E501 + 'p95_response_time': 'p95_response_time', # noqa: E501 + 'response_time_percentage': 'response_time_percentage', # noqa: E501 + 'miss_rate': 'miss_rate', # noqa: E501 + 'request_percentage': 'request_percentage', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LogInsightsValues - 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,) + cache_hit_ratio (float): The cache hit ratio for the URL specified in the dimension.. [optional] # noqa: E501 + region (str): The client's country subdivision code as defined by ISO 3166-2.. [optional] # noqa: E501 + region_chr (float): The cache hit ratio for the region.. [optional] # noqa: E501 + region_error_rate (float): The error rate for the region.. [optional] # noqa: E501 + url (str): The HTTP request path.. [optional] # noqa: E501 + rate_per_status (float): The URL accounts for this percentage of the status code in this dimension.. [optional] # noqa: E501 + rate_per_url (float): The rate at which the reason in this dimension occurs among responses to this URL with a 503 status code.. [optional] # noqa: E501 + _503_rate_per_url (float): The rate at which 503 status codes are returned for this URL.. [optional] # noqa: E501 + browser_version (str): The version of the client's browser.. [optional] # noqa: E501 + rate (float): The percentage of requests matching the value in the current dimension.. [optional] # noqa: E501 + average_bandwidth_bytes (float): The average bandwidth in bytes for responses to requests to the URL in the current dimension.. [optional] # noqa: E501 + bandwidth_percentage (float): The total bandwidth percentage for all responses to requests to the URL in the current dimension.. [optional] # noqa: E501 + average_response_time (float): The average time in seconds to respond to requests to the URL in the current dimension.. [optional] # noqa: E501 + p95_response_time (float): The P95 time in seconds to respond to requests to the URL in the current dimension.. [optional] # noqa: E501 + response_time_percentage (float): The total percentage of time to respond to all requests to the URL in the current dimension.. [optional] # noqa: E501 + miss_rate (float): The miss rate for requests to the URL in the current dimension.. [optional] # noqa: E501 + request_percentage (float): The percentage of all requests made to the URL in the current dimension.. [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 + """LogInsightsValues - 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,) + cache_hit_ratio (float): The cache hit ratio for the URL specified in the dimension.. [optional] # noqa: E501 + region (str): The client's country subdivision code as defined by ISO 3166-2.. [optional] # noqa: E501 + region_chr (float): The cache hit ratio for the region.. [optional] # noqa: E501 + region_error_rate (float): The error rate for the region.. [optional] # noqa: E501 + url (str): The HTTP request path.. [optional] # noqa: E501 + rate_per_status (float): The URL accounts for this percentage of the status code in this dimension.. [optional] # noqa: E501 + rate_per_url (float): The rate at which the reason in this dimension occurs among responses to this URL with a 503 status code.. [optional] # noqa: E501 + _503_rate_per_url (float): The rate at which 503 status codes are returned for this URL.. [optional] # noqa: E501 + browser_version (str): The version of the client's browser.. [optional] # noqa: E501 + rate (float): The percentage of requests matching the value in the current dimension.. [optional] # noqa: E501 + average_bandwidth_bytes (float): The average bandwidth in bytes for responses to requests to the URL in the current dimension.. [optional] # noqa: E501 + bandwidth_percentage (float): The total bandwidth percentage for all responses to requests to the URL in the current dimension.. [optional] # noqa: E501 + average_response_time (float): The average time in seconds to respond to requests to the URL in the current dimension.. [optional] # noqa: E501 + p95_response_time (float): The P95 time in seconds to respond to requests to the URL in the current dimension.. [optional] # noqa: E501 + response_time_percentage (float): The total percentage of time to respond to all requests to the URL in the current dimension.. [optional] # noqa: E501 + miss_rate (float): The miss rate for requests to the URL in the current dimension.. [optional] # noqa: E501 + request_percentage (float): The percentage of all requests made to the URL in the current dimension.. [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': [ + ], + 'oneOf': [ + Values503Responses, + ValuesBandwidth, + ValuesBrowser, + ValuesCacheHitRatio, + ValuesCountryStats, + ValuesDuration, + ValuesMisses, + ValuesRate, + ValuesRequests, + ValuesStatusCodes, + ], + } diff --git a/fastly/model/log_property_service_id.py b/fastly/model/log_property_service_id.py new file mode 100644 index 0000000..0d1fde0 --- /dev/null +++ b/fastly/model/log_property_service_id.py @@ -0,0 +1,249 @@ +""" + 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 LogPropertyServiceId(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 { + } + + @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 + """LogPropertyServiceId - 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 + """LogPropertyServiceId - 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/log_record.py b/fastly/model/log_record.py new file mode 100644 index 0000000..2fba698 --- /dev/null +++ b/fastly/model/log_record.py @@ -0,0 +1,393 @@ +""" + 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.log_property_service_id import LogPropertyServiceId + globals()['LogPropertyServiceId'] = LogPropertyServiceId + + +class LogRecord(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 + 'service_id': (LogPropertyServiceId,), # noqa: E501 + 'timestamp': (datetime,), # noqa: E501 + 'client_as_number': (int,), # noqa: E501 + 'client_region': (str,), # noqa: E501 + 'client_country_code': (str,), # noqa: E501 + 'client_os_name': (str,), # noqa: E501 + 'client_device_type': (str,), # noqa: E501 + 'client_browser_name': (str,), # noqa: E501 + 'client_browser_version': (str,), # noqa: E501 + 'fastly_pop': (str,), # noqa: E501 + 'origin_host': (str,), # noqa: E501 + 'request_protocol': (str,), # noqa: E501 + 'request_host': (str,), # noqa: E501 + 'request_path': (str,), # noqa: E501 + 'request_method': (str,), # noqa: E501 + 'response_bytes_body': (int,), # noqa: E501 + 'response_bytes_header': (int,), # noqa: E501 + 'response_content_length': (int,), # noqa: E501 + 'response_content_type': (str,), # noqa: E501 + 'response_reason': (str,), # noqa: E501 + 'response_state': (str,), # noqa: E501 + 'response_status': (int,), # noqa: E501 + 'response_time': (float,), # noqa: E501 + 'response_x_cache': (str,), # noqa: E501 + 'is_cache_hit': (bool,), # noqa: E501 + 'is_edge': (bool,), # noqa: E501 + 'is_shield': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_id': 'customer_id', # noqa: E501 + 'service_id': 'service_id', # noqa: E501 + 'timestamp': 'timestamp', # noqa: E501 + 'client_as_number': 'client_as_number', # noqa: E501 + 'client_region': 'client_region', # noqa: E501 + 'client_country_code': 'client_country_code', # noqa: E501 + 'client_os_name': 'client_os_name', # noqa: E501 + 'client_device_type': 'client_device_type', # noqa: E501 + 'client_browser_name': 'client_browser_name', # noqa: E501 + 'client_browser_version': 'client_browser_version', # noqa: E501 + 'fastly_pop': 'fastly_pop', # noqa: E501 + 'origin_host': 'origin_host', # noqa: E501 + 'request_protocol': 'request_protocol', # noqa: E501 + 'request_host': 'request_host', # noqa: E501 + 'request_path': 'request_path', # noqa: E501 + 'request_method': 'request_method', # noqa: E501 + 'response_bytes_body': 'response_bytes_body', # noqa: E501 + 'response_bytes_header': 'response_bytes_header', # noqa: E501 + 'response_content_length': 'response_content_length', # noqa: E501 + 'response_content_type': 'response_content_type', # noqa: E501 + 'response_reason': 'response_reason', # noqa: E501 + 'response_state': 'response_state', # noqa: E501 + 'response_status': 'response_status', # noqa: E501 + 'response_time': 'response_time', # noqa: E501 + 'response_x_cache': 'response_x_cache', # noqa: E501 + 'is_cache_hit': 'is_cache_hit', # noqa: E501 + 'is_edge': 'is_edge', # noqa: E501 + 'is_shield': 'is_shield', # noqa: E501 + } + + read_only_vars = { + 'customer_id', # noqa: E501 + 'client_as_number', # noqa: E501 + 'client_region', # noqa: E501 + 'client_country_code', # noqa: E501 + 'client_os_name', # noqa: E501 + 'client_device_type', # noqa: E501 + 'client_browser_name', # noqa: E501 + 'client_browser_version', # noqa: E501 + 'fastly_pop', # noqa: E501 + 'origin_host', # noqa: E501 + 'request_protocol', # noqa: E501 + 'request_host', # noqa: E501 + 'request_path', # noqa: E501 + 'request_method', # noqa: E501 + 'response_bytes_body', # noqa: E501 + 'response_bytes_header', # noqa: E501 + 'response_content_length', # noqa: E501 + 'response_content_type', # noqa: E501 + 'response_reason', # noqa: E501 + 'response_state', # noqa: E501 + 'response_status', # noqa: E501 + 'response_time', # noqa: E501 + 'response_x_cache', # noqa: E501 + 'is_cache_hit', # noqa: E501 + 'is_edge', # noqa: E501 + 'is_shield', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LogRecord - 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 ID of the Fastly customer that owns the service.. [optional] # noqa: E501 + service_id (LogPropertyServiceId): [optional] # noqa: E501 + timestamp (datetime): Timestamp of the request in ISO 8601 format.. [optional] # noqa: E501 + client_as_number (int): The autonomous system (AS) number of the client.. [optional] # noqa: E501 + client_region (str): The client's country subdivision code as found in ISO 3166-2.. [optional] # noqa: E501 + client_country_code (str): The two-letter ISO 3166-1 country code for the client.. [optional] # noqa: E501 + client_os_name (str): The name of the operating system installed on the client device.. [optional] # noqa: E501 + client_device_type (str): The type of the client's device.. [optional] # noqa: E501 + client_browser_name (str): The name of the browser in use on the client device.. [optional] # noqa: E501 + client_browser_version (str): The version of the browser in use on client device.. [optional] # noqa: E501 + fastly_pop (str): The name of the Fastly POP that served this request.. [optional] # noqa: E501 + origin_host (str): The name of the origin host that served this request.. [optional] # noqa: E501 + request_protocol (str): HTTP protocol version in use for this request. For example, HTTP/1.1.. [optional] # noqa: E501 + request_host (str): The name of the request host used for this request.. [optional] # noqa: E501 + request_path (str): The URL path supplied for this request.. [optional] # noqa: E501 + request_method (str): HTTP method sent by the client such as \"GET\" or \"POST\".. [optional] # noqa: E501 + response_bytes_body (int): Body bytes sent to the client in the response.. [optional] # noqa: E501 + response_bytes_header (int): Header bytes sent to the client in the response.. [optional] # noqa: E501 + response_content_length (int): Total bytes sent to the client in the response.. [optional] # noqa: E501 + response_content_type (str): The content type of the response sent to the client.. [optional] # noqa: E501 + response_reason (str): The HTTP reason phrase returned for this request, if any.. [optional] # noqa: E501 + response_state (str): The state of the request with optional suffixes describing special cases.. [optional] # noqa: E501 + response_status (int): The HTTP response code returned for this request.. [optional] # noqa: E501 + response_time (float): The time since the request started in seconds.. [optional] # noqa: E501 + response_x_cache (str): Indicates whether the request was a HIT or a MISS.. [optional] # noqa: E501 + is_cache_hit (bool): Indicates whether this request was fulfilled from cache.. [optional] # noqa: E501 + is_edge (bool): Indicates whether the request was handled by a Fastly edge POP.. [optional] # noqa: E501 + is_shield (bool): Indicates whether the request was handled by a Fastly shield POP.. [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 + """LogRecord - 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 ID of the Fastly customer that owns the service.. [optional] # noqa: E501 + service_id (LogPropertyServiceId): [optional] # noqa: E501 + timestamp (datetime): Timestamp of the request in ISO 8601 format.. [optional] # noqa: E501 + client_as_number (int): The autonomous system (AS) number of the client.. [optional] # noqa: E501 + client_region (str): The client's country subdivision code as found in ISO 3166-2.. [optional] # noqa: E501 + client_country_code (str): The two-letter ISO 3166-1 country code for the client.. [optional] # noqa: E501 + client_os_name (str): The name of the operating system installed on the client device.. [optional] # noqa: E501 + client_device_type (str): The type of the client's device.. [optional] # noqa: E501 + client_browser_name (str): The name of the browser in use on the client device.. [optional] # noqa: E501 + client_browser_version (str): The version of the browser in use on client device.. [optional] # noqa: E501 + fastly_pop (str): The name of the Fastly POP that served this request.. [optional] # noqa: E501 + origin_host (str): The name of the origin host that served this request.. [optional] # noqa: E501 + request_protocol (str): HTTP protocol version in use for this request. For example, HTTP/1.1.. [optional] # noqa: E501 + request_host (str): The name of the request host used for this request.. [optional] # noqa: E501 + request_path (str): The URL path supplied for this request.. [optional] # noqa: E501 + request_method (str): HTTP method sent by the client such as \"GET\" or \"POST\".. [optional] # noqa: E501 + response_bytes_body (int): Body bytes sent to the client in the response.. [optional] # noqa: E501 + response_bytes_header (int): Header bytes sent to the client in the response.. [optional] # noqa: E501 + response_content_length (int): Total bytes sent to the client in the response.. [optional] # noqa: E501 + response_content_type (str): The content type of the response sent to the client.. [optional] # noqa: E501 + response_reason (str): The HTTP reason phrase returned for this request, if any.. [optional] # noqa: E501 + response_state (str): The state of the request with optional suffixes describing special cases.. [optional] # noqa: E501 + response_status (int): The HTTP response code returned for this request.. [optional] # noqa: E501 + response_time (float): The time since the request started in seconds.. [optional] # noqa: E501 + response_x_cache (str): Indicates whether the request was a HIT or a MISS.. [optional] # noqa: E501 + is_cache_hit (bool): Indicates whether this request was fulfilled from cache.. [optional] # noqa: E501 + is_edge (bool): Indicates whether the request was handled by a Fastly edge POP.. [optional] # noqa: E501 + is_shield (bool): Indicates whether the request was handled by a Fastly shield POP.. [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/logging_grafanacloudlogs_additional.py b/fastly/model/logging_grafanacloudlogs_additional.py new file mode 100644 index 0000000..2f8bb71 --- /dev/null +++ b/fastly/model/logging_grafanacloudlogs_additional.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 + + + +class LoggingGrafanacloudlogsAdditional(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 { + 'format': (str,), # noqa: E501 + 'user': (str,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'token': (str,), # noqa: E501 + 'index': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'format': 'format', # noqa: E501 + 'user': 'user', # noqa: E501 + 'url': 'url', # noqa: E501 + 'token': 'token', # noqa: E501 + 'index': 'index', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LoggingGrafanacloudlogsAdditional - 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,) + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] # noqa: E501 + user (str): The Grafana Cloud Logs Dataset you want to log to.. [optional] # noqa: E501 + url (str): The URL of the Loki instance in your Grafana stack.. [optional] # noqa: E501 + token (str): The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.. [optional] # noqa: E501 + index (str): The Stream Labels, a JSON string used to identify the stream.. [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 + """LoggingGrafanacloudlogsAdditional - 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,) + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] # noqa: E501 + user (str): The Grafana Cloud Logs Dataset you want to log to.. [optional] # noqa: E501 + url (str): The URL of the Loki instance in your Grafana stack.. [optional] # noqa: E501 + token (str): The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.. [optional] # noqa: E501 + index (str): The Stream Labels, a JSON string used to identify the stream.. [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/logging_grafanacloudlogs_response.py b/fastly/model/logging_grafanacloudlogs_response.py new file mode 100644 index 0000000..1221f29 --- /dev/null +++ b/fastly/model/logging_grafanacloudlogs_response.py @@ -0,0 +1,385 @@ +""" + 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.logging_common_response import LoggingCommonResponse + from fastly.model.logging_grafanacloudlogs_additional import LoggingGrafanacloudlogsAdditional + from fastly.model.service_id_and_version_string import ServiceIdAndVersionString + from fastly.model.timestamps import Timestamps + globals()['LoggingCommonResponse'] = LoggingCommonResponse + globals()['LoggingGrafanacloudlogsAdditional'] = LoggingGrafanacloudlogsAdditional + globals()['ServiceIdAndVersionString'] = ServiceIdAndVersionString + globals()['Timestamps'] = Timestamps + + +class LoggingGrafanacloudlogsResponse(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 = { + ('placement',): { + 'None': None, + 'NONE': "none", + 'WAF_DEBUG': "waf_debug", + 'NULL': "null", + }, + ('format_version',): { + 'v1': "1", + 'v2': "2", + }, + } + + 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 + 'placement': (str, none_type,), # noqa: E501 + 'response_condition': (str, none_type,), # noqa: E501 + 'format': (str,), # noqa: E501 + 'format_version': (str,), # noqa: E501 + 'user': (str,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'token': (str,), # noqa: E501 + 'index': (str,), # noqa: E501 + 'created_at': (datetime, none_type,), # noqa: E501 + 'deleted_at': (datetime, none_type,), # noqa: E501 + 'updated_at': (datetime, none_type,), # noqa: E501 + 'service_id': (str,), # noqa: E501 + 'version': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'placement': 'placement', # noqa: E501 + 'response_condition': 'response_condition', # noqa: E501 + 'format': 'format', # noqa: E501 + 'format_version': 'format_version', # noqa: E501 + 'user': 'user', # noqa: E501 + 'url': 'url', # noqa: E501 + 'token': 'token', # noqa: E501 + 'index': 'index', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'deleted_at': 'deleted_at', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'service_id': 'service_id', # noqa: E501 + 'version': 'version', # noqa: E501 + } + + read_only_vars = { + 'created_at', # noqa: E501 + 'deleted_at', # noqa: E501 + 'updated_at', # noqa: E501 + 'service_id', # noqa: E501 + 'version', # noqa: E501 + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LoggingGrafanacloudlogsResponse - 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): The name for the real-time logging configuration.. [optional] # noqa: E501 + placement (str, none_type): Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. . [optional] # noqa: E501 + response_condition (str, none_type): The name of an existing condition in the configured endpoint, or leave blank to always execute.. [optional] # noqa: E501 + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] # noqa: E501 + format_version (str): The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. . [optional] if omitted the server will use the default value of "2" # noqa: E501 + user (str): The Grafana Cloud Logs Dataset you want to log to.. [optional] # noqa: E501 + url (str): The URL of the Loki instance in your Grafana stack.. [optional] # noqa: E501 + token (str): The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.. [optional] # noqa: E501 + index (str): The Stream Labels, a JSON string used to identify the stream.. [optional] # noqa: E501 + created_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + deleted_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 + service_id (str): [optional] # noqa: E501 + version (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__,) + + 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 + """LoggingGrafanacloudlogsResponse - 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): The name for the real-time logging configuration.. [optional] # noqa: E501 + placement (str, none_type): Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. . [optional] # noqa: E501 + response_condition (str, none_type): The name of an existing condition in the configured endpoint, or leave blank to always execute.. [optional] # noqa: E501 + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] # noqa: E501 + format_version (str): The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. . [optional] if omitted the server will use the default value of "2" # noqa: E501 + user (str): The Grafana Cloud Logs Dataset you want to log to.. [optional] # noqa: E501 + url (str): The URL of the Loki instance in your Grafana stack.. [optional] # noqa: E501 + token (str): The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.. [optional] # noqa: E501 + index (str): The Stream Labels, a JSON string used to identify the stream.. [optional] # noqa: E501 + created_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + deleted_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 + service_id (str): [optional] # noqa: E501 + version (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__,) + + 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': [ + LoggingCommonResponse, + LoggingGrafanacloudlogsAdditional, + ServiceIdAndVersionString, + Timestamps, + ], + 'oneOf': [ + ], + } diff --git a/fastly/model/realtime_entry_aggregated.py b/fastly/model/realtime_entry_aggregated.py index 369cbe2..3a8a99d 100644 --- a/fastly/model/realtime_entry_aggregated.py +++ b/fastly/model/realtime_entry_aggregated.py @@ -314,13 +314,6 @@ def openapi_types(): 'bot_challenge_complete_tokens_issued': (int,), # noqa: E501 'ddos_action_downgrade': (int,), # noqa: E501 'ddos_action_downgraded_connections': (int,), # noqa: E501 - 'vcl_on_compute_hit_requests': (int,), # noqa: E501 - 'vcl_on_compute_miss_requests': (int,), # noqa: E501 - 'vcl_on_compute_pass_requests': (int,), # noqa: E501 - 'vcl_on_compute_error_requests': (int,), # noqa: E501 - 'vcl_on_compute_synth_requests': (int,), # noqa: E501 - 'vcl_on_compute_edge_hit_requests': (int,), # noqa: E501 - 'vcl_on_compute_edge_miss_requests': (int,), # noqa: E501 'all_hit_requests': (int,), # noqa: E501 'all_miss_requests': (int,), # noqa: E501 'all_pass_requests': (int,), # noqa: E501 @@ -335,6 +328,9 @@ def openapi_types(): 'all_status_5xx': (int,), # noqa: E501 'origin_offload': (float,), # noqa: E501 'request_denied_get_head_body': (int,), # noqa: E501 + 'service_ddos_requests_detected': (int,), # noqa: E501 + 'service_ddos_requests_mitigated': (int,), # noqa: E501 + 'service_ddos_requests_allowed': (int,), # noqa: E501 } @cached_property @@ -572,13 +568,6 @@ def discriminator(): 'bot_challenge_complete_tokens_issued': 'bot_challenge_complete_tokens_issued', # noqa: E501 'ddos_action_downgrade': 'ddos_action_downgrade', # noqa: E501 'ddos_action_downgraded_connections': 'ddos_action_downgraded_connections', # noqa: E501 - 'vcl_on_compute_hit_requests': 'vcl_on_compute_hit_requests', # noqa: E501 - 'vcl_on_compute_miss_requests': 'vcl_on_compute_miss_requests', # noqa: E501 - 'vcl_on_compute_pass_requests': 'vcl_on_compute_pass_requests', # noqa: E501 - 'vcl_on_compute_error_requests': 'vcl_on_compute_error_requests', # noqa: E501 - 'vcl_on_compute_synth_requests': 'vcl_on_compute_synth_requests', # noqa: E501 - 'vcl_on_compute_edge_hit_requests': 'vcl_on_compute_edge_hit_requests', # noqa: E501 - 'vcl_on_compute_edge_miss_requests': 'vcl_on_compute_edge_miss_requests', # noqa: E501 'all_hit_requests': 'all_hit_requests', # noqa: E501 'all_miss_requests': 'all_miss_requests', # noqa: E501 'all_pass_requests': 'all_pass_requests', # noqa: E501 @@ -593,6 +582,9 @@ def discriminator(): 'all_status_5xx': 'all_status_5xx', # noqa: E501 'origin_offload': 'origin_offload', # noqa: E501 'request_denied_get_head_body': 'request_denied_get_head_body', # noqa: E501 + 'service_ddos_requests_detected': 'service_ddos_requests_detected', # noqa: E501 + 'service_ddos_requests_mitigated': 'service_ddos_requests_mitigated', # noqa: E501 + 'service_ddos_requests_allowed': 'service_ddos_requests_allowed', # noqa: E501 } read_only_vars = { @@ -863,13 +855,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 bot_challenge_complete_tokens_issued (int): The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success.. [optional] # noqa: E501 ddos_action_downgrade (int): The number of times the downgrade action was taken. The downgrade action restricts the client to http1.. [optional] # noqa: E501 ddos_action_downgraded_connections (int): The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1.. [optional] # noqa: E501 - vcl_on_compute_hit_requests (int): Number of cache hits for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_miss_requests (int): Number of cache misses for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_error_requests (int): Number of cache errors for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_synth_requests (int): Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_hit_requests (int): Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_miss_requests (int): Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute.. [optional] # noqa: E501 all_hit_requests (int): Number of cache hits for a VCL service.. [optional] # noqa: E501 all_miss_requests (int): Number of cache misses for a VCL service.. [optional] # noqa: E501 all_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service.. [optional] # noqa: E501 @@ -884,6 +869,9 @@ def _from_openapi_data(cls, *args, **kwargs): # 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 request_denied_get_head_body (int): Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body.. [optional] # noqa: E501 + service_ddos_requests_detected (int): Number of requests classified as a DDoS attack against a customer origin or service.. [optional] # noqa: E501 + service_ddos_requests_mitigated (int): Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform.. [optional] # noqa: E501 + service_ddos_requests_allowed (int): Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -1212,13 +1200,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 bot_challenge_complete_tokens_issued (int): The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success.. [optional] # noqa: E501 ddos_action_downgrade (int): The number of times the downgrade action was taken. The downgrade action restricts the client to http1.. [optional] # noqa: E501 ddos_action_downgraded_connections (int): The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1.. [optional] # noqa: E501 - vcl_on_compute_hit_requests (int): Number of cache hits for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_miss_requests (int): Number of cache misses for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_error_requests (int): Number of cache errors for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_synth_requests (int): Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_hit_requests (int): Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_miss_requests (int): Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute.. [optional] # noqa: E501 all_hit_requests (int): Number of cache hits for a VCL service.. [optional] # noqa: E501 all_miss_requests (int): Number of cache misses for a VCL service.. [optional] # noqa: E501 all_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service.. [optional] # noqa: E501 @@ -1233,6 +1214,9 @@ def __init__(self, *args, **kwargs): # 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 request_denied_get_head_body (int): Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body.. [optional] # noqa: E501 + service_ddos_requests_detected (int): Number of requests classified as a DDoS attack against a customer origin or service.. [optional] # noqa: E501 + service_ddos_requests_mitigated (int): Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform.. [optional] # noqa: E501 + service_ddos_requests_allowed (int): Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected.. [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 46cc359..ddbeb1b 100644 --- a/fastly/model/realtime_measurements.py +++ b/fastly/model/realtime_measurements.py @@ -308,13 +308,6 @@ def openapi_types(): 'bot_challenge_complete_tokens_issued': (int,), # noqa: E501 'ddos_action_downgrade': (int,), # noqa: E501 'ddos_action_downgraded_connections': (int,), # noqa: E501 - 'vcl_on_compute_hit_requests': (int,), # noqa: E501 - 'vcl_on_compute_miss_requests': (int,), # noqa: E501 - 'vcl_on_compute_pass_requests': (int,), # noqa: E501 - 'vcl_on_compute_error_requests': (int,), # noqa: E501 - 'vcl_on_compute_synth_requests': (int,), # noqa: E501 - 'vcl_on_compute_edge_hit_requests': (int,), # noqa: E501 - 'vcl_on_compute_edge_miss_requests': (int,), # noqa: E501 'all_hit_requests': (int,), # noqa: E501 'all_miss_requests': (int,), # noqa: E501 'all_pass_requests': (int,), # noqa: E501 @@ -329,6 +322,9 @@ def openapi_types(): 'all_status_5xx': (int,), # noqa: E501 'origin_offload': (float,), # noqa: E501 'request_denied_get_head_body': (int,), # noqa: E501 + 'service_ddos_requests_detected': (int,), # noqa: E501 + 'service_ddos_requests_mitigated': (int,), # noqa: E501 + 'service_ddos_requests_allowed': (int,), # noqa: E501 } @cached_property @@ -566,13 +562,6 @@ def discriminator(): 'bot_challenge_complete_tokens_issued': 'bot_challenge_complete_tokens_issued', # noqa: E501 'ddos_action_downgrade': 'ddos_action_downgrade', # noqa: E501 'ddos_action_downgraded_connections': 'ddos_action_downgraded_connections', # noqa: E501 - 'vcl_on_compute_hit_requests': 'vcl_on_compute_hit_requests', # noqa: E501 - 'vcl_on_compute_miss_requests': 'vcl_on_compute_miss_requests', # noqa: E501 - 'vcl_on_compute_pass_requests': 'vcl_on_compute_pass_requests', # noqa: E501 - 'vcl_on_compute_error_requests': 'vcl_on_compute_error_requests', # noqa: E501 - 'vcl_on_compute_synth_requests': 'vcl_on_compute_synth_requests', # noqa: E501 - 'vcl_on_compute_edge_hit_requests': 'vcl_on_compute_edge_hit_requests', # noqa: E501 - 'vcl_on_compute_edge_miss_requests': 'vcl_on_compute_edge_miss_requests', # noqa: E501 'all_hit_requests': 'all_hit_requests', # noqa: E501 'all_miss_requests': 'all_miss_requests', # noqa: E501 'all_pass_requests': 'all_pass_requests', # noqa: E501 @@ -587,6 +576,9 @@ def discriminator(): 'all_status_5xx': 'all_status_5xx', # noqa: E501 'origin_offload': 'origin_offload', # noqa: E501 'request_denied_get_head_body': 'request_denied_get_head_body', # noqa: E501 + 'service_ddos_requests_detected': 'service_ddos_requests_detected', # noqa: E501 + 'service_ddos_requests_mitigated': 'service_ddos_requests_mitigated', # noqa: E501 + 'service_ddos_requests_allowed': 'service_ddos_requests_allowed', # noqa: E501 } read_only_vars = { @@ -859,13 +851,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 bot_challenge_complete_tokens_issued (int): The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success.. [optional] # noqa: E501 ddos_action_downgrade (int): The number of times the downgrade action was taken. The downgrade action restricts the client to http1.. [optional] # noqa: E501 ddos_action_downgraded_connections (int): The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1.. [optional] # noqa: E501 - vcl_on_compute_hit_requests (int): Number of cache hits for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_miss_requests (int): Number of cache misses for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_error_requests (int): Number of cache errors for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_synth_requests (int): Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_hit_requests (int): Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_miss_requests (int): Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute.. [optional] # noqa: E501 all_hit_requests (int): Number of cache hits for a VCL service.. [optional] # noqa: E501 all_miss_requests (int): Number of cache misses for a VCL service.. [optional] # noqa: E501 all_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service.. [optional] # noqa: E501 @@ -880,6 +865,9 @@ def _from_openapi_data(cls, *args, **kwargs): # 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 request_denied_get_head_body (int): Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body.. [optional] # noqa: E501 + service_ddos_requests_detected (int): Number of requests classified as a DDoS attack against a customer origin or service.. [optional] # noqa: E501 + service_ddos_requests_mitigated (int): Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform.. [optional] # noqa: E501 + service_ddos_requests_allowed (int): Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -1190,13 +1178,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 bot_challenge_complete_tokens_issued (int): The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success.. [optional] # noqa: E501 ddos_action_downgrade (int): The number of times the downgrade action was taken. The downgrade action restricts the client to http1.. [optional] # noqa: E501 ddos_action_downgraded_connections (int): The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1.. [optional] # noqa: E501 - vcl_on_compute_hit_requests (int): Number of cache hits for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_miss_requests (int): Number of cache misses for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_error_requests (int): Number of cache errors for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_synth_requests (int): Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_hit_requests (int): Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_miss_requests (int): Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute.. [optional] # noqa: E501 all_hit_requests (int): Number of cache hits for a VCL service.. [optional] # noqa: E501 all_miss_requests (int): Number of cache misses for a VCL service.. [optional] # noqa: E501 all_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service.. [optional] # noqa: E501 @@ -1211,6 +1192,9 @@ def __init__(self, *args, **kwargs): # 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 request_denied_get_head_body (int): Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body.. [optional] # noqa: E501 + service_ddos_requests_detected (int): Number of requests classified as a DDoS attack against a customer origin or service.. [optional] # noqa: E501 + service_ddos_requests_mitigated (int): Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform.. [optional] # noqa: E501 + service_ddos_requests_allowed (int): Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/fastly/model/results.py b/fastly/model/results.py index fdd2c67..df55d70 100644 --- a/fastly/model/results.py +++ b/fastly/model/results.py @@ -308,13 +308,6 @@ def openapi_types(): 'bot_challenges_failed': (int,), # noqa: E501 'ddos_action_downgrade': (int,), # noqa: E501 'ddos_action_downgraded_connections': (int,), # noqa: E501 - 'vcl_on_compute_hit_requests': (int,), # noqa: E501 - 'vcl_on_compute_miss_requests': (int,), # noqa: E501 - 'vcl_on_compute_pass_requests': (int,), # noqa: E501 - 'vcl_on_compute_error_requests': (int,), # noqa: E501 - 'vcl_on_compute_synth_requests': (int,), # noqa: E501 - 'vcl_on_compute_edge_hit_requests': (int,), # noqa: E501 - 'vcl_on_compute_edge_miss_requests': (int,), # noqa: E501 'all_hit_requests': (int,), # noqa: E501 'all_miss_requests': (int,), # noqa: E501 'all_pass_requests': (int,), # noqa: E501 @@ -329,6 +322,9 @@ def openapi_types(): 'all_status_5xx': (int,), # noqa: E501 'origin_offload': (float,), # noqa: E501 'request_denied_get_head_body': (int,), # noqa: E501 + 'service_ddos_requests_detected': (int,), # noqa: E501 + 'service_ddos_requests_mitigated': (int,), # noqa: E501 + 'service_ddos_requests_allowed': (int,), # noqa: E501 'service_id': (str,), # noqa: E501 'start_time': (int,), # noqa: E501 } @@ -568,13 +564,6 @@ def discriminator(): 'bot_challenges_failed': 'bot_challenges_failed', # noqa: E501 'ddos_action_downgrade': 'ddos_action_downgrade', # noqa: E501 'ddos_action_downgraded_connections': 'ddos_action_downgraded_connections', # noqa: E501 - 'vcl_on_compute_hit_requests': 'vcl_on_compute_hit_requests', # noqa: E501 - 'vcl_on_compute_miss_requests': 'vcl_on_compute_miss_requests', # noqa: E501 - 'vcl_on_compute_pass_requests': 'vcl_on_compute_pass_requests', # noqa: E501 - 'vcl_on_compute_error_requests': 'vcl_on_compute_error_requests', # noqa: E501 - 'vcl_on_compute_synth_requests': 'vcl_on_compute_synth_requests', # noqa: E501 - 'vcl_on_compute_edge_hit_requests': 'vcl_on_compute_edge_hit_requests', # noqa: E501 - 'vcl_on_compute_edge_miss_requests': 'vcl_on_compute_edge_miss_requests', # noqa: E501 'all_hit_requests': 'all_hit_requests', # noqa: E501 'all_miss_requests': 'all_miss_requests', # noqa: E501 'all_pass_requests': 'all_pass_requests', # noqa: E501 @@ -589,6 +578,9 @@ def discriminator(): 'all_status_5xx': 'all_status_5xx', # noqa: E501 'origin_offload': 'origin_offload', # noqa: E501 'request_denied_get_head_body': 'request_denied_get_head_body', # noqa: E501 + 'service_ddos_requests_detected': 'service_ddos_requests_detected', # noqa: E501 + 'service_ddos_requests_mitigated': 'service_ddos_requests_mitigated', # noqa: E501 + 'service_ddos_requests_allowed': 'service_ddos_requests_allowed', # noqa: E501 'service_id': 'service_id', # noqa: E501 'start_time': 'start_time', # noqa: E501 } @@ -864,13 +856,6 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 bot_challenges_failed (int): The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution.. [optional] # noqa: E501 ddos_action_downgrade (int): The number of times the downgrade action was taken. The downgrade action restricts the client to http1.. [optional] # noqa: E501 ddos_action_downgraded_connections (int): The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1.. [optional] # noqa: E501 - vcl_on_compute_hit_requests (int): Number of cache hits for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_miss_requests (int): Number of cache misses for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_error_requests (int): Number of cache errors for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_synth_requests (int): Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_hit_requests (int): Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_miss_requests (int): Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute.. [optional] # noqa: E501 all_hit_requests (int): Number of cache hits for a VCL service.. [optional] # noqa: E501 all_miss_requests (int): Number of cache misses for a VCL service.. [optional] # noqa: E501 all_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service.. [optional] # noqa: E501 @@ -885,6 +870,9 @@ def _from_openapi_data(cls, *args, **kwargs): # 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 request_denied_get_head_body (int): Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body.. [optional] # noqa: E501 + service_ddos_requests_detected (int): Number of requests classified as a DDoS attack against a customer origin or service.. [optional] # noqa: E501 + service_ddos_requests_mitigated (int): Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform.. [optional] # noqa: E501 + service_ddos_requests_allowed (int): Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected.. [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 """ @@ -1197,13 +1185,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 bot_challenges_failed (int): The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution.. [optional] # noqa: E501 ddos_action_downgrade (int): The number of times the downgrade action was taken. The downgrade action restricts the client to http1.. [optional] # noqa: E501 ddos_action_downgraded_connections (int): The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1.. [optional] # noqa: E501 - vcl_on_compute_hit_requests (int): Number of cache hits for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_miss_requests (int): Number of cache misses for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_error_requests (int): Number of cache errors for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_synth_requests (int): Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_hit_requests (int): Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute.. [optional] # noqa: E501 - vcl_on_compute_edge_miss_requests (int): Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute.. [optional] # noqa: E501 all_hit_requests (int): Number of cache hits for a VCL service.. [optional] # noqa: E501 all_miss_requests (int): Number of cache misses for a VCL service.. [optional] # noqa: E501 all_pass_requests (int): Number of requests that passed through the CDN without being cached for a VCL service.. [optional] # noqa: E501 @@ -1218,6 +1199,9 @@ def __init__(self, *args, **kwargs): # 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 request_denied_get_head_body (int): Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body.. [optional] # noqa: E501 + service_ddos_requests_detected (int): Number of requests classified as a DDoS attack against a customer origin or service.. [optional] # noqa: E501 + service_ddos_requests_mitigated (int): Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform.. [optional] # noqa: E501 + service_ddos_requests_allowed (int): Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected.. [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/set_configuration.py b/fastly/model/set_configuration.py index 17c8f55..0693946 100644 --- a/fastly/model/set_configuration.py +++ b/fastly/model/set_configuration.py @@ -81,6 +81,7 @@ def openapi_types(): return { 'workspace_id': (str,), # noqa: E501 'traffic_ramp': (str,), # noqa: E501 + 'mode': (str,), # noqa: E501 } @cached_property @@ -91,6 +92,7 @@ def discriminator(): attribute_map = { 'workspace_id': 'workspace_id', # noqa: E501 'traffic_ramp': 'traffic_ramp', # noqa: E501 + 'mode': 'mode', # noqa: E501 } read_only_vars = { @@ -136,6 +138,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) workspace_id (str): The new workspace_id. Required in the `PUT` request body when `product_id` is `ngwaf`. Optional in the `PATCH` request body for `ngwaf`.. [optional] # noqa: E501 traffic_ramp (str): The new traffic ramp. Optional in the `PATCH` request body for `ngwaf`.. [optional] # noqa: E501 + mode (str): The new mode to run the product in. One of `block`, `log`, or `off`. Optional in the `PATCH` request body for `ddos_protection`.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -219,6 +222,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) workspace_id (str): The new workspace_id. Required in the `PUT` request body when `product_id` is `ngwaf`. Optional in the `PATCH` request body for `ngwaf`.. [optional] # noqa: E501 traffic_ramp (str): The new traffic ramp. Optional in the `PATCH` request body for `ngwaf`.. [optional] # noqa: E501 + mode (str): The new mode to run the product in. One of `block`, `log`, or `off`. Optional in the `PATCH` request body for `ddos_protection`.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/fastly/model/usagemetric.py b/fastly/model/usagemetric.py new file mode 100644 index 0000000..0c4058f --- /dev/null +++ b/fastly/model/usagemetric.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 Usagemetric(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 { + 'month': (str,), # noqa: E501 + 'usage_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'region': (str,), # noqa: E501 + 'unit': (str,), # noqa: E501 + 'quantity': (float,), # noqa: E501 + 'raw_quantity': (float,), # noqa: E501 + 'product_id': (str,), # noqa: E501 + 'last_updated_at': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'month': 'month', # noqa: E501 + 'usage_type': 'usage_type', # noqa: E501 + 'name': 'name', # noqa: E501 + 'region': 'region', # noqa: E501 + 'unit': 'unit', # noqa: E501 + 'quantity': 'quantity', # noqa: E501 + 'raw_quantity': 'raw_quantity', # noqa: E501 + 'product_id': 'product_id', # noqa: E501 + 'last_updated_at': 'last_updated_at', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Usagemetric - 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,) + month (str): The year and month of the usage element.. [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 + name (str): Full name of the product usage type as it might appear on a customer's invoice.. [optional] # noqa: E501 + region (str): The geographical area applicable for regionally based products.. [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 + quantity (float): The quantity of the usage for the product.. [optional] # noqa: E501 + raw_quantity (float): The raw units measured for the product.. [optional] # noqa: E501 + product_id (str): The product identifier associated with the usage type. This corresponds to a Fastly product offering.. [optional] # noqa: E501 + last_updated_at (str): The date when the usage metric was last updated.. [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 + """Usagemetric - 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,) + month (str): The year and month of the usage element.. [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 + name (str): Full name of the product usage type as it might appear on a customer's invoice.. [optional] # noqa: E501 + region (str): The geographical area applicable for regionally based products.. [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 + quantity (float): The quantity of the usage for the product.. [optional] # noqa: E501 + raw_quantity (float): The raw units measured for the product.. [optional] # noqa: E501 + product_id (str): The product identifier associated with the usage type. This corresponds to a Fastly product offering.. [optional] # noqa: E501 + last_updated_at (str): The date when the usage metric was last updated.. [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/usagemetrics.py b/fastly/model/usagemetrics.py new file mode 100644 index 0000000..258b5cd --- /dev/null +++ b/fastly/model/usagemetrics.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.usagemetric import Usagemetric + globals()['Usagemetric'] = Usagemetric + + +class Usagemetrics(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': ([Usagemetric],), # 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 + """Usagemetrics - 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 ([Usagemetric]): [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 + """Usagemetrics - 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 ([Usagemetric]): [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/value_field.py b/fastly/model/value_field.py new file mode 100644 index 0000000..d8e21fc --- /dev/null +++ b/fastly/model/value_field.py @@ -0,0 +1,315 @@ +""" + 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.value_float_array import ValueFloatArray + from fastly.model.value_integer_array import ValueIntegerArray + from fastly.model.value_string_array import ValueStringArray + globals()['ValueFloatArray'] = ValueFloatArray + globals()['ValueIntegerArray'] = ValueIntegerArray + globals()['ValueStringArray'] = ValueStringArray + + +class ValueField(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 { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValueField - 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__,) + + 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 + """ValueField - 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__,) + + 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': [ + ], + 'oneOf': [ + ValueFloatArray, + ValueIntegerArray, + ValueStringArray, + bool, + float, + int, + str, + ], + } diff --git a/fastly/model/value_float_array.py b/fastly/model/value_float_array.py new file mode 100644 index 0000000..5b296c2 --- /dev/null +++ b/fastly/model/value_float_array.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 + + + +class ValueFloatArray(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 = 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': ([float],), + } + + @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): + """ValueFloatArray - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([float]): # noqa: E501 + + Keyword Args: + value ([float]): # 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): + """ValueFloatArray - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([float]): # noqa: E501 + + Keyword Args: + value ([float]): # 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/value_integer_array.py b/fastly/model/value_integer_array.py new file mode 100644 index 0000000..b14214b --- /dev/null +++ b/fastly/model/value_integer_array.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 + + + +class ValueIntegerArray(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 = 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): + """ValueIntegerArray - 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]): # noqa: E501 + + Keyword Args: + value ([int]): # 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): + """ValueIntegerArray - 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]): # noqa: E501 + + Keyword Args: + value ([int]): # 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/value_string_array.py b/fastly/model/value_string_array.py new file mode 100644 index 0000000..258829b --- /dev/null +++ b/fastly/model/value_string_array.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 + + + +class ValueStringArray(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 = 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): + """ValueStringArray - 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]): # noqa: E501 + + Keyword Args: + value ([str]): # 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): + """ValueStringArray - 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]): # noqa: E501 + + Keyword Args: + value ([str]): # 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/values503_responses.py b/fastly/model/values503_responses.py new file mode 100644 index 0000000..d66df86 --- /dev/null +++ b/fastly/model/values503_responses.py @@ -0,0 +1,261 @@ +""" + 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 Values503Responses(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 { + 'url': (str,), # noqa: E501 + 'rate_per_url': (float,), # noqa: E501 + '_503_rate_per_url': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'url': 'url', # noqa: E501 + 'rate_per_url': 'rate_per_url', # noqa: E501 + '_503_rate_per_url': '503_rate_per_url', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Values503Responses - 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,) + url (str): The HTTP request path.. [optional] # noqa: E501 + rate_per_url (float): The rate at which the reason in this dimension occurs among responses to this URL with a 503 status code.. [optional] # noqa: E501 + _503_rate_per_url (float): The rate at which 503 status codes are returned for this URL.. [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 + """Values503Responses - 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,) + url (str): The HTTP request path.. [optional] # noqa: E501 + rate_per_url (float): The rate at which the reason in this dimension occurs among responses to this URL with a 503 status code.. [optional] # noqa: E501 + _503_rate_per_url (float): The rate at which 503 status codes are returned for this URL.. [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_bandwidth.py b/fastly/model/values_bandwidth.py new file mode 100644 index 0000000..08aaea4 --- /dev/null +++ b/fastly/model/values_bandwidth.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 ValuesBandwidth(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 { + 'average_bandwidth_bytes': (float,), # noqa: E501 + 'bandwidth_percentage': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'average_bandwidth_bytes': 'average_bandwidth_bytes', # noqa: E501 + 'bandwidth_percentage': 'bandwidth_percentage', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValuesBandwidth - 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,) + average_bandwidth_bytes (float): The average bandwidth in bytes for responses to requests to the URL in the current dimension.. [optional] # noqa: E501 + bandwidth_percentage (float): The total bandwidth percentage for all responses to requests to the URL in the current dimension.. [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 + """ValuesBandwidth - 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,) + average_bandwidth_bytes (float): The average bandwidth in bytes for responses to requests to the URL in the current dimension.. [optional] # noqa: E501 + bandwidth_percentage (float): The total bandwidth percentage for all responses to requests to the URL in the current dimension.. [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_browser.py b/fastly/model/values_browser.py new file mode 100644 index 0000000..c7b1571 --- /dev/null +++ b/fastly/model/values_browser.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 ValuesBrowser(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 { + 'browser_version': (str,), # noqa: E501 + 'rate': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'browser_version': 'browser_version', # noqa: E501 + 'rate': 'rate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValuesBrowser - 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,) + browser_version (str): The version of the client's browser.. [optional] # noqa: E501 + rate (float): The percentage of requests by this version of the browser specified in the dimension.. [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 + """ValuesBrowser - 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,) + browser_version (str): The version of the client's browser.. [optional] # noqa: E501 + rate (float): The percentage of requests by this version of the browser specified in the dimension.. [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_cache_hit_ratio.py b/fastly/model/values_cache_hit_ratio.py new file mode 100644 index 0000000..5bd89b2 --- /dev/null +++ b/fastly/model/values_cache_hit_ratio.py @@ -0,0 +1,253 @@ +""" + 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 ValuesCacheHitRatio(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 { + 'cache_hit_ratio': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cache_hit_ratio': 'cache_hit_ratio', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValuesCacheHitRatio - 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,) + cache_hit_ratio (float): The cache hit ratio for the URL specified in the dimension.. [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 + """ValuesCacheHitRatio - 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,) + cache_hit_ratio (float): The cache hit ratio for the URL specified in the dimension.. [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_country_stats.py b/fastly/model/values_country_stats.py new file mode 100644 index 0000000..739a6b4 --- /dev/null +++ b/fastly/model/values_country_stats.py @@ -0,0 +1,261 @@ +""" + 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 ValuesCountryStats(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 { + 'region': (str,), # noqa: E501 + 'region_chr': (float,), # noqa: E501 + 'region_error_rate': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'region': 'region', # noqa: E501 + 'region_chr': 'region_chr', # noqa: E501 + 'region_error_rate': 'region_error_rate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValuesCountryStats - 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,) + region (str): The client's country subdivision code as defined by ISO 3166-2.. [optional] # noqa: E501 + region_chr (float): The cache hit ratio for the region.. [optional] # noqa: E501 + region_error_rate (float): The error rate for the region.. [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 + """ValuesCountryStats - 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,) + region (str): The client's country subdivision code as defined by ISO 3166-2.. [optional] # noqa: E501 + region_chr (float): The cache hit ratio for the region.. [optional] # noqa: E501 + region_error_rate (float): The error rate for the region.. [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_duration.py b/fastly/model/values_duration.py new file mode 100644 index 0000000..0e18fd8 --- /dev/null +++ b/fastly/model/values_duration.py @@ -0,0 +1,261 @@ +""" + 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 ValuesDuration(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 { + 'average_response_time': (float,), # noqa: E501 + 'p95_response_time': (float,), # noqa: E501 + 'response_time_percentage': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'average_response_time': 'average_response_time', # noqa: E501 + 'p95_response_time': 'p95_response_time', # noqa: E501 + 'response_time_percentage': 'response_time_percentage', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValuesDuration - 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,) + average_response_time (float): The average time in seconds to respond to requests to the URL in the current dimension.. [optional] # noqa: E501 + p95_response_time (float): The P95 time in seconds to respond to requests to the URL in the current dimension.. [optional] # noqa: E501 + response_time_percentage (float): The total percentage of time to respond to all requests to the URL in the current dimension.. [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 + """ValuesDuration - 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,) + average_response_time (float): The average time in seconds to respond to requests to the URL in the current dimension.. [optional] # noqa: E501 + p95_response_time (float): The P95 time in seconds to respond to requests to the URL in the current dimension.. [optional] # noqa: E501 + response_time_percentage (float): The total percentage of time to respond to all requests to the URL in the current dimension.. [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_misses.py b/fastly/model/values_misses.py new file mode 100644 index 0000000..875ce75 --- /dev/null +++ b/fastly/model/values_misses.py @@ -0,0 +1,253 @@ +""" + 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 ValuesMisses(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 { + 'miss_rate': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'miss_rate': 'miss_rate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValuesMisses - 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,) + miss_rate (float): The miss rate for requests to the URL in the current dimension.. [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 + """ValuesMisses - 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,) + miss_rate (float): The miss rate for requests to the URL in the current dimension.. [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_rate.py b/fastly/model/values_rate.py new file mode 100644 index 0000000..44e58bb --- /dev/null +++ b/fastly/model/values_rate.py @@ -0,0 +1,253 @@ +""" + 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 ValuesRate(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 { + 'rate': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'rate': 'rate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValuesRate - 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,) + rate (float): The percentage of requests matching the value in the current dimension.. [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 + """ValuesRate - 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,) + rate (float): The percentage of requests matching the value in the current dimension.. [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_requests.py b/fastly/model/values_requests.py new file mode 100644 index 0000000..64b7af5 --- /dev/null +++ b/fastly/model/values_requests.py @@ -0,0 +1,253 @@ +""" + 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 ValuesRequests(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 { + 'request_percentage': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'request_percentage': 'request_percentage', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValuesRequests - 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,) + request_percentage (float): The percentage of all requests made to the URL in the current dimension.. [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 + """ValuesRequests - 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,) + request_percentage (float): The percentage of all requests made to the URL in the current dimension.. [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_status_codes.py b/fastly/model/values_status_codes.py new file mode 100644 index 0000000..6e115e5 --- /dev/null +++ b/fastly/model/values_status_codes.py @@ -0,0 +1,261 @@ +""" + 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 ValuesStatusCodes(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 { + 'url': (str,), # noqa: E501 + 'rate_per_status': (float,), # noqa: E501 + 'rate_per_url': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'url': 'url', # noqa: E501 + 'rate_per_status': 'rate_per_status', # noqa: E501 + 'rate_per_url': 'rate_per_url', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ValuesStatusCodes - 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,) + url (str): The HTTP request path.. [optional] # noqa: E501 + rate_per_status (float): The URL accounts for this percentage of the status code in this dimension.. [optional] # noqa: E501 + rate_per_url (float): The rate at which the status code in this dimension occurs for this URL.. [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 + """ValuesStatusCodes - 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,) + url (str): The HTTP request path.. [optional] # noqa: E501 + rate_per_status (float): The URL accounts for this percentage of the status code in this dimension.. [optional] # noqa: E501 + rate_per_url (float): The rate at which the status code in this dimension occurs for this URL.. [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/models/__init__.py b/fastly/models/__init__.py index 397734b..6e12be2 100644 --- a/fastly/models/__init__.py +++ b/fastly/models/__init__.py @@ -9,6 +9,8 @@ # import sys # sys.setrecursionlimit(n) +from fastly.model.access_key import AccessKey +from fastly.model.access_key_response import AccessKeyResponse from fastly.model.acl import Acl from fastly.model.acl_entry import AclEntry from fastly.model.acl_entry_response import AclEntryResponse @@ -124,6 +126,16 @@ from fastly.model.dictionary_response import DictionaryResponse from fastly.model.dictionary_response_all_of import DictionaryResponseAllOf from fastly.model.diff_response import DiffResponse +from fastly.model.dimension_attributes_country_stats import DimensionAttributesCountryStats +from fastly.model.dimension_attributes_rate import DimensionAttributesRate +from fastly.model.dimension_browser import DimensionBrowser +from fastly.model.dimension_content_type import DimensionContentType +from fastly.model.dimension_country import DimensionCountry +from fastly.model.dimension_device import DimensionDevice +from fastly.model.dimension_os import DimensionOs +from fastly.model.dimension_response import DimensionResponse +from fastly.model.dimension_status_code import DimensionStatusCode +from fastly.model.dimension_url import DimensionUrl from fastly.model.director import Director from fastly.model.director_backend import DirectorBackend from fastly.model.director_backend_all_of import DirectorBackendAllOf @@ -154,7 +166,12 @@ from fastly.model.event_data_items import EventDataItems from fastly.model.event_response import EventResponse from fastly.model.events_response import EventsResponse +from fastly.model.filter_field_item import FilterFieldItem from fastly.model.generic_token_error import GenericTokenError +from fastly.model.get_log_insights_response import GetLogInsightsResponse +from fastly.model.get_log_records_response import GetLogRecordsResponse +from fastly.model.get_log_records_response_meta import GetLogRecordsResponseMeta +from fastly.model.get_log_records_response_meta_filters import GetLogRecordsResponseMetaFilters 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 @@ -253,6 +270,14 @@ 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.log_insights import LogInsights +from fastly.model.log_insights_dimension_attributes import LogInsightsDimensionAttributes +from fastly.model.log_insights_dimensions import LogInsightsDimensions +from fastly.model.log_insights_meta import LogInsightsMeta +from fastly.model.log_insights_meta_filter import LogInsightsMetaFilter +from fastly.model.log_insights_values import LogInsightsValues +from fastly.model.log_property_service_id import LogPropertyServiceId +from fastly.model.log_record import LogRecord from fastly.model.logging_address_and_port import LoggingAddressAndPort from fastly.model.logging_azureblob_additional import LoggingAzureblobAdditional from fastly.model.logging_azureblob_response import LoggingAzureblobResponse @@ -284,6 +309,8 @@ from fastly.model.logging_generic_common_response_all_of1 import LoggingGenericCommonResponseAllOf1 from fastly.model.logging_google_pubsub_additional import LoggingGooglePubsubAdditional from fastly.model.logging_google_pubsub_response import LoggingGooglePubsubResponse +from fastly.model.logging_grafanacloudlogs_additional import LoggingGrafanacloudlogsAdditional +from fastly.model.logging_grafanacloudlogs_response import LoggingGrafanacloudlogsResponse from fastly.model.logging_heroku_additional import LoggingHerokuAdditional from fastly.model.logging_heroku_response import LoggingHerokuResponse from fastly.model.logging_honeycomb_additional import LoggingHoneycombAdditional @@ -692,6 +719,8 @@ 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.usagemetric import Usagemetric +from fastly.model.usagemetrics import Usagemetrics from fastly.model.user import User from fastly.model.user_response import UserResponse from fastly.model.user_response_read_only import UserResponseReadOnly @@ -699,8 +728,22 @@ from fastly.model.validator_result_data import ValidatorResultData from fastly.model.validator_result_data_attributes import ValidatorResultDataAttributes from fastly.model.validator_result_data_attributes_messages import ValidatorResultDataAttributesMessages +from fastly.model.value_field import ValueField +from fastly.model.value_float_array import ValueFloatArray +from fastly.model.value_integer_array import ValueIntegerArray +from fastly.model.value_string_array import ValueStringArray from fastly.model.values import Values +from fastly.model.values503_responses import Values503Responses +from fastly.model.values_bandwidth import ValuesBandwidth +from fastly.model.values_browser import ValuesBrowser +from fastly.model.values_cache_hit_ratio import ValuesCacheHitRatio +from fastly.model.values_country_stats import ValuesCountryStats from fastly.model.values_ddos import ValuesDdos +from fastly.model.values_duration import ValuesDuration +from fastly.model.values_misses import ValuesMisses +from fastly.model.values_rate import ValuesRate +from fastly.model.values_requests import ValuesRequests +from fastly.model.values_status_codes import ValuesStatusCodes from fastly.model.vcl import Vcl from fastly.model.vcl_diff import VclDiff from fastly.model.vcl_response import VclResponse diff --git a/setup.py b/setup.py index 1403d70..900b02f 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from pathlib import Path NAME = "fastly" -VERSION = "5.10.0" +VERSION = "6.0.0" # To install the library, run the following # # python setup.py install diff --git a/sig.json b/sig.json index 12052e1..4729e57 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "dbe8e713", "D": "4061d4ec"} +{"G": "8147d17d", "D": "c00fd741"}