/* 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 { Session } from './Session';
import {
    SessionFromJSON,
    SessionFromJSONTyped,
    SessionToJSON,
    SessionToJSONTyped,
} from './Session';

/**
 * 
 * @export
 * @interface SessionSearchResponse
 */
export interface SessionSearchResponse {
    /**
     * 
     * @type {Array<Session>}
     * @memberof SessionSearchResponse
     */
    data: Array<Session>;
}

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

export function SessionSearchResponseFromJSON(json: any): SessionSearchResponse {
    return SessionSearchResponseFromJSONTyped(json, false);
}

export function SessionSearchResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SessionSearchResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'data': ((json['data'] as Array<any>).map(SessionFromJSON)),
    };
}

export function SessionSearchResponseToJSON(json: any): SessionSearchResponse {
    return SessionSearchResponseToJSONTyped(json, false);
}

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

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

