/* tslint:disable */
/* eslint-disable */
/**
 * OmsorgCore.Api
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from '../runtime';
import type { ModuleType } from './ModuleType';
import {
    ModuleTypeFromJSON,
    ModuleTypeFromJSONTyped,
    ModuleTypeToJSON,
    ModuleTypeToJSONTyped,
} from './ModuleType';
import type { PermissionAction } from './PermissionAction';
import {
    PermissionActionFromJSON,
    PermissionActionFromJSONTyped,
    PermissionActionToJSON,
    PermissionActionToJSONTyped,
} from './PermissionAction';
import type { PermissionEffect } from './PermissionEffect';
import {
    PermissionEffectFromJSON,
    PermissionEffectFromJSONTyped,
    PermissionEffectToJSON,
    PermissionEffectToJSONTyped,
} from './PermissionEffect';
import type { PermissionScope } from './PermissionScope';
import {
    PermissionScopeFromJSON,
    PermissionScopeFromJSONTyped,
    PermissionScopeToJSON,
    PermissionScopeToJSONTyped,
} from './PermissionScope';

/**
 * 
 * @export
 * @interface UserPermissionOverrideResponse
 */
export interface UserPermissionOverrideResponse {
    /**
     * 
     * @type {string}
     * @memberof UserPermissionOverrideResponse
     */
    id?: string;
    /**
     * 
     * @type {ModuleType}
     * @memberof UserPermissionOverrideResponse
     */
    module?: ModuleType;
    /**
     * 
     * @type {PermissionAction}
     * @memberof UserPermissionOverrideResponse
     */
    action?: PermissionAction;
    /**
     * 
     * @type {PermissionEffect}
     * @memberof UserPermissionOverrideResponse
     */
    effect?: PermissionEffect;
    /**
     * 
     * @type {PermissionScope}
     * @memberof UserPermissionOverrideResponse
     */
    scope?: PermissionScope;
}



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

export function UserPermissionOverrideResponseFromJSON(json: any): UserPermissionOverrideResponse {
    return UserPermissionOverrideResponseFromJSONTyped(json, false);
}

export function UserPermissionOverrideResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPermissionOverrideResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'] == null ? undefined : json['id'],
        'module': json['module'] == null ? undefined : ModuleTypeFromJSON(json['module']),
        'action': json['action'] == null ? undefined : PermissionActionFromJSON(json['action']),
        'effect': json['effect'] == null ? undefined : PermissionEffectFromJSON(json['effect']),
        'scope': json['scope'] == null ? undefined : PermissionScopeFromJSON(json['scope']),
    };
}

export function UserPermissionOverrideResponseToJSON(json: any): UserPermissionOverrideResponse {
    return UserPermissionOverrideResponseToJSONTyped(json, false);
}

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

    return {
        
        'id': value['id'],
        'module': ModuleTypeToJSON(value['module']),
        'action': PermissionActionToJSON(value['action']),
        'effect': PermissionEffectToJSON(value['effect']),
        'scope': PermissionScopeToJSON(value['scope']),
    };
}

