lib/fastly/models/logging_common.rb in fastly-6.0.2 vs lib/fastly/models/logging_common.rb in fastly-7.0.0
- old
+ new
@@ -17,13 +17,10 @@
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
@@ -53,11 +50,10 @@
# 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'
}
end
@@ -69,11 +65,10 @@
# Attribute type mapping.
def self.fastly_types
{
:'name' => :'String',
:'placement' => :'String',
- :'format_version' => :'Integer',
:'response_condition' => :'String',
:'format' => :'String'
}
end
@@ -106,16 +101,10 @@
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')
@@ -135,12 +124,10 @@
# 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])
- return false unless format_version_validator.valid?(@format_version)
true
end
# Custom attribute writer method checking allowed values (enum).
# @param [Object] placement Object to be assigned
@@ -150,28 +137,17 @@
fail ArgumentError, "invalid value for \"placement\", must be one of #{validator.allowable_values}."
end
@placement = placement
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])
- 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
-
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
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
end
# @see the `==` method
@@ -181,10 +157,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [name, placement, format_version, response_condition, format].hash
+ [name, placement, response_condition, format].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself