Struct google_api_proto::google::cloud::osconfig::agentendpoint::v1beta::Package
source · pub struct Package {
pub name: String,
pub desired_state: i32,
pub manager: i32,
}
Expand description
Package is a reference to the software package to be installed or removed. The agent on the VM instance uses the system package manager to apply the config.
These are the commands that the agent uses to install or remove packages.
Apt
install: apt-get update && apt-get -y install package1 package2 package3
remove: apt-get -y remove package1 package2 package3
Yum
install: yum -y install package1 package2 package3
remove: yum -y remove package1 package2 package3
Zypper
install: zypper install package1 package2 package3
remove: zypper rm package1 package2
Googet
install: googet -noconfirm install package1 package2 package3
remove: googet -noconfirm remove package1 package2 package3
Fields§
§name: String
The name of the package. A package is uniquely identified for conflict validation by checking the package name and the manager(s) that the package targets.
desired_state: i32
The desired_state the agent should maintain for this package. The default is to ensure the package is installed.
manager: i32
Type of package manager that can be used to install this package.
If a system does not have the package manager, the package is not
installed or removed no error message is returned. By default,
or if you specify ANY
,
the agent attempts to install and remove this package using the default
package manager. This is useful when creating a policy that applies to
different types of systems.
The default behavior is ANY.
Implementations§
source§impl Package
impl Package
sourcepub fn desired_state(&self) -> DesiredState
pub fn desired_state(&self) -> DesiredState
Returns the enum value of desired_state
, or the default if the field is set to an invalid enum value.
sourcepub fn set_desired_state(&mut self, value: DesiredState)
pub fn set_desired_state(&mut self, value: DesiredState)
Sets desired_state
to the provided enum value.
sourcepub fn manager(&self) -> Manager
pub fn manager(&self) -> Manager
Returns the enum value of manager
, or the default if the field is set to an invalid enum value.
sourcepub fn set_manager(&mut self, value: Manager)
pub fn set_manager(&mut self, value: Manager)
Sets manager
to the provided enum value.
Trait Implementations§
source§impl Message for Package
impl Message for Package
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 Package
impl PartialEq for Package
impl StructuralPartialEq for Package
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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