lib/svix/models/environment_out.rb in svix-1.36.0 vs lib/svix/models/environment_out.rb in svix-1.37.0

- old
+ new

@@ -19,18 +19,21 @@ attr_accessor :event_types attr_accessor :settings + attr_accessor :transformation_templates + attr_accessor :version # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'created_at' => :'createdAt', :'event_types' => :'eventTypes', :'settings' => :'settings', + :'transformation_templates' => :'transformationTemplates', :'version' => :'version' } end # Returns all the JSON keys this model knows about @@ -42,10 +45,11 @@ def self.openapi_types { :'created_at' => :'Time', :'event_types' => :'Array<EventTypeOut>', :'settings' => :'SettingsOut', + :'transformation_templates' => :'Array<TemplateOut>', :'version' => :'Integer' } end # List of attributes with nullable: true @@ -81,10 +85,16 @@ if attributes.key?(:'settings') self.settings = attributes[:'settings'] end + if attributes.key?(:'transformation_templates') + if (value = attributes[:'transformation_templates']).is_a?(Array) + self.transformation_templates = value + end + end + if attributes.key?(:'version') self.version = attributes[:'version'] else self.version = 1 end @@ -100,18 +110,23 @@ if @event_types.nil? invalid_properties.push('invalid value for "event_types", event_types cannot be nil.') end + if @transformation_templates.nil? + invalid_properties.push('invalid value for "transformation_templates", transformation_templates cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? return false if @created_at.nil? return false if @event_types.nil? + return false if @transformation_templates.nil? true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared @@ -119,10 +134,11 @@ return true if self.equal?(o) self.class == o.class && created_at == o.created_at && event_types == o.event_types && settings == o.settings && + transformation_templates == o.transformation_templates && version == o.version end # @see the `==` method # @param [Object] Object to be compared @@ -131,10 +147,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, event_types, settings, version].hash + [created_at, event_types, settings, transformation_templates, version].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself