Service Client: Google::Cloud::Dialogflow::V2::Environment::EnvironmentsClient

Client stub representing the remote Environments gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to dialogflow.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Dialogflow::V2::Environment - Compiled Protocol Buffers messages for google/cloud/dialogflow/v2/environment.proto

SYNOPSIS

use Google::Cloud::Dialogflow::V2::Environment;

my $msg = Google::Cloud::Dialogflow::V2::Environment::Environment->new({
    name => $name,
    description => $description,
    agent_version => $agent_version,
    state => $state,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Dialogflow::V2::Environment::Environment->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/v2/environment.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Dialogflow::V2::Environment::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:

- testing - development - production - etc.

For more information, see the [versions and environments guide](https://cloud.google.com/dialogflow/docs/agents-versions).

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: 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 `-`.

  • $msg->description() / $msg->description($value)

    Type: String

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

  • $msg->agent_version() / $msg->agent_version($value)

    Type: 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>`

  • $msg->state() / $msg->state($value)

    Type: Enum (Google::Cloud::Dialogflow::V2::Environment::State)

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

  • $msg->update_time() / $msg->update_time($value)

    Type: Message (Google::Protobuf::Timestamp::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.

  • $msg->text_to_speech_settings() / $msg->text_to_speech_settings($value)

    Type: Message (Google::Cloud::Dialogflow::V2::Environment::TextToSpeechSettings)

    Optional. Text to speech settings for this environment.

  • $msg->fulfillment() / $msg->fulfillment($value)

    Type: Message (Google::Cloud::Dialogflow::V2::Fulfillment::Fulfillment)

    Optional. The fulfillment settings to use for this environment.

Enum: Environment::State

  • STATE_UNSPECIFIED => 0

  • STOPPED => 1

  • LOADING => 2

  • RUNNING => 3

Google::Cloud::Dialogflow::V2::Environment::TextToSpeechSettings

Instructs the speech synthesizer on how to generate the output audio content.

Inherits from Protobuf::Message.

Accessors

  • $msg->enable_text_to_speech() / $msg->enable_text_to_speech($value)

    Type: Bool

    Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.

  • $msg->output_audio_encoding() / $msg->output_audio_encoding($value)

    Type: Enum (Google::Cloud::Dialogflow::V2::OutputAudioEncoding)

    Required. Audio encoding of the synthesized audio content.

  • $msg->sample_rate_hertz() / $msg->sample_rate_hertz($value)

    Type: Int32

    Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).

  • $msg->synthesize_speech_configs() / $msg->synthesize_speech_configs($value)

    Type: Message (Google::Cloud::Dialogflow::V2::Environment::TextToSpeechSettings::SynthesizeSpeechConfigsEntry)

    Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.

Google::Cloud::Dialogflow::V2::Environment::ListEnvironmentsRequest

The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The agent to list all environments from. Format:

    - `projects/<Project ID>/agent` - `projects/<Project ID>/locations/<Location ID>/agent`

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. The next_page_token value returned from a previous list request.

Google::Cloud::Dialogflow::V2::Environment::ListEnvironmentsResponse

The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments].

Inherits from Protobuf::Message.

Accessors

  • $msg->environments() / $msg->environments($value)

    Type: Message (Google::Cloud::Dialogflow::V2::Environment::Environment)

    The list of agent environments. There will be a maximum number of items returned based on the page_size field in the request.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    Token to retrieve the next page of results, or empty if there are no more results in the list.

Google::Cloud::Dialogflow::V2::Environment::GetEnvironmentRequest

The request message for [Environments.GetEnvironment][google.cloud.dialogflow.v2.Environments.GetEnvironment].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the 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 `-`.

Google::Cloud::Dialogflow::V2::Environment::CreateEnvironmentRequest

The request message for [Environments.CreateEnvironment][google.cloud.dialogflow.v2.Environments.CreateEnvironment].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The agent to create an environment for. Supported formats:

    - `projects/<Project ID>/agent` - `projects/<Project ID>/locations/<Location ID>/agent`

  • $msg->environment() / $msg->environment($value)

    Type: Message (Google::Cloud::Dialogflow::V2::Environment::Environment)

    Required. The environment to create.

  • $msg->environment_id() / $msg->environment_id($value)

    Type: String

    Required. The unique id of the new environment.

Google::Cloud::Dialogflow::V2::Environment::UpdateEnvironmentRequest

The request message for [Environments.UpdateEnvironment][google.cloud.dialogflow.v2.Environments.UpdateEnvironment].

Inherits from Protobuf::Message.

Accessors

  • $msg->environment() / $msg->environment($value)

    Type: Message (Google::Cloud::Dialogflow::V2::Environment::Environment)

    Required. The environment to update.

  • $msg->update_mask() / $msg->update_mask($value)

    Type: Message (Google::Protobuf::FieldMask::FieldMask)

    Required. The mask to control which fields get updated.

  • $msg->allow_load_to_draft_and_discard_changes() / $msg->allow_load_to_draft_and_discard_changes($value)

    Type: Bool

    Optional. This field is used to prevent accidental overwrite of the default environment, which is an operation that cannot be undone. To confirm that the caller desires this overwrite, this field must be explicitly set to true when updating the default environment (environment ID = `-`).

Google::Cloud::Dialogflow::V2::Environment::DeleteEnvironmentRequest

The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.v2.Environments.DeleteEnvironment].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the environment to delete. / Format:

    - `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 `-`.

Google::Cloud::Dialogflow::V2::Environment::GetEnvironmentHistoryRequest

The request message for [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The name of the environment to retrieve history for. 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 `-`.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. The next_page_token value returned from a previous list request.

Google::Cloud::Dialogflow::V2::Environment::EnvironmentHistory

The response message for [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Output only. The name of the environment this history is for. 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 `-`.

  • $msg->entries() / $msg->entries($value)

    Type: Message (Google::Cloud::Dialogflow::V2::Environment::EnvironmentHistory::Entry)

    Output only. The list of agent environments. There will be a maximum number of items returned based on the page_size field in the request.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    Output only. Token to retrieve the next page of results, or empty if there are no more results in the list.

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Dialogflow::V2::Environment::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.