From 074173cf88f15c4683123e758410886bb43a2dbc Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 28 Feb 2024 14:09:41 +0000 Subject: [PATCH] Generated v5.1.0 --- CHANGELOG.md | 26 +- README.md | 18 +- docs/Api/AutomationTokensApi.md | 4 +- docs/Api/BackendApi.md | 8 +- docs/Api/BillingInvoicesApi.md | 93 ++ docs/Api/DirectorApi.md | 4 +- docs/Api/DomainInspectorHistoricalApi.md | 8 +- docs/Api/KvStoreApi.md | 4 +- docs/Api/LoggingScalyrApi.md | 8 +- docs/Api/OriginInspectorHistoricalApi.md | 8 +- docs/Api/PoolApi.md | 8 +- docs/Api/PublishApi.md | 2 +- docs/Api/SecretStoreApi.md | 6 +- docs/Api/SecretStoreItemApi.md | 4 +- docs/Api/TlsCsrsApi.md | 52 + docs/Api/TokensApi.md | 2 +- docs/Api/VclApi.md | 2 +- docs/Api/WafActiveRulesApi.md | 2 +- ...nse.md => AutomationTokenErrorResponse.md} | 2 +- docs/Model/Backend.md | 2 +- docs/Model/BackendResponse.md | 2 +- docs/Model/Director.md | 2 +- docs/Model/DirectorResponse.md | 2 +- docs/Model/DomainInspectorRealtimeEntry.md | 2 +- docs/Model/Error.md | 13 + docs/Model/ErrorResponseData.md | 11 + docs/Model/EventAttributes.md | 2 +- docs/Model/Invoice.md | 18 + docs/Model/InvoiceResponse.md | 18 + docs/Model/Invoicelineitems.md | 18 + docs/Model/ListInvoicesResponse.md | 11 + docs/Model/Listinvoices.md | 11 + docs/Model/LoggingScalyrAdditional.md | 2 +- docs/Model/LoggingScalyrResponse.md | 2 +- docs/Model/Metadata.md | 13 + docs/Model/OriginInspectorRealtimeEntry.md | 2 +- docs/Model/PoolAdditional.md | 2 +- docs/Model/PoolResponse.md | 2 +- docs/Model/PoolResponsePost.md | 2 +- docs/Model/Pop.md | 4 +- docs/Model/RealtimeEntry.md | 2 +- docs/Model/Results.md | 2 + docs/Model/ServiceDetail.md | 2 +- docs/Model/ServiceListResponse.md | 4 +- docs/Model/ServiceListResponseAllOf.md | 4 +- docs/Model/ServiceResponse.md | 2 +- docs/Model/ServiceResponseAllOf.md | 2 +- .../TlsConfigurationResponseAttributes.md | 2 +- ...TlsConfigurationResponseAttributesAllOf.md | 2 +- docs/Model/TlsCsr.md | 10 + docs/Model/TlsCsrData.md | 12 + docs/Model/TlsCsrDataAttributes.md | 20 + docs/Model/TlsCsrErrorResponse.md | 10 + docs/Model/TlsCsrResponse.md | 10 + docs/Model/TlsCsrResponseAttributes.md | 10 + docs/Model/TlsCsrResponseData.md | 13 + docs/Model/TlsSubscriptionDataAttributes.md | 2 +- .../TlsSubscriptionResponseAttributes.md | 1 + .../TlsSubscriptionResponseAttributesAllOf.md | 1 + docs/Model/TypeTlsCsr.md | 9 + lib/Api/AutomationTokensApi.php | 86 +- lib/Api/BackendApi.php | 20 +- lib/Api/BillingInvoicesApi.php | 942 ++++++++++++++++++ lib/Api/DirectorApi.php | 10 +- lib/Api/DomainInspectorHistoricalApi.php | 20 +- lib/Api/KvStoreApi.php | 12 +- lib/Api/LoggingScalyrApi.php | 20 +- lib/Api/OriginInspectorHistoricalApi.php | 20 +- lib/Api/PoolApi.php | 20 +- lib/Api/SecretStoreApi.php | 27 +- lib/Api/SecretStoreItemApi.php | 10 +- lib/Api/TlsCsrsApi.php | 444 +++++++++ lib/Configuration.php | 4 +- ...e.php => AutomationTokenErrorResponse.php} | 8 +- lib/Model/Backend.php | 2 +- lib/Model/BackendResponse.php | 2 +- lib/Model/Director.php | 2 +- lib/Model/DirectorResponse.php | 2 +- lib/Model/DomainInspectorRealtimeEntry.php | 2 +- lib/Model/Error.php | 404 ++++++++ lib/Model/ErrorResponseData.php | 344 +++++++ lib/Model/EventAttributes.php | 8 + lib/Model/Invoice.php | 554 ++++++++++ lib/Model/InvoiceResponse.php | 554 ++++++++++ lib/Model/Invoicelineitems.php | 554 ++++++++++ lib/Model/ListInvoicesResponse.php | 344 +++++++ lib/Model/Listinvoices.php | 344 +++++++ lib/Model/LoggingScalyrAdditional.php | 2 +- lib/Model/LoggingScalyrResponse.php | 2 +- lib/Model/Metadata.php | 405 ++++++++ lib/Model/OriginInspectorRealtimeEntry.php | 2 +- lib/Model/PoolAdditional.php | 2 +- lib/Model/PoolResponse.php | 2 +- lib/Model/PoolResponsePost.php | 2 +- lib/Model/Pop.php | 4 +- lib/Model/RealtimeEntry.php | 2 +- lib/Model/RelationshipTlsCertificate.php | 2 +- lib/Model/RelationshipTlsConfiguration.php | 2 +- lib/Model/Results.php | 60 ++ lib/Model/ServiceDetail.php | 2 +- lib/Model/ServiceListResponse.php | 4 +- lib/Model/ServiceListResponseAllOf.php | 4 +- lib/Model/ServiceResponse.php | 2 +- lib/Model/ServiceResponseAllOf.php | 2 +- .../TlsConfigurationResponseAttributes.php | 2 +- ...lsConfigurationResponseAttributesAllOf.php | 2 +- lib/Model/TlsCsr.php | 314 ++++++ lib/Model/TlsCsrData.php | 374 +++++++ lib/Model/TlsCsrDataAttributes.php | 651 ++++++++++++ lib/Model/TlsCsrErrorResponse.php | 314 ++++++ lib/Model/TlsCsrResponse.php | 314 ++++++ lib/Model/TlsCsrResponseAttributes.php | 314 ++++++ lib/Model/TlsCsrResponseData.php | 404 ++++++++ lib/Model/TlsSubscriptionDataAttributes.php | 2 + .../TlsSubscriptionResponseAttributes.php | 40 +- ...TlsSubscriptionResponseAttributesAllOf.php | 40 +- lib/Model/TypeTlsCsr.php | 54 + sig.json | 2 +- 118 files changed, 8383 insertions(+), 226 deletions(-) create mode 100644 docs/Api/BillingInvoicesApi.md create mode 100644 docs/Api/TlsCsrsApi.md rename docs/Model/{ErrorResponse.md => AutomationTokenErrorResponse.md} (91%) create mode 100644 docs/Model/Error.md create mode 100644 docs/Model/ErrorResponseData.md create mode 100644 docs/Model/Invoice.md create mode 100644 docs/Model/InvoiceResponse.md create mode 100644 docs/Model/Invoicelineitems.md create mode 100644 docs/Model/ListInvoicesResponse.md create mode 100644 docs/Model/Listinvoices.md create mode 100644 docs/Model/Metadata.md create mode 100644 docs/Model/TlsCsr.md create mode 100644 docs/Model/TlsCsrData.md create mode 100644 docs/Model/TlsCsrDataAttributes.md create mode 100644 docs/Model/TlsCsrErrorResponse.md create mode 100644 docs/Model/TlsCsrResponse.md create mode 100644 docs/Model/TlsCsrResponseAttributes.md create mode 100644 docs/Model/TlsCsrResponseData.md create mode 100644 docs/Model/TypeTlsCsr.md create mode 100644 lib/Api/BillingInvoicesApi.php create mode 100644 lib/Api/TlsCsrsApi.php rename lib/Model/{ErrorResponse.php => AutomationTokenErrorResponse.php} (97%) create mode 100644 lib/Model/Error.php create mode 100644 lib/Model/ErrorResponseData.php create mode 100644 lib/Model/Invoice.php create mode 100644 lib/Model/InvoiceResponse.php create mode 100644 lib/Model/Invoicelineitems.php create mode 100644 lib/Model/ListInvoicesResponse.php create mode 100644 lib/Model/Listinvoices.php create mode 100644 lib/Model/Metadata.php create mode 100644 lib/Model/TlsCsr.php create mode 100644 lib/Model/TlsCsrData.php create mode 100644 lib/Model/TlsCsrDataAttributes.php create mode 100644 lib/Model/TlsCsrErrorResponse.php create mode 100644 lib/Model/TlsCsrResponse.php create mode 100644 lib/Model/TlsCsrResponseAttributes.php create mode 100644 lib/Model/TlsCsrResponseData.php create mode 100644 lib/Model/TypeTlsCsr.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 320c5b37..ef2875e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [v5.1.0](https://github.com/fastly/fastly-php/releases/tag/release/v5.1.0) (2024-02-28) + +**Enhancements:** + +- feat(billing): add 'get invoice by invoice ID' endpoint. +- feat(billing): add 'list invoices' endpoint. +- feat(image_opto): add 'shield' and 'transform' methods and fields. +- feat(secret_store): add 'name' filter. +- feat(tls): add 'create CSR' endpoint. +- feat(tls_subscription): add 'active order' methods and fields. + +**Documentation:** + +- doc(backend) fix openssl link. +- doc(director,domain_inspector,pool,realtime) fix POPs link. +- doc(service) fix service version link. +- doc(tls) fix activation link. + ## [v5.0.1](https://github.com/fastly/fastly-php/releases/tag/release/v5.0.1) (2024-02-19) **Bug fixes:** @@ -284,7 +302,7 @@ Substantial changes were made to the underlying OpenAPI specification that produ **Enhancements:** -* New interface from code-generated API client [#43](https://github.com/fastly/fastly-php/pull/43) - * [Blog post: Better Fastly API clients with OpenAPI Generator](https://dev.to/fastly/better-fastly-api-clients-with-openapi-generator-3lno) - * [Documentation](https://github.com/fastly/fastly-php#documentation-for-api-endpoints) - * [Unsupported API endpoints](https://github.com/fastly/fastly-php#issues) +- New interface from code-generated API client [#43](https://github.com/fastly/fastly-php/pull/43) + - [Blog post: Better Fastly API clients with OpenAPI Generator](https://dev.to/fastly/better-fastly-api-clients-with-openapi-generator-3lno) + - [Documentation](https://github.com/fastly/fastly-php#documentation-for-api-endpoints) + - [Unsupported API endpoints](https://github.com/fastly/fastly-php#issues) diff --git a/README.md b/README.md index 0d2d3aa8..cc93fa9c 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,8 @@ Class | Method | Description [*BillingAddressApi*](docs/Api/BillingAddressApi.md) | [**deleteBillingAddr**](docs/Api/BillingAddressApi.md#deletebillingaddr) | Delete a billing address [*BillingAddressApi*](docs/Api/BillingAddressApi.md) | [**getBillingAddr**](docs/Api/BillingAddressApi.md#getbillingaddr) | Get a billing address [*BillingAddressApi*](docs/Api/BillingAddressApi.md) | [**updateBillingAddr**](docs/Api/BillingAddressApi.md#updatebillingaddr) | Update a billing address +[*BillingInvoicesApi*](docs/Api/BillingInvoicesApi.md) | [**getInvoiceByInvoiceId**](docs/Api/BillingInvoicesApi.md#getinvoicebyinvoiceid) | Get invoice by ID. +[*BillingInvoicesApi*](docs/Api/BillingInvoicesApi.md) | [**listInvoices**](docs/Api/BillingInvoicesApi.md#listinvoices) | List of invoices. [*CacheSettingsApi*](docs/Api/CacheSettingsApi.md) | [**createCacheSettings**](docs/Api/CacheSettingsApi.md#createcachesettings) | Create a cache settings object [*CacheSettingsApi*](docs/Api/CacheSettingsApi.md) | [**deleteCacheSettings**](docs/Api/CacheSettingsApi.md#deletecachesettings) | Delete a cache settings object [*CacheSettingsApi*](docs/Api/CacheSettingsApi.md) | [**getCacheSettings**](docs/Api/CacheSettingsApi.md#getcachesettings) | Get a cache settings object @@ -525,6 +527,7 @@ Class | Method | Description [*TlsConfigurationsApi*](docs/Api/TlsConfigurationsApi.md) | [**getTlsConfig**](docs/Api/TlsConfigurationsApi.md#gettlsconfig) | Get a TLS configuration [*TlsConfigurationsApi*](docs/Api/TlsConfigurationsApi.md) | [**listTlsConfigs**](docs/Api/TlsConfigurationsApi.md#listtlsconfigs) | List TLS configurations [*TlsConfigurationsApi*](docs/Api/TlsConfigurationsApi.md) | [**updateTlsConfig**](docs/Api/TlsConfigurationsApi.md#updatetlsconfig) | Update a TLS configuration +[*TlsCsrsApi*](docs/Api/TlsCsrsApi.md) | [**createCsr**](docs/Api/TlsCsrsApi.md#createcsr) | Create CSR [*TlsDomainsApi*](docs/Api/TlsDomainsApi.md) | [**listTlsDomains**](docs/Api/TlsDomainsApi.md#listtlsdomains) | List TLS domains [*TlsPrivateKeysApi*](docs/Api/TlsPrivateKeysApi.md) | [**createTlsKey**](docs/Api/TlsPrivateKeysApi.md#createtlskey) | Create a TLS private key [*TlsPrivateKeysApi*](docs/Api/TlsPrivateKeysApi.md) | [**deleteTlsKey**](docs/Api/TlsPrivateKeysApi.md#deletetlskey) | Delete a TLS private key @@ -611,12 +614,15 @@ Class | Method | Description The fastly-php API client currently does not support the following endpoints: -- [`/resources/stores/kv/{store_id}/batch`](https://developer.fastly.com/reference/api/services/resources/kv-store-item) (PUT) -- [`/tls/activations/{tls_activation_id}`](https://developer.fastly.com/reference/api/tls/mutual-tls/activations) (GET, PATCH) -- [`/tls/activations`](https://developer.fastly.com/reference/api/tls/mutual-tls/activations) (GET) -- [`/v1/channel/{service_id}/ts/h/limit/{max_entries}`](https://developer.fastly.com/reference/api/metrics-stats/origin-insights) (GET) -- [`/v1/channel/{service_id}/ts/h`](https://developer.fastly.com/reference/api/metrics-stats/origin-insights) (GET) -- [`/v1/channel/{service_id}/ts/{start_timestamp}`](https://developer.fastly.com/reference/api/metrics-stats/origin-insights) (GET) +- [`/alerts/definitions/{definition_id}`](https://www.fastly.com/documentation/reference/api/observability/alerts/definitions) (DELETE, GET, PUT) +- [`/alerts/definitions`](https://www.fastly.com/documentation/reference/api/observability/alerts/definitions) (GET, POST) +- [`/alerts/history`](https://www.fastly.com/documentation/reference/api/observability/alerts/history) (GET) +- [`/resources/stores/kv/{store_id}/batch`](https://www.fastly.com/documentation/reference/api/services/resources/kv-store-item) (PUT) +- [`/tls/activations/{tls_activation_id}`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET, PATCH) +- [`/tls/activations`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET) +- [`/v1/channel/{service_id}/ts/h/limit/{max_entries}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) +- [`/v1/channel/{service_id}/ts/h`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) +- [`/v1/channel/{service_id}/ts/{start_timestamp}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) If you encounter any non-security-related bug or unexpected behavior, please [file an issue][bug] diff --git a/docs/Api/AutomationTokensApi.md b/docs/Api/AutomationTokensApi.md index 1ec25fa5..b2e8970d 100644 --- a/docs/Api/AutomationTokensApi.md +++ b/docs/Api/AutomationTokensApi.md @@ -166,7 +166,7 @@ Name | Type | Description | Notes ## `revokeAutomationTokenId()` ```php -revokeAutomationTokenId($options): \Fastly\Model\ErrorResponse // Revoke an Automation Token by ID +revokeAutomationTokenId($options): \Fastly\Model\AutomationTokenErrorResponse // Revoke an Automation Token by ID ``` Revoke an automation token by ID. @@ -192,7 +192,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\ErrorResponse**](../Model/ErrorResponse.md) +[**\Fastly\Model\AutomationTokenErrorResponse**](../Model/AutomationTokenErrorResponse.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/BackendApi.md b/docs/Api/BackendApi.md index 463f7c26..80d08aaa 100644 --- a/docs/Api/BackendApi.md +++ b/docs/Api/BackendApi.md @@ -57,7 +57,7 @@ $options['shield'] = 'shield_example'; // string | Identifier of the POP to use $options['ssl_ca_cert'] = 'ssl_ca_cert_example'; // string | CA certificate attached to origin. $options['ssl_cert_hostname'] = 'ssl_cert_hostname_example'; // string | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. $options['ssl_check_cert'] = true; // bool | Be strict on checking SSL certs. -$options['ssl_ciphers'] = 'ssl_ciphers_example'; // string | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. +$options['ssl_ciphers'] = 'ssl_ciphers_example'; // string | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. $options['ssl_client_cert'] = 'ssl_client_cert_example'; // string | Client certificate attached to origin. $options['ssl_client_key'] = 'ssl_client_key_example'; // string | Client key attached to origin. $options['ssl_hostname'] = 'ssl_hostname_example'; // string | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. @@ -104,7 +104,7 @@ Name | Type | Description | Notes **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] **ssl_check_cert** | **bool** | Be strict on checking SSL certs. | [optional] [defaults to true] -**ssl_ciphers** | **string** | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] +**ssl_ciphers** | **string** | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] **ssl_client_cert** | **string** | Client certificate attached to origin. | [optional] **ssl_client_key** | **string** | Client key attached to origin. | [optional] **ssl_hostname** | **string** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] @@ -268,7 +268,7 @@ $options['shield'] = 'shield_example'; // string | Identifier of the POP to use $options['ssl_ca_cert'] = 'ssl_ca_cert_example'; // string | CA certificate attached to origin. $options['ssl_cert_hostname'] = 'ssl_cert_hostname_example'; // string | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. $options['ssl_check_cert'] = true; // bool | Be strict on checking SSL certs. -$options['ssl_ciphers'] = 'ssl_ciphers_example'; // string | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. +$options['ssl_ciphers'] = 'ssl_ciphers_example'; // string | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. $options['ssl_client_cert'] = 'ssl_client_cert_example'; // string | Client certificate attached to origin. $options['ssl_client_key'] = 'ssl_client_key_example'; // string | Client key attached to origin. $options['ssl_hostname'] = 'ssl_hostname_example'; // string | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. @@ -316,7 +316,7 @@ Name | Type | Description | Notes **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] **ssl_check_cert** | **bool** | Be strict on checking SSL certs. | [optional] [defaults to true] -**ssl_ciphers** | **string** | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] +**ssl_ciphers** | **string** | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] **ssl_client_cert** | **string** | Client certificate attached to origin. | [optional] **ssl_client_key** | **string** | Client key attached to origin. | [optional] **ssl_hostname** | **string** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] diff --git a/docs/Api/BillingInvoicesApi.md b/docs/Api/BillingInvoicesApi.md new file mode 100644 index 00000000..5ab81f9d --- /dev/null +++ b/docs/Api/BillingInvoicesApi.md @@ -0,0 +1,93 @@ +# Fastly\Api\BillingInvoicesApi + + +```php +$apiInstance = new Fastly\Api\BillingInvoicesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +Method | Fastly API endpoint | Description +------------- | ------------- | ------------- +[**getInvoiceByInvoiceId()**](BillingInvoicesApi.md#getInvoiceByInvoiceId) | **GET** /billing/v3/invoices/{invoice_id} | Get invoice by ID. +[**listInvoices()**](BillingInvoicesApi.md#listInvoices) | **GET** /billing/v3/invoices | List of invoices. + + +## `getInvoiceByInvoiceId()` + +```php +getInvoiceByInvoiceId($options): \Fastly\Model\InvoiceResponse // Get invoice by ID. +``` + +Returns invoice associated with the invoice id. + +### Example +```php + $options['invoice_id'] = 'invoice_id_example'; // string | Alphanumeric string identifying the invoice. + +try { + $result = $apiInstance->getInvoiceByInvoiceId($options); +} catch (Exception $e) { + echo 'Exception when calling BillingInvoicesApi->getInvoiceByInvoiceId: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**invoice_id** | **string** | Alphanumeric string identifying the invoice. | + +### Return type + +[**\Fastly\Model\InvoiceResponse**](../Model/InvoiceResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `listInvoices()` + +```php +listInvoices($options): \Fastly\Model\ListInvoicesResponse // List of invoices. +``` + +Returns the list of invoices, sorted by billing start date (newest to oldest). + +### Example +```php + $options['billing_start_date'] = 2023-01-01T00:00:00Z; // string +$options['billing_end_date'] = 2023-01-31T00:00:00Z; // string +$options['limit'] = '100'; // string | Number of results per page. The maximum is 200. +$options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. + +try { + $result = $apiInstance->listInvoices($options); +} catch (Exception $e) { + echo 'Exception when calling BillingInvoicesApi->listInvoices: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**billing_start_date** | **string** | | [optional] +**billing_end_date** | **string** | | [optional] +**limit** | **string** | Number of results per page. The maximum is 200. | [optional] [defaults to '100'] +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] + +### Return type + +[**\Fastly\Model\ListInvoicesResponse**](../Model/ListInvoicesResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/DirectorApi.md b/docs/Api/DirectorApi.md index cceb64a5..ea56e5f8 100644 --- a/docs/Api/DirectorApi.md +++ b/docs/Api/DirectorApi.md @@ -38,7 +38,7 @@ $options['capacity'] = 56; // int | Unused. $options['comment'] = 'comment_example'; // string | A freeform descriptive note. $options['name'] = 'name_example'; // string | Name for the Director. $options['quorum'] = 75; // int | The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. -$options['shield'] = 'null'; // string | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. +$options['shield'] = 'null'; // string | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. $options['type'] = 1; // int | What type of load balance group to use. $options['retries'] = 5; // int | How many backends to search if it fails. @@ -62,7 +62,7 @@ Name | Type | Description | Notes **comment** | **string** | A freeform descriptive note. | [optional] **name** | **string** | Name for the Director. | [optional] **quorum** | **int** | The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. | [optional] [defaults to 75] -**shield** | **string** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] +**shield** | **string** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] **type** | **int** | What type of load balance group to use. | [optional] [one of: 1, 3, 4] **retries** | **int** | How many backends to search if it fails. | [optional] [defaults to 5] diff --git a/docs/Api/DomainInspectorHistoricalApi.md b/docs/Api/DomainInspectorHistoricalApi.md index f0ef02e2..69032e2c 100644 --- a/docs/Api/DomainInspectorHistoricalApi.md +++ b/docs/Api/DomainInspectorHistoricalApi.md @@ -31,10 +31,10 @@ Fetches historical domain metrics for a given Fastly service, optionally filteri $options['start'] = 2021-08-01T00:00:00.000Z; // string | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. $options['end'] = 2020-08-02T00:00:00.000Z; // string | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. $options['downsample'] = hour; // string | Duration of sample windows. -$options['metric'] = resp_body_bytes,status_2xx; // string | The metric to retrieve. Up to ten comma-separated metrics are accepted. +$options['metric'] = resp_body_bytes,status_2xx; // string | The metrics to retrieve. Multiple values should be comma-separated. $options['group_by'] = domain; // string | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). $options['limit'] = '100'; // string | Number of results per page. The maximum is 200. -$options['cursor'] = 'cursor_example'; // string | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. +$options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. $options['region'] = usa; // string | Limit query to one or more specific geographic regions. Values should be comma-separated. $options['datacenter'] = SJC,STP; // string | Limit query to one or more specific POPs. Values should be comma-separated. $options['domain'] = domain_1.com,domain_2.com; // string | Limit query to one or more specific domains. Values should be comma-separated. @@ -56,10 +56,10 @@ Name | Type | Description | Notes **start** | **string** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] **end** | **string** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] **downsample** | **string** | Duration of sample windows. | [optional] [one of: 'hour', 'minute', 'day'] [defaults to 'hour'] -**metric** | **string** | The metric to retrieve. Up to ten comma-separated metrics are accepted. | [optional] [defaults to 'edge_requests'] +**metric** | **string** | The metrics to retrieve. Multiple values should be comma-separated. | [optional] [defaults to 'edge_requests'] **group_by** | **string** | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). | [optional] [one of: 'domain', 'datacenter', 'region', 'none'] **limit** | **string** | Number of results per page. The maximum is 200. | [optional] [defaults to '100'] -**cursor** | **string** | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. | [optional] +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] **region** | **string** | Limit query to one or more specific geographic regions. Values should be comma-separated. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'southamerica_std'] **datacenter** | **string** | Limit query to one or more specific POPs. Values should be comma-separated. | [optional] **domain** | **string** | Limit query to one or more specific domains. Values should be comma-separated. | [optional] diff --git a/docs/Api/KvStoreApi.md b/docs/Api/KvStoreApi.md index fc5bd865..21f4d80e 100644 --- a/docs/Api/KvStoreApi.md +++ b/docs/Api/KvStoreApi.md @@ -135,7 +135,7 @@ Get all stores for a given customer. ### Example ```php $options['cursor'] = 'cursor_example'; // string -$options['limit'] = 100; // int +$options['limit'] = 1000; // int try { $result = $apiInstance->getStores($options); @@ -151,7 +151,7 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **cursor** | **string** | | [optional] -**limit** | **int** | | [optional] [defaults to 100] +**limit** | **int** | | [optional] [defaults to 1000] ### Return type diff --git a/docs/Api/LoggingScalyrApi.md b/docs/Api/LoggingScalyrApi.md index 2eced5c0..850ca98e 100644 --- a/docs/Api/LoggingScalyrApi.md +++ b/docs/Api/LoggingScalyrApi.md @@ -39,7 +39,7 @@ $options['response_condition'] = 'response_condition_example'; // string | The n $options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). $options['format_version'] = self::FORMAT_VERSION_v2; // 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`. $options['region'] = 'US'; // string | The region that log data will be sent to. -$options['token'] = 'token_example'; // string | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). +$options['token'] = 'token_example'; // string | The token to use for authentication. $options['project_id'] = 'logplex'; // string | The name of the logfile within Scalyr. try { @@ -63,7 +63,7 @@ Name | Type | Description | Notes **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **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] [one of: 1, 2] **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] -**token** | **string** | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). | [optional] +**token** | **string** | The token to use for authentication. | [optional] **project_id** | **string** | The name of the logfile within Scalyr. | [optional] [defaults to 'logplex'] ### Return type @@ -204,7 +204,7 @@ $options['response_condition'] = 'response_condition_example'; // string | The n $options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). $options['format_version'] = self::FORMAT_VERSION_v2; // 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`. $options['region'] = 'US'; // string | The region that log data will be sent to. -$options['token'] = 'token_example'; // string | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). +$options['token'] = 'token_example'; // string | The token to use for authentication. $options['project_id'] = 'logplex'; // string | The name of the logfile within Scalyr. try { @@ -229,7 +229,7 @@ Name | Type | Description | Notes **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **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] [one of: 1, 2] **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] -**token** | **string** | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). | [optional] +**token** | **string** | The token to use for authentication. | [optional] **project_id** | **string** | The name of the logfile within Scalyr. | [optional] [defaults to 'logplex'] ### Return type diff --git a/docs/Api/OriginInspectorHistoricalApi.md b/docs/Api/OriginInspectorHistoricalApi.md index 9c018ddb..d4ef791e 100644 --- a/docs/Api/OriginInspectorHistoricalApi.md +++ b/docs/Api/OriginInspectorHistoricalApi.md @@ -31,10 +31,10 @@ Fetches historical origin metrics for a given Fastly service, optionally filteri $options['start'] = 2021-08-01T00:00:00.000Z; // string | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. $options['end'] = 2020-08-02T00:00:00.000Z; // string | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. $options['downsample'] = hour; // string | Duration of sample windows. -$options['metric'] = resp_body_bytes,status_2xx; // string | The metric to retrieve. Up to ten comma-separated metrics are accepted. +$options['metric'] = resp_body_bytes,status_2xx; // string | The metrics to retrieve. Multiple values should be comma-separated. $options['group_by'] = host; // string | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. $options['limit'] = '100'; // string | Number of results per page. The maximum is 200. -$options['cursor'] = 'cursor_example'; // string | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. +$options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. $options['region'] = usa; // string | Limit query to one or more specific geographic regions. Values should be comma-separated. $options['datacenter'] = SJC,STP; // string | Limit query to one or more specific POPs. Values should be comma-separated. $options['host'] = origin_1,origin_2; // string | Limit query to one or more specific origin hosts. Values should be comma-separated. @@ -56,10 +56,10 @@ Name | Type | Description | Notes **start** | **string** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] **end** | **string** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] **downsample** | **string** | Duration of sample windows. | [optional] [one of: 'hour', 'minute', 'day'] [defaults to 'hour'] -**metric** | **string** | The metric to retrieve. Up to ten comma-separated metrics are accepted. | [optional] [defaults to 'responses'] +**metric** | **string** | The metrics to retrieve. Multiple values should be comma-separated. | [optional] [defaults to 'responses'] **group_by** | **string** | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. | [optional] [one of: 'host', 'datacenter', 'region', 'none'] **limit** | **string** | Number of results per page. The maximum is 200. | [optional] [defaults to '100'] -**cursor** | **string** | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. | [optional] +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] **region** | **string** | Limit query to one or more specific geographic regions. Values should be comma-separated. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'southamerica_std'] **datacenter** | **string** | Limit query to one or more specific POPs. Values should be comma-separated. | [optional] **host** | **string** | Limit query to one or more specific origin hosts. Values should be comma-separated. | [optional] diff --git a/docs/Api/PoolApi.md b/docs/Api/PoolApi.md index 87d02af6..07e89433 100644 --- a/docs/Api/PoolApi.md +++ b/docs/Api/PoolApi.md @@ -44,7 +44,7 @@ $options['updated_at'] = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTim $options['service_id'] = 'service_id_example'; // string $options['version'] = 'version_example'; // string $options['name'] = 'name_example'; // string | Name for the Pool. -$options['shield'] = 'null'; // string | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. +$options['shield'] = 'null'; // string | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. $options['request_condition'] = 'request_condition_example'; // string | Condition which, if met, will select this configuration during a request. Optional. $options['tls_ciphers'] = 'tls_ciphers_example'; // string | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. $options['tls_sni_hostname'] = 'tls_sni_hostname_example'; // string | SNI hostname. Optional. @@ -87,7 +87,7 @@ Name | Type | Description | Notes **service_id** | **string** | | [optional] **version** | **string** | | [optional] **name** | **string** | Name for the Pool. | [optional] -**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] +**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] **request_condition** | **string** | Condition which, if met, will select this configuration during a request. Optional. | [optional] **tls_ciphers** | **string** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] **tls_sni_hostname** | **string** | SNI hostname. Optional. | [optional] @@ -247,7 +247,7 @@ $options['updated_at'] = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTim $options['service_id'] = 'service_id_example'; // string $options['version'] = 'version_example'; // string $options['name'] = 'name_example'; // string | Name for the Pool. -$options['shield'] = 'null'; // string | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. +$options['shield'] = 'null'; // string | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. $options['request_condition'] = 'request_condition_example'; // string | Condition which, if met, will select this configuration during a request. Optional. $options['tls_ciphers'] = 'tls_ciphers_example'; // string | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. $options['tls_sni_hostname'] = 'tls_sni_hostname_example'; // string | SNI hostname. Optional. @@ -291,7 +291,7 @@ Name | Type | Description | Notes **service_id** | **string** | | [optional] **version** | **string** | | [optional] **name** | **string** | Name for the Pool. | [optional] -**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] +**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] **request_condition** | **string** | Condition which, if met, will select this configuration during a request. Optional. | [optional] **tls_ciphers** | **string** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] **tls_sni_hostname** | **string** | SNI hostname. Optional. | [optional] diff --git a/docs/Api/PublishApi.md b/docs/Api/PublishApi.md index 3ae0022a..b9f5686d 100644 --- a/docs/Api/PublishApi.md +++ b/docs/Api/PublishApi.md @@ -23,7 +23,7 @@ Method | Fastly API endpoint | Description publish($options): string // Send messages to Fanout subscribers ``` -Send one or more messages to [Fanout](https://developer.fastly.com/learning/concepts/real-time-messaging/fanout) subscribers. Each message specifies a channel, and Fanout will deliver the message to all subscribers of its channel. > **IMPORTANT:** For compatibility with GRIP, this endpoint requires a trailing slash, and the API token may be provided in the `Authorization` header (instead of the `Fastly-Key` header) using the `Bearer` scheme. +Send one or more messages to [Fanout](https://www.fastly.com/documentation/learning/concepts/real-time-messaging/fanout) subscribers. Each message specifies a channel, and Fanout will deliver the message to all subscribers of its channel. > **IMPORTANT:** For compatibility with GRIP, this endpoint requires a trailing slash, and the API token may be provided in the `Authorization` header (instead of the `Fastly-Key` header) using the `Bearer` scheme. ### Example ```php diff --git a/docs/Api/SecretStoreApi.md b/docs/Api/SecretStoreApi.md index 106d2709..d710e1b3 100644 --- a/docs/Api/SecretStoreApi.md +++ b/docs/Api/SecretStoreApi.md @@ -165,8 +165,9 @@ Get all secret stores. ### Example ```php - $options['cursor'] = 'cursor_example'; // string | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + $options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. $options['limit'] = '100'; // string | Number of results per page. The maximum is 200. +$options['name'] = 'name_example'; // string | Returns a one-element array containing the details for the named secret store. try { $result = $apiInstance->getSecretStores($options); @@ -181,8 +182,9 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cursor** | **string** | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. | [optional] +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] **limit** | **string** | Number of results per page. The maximum is 200. | [optional] [defaults to '100'] +**name** | **string** | Returns a one-element array containing the details for the named secret store. | [optional] ### Return type diff --git a/docs/Api/SecretStoreItemApi.md b/docs/Api/SecretStoreItemApi.md index 18e7c537..b8d31656 100644 --- a/docs/Api/SecretStoreItemApi.md +++ b/docs/Api/SecretStoreItemApi.md @@ -141,7 +141,7 @@ List all secrets within a store. ### Example ```php $options['store_id'] = 'store_id_example'; // string -$options['cursor'] = 'cursor_example'; // string | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. +$options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. $options['limit'] = '100'; // string | Number of results per page. The maximum is 200. try { @@ -158,7 +158,7 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **store_id** | **string** | | -**cursor** | **string** | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. | [optional] +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] **limit** | **string** | Number of results per page. The maximum is 200. | [optional] [defaults to '100'] ### Return type diff --git a/docs/Api/TlsCsrsApi.md b/docs/Api/TlsCsrsApi.md new file mode 100644 index 00000000..1f8a18ee --- /dev/null +++ b/docs/Api/TlsCsrsApi.md @@ -0,0 +1,52 @@ +# Fastly\Api\TlsCsrsApi + + +```php +$apiInstance = new Fastly\Api\TlsCsrsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +Method | Fastly API endpoint | Description +------------- | ------------- | ------------- +[**createCsr()**](TlsCsrsApi.md#createCsr) | **POST** /tls/certificate_signing_requests | Create CSR + + +## `createCsr()` + +```php +createCsr($options): \Fastly\Model\TlsCsrResponse // Create CSR +``` + +Creates a certificate signing request (CSR). + +### Example +```php + $options['tls_csr'] = {"data":{"type":"csr","attributes":{"sans":["DOMAIN_NAME"],"common_name":"DOMAIN_NAME","key_type":"RSA2048","country":"US","state":"California","city":"San Francisco","organization":"Fastly, Inc.","organizational_unit":"Engineering"},"relationships":{"tls_private_key":{"data":{"type":"tls_private_key","id":"KeYguUGZzb2W9Euo4moOR"}}}}}; // \Fastly\Model\TlsCsr + +try { + $result = $apiInstance->createCsr($options); +} catch (Exception $e) { + echo 'Exception when calling TlsCsrsApi->createCsr: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**tls_csr** | [**\Fastly\Model\TlsCsr**](../Model/TlsCsr.md) | | [optional] + +### Return type + +[**\Fastly\Model\TlsCsrResponse**](../Model/TlsCsrResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/TokensApi.md b/docs/Api/TokensApi.md index cf5f4b3a..926e0948 100644 --- a/docs/Api/TokensApi.md +++ b/docs/Api/TokensApi.md @@ -64,7 +64,7 @@ void (empty response body) createToken($options): \Fastly\Model\TokenCreatedResponse // Create a token ``` -Create an API token. If two-factor authentication is enabled for your account, review [the instructions](/reference/api/auth-tokens/user/) for including a one-time password in the request. +Create an API token. If two-factor authentication is enabled for your account, review [the instructions](https://www.fastly.com/documentation/reference/api/auth-tokens/user/) for including a one-time password in the request. ### Example ```php diff --git a/docs/Api/VclApi.md b/docs/Api/VclApi.md index 86fcf0d1..e6d629ee 100644 --- a/docs/Api/VclApi.md +++ b/docs/Api/VclApi.md @@ -155,7 +155,7 @@ Name | Type | Description | Notes getCustomVclBoilerplate($options): string // Get boilerplate VCL ``` -Return boilerplate VCL with the service's TTL from the [settings](/reference/api/vcl-services/settings/). +Return boilerplate VCL with the service's TTL from the [settings](https://www.fastly.com/documentation/reference/api/vcl-services/settings/). ### Example ```php diff --git a/docs/Api/WafActiveRulesApi.md b/docs/Api/WafActiveRulesApi.md index 7d729471..5883330c 100644 --- a/docs/Api/WafActiveRulesApi.md +++ b/docs/Api/WafActiveRulesApi.md @@ -68,7 +68,7 @@ void (empty response body) bulkUpdateWafActiveRules($options) // Update multiple active rules ``` -Bulk update all active rules on a [firewall version](https://developer.fastly.com/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules. +Bulk update all active rules on a [firewall version](https://www.fastly.com/documentation/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules. ### Example ```php diff --git a/docs/Model/ErrorResponse.md b/docs/Model/AutomationTokenErrorResponse.md similarity index 91% rename from docs/Model/ErrorResponse.md rename to docs/Model/AutomationTokenErrorResponse.md index f929f6ec..e2cb615c 100644 --- a/docs/Model/ErrorResponse.md +++ b/docs/Model/AutomationTokenErrorResponse.md @@ -1,4 +1,4 @@ -# # ErrorResponse +# # AutomationTokenErrorResponse ## Properties diff --git a/docs/Model/Backend.md b/docs/Model/Backend.md index ae2a5177..6c952e67 100644 --- a/docs/Model/Backend.md +++ b/docs/Model/Backend.md @@ -28,7 +28,7 @@ Name | Type | Description | Notes **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] **ssl_check_cert** | **bool** | Be strict on checking SSL certs. | [optional] [defaults to true] -**ssl_ciphers** | **string** | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] +**ssl_ciphers** | **string** | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] **ssl_client_cert** | **string** | Client certificate attached to origin. | [optional] **ssl_client_key** | **string** | Client key attached to origin. | [optional] **ssl_hostname** | **string** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] diff --git a/docs/Model/BackendResponse.md b/docs/Model/BackendResponse.md index ff5e44c9..3fa879bf 100644 --- a/docs/Model/BackendResponse.md +++ b/docs/Model/BackendResponse.md @@ -28,7 +28,7 @@ Name | Type | Description | Notes **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] **ssl_check_cert** | **bool** | Be strict on checking SSL certs. | [optional] [defaults to true] -**ssl_ciphers** | **string** | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] +**ssl_ciphers** | **string** | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] **ssl_client_cert** | **string** | Client certificate attached to origin. | [optional] **ssl_client_key** | **string** | Client key attached to origin. | [optional] **ssl_hostname** | **string** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] diff --git a/docs/Model/Director.md b/docs/Model/Director.md index 27f62c8c..10b8581e 100644 --- a/docs/Model/Director.md +++ b/docs/Model/Director.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **comment** | **string** | A freeform descriptive note. | [optional] **name** | **string** | Name for the Director. | [optional] **quorum** | **int** | The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. | [optional] [defaults to 75] -**shield** | **string** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] +**shield** | **string** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] **type** | **int** | What type of load balance group to use. | [optional] [one of: 1, 3, 4] **retries** | **int** | How many backends to search if it fails. | [optional] [defaults to 5] diff --git a/docs/Model/DirectorResponse.md b/docs/Model/DirectorResponse.md index 4099eddc..be97623b 100644 --- a/docs/Model/DirectorResponse.md +++ b/docs/Model/DirectorResponse.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **comment** | **string** | A freeform descriptive note. | [optional] **name** | **string** | Name for the Director. | [optional] **quorum** | **int** | The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. | [optional] [defaults to 75] -**shield** | **string** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] +**shield** | **string** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] **type** | **int** | What type of load balance group to use. | [optional] [one of: 1, 3, 4] **retries** | **int** | How many backends to search if it fails. | [optional] [defaults to 5] **service_id** | **string** | | [optional] [readonly] diff --git a/docs/Model/DomainInspectorRealtimeEntry.md b/docs/Model/DomainInspectorRealtimeEntry.md index e6f05628..f4e7ba2c 100644 --- a/docs/Model/DomainInspectorRealtimeEntry.md +++ b/docs/Model/DomainInspectorRealtimeEntry.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **recorded** | [**\Fastly\Model\RecordedTimestamp**](RecordedTimestamp.md) | | [optional] **aggregated** | [**array<string,DomainInspectorMeasurements>**](DomainInspectorMeasurements.md) | Groups [measurements](#measurements-data-model) by backend name and then by IP address. | [optional] -**datacenter** | **array<string,array<string,DomainInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](/reference/api/utils/pops/) for details about POP identifiers. | [optional] +**datacenter** | **array<string,array<string,DomainInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Error.md b/docs/Model/Error.md new file mode 100644 index 00000000..de357c2e --- /dev/null +++ b/docs/Model/Error.md @@ -0,0 +1,13 @@ +# # Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**title** | **string** | | [optional] +**code** | **string** | | [optional] +**status** | **string** | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ErrorResponseData.md b/docs/Model/ErrorResponseData.md new file mode 100644 index 00000000..c35e96a3 --- /dev/null +++ b/docs/Model/ErrorResponseData.md @@ -0,0 +1,11 @@ +# # ErrorResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | | [optional] +**detail** | **string** | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EventAttributes.md b/docs/Model/EventAttributes.md index 4128aab7..362ccd68 100644 --- a/docs/Model/EventAttributes.md +++ b/docs/Model/EventAttributes.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **customer_id** | **string** | | [optional] [readonly] **description** | **string** | Description of the event. | [optional] -**event_type** | **string** | Type of event. Can be used with `filter[event_type]` | [optional] [one of: 'api_key.create', 'acl.create', 'acl.delete', 'acl.update', 'address.create', 'address.delete', 'address.update', 'backend.create', 'backend.delete', 'backend.update', 'billing.contact_update', 'cache_settings.create', 'cache_settings.delete', 'cache_settings.update', 'customer.create', 'customer.pricing', 'customer.update', 'customer_feature.create', 'customer_feature.delete', 'director.create', 'director.delete', 'director.update', 'director_backend.create', 'director_backend.delete', 'domain.create', 'domain.delete', 'domain.update', 'gzip.create', 'gzip.delete', 'gzip.update', 'header.create', 'header.delete', 'header.update', 'healthcheck.create', 'healthcheck.delete', 'healthcheck.update', 'invitation.accept', 'invitation.sent', 'invoice.failed_payment', 'invoice.payment', 'io_settings.create', 'io_settings.delete', 'io_settings.update', 'logging.create', 'logging.delete', 'logging.update', 'pool.create', 'pool.delete', 'pool.update', 'request_settings.create', 'request_settings.delete', 'request_settings.update', 'response_object.create', 'response_object.delete', 'response_object.update', 'rule_status.update', 'rule_status.upsert', 'server.create', 'server.delete', 'server.update', 'service.create', 'service.delete', 'service.move', 'service.move_destination', 'service.move_source', 'service.purge_all', 'service.update', 'service_authorization.create', 'service_authorization.delete', 'service_authorization.update', 'tls.bulk_certificate.create', 'tls.bulk_certificate.delete', 'tls.bulk_certificate.update', 'tls.certificate.create', 'tls.certificate.expiration_email', 'tls.certificate.update', 'tls.certificate.delete', 'tls.configuration.update', 'tls.private_key.create', 'tls.private_key.delete', 'tls.activation.enable', 'tls.activation.update', 'tls.activation.disable', 'tls.globalsign.domain.create', 'tls.globalsign.domain.verify', 'tls.globalsign.domain.delete', 'tls.subscription.create', 'tls.subscription.delete', 'tls.subscription.dns_check_email', 'token.create', 'token.destroy', 'two_factor_auth.disable', 'two_factor_auth.enable', 'user.create', 'user.destroy', 'user.lock', 'user.login', 'user.login_failure', 'user.logout', 'user.password_update', 'user.unlock', 'user.update', 'vcl.create', 'vcl.delete', 'vcl.update', 'version.activate', 'version.clone', 'version.copy', 'version.copy_destination', 'version.copy_source', 'version.create', 'version.deactivate', 'version.lock', 'version.update', 'waf.configuration_set_update', 'waf.create', 'waf.delete', 'waf.update', 'waf.enable', 'waf.disable', 'waf.owasp.create', 'waf.owasp.update', 'waf.ruleset.deploy', 'waf.ruleset.deploy_failure', 'wordpress.create', 'wordpress.delete', 'wordpress.update'] +**event_type** | **string** | Type of event. Can be used with `filter[event_type]` | [optional] [one of: 'api_key.create', 'acl.create', 'acl.delete', 'acl.update', 'address.create', 'address.delete', 'address.update', 'alerts.definition.create', 'alerts.definition.delete', 'alerts.definition.test', 'alerts.definition.update', 'backend.create', 'backend.delete', 'backend.update', 'billing.contact_update', 'cache_settings.create', 'cache_settings.delete', 'cache_settings.update', 'customer.create', 'customer.pricing', 'customer.update', 'customer_feature.create', 'customer_feature.delete', 'director.create', 'director.delete', 'director.update', 'director_backend.create', 'director_backend.delete', 'domain.create', 'domain.delete', 'domain.update', 'gzip.create', 'gzip.delete', 'gzip.update', 'header.create', 'header.delete', 'header.update', 'healthcheck.create', 'healthcheck.delete', 'healthcheck.update', 'invitation.accept', 'invitation.sent', 'invoice.failed_payment', 'invoice.payment', 'io_settings.create', 'io_settings.delete', 'io_settings.update', 'logging.create', 'logging.delete', 'logging.update', 'pool.create', 'pool.delete', 'pool.update', 'request_settings.create', 'request_settings.delete', 'request_settings.update', 'response_object.create', 'response_object.delete', 'response_object.update', 'rule_status.update', 'rule_status.upsert', 'server.create', 'server.delete', 'server.update', 'service.create', 'service.delete', 'service.move', 'service.move_destination', 'service.move_source', 'service.purge_all', 'service.update', 'service_authorization.create', 'service_authorization.delete', 'service_authorization.update', 'tls.bulk_certificate.create', 'tls.bulk_certificate.delete', 'tls.bulk_certificate.update', 'tls.certificate.create', 'tls.certificate.expiration_email', 'tls.certificate.update', 'tls.certificate.delete', 'tls.configuration.update', 'tls.private_key.create', 'tls.private_key.delete', 'tls.activation.enable', 'tls.activation.update', 'tls.activation.disable', 'tls.globalsign.domain.create', 'tls.globalsign.domain.verify', 'tls.globalsign.domain.delete', 'tls.subscription.create', 'tls.subscription.delete', 'tls.subscription.dns_check_email', 'token.create', 'token.destroy', 'two_factor_auth.disable', 'two_factor_auth.enable', 'user.create', 'user.destroy', 'user.lock', 'user.login', 'user.login_failure', 'user.logout', 'user.password_update', 'user.unlock', 'user.update', 'vcl.create', 'vcl.delete', 'vcl.update', 'version.activate', 'version.clone', 'version.copy', 'version.copy_destination', 'version.copy_source', 'version.create', 'version.deactivate', 'version.lock', 'version.update', 'waf.configuration_set_update', 'waf.create', 'waf.delete', 'waf.update', 'waf.enable', 'waf.disable', 'waf.owasp.create', 'waf.owasp.update', 'waf.ruleset.deploy', 'waf.ruleset.deploy_failure', 'wordpress.create', 'wordpress.delete', 'wordpress.update'] **ip** | **string** | IP addresses that the event was requested from. | [optional] **metadata** | **array<string,object>** | Hash of key value pairs of additional information. | [optional] **service_id** | **string** | | [optional] [readonly] diff --git a/docs/Model/Invoice.md b/docs/Model/Invoice.md new file mode 100644 index 00000000..c402713d --- /dev/null +++ b/docs/Model/Invoice.md @@ -0,0 +1,18 @@ +# # Invoice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **string** | Customer ID associated with the invoice. | [optional] +**invoice_id** | **string** | Alphanumeric string identifying the invoice. | [optional] +**invoice_posted_on** | **\DateTime** | Date and time invoice was posted on, in ISO 8601 format. | [optional] +**billing_start_date** | **\DateTime** | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] +**billing_end_date** | **\DateTime** | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] +**statement_number** | **string** | Alphanumeric string identifying the statement number. | [optional] +**currency_code** | **string** | Three-letter code representing a specific currency used for financial transactions. | [optional] +**monthly_transaction_amount** | **float** | Total billable amount for invoiced services charged within a single month. | [optional] +**transaction_line_items** | [**\Fastly\Model\Invoicelineitems[]**](Invoicelineitems.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InvoiceResponse.md b/docs/Model/InvoiceResponse.md new file mode 100644 index 00000000..8bcaa7a5 --- /dev/null +++ b/docs/Model/InvoiceResponse.md @@ -0,0 +1,18 @@ +# # InvoiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **string** | Customer ID associated with the invoice. | [optional] +**invoice_id** | **string** | Alphanumeric string identifying the invoice. | [optional] +**invoice_posted_on** | **\DateTime** | Date and time invoice was posted on, in ISO 8601 format. | [optional] +**billing_start_date** | **\DateTime** | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] +**billing_end_date** | **\DateTime** | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] +**statement_number** | **string** | Alphanumeric string identifying the statement number. | [optional] +**currency_code** | **string** | Three-letter code representing a specific currency used for financial transactions. | [optional] +**monthly_transaction_amount** | **float** | Total billable amount for invoiced services charged within a single month. | [optional] +**transaction_line_items** | [**\Fastly\Model\Invoicelineitems[]**](Invoicelineitems.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Invoicelineitems.md b/docs/Model/Invoicelineitems.md new file mode 100644 index 00000000..51fc7f00 --- /dev/null +++ b/docs/Model/Invoicelineitems.md @@ -0,0 +1,18 @@ +# # Invoicelineitems + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **string** | Invoice line item transaction name. | [optional] +**amount** | **float** | Billed amount for line item. | [optional] +**credit_coupon_code** | **string** | Discount coupon associated with the invoice for any account or service credits. | [optional] +**rate** | **float** | Price per unit. | [optional] +**units** | **float** | Total number of units of usage. | [optional] +**product_name** | **string** | The name of the product. | [optional] +**product_group** | **string** | The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). | [optional] +**region** | **string** | The geographical area applicable for regionally based products. | [optional] +**usage_type** | **string** | The unit of measure (e.g., `requests` or `bandwidth`). | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListInvoicesResponse.md b/docs/Model/ListInvoicesResponse.md new file mode 100644 index 00000000..1dababe3 --- /dev/null +++ b/docs/Model/ListInvoicesResponse.md @@ -0,0 +1,11 @@ +# # ListInvoicesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\Invoice[]**](Invoice.md) | | [optional] +**meta** | [**\Fastly\Model\Metadata**](Metadata.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Listinvoices.md b/docs/Model/Listinvoices.md new file mode 100644 index 00000000..c7a4b897 --- /dev/null +++ b/docs/Model/Listinvoices.md @@ -0,0 +1,11 @@ +# # Listinvoices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\Invoice[]**](Invoice.md) | | [optional] +**meta** | [**\Fastly\Model\Metadata**](Metadata.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingScalyrAdditional.md b/docs/Model/LoggingScalyrAdditional.md index 7afd1719..3170f9db 100644 --- a/docs/Model/LoggingScalyrAdditional.md +++ b/docs/Model/LoggingScalyrAdditional.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] -**token** | **string** | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). | [optional] +**token** | **string** | The token to use for authentication. | [optional] **project_id** | **string** | The name of the logfile within Scalyr. | [optional] [defaults to 'logplex'] diff --git a/docs/Model/LoggingScalyrResponse.md b/docs/Model/LoggingScalyrResponse.md index 954be8ef..05a534e8 100644 --- a/docs/Model/LoggingScalyrResponse.md +++ b/docs/Model/LoggingScalyrResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | 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] [one of: '1', '2'] [defaults to '2'] **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] -**token** | **string** | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). | [optional] +**token** | **string** | The token to use for authentication. | [optional] **project_id** | **string** | The name of the logfile within Scalyr. | [optional] [defaults to 'logplex'] **created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/Model/Metadata.md b/docs/Model/Metadata.md new file mode 100644 index 00000000..b3d5976a --- /dev/null +++ b/docs/Model/Metadata.md @@ -0,0 +1,13 @@ +# # Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_cursor** | **string** | The token used to request the next set of results. | [optional] +**limit** | **int** | The number of invoices included in the response. | [optional] +**sort** | **string** | The sort order of the invoices in the response. | [optional] [defaults to 'billing_start_date'] +**total** | **int** | Total number of records available on the backend. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorRealtimeEntry.md b/docs/Model/OriginInspectorRealtimeEntry.md index 8718d275..52650942 100644 --- a/docs/Model/OriginInspectorRealtimeEntry.md +++ b/docs/Model/OriginInspectorRealtimeEntry.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **recorded** | [**\Fastly\Model\OriginInspectorRealtimeEntryRecorded**](OriginInspectorRealtimeEntryRecorded.md) | | [optional] **aggregated** | [**array<string,\Fastly\Model\OriginInspectorMeasurements>**](OriginInspectorMeasurements.md) | Groups [measurements](#measurements-data-model) by backend name. | [optional] -**datacenter** | **array<string,array<string,\Fastly\Model\OriginInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name. See the [POPs API](/reference/api/utils/pops/) for details about POP identifiers. | [optional] +**datacenter** | **array<string,array<string,\Fastly\Model\OriginInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PoolAdditional.md b/docs/Model/PoolAdditional.md index 168152a5..1eac0ea8 100644 --- a/docs/Model/PoolAdditional.md +++ b/docs/Model/PoolAdditional.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name for the Pool. | [optional] -**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] +**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] **request_condition** | **string** | Condition which, if met, will select this configuration during a request. Optional. | [optional] **tls_ciphers** | **string** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] **tls_sni_hostname** | **string** | SNI hostname. Optional. | [optional] diff --git a/docs/Model/PoolResponse.md b/docs/Model/PoolResponse.md index 4832686f..bf1de2cb 100644 --- a/docs/Model/PoolResponse.md +++ b/docs/Model/PoolResponse.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **service_id** | **string** | | [optional] [readonly] **version** | **string** | | [optional] [readonly] **name** | **string** | Name for the Pool. | [optional] -**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] +**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] **request_condition** | **string** | Condition which, if met, will select this configuration during a request. Optional. | [optional] **tls_ciphers** | **string** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] **tls_sni_hostname** | **string** | SNI hostname. Optional. | [optional] diff --git a/docs/Model/PoolResponsePost.md b/docs/Model/PoolResponsePost.md index 90ea2c46..15916c08 100644 --- a/docs/Model/PoolResponsePost.md +++ b/docs/Model/PoolResponsePost.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **service_id** | **string** | | [optional] [readonly] **version** | **string** | | [optional] [readonly] **name** | **string** | Name for the Pool. | [optional] -**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] +**shield** | **string** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional] [defaults to 'null'] **request_condition** | **string** | Condition which, if met, will select this configuration during a request. Optional. | [optional] **tls_ciphers** | **string** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] **tls_sni_hostname** | **string** | SNI hostname. Optional. | [optional] diff --git a/docs/Model/Pop.md b/docs/Model/Pop.md index bfbe58a7..affba94d 100644 --- a/docs/Model/Pop.md +++ b/docs/Model/Pop.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **string** | the three-letter code for the [POP](https://developer.fastly.com/learning/concepts/pop/) | +**code** | **string** | the three-letter code for the [POP](https://www.fastly.com/documentation/learning/concepts/pop/) | **name** | **string** | the name of the POP | **group** | **string** | | **region** | **string** | | [one of: 'APAC', 'Asia', 'AF-West', 'EU-Central', 'EU-East', 'EU-West', 'Middle-East', 'North-America', 'SA-South', 'SA-East', 'SA-West', 'SA-North', 'South-Africa', 'South-America', 'US-Central', 'US-East', 'US-West', 'Asia-South'] **stats_region** | **string** | the region used for stats reporting | [one of: 'southamerica_std', 'africa_std', 'anzac', 'asia', 'europe', 'usa', 'asia_india', 'asia_southkorea'] **billing_region** | **string** | the region used for billing | [one of: 'Africa', 'Australia', 'Asia', 'Europe', 'India', 'North America', 'South Korea', 'South America'] **coordinates** | [**\Fastly\Model\PopCoordinates**](PopCoordinates.md) | | [optional] -**shield** | **string** | the name of the [shield code](https://developer.fastly.com/learning/concepts/shielding/#choosing-a-shield-location) if this POP is suitable for shielding | [optional] +**shield** | **string** | the name of the [shield code](https://www.fastly.com/documentation/learning/concepts/shielding/#choosing-a-shield-location) if this POP is suitable for shielding | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RealtimeEntry.md b/docs/Model/RealtimeEntry.md index 357ab144..8323e287 100644 --- a/docs/Model/RealtimeEntry.md +++ b/docs/Model/RealtimeEntry.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **recorded** | [**\Fastly\Model\RealtimeEntryRecorded**](RealtimeEntryRecorded.md) | | [optional] **aggregated** | [**\Fastly\Model\RealtimeEntryAggregated**](RealtimeEntryAggregated.md) | | [optional] -**datacenter** | [**array<string,\Fastly\Model\RealtimeMeasurements>**](RealtimeMeasurements.md) | Groups [measurements](#measurements-data-model) by POP. See the [POPs API](/reference/api/utils/pops/) for details of POP identifiers. | [optional] +**datacenter** | [**array<string,\Fastly\Model\RealtimeMeasurements>**](RealtimeMeasurements.md) | Groups [measurements](#measurements-data-model) by POP. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details of POP identifiers. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Results.md b/docs/Model/Results.md index 7ae3badb..cef2ed5f 100644 --- a/docs/Model/Results.md +++ b/docs/Model/Results.md @@ -83,8 +83,10 @@ Name | Type | Description | Notes **imgopto** | **int** | Number of responses that came from the Fastly Image Optimizer service. If the service receives 10 requests for an image, this stat will be 10 regardless of how many times the image was transformed. | [optional] **imgopto_resp_body_bytes** | **int** | Total body bytes delivered from the Fastly Image Optimizer service, including shield traffic. | [optional] **imgopto_resp_header_bytes** | **int** | Total header bytes delivered from the Fastly Image Optimizer service, including shield traffic. | [optional] +**imgopto_shield** | **int** | Number of responses that came from the Fastly Image Optimizer service via a shield. | [optional] **imgopto_shield_resp_body_bytes** | **int** | Total body bytes delivered via a shield from the Fastly Image Optimizer service. | [optional] **imgopto_shield_resp_header_bytes** | **int** | Total header bytes delivered via a shield from the Fastly Image Optimizer service. | [optional] +**imgopto_transforms** | **int** | Number of transforms performed by the Fastly Image Optimizer service. | [optional] **imgvideo** | **int** | Number of video responses that came from the Fastly Image Optimizer service. | [optional] **imgvideo_frames** | **int** | Number of video frames that came from the Fastly Image Optimizer service. A video frame is an individual image within a sequence of video. | [optional] **imgvideo_resp_header_bytes** | **int** | Total header bytes of video delivered from the Fastly Image Optimizer service. | [optional] diff --git a/docs/Model/ServiceDetail.md b/docs/Model/ServiceDetail.md index 3149522d..46dae32b 100644 --- a/docs/Model/ServiceDetail.md +++ b/docs/Model/ServiceDetail.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **id** | **string** | | [optional] [readonly] **publish_key** | **string** | Unused at this time. | [optional] **paused** | **bool** | Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. | [optional] -**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] +**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] **active_version** | [**\Fastly\Model\ServiceVersionDetailOrNull**](ServiceVersionDetailOrNull.md) | | [optional] **version** | [**\Fastly\Model\ServiceVersionDetail**](ServiceVersionDetail.md) | | [optional] diff --git a/docs/Model/ServiceListResponse.md b/docs/Model/ServiceListResponse.md index 9cc26094..2e41b021 100644 --- a/docs/Model/ServiceListResponse.md +++ b/docs/Model/ServiceListResponse.md @@ -12,8 +12,8 @@ Name | Type | Description | Notes **customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] **type** | **string** | The type of this service. | [optional] [one of: 'vcl', 'wasm'] **id** | **string** | | [optional] [readonly] -**version** | **int** | Current [version](/reference/api/services/version/) of the service. | [optional] -**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] +**version** | **int** | Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. | [optional] +**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ServiceListResponseAllOf.md b/docs/Model/ServiceListResponseAllOf.md index 8c8eeeff..2f5587cb 100644 --- a/docs/Model/ServiceListResponseAllOf.md +++ b/docs/Model/ServiceListResponseAllOf.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] [readonly] -**version** | **int** | Current [version](/reference/api/services/version/) of the service. | [optional] -**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] +**version** | **int** | Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. | [optional] +**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ServiceResponse.md b/docs/Model/ServiceResponse.md index fd4f6541..9409577b 100644 --- a/docs/Model/ServiceResponse.md +++ b/docs/Model/ServiceResponse.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **id** | **string** | | [optional] [readonly] **publish_key** | **string** | Unused at this time. | [optional] **paused** | **bool** | Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. | [optional] -**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] +**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ServiceResponseAllOf.md b/docs/Model/ServiceResponseAllOf.md index daf4243b..d419e749 100644 --- a/docs/Model/ServiceResponseAllOf.md +++ b/docs/Model/ServiceResponseAllOf.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **string** | | [optional] [readonly] **publish_key** | **string** | Unused at this time. | [optional] **paused** | **bool** | Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. | [optional] -**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] +**versions** | [**\Fastly\Model\SchemasVersionResponse[]**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsConfigurationResponseAttributes.md b/docs/Model/TlsConfigurationResponseAttributes.md index 000e2395..133af790 100644 --- a/docs/Model/TlsConfigurationResponseAttributes.md +++ b/docs/Model/TlsConfigurationResponseAttributes.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**default** | **bool** | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). | [optional] [readonly] +**default** | **bool** | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/). | [optional] [readonly] **http_protocols** | **string[]** | HTTP protocols available on your configuration. | [optional] [readonly] **tls_protocols** | **string[]** | TLS protocols available on your configuration. | [optional] [readonly] **bulk** | **bool** | Signifies whether the configuration is used for Platform TLS or not. | [optional] [readonly] diff --git a/docs/Model/TlsConfigurationResponseAttributesAllOf.md b/docs/Model/TlsConfigurationResponseAttributesAllOf.md index b8767c72..8145eaa8 100644 --- a/docs/Model/TlsConfigurationResponseAttributesAllOf.md +++ b/docs/Model/TlsConfigurationResponseAttributesAllOf.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**default** | **bool** | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). | [optional] [readonly] +**default** | **bool** | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/). | [optional] [readonly] **http_protocols** | **string[]** | HTTP protocols available on your configuration. | [optional] [readonly] **tls_protocols** | **string[]** | TLS protocols available on your configuration. | [optional] [readonly] **bulk** | **bool** | Signifies whether the configuration is used for Platform TLS or not. | [optional] [readonly] diff --git a/docs/Model/TlsCsr.md b/docs/Model/TlsCsr.md new file mode 100644 index 00000000..51a42da9 --- /dev/null +++ b/docs/Model/TlsCsr.md @@ -0,0 +1,10 @@ +# # TlsCsr + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\TlsCsrData**](TlsCsrData.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsCsrData.md b/docs/Model/TlsCsrData.md new file mode 100644 index 00000000..61460896 --- /dev/null +++ b/docs/Model/TlsCsrData.md @@ -0,0 +1,12 @@ +# # TlsCsrData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\Fastly\Model\TypeTlsCsr**](TypeTlsCsr.md) | | [optional] +**attributes** | [**\Fastly\Model\TlsCsrDataAttributes**](TlsCsrDataAttributes.md) | | [optional] +**relationships** | [**\Fastly\Model\RelationshipTlsPrivateKey**](RelationshipTlsPrivateKey.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsCsrDataAttributes.md b/docs/Model/TlsCsrDataAttributes.md new file mode 100644 index 00000000..58ea2d85 --- /dev/null +++ b/docs/Model/TlsCsrDataAttributes.md @@ -0,0 +1,20 @@ +# # TlsCsrDataAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sans** | **string[]** | Subject Alternate Names - An array of one or more fully qualified domain names or public IP addresses to be secured by this certificate. Required. | +**common_name** | **string** | Common Name (CN) - The fully qualified domain name (FQDN) to be secured by this certificate. The common name should be one of the entries in the SANs parameter. | [optional] +**country** | **string** | Country (C) - The two-letter ISO country code where the organization is located. | [optional] +**state** | **string** | State (S) - The state, province, region, or county where the organization is located. This should not be abbreviated. | [optional] +**city** | **string** | Locality (L) - The locality, city, town, or village where the organization is located. | [optional] +**postal_code** | **string** | Postal Code - The postal code where the organization is located. | [optional] +**street_address** | **string** | Street Address - The street address where the organization is located. | [optional] +**organization** | **string** | Organization (O) - The legal name of the organization, including any suffixes. This should not be abbreviated. | [optional] +**organizational_unit** | **string** | Organizational Unit (OU) - The internal division of the organization managing the certificate. | [optional] +**email** | **string** | Email Address (EMAIL) - The organizational contact for this. | [optional] +**key_type** | **string** | CSR Key Type. | [optional] [one of: 'RSA2048', 'ECDSA256'] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsCsrErrorResponse.md b/docs/Model/TlsCsrErrorResponse.md new file mode 100644 index 00000000..cfe93d2e --- /dev/null +++ b/docs/Model/TlsCsrErrorResponse.md @@ -0,0 +1,10 @@ +# # TlsCsrErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**\Fastly\Model\ErrorResponseData[]**](ErrorResponseData.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsCsrResponse.md b/docs/Model/TlsCsrResponse.md new file mode 100644 index 00000000..4a9f9a2c --- /dev/null +++ b/docs/Model/TlsCsrResponse.md @@ -0,0 +1,10 @@ +# # TlsCsrResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\TlsCsrResponseData**](TlsCsrResponseData.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsCsrResponseAttributes.md b/docs/Model/TlsCsrResponseAttributes.md new file mode 100644 index 00000000..00f57d55 --- /dev/null +++ b/docs/Model/TlsCsrResponseAttributes.md @@ -0,0 +1,10 @@ +# # TlsCsrResponseAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **string** | The PEM encoded CSR. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsCsrResponseData.md b/docs/Model/TlsCsrResponseData.md new file mode 100644 index 00000000..7ac526ce --- /dev/null +++ b/docs/Model/TlsCsrResponseData.md @@ -0,0 +1,13 @@ +# # TlsCsrResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**type** | [**\Fastly\Model\TypeTlsCsr**](TypeTlsCsr.md) | | [optional] +**attributes** | [**\Fastly\Model\TlsCsrResponseAttributes**](TlsCsrResponseAttributes.md) | | [optional] +**relationships** | [**\Fastly\Model\RelationshipTlsPrivateKey**](RelationshipTlsPrivateKey.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsSubscriptionDataAttributes.md b/docs/Model/TlsSubscriptionDataAttributes.md index d59b2263..1e6ec352 100644 --- a/docs/Model/TlsSubscriptionDataAttributes.md +++ b/docs/Model/TlsSubscriptionDataAttributes.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**certificate_authority** | **string** | The entity that issues and certifies the TLS certificates for your subscription. | [optional] [one of: 'lets-encrypt', 'globalsign'] +**certificate_authority** | **string** | The entity that issues and certifies the TLS certificates for your subscription. | [optional] [one of: 'lets-encrypt', 'certainly', 'globalsign'] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsSubscriptionResponseAttributes.md b/docs/Model/TlsSubscriptionResponseAttributes.md index 0a019e69..47c1e62f 100644 --- a/docs/Model/TlsSubscriptionResponseAttributes.md +++ b/docs/Model/TlsSubscriptionResponseAttributes.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **state** | **string** | The current state of your subscription. | [optional] [one of: 'pending', 'processing', 'issued', 'renewing', 'failed'] +**has_active_order** | **bool** | Subscription has an active order | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsSubscriptionResponseAttributesAllOf.md b/docs/Model/TlsSubscriptionResponseAttributesAllOf.md index a1f91fd8..bab61617 100644 --- a/docs/Model/TlsSubscriptionResponseAttributesAllOf.md +++ b/docs/Model/TlsSubscriptionResponseAttributesAllOf.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **state** | **string** | The current state of your subscription. | [optional] [one of: 'pending', 'processing', 'issued', 'renewing', 'failed'] +**has_active_order** | **bool** | Subscription has an active order | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TypeTlsCsr.md b/docs/Model/TypeTlsCsr.md new file mode 100644 index 00000000..96706524 --- /dev/null +++ b/docs/Model/TypeTlsCsr.md @@ -0,0 +1,9 @@ +# # TypeTlsCsr + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/AutomationTokensApi.php b/lib/Api/AutomationTokensApi.php index afbcfe5f..c878d73d 100644 --- a/lib/Api/AutomationTokensApi.php +++ b/lib/Api/AutomationTokensApi.php @@ -437,7 +437,7 @@ public function createAutomationTokenRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\AutomationTokenResponse|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse + * @return \Fastly\Model\AutomationTokenResponse|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse */ public function getAutomationTokenId($options) { @@ -459,7 +459,7 @@ public function getAutomationTokenId($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\AutomationTokenResponse|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\AutomationTokenResponse|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function getAutomationTokenIdWithHttpInfo($options) { @@ -526,26 +526,26 @@ public function getAutomationTokenIdWithHttpInfo($options) $response->getHeaders() ]; case 401: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -577,7 +577,7 @@ public function getAutomationTokenIdWithHttpInfo($options) case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -585,7 +585,7 @@ public function getAutomationTokenIdWithHttpInfo($options) case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -801,7 +801,7 @@ public function getAutomationTokenIdRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2001|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse + * @return \Fastly\Model\InlineResponse2001|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse */ public function getAutomationTokensIdServices($options) { @@ -825,7 +825,7 @@ public function getAutomationTokensIdServices($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2001|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2001|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function getAutomationTokensIdServicesWithHttpInfo($options) { @@ -892,26 +892,26 @@ public function getAutomationTokensIdServicesWithHttpInfo($options) $response->getHeaders() ]; case 401: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -943,7 +943,7 @@ public function getAutomationTokensIdServicesWithHttpInfo($options) case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -951,7 +951,7 @@ public function getAutomationTokensIdServicesWithHttpInfo($options) case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1196,7 +1196,7 @@ public function getAutomationTokensIdServicesRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\AutomationTokenResponse[]|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse + * @return \Fastly\Model\AutomationTokenResponse[]|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse */ public function listAutomationTokens($options) { @@ -1219,7 +1219,7 @@ public function listAutomationTokens($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\AutomationTokenResponse[]|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\AutomationTokenResponse[]|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function listAutomationTokensWithHttpInfo($options) { @@ -1286,26 +1286,26 @@ public function listAutomationTokensWithHttpInfo($options) $response->getHeaders() ]; case 401: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1337,7 +1337,7 @@ public function listAutomationTokensWithHttpInfo($options) case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1345,7 +1345,7 @@ public function listAutomationTokensWithHttpInfo($options) case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1571,7 +1571,7 @@ public function listAutomationTokensRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse + * @return \Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse */ public function revokeAutomationTokenId($options) { @@ -1593,7 +1593,7 @@ public function revokeAutomationTokenId($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse|\Fastly\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse|\Fastly\Model\AutomationTokenErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function revokeAutomationTokenIdWithHttpInfo($options) { @@ -1648,68 +1648,68 @@ public function revokeAutomationTokenIdWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 401: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 404: - if ('\Fastly\Model\ErrorResponse' === '\SplFileObject') { + if ('\Fastly\Model\AutomationTokenErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\AutomationTokenErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\ErrorResponse'; + $returnType = '\Fastly\Model\AutomationTokenErrorResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1727,7 +1727,7 @@ public function revokeAutomationTokenIdWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1735,7 +1735,7 @@ public function revokeAutomationTokenIdWithHttpInfo($options) case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1743,7 +1743,7 @@ public function revokeAutomationTokenIdWithHttpInfo($options) case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1751,7 +1751,7 @@ public function revokeAutomationTokenIdWithHttpInfo($options) case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1759,7 +1759,7 @@ public function revokeAutomationTokenIdWithHttpInfo($options) case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ErrorResponse', + '\Fastly\Model\AutomationTokenErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1811,7 +1811,7 @@ function ($response) { */ public function revokeAutomationTokenIdAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\ErrorResponse'; + $returnType = '\Fastly\Model\AutomationTokenErrorResponse'; $request = $this->revokeAutomationTokenIdRequest($options); return $this->client diff --git a/lib/Api/BackendApi.php b/lib/Api/BackendApi.php index 79910cec..2a7bb1ab 100644 --- a/lib/Api/BackendApi.php +++ b/lib/Api/BackendApi.php @@ -145,7 +145,7 @@ public function getConfig() * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) @@ -199,7 +199,7 @@ public function createBackend($options) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) @@ -341,7 +341,7 @@ public function createBackendWithHttpInfo($options) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) @@ -398,7 +398,7 @@ function ($response) { * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) @@ -481,7 +481,7 @@ function ($exception) { * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) @@ -1868,7 +1868,7 @@ public function listBackendsRequest($options) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) @@ -1923,7 +1923,7 @@ public function updateBackend($options) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) @@ -2066,7 +2066,7 @@ public function updateBackendWithHttpInfo($options) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) @@ -2124,7 +2124,7 @@ function ($response) { * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) @@ -2208,7 +2208,7 @@ function ($exception) { * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) - * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) + * @param string $ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $ssl_client_cert Client certificate attached to origin. (optional) * @param string $ssl_client_key Client key attached to origin. (optional) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) diff --git a/lib/Api/BillingInvoicesApi.php b/lib/Api/BillingInvoicesApi.php new file mode 100644 index 00000000..56a90dea --- /dev/null +++ b/lib/Api/BillingInvoicesApi.php @@ -0,0 +1,942 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getInvoiceByInvoiceId + * + * Get invoice by ID. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $invoice_id Alphanumeric string identifying the invoice. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\InvoiceResponse|\Fastly\Model\Error|\Fastly\Model\Error|\Fastly\Model\Error + */ + public function getInvoiceByInvoiceId($options) + { + list($response) = $this->getInvoiceByInvoiceIdWithHttpInfo($options); + return $response; + } + + /** + * Operation getInvoiceByInvoiceIdWithHttpInfo + * + * Get invoice by ID. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $invoice_id Alphanumeric string identifying the invoice. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\InvoiceResponse|\Fastly\Model\Error|\Fastly\Model\Error|\Fastly\Model\Error, HTTP status code, HTTP response headers (array of strings) + */ + public function getInvoiceByInvoiceIdWithHttpInfo($options) + { + $request = $this->getInvoiceByInvoiceIdRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\InvoiceResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\InvoiceResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Fastly\Model\Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Fastly\Model\Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Fastly\Model\Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\InvoiceResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\InvoiceResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getInvoiceByInvoiceIdAsync + * + * Get invoice by ID. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $invoice_id Alphanumeric string identifying the invoice. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInvoiceByInvoiceIdAsync($options) + { + return $this->getInvoiceByInvoiceIdAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getInvoiceByInvoiceIdAsyncWithHttpInfo + * + * Get invoice by ID. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $invoice_id Alphanumeric string identifying the invoice. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getInvoiceByInvoiceIdAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\InvoiceResponse'; + $request = $this->getInvoiceByInvoiceIdRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getInvoiceByInvoiceId' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $invoice_id Alphanumeric string identifying the invoice. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getInvoiceByInvoiceIdRequest($options) + { + // unbox the parameters from the associative array + $invoice_id = array_key_exists('invoice_id', $options) ? $options['invoice_id'] : null; + + // verify the required parameter 'invoice_id' is set + if ($invoice_id === null || (is_array($invoice_id) && count($invoice_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $invoice_id when calling getInvoiceByInvoiceId' + ); + } + + $resourcePath = '/billing/v3/invoices/{invoice_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($invoice_id !== null) { + $resourcePath = str_replace( + '{' . 'invoice_id' . '}', + ObjectSerializer::toPathValue($invoice_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listInvoices + * + * List of invoices. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $billing_start_date billing_start_date (optional) + * @param string $billing_end_date billing_end_date (optional) + * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ListInvoicesResponse|\Fastly\Model\Error|\Fastly\Model\Error|\Fastly\Model\Error + */ + public function listInvoices($options) + { + list($response) = $this->listInvoicesWithHttpInfo($options); + return $response; + } + + /** + * Operation listInvoicesWithHttpInfo + * + * List of invoices. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $billing_start_date (optional) + * @param string $billing_end_date (optional) + * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ListInvoicesResponse|\Fastly\Model\Error|\Fastly\Model\Error|\Fastly\Model\Error, HTTP status code, HTTP response headers (array of strings) + */ + public function listInvoicesWithHttpInfo($options) + { + $request = $this->listInvoicesRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ListInvoicesResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ListInvoicesResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Fastly\Model\Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Fastly\Model\Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Fastly\Model\Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ListInvoicesResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ListInvoicesResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listInvoicesAsync + * + * List of invoices. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $billing_start_date (optional) + * @param string $billing_end_date (optional) + * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listInvoicesAsync($options) + { + return $this->listInvoicesAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listInvoicesAsyncWithHttpInfo + * + * List of invoices. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $billing_start_date (optional) + * @param string $billing_end_date (optional) + * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listInvoicesAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ListInvoicesResponse'; + $request = $this->listInvoicesRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listInvoices' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $billing_start_date (optional) + * @param string $billing_end_date (optional) + * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listInvoicesRequest($options) + { + // unbox the parameters from the associative array + $billing_start_date = array_key_exists('billing_start_date', $options) ? $options['billing_start_date'] : null; + $billing_end_date = array_key_exists('billing_end_date', $options) ? $options['billing_end_date'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : '100'; + $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; + + + $resourcePath = '/billing/v3/invoices'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($billing_start_date !== null) { + if('form' === 'form' && is_array($billing_start_date)) { + foreach($billing_start_date as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['billing_start_date'] = ObjectSerializer::toString($billing_start_date); + } + } + // query params + if ($billing_end_date !== null) { + if('form' === 'form' && is_array($billing_end_date)) { + foreach($billing_end_date as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['billing_end_date'] = ObjectSerializer::toString($billing_end_date); + } + } + // query params + if ($limit !== null) { + if('form' === 'form' && is_array($limit)) { + foreach($limit as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['limit'] = ObjectSerializer::toString($limit); + } + } + // query params + if ($cursor !== null) { + if('form' === 'form' && is_array($cursor)) { + foreach($cursor as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['cursor'] = ObjectSerializer::toString($cursor); + } + } + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/DirectorApi.php b/lib/Api/DirectorApi.php index 6a28f90b..a38e7034 100644 --- a/lib/Api/DirectorApi.php +++ b/lib/Api/DirectorApi.php @@ -126,7 +126,7 @@ public function getConfig() * @param string $comment A freeform descriptive note. (optional) * @param string $name Name for the Director. (optional) * @param int $quorum The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. (optional, default to 75) - * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param int $type What type of load balance group to use. (optional, default to 1) * @param int $retries How many backends to search if it fails. (optional, default to 5) * @@ -157,7 +157,7 @@ public function createDirector($options) * @param string $comment A freeform descriptive note. (optional) * @param string $name Name for the Director. (optional) * @param int $quorum The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. (optional, default to 75) - * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param int $type What type of load balance group to use. (optional, default to 1) * @param int $retries How many backends to search if it fails. (optional, default to 5) * @@ -276,7 +276,7 @@ public function createDirectorWithHttpInfo($options) * @param string $comment A freeform descriptive note. (optional) * @param string $name Name for the Director. (optional) * @param int $quorum The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. (optional, default to 75) - * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param int $type What type of load balance group to use. (optional, default to 1) * @param int $retries How many backends to search if it fails. (optional, default to 5) * @@ -310,7 +310,7 @@ function ($response) { * @param string $comment A freeform descriptive note. (optional) * @param string $name Name for the Director. (optional) * @param int $quorum The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. (optional, default to 75) - * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param int $type What type of load balance group to use. (optional, default to 1) * @param int $retries How many backends to search if it fails. (optional, default to 5) * @@ -370,7 +370,7 @@ function ($exception) { * @param string $comment A freeform descriptive note. (optional) * @param string $name Name for the Director. (optional) * @param int $quorum The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. (optional, default to 75) - * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param int $type What type of load balance group to use. (optional, default to 1) * @param int $retries How many backends to search if it fails. (optional, default to 5) * diff --git a/lib/Api/DomainInspectorHistoricalApi.php b/lib/Api/DomainInspectorHistoricalApi.php index b46dd4da..c6e0b959 100644 --- a/lib/Api/DomainInspectorHistoricalApi.php +++ b/lib/Api/DomainInspectorHistoricalApi.php @@ -123,10 +123,10 @@ public function getConfig() * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'edge_requests') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'edge_requests') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $domain Limit query to one or more specific domains. Values should be comma-separated. (optional) @@ -155,10 +155,10 @@ public function getDomainInspectorHistorical($options) * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'edge_requests') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'edge_requests') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $domain Limit query to one or more specific domains. Values should be comma-separated. (optional) @@ -275,10 +275,10 @@ public function getDomainInspectorHistoricalWithHttpInfo($options) * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'edge_requests') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'edge_requests') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $domain Limit query to one or more specific domains. Values should be comma-separated. (optional) @@ -310,10 +310,10 @@ function ($response) { * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'edge_requests') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'edge_requests') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $domain Limit query to one or more specific domains. Values should be comma-separated. (optional) @@ -371,10 +371,10 @@ function ($exception) { * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'edge_requests') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'edge_requests') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $domain Limit query to one or more specific domains. Values should be comma-separated. (optional) diff --git a/lib/Api/KvStoreApi.php b/lib/Api/KvStoreApi.php index baa1768d..e9ef725f 100644 --- a/lib/Api/KvStoreApi.php +++ b/lib/Api/KvStoreApi.php @@ -1050,7 +1050,7 @@ public function getStoreRequest($options) * URL: https://api.fastly.com * * @param string $cursor cursor (optional) - * @param int $limit limit (optional, default to 100) + * @param int $limit limit (optional, default to 1000) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1073,7 +1073,7 @@ public function getStores($options) * URL: https://api.fastly.com * * @param string $cursor (optional) - * @param int $limit (optional, default to 100) + * @param int $limit (optional, default to 1000) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1184,7 +1184,7 @@ public function getStoresWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $cursor (optional) - * @param int $limit (optional, default to 100) + * @param int $limit (optional, default to 1000) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1210,7 +1210,7 @@ function ($response) { * URL: https://api.fastly.com * * @param string $cursor (optional) - * @param int $limit (optional, default to 100) + * @param int $limit (optional, default to 1000) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1262,7 +1262,7 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $cursor (optional) - * @param int $limit (optional, default to 100) + * @param int $limit (optional, default to 1000) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1271,7 +1271,7 @@ public function getStoresRequest($options) { // unbox the parameters from the associative array $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; - $limit = array_key_exists('limit', $options) ? $options['limit'] : 100; + $limit = array_key_exists('limit', $options) ? $options['limit'] : 1000; $resourcePath = '/resources/stores/kv'; diff --git a/lib/Api/LoggingScalyrApi.php b/lib/Api/LoggingScalyrApi.php index 033cfc1c..9dda0aba 100644 --- a/lib/Api/LoggingScalyrApi.php +++ b/lib/Api/LoggingScalyrApi.php @@ -127,7 +127,7 @@ public function getConfig() * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \Fastly\ApiException on non-2xx response @@ -158,7 +158,7 @@ public function createLogScalyr($options) * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \Fastly\ApiException on non-2xx response @@ -277,7 +277,7 @@ public function createLogScalyrWithHttpInfo($options) * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \InvalidArgumentException @@ -311,7 +311,7 @@ function ($response) { * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \InvalidArgumentException @@ -371,7 +371,7 @@ function ($exception) { * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \InvalidArgumentException @@ -1616,7 +1616,7 @@ public function listLogScalyrRequest($options) * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \Fastly\ApiException on non-2xx response @@ -1648,7 +1648,7 @@ public function updateLogScalyr($options) * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \Fastly\ApiException on non-2xx response @@ -1768,7 +1768,7 @@ public function updateLogScalyrWithHttpInfo($options) * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \InvalidArgumentException @@ -1803,7 +1803,7 @@ function ($response) { * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \InvalidArgumentException @@ -1864,7 +1864,7 @@ function ($exception) { * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') * @param int $format_version 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, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') - * @param string $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). (optional) + * @param string $token The token to use for authentication. (optional) * @param string $project_id The name of the logfile within Scalyr. (optional, default to 'logplex') * * @throws \InvalidArgumentException diff --git a/lib/Api/OriginInspectorHistoricalApi.php b/lib/Api/OriginInspectorHistoricalApi.php index 4b015fb2..a0ed335c 100644 --- a/lib/Api/OriginInspectorHistoricalApi.php +++ b/lib/Api/OriginInspectorHistoricalApi.php @@ -123,10 +123,10 @@ public function getConfig() * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'responses') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'responses') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $host Limit query to one or more specific origin hosts. Values should be comma-separated. (optional) @@ -155,10 +155,10 @@ public function getOriginInspectorHistorical($options) * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'responses') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'responses') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $host Limit query to one or more specific origin hosts. Values should be comma-separated. (optional) @@ -275,10 +275,10 @@ public function getOriginInspectorHistoricalWithHttpInfo($options) * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'responses') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'responses') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $host Limit query to one or more specific origin hosts. Values should be comma-separated. (optional) @@ -310,10 +310,10 @@ function ($response) { * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'responses') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'responses') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $host Limit query to one or more specific origin hosts. Values should be comma-separated. (optional) @@ -371,10 +371,10 @@ function ($exception) { * @param string $start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) * @param string $downsample Duration of sample windows. (optional, default to 'hour') - * @param string $metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (optional, default to 'responses') + * @param string $metric The metrics to retrieve. Multiple values should be comma-separated. (optional, default to 'responses') * @param string $group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) * @param string $host Limit query to one or more specific origin hosts. Values should be comma-separated. (optional) diff --git a/lib/Api/PoolApi.php b/lib/Api/PoolApi.php index 94b2811b..5a32cf66 100644 --- a/lib/Api/PoolApi.php +++ b/lib/Api/PoolApi.php @@ -132,7 +132,7 @@ public function getConfig() * @param string $service_id service_id (optional) * @param string $version version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) @@ -182,7 +182,7 @@ public function createServerPool($options) * @param string $service_id (optional) * @param string $version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) @@ -320,7 +320,7 @@ public function createServerPoolWithHttpInfo($options) * @param string $service_id (optional) * @param string $version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) @@ -373,7 +373,7 @@ function ($response) { * @param string $service_id (optional) * @param string $version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) @@ -452,7 +452,7 @@ function ($exception) { * @param string $service_id (optional) * @param string $version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) @@ -1818,7 +1818,7 @@ public function listServerPoolsRequest($options) * @param string $service_id service_id (optional) * @param string $version version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) @@ -1869,7 +1869,7 @@ public function updateServerPool($options) * @param string $service_id (optional) * @param string $version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) @@ -2008,7 +2008,7 @@ public function updateServerPoolWithHttpInfo($options) * @param string $service_id (optional) * @param string $version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) @@ -2062,7 +2062,7 @@ function ($response) { * @param string $service_id (optional) * @param string $version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) @@ -2142,7 +2142,7 @@ function ($exception) { * @param string $service_id (optional) * @param string $version (optional) * @param string $name Name for the Pool. (optional) - * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') + * @param string $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (optional, default to 'null') * @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional) * @param string $tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. (optional) * @param string $tls_sni_hostname SNI hostname. Optional. (optional) diff --git a/lib/Api/SecretStoreApi.php b/lib/Api/SecretStoreApi.php index ded801d4..29469fbf 100644 --- a/lib/Api/SecretStoreApi.php +++ b/lib/Api/SecretStoreApi.php @@ -1334,8 +1334,9 @@ public function getSecretStoreRequest($options) * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $name Returns a one-element array containing the details for the named secret store. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1357,8 +1358,9 @@ public function getSecretStores($options) * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $name Returns a one-element array containing the details for the named secret store. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1468,8 +1470,9 @@ public function getSecretStoresWithHttpInfo($options) * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $name Returns a one-element array containing the details for the named secret store. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1494,8 +1497,9 @@ function ($response) { * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $name Returns a one-element array containing the details for the named secret store. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1546,8 +1550,9 @@ function ($exception) { * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') + * @param string $name Returns a one-element array containing the details for the named secret store. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1557,6 +1562,7 @@ public function getSecretStoresRequest($options) // unbox the parameters from the associative array $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; $limit = array_key_exists('limit', $options) ? $options['limit'] : '100'; + $name = array_key_exists('name', $options) ? $options['name'] : null; $resourcePath = '/resources/stores/secret'; @@ -1588,6 +1594,17 @@ public function getSecretStoresRequest($options) $queryParams['limit'] = ObjectSerializer::toString($limit); } } + // query params + if ($name !== null) { + if('form' === 'form' && is_array($name)) { + foreach($name as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['name'] = ObjectSerializer::toString($name); + } + } diff --git a/lib/Api/SecretStoreItemApi.php b/lib/Api/SecretStoreItemApi.php index 1d899adb..762a8c54 100644 --- a/lib/Api/SecretStoreItemApi.php +++ b/lib/Api/SecretStoreItemApi.php @@ -1093,7 +1093,7 @@ public function getSecretRequest($options) * URL: https://api.fastly.com * * @param string $store_id store_id (required) - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') * * @throws \Fastly\ApiException on non-2xx response @@ -1117,7 +1117,7 @@ public function getSecrets($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') * * @throws \Fastly\ApiException on non-2xx response @@ -1229,7 +1229,7 @@ public function getSecretsWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') * * @throws \InvalidArgumentException @@ -1256,7 +1256,7 @@ function ($response) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') * * @throws \InvalidArgumentException @@ -1309,7 +1309,7 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param string $limit Number of results per page. The maximum is 200. (optional, default to '100') * * @throws \InvalidArgumentException diff --git a/lib/Api/TlsCsrsApi.php b/lib/Api/TlsCsrsApi.php new file mode 100644 index 00000000..934e9219 --- /dev/null +++ b/lib/Api/TlsCsrsApi.php @@ -0,0 +1,444 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createCsr + * + * Create CSR + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\TlsCsr $tls_csr tls_csr (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\TlsCsrResponse + */ + public function createCsr($options) + { + list($response) = $this->createCsrWithHttpInfo($options); + return $response; + } + + /** + * Operation createCsrWithHttpInfo + * + * Create CSR + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\TlsCsr $tls_csr (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\TlsCsrResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createCsrWithHttpInfo($options) + { + $request = $this->createCsrRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('POST' != 'GET' && 'POST' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 201: + if ('\Fastly\Model\TlsCsrResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\TlsCsrResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\TlsCsrResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\TlsCsrResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createCsrAsync + * + * Create CSR + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\TlsCsr $tls_csr (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCsrAsync($options) + { + return $this->createCsrAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createCsrAsyncWithHttpInfo + * + * Create CSR + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\TlsCsr $tls_csr (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCsrAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\TlsCsrResponse'; + $request = $this->createCsrRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createCsr' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\TlsCsr $tls_csr (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createCsrRequest($options) + { + // unbox the parameters from the associative array + $tls_csr = array_key_exists('tls_csr', $options) ? $options['tls_csr'] : null; + + + $resourcePath = '/tls/certificate_signing_requests'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/vnd.api+json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/vnd.api+json'], + ['application/vnd.api+json'] + ); + } + + // for model (json/xml) + if (isset($tls_csr)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($tls_csr)); + } else { + $httpBody = $tls_csr; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Configuration.php b/lib/Configuration.php index bdb124b1..81e7a9d1 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/5.0.1'; + protected $userAgent = 'fastly-php/5.1.0'; /** * Debug switch (default set to false) @@ -453,7 +453,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 5.0.1' . PHP_EOL; + $report .= ' SDK Package Version: 5.1.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/ErrorResponse.php b/lib/Model/AutomationTokenErrorResponse.php similarity index 97% rename from lib/Model/ErrorResponse.php rename to lib/Model/AutomationTokenErrorResponse.php index 3441fd6b..f762a66c 100644 --- a/lib/Model/ErrorResponse.php +++ b/lib/Model/AutomationTokenErrorResponse.php @@ -1,6 +1,6 @@ >|null $datacenter Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](/reference/api/utils/pops/) for details about POP identifiers. + * @param array>|null $datacenter Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. * * @return self */ diff --git a/lib/Model/Error.php b/lib/Model/Error.php new file mode 100644 index 00000000..30d69ce1 --- /dev/null +++ b/lib/Model/Error.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Error implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'error'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'type' => 'string', + 'title' => 'string', + 'code' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'type' => null, + 'title' => null, + 'code' => null, + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'title' => 'title', + 'code' => 'code', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'title' => 'setTitle', + 'code' => 'setCode', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'title' => 'getTitle', + 'code' => 'getCode', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data['type'] ?? null; + $this->container['title'] = $data['title'] ?? null; + $this->container['code'] = $data['code'] ?? null; + $this->container['status'] = $data['status'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return self + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code code + * + * @return self + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ErrorResponseData.php b/lib/Model/ErrorResponseData.php new file mode 100644 index 00000000..7000eee4 --- /dev/null +++ b/lib/Model/ErrorResponseData.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ErrorResponseData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'error_response_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'title' => 'string', + 'detail' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'title' => null, + 'detail' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'detail' => 'detail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'detail' => 'setDetail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'detail' => 'getDetail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['title'] = $data['title'] ?? null; + $this->container['detail'] = $data['detail'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return self + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets detail + * + * @return string|null + */ + public function getDetail() + { + return $this->container['detail']; + } + + /** + * Sets detail + * + * @param string|null $detail detail + * + * @return self + */ + public function setDetail($detail) + { + $this->container['detail'] = $detail; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EventAttributes.php b/lib/Model/EventAttributes.php index b16e7dbf..f2ad999b 100644 --- a/lib/Model/EventAttributes.php +++ b/lib/Model/EventAttributes.php @@ -208,6 +208,10 @@ public function getModelName() const EVENT_TYPE_ADDRESS_CREATE = 'address.create'; const EVENT_TYPE_ADDRESS_DELETE = 'address.delete'; const EVENT_TYPE_ADDRESS_UPDATE = 'address.update'; + const EVENT_TYPE_ALERTS_DEFINITION_CREATE = 'alerts.definition.create'; + const EVENT_TYPE_ALERTS_DEFINITION_DELETE = 'alerts.definition.delete'; + const EVENT_TYPE_ALERTS_DEFINITION_TEST = 'alerts.definition.test'; + const EVENT_TYPE_ALERTS_DEFINITION_UPDATE = 'alerts.definition.update'; const EVENT_TYPE_BACKEND_CREATE = 'backend.create'; const EVENT_TYPE_BACKEND_DELETE = 'backend.delete'; const EVENT_TYPE_BACKEND_UPDATE = 'backend.update'; @@ -344,6 +348,10 @@ public function getEventTypeAllowableValues() self::EVENT_TYPE_ADDRESS_CREATE, self::EVENT_TYPE_ADDRESS_DELETE, self::EVENT_TYPE_ADDRESS_UPDATE, + self::EVENT_TYPE_ALERTS_DEFINITION_CREATE, + self::EVENT_TYPE_ALERTS_DEFINITION_DELETE, + self::EVENT_TYPE_ALERTS_DEFINITION_TEST, + self::EVENT_TYPE_ALERTS_DEFINITION_UPDATE, self::EVENT_TYPE_BACKEND_CREATE, self::EVENT_TYPE_BACKEND_DELETE, self::EVENT_TYPE_BACKEND_UPDATE, diff --git a/lib/Model/Invoice.php b/lib/Model/Invoice.php new file mode 100644 index 00000000..cabc0ed5 --- /dev/null +++ b/lib/Model/Invoice.php @@ -0,0 +1,554 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Invoice implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'invoice'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer_id' => 'string', + 'invoice_id' => 'string', + 'invoice_posted_on' => '\DateTime', + 'billing_start_date' => '\DateTime', + 'billing_end_date' => '\DateTime', + 'statement_number' => 'string', + 'currency_code' => 'string', + 'monthly_transaction_amount' => 'float', + 'transaction_line_items' => '\Fastly\Model\Invoicelineitems[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer_id' => null, + 'invoice_id' => null, + 'invoice_posted_on' => 'date-time', + 'billing_start_date' => 'date-time', + 'billing_end_date' => 'date-time', + 'statement_number' => null, + 'currency_code' => null, + 'monthly_transaction_amount' => null, + 'transaction_line_items' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer_id' => 'customer_id', + 'invoice_id' => 'invoice_id', + 'invoice_posted_on' => 'invoice_posted_on', + 'billing_start_date' => 'billing_start_date', + 'billing_end_date' => 'billing_end_date', + 'statement_number' => 'statement_number', + 'currency_code' => 'currency_code', + 'monthly_transaction_amount' => 'monthly_transaction_amount', + 'transaction_line_items' => 'transaction_line_items' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer_id' => 'setCustomerId', + 'invoice_id' => 'setInvoiceId', + 'invoice_posted_on' => 'setInvoicePostedOn', + 'billing_start_date' => 'setBillingStartDate', + 'billing_end_date' => 'setBillingEndDate', + 'statement_number' => 'setStatementNumber', + 'currency_code' => 'setCurrencyCode', + 'monthly_transaction_amount' => 'setMonthlyTransactionAmount', + 'transaction_line_items' => 'setTransactionLineItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer_id' => 'getCustomerId', + 'invoice_id' => 'getInvoiceId', + 'invoice_posted_on' => 'getInvoicePostedOn', + 'billing_start_date' => 'getBillingStartDate', + 'billing_end_date' => 'getBillingEndDate', + 'statement_number' => 'getStatementNumber', + 'currency_code' => 'getCurrencyCode', + 'monthly_transaction_amount' => 'getMonthlyTransactionAmount', + 'transaction_line_items' => 'getTransactionLineItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer_id'] = $data['customer_id'] ?? null; + $this->container['invoice_id'] = $data['invoice_id'] ?? null; + $this->container['invoice_posted_on'] = $data['invoice_posted_on'] ?? null; + $this->container['billing_start_date'] = $data['billing_start_date'] ?? null; + $this->container['billing_end_date'] = $data['billing_end_date'] ?? null; + $this->container['statement_number'] = $data['statement_number'] ?? null; + $this->container['currency_code'] = $data['currency_code'] ?? null; + $this->container['monthly_transaction_amount'] = $data['monthly_transaction_amount'] ?? null; + $this->container['transaction_line_items'] = $data['transaction_line_items'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer_id + * + * @return string|null + */ + public function getCustomerId() + { + return $this->container['customer_id']; + } + + /** + * Sets customer_id + * + * @param string|null $customer_id Customer ID associated with the invoice. + * + * @return self + */ + public function setCustomerId($customer_id) + { + $this->container['customer_id'] = $customer_id; + + return $this; + } + + /** + * Gets invoice_id + * + * @return string|null + */ + public function getInvoiceId() + { + return $this->container['invoice_id']; + } + + /** + * Sets invoice_id + * + * @param string|null $invoice_id Alphanumeric string identifying the invoice. + * + * @return self + */ + public function setInvoiceId($invoice_id) + { + $this->container['invoice_id'] = $invoice_id; + + return $this; + } + + /** + * Gets invoice_posted_on + * + * @return \DateTime|null + */ + public function getInvoicePostedOn() + { + return $this->container['invoice_posted_on']; + } + + /** + * Sets invoice_posted_on + * + * @param \DateTime|null $invoice_posted_on Date and time invoice was posted on, in ISO 8601 format. + * + * @return self + */ + public function setInvoicePostedOn($invoice_posted_on) + { + $this->container['invoice_posted_on'] = $invoice_posted_on; + + return $this; + } + + /** + * Gets billing_start_date + * + * @return \DateTime|null + */ + public function getBillingStartDate() + { + return $this->container['billing_start_date']; + } + + /** + * Sets billing_start_date + * + * @param \DateTime|null $billing_start_date Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. + * + * @return self + */ + public function setBillingStartDate($billing_start_date) + { + $this->container['billing_start_date'] = $billing_start_date; + + return $this; + } + + /** + * Gets billing_end_date + * + * @return \DateTime|null + */ + public function getBillingEndDate() + { + return $this->container['billing_end_date']; + } + + /** + * Sets billing_end_date + * + * @param \DateTime|null $billing_end_date Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. + * + * @return self + */ + public function setBillingEndDate($billing_end_date) + { + $this->container['billing_end_date'] = $billing_end_date; + + return $this; + } + + /** + * Gets statement_number + * + * @return string|null + */ + public function getStatementNumber() + { + return $this->container['statement_number']; + } + + /** + * Sets statement_number + * + * @param string|null $statement_number Alphanumeric string identifying the statement number. + * + * @return self + */ + public function setStatementNumber($statement_number) + { + $this->container['statement_number'] = $statement_number; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() + { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code Three-letter code representing a specific currency used for financial transactions. + * + * @return self + */ + public function setCurrencyCode($currency_code) + { + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets monthly_transaction_amount + * + * @return float|null + */ + public function getMonthlyTransactionAmount() + { + return $this->container['monthly_transaction_amount']; + } + + /** + * Sets monthly_transaction_amount + * + * @param float|null $monthly_transaction_amount Total billable amount for invoiced services charged within a single month. + * + * @return self + */ + public function setMonthlyTransactionAmount($monthly_transaction_amount) + { + $this->container['monthly_transaction_amount'] = $monthly_transaction_amount; + + return $this; + } + + /** + * Gets transaction_line_items + * + * @return \Fastly\Model\Invoicelineitems[]|null + */ + public function getTransactionLineItems() + { + return $this->container['transaction_line_items']; + } + + /** + * Sets transaction_line_items + * + * @param \Fastly\Model\Invoicelineitems[]|null $transaction_line_items transaction_line_items + * + * @return self + */ + public function setTransactionLineItems($transaction_line_items) + { + $this->container['transaction_line_items'] = $transaction_line_items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InvoiceResponse.php b/lib/Model/InvoiceResponse.php new file mode 100644 index 00000000..0eb4ec57 --- /dev/null +++ b/lib/Model/InvoiceResponse.php @@ -0,0 +1,554 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InvoiceResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'invoice_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer_id' => 'string', + 'invoice_id' => 'string', + 'invoice_posted_on' => '\DateTime', + 'billing_start_date' => '\DateTime', + 'billing_end_date' => '\DateTime', + 'statement_number' => 'string', + 'currency_code' => 'string', + 'monthly_transaction_amount' => 'float', + 'transaction_line_items' => '\Fastly\Model\Invoicelineitems[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer_id' => null, + 'invoice_id' => null, + 'invoice_posted_on' => 'date-time', + 'billing_start_date' => 'date-time', + 'billing_end_date' => 'date-time', + 'statement_number' => null, + 'currency_code' => null, + 'monthly_transaction_amount' => null, + 'transaction_line_items' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer_id' => 'customer_id', + 'invoice_id' => 'invoice_id', + 'invoice_posted_on' => 'invoice_posted_on', + 'billing_start_date' => 'billing_start_date', + 'billing_end_date' => 'billing_end_date', + 'statement_number' => 'statement_number', + 'currency_code' => 'currency_code', + 'monthly_transaction_amount' => 'monthly_transaction_amount', + 'transaction_line_items' => 'transaction_line_items' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer_id' => 'setCustomerId', + 'invoice_id' => 'setInvoiceId', + 'invoice_posted_on' => 'setInvoicePostedOn', + 'billing_start_date' => 'setBillingStartDate', + 'billing_end_date' => 'setBillingEndDate', + 'statement_number' => 'setStatementNumber', + 'currency_code' => 'setCurrencyCode', + 'monthly_transaction_amount' => 'setMonthlyTransactionAmount', + 'transaction_line_items' => 'setTransactionLineItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer_id' => 'getCustomerId', + 'invoice_id' => 'getInvoiceId', + 'invoice_posted_on' => 'getInvoicePostedOn', + 'billing_start_date' => 'getBillingStartDate', + 'billing_end_date' => 'getBillingEndDate', + 'statement_number' => 'getStatementNumber', + 'currency_code' => 'getCurrencyCode', + 'monthly_transaction_amount' => 'getMonthlyTransactionAmount', + 'transaction_line_items' => 'getTransactionLineItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer_id'] = $data['customer_id'] ?? null; + $this->container['invoice_id'] = $data['invoice_id'] ?? null; + $this->container['invoice_posted_on'] = $data['invoice_posted_on'] ?? null; + $this->container['billing_start_date'] = $data['billing_start_date'] ?? null; + $this->container['billing_end_date'] = $data['billing_end_date'] ?? null; + $this->container['statement_number'] = $data['statement_number'] ?? null; + $this->container['currency_code'] = $data['currency_code'] ?? null; + $this->container['monthly_transaction_amount'] = $data['monthly_transaction_amount'] ?? null; + $this->container['transaction_line_items'] = $data['transaction_line_items'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer_id + * + * @return string|null + */ + public function getCustomerId() + { + return $this->container['customer_id']; + } + + /** + * Sets customer_id + * + * @param string|null $customer_id Customer ID associated with the invoice. + * + * @return self + */ + public function setCustomerId($customer_id) + { + $this->container['customer_id'] = $customer_id; + + return $this; + } + + /** + * Gets invoice_id + * + * @return string|null + */ + public function getInvoiceId() + { + return $this->container['invoice_id']; + } + + /** + * Sets invoice_id + * + * @param string|null $invoice_id Alphanumeric string identifying the invoice. + * + * @return self + */ + public function setInvoiceId($invoice_id) + { + $this->container['invoice_id'] = $invoice_id; + + return $this; + } + + /** + * Gets invoice_posted_on + * + * @return \DateTime|null + */ + public function getInvoicePostedOn() + { + return $this->container['invoice_posted_on']; + } + + /** + * Sets invoice_posted_on + * + * @param \DateTime|null $invoice_posted_on Date and time invoice was posted on, in ISO 8601 format. + * + * @return self + */ + public function setInvoicePostedOn($invoice_posted_on) + { + $this->container['invoice_posted_on'] = $invoice_posted_on; + + return $this; + } + + /** + * Gets billing_start_date + * + * @return \DateTime|null + */ + public function getBillingStartDate() + { + return $this->container['billing_start_date']; + } + + /** + * Sets billing_start_date + * + * @param \DateTime|null $billing_start_date Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. + * + * @return self + */ + public function setBillingStartDate($billing_start_date) + { + $this->container['billing_start_date'] = $billing_start_date; + + return $this; + } + + /** + * Gets billing_end_date + * + * @return \DateTime|null + */ + public function getBillingEndDate() + { + return $this->container['billing_end_date']; + } + + /** + * Sets billing_end_date + * + * @param \DateTime|null $billing_end_date Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. + * + * @return self + */ + public function setBillingEndDate($billing_end_date) + { + $this->container['billing_end_date'] = $billing_end_date; + + return $this; + } + + /** + * Gets statement_number + * + * @return string|null + */ + public function getStatementNumber() + { + return $this->container['statement_number']; + } + + /** + * Sets statement_number + * + * @param string|null $statement_number Alphanumeric string identifying the statement number. + * + * @return self + */ + public function setStatementNumber($statement_number) + { + $this->container['statement_number'] = $statement_number; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() + { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code Three-letter code representing a specific currency used for financial transactions. + * + * @return self + */ + public function setCurrencyCode($currency_code) + { + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets monthly_transaction_amount + * + * @return float|null + */ + public function getMonthlyTransactionAmount() + { + return $this->container['monthly_transaction_amount']; + } + + /** + * Sets monthly_transaction_amount + * + * @param float|null $monthly_transaction_amount Total billable amount for invoiced services charged within a single month. + * + * @return self + */ + public function setMonthlyTransactionAmount($monthly_transaction_amount) + { + $this->container['monthly_transaction_amount'] = $monthly_transaction_amount; + + return $this; + } + + /** + * Gets transaction_line_items + * + * @return \Fastly\Model\Invoicelineitems[]|null + */ + public function getTransactionLineItems() + { + return $this->container['transaction_line_items']; + } + + /** + * Sets transaction_line_items + * + * @param \Fastly\Model\Invoicelineitems[]|null $transaction_line_items transaction_line_items + * + * @return self + */ + public function setTransactionLineItems($transaction_line_items) + { + $this->container['transaction_line_items'] = $transaction_line_items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Invoicelineitems.php b/lib/Model/Invoicelineitems.php new file mode 100644 index 00000000..5d9b09c7 --- /dev/null +++ b/lib/Model/Invoicelineitems.php @@ -0,0 +1,554 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Invoicelineitems implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'invoicelineitems'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'description' => 'string', + 'amount' => 'float', + 'credit_coupon_code' => 'string', + 'rate' => 'float', + 'units' => 'float', + 'product_name' => 'string', + 'product_group' => 'string', + 'region' => 'string', + 'usage_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'description' => null, + 'amount' => null, + 'credit_coupon_code' => null, + 'rate' => null, + 'units' => null, + 'product_name' => null, + 'product_group' => null, + 'region' => null, + 'usage_type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'description' => 'description', + 'amount' => 'amount', + 'credit_coupon_code' => 'credit_coupon_code', + 'rate' => 'rate', + 'units' => 'units', + 'product_name' => 'ProductName', + 'product_group' => 'ProductGroup', + 'region' => 'Region', + 'usage_type' => 'UsageType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'amount' => 'setAmount', + 'credit_coupon_code' => 'setCreditCouponCode', + 'rate' => 'setRate', + 'units' => 'setUnits', + 'product_name' => 'setProductName', + 'product_group' => 'setProductGroup', + 'region' => 'setRegion', + 'usage_type' => 'setUsageType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'amount' => 'getAmount', + 'credit_coupon_code' => 'getCreditCouponCode', + 'rate' => 'getRate', + 'units' => 'getUnits', + 'product_name' => 'getProductName', + 'product_group' => 'getProductGroup', + 'region' => 'getRegion', + 'usage_type' => 'getUsageType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['description'] = $data['description'] ?? null; + $this->container['amount'] = $data['amount'] ?? null; + $this->container['credit_coupon_code'] = $data['credit_coupon_code'] ?? null; + $this->container['rate'] = $data['rate'] ?? null; + $this->container['units'] = $data['units'] ?? null; + $this->container['product_name'] = $data['product_name'] ?? null; + $this->container['product_group'] = $data['product_group'] ?? null; + $this->container['region'] = $data['region'] ?? null; + $this->container['usage_type'] = $data['usage_type'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Invoice line item transaction name. + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets amount + * + * @return float|null + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float|null $amount Billed amount for line item. + * + * @return self + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets credit_coupon_code + * + * @return string|null + */ + public function getCreditCouponCode() + { + return $this->container['credit_coupon_code']; + } + + /** + * Sets credit_coupon_code + * + * @param string|null $credit_coupon_code Discount coupon associated with the invoice for any account or service credits. + * + * @return self + */ + public function setCreditCouponCode($credit_coupon_code) + { + $this->container['credit_coupon_code'] = $credit_coupon_code; + + return $this; + } + + /** + * Gets rate + * + * @return float|null + */ + public function getRate() + { + return $this->container['rate']; + } + + /** + * Sets rate + * + * @param float|null $rate Price per unit. + * + * @return self + */ + public function setRate($rate) + { + $this->container['rate'] = $rate; + + return $this; + } + + /** + * Gets units + * + * @return float|null + */ + public function getUnits() + { + return $this->container['units']; + } + + /** + * Sets units + * + * @param float|null $units Total number of units of usage. + * + * @return self + */ + public function setUnits($units) + { + $this->container['units'] = $units; + + return $this; + } + + /** + * Gets product_name + * + * @return string|null + */ + public function getProductName() + { + return $this->container['product_name']; + } + + /** + * Sets product_name + * + * @param string|null $product_name The name of the product. + * + * @return self + */ + public function setProductName($product_name) + { + $this->container['product_name'] = $product_name; + + return $this; + } + + /** + * Gets product_group + * + * @return string|null + */ + public function getProductGroup() + { + return $this->container['product_group']; + } + + /** + * Sets product_group + * + * @param string|null $product_group The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). + * + * @return self + */ + public function setProductGroup($product_group) + { + $this->container['product_group'] = $product_group; + + return $this; + } + + /** + * Gets region + * + * @return string|null + */ + public function getRegion() + { + return $this->container['region']; + } + + /** + * Sets region + * + * @param string|null $region The geographical area applicable for regionally based products. + * + * @return self + */ + public function setRegion($region) + { + $this->container['region'] = $region; + + return $this; + } + + /** + * Gets usage_type + * + * @return string|null + */ + public function getUsageType() + { + return $this->container['usage_type']; + } + + /** + * Sets usage_type + * + * @param string|null $usage_type The unit of measure (e.g., `requests` or `bandwidth`). + * + * @return self + */ + public function setUsageType($usage_type) + { + $this->container['usage_type'] = $usage_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ListInvoicesResponse.php b/lib/Model/ListInvoicesResponse.php new file mode 100644 index 00000000..df81fc55 --- /dev/null +++ b/lib/Model/ListInvoicesResponse.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ListInvoicesResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'list_invoices_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'data' => '\Fastly\Model\Invoice[]', + 'meta' => '\Fastly\Model\Metadata' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'data' => null, + 'meta' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Fastly\Model\Invoice[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\Invoice[]|null $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \Fastly\Model\Metadata|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Fastly\Model\Metadata|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Listinvoices.php b/lib/Model/Listinvoices.php new file mode 100644 index 00000000..716a10d9 --- /dev/null +++ b/lib/Model/Listinvoices.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Listinvoices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'listinvoices'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'data' => '\Fastly\Model\Invoice[]', + 'meta' => '\Fastly\Model\Metadata' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'data' => null, + 'meta' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Fastly\Model\Invoice[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\Invoice[]|null $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \Fastly\Model\Metadata|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Fastly\Model\Metadata|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LoggingScalyrAdditional.php b/lib/Model/LoggingScalyrAdditional.php index d050c07b..af15ffe3 100644 --- a/lib/Model/LoggingScalyrAdditional.php +++ b/lib/Model/LoggingScalyrAdditional.php @@ -282,7 +282,7 @@ public function getToken() /** * Sets token * - * @param string|null $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + * @param string|null $token The token to use for authentication. * * @return self */ diff --git a/lib/Model/LoggingScalyrResponse.php b/lib/Model/LoggingScalyrResponse.php index 057ae95d..130e8771 100644 --- a/lib/Model/LoggingScalyrResponse.php +++ b/lib/Model/LoggingScalyrResponse.php @@ -532,7 +532,7 @@ public function getToken() /** * Sets token * - * @param string|null $token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + * @param string|null $token The token to use for authentication. * * @return self */ diff --git a/lib/Model/Metadata.php b/lib/Model/Metadata.php new file mode 100644 index 00000000..a7e4c47e --- /dev/null +++ b/lib/Model/Metadata.php @@ -0,0 +1,405 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Metadata implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'metadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'next_cursor' => 'string', + 'limit' => 'int', + 'sort' => 'string', + 'total' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'next_cursor' => null, + 'limit' => null, + 'sort' => null, + 'total' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'next_cursor' => 'next_cursor', + 'limit' => 'limit', + 'sort' => 'sort', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'next_cursor' => 'setNextCursor', + 'limit' => 'setLimit', + 'sort' => 'setSort', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'next_cursor' => 'getNextCursor', + 'limit' => 'getLimit', + 'sort' => 'getSort', + 'total' => 'getTotal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['next_cursor'] = $data['next_cursor'] ?? null; + $this->container['limit'] = $data['limit'] ?? null; + $this->container['sort'] = $data['sort'] ?? 'billing_start_date'; + $this->container['total'] = $data['total'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets next_cursor + * + * @return string|null + */ + public function getNextCursor() + { + return $this->container['next_cursor']; + } + + /** + * Sets next_cursor + * + * @param string|null $next_cursor The token used to request the next set of results. + * + * @return self + */ + public function setNextCursor($next_cursor) + { + $this->container['next_cursor'] = $next_cursor; + + return $this; + } + + /** + * Gets limit + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit The number of invoices included in the response. + * + * @return self + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + + return $this; + } + + /** + * Gets sort + * + * @return string|null + */ + public function getSort() + { + return $this->container['sort']; + } + + /** + * Sets sort + * + * @param string|null $sort The sort order of the invoices in the response. + * + * @return self + */ + public function setSort($sort) + { + $this->container['sort'] = $sort; + + return $this; + } + + /** + * Gets total + * + * @return int|null + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int|null $total Total number of records available on the backend. + * + * @return self + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorRealtimeEntry.php b/lib/Model/OriginInspectorRealtimeEntry.php index 39afec51..24ebb7c0 100644 --- a/lib/Model/OriginInspectorRealtimeEntry.php +++ b/lib/Model/OriginInspectorRealtimeEntry.php @@ -273,7 +273,7 @@ public function getDatacenter() /** * Sets datacenter * - * @param array>|null $datacenter Groups [measurements](#measurements-data-model) by POP, then backend name. See the [POPs API](/reference/api/utils/pops/) for details about POP identifiers. + * @param array>|null $datacenter Groups [measurements](#measurements-data-model) by POP, then backend name. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. * * @return self */ diff --git a/lib/Model/PoolAdditional.php b/lib/Model/PoolAdditional.php index 53568e4e..169ca460 100644 --- a/lib/Model/PoolAdditional.php +++ b/lib/Model/PoolAdditional.php @@ -322,7 +322,7 @@ public function getShield() /** * Sets shield * - * @param string|null $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + * @param string|null $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. * * @return self */ diff --git a/lib/Model/PoolResponse.php b/lib/Model/PoolResponse.php index 33485b83..9106fbd5 100644 --- a/lib/Model/PoolResponse.php +++ b/lib/Model/PoolResponse.php @@ -698,7 +698,7 @@ public function getShield() /** * Sets shield * - * @param string|null $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + * @param string|null $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. * * @return self */ diff --git a/lib/Model/PoolResponsePost.php b/lib/Model/PoolResponsePost.php index 70f274ac..e3b308f4 100644 --- a/lib/Model/PoolResponsePost.php +++ b/lib/Model/PoolResponsePost.php @@ -698,7 +698,7 @@ public function getShield() /** * Sets shield * - * @param string|null $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + * @param string|null $shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. * * @return self */ diff --git a/lib/Model/Pop.php b/lib/Model/Pop.php index e24d43aa..42db00a8 100644 --- a/lib/Model/Pop.php +++ b/lib/Model/Pop.php @@ -400,7 +400,7 @@ public function getCode() /** * Sets code * - * @param string $code the three-letter code for the [POP](https://developer.fastly.com/learning/concepts/pop/) + * @param string $code the three-letter code for the [POP](https://www.fastly.com/documentation/learning/concepts/pop/) * * @return self */ @@ -598,7 +598,7 @@ public function getShield() /** * Sets shield * - * @param string|null $shield the name of the [shield code](https://developer.fastly.com/learning/concepts/shielding/#choosing-a-shield-location) if this POP is suitable for shielding + * @param string|null $shield the name of the [shield code](https://www.fastly.com/documentation/learning/concepts/shielding/#choosing-a-shield-location) if this POP is suitable for shielding * * @return self */ diff --git a/lib/Model/RealtimeEntry.php b/lib/Model/RealtimeEntry.php index 042714cc..becd3f15 100644 --- a/lib/Model/RealtimeEntry.php +++ b/lib/Model/RealtimeEntry.php @@ -273,7 +273,7 @@ public function getDatacenter() /** * Sets datacenter * - * @param array|null $datacenter Groups [measurements](#measurements-data-model) by POP. See the [POPs API](/reference/api/utils/pops/) for details of POP identifiers. + * @param array|null $datacenter Groups [measurements](#measurements-data-model) by POP. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details of POP identifiers. * * @return self */ diff --git a/lib/Model/RelationshipTlsCertificate.php b/lib/Model/RelationshipTlsCertificate.php index 3a87f451..89d9cf19 100644 --- a/lib/Model/RelationshipTlsCertificate.php +++ b/lib/Model/RelationshipTlsCertificate.php @@ -30,7 +30,7 @@ * RelationshipTlsCertificate Class Doc Comment * * @category Class - * @description The [TLS certificate](/reference/api/tls/custom-certs/certificates/) being used to terminate TLS traffic for a domain. Required. + * @description The [TLS certificate](https://www.fastly.com/documentation/reference/api/tls/custom-certs/certificates/) being used to terminate TLS traffic for a domain. Required. * @package Fastly * @author oss@fastly.com * @implements \ArrayAccess diff --git a/lib/Model/RelationshipTlsConfiguration.php b/lib/Model/RelationshipTlsConfiguration.php index 446fe501..61f009f0 100644 --- a/lib/Model/RelationshipTlsConfiguration.php +++ b/lib/Model/RelationshipTlsConfiguration.php @@ -30,7 +30,7 @@ * RelationshipTlsConfiguration Class Doc Comment * * @category Class - * @description The [TLS configuration](/reference/api/tls/custom-certs/configuration/) being used to terminate TLS traffic. Optional. + * @description The [TLS configuration](https://www.fastly.com/documentation/reference/api/tls/custom-certs/configuration/) being used to terminate TLS traffic. Optional. * @package Fastly * @author oss@fastly.com * @implements \ArrayAccess diff --git a/lib/Model/Results.php b/lib/Model/Results.php index ed2268e3..1ab25b07 100644 --- a/lib/Model/Results.php +++ b/lib/Model/Results.php @@ -133,8 +133,10 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'imgopto' => 'int', 'imgopto_resp_body_bytes' => 'int', 'imgopto_resp_header_bytes' => 'int', + 'imgopto_shield' => 'int', 'imgopto_shield_resp_body_bytes' => 'int', 'imgopto_shield_resp_header_bytes' => 'int', + 'imgopto_transforms' => 'int', 'imgvideo' => 'int', 'imgvideo_frames' => 'int', 'imgvideo_resp_header_bytes' => 'int', @@ -370,8 +372,10 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'imgopto' => null, 'imgopto_resp_body_bytes' => null, 'imgopto_resp_header_bytes' => null, + 'imgopto_shield' => null, 'imgopto_shield_resp_body_bytes' => null, 'imgopto_shield_resp_header_bytes' => null, + 'imgopto_transforms' => null, 'imgvideo' => null, 'imgvideo_frames' => null, 'imgvideo_resp_header_bytes' => null, @@ -626,8 +630,10 @@ public static function fastlyFormats() 'imgopto' => 'imgopto', 'imgopto_resp_body_bytes' => 'imgopto_resp_body_bytes', 'imgopto_resp_header_bytes' => 'imgopto_resp_header_bytes', + 'imgopto_shield' => 'imgopto_shield', 'imgopto_shield_resp_body_bytes' => 'imgopto_shield_resp_body_bytes', 'imgopto_shield_resp_header_bytes' => 'imgopto_shield_resp_header_bytes', + 'imgopto_transforms' => 'imgopto_transforms', 'imgvideo' => 'imgvideo', 'imgvideo_frames' => 'imgvideo_frames', 'imgvideo_resp_header_bytes' => 'imgvideo_resp_header_bytes', @@ -861,8 +867,10 @@ public static function fastlyFormats() 'imgopto' => 'setImgopto', 'imgopto_resp_body_bytes' => 'setImgoptoRespBodyBytes', 'imgopto_resp_header_bytes' => 'setImgoptoRespHeaderBytes', + 'imgopto_shield' => 'setImgoptoShield', 'imgopto_shield_resp_body_bytes' => 'setImgoptoShieldRespBodyBytes', 'imgopto_shield_resp_header_bytes' => 'setImgoptoShieldRespHeaderBytes', + 'imgopto_transforms' => 'setImgoptoTransforms', 'imgvideo' => 'setImgvideo', 'imgvideo_frames' => 'setImgvideoFrames', 'imgvideo_resp_header_bytes' => 'setImgvideoRespHeaderBytes', @@ -1096,8 +1104,10 @@ public static function fastlyFormats() 'imgopto' => 'getImgopto', 'imgopto_resp_body_bytes' => 'getImgoptoRespBodyBytes', 'imgopto_resp_header_bytes' => 'getImgoptoRespHeaderBytes', + 'imgopto_shield' => 'getImgoptoShield', 'imgopto_shield_resp_body_bytes' => 'getImgoptoShieldRespBodyBytes', 'imgopto_shield_resp_header_bytes' => 'getImgoptoShieldRespHeaderBytes', + 'imgopto_transforms' => 'getImgoptoTransforms', 'imgvideo' => 'getImgvideo', 'imgvideo_frames' => 'getImgvideoFrames', 'imgvideo_resp_header_bytes' => 'getImgvideoRespHeaderBytes', @@ -1382,8 +1392,10 @@ public function __construct(array $data = null) $this->container['imgopto'] = $data['imgopto'] ?? null; $this->container['imgopto_resp_body_bytes'] = $data['imgopto_resp_body_bytes'] ?? null; $this->container['imgopto_resp_header_bytes'] = $data['imgopto_resp_header_bytes'] ?? null; + $this->container['imgopto_shield'] = $data['imgopto_shield'] ?? null; $this->container['imgopto_shield_resp_body_bytes'] = $data['imgopto_shield_resp_body_bytes'] ?? null; $this->container['imgopto_shield_resp_header_bytes'] = $data['imgopto_shield_resp_header_bytes'] ?? null; + $this->container['imgopto_transforms'] = $data['imgopto_transforms'] ?? null; $this->container['imgvideo'] = $data['imgvideo'] ?? null; $this->container['imgvideo_frames'] = $data['imgvideo_frames'] ?? null; $this->container['imgvideo_resp_header_bytes'] = $data['imgvideo_resp_header_bytes'] ?? null; @@ -3452,6 +3464,30 @@ public function setImgoptoRespHeaderBytes($imgopto_resp_header_bytes) return $this; } + /** + * Gets imgopto_shield + * + * @return int|null + */ + public function getImgoptoShield() + { + return $this->container['imgopto_shield']; + } + + /** + * Sets imgopto_shield + * + * @param int|null $imgopto_shield Number of responses that came from the Fastly Image Optimizer service via a shield. + * + * @return self + */ + public function setImgoptoShield($imgopto_shield) + { + $this->container['imgopto_shield'] = $imgopto_shield; + + return $this; + } + /** * Gets imgopto_shield_resp_body_bytes * @@ -3500,6 +3536,30 @@ public function setImgoptoShieldRespHeaderBytes($imgopto_shield_resp_header_byte return $this; } + /** + * Gets imgopto_transforms + * + * @return int|null + */ + public function getImgoptoTransforms() + { + return $this->container['imgopto_transforms']; + } + + /** + * Sets imgopto_transforms + * + * @param int|null $imgopto_transforms Number of transforms performed by the Fastly Image Optimizer service. + * + * @return self + */ + public function setImgoptoTransforms($imgopto_transforms) + { + $this->container['imgopto_transforms'] = $imgopto_transforms; + + return $this; + } + /** * Gets imgvideo * diff --git a/lib/Model/ServiceDetail.php b/lib/Model/ServiceDetail.php index 2a1be2cc..faaef69c 100644 --- a/lib/Model/ServiceDetail.php +++ b/lib/Model/ServiceDetail.php @@ -558,7 +558,7 @@ public function getVersions() /** * Sets versions * - * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](/reference/api/services/version/) associated with the service. + * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. * * @return self */ diff --git a/lib/Model/ServiceListResponse.php b/lib/Model/ServiceListResponse.php index 47367037..e41c85dc 100644 --- a/lib/Model/ServiceListResponse.php +++ b/lib/Model/ServiceListResponse.php @@ -492,7 +492,7 @@ public function getVersion() /** * Sets version * - * @param int|null $version Current [version](/reference/api/services/version/) of the service. + * @param int|null $version Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. * * @return self */ @@ -516,7 +516,7 @@ public function getVersions() /** * Sets versions * - * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](/reference/api/services/version/) associated with the service. + * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. * * @return self */ diff --git a/lib/Model/ServiceListResponseAllOf.php b/lib/Model/ServiceListResponseAllOf.php index f0c935b7..32bf2fd5 100644 --- a/lib/Model/ServiceListResponseAllOf.php +++ b/lib/Model/ServiceListResponseAllOf.php @@ -248,7 +248,7 @@ public function getVersion() /** * Sets version * - * @param int|null $version Current [version](/reference/api/services/version/) of the service. + * @param int|null $version Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. * * @return self */ @@ -272,7 +272,7 @@ public function getVersions() /** * Sets versions * - * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](/reference/api/services/version/) associated with the service. + * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. * * @return self */ diff --git a/lib/Model/ServiceResponse.php b/lib/Model/ServiceResponse.php index 41cc5f98..2842906f 100644 --- a/lib/Model/ServiceResponse.php +++ b/lib/Model/ServiceResponse.php @@ -546,7 +546,7 @@ public function getVersions() /** * Sets versions * - * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](/reference/api/services/version/) associated with the service. + * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. * * @return self */ diff --git a/lib/Model/ServiceResponseAllOf.php b/lib/Model/ServiceResponseAllOf.php index fbf4970f..abb2ed6d 100644 --- a/lib/Model/ServiceResponseAllOf.php +++ b/lib/Model/ServiceResponseAllOf.php @@ -302,7 +302,7 @@ public function getVersions() /** * Sets versions * - * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](/reference/api/services/version/) associated with the service. + * @param \Fastly\Model\SchemasVersionResponse[]|null $versions A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. * * @return self */ diff --git a/lib/Model/TlsConfigurationResponseAttributes.php b/lib/Model/TlsConfigurationResponseAttributes.php index 9320efa4..796ecbbc 100644 --- a/lib/Model/TlsConfigurationResponseAttributes.php +++ b/lib/Model/TlsConfigurationResponseAttributes.php @@ -320,7 +320,7 @@ public function getDefault() /** * Sets default * - * @param bool|null $default Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). + * @param bool|null $default Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/). * * @return self */ diff --git a/lib/Model/TlsConfigurationResponseAttributesAllOf.php b/lib/Model/TlsConfigurationResponseAttributesAllOf.php index 8814f524..08d64c9e 100644 --- a/lib/Model/TlsConfigurationResponseAttributesAllOf.php +++ b/lib/Model/TlsConfigurationResponseAttributesAllOf.php @@ -230,7 +230,7 @@ public function getDefault() /** * Sets default * - * @param bool|null $default Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). + * @param bool|null $default Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/). * * @return self */ diff --git a/lib/Model/TlsCsr.php b/lib/Model/TlsCsr.php new file mode 100644 index 00000000..80e8b8dc --- /dev/null +++ b/lib/Model/TlsCsr.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TlsCsr implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'tls_csr'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'data' => '\Fastly\Model\TlsCsrData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Fastly\Model\TlsCsrData|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\TlsCsrData|null $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TlsCsrData.php b/lib/Model/TlsCsrData.php new file mode 100644 index 00000000..567d8c68 --- /dev/null +++ b/lib/Model/TlsCsrData.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TlsCsrData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'tls_csr_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'type' => '\Fastly\Model\TypeTlsCsr', + 'attributes' => '\Fastly\Model\TlsCsrDataAttributes', + 'relationships' => '\Fastly\Model\RelationshipTlsPrivateKey' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'type' => null, + 'attributes' => null, + 'relationships' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'attributes' => 'attributes', + 'relationships' => 'relationships' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'attributes' => 'setAttributes', + 'relationships' => 'setRelationships' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'attributes' => 'getAttributes', + 'relationships' => 'getRelationships' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data['type'] ?? null; + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['relationships'] = $data['relationships'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \Fastly\Model\TypeTlsCsr|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \Fastly\Model\TypeTlsCsr|null $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets attributes + * + * @return \Fastly\Model\TlsCsrDataAttributes|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \Fastly\Model\TlsCsrDataAttributes|null $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets relationships + * + * @return \Fastly\Model\RelationshipTlsPrivateKey|null + */ + public function getRelationships() + { + return $this->container['relationships']; + } + + /** + * Sets relationships + * + * @param \Fastly\Model\RelationshipTlsPrivateKey|null $relationships relationships + * + * @return self + */ + public function setRelationships($relationships) + { + $this->container['relationships'] = $relationships; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TlsCsrDataAttributes.php b/lib/Model/TlsCsrDataAttributes.php new file mode 100644 index 00000000..e5d8d034 --- /dev/null +++ b/lib/Model/TlsCsrDataAttributes.php @@ -0,0 +1,651 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TlsCsrDataAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'tls_csr_data_attributes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'sans' => 'string[]', + 'common_name' => 'string', + 'country' => 'string', + 'state' => 'string', + 'city' => 'string', + 'postal_code' => 'string', + 'street_address' => 'string', + 'organization' => 'string', + 'organizational_unit' => 'string', + 'email' => 'string', + 'key_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'sans' => null, + 'common_name' => null, + 'country' => null, + 'state' => null, + 'city' => null, + 'postal_code' => null, + 'street_address' => null, + 'organization' => null, + 'organizational_unit' => null, + 'email' => 'email', + 'key_type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sans' => 'sans', + 'common_name' => 'common_name', + 'country' => 'country', + 'state' => 'state', + 'city' => 'city', + 'postal_code' => 'postal_code', + 'street_address' => 'street_address', + 'organization' => 'organization', + 'organizational_unit' => 'organizational_unit', + 'email' => 'email', + 'key_type' => 'key_type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sans' => 'setSans', + 'common_name' => 'setCommonName', + 'country' => 'setCountry', + 'state' => 'setState', + 'city' => 'setCity', + 'postal_code' => 'setPostalCode', + 'street_address' => 'setStreetAddress', + 'organization' => 'setOrganization', + 'organizational_unit' => 'setOrganizationalUnit', + 'email' => 'setEmail', + 'key_type' => 'setKeyType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sans' => 'getSans', + 'common_name' => 'getCommonName', + 'country' => 'getCountry', + 'state' => 'getState', + 'city' => 'getCity', + 'postal_code' => 'getPostalCode', + 'street_address' => 'getStreetAddress', + 'organization' => 'getOrganization', + 'organizational_unit' => 'getOrganizationalUnit', + 'email' => 'getEmail', + 'key_type' => 'getKeyType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + const KEY_TYPE_RSA2048 = 'RSA2048'; + const KEY_TYPE_ECDSA256 = 'ECDSA256'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getKeyTypeAllowableValues() + { + return [ + self::KEY_TYPE_RSA2048, + self::KEY_TYPE_ECDSA256, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sans'] = $data['sans'] ?? null; + $this->container['common_name'] = $data['common_name'] ?? null; + $this->container['country'] = $data['country'] ?? null; + $this->container['state'] = $data['state'] ?? null; + $this->container['city'] = $data['city'] ?? null; + $this->container['postal_code'] = $data['postal_code'] ?? null; + $this->container['street_address'] = $data['street_address'] ?? null; + $this->container['organization'] = $data['organization'] ?? null; + $this->container['organizational_unit'] = $data['organizational_unit'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['key_type'] = $data['key_type'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sans'] === null) { + $invalidProperties[] = "'sans' can't be null"; + } + $allowedValues = $this->getKeyTypeAllowableValues(); + if (!is_null($this->container['key_type']) && !in_array($this->container['key_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'key_type', must be one of '%s'", + $this->container['key_type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sans + * + * @return string[] + */ + public function getSans() + { + return $this->container['sans']; + } + + /** + * Sets sans + * + * @param string[] $sans Subject Alternate Names - An array of one or more fully qualified domain names or public IP addresses to be secured by this certificate. Required. + * + * @return self + */ + public function setSans($sans) + { + $this->container['sans'] = $sans; + + return $this; + } + + /** + * Gets common_name + * + * @return string|null + */ + public function getCommonName() + { + return $this->container['common_name']; + } + + /** + * Sets common_name + * + * @param string|null $common_name Common Name (CN) - The fully qualified domain name (FQDN) to be secured by this certificate. The common name should be one of the entries in the SANs parameter. + * + * @return self + */ + public function setCommonName($common_name) + { + $this->container['common_name'] = $common_name; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country Country (C) - The two-letter ISO country code where the organization is located. + * + * @return self + */ + public function setCountry($country) + { + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state State (S) - The state, province, region, or county where the organization is located. This should not be abbreviated. + * + * @return self + */ + public function setState($state) + { + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city Locality (L) - The locality, city, town, or village where the organization is located. + * + * @return self + */ + public function setCity($city) + { + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets postal_code + * + * @return string|null + */ + public function getPostalCode() + { + return $this->container['postal_code']; + } + + /** + * Sets postal_code + * + * @param string|null $postal_code Postal Code - The postal code where the organization is located. + * + * @return self + */ + public function setPostalCode($postal_code) + { + $this->container['postal_code'] = $postal_code; + + return $this; + } + + /** + * Gets street_address + * + * @return string|null + */ + public function getStreetAddress() + { + return $this->container['street_address']; + } + + /** + * Sets street_address + * + * @param string|null $street_address Street Address - The street address where the organization is located. + * + * @return self + */ + public function setStreetAddress($street_address) + { + $this->container['street_address'] = $street_address; + + return $this; + } + + /** + * Gets organization + * + * @return string|null + */ + public function getOrganization() + { + return $this->container['organization']; + } + + /** + * Sets organization + * + * @param string|null $organization Organization (O) - The legal name of the organization, including any suffixes. This should not be abbreviated. + * + * @return self + */ + public function setOrganization($organization) + { + $this->container['organization'] = $organization; + + return $this; + } + + /** + * Gets organizational_unit + * + * @return string|null + */ + public function getOrganizationalUnit() + { + return $this->container['organizational_unit']; + } + + /** + * Sets organizational_unit + * + * @param string|null $organizational_unit Organizational Unit (OU) - The internal division of the organization managing the certificate. + * + * @return self + */ + public function setOrganizationalUnit($organizational_unit) + { + $this->container['organizational_unit'] = $organizational_unit; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email Email Address (EMAIL) - The organizational contact for this. + * + * @return self + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets key_type + * + * @return string|null + */ + public function getKeyType() + { + return $this->container['key_type']; + } + + /** + * Sets key_type + * + * @param string|null $key_type CSR Key Type. + * + * @return self + */ + public function setKeyType($key_type) + { + $allowedValues = $this->getKeyTypeAllowableValues(); + if (!is_null($key_type) && !in_array($key_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'key_type', must be one of '%s'", + $key_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['key_type'] = $key_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TlsCsrErrorResponse.php b/lib/Model/TlsCsrErrorResponse.php new file mode 100644 index 00000000..ca6eb0c7 --- /dev/null +++ b/lib/Model/TlsCsrErrorResponse.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TlsCsrErrorResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'tls_csr_error_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'errors' => '\Fastly\Model\ErrorResponseData[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'errors' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'errors' => 'getErrors' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['errors'] = $data['errors'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets errors + * + * @return \Fastly\Model\ErrorResponseData[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \Fastly\Model\ErrorResponseData[]|null $errors errors + * + * @return self + */ + public function setErrors($errors) + { + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TlsCsrResponse.php b/lib/Model/TlsCsrResponse.php new file mode 100644 index 00000000..a1125fb7 --- /dev/null +++ b/lib/Model/TlsCsrResponse.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TlsCsrResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'tls_csr_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'data' => '\Fastly\Model\TlsCsrResponseData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Fastly\Model\TlsCsrResponseData|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\TlsCsrResponseData|null $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TlsCsrResponseAttributes.php b/lib/Model/TlsCsrResponseAttributes.php new file mode 100644 index 00000000..1a22e88f --- /dev/null +++ b/lib/Model/TlsCsrResponseAttributes.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TlsCsrResponseAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'tls_csr_response_attributes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'content' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'content' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'content' => 'content' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'content' => 'setContent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'content' => 'getContent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['content'] = $data['content'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets content + * + * @return string|null + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content The PEM encoded CSR. + * + * @return self + */ + public function setContent($content) + { + $this->container['content'] = $content; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TlsCsrResponseData.php b/lib/Model/TlsCsrResponseData.php new file mode 100644 index 00000000..1cf947ad --- /dev/null +++ b/lib/Model/TlsCsrResponseData.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TlsCsrResponseData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'tls_csr_response_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'type' => '\Fastly\Model\TypeTlsCsr', + 'attributes' => '\Fastly\Model\TlsCsrResponseAttributes', + 'relationships' => '\Fastly\Model\RelationshipTlsPrivateKey' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'type' => null, + 'attributes' => null, + 'relationships' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'type' => 'type', + 'attributes' => 'attributes', + 'relationships' => 'relationships' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType', + 'attributes' => 'setAttributes', + 'relationships' => 'setRelationships' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType', + 'attributes' => 'getAttributes', + 'relationships' => 'getRelationships' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['type'] = $data['type'] ?? null; + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['relationships'] = $data['relationships'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return \Fastly\Model\TypeTlsCsr|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \Fastly\Model\TypeTlsCsr|null $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets attributes + * + * @return \Fastly\Model\TlsCsrResponseAttributes|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \Fastly\Model\TlsCsrResponseAttributes|null $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets relationships + * + * @return \Fastly\Model\RelationshipTlsPrivateKey|null + */ + public function getRelationships() + { + return $this->container['relationships']; + } + + /** + * Sets relationships + * + * @param \Fastly\Model\RelationshipTlsPrivateKey|null $relationships relationships + * + * @return self + */ + public function setRelationships($relationships) + { + $this->container['relationships'] = $relationships; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TlsSubscriptionDataAttributes.php b/lib/Model/TlsSubscriptionDataAttributes.php index d0399ec9..f4954e03 100644 --- a/lib/Model/TlsSubscriptionDataAttributes.php +++ b/lib/Model/TlsSubscriptionDataAttributes.php @@ -157,6 +157,7 @@ public function getModelName() } const CERTIFICATE_AUTHORITY_LETS_ENCRYPT = 'lets-encrypt'; + const CERTIFICATE_AUTHORITY_CERTAINLY = 'certainly'; const CERTIFICATE_AUTHORITY_GLOBALSIGN = 'globalsign'; /** @@ -168,6 +169,7 @@ public function getCertificateAuthorityAllowableValues() { return [ self::CERTIFICATE_AUTHORITY_LETS_ENCRYPT, + self::CERTIFICATE_AUTHORITY_CERTAINLY, self::CERTIFICATE_AUTHORITY_GLOBALSIGN, ]; } diff --git a/lib/Model/TlsSubscriptionResponseAttributes.php b/lib/Model/TlsSubscriptionResponseAttributes.php index d0889449..d0954fae 100644 --- a/lib/Model/TlsSubscriptionResponseAttributes.php +++ b/lib/Model/TlsSubscriptionResponseAttributes.php @@ -56,7 +56,8 @@ class TlsSubscriptionResponseAttributes implements ModelInterface, ArrayAccess, 'created_at' => '\DateTime', 'deleted_at' => '\DateTime', 'updated_at' => '\DateTime', - 'state' => 'string' + 'state' => 'string', + 'has_active_order' => 'bool' ]; /** @@ -70,7 +71,8 @@ class TlsSubscriptionResponseAttributes implements ModelInterface, ArrayAccess, 'created_at' => 'date-time', 'deleted_at' => 'date-time', 'updated_at' => 'date-time', - 'state' => null + 'state' => null, + 'has_active_order' => null ]; /** @@ -103,7 +105,8 @@ public static function fastlyFormats() 'created_at' => 'created_at', 'deleted_at' => 'deleted_at', 'updated_at' => 'updated_at', - 'state' => 'state' + 'state' => 'state', + 'has_active_order' => 'has_active_order' ]; /** @@ -115,7 +118,8 @@ public static function fastlyFormats() 'created_at' => 'setCreatedAt', 'deleted_at' => 'setDeletedAt', 'updated_at' => 'setUpdatedAt', - 'state' => 'setState' + 'state' => 'setState', + 'has_active_order' => 'setHasActiveOrder' ]; /** @@ -127,7 +131,8 @@ public static function fastlyFormats() 'created_at' => 'getCreatedAt', 'deleted_at' => 'getDeletedAt', 'updated_at' => 'getUpdatedAt', - 'state' => 'getState' + 'state' => 'getState', + 'has_active_order' => 'getHasActiveOrder' ]; /** @@ -212,6 +217,7 @@ public function __construct(array $data = null) $this->container['deleted_at'] = $data['deleted_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['state'] = $data['state'] ?? null; + $this->container['has_active_order'] = $data['has_active_order'] ?? null; } /** @@ -352,6 +358,30 @@ public function setState($state) return $this; } + + /** + * Gets has_active_order + * + * @return bool|null + */ + public function getHasActiveOrder() + { + return $this->container['has_active_order']; + } + + /** + * Sets has_active_order + * + * @param bool|null $has_active_order Subscription has an active order + * + * @return self + */ + public function setHasActiveOrder($has_active_order) + { + $this->container['has_active_order'] = $has_active_order; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TlsSubscriptionResponseAttributesAllOf.php b/lib/Model/TlsSubscriptionResponseAttributesAllOf.php index 38b78e8d..80eac073 100644 --- a/lib/Model/TlsSubscriptionResponseAttributesAllOf.php +++ b/lib/Model/TlsSubscriptionResponseAttributesAllOf.php @@ -53,7 +53,8 @@ class TlsSubscriptionResponseAttributesAllOf implements ModelInterface, ArrayAcc * @var string[] */ protected static $fastlyTypes = [ - 'state' => 'string' + 'state' => 'string', + 'has_active_order' => 'bool' ]; /** @@ -64,7 +65,8 @@ class TlsSubscriptionResponseAttributesAllOf implements ModelInterface, ArrayAcc * @psalm-var array */ protected static $fastlyFormats = [ - 'state' => null + 'state' => null, + 'has_active_order' => null ]; /** @@ -94,7 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'state' => 'state' + 'state' => 'state', + 'has_active_order' => 'has_active_order' ]; /** @@ -103,7 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'state' => 'setState' + 'state' => 'setState', + 'has_active_order' => 'setHasActiveOrder' ]; /** @@ -112,7 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'state' => 'getState' + 'state' => 'getState', + 'has_active_order' => 'getHasActiveOrder' ]; /** @@ -194,6 +199,7 @@ public function getStateAllowableValues() public function __construct(array $data = null) { $this->container['state'] = $data['state'] ?? null; + $this->container['has_active_order'] = $data['has_active_order'] ?? null; } /** @@ -262,6 +268,30 @@ public function setState($state) return $this; } + + /** + * Gets has_active_order + * + * @return bool|null + */ + public function getHasActiveOrder() + { + return $this->container['has_active_order']; + } + + /** + * Sets has_active_order + * + * @param bool|null $has_active_order Subscription has an active order + * + * @return self + */ + public function setHasActiveOrder($has_active_order) + { + $this->container['has_active_order'] = $has_active_order; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TypeTlsCsr.php b/lib/Model/TypeTlsCsr.php new file mode 100644 index 00000000..5ca2d1a2 --- /dev/null +++ b/lib/Model/TypeTlsCsr.php @@ -0,0 +1,54 @@ +