/* tslint:disable */
/* eslint-disable */
/**
 * zrok
 * zrok client access
 *
 * The version of the OpenAPI document: 0.3.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 { exists, mapValues } from '../runtime';
/**
 * 
 * @export
 * @interface MetricsSample
 */
export interface MetricsSample {
    /**
     * 
     * @type {number}
     * @memberof MetricsSample
     */
    rx?: number;
    /**
     * 
     * @type {number}
     * @memberof MetricsSample
     */
    tx?: number;
    /**
     * 
     * @type {number}
     * @memberof MetricsSample
     */
    timestamp?: number;
}

/**
 * Check if a given object implements the MetricsSample interface.
 */
export function instanceOfMetricsSample(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function MetricsSampleFromJSON(json: any): MetricsSample {
    return MetricsSampleFromJSONTyped(json, false);
}

export function MetricsSampleFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsSample {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'rx': !exists(json, 'rx') ? undefined : json['rx'],
        'tx': !exists(json, 'tx') ? undefined : json['tx'],
        'timestamp': !exists(json, 'timestamp') ? undefined : json['timestamp'],
    };
}

export function MetricsSampleToJSON(value?: MetricsSample | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'rx': value.rx,
        'tx': value.tx,
        'timestamp': value.timestamp,
    };
}

