/* 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 { PermissionScope } from './PermissionScope';
import {
    PermissionScopeFromJSON,
    PermissionScopeFromJSONTyped,
    PermissionScopeToJSON,
    PermissionScopeToJSONTyped,
} from './PermissionScope';

/**
 * 
 * @export
 * @interface PermissionDto
 */
export interface PermissionDto {
    /**
     * 
     * @type {ModuleType}
     * @memberof PermissionDto
     */
    module?: ModuleType;
    /**
     * 
     * @type {PermissionAction}
     * @memberof PermissionDto
     */
    action?: PermissionAction;
    /**
     * 
     * @type {PermissionScope}
     * @memberof PermissionDto
     */
    scope?: PermissionScope;
}



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

export function PermissionDtoFromJSON(json: any): PermissionDto {
    return PermissionDtoFromJSONTyped(json, false);
}

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

export function PermissionDtoToJSON(json: any): PermissionDto {
    return PermissionDtoToJSONTyped(json, false);
}

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

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

