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

/**
 *
 * @export
 * @interface UserSelfRoles
 */
export interface UserSelfRoles {
    /**
     *
     * @type {string}
     * @memberof UserSelfRoles
     */
    readonly name: string;
    /**
     *
     * @type {string}
     * @memberof UserSelfRoles
     */
    readonly pk: string;
}

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

export function UserSelfRolesFromJSON(json: any): UserSelfRoles {
    return UserSelfRolesFromJSONTyped(json, false);
}

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

export function UserSelfRolesToJSON(json: any): UserSelfRoles {
    return UserSelfRolesToJSONTyped(json, false);
}

export function UserSelfRolesToJSONTyped(
    value?: Omit<UserSelfRoles, "name" | "pk"> | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {};
}
