public static final class CustomAttribute.Builder extends com.google.protobuf.GeneratedMessage.Builder<CustomAttribute.Builder> implements CustomAttributeOrBuilder
A custom attribute that is not explicitly modeled in a resource, e.g. [UserEvent][google.cloud.discoveryengine.v1.UserEvent].Protobuf type
google.cloud.discoveryengine.v1.CustomAttribute| Modifier and Type | Method and Description |
|---|---|
CustomAttribute.Builder |
addAllNumbers(Iterable<? extends Double> values)
The numerical values of this custom attribute.
|
CustomAttribute.Builder |
addAllText(Iterable<String> values)
The textual values of this custom attribute.
|
CustomAttribute.Builder |
addNumbers(double value)
The numerical values of this custom attribute.
|
CustomAttribute.Builder |
addText(String value)
The textual values of this custom attribute.
|
CustomAttribute.Builder |
addTextBytes(com.google.protobuf.ByteString value)
The textual values of this custom attribute.
|
CustomAttribute |
build() |
CustomAttribute |
buildPartial() |
CustomAttribute.Builder |
clear() |
CustomAttribute.Builder |
clearNumbers()
The numerical values of this custom attribute.
|
CustomAttribute.Builder |
clearText()
The textual values of this custom attribute.
|
CustomAttribute |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
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.
|
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.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
CustomAttribute.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
CustomAttribute.Builder |
mergeFrom(CustomAttribute other) |
CustomAttribute.Builder |
mergeFrom(com.google.protobuf.Message other) |
CustomAttribute.Builder |
setNumbers(int index,
double value)
The numerical values of this custom attribute.
|
CustomAttribute.Builder |
setText(int index,
String value)
The textual values of this custom attribute.
|
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CustomAttribute.Builder>public CustomAttribute.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<CustomAttribute.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<CustomAttribute.Builder>public CustomAttribute getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic CustomAttribute build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic CustomAttribute buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic CustomAttribute.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<CustomAttribute.Builder>public CustomAttribute.Builder mergeFrom(CustomAttribute other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<CustomAttribute.Builder>public CustomAttribute.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<CustomAttribute.Builder>IOExceptionpublic 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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated string text = 1;getTextList in interface CustomAttributeOrBuilderpublic 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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated string text = 1;getTextCount in interface CustomAttributeOrBuilderpublic 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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated string text = 1;getText in interface CustomAttributeOrBuilderindex - The index of the element to return.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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated string text = 1;getTextBytes in interface CustomAttributeOrBuilderindex - The index of the value to return.public CustomAttribute.Builder setText(int index, String value)
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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated string text = 1;index - The index to set the value at.value - The text to set.public CustomAttribute.Builder addText(String value)
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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated string text = 1;value - The text to add.public CustomAttribute.Builder addAllText(Iterable<String> values)
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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated string text = 1;values - The text to add.public CustomAttribute.Builder clearText()
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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated string text = 1;public CustomAttribute.Builder addTextBytes(com.google.protobuf.ByteString value)
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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated string text = 1;value - The bytes of the text to add.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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated double numbers = 2;getNumbersList in interface CustomAttributeOrBuilderpublic int getNumbersCount()
The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated double numbers = 2;getNumbersCount in interface CustomAttributeOrBuilderpublic 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 [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated double numbers = 2;getNumbers in interface CustomAttributeOrBuilderindex - The index of the element to return.public CustomAttribute.Builder setNumbers(int index, double value)
The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated double numbers = 2;index - The index to set the value at.value - The numbers to set.public CustomAttribute.Builder addNumbers(double value)
The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated double numbers = 2;value - The numbers to add.public CustomAttribute.Builder addAllNumbers(Iterable<? extends Double> values)
The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated double numbers = 2;values - The numbers to add.public CustomAttribute.Builder clearNumbers()
The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] or [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
repeated double numbers = 2;Copyright © 2026 Google LLC. All rights reserved.