Google Cloud Dialogflow V2 Client - Class Environment (1.0.1)

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

You can create multiple versions of your agent and publish them to separate environments.

When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent. When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for:

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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The unique identifier of this agent environment. Supported formats: - projects/<Project ID>/agent/environments/<Environment ID> - projects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID> The environment ID for the default environment is -.

↳ description string

Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.

↳ agent_version string

Optional. The agent version loaded into this environment. Supported formats: - projects/<Project ID>/agent/versions/<Version ID> - projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>

↳ state int

Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.

↳ update_time Google\Protobuf\Timestamp

Output only. The last update time of this environment. This field is read-only, i.e., it cannot be set by create and update methods.

↳ text_to_speech_settings Google\Cloud\Dialogflow\V2\TextToSpeechSettings

Optional. Text to speech settings for this environment.

↳ fulfillment Google\Cloud\Dialogflow\V2\Fulfillment

Optional. The fulfillment settings to use for this environment.

getName

Output only. The unique identifier of this agent environment.

Supported formats:

  • projects/<Project ID>/agent/environments/<Environment ID>
  • projects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID> The environment ID for the default environment is -.

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

Returns
TypeDescription
string

setName

Output only. The unique identifier of this agent environment.

Supported formats:

  • projects/<Project ID>/agent/environments/<Environment ID>
  • projects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID> The environment ID for the default environment is -.

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

Optional. The developer-provided description for this environment.

The maximum length is 500 characters. If exceeded, the request is rejected.

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

Returns
TypeDescription
string

setDescription

Optional. The developer-provided description for this environment.

The maximum length is 500 characters. If exceeded, the request is rejected.

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAgentVersion

Optional. The agent version loaded into this environment.

Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>

Generated from protobuf field string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {

Returns
TypeDescription
string

setAgentVersion

Optional. The agent version loaded into this environment.

Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>

Generated from protobuf field string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getState

Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.

Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

setState

Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.

Generated from protobuf field .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getUpdateTime

Output only. The last update time of this environment. This field is read-only, i.e., it cannot be set by create and update methods.

Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The last update time of this environment. This field is read-only, i.e., it cannot be set by create and update methods.

Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getTextToSpeechSettings

Optional. Text to speech settings for this environment.

Generated from protobuf field .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Google\Cloud\Dialogflow\V2\TextToSpeechSettings|null

hasTextToSpeechSettings

clearTextToSpeechSettings

setTextToSpeechSettings

Optional. Text to speech settings for this environment.

Generated from protobuf field .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

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

getFulfillment

Optional. The fulfillment settings to use for this environment.

Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

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

hasFulfillment

clearFulfillment

setFulfillment

Optional. The fulfillment settings to use for this environment.

Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

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