/* 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 PatchedEndpointStageRequest
 */
export interface PatchedEndpointStageRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedEndpointStageRequest
     */
    name?: string;
    /**
     *
     * @type {string}
     * @memberof PatchedEndpointStageRequest
     */
    connector?: string;
    /**
     *
     * @type {StageModeEnum}
     * @memberof PatchedEndpointStageRequest
     */
    mode?: StageModeEnum;
}

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

export function PatchedEndpointStageRequestFromJSON(json: any): PatchedEndpointStageRequest {
    return PatchedEndpointStageRequestFromJSONTyped(json, false);
}

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

export function PatchedEndpointStageRequestToJSON(json: any): PatchedEndpointStageRequest {
    return PatchedEndpointStageRequestToJSONTyped(json, false);
}

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

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