Class MessageAnnotation.Builder (4.6.0)

public static final class MessageAnnotation.Builder extends GeneratedMessageV3.Builder<MessageAnnotation.Builder> implements MessageAnnotationOrBuilder

Represents the result of annotation for the message.

Protobuf type google.cloud.dialogflow.v2beta1.MessageAnnotation

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllParts(Iterable<? extends AnnotatedMessagePart> values)

public MessageAnnotation.Builder addAllParts(Iterable<? extends AnnotatedMessagePart> values)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart>
Returns
TypeDescription
MessageAnnotation.Builder

addParts(AnnotatedMessagePart value)

public MessageAnnotation.Builder addParts(AnnotatedMessagePart value)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameter
NameDescription
valueAnnotatedMessagePart
Returns
TypeDescription
MessageAnnotation.Builder

addParts(AnnotatedMessagePart.Builder builderForValue)

public MessageAnnotation.Builder addParts(AnnotatedMessagePart.Builder builderForValue)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameter
NameDescription
builderForValueAnnotatedMessagePart.Builder
Returns
TypeDescription
MessageAnnotation.Builder

addParts(int index, AnnotatedMessagePart value)

public MessageAnnotation.Builder addParts(int index, AnnotatedMessagePart value)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameters
NameDescription
indexint
valueAnnotatedMessagePart
Returns
TypeDescription
MessageAnnotation.Builder

addParts(int index, AnnotatedMessagePart.Builder builderForValue)

public MessageAnnotation.Builder addParts(int index, AnnotatedMessagePart.Builder builderForValue)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameters
NameDescription
indexint
builderForValueAnnotatedMessagePart.Builder
Returns
TypeDescription
MessageAnnotation.Builder

addPartsBuilder()

public AnnotatedMessagePart.Builder addPartsBuilder()

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Returns
TypeDescription
AnnotatedMessagePart.Builder

addPartsBuilder(int index)

public AnnotatedMessagePart.Builder addPartsBuilder(int index)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotatedMessagePart.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MessageAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MessageAnnotation.Builder
Overrides

build()

public MessageAnnotation build()
Returns
TypeDescription
MessageAnnotation

buildPartial()

public MessageAnnotation buildPartial()
Returns
TypeDescription
MessageAnnotation

clear()

public MessageAnnotation.Builder clear()
Returns
TypeDescription
MessageAnnotation.Builder
Overrides

clearContainEntities()

public MessageAnnotation.Builder clearContainEntities()

Required. Indicates whether the text message contains entities.

bool contain_entities = 2;

Returns
TypeDescription
MessageAnnotation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public MessageAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
MessageAnnotation.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public MessageAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
MessageAnnotation.Builder
Overrides

clearParts()

public MessageAnnotation.Builder clearParts()

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Returns
TypeDescription
MessageAnnotation.Builder

clone()

public MessageAnnotation.Builder clone()
Returns
TypeDescription
MessageAnnotation.Builder
Overrides

getContainEntities()

public boolean getContainEntities()

Required. Indicates whether the text message contains entities.

bool contain_entities = 2;

Returns
TypeDescription
boolean

The containEntities.

getDefaultInstanceForType()

public MessageAnnotation getDefaultInstanceForType()
Returns
TypeDescription
MessageAnnotation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getParts(int index)

public AnnotatedMessagePart getParts(int index)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotatedMessagePart

getPartsBuilder(int index)

public AnnotatedMessagePart.Builder getPartsBuilder(int index)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotatedMessagePart.Builder

getPartsBuilderList()

public List<AnnotatedMessagePart.Builder> getPartsBuilderList()

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Returns
TypeDescription
List<Builder>

getPartsCount()

public int getPartsCount()

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Returns
TypeDescription
int

getPartsList()

public List<AnnotatedMessagePart> getPartsList()

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Returns
TypeDescription
List<AnnotatedMessagePart>

getPartsOrBuilder(int index)

public AnnotatedMessagePartOrBuilder getPartsOrBuilder(int index)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotatedMessagePartOrBuilder

getPartsOrBuilderList()

public List<? extends AnnotatedMessagePartOrBuilder> getPartsOrBuilderList()

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.v2beta1.AnnotatedMessagePartOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(MessageAnnotation other)

public MessageAnnotation.Builder mergeFrom(MessageAnnotation other)
Parameter
NameDescription
otherMessageAnnotation
Returns
TypeDescription
MessageAnnotation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MessageAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MessageAnnotation.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public MessageAnnotation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
MessageAnnotation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MessageAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MessageAnnotation.Builder
Overrides

removeParts(int index)

public MessageAnnotation.Builder removeParts(int index)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
MessageAnnotation.Builder

setContainEntities(boolean value)

public MessageAnnotation.Builder setContainEntities(boolean value)

Required. Indicates whether the text message contains entities.

bool contain_entities = 2;

Parameter
NameDescription
valueboolean

The containEntities to set.

Returns
TypeDescription
MessageAnnotation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public MessageAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MessageAnnotation.Builder
Overrides

setParts(int index, AnnotatedMessagePart value)

public MessageAnnotation.Builder setParts(int index, AnnotatedMessagePart value)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameters
NameDescription
indexint
valueAnnotatedMessagePart
Returns
TypeDescription
MessageAnnotation.Builder

setParts(int index, AnnotatedMessagePart.Builder builderForValue)

public MessageAnnotation.Builder setParts(int index, AnnotatedMessagePart.Builder builderForValue)

Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

repeated .google.cloud.dialogflow.v2beta1.AnnotatedMessagePart parts = 1;

Parameters
NameDescription
indexint
builderForValueAnnotatedMessagePart.Builder
Returns
TypeDescription
MessageAnnotation.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public MessageAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
MessageAnnotation.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final MessageAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MessageAnnotation.Builder
Overrides