/* 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 LoginResponse
 */
export interface LoginResponse {
    /**
     * 
     * @type {string}
     * @memberof LoginResponse
     */
    accessToken?: string | null;
    /**
     * 
     * @type {string}
     * @memberof LoginResponse
     */
    refreshToken?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof LoginResponse
     */
    expiresAt?: Date;
    /**
     * 
     * @type {boolean}
     * @memberof LoginResponse
     */
    mustChangePassword?: boolean;
}

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

export function LoginResponseFromJSON(json: any): LoginResponse {
    return LoginResponseFromJSONTyped(json, false);
}

export function LoginResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'accessToken': json['accessToken'] == null ? undefined : json['accessToken'],
        'refreshToken': json['refreshToken'] == null ? undefined : json['refreshToken'],
        'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
        'mustChangePassword': json['mustChangePassword'] == null ? undefined : json['mustChangePassword'],
    };
}

export function LoginResponseToJSON(json: any): LoginResponse {
    return LoginResponseToJSONTyped(json, false);
}

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

    return {
        
        'accessToken': value['accessToken'],
        'refreshToken': value['refreshToken'],
        'expiresAt': value['expiresAt'] == null ? undefined : ((value['expiresAt']).toISOString()),
        'mustChangePassword': value['mustChangePassword'],
    };
}

