#[non_exhaustive]pub struct Function {Show 14 fields
pub name: String,
pub description: String,
pub build_config: Option<BuildConfig>,
pub service_config: Option<ServiceConfig>,
pub event_trigger: Option<EventTrigger>,
pub state: State,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub state_messages: Vec<StateMessage>,
pub environment: Environment,
pub url: String,
pub kms_key_name: String,
pub satisfies_pzs: bool,
pub create_time: Option<Timestamp>,
/* private fields */
}
Expand description
Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.
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: String
A user-defined name of the function. Function names must be unique
globally and match pattern projects/*/locations/*/functions/*
description: String
User-provided description of a function.
build_config: Option<BuildConfig>
Describes the Build step of the function that builds a container from the given source.
service_config: Option<ServiceConfig>
Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed).
event_trigger: Option<EventTrigger>
An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service.
state: State
Output only. State of the function.
update_time: Option<Timestamp>
Output only. The last update timestamp of a Cloud Function.
labels: HashMap<String, String>
Labels associated with this Cloud Function.
state_messages: Vec<StateMessage>
Output only. State Messages for this Cloud Function.
environment: Environment
Describe whether the function is 1st Gen or 2nd Gen.
url: String
Output only. The deployed url for the function.
kms_key_name: String
Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources.
It must match the pattern
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
.
satisfies_pzs: bool
Output only. Reserved for future use.
create_time: Option<Timestamp>
Output only. The create timestamp of a Cloud Function. This is only applicable to 2nd Gen functions.
Implementations§
Source§impl Function
impl Function
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
Sets the value of description.
Sourcepub fn set_build_config<T>(self, v: T) -> Selfwhere
T: Into<BuildConfig>,
pub fn set_build_config<T>(self, v: T) -> Selfwhere
T: Into<BuildConfig>,
Sets the value of build_config.
Sourcepub fn set_or_clear_build_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<BuildConfig>,
pub fn set_or_clear_build_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<BuildConfig>,
Sets or clears the value of build_config.
Sourcepub fn set_service_config<T>(self, v: T) -> Selfwhere
T: Into<ServiceConfig>,
pub fn set_service_config<T>(self, v: T) -> Selfwhere
T: Into<ServiceConfig>,
Sets the value of service_config.
Sourcepub fn set_or_clear_service_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceConfig>,
pub fn set_or_clear_service_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceConfig>,
Sets or clears the value of service_config.
Sourcepub fn set_event_trigger<T>(self, v: T) -> Selfwhere
T: Into<EventTrigger>,
pub fn set_event_trigger<T>(self, v: T) -> Selfwhere
T: Into<EventTrigger>,
Sets the value of event_trigger.
Sourcepub fn set_or_clear_event_trigger<T>(self, v: Option<T>) -> Selfwhere
T: Into<EventTrigger>,
pub fn set_or_clear_event_trigger<T>(self, v: Option<T>) -> Selfwhere
T: Into<EventTrigger>,
Sets or clears the value of event_trigger.
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.
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.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_state_messages<T, V>(self, v: T) -> Self
pub fn set_state_messages<T, V>(self, v: T) -> Self
Sets the value of state_messages.
Sourcepub fn set_environment<T: Into<Environment>>(self, v: T) -> Self
pub fn set_environment<T: Into<Environment>>(self, v: T) -> Self
Sets the value of environment.
Sourcepub fn set_kms_key_name<T: Into<String>>(self, v: T) -> Self
pub fn set_kms_key_name<T: Into<String>>(self, v: T) -> Self
Sets the value of kms_key_name.
Sourcepub fn set_satisfies_pzs<T: Into<bool>>(self, v: T) -> Self
pub fn set_satisfies_pzs<T: Into<bool>>(self, v: T) -> Self
Sets the value of satisfies_pzs.
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.
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.