Class CustomAttribute.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
- com.google.cloud.discoveryengine.v1.CustomAttribute.Builder
-
- All Implemented Interfaces:
CustomAttributeOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- CustomAttribute
public static final class CustomAttribute.Builder extends com.google.protobuf.GeneratedMessageV3.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 typegoogle.cloud.discoveryengine.v1.CustomAttribute
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomAttribute.BuilderaddAllNumbers(Iterable<? extends Double> values)The numerical values of this custom attribute.CustomAttribute.BuilderaddAllText(Iterable<String> values)The textual values of this custom attribute.CustomAttribute.BuilderaddNumbers(double value)The numerical values of this custom attribute.CustomAttribute.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)CustomAttribute.BuilderaddText(String value)The textual values of this custom attribute.CustomAttribute.BuilderaddTextBytes(com.google.protobuf.ByteString value)The textual values of this custom attribute.CustomAttributebuild()CustomAttributebuildPartial()CustomAttribute.Builderclear()CustomAttribute.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)CustomAttribute.BuilderclearNumbers()The numerical values of this custom attribute.CustomAttribute.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)CustomAttribute.BuilderclearText()The textual values of this custom attribute.CustomAttribute.Builderclone()CustomAttributegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()doublegetNumbers(int index)The numerical values of this custom attribute.intgetNumbersCount()The numerical values of this custom attribute.List<Double>getNumbersList()The numerical values of this custom attribute.StringgetText(int index)The textual values of this custom attribute.com.google.protobuf.ByteStringgetTextBytes(int index)The textual values of this custom attribute.intgetTextCount()The textual values of this custom attribute.com.google.protobuf.ProtocolStringListgetTextList()The textual values of this custom attribute.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()CustomAttribute.BuildermergeFrom(CustomAttribute other)CustomAttribute.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)CustomAttribute.BuildermergeFrom(com.google.protobuf.Message other)CustomAttribute.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)CustomAttribute.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)CustomAttribute.BuildersetNumbers(int index, double value)The numerical values of this custom attribute.CustomAttribute.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)CustomAttribute.BuildersetText(int index, String value)The textual values of this custom attribute.CustomAttribute.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
clear
public CustomAttribute.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
getDefaultInstanceForType
public CustomAttribute getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public CustomAttribute build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public CustomAttribute buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public CustomAttribute.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
setField
public CustomAttribute.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
clearField
public CustomAttribute.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
clearOneof
public CustomAttribute.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
setRepeatedField
public CustomAttribute.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
addRepeatedField
public CustomAttribute.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
mergeFrom
public CustomAttribute.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CustomAttribute.Builder>
-
mergeFrom
public CustomAttribute.Builder mergeFrom(CustomAttribute other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
mergeFrom
public CustomAttribute.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CustomAttribute.Builder>- Throws:
IOException
-
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 [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;- Specified by:
getTextListin 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 [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;- Specified by:
getTextCountin 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 [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;- Specified by:
getTextin 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 [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;- Specified by:
getTextBytesin interfaceCustomAttributeOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the text at the given index.
-
setText
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;- Parameters:
index- The index to set the value at.value- The text to set.- Returns:
- This builder for chaining.
-
addText
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;- Parameters:
value- The text to add.- Returns:
- This builder for chaining.
-
addAllText
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;- Parameters:
values- The text to add.- Returns:
- This builder for chaining.
-
clearText
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;- Returns:
- This builder for chaining.
-
addTextBytes
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;- Parameters:
value- The bytes of the text to add.- Returns:
- This builder for chaining.
-
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 [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;- Specified by:
getNumbersListin 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 [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;- Specified by:
getNumbersCountin 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 [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;- Specified by:
getNumbersin interfaceCustomAttributeOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The numbers at the given index.
-
setNumbers
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;- Parameters:
index- The index to set the value at.value- The numbers to set.- Returns:
- This builder for chaining.
-
addNumbers
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;- Parameters:
value- The numbers to add.- Returns:
- This builder for chaining.
-
addAllNumbers
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;- Parameters:
values- The numbers to add.- Returns:
- This builder for chaining.
-
clearNumbers
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;- Returns:
- This builder for chaining.
-
setUnknownFields
public final CustomAttribute.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
mergeUnknownFields
public final CustomAttribute.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
-
-