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

/**
 * SourceStage Serializer
 * @export
 * @interface PatchedSourceStageRequest
 */
export interface PatchedSourceStageRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedSourceStageRequest
     */
    name?: string;
    /**
     *
     * @type {string}
     * @memberof PatchedSourceStageRequest
     */
    source?: string;
    /**
     * Amount of time a user can take to return from the source to continue the flow (Format: hours=-1;minutes=-2;seconds=-3)
     * @type {string}
     * @memberof PatchedSourceStageRequest
     */
    resumeTimeout?: string;
}

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

export function PatchedSourceStageRequestFromJSON(json: any): PatchedSourceStageRequest {
    return PatchedSourceStageRequestFromJSONTyped(json, false);
}

export function PatchedSourceStageRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedSourceStageRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"] == null ? undefined : json["name"],
        source: json["source"] == null ? undefined : json["source"],
        resumeTimeout: json["resume_timeout"] == null ? undefined : json["resume_timeout"],
    };
}

export function PatchedSourceStageRequestToJSON(json: any): PatchedSourceStageRequest {
    return PatchedSourceStageRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        source: value["source"],
        resume_timeout: value["resumeTimeout"],
    };
}
