lib/fastly/models/logging_s3_response.rb in fastly-8.2.0 vs lib/fastly/models/logging_s3_response.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
@@ -87,10 +87,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
+
class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
def initialize(datatype, allowable_values)
@@ -137,11 +140,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
@@ -174,11 +178,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
@@ -194,11 +199,11 @@
:'path',
:'public_key',
:'redundancy',
:'secret_key',
:'server_side_encryption_kms_key_id',
- :'server_side_encryption'
+ :'server_side_encryption',
])
end
# List of class defined in allOf (OpenAPI v3)
def self.fastly_all_of
@@ -347,16 +352,24 @@
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
@@ -367,10 +380,11 @@
return false unless format_version_validator.valid?(@format_version)
message_type_validator = EnumAttributeValidator.new('String', ["classic", "loggly", "logplex", "blank"])
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
# Custom attribute writer method checking allowed values (enum).
# @param [Object] placement Object to be assigned
@@ -410,10 +424,20 @@
fail ArgumentError, "invalid value for \"compression_codec\", must be one of #{validator.allowable_values}."
end
@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)
return true if self.equal?(o)
self.class == o.class &&
@@ -440,11 +464,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)
@@ -452,10 +477,10 @@
end
# 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
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself