lib/fastly/models/logging_s3_additional.rb in fastly-8.2.0 vs lib/fastly/models/logging_s3_additional.rb in fastly-8.4.0

- old
+ new

@@ -1,9 +1,9 @@ =begin #Fastly API -#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) The version of the OpenAPI document: 1.0.0 Contact: oss@fastly.com =end @@ -44,10 +44,13 @@ attr_accessor :server_side_encryption_kms_key_id # 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 { :'access_key' => :'access_key', :'acl' => :'acl', @@ -57,11 +60,12 @@ :'path' => :'path', :'public_key' => :'public_key', :'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 # Returns all the JSON keys this model knows about def self.acceptable_attributes @@ -79,11 +83,12 @@ :'path' => :'String', :'public_key' => :'String', :'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 # List of attributes with nullable: true def self.fastly_nullable @@ -93,11 +98,11 @@ :'path', :'public_key', :'redundancy', :'secret_key', :'server_side_encryption_kms_key_id', - :'server_side_encryption' + :'server_side_encryption', ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -165,25 +170,44 @@ if attributes.key?(:'server_side_encryption') self.server_side_encryption = attributes[:'server_side_encryption'] 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) return true if self.equal?(o) self.class == o.class && @@ -195,11 +219,12 @@ path == o.path && public_key == o.public_key && 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 # @param [Object] Object to be compared def eql?(o) @@ -207,10 +232,10 @@ end # 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 # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself