public final class CatalogAttribute extends com.google.protobuf.GeneratedMessageV3 implements CatalogAttributeOrBuilder
Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.Protobuf type
google.cloud.retail.v2.CatalogAttribute| Modifier and Type | Class and Description |
|---|---|
static class |
CatalogAttribute.AttributeType
The type of an attribute.
|
static class |
CatalogAttribute.Builder
Catalog level attribute config for an attribute.
|
static class |
CatalogAttribute.DynamicFacetableOption
The status of the dynamic facetable option of a catalog attribute.
|
static class |
CatalogAttribute.ExactSearchableOption
The status of the exact-searchable option of a catalog attribute.
|
static class |
CatalogAttribute.IndexableOption
The status of the indexable option of a catalog attribute.
|
static class |
CatalogAttribute.RetrievableOption
The status of the retrievable option of a catalog attribute.
|
static class |
CatalogAttribute.SearchableOption
The status of the searchable option of a catalog attribute.
|
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| Modifier and Type | Field and Description |
|---|---|
static int |
DYNAMIC_FACETABLE_OPTION_FIELD_NUMBER |
static int |
EXACT_SEARCHABLE_OPTION_FIELD_NUMBER |
static int |
IN_USE_FIELD_NUMBER |
static int |
INDEXABLE_OPTION_FIELD_NUMBER |
static int |
KEY_FIELD_NUMBER |
static int |
RETRIEVABLE_OPTION_FIELD_NUMBER |
static int |
SEARCHABLE_OPTION_FIELD_NUMBER |
static int |
TYPE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static CatalogAttribute |
getDefaultInstance() |
CatalogAttribute |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
CatalogAttribute.DynamicFacetableOption |
getDynamicFacetableOption()
If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic
facet.
|
int |
getDynamicFacetableOptionValue()
If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic
facet.
|
CatalogAttribute.ExactSearchableOption |
getExactSearchableOption()
If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
|
int |
getExactSearchableOptionValue()
If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
|
CatalogAttribute.IndexableOption |
getIndexableOption()
When
[AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level]
is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
are indexed so that it can be filtered, faceted, or boosted in
[SearchService.Search][google.cloud.retail.v2.SearchService.Search].
|
int |
getIndexableOptionValue()
When
[AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level]
is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
are indexed so that it can be filtered, faceted, or boosted in
[SearchService.Search][google.cloud.retail.v2.SearchService.Search].
|
boolean |
getInUse()
Output only.
|
String |
getKey()
Required.
|
com.google.protobuf.ByteString |
getKeyBytes()
Required.
|
com.google.protobuf.Parser<CatalogAttribute> |
getParserForType() |
CatalogAttribute.RetrievableOption |
getRetrievableOption()
If RETRIEVABLE_ENABLED, attribute values are retrievable in the search
results.
|
int |
getRetrievableOptionValue()
If RETRIEVABLE_ENABLED, attribute values are retrievable in the search
results.
|
CatalogAttribute.SearchableOption |
getSearchableOption()
When
[AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level]
is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values
are searchable by text queries in
[SearchService.Search][google.cloud.retail.v2.SearchService.Search].
|
int |
getSearchableOptionValue()
When
[AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level]
is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values
are searchable by text queries in
[SearchService.Search][google.cloud.retail.v2.SearchService.Search].
|
int |
getSerializedSize() |
CatalogAttribute.AttributeType |
getType()
Output only.
|
int |
getTypeValue()
Output only.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static CatalogAttribute.Builder |
newBuilder() |
static CatalogAttribute.Builder |
newBuilder(CatalogAttribute prototype) |
CatalogAttribute.Builder |
newBuilderForType() |
protected CatalogAttribute.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static CatalogAttribute |
parseDelimitedFrom(InputStream input) |
static CatalogAttribute |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CatalogAttribute |
parseFrom(byte[] data) |
static CatalogAttribute |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CatalogAttribute |
parseFrom(ByteBuffer data) |
static CatalogAttribute |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CatalogAttribute |
parseFrom(com.google.protobuf.ByteString data) |
static CatalogAttribute |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CatalogAttribute |
parseFrom(com.google.protobuf.CodedInputStream input) |
static CatalogAttribute |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CatalogAttribute |
parseFrom(InputStream input) |
static CatalogAttribute |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<CatalogAttribute> |
parser() |
CatalogAttribute.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
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, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int KEY_FIELD_NUMBER
public static final int IN_USE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
public static final int INDEXABLE_OPTION_FIELD_NUMBER
public static final int DYNAMIC_FACETABLE_OPTION_FIELD_NUMBER
public static final int SEARCHABLE_OPTION_FIELD_NUMBER
public static final int EXACT_SEARCHABLE_OPTION_FIELD_NUMBER
public static final int RETRIEVABLE_OPTION_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getKey()
Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed. If the attribute key starts with `attributes.`, then the attribute is a custom attribute. Attributes such as `brands`, `patterns`, and `title` are built-in and called system attributes.
string key = 1 [(.google.api.field_behavior) = REQUIRED];getKey in interface CatalogAttributeOrBuilderpublic com.google.protobuf.ByteString getKeyBytes()
Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed. If the attribute key starts with `attributes.`, then the attribute is a custom attribute. Attributes such as `brands`, `patterns`, and `title` are built-in and called system attributes.
string key = 1 [(.google.api.field_behavior) = REQUIRED];getKeyBytes in interface CatalogAttributeOrBuilderpublic boolean getInUse()
Output only. Indicates whether this attribute has been used by any products. `True` if at least one [Product][google.cloud.retail.v2.Product] is using this attribute in [Product.attributes][google.cloud.retail.v2.Product.attributes]. Otherwise, this field is `False`. [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] can be pre-loaded by using [CatalogService.AddCatalogAttribute][google.cloud.retail.v2.CatalogService.AddCatalogAttribute], [CatalogService.ImportCatalogAttributes][], or [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2.CatalogService.UpdateAttributesConfig] APIs. This field is `False` for pre-loaded [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s. Only pre-loaded [catalog attributes][google.cloud.retail.v2.CatalogAttribute] that are neither in use by products nor predefined can be deleted. [Catalog attributes][google.cloud.retail.v2.CatalogAttribute] that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.
bool in_use = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];getInUse in interface CatalogAttributeOrBuilderpublic int getTypeValue()
Output only. The type of this attribute. This is derived from the attribute in [Product.attributes][google.cloud.retail.v2.Product.attributes].
.google.cloud.retail.v2.CatalogAttribute.AttributeType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
getTypeValue in interface CatalogAttributeOrBuilderpublic CatalogAttribute.AttributeType getType()
Output only. The type of this attribute. This is derived from the attribute in [Product.attributes][google.cloud.retail.v2.Product.attributes].
.google.cloud.retail.v2.CatalogAttribute.AttributeType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
getType in interface CatalogAttributeOrBuilderpublic int getIndexableOptionValue()
When [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Must be specified, otherwise throws INVALID_FORMAT error.
.google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5;getIndexableOptionValue in interface CatalogAttributeOrBuilderpublic CatalogAttribute.IndexableOption getIndexableOption()
When [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Must be specified, otherwise throws INVALID_FORMAT error.
.google.cloud.retail.v2.CatalogAttribute.IndexableOption indexable_option = 5;getIndexableOption in interface CatalogAttributeOrBuilderpublic int getDynamicFacetableOptionValue()
If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if [CatalogAttribute.indexable_option][google.cloud.retail.v2.CatalogAttribute.indexable_option] is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. Must be specified, otherwise throws INVALID_FORMAT error.
.google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6;
getDynamicFacetableOptionValue in interface CatalogAttributeOrBuilderpublic CatalogAttribute.DynamicFacetableOption getDynamicFacetableOption()
If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if [CatalogAttribute.indexable_option][google.cloud.retail.v2.CatalogAttribute.indexable_option] is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. Must be specified, otherwise throws INVALID_FORMAT error.
.google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6;
getDynamicFacetableOption in interface CatalogAttributeOrBuilderpublic int getSearchableOptionValue()
When [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as there are no text values associated to numerical attributes. Must be specified, otherwise throws INVALID_FORMAT error.
.google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7;getSearchableOptionValue in interface CatalogAttributeOrBuilderpublic CatalogAttribute.SearchableOption getSearchableOption()
When [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level] is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as there are no text values associated to numerical attributes. Must be specified, otherwise throws INVALID_FORMAT error.
.google.cloud.retail.v2.CatalogAttribute.SearchableOption searchable_option = 7;getSearchableOption in interface CatalogAttributeOrBuilderpublic int getExactSearchableOptionValue()
If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED].
.google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11;
getExactSearchableOptionValue in interface CatalogAttributeOrBuilderpublic CatalogAttribute.ExactSearchableOption getExactSearchableOption()
If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED].
.google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11;
getExactSearchableOption in interface CatalogAttributeOrBuilderpublic int getRetrievableOptionValue()
If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to [RETRIEVABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED].
.google.cloud.retail.v2.CatalogAttribute.RetrievableOption retrievable_option = 12;
getRetrievableOptionValue in interface CatalogAttributeOrBuilderpublic CatalogAttribute.RetrievableOption getRetrievableOption()
If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to [RETRIEVABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED].
.google.cloud.retail.v2.CatalogAttribute.RetrievableOption retrievable_option = 12;
getRetrievableOption in interface CatalogAttributeOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static CatalogAttribute parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CatalogAttribute parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CatalogAttribute parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CatalogAttribute parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CatalogAttribute parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CatalogAttribute parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CatalogAttribute parseFrom(InputStream input) throws IOException
IOExceptionpublic static CatalogAttribute parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static CatalogAttribute parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static CatalogAttribute parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static CatalogAttribute parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static CatalogAttribute parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic CatalogAttribute.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static CatalogAttribute.Builder newBuilder()
public static CatalogAttribute.Builder newBuilder(CatalogAttribute prototype)
public CatalogAttribute.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected CatalogAttribute.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static CatalogAttribute getDefaultInstance()
public static com.google.protobuf.Parser<CatalogAttribute> parser()
public com.google.protobuf.Parser<CatalogAttribute> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public CatalogAttribute getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2023 Google LLC. All rights reserved.