Class AnnotatedMessagePart.Builder (4.10.0)

public static final class AnnotatedMessagePart.Builder extends GeneratedMessageV3.Builder<AnnotatedMessagePart.Builder> implements AnnotatedMessagePartOrBuilder

Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.

Protobuf type google.cloud.dialogflow.v2beta1.AnnotatedMessagePart

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AnnotatedMessagePart.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides

build()

public AnnotatedMessagePart build()
Returns
Type Description
AnnotatedMessagePart

buildPartial()

public AnnotatedMessagePart buildPartial()
Returns
Type Description
AnnotatedMessagePart

clear()

public AnnotatedMessagePart.Builder clear()
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides

clearEntityType()

public AnnotatedMessagePart.Builder clearEntityType()

Optional. The Dialogflow system entity type of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.

string entity_type = 2;

Returns
Type Description
AnnotatedMessagePart.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AnnotatedMessagePart.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides

clearFormattedValue()

public AnnotatedMessagePart.Builder clearFormattedValue()

Optional. The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency, this may contain: <pre> { "amount": 5, "currency": "USD" } </pre>

.google.protobuf.Value formatted_value = 3;

Returns
Type Description
AnnotatedMessagePart.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AnnotatedMessagePart.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides

clearText()

public AnnotatedMessagePart.Builder clearText()

Required. A part of a message possibly annotated with an entity.

string text = 1;

Returns
Type Description
AnnotatedMessagePart.Builder

This builder for chaining.

clone()

public AnnotatedMessagePart.Builder clone()
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides

getDefaultInstanceForType()

public AnnotatedMessagePart getDefaultInstanceForType()
Returns
Type Description
AnnotatedMessagePart

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEntityType()

public String getEntityType()

Optional. The Dialogflow system entity type of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.

string entity_type = 2;

Returns
Type Description
String

The entityType.

getEntityTypeBytes()

public ByteString getEntityTypeBytes()

Optional. The Dialogflow system entity type of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.

string entity_type = 2;

Returns
Type Description
ByteString

The bytes for entityType.

getFormattedValue()

public Value getFormattedValue()

Optional. The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency, this may contain: <pre> { "amount": 5, "currency": "USD" } </pre>

.google.protobuf.Value formatted_value = 3;

Returns
Type Description
Value

The formattedValue.

getFormattedValueBuilder()

public Value.Builder getFormattedValueBuilder()

Optional. The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency, this may contain: <pre> { "amount": 5, "currency": "USD" } </pre>

.google.protobuf.Value formatted_value = 3;

Returns
Type Description
Builder

getFormattedValueOrBuilder()

public ValueOrBuilder getFormattedValueOrBuilder()

Optional. The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency, this may contain: <pre> { "amount": 5, "currency": "USD" } </pre>

.google.protobuf.Value formatted_value = 3;

Returns
Type Description
ValueOrBuilder

getText()

public String getText()

Required. A part of a message possibly annotated with an entity.

string text = 1;

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

Required. A part of a message possibly annotated with an entity.

string text = 1;

Returns
Type Description
ByteString

The bytes for text.

hasFormattedValue()

public boolean hasFormattedValue()

Optional. The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency, this may contain: <pre> { "amount": 5, "currency": "USD" } </pre>

.google.protobuf.Value formatted_value = 3;

Returns
Type Description
boolean

Whether the formattedValue field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFormattedValue(Value value)

public AnnotatedMessagePart.Builder mergeFormattedValue(Value value)

Optional. The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency, this may contain: <pre> { "amount": 5, "currency": "USD" } </pre>

.google.protobuf.Value formatted_value = 3;

Parameter
Name Description
value Value
Returns
Type Description
AnnotatedMessagePart.Builder

mergeFrom(AnnotatedMessagePart other)

public AnnotatedMessagePart.Builder mergeFrom(AnnotatedMessagePart other)
Parameter
Name Description
other AnnotatedMessagePart
Returns
Type Description
AnnotatedMessagePart.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AnnotatedMessagePart.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides Exceptions
Type Description
IOException

mergeFrom(Message other)

public AnnotatedMessagePart.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnnotatedMessagePart.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides

setEntityType(String value)

public AnnotatedMessagePart.Builder setEntityType(String value)

Optional. The Dialogflow system entity type of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.

string entity_type = 2;

Parameter
Name Description
value String

The entityType to set.

Returns
Type Description
AnnotatedMessagePart.Builder

This builder for chaining.

setEntityTypeBytes(ByteString value)

public AnnotatedMessagePart.Builder setEntityTypeBytes(ByteString value)

Optional. The Dialogflow system entity type of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.

string entity_type = 2;

Parameter
Name Description
value ByteString

The bytes for entityType to set.

Returns
Type Description
AnnotatedMessagePart.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AnnotatedMessagePart.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides

setFormattedValue(Value value)

public AnnotatedMessagePart.Builder setFormattedValue(Value value)

Optional. The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency, this may contain: <pre> { "amount": 5, "currency": "USD" } </pre>

.google.protobuf.Value formatted_value = 3;

Parameter
Name Description
value Value
Returns
Type Description
AnnotatedMessagePart.Builder

setFormattedValue(Value.Builder builderForValue)

public AnnotatedMessagePart.Builder setFormattedValue(Value.Builder builderForValue)

Optional. The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency, this may contain: <pre> { "amount": 5, "currency": "USD" } </pre>

.google.protobuf.Value formatted_value = 3;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AnnotatedMessagePart.Builder

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

public AnnotatedMessagePart.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides

setText(String value)

public AnnotatedMessagePart.Builder setText(String value)

Required. A part of a message possibly annotated with an entity.

string text = 1;

Parameter
Name Description
value String

The text to set.

Returns
Type Description
AnnotatedMessagePart.Builder

This builder for chaining.

setTextBytes(ByteString value)

public AnnotatedMessagePart.Builder setTextBytes(ByteString value)

Required. A part of a message possibly annotated with an entity.

string text = 1;

Parameter
Name Description
value ByteString

The bytes for text to set.

Returns
Type Description
AnnotatedMessagePart.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final AnnotatedMessagePart.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnnotatedMessagePart.Builder
Overrides