lib/google_api/os_config/v1/model/zypper_settings.ex

# 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.ZypperSettings do
  @moduledoc """
  Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual.

  ## Attributes

  *   `categories` (*type:* `list(String.t)`, *default:* `nil`) - Install only patches with these categories. Common categories include security, recommended, and feature.
  *   `excludes` (*type:* `list(String.t)`, *default:* `nil`) - List of patches to exclude from update.
  *   `exclusivePatches` (*type:* `list(String.t)`, *default:* `nil`) - An exclusive list of patches to be updated. These are the only patches that will be installed using 'zypper patch patch:' command. This field must not be used with any other patch configuration fields.
  *   `severities` (*type:* `list(String.t)`, *default:* `nil`) - Install only patches with these severities. Common severities include critical, important, moderate, and low.
  *   `withOptional` (*type:* `boolean()`, *default:* `nil`) - Adds the `--with-optional` flag to `zypper patch`.
  *   `withUpdate` (*type:* `boolean()`, *default:* `nil`) - Adds the `--with-update` flag, to `zypper patch`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :categories => list(String.t()) | nil,
          :excludes => list(String.t()) | nil,
          :exclusivePatches => list(String.t()) | nil,
          :severities => list(String.t()) | nil,
          :withOptional => boolean() | nil,
          :withUpdate => boolean() | nil
        }

  field(:categories, type: :list)
  field(:excludes, type: :list)
  field(:exclusivePatches, type: :list)
  field(:severities, type: :list)
  field(:withOptional)
  field(:withUpdate)
end

defimpl Poison.Decoder, for: GoogleApi.OSConfig.V1.Model.ZypperSettings do
  def decode(value, options) do
    GoogleApi.OSConfig.V1.Model.ZypperSettings.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.OSConfig.V1.Model.ZypperSettings do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end