lib/hubspot/codegen/crm/properties/models/error_detail.rb in hubspot-api-client-2.0.0 vs lib/hubspot/codegen/crm/properties/models/error_detail.rb in hubspot-api-client-2.1.0
- old
+ new
@@ -4,51 +4,53 @@
#All HubSpot objects store data in default and custom properties. These endpoints provide access to read and modify object properties in HubSpot.
The version of the OpenAPI document: v3
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 4.2.2
+OpenAPI Generator version: 4.2.3
=end
require 'date'
module Hubspot
module Crm
module Properties
class ErrorDetail
- attr_accessor :sub_category
-
# A human readable message describing the error along with remediation steps where appropriate
attr_accessor :message
- attr_accessor :code
-
# The name of the field or parameter in which the error was found.
attr_accessor :_in
+ # The status code associated with the error detail
+ attr_accessor :code
+
+ # A specific category that contains more specific detail about the error
+ attr_accessor :sub_category
+
# Context about the error condition
attr_accessor :context
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
- :'sub_category' => :'subCategory',
:'message' => :'message',
- :'code' => :'code',
:'_in' => :'in',
+ :'code' => :'code',
+ :'sub_category' => :'subCategory',
:'context' => :'context'
}
end
# Attribute type mapping.
def self.openapi_types
{
- :'sub_category' => :'Object',
:'message' => :'String',
- :'code' => :'String',
:'_in' => :'String',
+ :'code' => :'String',
+ :'sub_category' => :'String',
:'context' => :'Hash<String, Array<String>>'
}
end
# List of attributes with nullable: true
@@ -70,24 +72,24 @@
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Properties::ErrorDetail`. 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?(:'sub_category')
- self.sub_category = attributes[:'sub_category']
- end
-
if attributes.key?(:'message')
self.message = attributes[:'message']
end
+ if attributes.key?(:'_in')
+ self._in = attributes[:'_in']
+ end
+
if attributes.key?(:'code')
self.code = attributes[:'code']
end
- if attributes.key?(:'_in')
- self._in = attributes[:'_in']
+ if attributes.key?(:'sub_category')
+ self.sub_category = attributes[:'sub_category']
end
if attributes.key?(:'context')
if (value = attributes[:'context']).is_a?(Hash)
self.context = value
@@ -101,34 +103,29 @@
invalid_properties = Array.new
if @message.nil?
invalid_properties.push('invalid value for "message", message cannot be nil.')
end
- if @context.nil?
- invalid_properties.push('invalid value for "context", context 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 @message.nil?
- return false if @context.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 &&
- sub_category == o.sub_category &&
message == o.message &&
- code == o.code &&
_in == o._in &&
+ code == o.code &&
+ sub_category == o.sub_category &&
context == o.context
end
# @see the `==` method
# @param [Object] Object to be compared
@@ -137,10 +134,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [sub_category, message, code, _in, context].hash
+ [message, _in, code, sub_category, context].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
\ No newline at end of file