lib/hubspot/codegen/settings/users/models/public_team.rb in hubspot-api-client-17.2.0 vs lib/hubspot/codegen/settings/users/models/public_team.rb in hubspot-api-client-18.0.0

- old
+ new

@@ -1,7 +1,7 @@ =begin -#Users +#Settings User Provisioning #Add, manage, and remove users from your account The version of the OpenAPI document: v3 @@ -16,28 +16,28 @@ module Hubspot module Settings module Users # A team that can be assigned to a user class PublicTeam - # The team's unique ID - attr_accessor :id + # Primary members of this team + attr_accessor :user_ids # The team's name attr_accessor :name - # Primary members of this team - attr_accessor :user_ids + # The team's unique ID + attr_accessor :id # Secondary or additional members of this team attr_accessor :secondary_user_ids # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'id' => :'id', - :'name' => :'name', :'user_ids' => :'userIds', + :'name' => :'name', + :'id' => :'id', :'secondary_user_ids' => :'secondaryUserIds' } end # Returns all the JSON keys this model knows about @@ -46,13 +46,13 @@ end # Attribute type mapping. def self.openapi_types { - :'id' => :'String', - :'name' => :'String', :'user_ids' => :'Array<String>', + :'name' => :'String', + :'id' => :'String', :'secondary_user_ids' => :'Array<String>' } end # List of attributes with nullable: true @@ -74,22 +74,22 @@ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Settings::Users::PublicTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'id') - self.id = attributes[:'id'] + if attributes.key?(:'user_ids') + if (value = attributes[:'user_ids']).is_a?(Array) + self.user_ids = value + end end if attributes.key?(:'name') self.name = attributes[:'name'] end - if attributes.key?(:'user_ids') - if (value = attributes[:'user_ids']).is_a?(Array) - self.user_ids = value - end + if attributes.key?(:'id') + self.id = attributes[:'id'] end if attributes.key?(:'secondary_user_ids') if (value = attributes[:'secondary_user_ids']).is_a?(Array) self.secondary_user_ids = value @@ -99,20 +99,20 @@ # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @id.nil? - invalid_properties.push('invalid value for "id", id cannot be nil.') + if @user_ids.nil? + invalid_properties.push('invalid value for "user_ids", user_ids cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end - if @user_ids.nil? - invalid_properties.push('invalid value for "user_ids", user_ids cannot be nil.') + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') end if @secondary_user_ids.nil? invalid_properties.push('invalid value for "secondary_user_ids", secondary_user_ids cannot be nil.') end @@ -121,25 +121,25 @@ 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 @id.nil? - return false if @name.nil? return false if @user_ids.nil? + return false if @name.nil? + return false if @id.nil? return false if @secondary_user_ids.nil? true 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 && - id == o.id && - name == o.name && user_ids == o.user_ids && + name == o.name && + id == o.id && secondary_user_ids == o.secondary_user_ids end # @see the `==` method # @param [Object] Object to be compared @@ -148,10 +148,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, name, user_ids, secondary_user_ids].hash + [user_ids, name, id, secondary_user_ids].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself