/* 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 { EventResponseFromJSON, EventResponseToJSON, } from './EventResponse.js';
import { CountByMonthResponseFromJSON, CountByMonthResponseToJSON, } from './CountByMonthResponse.js';
/**
 * Check if a given object implements the AdminEventsResponse interface.
 */
export function instanceOfAdminEventsResponse(value) {
    if (!('total' in value) || value['total'] === undefined)
        return false;
    if (!('limit' in value) || value['limit'] === undefined)
        return false;
    if (!('offset' in value) || value['offset'] === undefined)
        return false;
    if (!('totalByMonth' in value) || value['totalByMonth'] === undefined)
        return false;
    if (!('rows' in value) || value['rows'] === undefined)
        return false;
    return true;
}
export function AdminEventsResponseFromJSON(json) {
    return AdminEventsResponseFromJSONTyped(json, false);
}
export function AdminEventsResponseFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        total: json['total'],
        limit: json['limit'],
        offset: json['offset'],
        totalByMonth: json['total_by_month'].map(CountByMonthResponseFromJSON),
        rows: json['rows'].map(EventResponseFromJSON),
    };
}
export function AdminEventsResponseToJSON(json) {
    return AdminEventsResponseToJSONTyped(json, false);
}
export function AdminEventsResponseToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        total: value['total'],
        limit: value['limit'],
        offset: value['offset'],
        total_by_month: value['totalByMonth'].map(CountByMonthResponseToJSON),
        rows: value['rows'].map(EventResponseToJSON),
    };
}
