/* 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 { ConversationEvent } from './ConversationEvent';
import {
    ConversationEventFromJSON,
    ConversationEventFromJSONTyped,
    ConversationEventToJSON,
    ConversationEventToJSONTyped,
} from './ConversationEvent';

/**
 *
 * @export
 * @interface ConversationResponse
 */
export interface ConversationResponse {
    /**
     *
     * @type {Array<ConversationEvent>}
     * @memberof ConversationResponse
     */
    data: Array<ConversationEvent>;
}

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

export function ConversationResponseFromJSON(json: any): ConversationResponse {
    return ConversationResponseFromJSONTyped(json, false);
}

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

        'data': ((json['data'] as Array<any>).map(ConversationEventFromJSON)),
    };
}

export function ConversationResponseToJSON(json: any): ConversationResponse {
    return ConversationResponseToJSONTyped(json, false);
}

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

    return {

        'data': ((value['data'] as Array<any>).map(ConversationEventToJSON)),
    };
}
