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

/**
 * Role serializer
 * @export
 * @interface RoleRequest
 */
export interface RoleRequest {
    /**
     *
     * @type {string}
     * @memberof RoleRequest
     */
    name: string;
}

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

export function RoleRequestFromJSON(json: any): RoleRequest {
    return RoleRequestFromJSONTyped(json, false);
}

export function RoleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
    };
}

export function RoleRequestToJSON(json: any): RoleRequest {
    return RoleRequestToJSONTyped(json, false);
}

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

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