# 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.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaReplayExecutionRequest do
  @moduledoc """
  Request for replaying an execution.

  ## Attributes

  *   `modifiedParameters` (*type:* `%{optional(String.t) => GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaValueType.t}`, *default:* `nil`) - Optional. The modified input parameters for replay. - Provide values for all the fields in the 'update_mask'. Any field not present in the 'update_mask' will be ignored and its value will be taken from the original execution. - If the 'update_mask' is not specified, all the parameters from original execution will be ignored and only the `modified_parameters` will be used.
  *   `replayMode` (*type:* `String.t`, *default:* `nil`) - Optional. The mode of the replay.
  *   `replayReason` (*type:* `String.t`, *default:* `nil`) - Required. The user provided reason for replaying the execution.
  *   `updateMask` (*type:* `String.t`, *default:* `nil`) - Optional. The list of parameters to be updated. - If the `update_mask` is not specified, all the parameters from original execution will be ignored and only the `modified_parameters` will be used. - It is an error to include a parameter in `update_mask` but not in `modified_parameters`. - Updating nested fields in a JSON parameter is not supported, please provide the complete JSON in the `modified_parameters`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :modifiedParameters =>
            %{
              optional(String.t()) =>
                GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaValueType.t()
            }
            | nil,
          :replayMode => String.t() | nil,
          :replayReason => String.t() | nil,
          :updateMask => String.t() | nil
        }

  field(:modifiedParameters,
    as: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaValueType,
    type: :map
  )

  field(:replayMode)
  field(:replayReason)
  field(:updateMask)
end

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

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