# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.
defmodule GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResource do
@moduledoc """
A resource that manages a system package.
## Attributes
* `apt` (*type:* `GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceAPT.t`, *default:* `nil`) - A package managed by Apt.
* `deb` (*type:* `GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceDeb.t`, *default:* `nil`) - A deb package file.
* `desiredState` (*type:* `String.t`, *default:* `nil`) - Required. The desired state the agent should maintain for this package.
* `googet` (*type:* `GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceGooGet.t`, *default:* `nil`) - A package managed by GooGet.
* `msi` (*type:* `GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceMSI.t`, *default:* `nil`) - An MSI package.
* `rpm` (*type:* `GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceRPM.t`, *default:* `nil`) - An rpm package file.
* `yum` (*type:* `GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceYUM.t`, *default:* `nil`) - A package managed by YUM.
* `zypper` (*type:* `GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceZypper.t`, *default:* `nil`) - A package managed by Zypper.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:apt => GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceAPT.t() | nil,
:deb => GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceDeb.t() | nil,
:desiredState => String.t() | nil,
:googet => GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceGooGet.t() | nil,
:msi => GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceMSI.t() | nil,
:rpm => GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceRPM.t() | nil,
:yum => GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceYUM.t() | nil,
:zypper => GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceZypper.t() | nil
}
field(:apt, as: GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceAPT)
field(:deb, as: GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceDeb)
field(:desiredState)
field(:googet, as: GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceGooGet)
field(:msi, as: GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceMSI)
field(:rpm, as: GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceRPM)
field(:yum, as: GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceYUM)
field(:zypper, as: GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResourceZypper)
end
defimpl Poison.Decoder, for: GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResource do
def decode(value, options) do
GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResource.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.OSConfig.V1.Model.OSPolicyResourcePackageResource do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end