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

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

export function OrderResponseFromJSON(json: any): OrderResponse {
    return OrderResponseFromJSONTyped(json, false);
}

export function OrderResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'] == null ? undefined : json['id'],
        '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'],
        'statusName': json['statusName'] == null ? undefined : json['statusName'],
    };
}

export function OrderResponseToJSON(json: any): OrderResponse {
    return OrderResponseToJSONTyped(json, false);
}

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

    return {
        
        'id': value['id'],
        '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'],
        'statusName': value['statusName'],
    };
}

