Struct google_api_proto::google::cloud::runtimeconfig::v1beta1::Variable
source · pub struct Variable {
pub name: String,
pub update_time: Option<Timestamp>,
pub state: i32,
pub contents: Option<Contents>,
}
Expand description
Describes a single variable within a RuntimeConfig resource.
The name denotes the hierarchical variable name. For example,
ports/serving_port
is a valid variable name. The variable value is an
opaque string and only leaf variables can have values (that is, variables
that do not have any child variables).
Fields§
§name: String
The name of the variable resource, in the format:
projects/\[PROJECT_ID\]/configs/\[CONFIG_NAME\]/variables/\[VARIABLE_NAME\]
The \[PROJECT_ID\]
must be a valid project ID, \[CONFIG_NAME\]
must be a
valid RuntimeConfig reource and \[VARIABLE_NAME\]
follows Unix file system
file path naming.
The \[VARIABLE_NAME\]
can contain ASCII letters, numbers, slashes and
dashes. Slashes are used as path element separators and are not part of the
\[VARIABLE_NAME\]
itself, so \[VARIABLE_NAME\]
must contain at least one
non-slash character. Multiple slashes are coalesced into single slash
character. Each path segment should follow RFC 1035 segment specification.
The length of a \[VARIABLE_NAME\]
must be less than 256 bytes.
Once you create a variable, you cannot change the variable name.
update_time: Option<Timestamp>
[Output Only] The time of the last variable update.
state: i32
[Ouput only] The current state of the variable. The variable state
indicates the outcome of the variables().watch
call and is visible
through the get
and list
calls.
contents: Option<Contents>
The value of the variable. It can be either a binary or a string
value. You must specify one of either value
or text
. Specifying both
will cause the server to return an error.
Implementations§
source§impl Variable
impl Variable
sourcepub fn state(&self) -> VariableState
pub fn state(&self) -> VariableState
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
sourcepub fn set_state(&mut self, value: VariableState)
pub fn set_state(&mut self, value: VariableState)
Sets state
to the provided enum value.
Trait Implementations§
source§impl Message for Variable
impl Message for Variable
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 Variable
impl PartialEq for Variable
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl !Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnwindSafe for Variable
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