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: i32,
pub update_time: Option<Timestamp>,
pub labels: BTreeMap<String, String>,
pub state_messages: Vec<StateMessage>,
pub environment: i32,
pub url: String,
pub kms_key_name: String,
pub satisfies_pzs: bool,
pub create_time: Option<Timestamp>,
}
Expand description
Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.
Fields§
§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: i32
Output only. State of the function.
update_time: Option<Timestamp>
Output only. The last update timestamp of a Cloud Function.
labels: BTreeMap<String, String>
Labels associated with this Cloud Function.
state_messages: Vec<StateMessage>
Output only. State Messages for this Cloud Function.
environment: i32
Describe whether the function is 1st Gen or 2nd Gen.
url: String
Output only. The deployed url for the function.
kms_key_name: String
[Preview] 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
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 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
.source§impl PartialEq for Function
impl PartialEq for Function
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request