Class FacetProperty (0.11.0)

public final class FacetProperty extends GeneratedMessageV3 implements FacetPropertyOrBuilder

Central configuration for a facet.

Protobuf type google.cloud.visionai.v1.FacetProperty

Static Fields

BUCKET_TYPE_FIELD_NUMBER

public static final int BUCKET_TYPE_FIELD_NUMBER
Field Value
Type Description
int

CUSTOM_RANGE_BUCKET_SPEC_FIELD_NUMBER

public static final int CUSTOM_RANGE_BUCKET_SPEC_FIELD_NUMBER
Field Value
Type Description
int

DATETIME_BUCKET_SPEC_FIELD_NUMBER

public static final int DATETIME_BUCKET_SPEC_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

FIXED_RANGE_BUCKET_SPEC_FIELD_NUMBER

public static final int FIXED_RANGE_BUCKET_SPEC_FIELD_NUMBER
Field Value
Type Description
int

MAPPED_FIELDS_FIELD_NUMBER

public static final int MAPPED_FIELDS_FIELD_NUMBER
Field Value
Type Description
int

RESULT_SIZE_FIELD_NUMBER

public static final int RESULT_SIZE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static FacetProperty getDefaultInstance()
Returns
Type Description
FacetProperty

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static FacetProperty.Builder newBuilder()
Returns
Type Description
FacetProperty.Builder

newBuilder(FacetProperty prototype)

public static FacetProperty.Builder newBuilder(FacetProperty prototype)
Parameter
Name Description
prototype FacetProperty
Returns
Type Description
FacetProperty.Builder

parseDelimitedFrom(InputStream input)

public static FacetProperty parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FacetProperty
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FacetProperty parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static FacetProperty parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
FacetProperty
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FacetProperty parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FacetProperty parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
FacetProperty
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FacetProperty parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FacetProperty parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
FacetProperty
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FacetProperty parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static FacetProperty parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FacetProperty
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FacetProperty parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static FacetProperty parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
FacetProperty
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FacetProperty parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<FacetProperty> parser()
Returns
Type Description
Parser<FacetProperty>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBucketType()

public FacetBucketType getBucketType()

Facet bucket type e.g. value, range.

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

Returns
Type Description
FacetBucketType

The bucketType.

getBucketTypeValue()

public int getBucketTypeValue()

Facet bucket type e.g. value, range.

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

Returns
Type Description
int

The enum numeric value on the wire for bucketType.

getCustomRangeBucketSpec()

public FacetProperty.CustomRangeBucketSpec getCustomRangeBucketSpec()

Custom range facet bucket config.

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

Returns
Type Description
FacetProperty.CustomRangeBucketSpec

The customRangeBucketSpec.

getCustomRangeBucketSpecOrBuilder()

public FacetProperty.CustomRangeBucketSpecOrBuilder getCustomRangeBucketSpecOrBuilder()

Custom range facet bucket config.

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

Returns
Type Description
FacetProperty.CustomRangeBucketSpecOrBuilder

getDatetimeBucketSpec()

public FacetProperty.DateTimeBucketSpec getDatetimeBucketSpec()

Datetime range facet bucket config.

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

Returns
Type Description
FacetProperty.DateTimeBucketSpec

The datetimeBucketSpec.

getDatetimeBucketSpecOrBuilder()

public FacetProperty.DateTimeBucketSpecOrBuilder getDatetimeBucketSpecOrBuilder()

Datetime range facet bucket config.

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

Returns
Type Description
FacetProperty.DateTimeBucketSpecOrBuilder

getDefaultInstanceForType()

public FacetProperty getDefaultInstanceForType()
Returns
Type Description
FacetProperty

getDisplayName()

public String getDisplayName()

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

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

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

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getFixedRangeBucketSpec()

public FacetProperty.FixedRangeBucketSpec getFixedRangeBucketSpec()

Fixed range facet bucket config.

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

Returns
Type Description
FacetProperty.FixedRangeBucketSpec

The fixedRangeBucketSpec.

getFixedRangeBucketSpecOrBuilder()

public FacetProperty.FixedRangeBucketSpecOrBuilder getFixedRangeBucketSpecOrBuilder()

Fixed range facet bucket config.

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

Returns
Type Description
FacetProperty.FixedRangeBucketSpecOrBuilder

getMappedFields(int index)

public 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 int

The index of the element to return.

Returns
Type Description
String

The mappedFields at the given index.

getMappedFieldsBytes(int index)

public 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 int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the mappedFields at the given index.

getMappedFieldsCount()

public 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
int

The count of mappedFields.

getMappedFieldsList()

public ProtocolStringList 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
ProtocolStringList

A list containing the mappedFields.

getParserForType()

public Parser<FacetProperty> getParserForType()
Returns
Type Description
Parser<FacetProperty>
Overrides

getRangeFacetConfigCase()

public FacetProperty.RangeFacetConfigCase getRangeFacetConfigCase()
Returns
Type Description
FacetProperty.RangeFacetConfigCase

getResultSize()

public 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
long

The resultSize.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasCustomRangeBucketSpec()

public boolean hasCustomRangeBucketSpec()

Custom range facet bucket config.

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

Returns
Type Description
boolean

Whether the customRangeBucketSpec field is set.

hasDatetimeBucketSpec()

public boolean hasDatetimeBucketSpec()

Datetime range facet bucket config.

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

Returns
Type Description
boolean

Whether the datetimeBucketSpec field is set.

hasFixedRangeBucketSpec()

public boolean hasFixedRangeBucketSpec()

Fixed range facet bucket config.

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

Returns
Type Description
boolean

Whether the fixedRangeBucketSpec field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public FacetProperty.Builder newBuilderForType()
Returns
Type Description
FacetProperty.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FacetProperty.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
FacetProperty.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public FacetProperty.Builder toBuilder()
Returns
Type Description
FacetProperty.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException