Class AnnotatedMessagePart.Builder (4.4.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.v2.AnnotatedMessagePart

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AnnotatedMessagePart build()
Returns
TypeDescription
AnnotatedMessagePart

buildPartial()

public AnnotatedMessagePart buildPartial()
Returns
TypeDescription
AnnotatedMessagePart

clear()

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

clearEntityType()

public AnnotatedMessagePart.Builder clearEntityType()

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
TypeDescription
AnnotatedMessagePart.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearFormattedValue()

public AnnotatedMessagePart.Builder clearFormattedValue()

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
TypeDescription
AnnotatedMessagePart.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearText()

public AnnotatedMessagePart.Builder clearText()

A part of a message possibly annotated with an entity.

string text = 1;

Returns
TypeDescription
AnnotatedMessagePart.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public AnnotatedMessagePart getDefaultInstanceForType()
Returns
TypeDescription
AnnotatedMessagePart

getDescriptor()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEntityType()

public String getEntityType()

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
TypeDescription
String

The entityType.

getEntityTypeBytes()

public ByteString getEntityTypeBytes()

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
TypeDescription
ByteString

The bytes for entityType.

getFormattedValue()

public Value getFormattedValue()

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
TypeDescription
Value

The formattedValue.

getFormattedValueBuilder()

public Value.Builder getFormattedValueBuilder()

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
TypeDescription
Builder

getFormattedValueOrBuilder()

public ValueOrBuilder getFormattedValueOrBuilder()

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
TypeDescription
ValueOrBuilder

getText()

public String getText()

A part of a message possibly annotated with an entity.

string text = 1;

Returns
TypeDescription
String

The text.

getTextBytes()

public ByteString getTextBytes()

A part of a message possibly annotated with an entity.

string text = 1;

Returns
TypeDescription
ByteString

The bytes for text.

hasFormattedValue()

public boolean hasFormattedValue()

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
TypeDescription
boolean

Whether the formattedValue field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFormattedValue(Value value)

public AnnotatedMessagePart.Builder mergeFormattedValue(Value value)

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
NameDescription
valueValue
Returns
TypeDescription
AnnotatedMessagePart.Builder

mergeFrom(AnnotatedMessagePart other)

public AnnotatedMessagePart.Builder mergeFrom(AnnotatedMessagePart other)
Parameter
NameDescription
otherAnnotatedMessagePart
Returns
TypeDescription
AnnotatedMessagePart.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setEntityType(String value)

public AnnotatedMessagePart.Builder setEntityType(String value)

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
NameDescription
valueString

The entityType to set.

Returns
TypeDescription
AnnotatedMessagePart.Builder

This builder for chaining.

setEntityTypeBytes(ByteString value)

public AnnotatedMessagePart.Builder setEntityTypeBytes(ByteString value)

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
NameDescription
valueByteString

The bytes for entityType to set.

Returns
TypeDescription
AnnotatedMessagePart.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setFormattedValue(Value value)

public AnnotatedMessagePart.Builder setFormattedValue(Value value)

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
NameDescription
valueValue
Returns
TypeDescription
AnnotatedMessagePart.Builder

setFormattedValue(Value.Builder builderForValue)

public AnnotatedMessagePart.Builder setFormattedValue(Value.Builder builderForValue)

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
NameDescription
builderForValueBuilder
Returns
TypeDescription
AnnotatedMessagePart.Builder

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

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

setText(String value)

public AnnotatedMessagePart.Builder setText(String value)

A part of a message possibly annotated with an entity.

string text = 1;

Parameter
NameDescription
valueString

The text to set.

Returns
TypeDescription
AnnotatedMessagePart.Builder

This builder for chaining.

setTextBytes(ByteString value)

public AnnotatedMessagePart.Builder setTextBytes(ByteString value)

A part of a message possibly annotated with an entity.

string text = 1;

Parameter
NameDescription
valueByteString

The bytes for text to set.

Returns
TypeDescription
AnnotatedMessagePart.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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