#[non_exhaustive]pub struct Environment {
pub name: String,
pub description: String,
pub agent_version: String,
pub state: State,
pub update_time: Option<Timestamp>,
pub text_to_speech_settings: Option<TextToSpeechSettings>,
pub fulfillment: Option<Fulfillment>,
/* private fields */
}environments only.Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput 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: StringOptional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.
agent_version: StringOptional. 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: StateOutput only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
update_time: Option<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: Option<TextToSpeechSettings>Optional. Text to speech settings for this environment.
fulfillment: Option<Fulfillment>Optional. The fulfillment settings to use for this environment.
Implementations§
Source§impl Environment
impl Environment
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_agent_version<T: Into<String>>(self, v: T) -> Self
pub fn set_agent_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Environment::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Environment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Environment::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_text_to_speech_settings<T>(self, v: T) -> Selfwhere
T: Into<TextToSpeechSettings>,
pub fn set_text_to_speech_settings<T>(self, v: T) -> Selfwhere
T: Into<TextToSpeechSettings>,
Sets the value of text_to_speech_settings.
§Example
use google_cloud_dialogflow_v2::model::TextToSpeechSettings;
let x = Environment::new().set_text_to_speech_settings(TextToSpeechSettings::default()/* use setters */);Sourcepub fn set_or_clear_text_to_speech_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<TextToSpeechSettings>,
pub fn set_or_clear_text_to_speech_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<TextToSpeechSettings>,
Sets or clears the value of text_to_speech_settings.
§Example
use google_cloud_dialogflow_v2::model::TextToSpeechSettings;
let x = Environment::new().set_or_clear_text_to_speech_settings(Some(TextToSpeechSettings::default()/* use setters */));
let x = Environment::new().set_or_clear_text_to_speech_settings(None::<TextToSpeechSettings>);Sourcepub fn set_fulfillment<T>(self, v: T) -> Selfwhere
T: Into<Fulfillment>,
pub fn set_fulfillment<T>(self, v: T) -> Selfwhere
T: Into<Fulfillment>,
Sets the value of fulfillment.
§Example
use google_cloud_dialogflow_v2::model::Fulfillment;
let x = Environment::new().set_fulfillment(Fulfillment::default()/* use setters */);Sourcepub fn set_or_clear_fulfillment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Fulfillment>,
pub fn set_or_clear_fulfillment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Fulfillment>,
Sets or clears the value of fulfillment.
§Example
use google_cloud_dialogflow_v2::model::Fulfillment;
let x = Environment::new().set_or_clear_fulfillment(Some(Fulfillment::default()/* use setters */));
let x = Environment::new().set_or_clear_fulfillment(None::<Fulfillment>);Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more