/* 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 PatchedConnectionTokenRequest
 */
export interface PatchedConnectionTokenRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedConnectionTokenRequest
     */
    pk?: string;
    /**
     *
     * @type {number}
     * @memberof PatchedConnectionTokenRequest
     */
    provider?: number;
    /**
     *
     * @type {string}
     * @memberof PatchedConnectionTokenRequest
     */
    endpoint?: string;
}

/**
 * Check if a given object implements the PatchedConnectionTokenRequest interface.
 */
export function instanceOfPatchedConnectionTokenRequest(
    value: object,
): value is PatchedConnectionTokenRequest {
    return true;
}

export function PatchedConnectionTokenRequestFromJSON(json: any): PatchedConnectionTokenRequest {
    return PatchedConnectionTokenRequestFromJSONTyped(json, false);
}

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

export function PatchedConnectionTokenRequestToJSON(json: any): PatchedConnectionTokenRequest {
    return PatchedConnectionTokenRequestToJSONTyped(json, false);
}

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

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