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

/**
 * Types of an object that can be created
 * @export
 * @interface TypeCreate
 */
export interface TypeCreate {
    /**
     *
     * @type {string}
     * @memberof TypeCreate
     */
    name: string;
    /**
     *
     * @type {string}
     * @memberof TypeCreate
     */
    description: string;
    /**
     *
     * @type {string}
     * @memberof TypeCreate
     */
    component: string;
    /**
     *
     * @type {string}
     * @memberof TypeCreate
     */
    modelName: string;
    /**
     *
     * @type {string}
     * @memberof TypeCreate
     */
    iconUrl?: string;
    /**
     *
     * @type {boolean}
     * @memberof TypeCreate
     */
    requiresEnterprise?: boolean;
    /**
     *
     * @type {boolean}
     * @memberof TypeCreate
     */
    deprecated?: boolean;
}

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

export function TypeCreateFromJSON(json: any): TypeCreate {
    return TypeCreateFromJSONTyped(json, false);
}

export function TypeCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): TypeCreate {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        description: json["description"],
        component: json["component"],
        modelName: json["model_name"],
        iconUrl: json["icon_url"] == null ? undefined : json["icon_url"],
        requiresEnterprise:
            json["requires_enterprise"] == null ? undefined : json["requires_enterprise"],
        deprecated: json["deprecated"] == null ? undefined : json["deprecated"],
    };
}

export function TypeCreateToJSON(json: any): TypeCreate {
    return TypeCreateToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        description: value["description"],
        component: value["component"],
        model_name: value["modelName"],
        icon_url: value["iconUrl"],
        requires_enterprise: value["requiresEnterprise"],
        deprecated: value["deprecated"],
    };
}
