pub struct Function {
pub name: String,
pub environment: i32,
pub description: String,
pub build_config: Option<BuildConfig>,
pub service_config: Option<ServiceConfig>,
pub event_trigger: Option<EventTrigger>,
pub state: i32,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub state_messages: Vec<StateMessage>,
}Expand description
Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.
Fields§
§name: StringA user-defined name of the function. Function names must be unique
globally and match pattern projects/*/locations/*/functions/*
environment: i32Describe whether the function is gen1 or gen2.
description: StringUser-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: i32Output 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.
Implementations§
Source§impl Function
impl Function
Sourcepub fn state(&self) -> State
pub fn state(&self) -> State
Returns the enum value of state, or the default if the field is set to an invalid enum value.
Sourcepub fn environment(&self) -> Environment
pub fn environment(&self) -> Environment
Returns the enum value of environment, or the default if the field is set to an invalid enum value.
Sourcepub fn set_environment(&mut self, value: Environment)
pub fn set_environment(&mut self, value: Environment)
Sets environment to the provided enum value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for Function
impl Message for Function
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.