/* 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 SessionResponse
 */
export interface SessionResponse {
    /**
     * 
     * @type {string}
     * @memberof SessionResponse
     */
    id?: string;
    /**
     * 
     * @type {string}
     * @memberof SessionResponse
     */
    username?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof SessionResponse
     */
    createdAt?: Date;
    /**
     * 
     * @type {Date}
     * @memberof SessionResponse
     */
    expiresAt?: Date;
}

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

export function SessionResponseFromJSON(json: any): SessionResponse {
    return SessionResponseFromJSONTyped(json, false);
}

export function SessionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SessionResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'] == null ? undefined : json['id'],
        'username': json['username'] == null ? undefined : json['username'],
        'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
        'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
    };
}

export function SessionResponseToJSON(json: any): SessionResponse {
    return SessionResponseToJSONTyped(json, false);
}

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

    return {
        
        'id': value['id'],
        'username': value['username'],
        'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
        'expiresAt': value['expiresAt'] == null ? undefined : ((value['expiresAt']).toISOString()),
    };
}

