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

/**
 * GoogleChromeConnector Serializer
 * @export
 * @interface GoogleChromeConnector
 */
export interface GoogleChromeConnector {
    /**
     *
     * @type {string}
     * @memberof GoogleChromeConnector
     */
    connectorUuid?: string;
    /**
     *
     * @type {string}
     * @memberof GoogleChromeConnector
     */
    name: string;
    /**
     *
     * @type {boolean}
     * @memberof GoogleChromeConnector
     */
    enabled?: boolean;
    /**
     * Get object component so that we know how to edit the object
     * @type {string}
     * @memberof GoogleChromeConnector
     */
    readonly component: string;
    /**
     * Return object's verbose_name
     * @type {string}
     * @memberof GoogleChromeConnector
     */
    readonly verboseName: string;
    /**
     * Return object's plural verbose_name
     * @type {string}
     * @memberof GoogleChromeConnector
     */
    readonly verboseNamePlural: string;
    /**
     * Return internal model name
     * @type {string}
     * @memberof GoogleChromeConnector
     */
    readonly metaModelName: string;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof GoogleChromeConnector
     */
    credentials: { [key: string]: any };
    /**
     * Full URL to be used in Google Workspace configuration
     * @type {string}
     * @memberof GoogleChromeConnector
     */
    readonly chromeUrl: string | null;
}

/**
 * Check if a given object implements the GoogleChromeConnector interface.
 */
export function instanceOfGoogleChromeConnector(value: object): value is GoogleChromeConnector {
    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;
    if (!("credentials" in value) || value["credentials"] === undefined) return false;
    if (!("chromeUrl" in value) || value["chromeUrl"] === undefined) return false;
    return true;
}

export function GoogleChromeConnectorFromJSON(json: any): GoogleChromeConnector {
    return GoogleChromeConnectorFromJSONTyped(json, false);
}

export function GoogleChromeConnectorFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): GoogleChromeConnector {
    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"],
        credentials: json["credentials"],
        chromeUrl: json["chrome_url"],
    };
}

export function GoogleChromeConnectorToJSON(json: any): GoogleChromeConnector {
    return GoogleChromeConnectorToJSONTyped(json, false);
}

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

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