# Interface FacetPropertyOrBuilder (0.50.0)

0.50.0 (latest) 0.48.0 0.45.0 0.44.0 0.42.0 0.40.0 0.39.0 0.37.0 0.35.0 0.33.0 0.32.0 0.31.0 0.30.0 0.29.0 0.27.0 0.25.0 0.24.0 0.21.0 0.20.0 0.19.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

    public interface FacetPropertyOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getBucketType()

    public abstract FacetBucketType getBucketType()

Facet bucket type e.g. value, range.

`.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-visionai/latest/com.google.cloud.visionai.v1.FacetBucketType` | The bucketType. |

### getBucketTypeValue()

    public abstract int getBucketTypeValue()

Facet bucket type e.g. value, range.

`.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for bucketType. |

### getCustomRangeBucketSpec()

    public abstract FacetProperty.CustomRangeBucketSpec getCustomRangeBucketSpec()

Custom range facet bucket config.

`
.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-visionai/latest/com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec` | The customRangeBucketSpec. |

### getCustomRangeBucketSpecOrBuilder()

    public abstract FacetProperty.CustomRangeBucketSpecOrBuilder getCustomRangeBucketSpecOrBuilder()

Custom range facet bucket config.

`
.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-visionai/latest/com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecOrBuilder` |   |

### getDatetimeBucketSpec()

    public abstract FacetProperty.DateTimeBucketSpec getDatetimeBucketSpec()

Datetime range facet bucket config.

`.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-visionai/latest/com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec` | The datetimeBucketSpec. |

### getDatetimeBucketSpecOrBuilder()

    public abstract FacetProperty.DateTimeBucketSpecOrBuilder getDatetimeBucketSpecOrBuilder()

Datetime range facet bucket config.

`.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-visionai/latest/com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecOrBuilder` |   |

### getDisplayName()

    public abstract String getDisplayName()

Display name of the facet. To be used by UI for facet rendering.

`string display_name = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The displayName. |

### getDisplayNameBytes()

    public abstract ByteString getDisplayNameBytes()

Display name of the facet. To be used by UI for facet rendering.

`string display_name = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for displayName. |

### getFixedRangeBucketSpec()

    public abstract FacetProperty.FixedRangeBucketSpec getFixedRangeBucketSpec()

Fixed range facet bucket config.

`.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-visionai/latest/com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec` | The fixedRangeBucketSpec. |

### getFixedRangeBucketSpecOrBuilder()

    public abstract FacetProperty.FixedRangeBucketSpecOrBuilder getFixedRangeBucketSpecOrBuilder()

Fixed range facet bucket config.

`.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-visionai/latest/com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecOrBuilder` |   |

### getMappedFields(int index)

    public abstract String getMappedFields(int index)

Name of the facets, which are the dimensions users want to use to refine
search results. `mapped_fields` will match UserSpecifiedDataSchema keys.

For example, user can add a bunch of UGAs with the same key, such as
player:adam, player:bob, player:charles. When multiple mapped_fields are
specified, will merge their value together as final facet value. E.g.
home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
\[home_team, away_team\], facet_value will be \[a, b, c\].

UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
mapped_field equals the parent SearchConfig.name, the parent must
also contain a SearchCriteriaProperty that maps to the same fields.
mapped_fields must not be empty.

`repeated string mapped_fields = 1;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The mappedFields at the given index. |

### getMappedFieldsBytes(int index)

    public abstract ByteString getMappedFieldsBytes(int index)

Name of the facets, which are the dimensions users want to use to refine
search results. `mapped_fields` will match UserSpecifiedDataSchema keys.

For example, user can add a bunch of UGAs with the same key, such as
player:adam, player:bob, player:charles. When multiple mapped_fields are
specified, will merge their value together as final facet value. E.g.
home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
\[home_team, away_team\], facet_value will be \[a, b, c\].

UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
mapped_field equals the parent SearchConfig.name, the parent must
also contain a SearchCriteriaProperty that maps to the same fields.
mapped_fields must not be empty.

`repeated string mapped_fields = 1;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the mappedFields at the given index. |

### getMappedFieldsCount()

    public abstract int getMappedFieldsCount()

Name of the facets, which are the dimensions users want to use to refine
search results. `mapped_fields` will match UserSpecifiedDataSchema keys.

For example, user can add a bunch of UGAs with the same key, such as
player:adam, player:bob, player:charles. When multiple mapped_fields are
specified, will merge their value together as final facet value. E.g.
home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
\[home_team, away_team\], facet_value will be \[a, b, c\].

UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
mapped_field equals the parent SearchConfig.name, the parent must
also contain a SearchCriteriaProperty that maps to the same fields.
mapped_fields must not be empty.

`repeated string mapped_fields = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of mappedFields. |

### getMappedFieldsList()

    public abstract List<String> getMappedFieldsList()

Name of the facets, which are the dimensions users want to use to refine
search results. `mapped_fields` will match UserSpecifiedDataSchema keys.

For example, user can add a bunch of UGAs with the same key, such as
player:adam, player:bob, player:charles. When multiple mapped_fields are
specified, will merge their value together as final facet value. E.g.
home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
\[home_team, away_team\], facet_value will be \[a, b, c\].

UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
mapped_field equals the parent SearchConfig.name, the parent must
also contain a SearchCriteriaProperty that maps to the same fields.
mapped_fields must not be empty.

`repeated string mapped_fields = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the mappedFields. |

### getRangeFacetConfigCase()

    public abstract FacetProperty.RangeFacetConfigCase getRangeFacetConfigCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-visionai/latest/com.google.cloud.visionai.v1.FacetProperty.RangeFacetConfigCase` |   |

### getResultSize()

    public abstract long getResultSize()

Maximum number of unique bucket to return for one facet. Bucket number can
be large for high-cardinality facet such as "player". We only return top-n
most related ones to user. If it's \<= 0, the server will decide the
appropriate result_size.

`int64 result_size = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The resultSize. |

### hasCustomRangeBucketSpec()

    public abstract boolean hasCustomRangeBucketSpec()

Custom range facet bucket config.

`
.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the customRangeBucketSpec field is set. |

### hasDatetimeBucketSpec()

    public abstract boolean hasDatetimeBucketSpec()

Datetime range facet bucket config.

`.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the datetimeBucketSpec field is set. |

### hasFixedRangeBucketSpec()

    public abstract boolean hasFixedRangeBucketSpec()

Fixed range facet bucket config.

`.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the fixedRangeBucketSpec field is set. |