/* 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';
import type { Approval } from './Approval';
import {
    ApprovalFromJSON,
    ApprovalFromJSONTyped,
    ApprovalToJSON,
    ApprovalToJSONTyped,
} from './Approval';

/**
 *
 * @export
 * @interface ApprovalResponse
 */
export interface ApprovalResponse {
    /**
     *
     * @type {Approval}
     * @memberof ApprovalResponse
     */
    data: Approval;
}

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

export function ApprovalResponseFromJSON(json: any): ApprovalResponse {
    return ApprovalResponseFromJSONTyped(json, false);
}

export function ApprovalResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApprovalResponse {
    if (json == null) {
        return json;
    }
    return {

        'data': ApprovalFromJSON(json['data']),
    };
}

export function ApprovalResponseToJSON(json: any): ApprovalResponse {
    return ApprovalResponseToJSONTyped(json, false);
}

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

    return {

        'data': ApprovalToJSON(value['data']),
    };
}
