/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.0-rc1
 * Contact: hello@goauthentik.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

/**
 * SAML Provider Metadata serializer
 * @export
 * @interface SAMLMetadata
 */
export interface SAMLMetadata {
    /**
     *
     * @type {string}
     * @memberof SAMLMetadata
     */
    metadata: string;
    /**
     *
     * @type {string}
     * @memberof SAMLMetadata
     */
    downloadUrl?: string | null;
}

/**
 * Check if a given object implements the SAMLMetadata interface.
 */
export function instanceOfSAMLMetadata(value: object): value is SAMLMetadata {
    if (!("metadata" in value) || value["metadata"] === undefined) return false;
    return true;
}

export function SAMLMetadataFromJSON(json: any): SAMLMetadata {
    return SAMLMetadataFromJSONTyped(json, false);
}

export function SAMLMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLMetadata {
    if (json == null) {
        return json;
    }
    return {
        metadata: json["metadata"],
        downloadUrl: json["download_url"] == null ? undefined : json["download_url"],
    };
}

export function SAMLMetadataToJSON(json: any): SAMLMetadata {
    return SAMLMetadataToJSONTyped(json, false);
}

export function SAMLMetadataToJSONTyped(
    value?: SAMLMetadata | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {
        metadata: value["metadata"],
        download_url: value["downloadUrl"],
    };
}
