/* 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.
 */

/**
 * ConnectionToken Serializer
 * @export
 * @interface ConnectionTokenRequest
 */
export interface ConnectionTokenRequest {
    /**
     *
     * @type {string}
     * @memberof ConnectionTokenRequest
     */
    pk?: string;
    /**
     *
     * @type {number}
     * @memberof ConnectionTokenRequest
     */
    provider: number;
    /**
     *
     * @type {string}
     * @memberof ConnectionTokenRequest
     */
    endpoint: string;
}

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

export function ConnectionTokenRequestFromJSON(json: any): ConnectionTokenRequest {
    return ConnectionTokenRequestFromJSONTyped(json, false);
}

export function ConnectionTokenRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): ConnectionTokenRequest {
    if (json == null) {
        return json;
    }
    return {
        pk: json["pk"] == null ? undefined : json["pk"],
        provider: json["provider"],
        endpoint: json["endpoint"],
    };
}

export function ConnectionTokenRequestToJSON(json: any): ConnectionTokenRequest {
    return ConnectionTokenRequestToJSONTyped(json, false);
}

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

    return {
        pk: value["pk"],
        provider: value["provider"],
        endpoint: value["endpoint"],
    };
}
