/* 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 DecideApprovalResponseData
 */
export interface DecideApprovalResponseData {
    /**
     *
     * @type {boolean}
     * @memberof DecideApprovalResponseData
     */
    success: boolean;
    /**
     * Error message if failed
     * @type {string}
     * @memberof DecideApprovalResponseData
     */
    error?: string;
}

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

export function DecideApprovalResponseDataFromJSON(json: any): DecideApprovalResponseData {
    return DecideApprovalResponseDataFromJSONTyped(json, false);
}

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

        'success': json['success'],
        'error': json['error'] == null ? undefined : json['error'],
    };
}

export function DecideApprovalResponseDataToJSON(json: any): DecideApprovalResponseData {
    return DecideApprovalResponseDataToJSONTyped(json, false);
}

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

    return {

        'success': value['success'],
        'error': value['error'],
    };
}
