Google Cloud Dialogflow V2 Client - Class Fulfillment (1.0.1)

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

By default, your agent responds to a matched intent with a static response.

As an alternative, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. For more information, see the fulfillment guide.

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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Required. The unique identifier of the fulfillment. Supported formats: - projects/<Project ID>/agent/fulfillment - projects/<Project ID>/locations/<Location ID>/agent/fulfillment This field is not used for Fulfillment in an Environment.

↳ display_name string

Optional. The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.

↳ generic_web_service Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService

Configuration for a generic web service.

↳ enabled bool

Optional. Whether fulfillment is enabled.

↳ features array<Google\Cloud\Dialogflow\V2\Fulfillment\Feature>

Optional. The field defines whether the fulfillment is enabled for certain features.

getName

Required. The unique identifier of the fulfillment.

Supported formats:

  • projects/<Project ID>/agent/fulfillment
  • projects/<Project ID>/locations/<Location ID>/agent/fulfillment This field is not used for Fulfillment in an Environment.

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
string

setName

Required. The unique identifier of the fulfillment.

Supported formats:

  • projects/<Project ID>/agent/fulfillment
  • projects/<Project ID>/locations/<Location ID>/agent/fulfillment This field is not used for Fulfillment in an Environment.

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDisplayName

Optional. The human-readable name of the fulfillment, unique within the agent.

This field is not used for Fulfillment in an Environment.

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

Returns
TypeDescription
string

setDisplayName

Optional. The human-readable name of the fulfillment, unique within the agent.

This field is not used for Fulfillment in an Environment.

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getGenericWebService

Configuration for a generic web service.

Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.GenericWebService generic_web_service = 3;

Returns
TypeDescription
Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService|null

hasGenericWebService

setGenericWebService

Configuration for a generic web service.

Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.GenericWebService generic_web_service = 3;

Parameter
NameDescription
var Google\Cloud\Dialogflow\V2\Fulfillment\GenericWebService
Returns
TypeDescription
$this

getEnabled

Optional. Whether fulfillment is enabled.

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

Returns
TypeDescription
bool

setEnabled

Optional. Whether fulfillment is enabled.

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

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getFeatures

Optional. The field defines whether the fulfillment is enabled for certain features.

Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setFeatures

Optional. The field defines whether the fulfillment is enabled for certain features.

Generated from protobuf field repeated .google.cloud.dialogflow.v2.Fulfillment.Feature features = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var array<Google\Cloud\Dialogflow\V2\Fulfillment\Feature>
Returns
TypeDescription
$this

getFulfillment

Returns
TypeDescription
string