Package com.google.cloud.visionai.v1
Class FacetProperty
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.visionai.v1.FacetProperty
- All Implemented Interfaces:
FacetPropertyOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class FacetProperty
extends com.google.protobuf.GeneratedMessage
implements FacetPropertyOrBuilder
Central configuration for a facet.Protobuf type
google.cloud.visionai.v1.FacetProperty- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCentral configuration for a facet.static final classIf bucket type is CUSTOM_RANGE, specify how values are bucketized.static interfacestatic final classIf bucket type is DATE, specify how date values are bucketized.static interfacestatic final classIf bucket type is FIXED_RANGE, specify how values are bucketized.static interfacestatic enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanFacet bucket type e.g. value, range.intFacet bucket type e.g. value, range.Custom range facet bucket config.Custom range facet bucket config.Datetime range facet bucket config.Datetime range facet bucket config.static FacetPropertystatic final com.google.protobuf.Descriptors.DescriptorDisplay name of the facet.com.google.protobuf.ByteStringDisplay name of the facet.Fixed range facet bucket config.Fixed range facet bucket config.getMappedFields(int index) Name of the facets, which are the dimensions users want to use to refine search results.com.google.protobuf.ByteStringgetMappedFieldsBytes(int index) Name of the facets, which are the dimensions users want to use to refine search results.intName of the facets, which are the dimensions users want to use to refine search results.com.google.protobuf.ProtocolStringListName of the facets, which are the dimensions users want to use to refine search results.com.google.protobuf.Parser<FacetProperty>longMaximum number of unique bucket to return for one facet.intbooleanCustom range facet bucket config.booleanDatetime range facet bucket config.booleanFixed range facet bucket config.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic FacetProperty.Builderstatic FacetProperty.BuildernewBuilder(FacetProperty prototype) protected FacetProperty.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static FacetPropertyparseDelimitedFrom(InputStream input) static FacetPropertyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FacetPropertyparseFrom(byte[] data) static FacetPropertyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FacetPropertyparseFrom(com.google.protobuf.ByteString data) static FacetPropertyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FacetPropertyparseFrom(com.google.protobuf.CodedInputStream input) static FacetPropertyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FacetPropertyparseFrom(InputStream input) static FacetPropertyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FacetPropertyparseFrom(ByteBuffer data) static FacetPropertyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<FacetProperty>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
FIXED_RANGE_BUCKET_SPEC_FIELD_NUMBER
public static final int FIXED_RANGE_BUCKET_SPEC_FIELD_NUMBER- See Also:
-
CUSTOM_RANGE_BUCKET_SPEC_FIELD_NUMBER
public static final int CUSTOM_RANGE_BUCKET_SPEC_FIELD_NUMBER- See Also:
-
DATETIME_BUCKET_SPEC_FIELD_NUMBER
public static final int DATETIME_BUCKET_SPEC_FIELD_NUMBER- See Also:
-
MAPPED_FIELDS_FIELD_NUMBER
public static final int MAPPED_FIELDS_FIELD_NUMBER- See Also:
-
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER- See Also:
-
RESULT_SIZE_FIELD_NUMBER
public static final int RESULT_SIZE_FIELD_NUMBER- See Also:
-
BUCKET_TYPE_FIELD_NUMBER
public static final int BUCKET_TYPE_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getRangeFacetConfigCase
- Specified by:
getRangeFacetConfigCasein interfaceFacetPropertyOrBuilder
-
hasFixedRangeBucketSpec
public boolean hasFixedRangeBucketSpec()Fixed range facet bucket config.
.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5;- Specified by:
hasFixedRangeBucketSpecin interfaceFacetPropertyOrBuilder- Returns:
- Whether the fixedRangeBucketSpec field is set.
-
getFixedRangeBucketSpec
Fixed range facet bucket config.
.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5;- Specified by:
getFixedRangeBucketSpecin interfaceFacetPropertyOrBuilder- Returns:
- The fixedRangeBucketSpec.
-
getFixedRangeBucketSpecOrBuilder
Fixed range facet bucket config.
.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5;- Specified by:
getFixedRangeBucketSpecOrBuilderin interfaceFacetPropertyOrBuilder
-
hasCustomRangeBucketSpec
public boolean hasCustomRangeBucketSpec()Custom range facet bucket config.
.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6;- Specified by:
hasCustomRangeBucketSpecin interfaceFacetPropertyOrBuilder- Returns:
- Whether the customRangeBucketSpec field is set.
-
getCustomRangeBucketSpec
Custom range facet bucket config.
.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6;- Specified by:
getCustomRangeBucketSpecin interfaceFacetPropertyOrBuilder- Returns:
- The customRangeBucketSpec.
-
getCustomRangeBucketSpecOrBuilder
Custom range facet bucket config.
.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6;- Specified by:
getCustomRangeBucketSpecOrBuilderin interfaceFacetPropertyOrBuilder
-
hasDatetimeBucketSpec
public boolean hasDatetimeBucketSpec()Datetime range facet bucket config.
.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7;- Specified by:
hasDatetimeBucketSpecin interfaceFacetPropertyOrBuilder- Returns:
- Whether the datetimeBucketSpec field is set.
-
getDatetimeBucketSpec
Datetime range facet bucket config.
.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7;- Specified by:
getDatetimeBucketSpecin interfaceFacetPropertyOrBuilder- Returns:
- The datetimeBucketSpec.
-
getDatetimeBucketSpecOrBuilder
Datetime range facet bucket config.
.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7;- Specified by:
getDatetimeBucketSpecOrBuilderin interfaceFacetPropertyOrBuilder
-
getMappedFieldsList
public com.google.protobuf.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;- Specified by:
getMappedFieldsListin interfaceFacetPropertyOrBuilder- Returns:
- A list containing the mappedFields.
-
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;- Specified by:
getMappedFieldsCountin interfaceFacetPropertyOrBuilder- Returns:
- The count of mappedFields.
-
getMappedFields
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;- Specified by:
getMappedFieldsin interfaceFacetPropertyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The mappedFields at the given index.
-
getMappedFieldsBytes
public com.google.protobuf.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;- Specified by:
getMappedFieldsBytesin interfaceFacetPropertyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the mappedFields at the given index.
-
getDisplayName
Display name of the facet. To be used by UI for facet rendering.
string display_name = 2;- Specified by:
getDisplayNamein interfaceFacetPropertyOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()Display name of the facet. To be used by UI for facet rendering.
string display_name = 2;- Specified by:
getDisplayNameBytesin interfaceFacetPropertyOrBuilder- Returns:
- The bytes for displayName.
-
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;- Specified by:
getResultSizein interfaceFacetPropertyOrBuilder- Returns:
- The resultSize.
-
getBucketTypeValue
public int getBucketTypeValue()Facet bucket type e.g. value, range.
.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;- Specified by:
getBucketTypeValuein interfaceFacetPropertyOrBuilder- Returns:
- The enum numeric value on the wire for bucketType.
-
getBucketType
Facet bucket type e.g. value, range.
.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;- Specified by:
getBucketTypein interfaceFacetPropertyOrBuilder- Returns:
- The bucketType.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static FacetProperty parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FacetProperty parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FacetProperty parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FacetProperty parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FacetProperty parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FacetProperty parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static FacetProperty parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static FacetProperty parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static FacetProperty parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static FacetProperty parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected FacetProperty.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-