/* 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 DocumentResponse
 */
export interface DocumentResponse {
    /**
     * 
     * @type {string}
     * @memberof DocumentResponse
     */
    id?: string;
    /**
     * 
     * @type {string}
     * @memberof DocumentResponse
     */
    entityType?: string | null;
    /**
     * 
     * @type {string}
     * @memberof DocumentResponse
     */
    entityId?: string;
    /**
     * 
     * @type {string}
     * @memberof DocumentResponse
     */
    category?: string | null;
    /**
     * 
     * @type {string}
     * @memberof DocumentResponse
     */
    fileName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof DocumentResponse
     */
    contentType?: string | null;
    /**
     * 
     * @type {number}
     * @memberof DocumentResponse
     */
    sizeBytes?: number;
    /**
     * 
     * @type {string}
     * @memberof DocumentResponse
     */
    description?: string | null;
    /**
     * 
     * @type {string}
     * @memberof DocumentResponse
     */
    uploadedByUserId?: string;
    /**
     * 
     * @type {string}
     * @memberof DocumentResponse
     */
    uploadedByUsername?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof DocumentResponse
     */
    createdAt?: Date;
}

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

export function DocumentResponseFromJSON(json: any): DocumentResponse {
    return DocumentResponseFromJSONTyped(json, false);
}

export function DocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'] == null ? undefined : json['id'],
        'entityType': json['entityType'] == null ? undefined : json['entityType'],
        'entityId': json['entityId'] == null ? undefined : json['entityId'],
        'category': json['category'] == null ? undefined : json['category'],
        'fileName': json['fileName'] == null ? undefined : json['fileName'],
        'contentType': json['contentType'] == null ? undefined : json['contentType'],
        'sizeBytes': json['sizeBytes'] == null ? undefined : json['sizeBytes'],
        'description': json['description'] == null ? undefined : json['description'],
        'uploadedByUserId': json['uploadedByUserId'] == null ? undefined : json['uploadedByUserId'],
        'uploadedByUsername': json['uploadedByUsername'] == null ? undefined : json['uploadedByUsername'],
        'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
    };
}

export function DocumentResponseToJSON(json: any): DocumentResponse {
    return DocumentResponseToJSONTyped(json, false);
}

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

    return {
        
        'id': value['id'],
        'entityType': value['entityType'],
        'entityId': value['entityId'],
        'category': value['category'],
        'fileName': value['fileName'],
        'contentType': value['contentType'],
        'sizeBytes': value['sizeBytes'],
        'description': value['description'],
        'uploadedByUserId': value['uploadedByUserId'],
        'uploadedByUsername': value['uploadedByUsername'],
        'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
    };
}

