/* 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 CreateAssignmentRequest
 */
export interface CreateAssignmentRequest {
    /**
     * 
     * @type {string}
     * @memberof CreateAssignmentRequest
     */
    orderId?: string;
    /**
     * 
     * @type {string}
     * @memberof CreateAssignmentRequest
     */
    employeeId?: string;
    /**
     * 
     * @type {Date}
     * @memberof CreateAssignmentRequest
     */
    startDate?: Date;
    /**
     * 
     * @type {Date}
     * @memberof CreateAssignmentRequest
     */
    endDate?: Date;
    /**
     * 
     * @type {string}
     * @memberof CreateAssignmentRequest
     */
    note?: string | null;
}

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

export function CreateAssignmentRequestFromJSON(json: any): CreateAssignmentRequest {
    return CreateAssignmentRequestFromJSONTyped(json, false);
}

export function CreateAssignmentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAssignmentRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'orderId': json['orderId'] == null ? undefined : json['orderId'],
        'employeeId': json['employeeId'] == null ? undefined : json['employeeId'],
        'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
        'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
        'note': json['note'] == null ? undefined : json['note'],
    };
}

export function CreateAssignmentRequestToJSON(json: any): CreateAssignmentRequest {
    return CreateAssignmentRequestToJSONTyped(json, false);
}

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

    return {
        
        'orderId': value['orderId'],
        'employeeId': value['employeeId'],
        'startDate': value['startDate'] == null ? undefined : ((value['startDate']).toISOString().substring(0,10)),
        'endDate': value['endDate'] == null ? undefined : ((value['endDate']).toISOString().substring(0,10)),
        'note': value['note'],
    };
}

