/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { AggregationRangeFromJSON, AggregationRangeToJSON, } from './AggregationRange';
/**
 * Check if a given object implements the RangeAggregation interface.
 */
export function instanceOfRangeAggregation(value) {
    return true;
}
export function RangeAggregationFromJSON(json) {
    return RangeAggregationFromJSONTyped(json, false);
}
export function RangeAggregationFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'keyed': json['keyed'] == null ? undefined : json['keyed'],
        'field': json['field'] == null ? undefined : json['field'],
        'ranges': json['ranges'] == null ? undefined : (json['ranges'].map(AggregationRangeFromJSON)),
        'missing': json['missing'] == null ? undefined : json['missing'],
        'format': json['format'] == null ? undefined : json['format'],
    };
}
export function RangeAggregationToJSON(json) {
    return RangeAggregationToJSONTyped(json, false);
}
export function RangeAggregationToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'keyed': value['keyed'],
        'field': value['field'],
        'ranges': value['ranges'] == null ? undefined : (value['ranges'].map(AggregationRangeToJSON)),
        'missing': value['missing'],
        'format': value['format'],
    };
}
//# sourceMappingURL=RangeAggregation.js.map