From 4c5d619088cd58d99fc7f4c2cf40cd12479ae341 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 28 Jun 2024 06:46:08 +0000 Subject: [PATCH] Generated v8.4.0 --- CHANGELOG.md | 24 +++++++++++++++ README.md | 4 ++- docs/BillingInvoicesApi.md | 4 +-- docs/Invoicelineitems.md | 1 + docs/LoggingS3Additional.md | 1 + docs/LoggingS3Api.md | 4 +++ docs/LoggingS3Response.md | 1 + lib/fastly/api/logging_s3_api.rb | 14 +++++++++ lib/fastly/models/invoicelineitems.rb | 12 +++++++- lib/fastly/models/logging_s3_additional.rb | 35 ++++++++++++++++++---- lib/fastly/models/logging_s3_response.rb | 35 ++++++++++++++++++---- lib/fastly/version.rb | 2 +- sig.json | 2 +- 13 files changed, 123 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36ddde17..a67e57f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [v8.4.0](https://github.com/fastly/fastly-ruby/releases/tag/release/v8.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 + ## [v8.3.0](https://github.com/fastly/fastly-ruby/releases/tag/release/v8.3.0) (2024-05-24) **Bug fixes:** diff --git a/README.md b/README.md index 37e38bff..abbc3731 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A Ruby client library for interacting with most facets of the [Fastly API](https To install via RubyGems, add the following to your project's `Gemfile`: ```ruby -gem 'fastly', '~> 8.3.0' +gem 'fastly', '~> 8.4.0' ``` Then run `bundle install`. @@ -621,6 +621,8 @@ The fastly-ruby 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/BillingInvoicesApi.md b/docs/BillingInvoicesApi.md index beda5d9d..33a3e5bb 100644 --- a/docs/BillingInvoicesApi.md +++ b/docs/BillingInvoicesApi.md @@ -67,8 +67,8 @@ Returns the list of invoices, sorted by billing start date (newest to oldest). ```ruby api_instance = Fastly::BillingInvoicesApi.new opts = { - billing_start_date: '2023-01-01T00:00:00Z', # String | - billing_end_date: '2023-01-31T00:00:00Z', # String | + billing_start_date: '2023-01-01', # String | + billing_end_date: '2023-01-31', # String | limit: 'limit_example', # String | Number of results per page. The maximum is 200. 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/Invoicelineitems.md b/docs/Invoicelineitems.md index 8f46e4f5..eba5f939 100644 --- a/docs/Invoicelineitems.md +++ b/docs/Invoicelineitems.md @@ -11,6 +11,7 @@ | **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/LoggingS3Additional.md b/docs/LoggingS3Additional.md index 7280e4e7..84005dbf 100644 --- a/docs/LoggingS3Additional.md +++ b/docs/LoggingS3Additional.md @@ -15,6 +15,7 @@ | **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][default to 'null'] | | **server_side_encryption** | **String** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional][default to 'null'] | +| **file_max_bytes** | **Integer** | 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/LoggingS3Api.md b/docs/LoggingS3Api.md index 7cd985a3..c58ce300 100644 --- a/docs/LoggingS3Api.md +++ b/docs/LoggingS3Api.md @@ -56,6 +56,7 @@ opts = { secret_key: 'secret_key_example', # String | The secret key for your S3 account. Not required if `iam_role` is provided. server_side_encryption_kms_key_id: 'server_side_encryption_kms_key_id_example', # String | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. server_side_encryption: 'server_side_encryption_example', # String | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. + file_max_bytes: 56, # Integer | 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.) } begin @@ -94,6 +95,7 @@ end | **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][default to 'null'] | | **server_side_encryption** | **String** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional][default to 'null'] | +| **file_max_bytes** | **Integer** | 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 @@ -259,6 +261,7 @@ opts = { secret_key: 'secret_key_example', # String | The secret key for your S3 account. Not required if `iam_role` is provided. server_side_encryption_kms_key_id: 'server_side_encryption_kms_key_id_example', # String | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. server_side_encryption: 'server_side_encryption_example', # String | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. + file_max_bytes: 56, # Integer | 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.) } begin @@ -298,6 +301,7 @@ end | **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][default to 'null'] | | **server_side_encryption** | **String** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional][default to 'null'] | +| **file_max_bytes** | **Integer** | 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/LoggingS3Response.md b/docs/LoggingS3Response.md index 667ba96e..101e8824 100644 --- a/docs/LoggingS3Response.md +++ b/docs/LoggingS3Response.md @@ -30,6 +30,7 @@ | **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][default to 'null'] | | **server_side_encryption** | **String** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional][default to 'null'] | +| **file_max_bytes** | **Integer** | 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/fastly/api/logging_s3_api.rb b/lib/fastly/api/logging_s3_api.rb index c533ba76..2b1b02af 100644 --- a/lib/fastly/api/logging_s3_api.rb +++ b/lib/fastly/api/logging_s3_api.rb @@ -42,6 +42,7 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :secret_key The secret key for your S3 account. Not required if `iam_role` is provided. # @option opts [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`. (default to 'null') # @option opts [String] :server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (default to 'null') + # @option opts [Integer] :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 [LoggingS3Response] def create_log_aws_s3(opts = {}) data, _status_code, _headers = create_log_aws_s3_with_http_info(opts) @@ -73,6 +74,7 @@ def create_log_aws_s3(opts = {}) # @option opts [String] :secret_key The secret key for your S3 account. Not required if `iam_role` is provided. # @option opts [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`. (default to 'null') # @option opts [String] :server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (default to 'null') + # @option opts [Integer] :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 [Array<(LoggingS3Response, Integer, Hash)>] LoggingS3Response data, response status code and response headers def create_log_aws_s3_with_http_info(opts = {}) if @api_client.config.debugging @@ -105,6 +107,10 @@ def create_log_aws_s3_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'compression_codec'] && !allowable_values.include?(opts[:'compression_codec']) fail ArgumentError, "invalid value for \"compression_codec\", must be one of #{allowable_values}" end + if @api_client.config.client_side_validation && !opts[:'file_max_bytes'].nil? && opts[:'file_max_bytes'] < 1048576 + fail ArgumentError, 'invalid value for "opts[:"file_max_bytes"]" when calling LoggingS3Api.create_log_aws_s3, must be greater than or equal to 1048576.' + end + # resource path local_var_path = '/service/{service_id}/version/{version_id}/logging/s3'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) @@ -144,6 +150,7 @@ def create_log_aws_s3_with_http_info(opts = {}) form_params['secret_key'] = opts[:'secret_key'] if !opts[:'secret_key'].nil? form_params['server_side_encryption_kms_key_id'] = opts[:'server_side_encryption_kms_key_id'] if !opts[:'server_side_encryption_kms_key_id'].nil? form_params['server_side_encryption'] = opts[:'server_side_encryption'] if !opts[:'server_side_encryption'].nil? + form_params['file_max_bytes'] = opts[:'file_max_bytes'] if !opts[:'file_max_bytes'].nil? # http body (model) post_body = opts[:debug_body] @@ -421,6 +428,7 @@ def list_log_aws_s3_with_http_info(opts = {}) # @option opts [String] :secret_key The secret key for your S3 account. Not required if `iam_role` is provided. # @option opts [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`. (default to 'null') # @option opts [String] :server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (default to 'null') + # @option opts [Integer] :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 [LoggingS3Response] def update_log_aws_s3(opts = {}) data, _status_code, _headers = update_log_aws_s3_with_http_info(opts) @@ -453,6 +461,7 @@ def update_log_aws_s3(opts = {}) # @option opts [String] :secret_key The secret key for your S3 account. Not required if `iam_role` is provided. # @option opts [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`. (default to 'null') # @option opts [String] :server_side_encryption Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (default to 'null') + # @option opts [Integer] :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 [Array<(LoggingS3Response, Integer, Hash)>] LoggingS3Response data, response status code and response headers def update_log_aws_s3_with_http_info(opts = {}) if @api_client.config.debugging @@ -490,6 +499,10 @@ def update_log_aws_s3_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'compression_codec'] && !allowable_values.include?(opts[:'compression_codec']) fail ArgumentError, "invalid value for \"compression_codec\", must be one of #{allowable_values}" end + if @api_client.config.client_side_validation && !opts[:'file_max_bytes'].nil? && opts[:'file_max_bytes'] < 1048576 + fail ArgumentError, 'invalid value for "opts[:"file_max_bytes"]" when calling LoggingS3Api.update_log_aws_s3, must be greater than or equal to 1048576.' + end + # resource path local_var_path = '/service/{service_id}/version/{version_id}/logging/s3/{logging_s3_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_s3_name' + '}', CGI.escape(logging_s3_name.to_s)) @@ -529,6 +542,7 @@ def update_log_aws_s3_with_http_info(opts = {}) form_params['secret_key'] = opts[:'secret_key'] if !opts[:'secret_key'].nil? form_params['server_side_encryption_kms_key_id'] = opts[:'server_side_encryption_kms_key_id'] if !opts[:'server_side_encryption_kms_key_id'].nil? form_params['server_side_encryption'] = opts[:'server_side_encryption'] if !opts[:'server_side_encryption'].nil? + form_params['file_max_bytes'] = opts[:'file_max_bytes'] if !opts[:'file_max_bytes'].nil? # http body (model) post_body = opts[:debug_body] diff --git a/lib/fastly/models/invoicelineitems.rb b/lib/fastly/models/invoicelineitems.rb index dd7e5b17..c387f9ee 100644 --- a/lib/fastly/models/invoicelineitems.rb +++ b/lib/fastly/models/invoicelineitems.rb @@ -34,6 +34,9 @@ class Invoicelineitems # The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). attr_accessor :product_group + # The broader classification of the product (e.g., `Network Services` or `Security`). + attr_accessor :product_line + # The geographical area applicable for regionally based products. attr_accessor :region @@ -50,6 +53,7 @@ def self.attribute_map :'units' => :'units', :'product_name' => :'ProductName', :'product_group' => :'ProductGroup', + :'product_line' => :'ProductLine', :'region' => :'Region', :'usage_type' => :'UsageType' } @@ -70,6 +74,7 @@ def self.fastly_types :'units' => :'Float', :'product_name' => :'String', :'product_group' => :'String', + :'product_line' => :'String', :'region' => :'String', :'usage_type' => :'String' } @@ -124,6 +129,10 @@ def initialize(attributes = {}) self.product_group = attributes[:'product_group'] end + if attributes.key?(:'product_line') + self.product_line = attributes[:'product_line'] + end + if attributes.key?(:'region') self.region = attributes[:'region'] end @@ -158,6 +167,7 @@ def ==(o) units == o.units && product_name == o.product_name && product_group == o.product_group && + product_line == o.product_line && region == o.region && usage_type == o.usage_type end @@ -171,7 +181,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [description, amount, credit_coupon_code, rate, units, product_name, product_group, region, usage_type].hash + [description, amount, credit_coupon_code, rate, units, product_name, product_group, product_line, region, usage_type].hash end # Builds the object from hash diff --git a/lib/fastly/models/logging_s3_additional.rb b/lib/fastly/models/logging_s3_additional.rb index 4c8d9afe..4a2d2b63 100644 --- a/lib/fastly/models/logging_s3_additional.rb +++ b/lib/fastly/models/logging_s3_additional.rb @@ -46,6 +46,9 @@ class LoggingS3Additional # Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. attr_accessor :server_side_encryption + # 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.) + attr_accessor :file_max_bytes + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -59,7 +62,8 @@ def self.attribute_map :'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' } end @@ -81,7 +85,8 @@ def self.fastly_types :'redundancy' => :'String', :'secret_key' => :'String', :'server_side_encryption_kms_key_id' => :'String', - :'server_side_encryption' => :'String' + :'server_side_encryption' => :'String', + :'file_max_bytes' => :'Integer' } end @@ -95,7 +100,7 @@ def self.fastly_nullable :'redundancy', :'secret_key', :'server_side_encryption_kms_key_id', - :'server_side_encryption' + :'server_side_encryption', ]) end @@ -167,21 +172,40 @@ def initialize(attributes = {}) else self.server_side_encryption = 'null' end + + if attributes.key?(:'file_max_bytes') + self.file_max_bytes = attributes[:'file_max_bytes'] + end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if !@file_max_bytes.nil? && @file_max_bytes < 1048576 + invalid_properties.push('invalid value for "file_max_bytes", must be greater than or equal to 1048576.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if !@file_max_bytes.nil? && @file_max_bytes < 1048576 true end + # Custom attribute writer method with validation + # @param [Object] file_max_bytes Value to be assigned + def file_max_bytes=(file_max_bytes) + if !file_max_bytes.nil? && file_max_bytes < 1048576 + fail ArgumentError, 'invalid value for "file_max_bytes", must be greater than or equal to 1048576.' + end + + @file_max_bytes = file_max_bytes + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -197,7 +221,8 @@ def ==(o) redundancy == o.redundancy && secret_key == o.secret_key && server_side_encryption_kms_key_id == o.server_side_encryption_kms_key_id && - server_side_encryption == o.server_side_encryption + server_side_encryption == o.server_side_encryption && + file_max_bytes == o.file_max_bytes end # @see the `==` method @@ -209,7 +234,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [access_key, acl, bucket_name, domain, iam_role, path, public_key, redundancy, secret_key, server_side_encryption_kms_key_id, server_side_encryption].hash + [access_key, acl, bucket_name, domain, iam_role, path, public_key, redundancy, secret_key, server_side_encryption_kms_key_id, server_side_encryption, file_max_bytes].hash end # Builds the object from hash diff --git a/lib/fastly/models/logging_s3_response.rb b/lib/fastly/models/logging_s3_response.rb index ebcb0d38..8110f643 100644 --- a/lib/fastly/models/logging_s3_response.rb +++ b/lib/fastly/models/logging_s3_response.rb @@ -89,6 +89,9 @@ class LoggingS3Response # Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. attr_accessor :server_side_encryption + # 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.) + attr_accessor :file_max_bytes + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -139,7 +142,8 @@ def self.attribute_map :'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' } end @@ -176,7 +180,8 @@ def self.fastly_types :'redundancy' => :'String', :'secret_key' => :'String', :'server_side_encryption_kms_key_id' => :'String', - :'server_side_encryption' => :'String' + :'server_side_encryption' => :'String', + :'file_max_bytes' => :'Integer' } end @@ -196,7 +201,7 @@ def self.fastly_nullable :'redundancy', :'secret_key', :'server_side_encryption_kms_key_id', - :'server_side_encryption' + :'server_side_encryption', ]) end @@ -349,12 +354,20 @@ def initialize(attributes = {}) else self.server_side_encryption = 'null' end + + if attributes.key?(:'file_max_bytes') + self.file_max_bytes = attributes[:'file_max_bytes'] + end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if !@file_max_bytes.nil? && @file_max_bytes < 1048576 + invalid_properties.push('invalid value for "file_max_bytes", must be greater than or equal to 1048576.') + end + invalid_properties end @@ -369,6 +382,7 @@ def valid? return false unless message_type_validator.valid?(@message_type) compression_codec_validator = EnumAttributeValidator.new('String', ["zstd", "snappy", "gzip"]) return false unless compression_codec_validator.valid?(@compression_codec) + return false if !@file_max_bytes.nil? && @file_max_bytes < 1048576 true end @@ -412,6 +426,16 @@ def compression_codec=(compression_codec) @compression_codec = compression_codec end + # Custom attribute writer method with validation + # @param [Object] file_max_bytes Value to be assigned + def file_max_bytes=(file_max_bytes) + if !file_max_bytes.nil? && file_max_bytes < 1048576 + fail ArgumentError, 'invalid value for "file_max_bytes", must be greater than or equal to 1048576.' + end + + @file_max_bytes = file_max_bytes + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -442,7 +466,8 @@ def ==(o) redundancy == o.redundancy && secret_key == o.secret_key && server_side_encryption_kms_key_id == o.server_side_encryption_kms_key_id && - server_side_encryption == o.server_side_encryption + server_side_encryption == o.server_side_encryption && + file_max_bytes == o.file_max_bytes end # @see the `==` method @@ -454,7 +479,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, placement, response_condition, format, format_version, message_type, timestamp_format, compression_codec, period, gzip_level, created_at, deleted_at, updated_at, service_id, version, access_key, acl, bucket_name, domain, iam_role, path, public_key, redundancy, secret_key, server_side_encryption_kms_key_id, server_side_encryption].hash + [name, placement, response_condition, format, format_version, message_type, timestamp_format, compression_codec, period, gzip_level, created_at, deleted_at, updated_at, service_id, version, access_key, acl, bucket_name, domain, iam_role, path, public_key, redundancy, secret_key, server_side_encryption_kms_key_id, server_side_encryption, file_max_bytes].hash end # Builds the object from hash diff --git a/lib/fastly/version.rb b/lib/fastly/version.rb index 702ac714..f15e6520 100644 --- a/lib/fastly/version.rb +++ b/lib/fastly/version.rb @@ -9,5 +9,5 @@ =end module Fastly - VERSION = '8.3.0' + VERSION = '8.4.0' end 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"}