diff --git a/CHANGELOG.md b/CHANGELOG.md index 10ef1451..145bdb5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [v5.4.0](https://github.com/fastly/fastly-php/releases/tag/release/v5.4.0) (2024-06-27) + +**Bug fixes:** + +- bugfix(alerts-definitions): For Origin derived metrics, correct `all_bandwidth` type to `integer` + +**Enhancements:** + +- feat(logging-s3): Add `file_max_bytes` configuration field +- feat(alerts-definitions): Add `integration_id` parameter to the List Alert Definitions endpoint +- feat(alerts-definitions): For Origin derived metrics, add `all_status_4xx_excl_404_rate` and `all_status_404_rate` properties +- feat(alerts-definitions): For Domain derived metrics, add `status_4xx_excl_404_rate` and `status_404_rate` properties +- feat(alerts-definitions): For Stats derived metrics, add `status_4xx_excl_404_rate`, `status_404_rate`, `all_status_5xx_rate`, + `all_status_4xx_rate`, `all_status_gte_400_rate`, and `all_status_lt_500_rate` properties +- feat(billing-invoices): For invoice line items, added `ProductLine` property + +**Documentation:** + +- doc(billing-invoices): "Billing Invoices API" relabeled to "Invoices API" +- doc(billing-invoices): Updated documentation of `billing_start_date` and `billing_end_date` query parameters of + List of invoices endpoint +- doc(alerts-definitions): Updated documentation of several fields +- doc(notification-service): Updated documentation examples for several fields + ## [v5.3.0](https://github.com/fastly/fastly-php/releases/tag/release/v5.3.0) (2024-05-24) **Bug fixes:** diff --git a/README.md b/README.md index 0b4cd371..df72e286 100644 --- a/README.md +++ b/README.md @@ -637,6 +637,8 @@ The fastly-php API client currently does not support the following endpoints: - [`/resources/stores/kv/{store_id}/batch`](https://www.fastly.com/documentation/reference/api/services/resources/kv-store-item) (PUT) - [`/tls/activations/{tls_activation_id}`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET, PATCH) - [`/tls/activations`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET) +- [`/tls/preview/domains/{tls_preview_domain_id}`](https://www.fastly.com/documentation/reference/api/) (GET, PATCH) +- [`/tls/preview/domains`](https://www.fastly.com/documentation/reference/api/) (GET, POST) - [`/v1/channel/{service_id}/ts/h/limit/{max_entries}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) - [`/v1/channel/{service_id}/ts/h`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) - [`/v1/channel/{service_id}/ts/{start_timestamp}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) diff --git a/docs/Api/BillingInvoicesApi.md b/docs/Api/BillingInvoicesApi.md index 0ceb656e..624bb96b 100644 --- a/docs/Api/BillingInvoicesApi.md +++ b/docs/Api/BillingInvoicesApi.md @@ -65,8 +65,8 @@ 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['billing_start_date'] = 2023-01-01; // string +$options['billing_end_date'] = 2023-01-31; // 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. diff --git a/docs/Api/LoggingS3Api.md b/docs/Api/LoggingS3Api.md index c505d0bf..56ec7a23 100644 --- a/docs/Api/LoggingS3Api.md +++ b/docs/Api/LoggingS3Api.md @@ -57,6 +57,7 @@ $options['redundancy'] = 'null'; // string | The S3 redundancy level. $options['secret_key'] = 'secret_key_example'; // string | The secret key for your S3 account. Not required if `iam_role` is provided. $options['server_side_encryption_kms_key_id'] = 'null'; // string | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. $options['server_side_encryption'] = 'null'; // string | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. +$options['file_max_bytes'] = 56; // int | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) try { $result = $apiInstance->createLogAwsS3($options); @@ -94,6 +95,7 @@ Name | Type | Description | Notes **secret_key** | **string** | The secret key for your S3 account. Not required if `iam_role` is provided. | [optional] **server_side_encryption_kms_key_id** | **string** | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [optional] [defaults to 'null'] **server_side_encryption** | **string** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional] [defaults to 'null'] +**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] ### Return type @@ -248,6 +250,7 @@ $options['redundancy'] = 'null'; // string | The S3 redundancy level. $options['secret_key'] = 'secret_key_example'; // string | The secret key for your S3 account. Not required if `iam_role` is provided. $options['server_side_encryption_kms_key_id'] = 'null'; // string | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. $options['server_side_encryption'] = 'null'; // string | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. +$options['file_max_bytes'] = 56; // int | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) try { $result = $apiInstance->updateLogAwsS3($options); @@ -286,6 +289,7 @@ Name | Type | Description | Notes **secret_key** | **string** | The secret key for your S3 account. Not required if `iam_role` is provided. | [optional] **server_side_encryption_kms_key_id** | **string** | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [optional] [defaults to 'null'] **server_side_encryption** | **string** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional] [defaults to 'null'] +**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] ### Return type diff --git a/docs/Model/Invoicelineitems.md b/docs/Model/Invoicelineitems.md index 51fc7f00..d20d5e5b 100644 --- a/docs/Model/Invoicelineitems.md +++ b/docs/Model/Invoicelineitems.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **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] +**product_line** | **string** | The broader classification of the product (e.g., `Network Services` or `Security`). | [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] diff --git a/docs/Model/LoggingS3Additional.md b/docs/Model/LoggingS3Additional.md index b79845ed..f8448059 100644 --- a/docs/Model/LoggingS3Additional.md +++ b/docs/Model/LoggingS3Additional.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **secret_key** | **string** | The secret key for your S3 account. Not required if `iam_role` is provided. | [optional] **server_side_encryption_kms_key_id** | **string** | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [optional] [defaults to 'null'] **server_side_encryption** | **string** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional] [defaults to 'null'] +**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingS3Response.md b/docs/Model/LoggingS3Response.md index b3d1954e..4d778c90 100644 --- a/docs/Model/LoggingS3Response.md +++ b/docs/Model/LoggingS3Response.md @@ -30,6 +30,7 @@ Name | Type | Description | Notes **secret_key** | **string** | The secret key for your S3 account. Not required if `iam_role` is provided. | [optional] **server_side_encryption_kms_key_id** | **string** | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [optional] [defaults to 'null'] **server_side_encryption** | **string** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional] [defaults to 'null'] +**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/LoggingS3Api.php b/lib/Api/LoggingS3Api.php index a1ce3414..d66f1864 100644 --- a/lib/Api/LoggingS3Api.php +++ b/lib/Api/LoggingS3Api.php @@ -142,6 +142,7 @@ public function getConfig() * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -186,6 +187,7 @@ public function createLogAwsS3($options) * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -318,6 +320,7 @@ public function createLogAwsS3WithHttpInfo($options) * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -365,6 +368,7 @@ function ($response) { * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -438,6 +442,7 @@ function ($exception) { * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -468,6 +473,7 @@ public function createLogAwsS3Request($options) $secret_key = array_key_exists('secret_key', $options) ? $options['secret_key'] : null; $server_side_encryption_kms_key_id = array_key_exists('server_side_encryption_kms_key_id', $options) ? $options['server_side_encryption_kms_key_id'] : 'null'; $server_side_encryption = array_key_exists('server_side_encryption', $options) ? $options['server_side_encryption'] : 'null'; + $file_max_bytes = array_key_exists('file_max_bytes', $options) ? $options['file_max_bytes'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -481,6 +487,10 @@ public function createLogAwsS3Request($options) 'Missing the required parameter $version_id when calling createLogAwsS3' ); } + if ($file_max_bytes !== null && $file_max_bytes < 1048576) { + throw new \InvalidArgumentException('invalid value for "$file_max_bytes" when calling LoggingS3Api.createLogAwsS3, must be bigger than or equal to 1048576.'); + } + $resourcePath = '/service/{service_id}/version/{version_id}/logging/s3'; $formParams = []; @@ -592,6 +602,10 @@ public function createLogAwsS3Request($options) if ($server_side_encryption !== null) { $formParams['server_side_encryption'] = ObjectSerializer::toFormValue($server_side_encryption); } + // form params + if ($file_max_bytes !== null) { + $formParams['file_max_bytes'] = ObjectSerializer::toFormValue($file_max_bytes); + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -1761,6 +1775,7 @@ public function listLogAwsS3Request($options) * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1806,6 +1821,7 @@ public function updateLogAwsS3($options) * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1939,6 +1955,7 @@ public function updateLogAwsS3WithHttpInfo($options) * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1987,6 +2004,7 @@ function ($response) { * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2061,6 +2079,7 @@ function ($exception) { * @param string $secret_key The secret key for your S3 account. Not required if `iam_role` is provided. (optional) * @param string $server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional, default to 'null') * @param string $server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional, default to 'null') + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2092,6 +2111,7 @@ public function updateLogAwsS3Request($options) $secret_key = array_key_exists('secret_key', $options) ? $options['secret_key'] : null; $server_side_encryption_kms_key_id = array_key_exists('server_side_encryption_kms_key_id', $options) ? $options['server_side_encryption_kms_key_id'] : 'null'; $server_side_encryption = array_key_exists('server_side_encryption', $options) ? $options['server_side_encryption'] : 'null'; + $file_max_bytes = array_key_exists('file_max_bytes', $options) ? $options['file_max_bytes'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -2111,6 +2131,10 @@ public function updateLogAwsS3Request($options) 'Missing the required parameter $logging_s3_name when calling updateLogAwsS3' ); } + if ($file_max_bytes !== null && $file_max_bytes < 1048576) { + throw new \InvalidArgumentException('invalid value for "$file_max_bytes" when calling LoggingS3Api.updateLogAwsS3, must be bigger than or equal to 1048576.'); + } + $resourcePath = '/service/{service_id}/version/{version_id}/logging/s3/{logging_s3_name}'; $formParams = []; @@ -2230,6 +2254,10 @@ public function updateLogAwsS3Request($options) if ($server_side_encryption !== null) { $formParams['server_side_encryption'] = ObjectSerializer::toFormValue($server_side_encryption); } + // form params + if ($file_max_bytes !== null) { + $formParams['file_max_bytes'] = ObjectSerializer::toFormValue($file_max_bytes); + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( diff --git a/lib/Configuration.php b/lib/Configuration.php index 108912b5..d4a822d6 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/5.3.0'; + protected $userAgent = 'fastly-php/5.4.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.3.0' . PHP_EOL; + $report .= ' SDK Package Version: 5.4.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/Invoicelineitems.php b/lib/Model/Invoicelineitems.php index 5d9b09c7..cb7c16ba 100644 --- a/lib/Model/Invoicelineitems.php +++ b/lib/Model/Invoicelineitems.php @@ -60,6 +60,7 @@ class Invoicelineitems implements ModelInterface, ArrayAccess, \JsonSerializable 'units' => 'float', 'product_name' => 'string', 'product_group' => 'string', + 'product_line' => 'string', 'region' => 'string', 'usage_type' => 'string' ]; @@ -79,6 +80,7 @@ class Invoicelineitems implements ModelInterface, ArrayAccess, \JsonSerializable 'units' => null, 'product_name' => null, 'product_group' => null, + 'product_line' => null, 'region' => null, 'usage_type' => null ]; @@ -117,6 +119,7 @@ public static function fastlyFormats() 'units' => 'units', 'product_name' => 'ProductName', 'product_group' => 'ProductGroup', + 'product_line' => 'ProductLine', 'region' => 'Region', 'usage_type' => 'UsageType' ]; @@ -134,6 +137,7 @@ public static function fastlyFormats() 'units' => 'setUnits', 'product_name' => 'setProductName', 'product_group' => 'setProductGroup', + 'product_line' => 'setProductLine', 'region' => 'setRegion', 'usage_type' => 'setUsageType' ]; @@ -151,6 +155,7 @@ public static function fastlyFormats() 'units' => 'getUnits', 'product_name' => 'getProductName', 'product_group' => 'getProductGroup', + 'product_line' => 'getProductLine', 'region' => 'getRegion', 'usage_type' => 'getUsageType' ]; @@ -219,6 +224,7 @@ public function __construct(array $data = 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['product_line'] = $data['product_line'] ?? null; $this->container['region'] = $data['region'] ?? null; $this->container['usage_type'] = $data['usage_type'] ?? null; } @@ -415,6 +421,30 @@ public function setProductGroup($product_group) return $this; } + /** + * Gets product_line + * + * @return string|null + */ + public function getProductLine() + { + return $this->container['product_line']; + } + + /** + * Sets product_line + * + * @param string|null $product_line The broader classification of the product (e.g., `Network Services` or `Security`). + * + * @return self + */ + public function setProductLine($product_line) + { + $this->container['product_line'] = $product_line; + + return $this; + } + /** * Gets region * diff --git a/lib/Model/LoggingS3Additional.php b/lib/Model/LoggingS3Additional.php index 950298e1..e54bc573 100644 --- a/lib/Model/LoggingS3Additional.php +++ b/lib/Model/LoggingS3Additional.php @@ -63,7 +63,8 @@ class LoggingS3Additional implements ModelInterface, ArrayAccess, \JsonSerializa 'redundancy' => 'string', 'secret_key' => 'string', 'server_side_encryption_kms_key_id' => 'string', - 'server_side_encryption' => 'string' + 'server_side_encryption' => 'string', + 'file_max_bytes' => 'int' ]; /** @@ -84,7 +85,8 @@ class LoggingS3Additional implements ModelInterface, ArrayAccess, \JsonSerializa 'redundancy' => null, 'secret_key' => null, 'server_side_encryption_kms_key_id' => null, - 'server_side_encryption' => null + 'server_side_encryption' => null, + 'file_max_bytes' => null ]; /** @@ -124,7 +126,8 @@ public static function fastlyFormats() 'redundancy' => 'redundancy', 'secret_key' => 'secret_key', 'server_side_encryption_kms_key_id' => 'server_side_encryption_kms_key_id', - 'server_side_encryption' => 'server_side_encryption' + 'server_side_encryption' => 'server_side_encryption', + 'file_max_bytes' => 'file_max_bytes' ]; /** @@ -143,7 +146,8 @@ public static function fastlyFormats() 'redundancy' => 'setRedundancy', 'secret_key' => 'setSecretKey', 'server_side_encryption_kms_key_id' => 'setServerSideEncryptionKmsKeyId', - 'server_side_encryption' => 'setServerSideEncryption' + 'server_side_encryption' => 'setServerSideEncryption', + 'file_max_bytes' => 'setFileMaxBytes' ]; /** @@ -162,7 +166,8 @@ public static function fastlyFormats() 'redundancy' => 'getRedundancy', 'secret_key' => 'getSecretKey', 'server_side_encryption_kms_key_id' => 'getServerSideEncryptionKmsKeyId', - 'server_side_encryption' => 'getServerSideEncryption' + 'server_side_encryption' => 'getServerSideEncryption', + 'file_max_bytes' => 'getFileMaxBytes' ]; /** @@ -233,6 +238,7 @@ public function __construct(array $data = null) $this->container['secret_key'] = $data['secret_key'] ?? null; $this->container['server_side_encryption_kms_key_id'] = $data['server_side_encryption_kms_key_id'] ?? 'null'; $this->container['server_side_encryption'] = $data['server_side_encryption'] ?? 'null'; + $this->container['file_max_bytes'] = $data['file_max_bytes'] ?? null; } /** @@ -244,6 +250,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['file_max_bytes']) && ($this->container['file_max_bytes'] < 1048576)) { + $invalidProperties[] = "invalid value for 'file_max_bytes', must be bigger than or equal to 1048576."; + } + return $invalidProperties; } @@ -522,6 +532,35 @@ public function setServerSideEncryption($server_side_encryption) return $this; } + + /** + * Gets file_max_bytes + * + * @return int|null + */ + public function getFileMaxBytes() + { + return $this->container['file_max_bytes']; + } + + /** + * Sets file_max_bytes + * + * @param int|null $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) + * + * @return self + */ + public function setFileMaxBytes($file_max_bytes) + { + + if (!is_null($file_max_bytes) && ($file_max_bytes < 1048576)) { + throw new \InvalidArgumentException('invalid value for $file_max_bytes when calling LoggingS3Additional., must be bigger than or equal to 1048576.'); + } + + $this->container['file_max_bytes'] = $file_max_bytes; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LoggingS3Response.php b/lib/Model/LoggingS3Response.php index bd12dc52..33287eee 100644 --- a/lib/Model/LoggingS3Response.php +++ b/lib/Model/LoggingS3Response.php @@ -78,7 +78,8 @@ class LoggingS3Response implements ModelInterface, ArrayAccess, \JsonSerializabl 'redundancy' => 'string', 'secret_key' => 'string', 'server_side_encryption_kms_key_id' => 'string', - 'server_side_encryption' => 'string' + 'server_side_encryption' => 'string', + 'file_max_bytes' => 'int' ]; /** @@ -114,7 +115,8 @@ class LoggingS3Response implements ModelInterface, ArrayAccess, \JsonSerializabl 'redundancy' => null, 'secret_key' => null, 'server_side_encryption_kms_key_id' => null, - 'server_side_encryption' => null + 'server_side_encryption' => null, + 'file_max_bytes' => null ]; /** @@ -169,7 +171,8 @@ public static function fastlyFormats() 'redundancy' => 'redundancy', 'secret_key' => 'secret_key', 'server_side_encryption_kms_key_id' => 'server_side_encryption_kms_key_id', - 'server_side_encryption' => 'server_side_encryption' + 'server_side_encryption' => 'server_side_encryption', + 'file_max_bytes' => 'file_max_bytes' ]; /** @@ -203,7 +206,8 @@ public static function fastlyFormats() 'redundancy' => 'setRedundancy', 'secret_key' => 'setSecretKey', 'server_side_encryption_kms_key_id' => 'setServerSideEncryptionKmsKeyId', - 'server_side_encryption' => 'setServerSideEncryption' + 'server_side_encryption' => 'setServerSideEncryption', + 'file_max_bytes' => 'setFileMaxBytes' ]; /** @@ -237,7 +241,8 @@ public static function fastlyFormats() 'redundancy' => 'getRedundancy', 'secret_key' => 'getSecretKey', 'server_side_encryption_kms_key_id' => 'getServerSideEncryptionKmsKeyId', - 'server_side_encryption' => 'getServerSideEncryption' + 'server_side_encryption' => 'getServerSideEncryption', + 'file_max_bytes' => 'getFileMaxBytes' ]; /** @@ -391,6 +396,7 @@ public function __construct(array $data = null) $this->container['secret_key'] = $data['secret_key'] ?? null; $this->container['server_side_encryption_kms_key_id'] = $data['server_side_encryption_kms_key_id'] ?? 'null'; $this->container['server_side_encryption'] = $data['server_side_encryption'] ?? 'null'; + $this->container['file_max_bytes'] = $data['file_max_bytes'] ?? null; } /** @@ -438,6 +444,10 @@ public function listInvalidProperties() ); } + if (!is_null($this->container['file_max_bytes']) && ($this->container['file_max_bytes'] < 1048576)) { + $invalidProperties[] = "invalid value for 'file_max_bytes', must be bigger than or equal to 1048576."; + } + return $invalidProperties; } @@ -1116,6 +1126,35 @@ public function setServerSideEncryption($server_side_encryption) return $this; } + + /** + * Gets file_max_bytes + * + * @return int|null + */ + public function getFileMaxBytes() + { + return $this->container['file_max_bytes']; + } + + /** + * Sets file_max_bytes + * + * @param int|null $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) + * + * @return self + */ + public function setFileMaxBytes($file_max_bytes) + { + + if (!is_null($file_max_bytes) && ($file_max_bytes < 1048576)) { + throw new \InvalidArgumentException('invalid value for $file_max_bytes when calling LoggingS3Response., must be bigger than or equal to 1048576.'); + } + + $this->container['file_max_bytes'] = $file_max_bytes; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/sig.json b/sig.json index a2ee9222..d84bb6e5 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "12e42c04", "D": "dd010b17"} +{"G": "5a2ccc65", "D": "ec7f026b"}