lib/algolia/models/recommend/promote_consequence_object.rb in algolia-3.11.0 vs lib/algolia/models/recommend/promote_consequence_object.rb in algolia-3.12.0

- old
+ new

@@ -1,32 +1,34 @@ +# frozen_string_literal: true + # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. require "date" require "time" module Algolia module Recommend # Object ID and position of the recommendation you want to pin. class PromoteConsequenceObject # Unique record identifier. - attr_accessor :object_id + attr_accessor :algolia_object_id # Index in the list of recommendations where to place this item. attr_accessor :position # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :object_id => :objectID, + :algolia_object_id => :objectID, :position => :position } end # Attribute type mapping. def self.types_mapping { - :object_id => :"String", + :algolia_object_id => :"String", :position => :"Integer" } end # List of attributes with nullable: true @@ -57,12 +59,12 @@ end h[k.to_sym] = v } - if attributes.key?(:object_id) - self.object_id = attributes[:object_id] + if attributes.key?(:algolia_object_id) + self.algolia_object_id = attributes[:algolia_object_id] end if attributes.key?(:position) self.position = attributes[:position] end @@ -71,11 +73,11 @@ # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) return true if self.equal?(other) self.class == other.class && - object_id == other.object_id && + algolia_object_id == other.algolia_object_id && position == other.position end # @see the `==` method # @param [Object] Object to be compared @@ -84,10 +86,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [object_id, position].hash + [algolia_object_id, position].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself