public sealed class Environment : IMessage<Environment>, IEquatable<Environment>, IDeepCloneable<Environment>, IBufferMessage, IMessage
Reference documentation and code samples for the Dialogflow v3 API class Environment.
Represents an environment for an agent. 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.
public RepeatedField<Environment.Types.VersionConfig> VersionConfigs { get; }
A list of configurations for flow versions. You should include version
configs for all flows that are reachable from [Start
Flow][Agent.start_flow] in the agent. Otherwise, an error will be
returned.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eEnvironment\u003c/code\u003e class within the Google.Cloud.Dialogflow.Cx.V3 namespace, detailing various versions of the Dialogflow v3 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEnvironment\u003c/code\u003e class, which is used for managing agent environments, allows you to create and manage multiple versions of an agent, and it implements several interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eEnvironment\u003c/code\u003e class include \u003ccode\u003eDescription\u003c/code\u003e, \u003ccode\u003eDisplayName\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eTestCasesConfig\u003c/code\u003e, \u003ccode\u003eUpdateTime\u003c/code\u003e, \u003ccode\u003eVersionConfigs\u003c/code\u003e, and \u003ccode\u003eWebhookConfig\u003c/code\u003e, which are used to configure and manage the agent's behavior and testing within an environment.\u003c/p\u003e\n"],["\u003cp\u003eThe document lists versions of the Dialogflow v3 API from 1.0.0 to 2.23.0, with 2.23.0 being the latest, providing links to each version's specific documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEnvironment\u003c/code\u003e class allows for the management of agent versions through environments, such as testing, development, and production, with the ability to set configurations for flows and webhooks.\u003c/p\u003e\n"]]],[],null,["# Dialogflow v3 API - Class Environment (2.24.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.24.0 (latest)](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.23.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.23.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.22.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.22.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.21.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.21.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.20.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.20.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.19.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.19.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.18.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.18.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.17.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.17.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.16.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.15.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.14.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.13.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.12.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.11.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.10.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.9.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.8.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.7.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.6.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.5.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.4.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.3.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.2.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.1.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/2.0.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.13.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.13.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.12.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.12.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.11.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.11.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.10.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.10.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.9.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.9.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.8.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.7.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.6.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.5.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.4.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.3.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.2.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.1.0/Google.Cloud.Dialogflow.Cx.V3.Environment)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/1.0.0/Google.Cloud.Dialogflow.Cx.V3.Environment) \n\n public sealed class Environment : IMessage\u003cEnvironment\u003e, IEquatable\u003cEnvironment\u003e, IDeepCloneable\u003cEnvironment\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Dialogflow v3 API class Environment.\n\nRepresents an environment for an agent. You can create multiple versions\nof your agent and publish them to separate environments. When you edit an\nagent, you are editing the draft agent. At any point, you can save the draft\nagent as an agent version, which is an immutable snapshot of your agent. When\nyou save the draft agent, it is published to the default environment. When\nyou create agent versions, you can publish them to custom environments. You\ncan create a variety of custom environments for testing, development,\nproduction, etc. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Environment \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Environment](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Environment), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Environment](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Environment), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Environment](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Environment), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Dialogflow.Cx.V3](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3)\n\nAssembly\n--------\n\nGoogle.Cloud.Dialogflow.Cx.V3.dll\n\nConstructors\n------------\n\n### Environment()\n\n public Environment()\n\n### Environment(Environment)\n\n public Environment(Environment other)\n\nProperties\n----------\n\n### Description\n\n public string Description { get; set; }\n\nThe human-readable description of the environment. The maximum length is\n500 characters. If exceeded, the request is rejected.\n\n### DisplayName\n\n public string DisplayName { get; set; }\n\nRequired. The human-readable name of the environment (unique in an agent).\nLimit of 64 characters.\n\n### EnvironmentName\n\n public EnvironmentName EnvironmentName { get; set; }\n\n[EnvironmentName](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.EnvironmentName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Environment#Google_Cloud_Dialogflow_Cx_V3_Environment_Name) resource name property.\n\n### Name\n\n public string Name { get; set; }\n\nThe name of the environment.\nFormat:\n`projects/\u003cProjectID\u003e/locations/\u003cLocationID\u003e/agents/\u003cAgentID\u003e/environments/\u003cEnvironmentID\u003e`.\n\n### TestCasesConfig\n\n public Environment.Types.TestCasesConfig TestCasesConfig { get; set; }\n\nThe test cases config for continuous tests of this environment.\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\n\nOutput only. Update time of this environment.\n\n### VersionConfigs\n\n public RepeatedField\u003cEnvironment.Types.VersionConfig\u003e VersionConfigs { get; }\n\nA list of configurations for flow versions. You should include version\nconfigs for all flows that are reachable from \\[`Start\nFlow`\\]\\[Agent.start_flow\\] in the agent. Otherwise, an error will be\nreturned.\n\n### WebhookConfig\n\n public Environment.Types.WebhookConfig WebhookConfig { get; set; }\n\nThe webhook configuration for this environment."]]