/* tslint:disable */
/* eslint-disable */
/**
 * Hexiosec Transfer API
 * API description for Hexiosec Transfer  ## Testing Requests  Endpoints that require authentication will use your session cookie from the main application if an API key is not provided. This is fine for testing GET requests, however POST/DELETE requests will require a CSRF token when using a session cookie. It is not possible to provide a CSRF token from this page, and so an API key must be used.
 *
 * The version of the OpenAPI document: 0.0.1
 * Contact: support@hexiosec.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { UserResponseFromJSON, UserResponseToJSON, } from './UserResponse.js';
/**
 * Check if a given object implements the AuthResponse interface.
 */
export function instanceOfAuthResponse(value) {
    if (!('authenticated' in value) || value['authenticated'] === undefined)
        return false;
    return true;
}
export function AuthResponseFromJSON(json) {
    return AuthResponseFromJSONTyped(json, false);
}
export function AuthResponseFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        authenticated: json['authenticated'],
        verifiedEmail: json['verified_email'] == null ? undefined : json['verified_email'],
        scheme: json['scheme'] == null ? undefined : json['scheme'],
        roles: json['roles'] == null ? undefined : json['roles'],
        attributes: json['attributes'] == null ? undefined : json['attributes'],
        user: json['user'] == null ? undefined : UserResponseFromJSON(json['user']),
    };
}
export function AuthResponseToJSON(json) {
    return AuthResponseToJSONTyped(json, false);
}
export function AuthResponseToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        authenticated: value['authenticated'],
        verified_email: value['verifiedEmail'],
        scheme: value['scheme'],
        roles: value['roles'],
        attributes: value['attributes'],
        user: UserResponseToJSON(value['user']),
    };
}
