/* 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 UpdateOrderRequest
 */
export interface UpdateOrderRequest {
    /**
     * 
     * @type {string}
     * @memberof UpdateOrderRequest
     */
    facilityId?: string;
    /**
     * 
     * @type {string}
     * @memberof UpdateOrderRequest
     */
    facilityContactId?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof UpdateOrderRequest
     */
    startDate?: Date;
    /**
     * 
     * @type {Date}
     * @memberof UpdateOrderRequest
     */
    endDate?: Date | null;
    /**
     * 
     * @type {string}
     * @memberof UpdateOrderRequest
     */
    requiredQualification?: string | null;
    /**
     * 
     * @type {string}
     * @memberof UpdateOrderRequest
     */
    shiftType?: string | null;
    /**
     * 
     * @type {number}
     * @memberof UpdateOrderRequest
     */
    requiredHeadcount?: number;
    /**
     * 
     * @type {string}
     * @memberof UpdateOrderRequest
     */
    conditions?: string | null;
    /**
     * 
     * @type {string}
     * @memberof UpdateOrderRequest
     */
    priority?: string | null;
    /**
     * 
     * @type {string}
     * @memberof UpdateOrderRequest
     */
    statusId?: string;
}

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

export function UpdateOrderRequestFromJSON(json: any): UpdateOrderRequest {
    return UpdateOrderRequestFromJSONTyped(json, false);
}

export function UpdateOrderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateOrderRequest {
    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'],
        'statusId': json['statusId'] == null ? undefined : json['statusId'],
    };
}

export function UpdateOrderRequestToJSON(json: any): UpdateOrderRequest {
    return UpdateOrderRequestToJSONTyped(json, false);
}

export function UpdateOrderRequestToJSONTyped(value?: UpdateOrderRequest | 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'],
        'statusId': value['statusId'],
    };
}

