# HistogramFacets

- [JSON representation](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#SCHEMA_REPRESENTATION)
- [CustomAttributeHistogramRequest](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CustomAttributeHistogramRequest)
  - [JSON representation](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CustomAttributeHistogramRequest.SCHEMA_REPRESENTATION)
- [NumericBucketingOption](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#NumericBucketingOption)
  - [JSON representation](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#NumericBucketingOption.SCHEMA_REPRESENTATION)
- [CompensationHistogramRequest](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CompensationHistogramRequest)
  - [JSON representation](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CompensationHistogramRequest.SCHEMA_REPRESENTATION)

Input only.

Histogram facets to be specified in `SearchJobsRequest`.

| JSON representation ||
|---|---|
| ``` { "simpleHistogramFacets": [ enum (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/SearchType`) ], "customAttributeHistogramFacets": [ { object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CustomAttributeHistogramRequest`) } ], "compensationHistogramFacets": [ { object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CompensationHistogramRequest`) } ] } ``` |

| Fields ||
|---|---|
| `simpleHistogramFacets[]` | ``enum (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/SearchType`)`` Optional. Specifies the simple type of histogram facets, for example, `COMPANY_SIZE`, `EMPLOYMENT_TYPE` etc. |
| `customAttributeHistogramFacets[]` | ``object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CustomAttributeHistogramRequest`)`` Optional. Specifies the custom attributes histogram requests. Duplicate values of `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CustomAttributeHistogramRequest.FIELDS.key` are not allowed. |
| `compensationHistogramFacets[]` | ``object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CompensationHistogramRequest`)`` Optional. Specifies compensation field-based histogram requests. Duplicate values of `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CompensationHistogramRequest.FIELDS.type` are not allowed. |

## CustomAttributeHistogramRequest

Custom attributes histogram request. An error is thrown if neither `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CustomAttributeHistogramRequest.FIELDS.string_value_histogram` or `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#CustomAttributeHistogramRequest.FIELDS.long_value_histogram_bucketing_option` has been defined.

| JSON representation ||
|---|---|
| ``` { "key": string, "stringValueHistogram": boolean, "longValueHistogramBucketingOption": { object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#NumericBucketingOption`) } } ``` |

| Fields ||
|---|---|
| `key` | `string` Required. Specifies the custom field key to perform a histogram on. If specified without `longValueHistogramBucketingOption`, histogram on string values of the given `key` is triggered, otherwise histogram is performed on long values. |
| `stringValueHistogram` | `boolean` Optional. If set to true, the response includes the histogram value for each key as a string. |
| `longValueHistogramBucketingOption` | ``object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#NumericBucketingOption`)`` Optional. Specifies buckets used to perform a range histogram on Job's filterable long custom field values, or min/max value requirements. |

## NumericBucketingOption

Input only.

Use this field to specify bucketing option for the histogram search response.

| JSON representation ||
|---|---|
| ``` { "bucketBounds": [ number ], "requiresMinMax": boolean } ``` |

| Fields ||
|---|---|
| `bucketBounds[]` | `number` Required. Two adjacent values form a histogram bucket. Values should be in ascending order. For example, if \[5, 10, 15\] are provided, four buckets are created: (-inf, 5), \[5, 10), \[10, 15), \[15, inf). At most 20 \[buckets_bound\]\[\] is supported. |
| `requiresMinMax` | `boolean` Optional. If set to true, the histogram result includes minimum/maximum value of the numeric field. |

## CompensationHistogramRequest

Input only.

Compensation based histogram request.

| JSON representation ||
|---|---|
| ``` { "type": enum (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/CompensationHistogramRequestType`), "bucketingOption": { object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#NumericBucketingOption`) } } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/CompensationHistogramRequestType`)`` Required. Type of the request, representing which field the histogramming should be performed over. A single request can only specify one histogram of each `CompensationHistogramRequestType`. |
| `bucketingOption` | ``object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/HistogramFacets#NumericBucketingOption`)`` Required. Numeric histogram options, like buckets, whether include min or max value. |