1616module Hubspot
1717 module Webhooks
1818 class ErrorCategory
19- attr_accessor :http_status
20-
2119 attr_accessor :name
2220
21+ attr_accessor :http_status
22+
2323 class EnumAttributeValidator
2424 attr_reader :datatype
2525 attr_reader :allowable_values
@@ -45,8 +45,8 @@ def valid?(value)
4545 # Attribute mapping from ruby-style variable name to JSON key.
4646 def self . attribute_map
4747 {
48- :'http_status ' => :'httpStatus ' ,
49- :'name ' => :'name '
48+ :'name ' => :'name ' ,
49+ :'http_status ' => :'httpStatus '
5050 }
5151 end
5252
@@ -58,8 +58,8 @@ def self.acceptable_attributes
5858 # Attribute type mapping.
5959 def self . openapi_types
6060 {
61- :'http_status ' => :'String' ,
62- :'name ' => :'String'
61+ :'name ' => :'String' ,
62+ :'http_status ' => :'String'
6363 }
6464 end
6565
@@ -84,37 +84,37 @@ def initialize(attributes = {})
8484 h [ k . to_sym ] = v
8585 }
8686
87- if attributes . key? ( :'http_status' )
88- self . http_status = attributes [ :'http_status' ]
89- end
90-
9187 if attributes . key? ( :'name' )
9288 self . name = attributes [ :'name' ]
9389 end
90+
91+ if attributes . key? ( :'http_status' )
92+ self . http_status = attributes [ :'http_status' ]
93+ end
9494 end
9595
9696 # Show invalid properties with the reasons. Usually used together with valid?
9797 # @return Array for valid properties with the reasons
9898 def list_invalid_properties
9999 invalid_properties = Array . new
100- if @http_status . nil?
101- invalid_properties . push ( 'invalid value for "http_status", http_status cannot be nil.' )
102- end
103-
104100 if @name . nil?
105101 invalid_properties . push ( 'invalid value for "name", name cannot be nil.' )
106102 end
107103
104+ if @http_status . nil?
105+ invalid_properties . push ( 'invalid value for "http_status", http_status cannot be nil.' )
106+ end
107+
108108 invalid_properties
109109 end
110110
111111 # Check to see if the all the properties in the model are valid
112112 # @return true if the model is valid
113113 def valid?
114+ return false if @name . nil?
114115 return false if @http_status . nil?
115116 http_status_validator = EnumAttributeValidator . new ( 'String' , [ "CONTINUE" , "SWITCHING_PROTOCOLS" , "PROCESSING" , "OK" , "CREATED" , "ACCEPTED" , "NON_AUTHORITATIVE_INFORMATION" , "NO_CONTENT" , "RESET_CONTENT" , "PARTIAL_CONTENT" , "MULTI_STATUS" , "ALREADY_REPORTED" , "IM_USED" , "MULTIPLE_CHOICES" , "MOVED_PERMANENTLY" , "FOUND" , "SEE_OTHER" , "NOT_MODIFIED" , "USE_PROXY" , "TEMPORARY_REDIRECT" , "PERMANENT_REDIRECT" , "BAD_REQUEST" , "UNAUTHORIZED" , "PAYMENT_REQUIRED" , "FORBIDDEN" , "NOT_FOUND" , "METHOD_NOT_ALLOWED" , "NOT_ACCEPTABLE" , "PROXY_AUTHENTICATION_REQUIRED" , "REQUEST_TIMEOUT" , "CONFLICT" , "GONE" , "LENGTH_REQUIRED" , "PRECONDITION_FAILED" , "REQUEST_ENTITY_TOO_LARGE" , "REQUEST_URI_TOO_LONG" , "UNSUPPORTED_MEDIA_TYPE" , "REQUESTED_RANGE_NOT_SATISFIABLE" , "EXPECTATION_FAILED" , "IM_A_TEAPOT" , "MISDIRECTED_REQUEST" , "UNPROCESSABLE_ENTITY" , "LOCKED" , "FAILED_DEPENDENCY" , "UPGRADE_REQUIRED" , "PRECONDITION_REQUIRED" , "TOO_MANY_REQUESTS" , "REQUEST_HEADERS_FIELDS_TOO_LARGE" , "INTERNAL_STALE_SERVICE_DISCOVERY" , "UNAVAILABLE_FOR_LEGAL_REASONS" , "MIGRATION_IN_PROGRESS" , "INTERNAL_SERVER_ERROR" , "NOT_IMPLEMENTED" , "BAD_GATEWAY" , "SERVICE_UNAVAILABLE" , "GATEWAY_TIMEOUT" , "HTTP_VERSION_NOT_SUPPORTED" , "VARIANT_ALSO_NEGOTIATES" , "INSUFFICIENT_STORAGE" , "LOOP_DETECTED" , "NOT_EXTENDED" , "NETWORK_AUTHENTICATION_REQUIRED" ] )
116117 return false unless http_status_validator . valid? ( @http_status )
117- return false if @name . nil?
118118 true
119119 end
120120
@@ -133,8 +133,8 @@ def http_status=(http_status)
133133 def ==( o )
134134 return true if self . equal? ( o )
135135 self . class == o . class &&
136- http_status == o . http_status &&
137- name == o . name
136+ name == o . name &&
137+ http_status == o . http_status
138138 end
139139
140140 # @see the `==` method
@@ -146,7 +146,7 @@ def eql?(o)
146146 # Calculates hash code according to all attributes.
147147 # @return [Integer] Hash code
148148 def hash
149- [ http_status , name ] . hash
149+ [ name , http_status ] . hash
150150 end
151151
152152 # Builds the object from hash
0 commit comments