class SwaggerClient::AppDetailsDto
Attributes
True, when emails are allowed.
True, when SMS are allowed.
The api keys.
The confirm URL.
The contributors.
The statistics counters.
The sender email address.
The sender email name.
The firebase credentials.
The firebase project ID.
The id of the app.
The supported languages.
The app name.
The current role.
The webhook URL.
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/swagger_client/models/app_details_dto.rb, line 64 def self.attribute_map { :'id' => :'id', :'name' => :'name', :'role' => :'role', :'languages' => :'languages', :'email_address' => :'emailAddress', :'email_name' => :'emailName', :'firebase_project' => :'firebaseProject', :'firebase_credential' => :'firebaseCredential', :'webhook_url' => :'webhookUrl', :'confirm_url' => :'confirmUrl', :'allow_email' => :'allowEmail', :'allow_sms' => :'allowSms', :'email_verification_status' => :'emailVerificationStatus', :'api_keys' => :'apiKeys', :'contributors' => :'contributors', :'counters' => :'counters' } end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/swagger_client/models/app_details_dto.rb, line 302 def self.build_from_hash(attributes) new.build_from_hash(attributes) end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/swagger_client/models/app_details_dto.rb, line 115 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::AppDetailsDto` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::AppDetailsDto`. 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?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'role') self.role = attributes[:'role'] end if attributes.key?(:'languages') if (value = attributes[:'languages']).is_a?(Array) self.languages = value end end if attributes.key?(:'email_address') self.email_address = attributes[:'email_address'] end if attributes.key?(:'email_name') self.email_name = attributes[:'email_name'] end if attributes.key?(:'firebase_project') self.firebase_project = attributes[:'firebase_project'] end if attributes.key?(:'firebase_credential') self.firebase_credential = attributes[:'firebase_credential'] end if attributes.key?(:'webhook_url') self.webhook_url = attributes[:'webhook_url'] end if attributes.key?(:'confirm_url') self.confirm_url = attributes[:'confirm_url'] end if attributes.key?(:'allow_email') self.allow_email = attributes[:'allow_email'] end if attributes.key?(:'allow_sms') self.allow_sms = attributes[:'allow_sms'] end if attributes.key?(:'email_verification_status') self.email_verification_status = attributes[:'email_verification_status'] end if attributes.key?(:'api_keys') if (value = attributes[:'api_keys']).is_a?(Hash) self.api_keys = value end end if attributes.key?(:'contributors') if (value = attributes[:'contributors']).is_a?(Array) self.contributors = value end end if attributes.key?(:'counters') if (value = attributes[:'counters']).is_a?(Hash) self.counters = value end end end
List of attributes with nullable: true
# File lib/swagger_client/models/app_details_dto.rb, line 108 def self.openapi_nullable Set.new([ ]) end
Attribute type mapping.
# File lib/swagger_client/models/app_details_dto.rb, line 86 def self.openapi_types { :'id' => :'Object', :'name' => :'Object', :'role' => :'Object', :'languages' => :'Object', :'email_address' => :'Object', :'email_name' => :'Object', :'firebase_project' => :'Object', :'firebase_credential' => :'Object', :'webhook_url' => :'Object', :'confirm_url' => :'Object', :'allow_email' => :'Object', :'allow_sms' => :'Object', :'email_verification_status' => :'Object', :'api_keys' => :'Object', :'contributors' => :'Object', :'counters' => :'Object' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/swagger_client/models/app_details_dto.rb, line 266 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && name == o.name && role == o.role && languages == o.languages && email_address == o.email_address && email_name == o.email_name && firebase_project == o.firebase_project && firebase_credential == o.firebase_credential && webhook_url == o.webhook_url && confirm_url == o.confirm_url && allow_email == o.allow_email && allow_sms == o.allow_sms && email_verification_status == o.email_verification_status && api_keys == o.api_keys && contributors == o.contributors && counters == o.counters end
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# File lib/swagger_client/models/app_details_dto.rb, line 332 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model SwaggerClient.const_get(type).build_from_hash(value) end end
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/swagger_client/models/app_details_dto.rb, line 401 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/swagger_client/models/app_details_dto.rb, line 309 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end
@see the `==` method @param [Object] Object to be compared
# File lib/swagger_client/models/app_details_dto.rb, line 289 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Integer] Hash code
# File lib/swagger_client/models/app_details_dto.rb, line 295 def hash [id, name, role, languages, email_address, email_name, firebase_project, firebase_credential, webhook_url, confirm_url, allow_email, allow_sms, email_verification_status, api_keys, contributors, counters].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/swagger_client/models/app_details_dto.rb, line 203 def list_invalid_properties invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @role.nil? invalid_properties.push('invalid value for "role", role cannot be nil.') end if @languages.nil? invalid_properties.push('invalid value for "languages", languages cannot be nil.') end if @allow_email.nil? invalid_properties.push('invalid value for "allow_email", allow_email cannot be nil.') end if @allow_sms.nil? invalid_properties.push('invalid value for "allow_sms", allow_sms cannot be nil.') end if @email_verification_status.nil? invalid_properties.push('invalid value for "email_verification_status", email_verification_status cannot be nil.') end if @api_keys.nil? invalid_properties.push('invalid value for "api_keys", api_keys cannot be nil.') end if @contributors.nil? invalid_properties.push('invalid value for "contributors", contributors cannot be nil.') end if @counters.nil? invalid_properties.push('invalid value for "counters", counters cannot be nil.') end invalid_properties end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/swagger_client/models/app_details_dto.rb, line 383 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end
Returns the string representation of the object @return [String] String presentation of the object
# File lib/swagger_client/models/app_details_dto.rb, line 371 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/swagger_client/models/app_details_dto.rb, line 250 def valid? return false if @id.nil? return false if @name.nil? return false if @role.nil? return false if @languages.nil? return false if @allow_email.nil? return false if @allow_sms.nil? return false if @email_verification_status.nil? return false if @api_keys.nil? return false if @contributors.nil? return false if @counters.nil? true end