lib/google_api/os_config/v1/model/execute_patch_job_request.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.ExecutePatchJobRequest do
  @moduledoc """
  A request message to initiate patching across Compute Engine instances.

  ## Attributes

  *   `description` (*type:* `String.t`, *default:* `nil`) - Description of the patch job. Length of the description is limited to 1024 characters.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Display name for this patch job. This does not have to be unique.
  *   `dryRun` (*type:* `boolean()`, *default:* `nil`) - If this patch is a dry-run only, instances are contacted but will do nothing.
  *   `duration` (*type:* `String.t`, *default:* `nil`) - Duration of the patch job. After the duration ends, the patch job times out.
  *   `instanceFilter` (*type:* `GoogleApi.OSConfig.V1.Model.PatchInstanceFilter.t`, *default:* `nil`) - Required. Instances to patch, either explicitly or filtered by some criteria such as zone or labels.
  *   `patchConfig` (*type:* `GoogleApi.OSConfig.V1.Model.PatchConfig.t`, *default:* `nil`) - Patch configuration being applied. If omitted, instances are patched using the default configurations.
  *   `rollout` (*type:* `GoogleApi.OSConfig.V1.Model.PatchRollout.t`, *default:* `nil`) - Rollout strategy of the patch job.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :dryRun => boolean() | nil,
          :duration => String.t() | nil,
          :instanceFilter => GoogleApi.OSConfig.V1.Model.PatchInstanceFilter.t() | nil,
          :patchConfig => GoogleApi.OSConfig.V1.Model.PatchConfig.t() | nil,
          :rollout => GoogleApi.OSConfig.V1.Model.PatchRollout.t() | nil
        }

  field(:description)
  field(:displayName)
  field(:dryRun)
  field(:duration)
  field(:instanceFilter, as: GoogleApi.OSConfig.V1.Model.PatchInstanceFilter)
  field(:patchConfig, as: GoogleApi.OSConfig.V1.Model.PatchConfig)
  field(:rollout, as: GoogleApi.OSConfig.V1.Model.PatchRollout)
end

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

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