lib/fastly/models/logging_s3_response.rb in fastly-6.0.2 vs lib/fastly/models/logging_s3_response.rb in fastly-7.0.0
- old
+ new
@@ -17,34 +17,47 @@
attr_accessor :name
# Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
attr_accessor :placement
- # 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`.
- attr_accessor :format_version
-
# The name of an existing condition in the configured endpoint, or leave blank to always execute.
attr_accessor :response_condition
# A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
attr_accessor :format
+ # 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`.
+ attr_accessor :format_version
+
# How the message should be formatted.
attr_accessor :message_type
# A timestamp format
attr_accessor :timestamp_format
+ # The codec used for compressing your logs. Valid values are `zstd`, `snappy`, and `gzip`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error.
+ attr_accessor :compression_codec
+
# How frequently log files are finalized so they can be available for reading (in seconds).
attr_accessor :period
# The level of gzip encoding when sending logs (default `0`, no compression). Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error.
attr_accessor :gzip_level
- # The codec used for compressing your logs. Valid values are `zstd`, `snappy`, and `gzip`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error.
- attr_accessor :compression_codec
+ # Date and time in ISO 8601 format.
+ attr_accessor :created_at
+ # Date and time in ISO 8601 format.
+ attr_accessor :deleted_at
+
+ # Date and time in ISO 8601 format.
+ attr_accessor :updated_at
+
+ attr_accessor :service_id
+
+ attr_accessor :version
+
# The access key for your S3 account. Not required if `iam_role` is provided.
attr_accessor :access_key
# The access control list (ACL) specific request header. See the AWS documentation for [Access Control List (ACL) Specific Request Headers](https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html#initiate-mpu-acl-specific-request-headers) for more information.
attr_accessor :acl
@@ -74,23 +87,10 @@
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
- # Date and time in ISO 8601 format.
- attr_accessor :created_at
-
- # Date and time in ISO 8601 format.
- attr_accessor :deleted_at
-
- # Date and time in ISO 8601 format.
- attr_accessor :updated_at
-
- attr_accessor :service_id
-
- attr_accessor :version
-
class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
def initialize(datatype, allowable_values)
@@ -114,34 +114,34 @@
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'name' => :'name',
:'placement' => :'placement',
- :'format_version' => :'format_version',
:'response_condition' => :'response_condition',
:'format' => :'format',
+ :'format_version' => :'format_version',
:'message_type' => :'message_type',
:'timestamp_format' => :'timestamp_format',
+ :'compression_codec' => :'compression_codec',
:'period' => :'period',
:'gzip_level' => :'gzip_level',
- :'compression_codec' => :'compression_codec',
+ :'created_at' => :'created_at',
+ :'deleted_at' => :'deleted_at',
+ :'updated_at' => :'updated_at',
+ :'service_id' => :'service_id',
+ :'version' => :'version',
:'access_key' => :'access_key',
:'acl' => :'acl',
:'bucket_name' => :'bucket_name',
:'domain' => :'domain',
:'iam_role' => :'iam_role',
:'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',
- :'created_at' => :'created_at',
- :'deleted_at' => :'deleted_at',
- :'updated_at' => :'updated_at',
- :'service_id' => :'service_id',
- :'version' => :'version'
+ :'server_side_encryption' => :'server_side_encryption'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -151,62 +151,64 @@
# Attribute type mapping.
def self.fastly_types
{
:'name' => :'String',
:'placement' => :'String',
- :'format_version' => :'Integer',
:'response_condition' => :'String',
:'format' => :'String',
+ :'format_version' => :'String',
:'message_type' => :'String',
:'timestamp_format' => :'String',
- :'period' => :'Integer',
- :'gzip_level' => :'Integer',
:'compression_codec' => :'String',
+ :'period' => :'String',
+ :'gzip_level' => :'String',
+ :'created_at' => :'Time',
+ :'deleted_at' => :'Time',
+ :'updated_at' => :'Time',
+ :'service_id' => :'String',
+ :'version' => :'String',
:'access_key' => :'String',
:'acl' => :'String',
:'bucket_name' => :'String',
:'domain' => :'String',
:'iam_role' => :'String',
:'path' => :'String',
:'public_key' => :'String',
:'redundancy' => :'String',
:'secret_key' => :'String',
:'server_side_encryption_kms_key_id' => :'String',
- :'server_side_encryption' => :'String',
- :'created_at' => :'Time',
- :'deleted_at' => :'Time',
- :'updated_at' => :'Time',
- :'service_id' => :'String',
- :'version' => :'Integer'
+ :'server_side_encryption' => :'String'
}
end
# List of attributes with nullable: true
def self.fastly_nullable
Set.new([
:'placement',
:'response_condition',
:'timestamp_format',
+ :'created_at',
+ :'deleted_at',
+ :'updated_at',
:'access_key',
:'iam_role',
:'path',
:'public_key',
:'redundancy',
:'secret_key',
:'server_side_encryption_kms_key_id',
- :'server_side_encryption',
- :'created_at',
- :'deleted_at',
- :'updated_at',
+ :'server_side_encryption'
])
end
# List of class defined in allOf (OpenAPI v3)
def self.fastly_all_of
[
- :'LoggingS3',
- :'ServiceIdAndVersion',
+ :'LoggingCommonResponse',
+ :'LoggingGenericCommonResponse',
+ :'LoggingS3Additional',
+ :'ServiceIdAndVersionString',
:'Timestamps'
]
end
# Initializes the object
@@ -230,52 +232,72 @@
if attributes.key?(:'placement')
self.placement = attributes[:'placement']
end
- if attributes.key?(:'format_version')
- self.format_version = attributes[:'format_version']
- else
- self.format_version = FORMAT_VERSION::v2
- end
-
if attributes.key?(:'response_condition')
self.response_condition = attributes[:'response_condition']
end
if attributes.key?(:'format')
self.format = attributes[:'format']
else
self.format = '%h %l %u %t \"%r\" %>s %b'
end
+ if attributes.key?(:'format_version')
+ self.format_version = attributes[:'format_version']
+ else
+ self.format_version = '2'
+ end
+
if attributes.key?(:'message_type')
self.message_type = attributes[:'message_type']
else
self.message_type = 'classic'
end
if attributes.key?(:'timestamp_format')
self.timestamp_format = attributes[:'timestamp_format']
end
+ if attributes.key?(:'compression_codec')
+ self.compression_codec = attributes[:'compression_codec']
+ end
+
if attributes.key?(:'period')
self.period = attributes[:'period']
else
- self.period = 3600
+ self.period = '3600'
end
if attributes.key?(:'gzip_level')
self.gzip_level = attributes[:'gzip_level']
else
- self.gzip_level = 0
+ self.gzip_level = '0'
end
- if attributes.key?(:'compression_codec')
- self.compression_codec = attributes[:'compression_codec']
+ if attributes.key?(:'created_at')
+ self.created_at = attributes[:'created_at']
end
+ if attributes.key?(:'deleted_at')
+ self.deleted_at = attributes[:'deleted_at']
+ end
+
+ if attributes.key?(:'updated_at')
+ self.updated_at = attributes[:'updated_at']
+ end
+
+ if attributes.key?(:'service_id')
+ self.service_id = attributes[:'service_id']
+ end
+
+ if attributes.key?(:'version')
+ self.version = attributes[:'version']
+ end
+
if attributes.key?(:'access_key')
self.access_key = attributes[:'access_key']
end
if attributes.key?(:'acl')
@@ -325,30 +347,10 @@
if attributes.key?(:'server_side_encryption')
self.server_side_encryption = attributes[:'server_side_encryption']
else
self.server_side_encryption = 'null'
end
-
- if attributes.key?(:'created_at')
- self.created_at = attributes[:'created_at']
- end
-
- if attributes.key?(:'deleted_at')
- self.deleted_at = attributes[:'deleted_at']
- end
-
- if attributes.key?(:'updated_at')
- self.updated_at = attributes[:'updated_at']
- end
-
- if attributes.key?(:'service_id')
- self.service_id = attributes[:'service_id']
- end
-
- if attributes.key?(:'version')
- self.version = attributes[:'version']
- 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
@@ -359,11 +361,11 @@
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
placement_validator = EnumAttributeValidator.new('String', ["none", "waf_debug", "null"])
return false unless placement_validator.valid?(@placement)
- format_version_validator = EnumAttributeValidator.new('Integer', [1, 2])
+ format_version_validator = EnumAttributeValidator.new('String', ["1", "2"])
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)
@@ -381,11 +383,11 @@
end
# Custom attribute writer method checking allowed values (enum).
# @param [Object] format_version Object to be assigned
def format_version=(format_version)
- validator = EnumAttributeValidator.new('Integer', [1, 2])
+ validator = EnumAttributeValidator.new('String', ["1", "2"])
unless validator.valid?(format_version)
fail ArgumentError, "invalid value for \"format_version\", must be one of #{validator.allowable_values}."
end
@format_version = format_version
end
@@ -415,34 +417,34 @@
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
name == o.name &&
placement == o.placement &&
- format_version == o.format_version &&
response_condition == o.response_condition &&
format == o.format &&
+ format_version == o.format_version &&
message_type == o.message_type &&
timestamp_format == o.timestamp_format &&
+ compression_codec == o.compression_codec &&
period == o.period &&
gzip_level == o.gzip_level &&
- compression_codec == o.compression_codec &&
+ created_at == o.created_at &&
+ deleted_at == o.deleted_at &&
+ updated_at == o.updated_at &&
+ service_id == o.service_id &&
+ version == o.version &&
access_key == o.access_key &&
acl == o.acl &&
bucket_name == o.bucket_name &&
domain == o.domain &&
iam_role == o.iam_role &&
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 &&
- created_at == o.created_at &&
- deleted_at == o.deleted_at &&
- updated_at == o.updated_at &&
- service_id == o.service_id &&
- version == o.version
+ server_side_encryption == o.server_side_encryption
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -450,10 +452,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [name, placement, format_version, response_condition, format, message_type, timestamp_format, period, gzip_level, compression_codec, access_key, acl, bucket_name, domain, iam_role, path, public_key, redundancy, secret_key, server_side_encryption_kms_key_id, server_side_encryption, created_at, deleted_at, updated_at, service_id, version].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
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself