Google Cloud Dialogflow V2 Client - Class Part (1.0.1)

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

Represents a part of a training phrase.

Generated from protobuf message google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ text string

Required. The text for this part.

↳ entity_type string

Optional. The entity type name prefixed with @. This field is required for annotated parts of the training phrase.

↳ alias string

Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase.

↳ user_defined bool

Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true.

getText

Required. The text for this part.

Generated from protobuf field string text = 1;

Returns
TypeDescription
string

setText

Required. The text for this part.

Generated from protobuf field string text = 1;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getEntityType

Optional. The entity type name prefixed with @.

This field is required for annotated parts of the training phrase.

Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
string

setEntityType

Optional. The entity type name prefixed with @.

This field is required for annotated parts of the training phrase.

Generated from protobuf field string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAlias

Optional. The parameter name for the value extracted from the annotated part of the example.

This field is required for annotated parts of the training phrase.

Generated from protobuf field string alias = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
string

setAlias

Optional. The parameter name for the value extracted from the annotated part of the example.

This field is required for annotated parts of the training phrase.

Generated from protobuf field string alias = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUserDefined

Optional. Indicates whether the text was manually annotated.

This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true.

Generated from protobuf field bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
bool

setUserDefined

Optional. Indicates whether the text was manually annotated.

This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true.

Generated from protobuf field bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var bool
Returns
TypeDescription
$this