/* tslint:disable */
/* eslint-disable */
/**
 * HumanLayer Daemon REST API
 * REST API for HumanLayer daemon operations, providing session management, approval workflows, and real-time event streaming capabilities. 
 *
 * The version of the OpenAPI document: 1.0.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';
/**
 * 
 * @export
 * @interface DecideApprovalRequest
 */
export interface DecideApprovalRequest {
    /**
     * Approval decision
     * @type {string}
     * @memberof DecideApprovalRequest
     */
    decision: DecideApprovalRequestDecisionEnum;
    /**
     * Optional comment (required for deny)
     * @type {string}
     * @memberof DecideApprovalRequest
     */
    comment?: string;
}


/**
 * @export
 */
export const DecideApprovalRequestDecisionEnum = {
    Approve: 'approve',
    Deny: 'deny'
} as const;
export type DecideApprovalRequestDecisionEnum = typeof DecideApprovalRequestDecisionEnum[keyof typeof DecideApprovalRequestDecisionEnum];


/**
 * Check if a given object implements the DecideApprovalRequest interface.
 */
export function instanceOfDecideApprovalRequest(value: object): value is DecideApprovalRequest {
    if (!('decision' in value) || value['decision'] === undefined) return false;
    return true;
}

export function DecideApprovalRequestFromJSON(json: any): DecideApprovalRequest {
    return DecideApprovalRequestFromJSONTyped(json, false);
}

export function DecideApprovalRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DecideApprovalRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'decision': json['decision'],
        'comment': json['comment'] == null ? undefined : json['comment'],
    };
}

export function DecideApprovalRequestToJSON(json: any): DecideApprovalRequest {
    return DecideApprovalRequestToJSONTyped(json, false);
}

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

    return {
        
        'decision': value['decision'],
        'comment': value['comment'],
    };
}

