Package com.google.cloud.retail.v2beta
Class CustomAttribute
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.retail.v2beta.CustomAttribute
-
- All Implemented Interfaces:
CustomAttributeOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class CustomAttribute extends com.google.protobuf.GeneratedMessageV3 implements CustomAttributeOrBuilder
A custom attribute that is not explicitly modeled in [Product][google.cloud.retail.v2beta.Product].
Protobuf typegoogle.cloud.retail.v2beta.CustomAttribute
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CustomAttribute.Builder
A custom attribute that is not explicitly modeled in [Product][google.cloud.retail.v2beta.Product].-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
INDEXABLE_FIELD_NUMBER
static int
NUMBERS_FIELD_NUMBER
static int
SEARCHABLE_FIELD_NUMBER
static int
TEXT_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object obj)
static CustomAttribute
getDefaultInstance()
CustomAttribute
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
boolean
getIndexable()
Deprecated.google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated.double
getNumbers(int index)
The numerical values of this custom attribute.int
getNumbersCount()
The numerical values of this custom attribute.List<Double>
getNumbersList()
The numerical values of this custom attribute.com.google.protobuf.Parser<CustomAttribute>
getParserForType()
boolean
getSearchable()
Deprecated.google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated.int
getSerializedSize()
String
getText(int index)
The textual values of this custom attribute.com.google.protobuf.ByteString
getTextBytes(int index)
The textual values of this custom attribute.int
getTextCount()
The textual values of this custom attribute.com.google.protobuf.ProtocolStringList
getTextList()
The textual values of this custom attribute.int
hashCode()
boolean
hasIndexable()
Deprecated.google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated.boolean
hasSearchable()
Deprecated.google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static CustomAttribute.Builder
newBuilder()
static CustomAttribute.Builder
newBuilder(CustomAttribute prototype)
CustomAttribute.Builder
newBuilderForType()
protected CustomAttribute.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static CustomAttribute
parseDelimitedFrom(InputStream input)
static CustomAttribute
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CustomAttribute
parseFrom(byte[] data)
static CustomAttribute
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CustomAttribute
parseFrom(com.google.protobuf.ByteString data)
static CustomAttribute
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CustomAttribute
parseFrom(com.google.protobuf.CodedInputStream input)
static CustomAttribute
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CustomAttribute
parseFrom(InputStream input)
static CustomAttribute
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CustomAttribute
parseFrom(ByteBuffer data)
static CustomAttribute
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<CustomAttribute>
parser()
CustomAttribute.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
TEXT_FIELD_NUMBER
public static final int TEXT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NUMBERS_FIELD_NUMBER
public static final int NUMBERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SEARCHABLE_FIELD_NUMBER
public static final int SEARCHABLE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INDEXABLE_FIELD_NUMBER
public static final int INDEXABLE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getTextList
public com.google.protobuf.ProtocolStringList getTextList()
The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of [text][google.cloud.retail.v2beta.CustomAttribute.text] or [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string text = 1;
- Specified by:
getTextList
in interfaceCustomAttributeOrBuilder
- Returns:
- A list containing the text.
-
getTextCount
public int getTextCount()
The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of [text][google.cloud.retail.v2beta.CustomAttribute.text] or [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string text = 1;
- Specified by:
getTextCount
in interfaceCustomAttributeOrBuilder
- Returns:
- The count of text.
-
getText
public String getText(int index)
The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of [text][google.cloud.retail.v2beta.CustomAttribute.text] or [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string text = 1;
- Specified by:
getText
in interfaceCustomAttributeOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The text at the given index.
-
getTextBytes
public com.google.protobuf.ByteString getTextBytes(int index)
The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of [text][google.cloud.retail.v2beta.CustomAttribute.text] or [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string text = 1;
- Specified by:
getTextBytes
in interfaceCustomAttributeOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the text at the given index.
-
getNumbersList
public List<Double> getNumbersList()
The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of [text][google.cloud.retail.v2beta.CustomAttribute.text] or [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
repeated double numbers = 2;
- Specified by:
getNumbersList
in interfaceCustomAttributeOrBuilder
- Returns:
- A list containing the numbers.
-
getNumbersCount
public int getNumbersCount()
The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of [text][google.cloud.retail.v2beta.CustomAttribute.text] or [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
repeated double numbers = 2;
- Specified by:
getNumbersCount
in interfaceCustomAttributeOrBuilder
- Returns:
- The count of numbers.
-
getNumbers
public double getNumbers(int index)
The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of [text][google.cloud.retail.v2beta.CustomAttribute.text] or [numbers][google.cloud.retail.v2beta.CustomAttribute.numbers] should be set. Otherwise, an INVALID_ARGUMENT error is returned.
repeated double numbers = 2;
- Specified by:
getNumbers
in interfaceCustomAttributeOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The numbers at the given index.
-
hasSearchable
@Deprecated public boolean hasSearchable()
Deprecated.google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See google/cloud/retail/v2beta/common.proto;l=426This field is normally ignored unless [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. This field is ignored in a [UserEvent][google.cloud.retail.v2beta.UserEvent]. Only set if type [text][google.cloud.retail.v2beta.CustomAttribute.text] is set. Otherwise, a INVALID_ARGUMENT error is returned.
optional bool searchable = 3 [deprecated = true];
- Specified by:
hasSearchable
in interfaceCustomAttributeOrBuilder
- Returns:
- Whether the searchable field is set.
-
getSearchable
@Deprecated public boolean getSearchable()
Deprecated.google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See google/cloud/retail/v2beta/common.proto;l=426This field is normally ignored unless [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. This field is ignored in a [UserEvent][google.cloud.retail.v2beta.UserEvent]. Only set if type [text][google.cloud.retail.v2beta.CustomAttribute.text] is set. Otherwise, a INVALID_ARGUMENT error is returned.
optional bool searchable = 3 [deprecated = true];
- Specified by:
getSearchable
in interfaceCustomAttributeOrBuilder
- Returns:
- The searchable.
-
hasIndexable
@Deprecated public boolean hasIndexable()
Deprecated.google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See google/cloud/retail/v2beta/common.proto;l=447This field is normally ignored unless [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. This field is ignored in a [UserEvent][google.cloud.retail.v2beta.UserEvent]. See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter], [SearchRequest.facet_specs][google.cloud.retail.v2beta.SearchRequest.facet_specs] and [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] for more details.
optional bool indexable = 4 [deprecated = true];
- Specified by:
hasIndexable
in interfaceCustomAttributeOrBuilder
- Returns:
- Whether the indexable field is set.
-
getIndexable
@Deprecated public boolean getIndexable()
Deprecated.google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See google/cloud/retail/v2beta/common.proto;l=447This field is normally ignored unless [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. This field is ignored in a [UserEvent][google.cloud.retail.v2beta.UserEvent]. See [SearchRequest.filter][google.cloud.retail.v2beta.SearchRequest.filter], [SearchRequest.facet_specs][google.cloud.retail.v2beta.SearchRequest.facet_specs] and [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] for more details.
optional bool indexable = 4 [deprecated = true];
- Specified by:
getIndexable
in interfaceCustomAttributeOrBuilder
- Returns:
- The indexable.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CustomAttribute parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomAttribute parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomAttribute parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomAttribute parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomAttribute parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomAttribute parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomAttribute parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CustomAttribute parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CustomAttribute parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CustomAttribute parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static CustomAttribute parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CustomAttribute parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public CustomAttribute.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static CustomAttribute.Builder newBuilder()
-
newBuilder
public static CustomAttribute.Builder newBuilder(CustomAttribute prototype)
-
toBuilder
public CustomAttribute.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CustomAttribute.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static CustomAttribute getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<CustomAttribute> parser()
-
getParserForType
public com.google.protobuf.Parser<CustomAttribute> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public CustomAttribute getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-