{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/coveo/main/json-schema/coveo-search-restfacetresultvalue-schema.json",
  "title": "Coveo Search RestFacetResultValue",
  "required": [
    "numberOfResults",
    "state"
  ],
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "value": {
      "type": "string",
      "description": "The facet value name.\n\n**Note:** In the case of a hierarchical facet value, this represents a single path segment.",
      "example": "Alice Smith"
    },
    "state": {
      "type": "string",
      "description": "The current facet value state in the search interface.\n\n**Default:** `idle`",
      "enum": [
        "idle",
        "selected",
        "excluded"
      ]
    },
    "numberOfResults": {
      "type": "integer",
      "description": "The number of query results that can be expected if the facet value is selected in the search interface.\n\n**Note:** This property only gets populated when the facet currently has no selected or excluded values.",
      "format": "int64"
    },
    "start": {
      "description": "The start of the range.",
      "anyOf": [
        {
          "type": "string",
          "example": "2001-07-20T23:01:05"
        },
        {
          "type": "integer",
          "format": "int64"
        },
        {
          "type": "number"
        }
      ]
    },
    "end": {
      "description": "The end of the range.",
      "anyOf": [
        {
          "type": "string",
          "example": "2001-07-20T23:01:05"
        },
        {
          "type": "integer",
          "format": "int64"
        },
        {
          "type": "number"
        }
      ]
    },
    "endInclusive": {
      "type": "boolean",
      "description": "Whether to include the `end` value in the range.\n\n**Default:** `false`",
      "example": true,
      "default": false
    },
    "isSuggested": {
      "type": "boolean"
    },
    "isAutoSelected": {
      "type": "boolean",
      "description": "Whether the facet value was automatically selected by Coveo ML."
    }
  }
}