# Cloud OS Config V1alpha API - Class Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource (v0.17.0)

0.17.0 (latest) 0.16.1 0.15.0 0.14.1 0.13.0 0.12.0 0.11.1 0.10.0 0.9.1 0.8.2 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.2 Reference documentation and code samples for the Cloud OS Config V1alpha API class Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource.

A resource that manages a system package.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #apt

    def apt() -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::APT

**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::APT](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-APT)) --- A package managed by Apt.


  Note: The following fields are mutually exclusive: `apt`, `deb`, `yum`, `zypper`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #apt=

    def apt=(value) -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::APT

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::APT](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-APT)) --- A package managed by Apt.


  Note: The following fields are mutually exclusive: `apt`, `deb`, `yum`, `zypper`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::APT](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-APT)) --- A package managed by Apt.


  Note: The following fields are mutually exclusive: `apt`, `deb`, `yum`, `zypper`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #deb

    def deb() -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Deb

**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Deb](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-Deb)) --- A deb package file.


  Note: The following fields are mutually exclusive: `deb`, `apt`, `yum`, `zypper`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #deb=

    def deb=(value) -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Deb

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Deb](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-Deb)) --- A deb package file.


  Note: The following fields are mutually exclusive: `deb`, `apt`, `yum`, `zypper`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Deb](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-Deb)) --- A deb package file.


  Note: The following fields are mutually exclusive: `deb`, `apt`, `yum`, `zypper`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #desired_state

    def desired_state() -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::DesiredState

**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::DesiredState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-DesiredState)) --- Required. The desired state the agent should maintain for this package.

### #desired_state=

    def desired_state=(value) -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::DesiredState

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::DesiredState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-DesiredState)) --- Required. The desired state the agent should maintain for this package.
**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::DesiredState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-DesiredState)) --- Required. The desired state the agent should maintain for this package.

### #googet

    def googet() -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::GooGet

**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::GooGet](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-GooGet)) --- A package managed by GooGet.


  Note: The following fields are mutually exclusive: `googet`, `apt`, `deb`, `yum`, `zypper`, `rpm`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #googet=

    def googet=(value) -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::GooGet

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::GooGet](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-GooGet)) --- A package managed by GooGet.


  Note: The following fields are mutually exclusive: `googet`, `apt`, `deb`, `yum`, `zypper`, `rpm`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::GooGet](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-GooGet)) --- A package managed by GooGet.


  Note: The following fields are mutually exclusive: `googet`, `apt`, `deb`, `yum`, `zypper`, `rpm`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #msi

    def msi() -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::MSI

**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::MSI](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-MSI)) --- An MSI package.


  Note: The following fields are mutually exclusive: `msi`, `apt`, `deb`, `yum`, `zypper`, `rpm`, `googet`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #msi=

    def msi=(value) -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::MSI

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::MSI](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-MSI)) --- An MSI package.


  Note: The following fields are mutually exclusive: `msi`, `apt`, `deb`, `yum`, `zypper`, `rpm`, `googet`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::MSI](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-MSI)) --- An MSI package.


  Note: The following fields are mutually exclusive: `msi`, `apt`, `deb`, `yum`, `zypper`, `rpm`, `googet`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #rpm

    def rpm() -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::RPM

**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::RPM](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-RPM)) --- An rpm package file.


  Note: The following fields are mutually exclusive: `rpm`, `apt`, `deb`, `yum`, `zypper`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #rpm=

    def rpm=(value) -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::RPM

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::RPM](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-RPM)) --- An rpm package file.


  Note: The following fields are mutually exclusive: `rpm`, `apt`, `deb`, `yum`, `zypper`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::RPM](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-RPM)) --- An rpm package file.


  Note: The following fields are mutually exclusive: `rpm`, `apt`, `deb`, `yum`, `zypper`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #yum

    def yum() -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::YUM

**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::YUM](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-YUM)) --- A package managed by YUM.


  Note: The following fields are mutually exclusive: `yum`, `apt`, `deb`, `zypper`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #yum=

    def yum=(value) -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::YUM

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::YUM](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-YUM)) --- A package managed by YUM.


  Note: The following fields are mutually exclusive: `yum`, `apt`, `deb`, `zypper`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::YUM](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-YUM)) --- A package managed by YUM.


  Note: The following fields are mutually exclusive: `yum`, `apt`, `deb`, `zypper`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #zypper

    def zypper() -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Zypper

**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Zypper](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-Zypper)) --- A package managed by Zypper.


  Note: The following fields are mutually exclusive: `zypper`, `apt`, `deb`, `yum`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #zypper=

    def zypper=(value) -> ::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Zypper

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Zypper](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-Zypper)) --- A package managed by Zypper.


  Note: The following fields are mutually exclusive: `zypper`, `apt`, `deb`, `yum`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::PackageResource::Zypper](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-PackageResource-Zypper)) --- A package managed by Zypper.


  Note: The following fields are mutually exclusive: `zypper`, `apt`, `deb`, `yum`, `rpm`, `googet`, `msi`. If a field in that set is populated, all other fields in the set will automatically be cleared.