lib/hubspot/codegen/crm/imports/models/public_import_response.rb in hubspot-api-client-8.0.1 vs lib/hubspot/codegen/crm/imports/models/public_import_response.rb in hubspot-api-client-9.0.0

- old
+ new

@@ -4,31 +4,33 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.2.3 +OpenAPI Generator version: 4.3.1 =end require 'date' module Hubspot module Crm module Imports class PublicImportResponse + # The status of the import. + attr_accessor :state + + attr_accessor :import_request_json + attr_accessor :created_at attr_accessor :metadata + attr_accessor :import_name + attr_accessor :updated_at - # The status of the import. - attr_accessor :state - - attr_accessor :import_request_json - # Whether or not the import is a list of people disqualified from receiving emails. attr_accessor :opt_out_import attr_accessor :id @@ -55,28 +57,30 @@ end # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'state' => :'state', + :'import_request_json' => :'importRequestJson', :'created_at' => :'createdAt', :'metadata' => :'metadata', + :'import_name' => :'importName', :'updated_at' => :'updatedAt', - :'state' => :'state', - :'import_request_json' => :'importRequestJson', :'opt_out_import' => :'optOutImport', :'id' => :'id' } end # Attribute type mapping. def self.openapi_types { + :'state' => :'String', + :'import_request_json' => :'Object', :'created_at' => :'DateTime', :'metadata' => :'PublicImportMetadata', + :'import_name' => :'String', :'updated_at' => :'DateTime', - :'state' => :'String', - :'import_request_json' => :'Object', :'opt_out_import' => :'Boolean', :'id' => :'String' } end @@ -99,30 +103,34 @@ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Imports::PublicImportResponse`. 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?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'import_request_json') + self.import_request_json = attributes[:'import_request_json'] + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'metadata') self.metadata = attributes[:'metadata'] end + if attributes.key?(:'import_name') + self.import_name = attributes[:'import_name'] + end + if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end - if attributes.key?(:'state') - self.state = attributes[:'state'] - end - - if attributes.key?(:'import_request_json') - self.import_request_json = attributes[:'import_request_json'] - end - if attributes.key?(:'opt_out_import') self.opt_out_import = attributes[:'opt_out_import'] end if attributes.key?(:'id') @@ -132,10 +140,14 @@ # 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 @state.nil? + invalid_properties.push('invalid value for "state", state cannot be nil.') + end + if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end if @metadata.nil? @@ -144,14 +156,10 @@ if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end - if @state.nil? - invalid_properties.push('invalid value for "state", state cannot be nil.') - end - if @opt_out_import.nil? invalid_properties.push('invalid value for "opt_out_import", opt_out_import cannot be nil.') end if @id.nil? @@ -162,16 +170,16 @@ 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 @metadata.nil? - return false if @updated_at.nil? return false if @state.nil? state_validator = EnumAttributeValidator.new('String', ["STARTED", "PROCESSING", "DONE", "FAILED", "CANCELED"]) return false unless state_validator.valid?(@state) + return false if @created_at.nil? + return false if @metadata.nil? + return false if @updated_at.nil? return false if @opt_out_import.nil? return false if @id.nil? true end @@ -188,15 +196,16 @@ # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && + state == o.state && + import_request_json == o.import_request_json && created_at == o.created_at && metadata == o.metadata && + import_name == o.import_name && updated_at == o.updated_at && - state == o.state && - import_request_json == o.import_request_json && opt_out_import == o.opt_out_import && id == o.id end # @see the `==` method @@ -206,10 +215,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, metadata, updated_at, state, import_request_json, opt_out_import, id].hash + [state, import_request_json, created_at, metadata, import_name, updated_at, opt_out_import, id].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself