class Comet::SwiftDestinationLocation

def from_hash(obj)

Parameters:
  • obj (Hash) -- The complete object as a Ruby hash
def from_hash(obj)
  raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
  obj.each do |k, v|
    case k
    when 'Username'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @username = v
    when 'APIKey'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @apikey = v
    when 'Region'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @region = v
    when 'AuthURL'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @auth_url = v
    when 'Domain'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @domain = v
    when 'Tenant'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @tenant = v
    when 'TenantDomain'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @tenant_domain = v
    when 'TenantID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @tenant_id = v
    when 'TrustID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @trust_id = v
    when 'AuthToken'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @auth_token = v
    when 'Prefix'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @prefix = v
    when 'Container'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @container = v
    when 'DefaultContainerPolicy'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @default_container_policy = v
    else
      @unknown_json_fields[k] = v
    end
  end
end