/* 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 CreateApprovalRequest
 */
export interface CreateApprovalRequest {
    /**
     * Run ID for the approval
     * @type {string}
     * @memberof CreateApprovalRequest
     */
    runId: string;
    /**
     * Name of the tool requesting approval
     * @type {string}
     * @memberof CreateApprovalRequest
     */
    toolName: string;
    /**
     * Tool input parameters
     * @type {{ [key: string]: any; }}
     * @memberof CreateApprovalRequest
     */
    toolInput: { [key: string]: any; };
}

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

export function CreateApprovalRequestFromJSON(json: any): CreateApprovalRequest {
    return CreateApprovalRequestFromJSONTyped(json, false);
}

export function CreateApprovalRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateApprovalRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'runId': json['run_id'],
        'toolName': json['tool_name'],
        'toolInput': json['tool_input'],
    };
}

export function CreateApprovalRequestToJSON(json: any): CreateApprovalRequest {
    return CreateApprovalRequestToJSONTyped(json, false);
}

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

    return {
        
        'run_id': value['runId'],
        'tool_name': value['toolName'],
        'tool_input': value['toolInput'],
    };
}

