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

/**
 *
 * @export
 * @interface Connector
 */
export interface Connector {
    /**
     *
     * @type {string}
     * @memberof Connector
     */
    connectorUuid?: string;
    /**
     *
     * @type {string}
     * @memberof Connector
     */
    name: string;
    /**
     *
     * @type {boolean}
     * @memberof Connector
     */
    enabled?: boolean;
    /**
     * Get object component so that we know how to edit the object
     * @type {string}
     * @memberof Connector
     */
    readonly component: string;
    /**
     * Return object's verbose_name
     * @type {string}
     * @memberof Connector
     */
    readonly verboseName: string;
    /**
     * Return object's plural verbose_name
     * @type {string}
     * @memberof Connector
     */
    readonly verboseNamePlural: string;
    /**
     * Return internal model name
     * @type {string}
     * @memberof Connector
     */
    readonly metaModelName: string;
}

/**
 * Check if a given object implements the Connector interface.
 */
export function instanceOfConnector(value: object): value is Connector {
    if (!("name" in value) || value["name"] === undefined) return false;
    if (!("component" in value) || value["component"] === undefined) return false;
    if (!("verboseName" in value) || value["verboseName"] === undefined) return false;
    if (!("verboseNamePlural" in value) || value["verboseNamePlural"] === undefined) return false;
    if (!("metaModelName" in value) || value["metaModelName"] === undefined) return false;
    return true;
}

export function ConnectorFromJSON(json: any): Connector {
    return ConnectorFromJSONTyped(json, false);
}

export function ConnectorFromJSONTyped(json: any, ignoreDiscriminator: boolean): Connector {
    if (json == null) {
        return json;
    }
    return {
        connectorUuid: json["connector_uuid"] == null ? undefined : json["connector_uuid"],
        name: json["name"],
        enabled: json["enabled"] == null ? undefined : json["enabled"],
        component: json["component"],
        verboseName: json["verbose_name"],
        verboseNamePlural: json["verbose_name_plural"],
        metaModelName: json["meta_model_name"],
    };
}

export function ConnectorToJSON(json: any): Connector {
    return ConnectorToJSONTyped(json, false);
}

export function ConnectorToJSONTyped(
    value?: Omit<
        Connector,
        "component" | "verbose_name" | "verbose_name_plural" | "meta_model_name"
    > | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {
        connector_uuid: value["connectorUuid"],
        name: value["name"],
        enabled: value["enabled"],
    };
}
