lib/hubspot/codegen/cms/blogs/blog_posts/models/standard_error.rb in hubspot-api-client-17.2.0 vs lib/hubspot/codegen/cms/blogs/blog_posts/models/standard_error.rb in hubspot-api-client-18.0.0
- old
+ new
@@ -1,7 +1,7 @@
=begin
-#Blog Post endpoints
+#Posts
#Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags
The version of the OpenAPI document: v3
@@ -17,45 +17,45 @@
module Cms
module Blogs
module BlogPosts
# Model definition for a standard error.
class StandardError
- # Error status.
- attr_accessor :status
+ # Error subcategory.
+ attr_accessor :sub_category
+ # Error context.
+ attr_accessor :context
+
+ # Error links.
+ attr_accessor :links
+
# Error ID.
attr_accessor :id
- # Model definition for an error category.
+ # Error category.
attr_accessor :category
- # Error subcategory.
- attr_accessor :sub_category
-
# Error message.
attr_accessor :message
# List of error details.
attr_accessor :errors
- # Error context.
- attr_accessor :context
+ # Error status.
+ attr_accessor :status
- # Error links.
- attr_accessor :links
-
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
- :'status' => :'status',
+ :'sub_category' => :'subCategory',
+ :'context' => :'context',
+ :'links' => :'links',
:'id' => :'id',
:'category' => :'category',
- :'sub_category' => :'subCategory',
:'message' => :'message',
:'errors' => :'errors',
- :'context' => :'context',
- :'links' => :'links'
+ :'status' => :'status'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -63,18 +63,18 @@
end
# Attribute type mapping.
def self.openapi_types
{
- :'status' => :'String',
- :'id' => :'String',
- :'category' => :'Object',
:'sub_category' => :'Object',
+ :'context' => :'Hash<String, Array<String>>',
+ :'links' => :'Hash<String, String>',
+ :'id' => :'String',
+ :'category' => :'String',
:'message' => :'String',
:'errors' => :'Array<ErrorDetail>',
- :'context' => :'Hash<String, Array<String>>',
- :'links' => :'Hash<String, String>'
+ :'status' => :'String'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -95,57 +95,61 @@
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::Blogs::BlogPosts::StandardError`. 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?(:'status')
- self.status = attributes[:'status']
+ 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
+ end
+ end
+
+ if attributes.key?(:'links')
+ if (value = attributes[:'links']).is_a?(Hash)
+ self.links = value
+ end
+ end
+
if attributes.key?(:'id')
self.id = attributes[:'id']
end
if attributes.key?(:'category')
self.category = attributes[:'category']
end
- if attributes.key?(:'sub_category')
- self.sub_category = attributes[:'sub_category']
- end
-
if attributes.key?(:'message')
self.message = attributes[:'message']
end
if attributes.key?(:'errors')
if (value = attributes[:'errors']).is_a?(Array)
self.errors = value
end
end
- if attributes.key?(:'context')
- if (value = attributes[:'context']).is_a?(Hash)
- self.context = value
- end
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
end
-
- if attributes.key?(:'links')
- if (value = attributes[:'links']).is_a?(Hash)
- self.links = value
- end
- end
end
# 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 @status.nil?
- invalid_properties.push('invalid value for "status", status cannot be nil.')
+ if @context.nil?
+ invalid_properties.push('invalid value for "context", context cannot be nil.')
end
+ if @links.nil?
+ invalid_properties.push('invalid value for "links", links cannot be nil.')
+ end
+
if @category.nil?
invalid_properties.push('invalid value for "category", category cannot be nil.')
end
if @message.nil?
@@ -154,46 +158,42 @@
if @errors.nil?
invalid_properties.push('invalid value for "errors", errors cannot be nil.')
end
- if @context.nil?
- invalid_properties.push('invalid value for "context", context cannot be nil.')
+ if @status.nil?
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
end
- if @links.nil?
- invalid_properties.push('invalid value for "links", links 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 @status.nil?
+ return false if @context.nil?
+ return false if @links.nil?
return false if @category.nil?
return false if @message.nil?
return false if @errors.nil?
- return false if @context.nil?
- return false if @links.nil?
+ return false if @status.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 &&
- status == o.status &&
+ sub_category == o.sub_category &&
+ context == o.context &&
+ links == o.links &&
id == o.id &&
category == o.category &&
- sub_category == o.sub_category &&
message == o.message &&
errors == o.errors &&
- context == o.context &&
- links == o.links
+ status == o.status
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -201,10 +201,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [status, id, category, sub_category, message, errors, context, links].hash
+ [sub_category, context, links, id, category, message, errors, status].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself