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

import type { StageModeEnum } from "./StageModeEnum";
import { StageModeEnumFromJSON, StageModeEnumToJSON } from "./StageModeEnum";

/**
 * EndpointStage Serializer
 * @export
 * @interface EndpointStageRequest
 */
export interface EndpointStageRequest {
    /**
     *
     * @type {string}
     * @memberof EndpointStageRequest
     */
    name: string;
    /**
     *
     * @type {string}
     * @memberof EndpointStageRequest
     */
    connector: string;
    /**
     *
     * @type {StageModeEnum}
     * @memberof EndpointStageRequest
     */
    mode?: StageModeEnum;
}

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

export function EndpointStageRequestFromJSON(json: any): EndpointStageRequest {
    return EndpointStageRequestFromJSONTyped(json, false);
}

export function EndpointStageRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): EndpointStageRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        connector: json["connector"],
        mode: json["mode"] == null ? undefined : StageModeEnumFromJSON(json["mode"]),
    };
}

export function EndpointStageRequestToJSON(json: any): EndpointStageRequest {
    return EndpointStageRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        connector: value["connector"],
        mode: StageModeEnumToJSON(value["mode"]),
    };
}
