class Comet::OidcConfig

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 'DisplayName'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @display_name = v
    when 'Hosts'
      if v.nil?
        @hosts = []
      else
        @hosts = Array.new(v.length)
        v.each_with_index do |v1, i1|
          raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
          @hosts[i1] = v1
        end
      end
    when 'OrganizationID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @organization_id = v
    when 'Provider'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @provider = v
    when 'ClientID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @client_id = v
    when 'ClientSecret'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @client_secret = v
    when 'SkipMFA'
      @skip_mfa = v
    when 'Scopes'
      if v.nil?
        @scopes = []
      else
        @scopes = Array.new(v.length)
        v.each_with_index do |v1, i1|
          raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
          @scopes[i1] = v1
        end
      end
    when 'RequiredClaims'
      if v.nil?
        @required_claims = []
      else
        @required_claims = Array.new(v.length)
        v.each_with_index do |v1, i1|
          @required_claims[i1] = Comet::OidcClaim.new
          @required_claims[i1].from_hash(v1)
        end
      end
    when 'DiscoveryDocumentURL'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @generic_op_discovery_document_url = v
    when 'AzureTenantID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @azure_adv2op_tenant_id = v
    when 'GoogleHostedDomain'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @google_op_hosted_domain = v
    else
      @unknown_json_fields[k] = v
    end
  end
end