Google Cloud Dialogflow V2 Client - Class AnnotatedMessagePart (1.0.1)

Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class AnnotatedMessagePart.

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.

Generated from protobuf message google.cloud.dialogflow.v2.AnnotatedMessagePart

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ text
string

A part of a message possibly annotated with an entity.

↳ entity_type
string

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

↳ formatted_value
Google\Protobuf\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:

{ "amount": 5, "currency": "USD" }

getText

A part of a message possibly annotated with an entity.

Generated from protobuf field string text = 1;

Returns
Type
Description
string

setText

A part of a message possibly annotated with an entity.

Generated from protobuf field string text = 1;

Parameter
Name
Description
var
string
Returns
Type
Description
$this

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.

Generated from protobuf field string entity_type = 2;

Returns
Type
Description
string

setEntityType

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

Generated from protobuf field string entity_type = 2;

Parameter
Name
Description
var
string
Returns
Type
Description
$this

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:

{
  "amount": 5,
  "currency": "USD"
}

Generated from protobuf field .google.protobuf.Value formatted_value = 3;

Returns
Type
Description
Google\Protobuf\Value|null

hasFormattedValue

clearFormattedValue

setFormattedValue

The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency , this may contain:

{
  "amount": 5,
  "currency": "USD"
}

Generated from protobuf field .google.protobuf.Value formatted_value = 3;

Parameter
Name
Description
var
Google\Protobuf\Value
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: