/* 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 AddUserPermissionOverrideRequest
 */
export interface AddUserPermissionOverrideRequest {
    /**
     * 
     * @type {ModuleType}
     * @memberof AddUserPermissionOverrideRequest
     */
    module?: ModuleType;
    /**
     * 
     * @type {PermissionAction}
     * @memberof AddUserPermissionOverrideRequest
     */
    action?: PermissionAction;
    /**
     * 
     * @type {PermissionEffect}
     * @memberof AddUserPermissionOverrideRequest
     */
    effect?: PermissionEffect;
    /**
     * 
     * @type {PermissionScope}
     * @memberof AddUserPermissionOverrideRequest
     */
    scope?: PermissionScope;
}



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

export function AddUserPermissionOverrideRequestFromJSON(json: any): AddUserPermissionOverrideRequest {
    return AddUserPermissionOverrideRequestFromJSONTyped(json, false);
}

export function AddUserPermissionOverrideRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddUserPermissionOverrideRequest {
    if (json == null) {
        return json;
    }
    return {
        
        '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 AddUserPermissionOverrideRequestToJSON(json: any): AddUserPermissionOverrideRequest {
    return AddUserPermissionOverrideRequestToJSONTyped(json, false);
}

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

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

