Struct google_api_proto::google::cloud::osconfig::v1::os_policy::resource::FileResource
source · pub struct FileResource {
pub path: String,
pub state: i32,
pub permissions: String,
pub source: Option<Source>,
}
Expand description
A resource that manages the state of a file.
Fields§
§path: String
Required. The absolute path of the file within the VM.
state: i32
Required. Desired state of the file.
permissions: String
Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755.
Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
source: Option<Source>
The source for the contents of the file.
Implementations§
source§impl FileResource
impl FileResource
sourcepub fn state(&self) -> DesiredState
pub fn state(&self) -> DesiredState
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: DesiredState)
pub fn set_state(&mut self, value: DesiredState)
Sets state
to the provided enum value.
Trait Implementations§
source§impl Clone for FileResource
impl Clone for FileResource
source§fn clone(&self) -> FileResource
fn clone(&self) -> FileResource
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FileResource
impl Debug for FileResource
source§impl Default for FileResource
impl Default for FileResource
source§impl Message for FileResource
impl Message for FileResource
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 FileResource
impl PartialEq for FileResource
source§fn eq(&self, other: &FileResource) -> bool
fn eq(&self, other: &FileResource) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FileResource
Auto Trait Implementations§
impl Freeze for FileResource
impl RefUnwindSafe for FileResource
impl Send for FileResource
impl Sync for FileResource
impl Unpin for FileResource
impl UnwindSafe for FileResource
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