/* 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.
 */
/**
 * Check if a given object implements the TermsAggregation interface.
 */
export function instanceOfTermsAggregation(value) {
    return true;
}
export function TermsAggregationFromJSON(json) {
    return TermsAggregationFromJSONTyped(json, false);
}
export function TermsAggregationFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'field': json['field'] == null ? undefined : json['field'],
        'size': json['size'] == null ? undefined : json['size'],
        'shard_size': json['shard_size'] == null ? undefined : json['shard_size'],
        'min_doc_count': json['min_doc_count'] == null ? undefined : json['min_doc_count'],
        'shard_min_doc_count': json['shard_min_doc_count'] == null ? undefined : json['shard_min_doc_count'],
        'show_term_doc_count_error': json['show_term_doc_count_error'] == null ? undefined : json['show_term_doc_count_error'],
        'order': json['order'] == null ? undefined : json['order'],
        'include': json['include'] == null ? undefined : json['include'],
        'exclude': json['exclude'] == null ? undefined : json['exclude'],
        'missing': json['missing'] == null ? undefined : json['missing'],
        'collect_mode': json['collect_mode'] == null ? undefined : json['collect_mode'],
        'execution_hint': json['execution_hint'] == null ? undefined : json['execution_hint'],
        'format': json['format'] == null ? undefined : json['format'],
        'value_type': json['value_type'] == null ? undefined : json['value_type'],
    };
}
export function TermsAggregationToJSON(json) {
    return TermsAggregationToJSONTyped(json, false);
}
export function TermsAggregationToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'field': value['field'],
        'size': value['size'],
        'shard_size': value['shard_size'],
        'min_doc_count': value['min_doc_count'],
        'shard_min_doc_count': value['shard_min_doc_count'],
        'show_term_doc_count_error': value['show_term_doc_count_error'],
        'order': value['order'],
        'include': value['include'],
        'exclude': value['exclude'],
        'missing': value['missing'],
        'collect_mode': value['collect_mode'],
        'execution_hint': value['execution_hint'],
        'format': value['format'],
        'value_type': value['value_type'],
    };
}
//# sourceMappingURL=TermsAggregation.js.map