class Comet::RemoteServerAddress

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 'Type'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @type = v
    when 'Description'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @description = v
    when 'RemoteAddress'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @remote_address = v
    when 'Username'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @username = v
    when 'Password'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @password = v
    when 'LDAP'
      @ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
      @ldap.from_hash(v)
    when 'OIDC'
      @oidc = Comet::OidcConfig.new
      @oidc.from_hash(v)
    when 'B2'
      @b2 = Comet::B2VirtualStorageRoleSettings.new
      @b2.from_hash(v)
    when 'Wasabi'
      @wasabi = Comet::WasabiVirtualStorageRoleSettings.new
      @wasabi.from_hash(v)
    when 'Custom'
      @custom = Comet::CustomRemoteBucketSettings.new
      @custom.from_hash(v)
    when 'S3'
      @s3 = Comet::S3GenericVirtualStorageRole.new
      @s3.from_hash(v)
    when 'AWS'
      @aws = Comet::AmazonAWSVirtualStorageRoleSettings.new
      @aws.from_hash(v)
    when 'Storj'
      @storj = Comet::StorjVirtualStorageRoleSetting.new
      @storj.from_hash(v)
    when 'ImpPartner'
      @imp_partner = Comet::ImpossibleCloudPartnerTemplateSettings.new
      @imp_partner.from_hash(v)
    when 'ImpUser'
      @imp_user = Comet::ImpossibleCloudIAMTemplateSettings.new
      @imp_user.from_hash(v)
    else
      @unknown_json_fields[k] = v
    end
  end
end