lib/fastly/models/set_configuration.rb in fastly-8.10.0 vs lib/fastly/models/set_configuration.rb in fastly-9.0.0
- old
+ new
@@ -17,15 +17,19 @@
attr_accessor :workspace_id
# The new traffic ramp. Optional in the `PATCH` request body for `ngwaf`.
attr_accessor :traffic_ramp
+ # The new mode to run the product in. One of `block`, `log`, or `off`. Optional in the `PATCH` request body for `ddos_protection`.
+ attr_accessor :mode
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'workspace_id' => :'workspace_id',
- :'traffic_ramp' => :'traffic_ramp'
+ :'traffic_ramp' => :'traffic_ramp',
+ :'mode' => :'mode'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -34,11 +38,12 @@
# Attribute type mapping.
def self.fastly_types
{
:'workspace_id' => :'String',
- :'traffic_ramp' => :'String'
+ :'traffic_ramp' => :'String',
+ :'mode' => :'String'
}
end
# List of attributes with nullable: true
def self.fastly_nullable
@@ -66,10 +71,14 @@
end
if attributes.key?(:'traffic_ramp')
self.traffic_ramp = attributes[:'traffic_ramp']
end
+
+ if attributes.key?(:'mode')
+ self.mode = attributes[:'mode']
+ 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
@@ -87,11 +96,12 @@
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
workspace_id == o.workspace_id &&
- traffic_ramp == o.traffic_ramp
+ traffic_ramp == o.traffic_ramp &&
+ mode == o.mode
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -99,10 +109,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [workspace_id, traffic_ramp].hash
+ [workspace_id, traffic_ramp, mode].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself