/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.3
 * 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
 */
export const GrantTypesEnum = {
    AuthorizationCode: "authorization_code",
    Implicit: "implicit",
    Hybrid: "hybrid",
    RefreshToken: "refresh_token",
    ClientCredentials: "client_credentials",
    Password: "password",
    UrnIetfParamsOauthGrantTypeDeviceCode: "urn:ietf:params:oauth:grant-type:device_code",
    UnknownDefaultOpenApi: "11184809",
} as const;
export type GrantTypesEnum = (typeof GrantTypesEnum)[keyof typeof GrantTypesEnum];

export function instanceOfGrantTypesEnum(value: any): boolean {
    for (const key in GrantTypesEnum) {
        if (Object.prototype.hasOwnProperty.call(GrantTypesEnum, key)) {
            if (GrantTypesEnum[key as keyof typeof GrantTypesEnum] === value) {
                return true;
            }
        }
    }
    return false;
}

export function GrantTypesEnumFromJSON(json: any): GrantTypesEnum {
    return GrantTypesEnumFromJSONTyped(json, false);
}

export function GrantTypesEnumFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): GrantTypesEnum {
    return json as GrantTypesEnum;
}

export function GrantTypesEnumToJSON(value?: GrantTypesEnum | null): any {
    return value as any;
}

export function GrantTypesEnumToJSONTyped(
    value: any,
    ignoreDiscriminator: boolean,
): GrantTypesEnum {
    return value as GrantTypesEnum;
}
