lib/fastly/models/schemas_snippet_response.rb in fastly-5.1.0 vs lib/fastly/models/schemas_snippet_response.rb in fastly-5.1.1
- old
+ new
@@ -26,23 +26,24 @@
attr_accessor :content
# Priority determines execution order. Lower numbers execute first.
attr_accessor :priority
- attr_accessor :service_id
-
- attr_accessor :version
-
# 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
+
+ # String representing the number identifying a version of the service.
+ attr_accessor :version
+
attr_accessor :id
class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
@@ -71,15 +72,15 @@
:'name' => :'name',
:'dynamic' => :'dynamic',
:'type' => :'type',
:'content' => :'content',
:'priority' => :'priority',
- :'service_id' => :'service_id',
- :'version' => :'version',
:'created_at' => :'created_at',
:'deleted_at' => :'deleted_at',
:'updated_at' => :'updated_at',
+ :'service_id' => :'service_id',
+ :'version' => :'version',
:'id' => :'id'
}
end
# Returns all the JSON keys this model knows about
@@ -92,16 +93,16 @@
{
:'name' => :'String',
:'dynamic' => :'Integer',
:'type' => :'String',
:'content' => :'String',
- :'priority' => :'Integer',
- :'service_id' => :'String',
- :'version' => :'Integer',
+ :'priority' => :'String',
:'created_at' => :'Time',
:'deleted_at' => :'Time',
:'updated_at' => :'Time',
+ :'service_id' => :'String',
+ :'version' => :'String',
:'id' => :'String'
}
end
# List of attributes with nullable: true
@@ -114,11 +115,10 @@
end
# List of class defined in allOf (OpenAPI v3)
def self.fastly_all_of
[
- :'ServiceIdAndVersion',
:'Snippet',
:'SnippetResponseAllOf',
:'Timestamps'
]
end
@@ -155,21 +155,13 @@
end
if attributes.key?(:'priority')
self.priority = attributes[:'priority']
else
- self.priority = 100
+ self.priority = '100'
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?(:'created_at')
self.created_at = attributes[:'created_at']
end
if attributes.key?(:'deleted_at')
@@ -178,10 +170,18 @@
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?(:'id')
self.id = attributes[:'id']
end
end
@@ -230,15 +230,15 @@
name == o.name &&
dynamic == o.dynamic &&
type == o.type &&
content == o.content &&
priority == o.priority &&
- service_id == o.service_id &&
- version == o.version &&
created_at == o.created_at &&
deleted_at == o.deleted_at &&
updated_at == o.updated_at &&
+ service_id == o.service_id &&
+ version == o.version &&
id == o.id
end
# @see the `==` method
# @param [Object] Object to be compared
@@ -247,10 +247,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [name, dynamic, type, content, priority, service_id, version, created_at, deleted_at, updated_at, id].hash
+ [name, dynamic, type, content, priority, created_at, deleted_at, updated_at, service_id, version, id].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself