#[non_exhaustive]pub struct Version {
pub name: String,
pub description: String,
pub version_number: i32,
pub create_time: Option<Timestamp>,
pub status: VersionStatus,
/* private fields */
}versions 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 version. Supported formats:
projects/<Project ID>/agent/versions/<Version ID>projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
description: StringOptional. The developer-provided description of this version.
version_number: i32Output only. The sequential number of this version. This field is read-only which means it cannot be set by create and update methods.
create_time: Option<Timestamp>Output only. The creation time of this version. This field is read-only, i.e., it cannot be set by create and update methods.
status: VersionStatusOutput only. The status of this version. This field is read-only and cannot be set by create and update methods.
Implementations§
Source§impl Version
impl Version
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_version_number<T: Into<i32>>(self, v: T) -> Self
pub fn set_version_number<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Version::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Version::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Version::new().set_or_clear_create_time(None::<Timestamp>);