lib/google_api/os_config/v1/model/patch_config.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.PatchConfig do
  @moduledoc """
  Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance.

  ## Attributes

  *   `apt` (*type:* `GoogleApi.OSConfig.V1.Model.AptSettings.t`, *default:* `nil`) - Apt update settings. Use this setting to override the default `apt` patch rules.
  *   `goo` (*type:* `GoogleApi.OSConfig.V1.Model.GooSettings.t`, *default:* `nil`) - Goo update settings. Use this setting to override the default `goo` patch rules.
  *   `migInstancesAllowed` (*type:* `boolean()`, *default:* `nil`) - Allows the patch job to run on Managed instance groups (MIGs).
  *   `postStep` (*type:* `GoogleApi.OSConfig.V1.Model.ExecStep.t`, *default:* `nil`) - The `ExecStep` to run after the patch update.
  *   `preStep` (*type:* `GoogleApi.OSConfig.V1.Model.ExecStep.t`, *default:* `nil`) - The `ExecStep` to run before the patch update.
  *   `rebootConfig` (*type:* `String.t`, *default:* `nil`) - Post-patch reboot settings.
  *   `windowsUpdate` (*type:* `GoogleApi.OSConfig.V1.Model.WindowsUpdateSettings.t`, *default:* `nil`) - Windows update settings. Use this override the default windows patch rules.
  *   `yum` (*type:* `GoogleApi.OSConfig.V1.Model.YumSettings.t`, *default:* `nil`) - Yum update settings. Use this setting to override the default `yum` patch rules.
  *   `zypper` (*type:* `GoogleApi.OSConfig.V1.Model.ZypperSettings.t`, *default:* `nil`) - Zypper update settings. Use this setting to override the default `zypper` patch rules.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :apt => GoogleApi.OSConfig.V1.Model.AptSettings.t() | nil,
          :goo => GoogleApi.OSConfig.V1.Model.GooSettings.t() | nil,
          :migInstancesAllowed => boolean() | nil,
          :postStep => GoogleApi.OSConfig.V1.Model.ExecStep.t() | nil,
          :preStep => GoogleApi.OSConfig.V1.Model.ExecStep.t() | nil,
          :rebootConfig => String.t() | nil,
          :windowsUpdate => GoogleApi.OSConfig.V1.Model.WindowsUpdateSettings.t() | nil,
          :yum => GoogleApi.OSConfig.V1.Model.YumSettings.t() | nil,
          :zypper => GoogleApi.OSConfig.V1.Model.ZypperSettings.t() | nil
        }

  field(:apt, as: GoogleApi.OSConfig.V1.Model.AptSettings)
  field(:goo, as: GoogleApi.OSConfig.V1.Model.GooSettings)
  field(:migInstancesAllowed)
  field(:postStep, as: GoogleApi.OSConfig.V1.Model.ExecStep)
  field(:preStep, as: GoogleApi.OSConfig.V1.Model.ExecStep)
  field(:rebootConfig)
  field(:windowsUpdate, as: GoogleApi.OSConfig.V1.Model.WindowsUpdateSettings)
  field(:yum, as: GoogleApi.OSConfig.V1.Model.YumSettings)
  field(:zypper, as: GoogleApi.OSConfig.V1.Model.ZypperSettings)
end

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

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