lib/cloudsmith-api/models/status_basic.rb in cloudsmith-api-1.142.3 vs lib/cloudsmith-api/models/status_basic.rb in cloudsmith-api-2.0.0
- old
+ new
@@ -1,7 +1,7 @@
=begin
-#Cloudsmith API
+#Cloudsmith API (v1)
#The API to the Cloudsmith Service
OpenAPI spec version: v1
Contact: support@cloudsmith.io
@@ -11,84 +11,88 @@
=end
require 'date'
module CloudsmithApi
- class StatusBasic
- # The message describing the state of the API.
- attr_accessor :detail
+class StatusBasic
+ # The message describing the state of the API.
+ attr_accessor :detail
- # The current version for the Cloudsmith service.
- attr_accessor :version
+ # The current version for the Cloudsmith service.
+ attr_accessor :version
- # Attribute mapping from ruby-style variable name to JSON key.
- def self.attribute_map
- {
- :'detail' => :'detail',
- :'version' => :'version'
- }
- end
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'detail' => :'detail',
+ :'version' => :'version'
+ }
+ end
- # Attribute type mapping.
- def self.swagger_types
- {
- :'detail' => :'String',
- :'version' => :'String'
- }
- end
+ # Attribute type mapping.
+ def self.swagger_types
+ {
+ :'detail' => :'String',
+ :'version' => :'String'
+ }
+ end
- # Initializes the object
- # @param [Hash] attributes Model attributes in the form of hash
- def initialize(attributes = {})
- return unless attributes.is_a?(Hash)
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ return unless attributes.is_a?(Hash)
- # convert string to symbol for hash key
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
+ # convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
- if attributes.has_key?(:'detail')
- self.detail = attributes[:'detail']
- end
-
- if attributes.has_key?(:'version')
- self.version = attributes[:'version']
- end
+ if attributes.has_key?(:'detail')
+ self.detail = attributes[:'detail']
+ else
+ self.detail = 'Cloudsmith API is operational.'
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
- invalid_properties
+ if attributes.has_key?(:'version')
+ self.version = attributes[:'version']
+ else
+ self.version = '1.183.1'
end
+ end
- # Check to see if the all the properties in the model are valid
- # @return true if the model is valid
- def valid?
- true
- 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
+ invalid_properties
+ 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 &&
- detail == o.detail &&
- version == o.version
- end
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
- # @see the `==` method
- # @param [Object] Object to be compared
- def eql?(o)
- self == o
- 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 &&
+ detail == o.detail &&
+ version == o.version
+ end
- # Calculates hash code according to all attributes.
- # @return [Fixnum] Hash code
- def hash
- [detail, version].hash
- end
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+ # Calculates hash code according to all attributes.
+ # @return [Fixnum] Hash code
+ def hash
+ [detail, version].hash
+ end
+
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)
@@ -189,7 +193,7 @@
else
value
end
end
- end
+end
end