/* tslint:disable */
/* eslint-disable */
/**
 * OmsorgCore.Api
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 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';
/**
 * 
 * @export
 * @interface CreateOrderRequest
 */
export interface CreateOrderRequest {
    /**
     * 
     * @type {string}
     * @memberof CreateOrderRequest
     */
    facilityId?: string;
    /**
     * 
     * @type {string}
     * @memberof CreateOrderRequest
     */
    facilityContactId?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof CreateOrderRequest
     */
    startDate?: Date;
    /**
     * 
     * @type {Date}
     * @memberof CreateOrderRequest
     */
    endDate?: Date | null;
    /**
     * 
     * @type {string}
     * @memberof CreateOrderRequest
     */
    requiredQualification?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateOrderRequest
     */
    shiftType?: string | null;
    /**
     * 
     * @type {number}
     * @memberof CreateOrderRequest
     */
    requiredHeadcount?: number;
    /**
     * 
     * @type {string}
     * @memberof CreateOrderRequest
     */
    conditions?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateOrderRequest
     */
    priority?: string | null;
}

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

export function CreateOrderRequestFromJSON(json: any): CreateOrderRequest {
    return CreateOrderRequestFromJSONTyped(json, false);
}

export function CreateOrderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOrderRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'facilityId': json['facilityId'] == null ? undefined : json['facilityId'],
        'facilityContactId': json['facilityContactId'] == null ? undefined : json['facilityContactId'],
        'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
        'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
        'requiredQualification': json['requiredQualification'] == null ? undefined : json['requiredQualification'],
        'shiftType': json['shiftType'] == null ? undefined : json['shiftType'],
        'requiredHeadcount': json['requiredHeadcount'] == null ? undefined : json['requiredHeadcount'],
        'conditions': json['conditions'] == null ? undefined : json['conditions'],
        'priority': json['priority'] == null ? undefined : json['priority'],
    };
}

export function CreateOrderRequestToJSON(json: any): CreateOrderRequest {
    return CreateOrderRequestToJSONTyped(json, false);
}

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

    return {
        
        'facilityId': value['facilityId'],
        'facilityContactId': value['facilityContactId'],
        'startDate': value['startDate'] == null ? undefined : ((value['startDate']).toISOString().substring(0,10)),
        'endDate': value['endDate'] === null ? null : ((value['endDate'] as any)?.toISOString().substring(0,10)),
        'requiredQualification': value['requiredQualification'],
        'shiftType': value['shiftType'],
        'requiredHeadcount': value['requiredHeadcount'],
        'conditions': value['conditions'],
        'priority': value['priority'],
    };
}

