/* tslint:disable */
/* eslint-disable */
/**
 * elkar-app
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.1.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 { PaginationOptions } from './PaginationOptions';
import {
    PaginationOptionsFromJSON,
    PaginationOptionsFromJSONTyped,
    PaginationOptionsToJSON,
    PaginationOptionsToJSONTyped,
} from './PaginationOptions';
import type { TaskType } from './TaskType';
import {
    TaskTypeFromJSON,
    TaskTypeFromJSONTyped,
    TaskTypeToJSON,
    TaskTypeToJSONTyped,
} from './TaskType';
import type { TaskState } from './TaskState';
import {
    TaskStateFromJSON,
    TaskStateFromJSONTyped,
    TaskStateToJSON,
    TaskStateToJSONTyped,
} from './TaskState';

/**
 * 
 * @export
 * @interface RetrieveTasksInput
 */
export interface RetrieveTasksInput {
    /**
     * 
     * @type {Array<string>}
     * @memberof RetrieveTasksInput
     */
    agentIdIn?: Array<string> | null;
    /**
     * 
     * @type {PaginationOptions}
     * @memberof RetrieveTasksInput
     */
    pagination?: PaginationOptions | null;
    /**
     * 
     * @type {Array<string>}
     * @memberof RetrieveTasksInput
     */
    taskIdIn?: Array<string> | null;
    /**
     * 
     * @type {Array<TaskState>}
     * @memberof RetrieveTasksInput
     */
    taskStateIn?: Array<TaskState> | null;
    /**
     * 
     * @type {Array<TaskType>}
     * @memberof RetrieveTasksInput
     */
    taskTypeIn?: Array<TaskType> | null;
}

/**
 * Check if a given object implements the RetrieveTasksInput interface.
 */
export function instanceOfRetrieveTasksInput(value: object): value is RetrieveTasksInput {
    return true;
}

export function RetrieveTasksInputFromJSON(json: any): RetrieveTasksInput {
    return RetrieveTasksInputFromJSONTyped(json, false);
}

export function RetrieveTasksInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): RetrieveTasksInput {
    if (json == null) {
        return json;
    }
    return {
        
        'agentIdIn': json['agent_id_in'] == null ? undefined : json['agent_id_in'],
        'pagination': json['pagination'] == null ? undefined : PaginationOptionsFromJSON(json['pagination']),
        'taskIdIn': json['task_id_in'] == null ? undefined : json['task_id_in'],
        'taskStateIn': json['task_state_in'] == null ? undefined : ((json['task_state_in'] as Array<any>).map(TaskStateFromJSON)),
        'taskTypeIn': json['task_type_in'] == null ? undefined : ((json['task_type_in'] as Array<any>).map(TaskTypeFromJSON)),
    };
}

export function RetrieveTasksInputToJSON(json: any): RetrieveTasksInput {
    return RetrieveTasksInputToJSONTyped(json, false);
}

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

    return {
        
        'agent_id_in': value['agentIdIn'],
        'pagination': PaginationOptionsToJSON(value['pagination']),
        'task_id_in': value['taskIdIn'],
        'task_state_in': value['taskStateIn'] == null ? undefined : ((value['taskStateIn'] as Array<any>).map(TaskStateToJSON)),
        'task_type_in': value['taskTypeIn'] == null ? undefined : ((value['taskTypeIn'] as Array<any>).map(TaskTypeToJSON)),
    };
}

