/* 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.
 */
/**
 * Check if a given object implements the EventResponse interface.
 */
export function instanceOfEventResponse(value) {
    if (!('id' in value) || value['id'] === undefined)
        return false;
    if (!('event' in value) || value['event'] === undefined)
        return false;
    if (!('ip' in value) || value['ip'] === undefined)
        return false;
    if (!('metadata' in value) || value['metadata'] === undefined)
        return false;
    if (!('created' in value) || value['created'] === undefined)
        return false;
    return true;
}
export function EventResponseFromJSON(json) {
    return EventResponseFromJSONTyped(json, false);
}
export function EventResponseFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        id: json['id'],
        tenantId: json['tenant_id'] == null ? undefined : json['tenant_id'],
        event: json['event'],
        ip: json['ip'],
        userId: json['user_id'] == null ? undefined : json['user_id'],
        deviceId: json['device_id'] == null ? undefined : json['device_id'],
        metadata: json['metadata'],
        created: json['created'],
        email: json['email'] == null ? undefined : json['email'],
        user: json['user'] == null ? undefined : json['user'],
        geoip: json['geoip'] == null ? undefined : json['geoip'],
    };
}
export function EventResponseToJSON(json) {
    return EventResponseToJSONTyped(json, false);
}
export function EventResponseToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        id: value['id'],
        tenant_id: value['tenantId'],
        event: value['event'],
        ip: value['ip'],
        user_id: value['userId'],
        device_id: value['deviceId'],
        metadata: value['metadata'],
        created: value['created'],
        email: value['email'],
        user: value['user'],
        geoip: value['geoip'],
    };
}
