/* 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 { FacetConstraintFromJSON, FacetConstraintToJSON, } from './FacetConstraint';
/**
 * @export
 */
export const FacetTypeEnum = {
    LITERAL: 'LITERAL',
    DATE: 'DATE',
    CONTINUOUS: 'CONTINUOUS'
};
/**
 * Check if a given object implements the Facet interface.
 */
export function instanceOfFacet(value) {
    return true;
}
export function FacetFromJSON(json) {
    return FacetFromJSONTyped(json, false);
}
export function FacetFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'name': json['name'] == null ? undefined : json['name'],
        'type': json['type'] == null ? undefined : json['type'],
        'min': json['min'] == null ? undefined : json['min'],
        'max': json['max'] == null ? undefined : json['max'],
        'constraints': json['constraints'] == null ? undefined : (json['constraints'].map(FacetConstraintFromJSON)),
    };
}
export function FacetToJSON(json) {
    return FacetToJSONTyped(json, false);
}
export function FacetToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'type': value['type'],
        'min': value['min'],
        'max': value['max'],
        'constraints': value['constraints'] == null ? undefined : (value['constraints'].map(FacetConstraintToJSON)),
    };
}
//# sourceMappingURL=Facet.js.map