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

/**
 * InitialPermissions serializer
 * @export
 * @interface PatchedInitialPermissionsRequest
 */
export interface PatchedInitialPermissionsRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedInitialPermissionsRequest
     */
    name?: string;
    /**
     *
     * @type {string}
     * @memberof PatchedInitialPermissionsRequest
     */
    role?: string;
    /**
     *
     * @type {Array<number>}
     * @memberof PatchedInitialPermissionsRequest
     */
    permissions?: Array<number>;
}

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

export function PatchedInitialPermissionsRequestFromJSON(
    json: any,
): PatchedInitialPermissionsRequest {
    return PatchedInitialPermissionsRequestFromJSONTyped(json, false);
}

export function PatchedInitialPermissionsRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedInitialPermissionsRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"] == null ? undefined : json["name"],
        role: json["role"] == null ? undefined : json["role"],
        permissions: json["permissions"] == null ? undefined : json["permissions"],
    };
}

export function PatchedInitialPermissionsRequestToJSON(
    json: any,
): PatchedInitialPermissionsRequest {
    return PatchedInitialPermissionsRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        role: value["role"],
        permissions: value["permissions"],
    };
}
