[][src]Struct gcp_client::google::cloud::osconfig::v1beta::Package

pub struct Package {
    pub name: String,
    pub desired_state: i32,
    pub manager: i32,
}

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

Required. 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

impl Package[src]

pub fn desired_state(&self) -> DesiredState[src]

Returns the enum value of desired_state, or the default if the field is set to an invalid enum value.

pub fn set_desired_state(&mut self, value: DesiredState)[src]

Sets desired_state to the provided enum value.

pub fn manager(&self) -> Manager[src]

Returns the enum value of manager, or the default if the field is set to an invalid enum value.

pub fn set_manager(&mut self, value: Manager)[src]

Sets manager to the provided enum value.

Trait Implementations

impl Clone for Package[src]

impl Debug for Package[src]

impl Default for Package[src]

impl Message for Package[src]

impl PartialEq<Package> for Package[src]

impl StructuralPartialEq for Package[src]

Auto Trait Implementations

impl RefUnwindSafe for Package

impl Send for Package

impl Sync for Package

impl Unpin for Package

impl UnwindSafe for Package

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]