# 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.HealthCare.V1.Model.RollbackFhirResourcesRequest do
  @moduledoc """


  ## Attributes

  *   `changeType` (*type:* `String.t`, *default:* `nil`) - Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a certain type.
  *   `excludeRollbacks` (*type:* `boolean()`, *default:* `nil`) - Optional. Specifies whether to exclude earlier rollbacks.
  *   `filteringFields` (*type:* `GoogleApi.HealthCare.V1.Model.RollbackFhirResourceFilteringFields.t`, *default:* `nil`) - Optional. Parameters for filtering resources
  *   `force` (*type:* `boolean()`, *default:* `nil`) - Optional. When enabled, changes will be reverted without explicit confirmation
  *   `inputGcsObject` (*type:* `String.t`, *default:* `nil`) - Optional. Cloud Storage object containing list of {resourceType}/{resourceId} lines, identifying resources to be reverted
  *   `resultGcsBucket` (*type:* `String.t`, *default:* `nil`) - Required. Bucket to deposit result
  *   `rollbackTime` (*type:* `DateTime.t`, *default:* `nil`) - Required. Time point to rollback to.
  *   `type` (*type:* `list(String.t)`, *default:* `nil`) - Optional. If specified, revert only resources of these types
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :changeType => String.t() | nil,
          :excludeRollbacks => boolean() | nil,
          :filteringFields =>
            GoogleApi.HealthCare.V1.Model.RollbackFhirResourceFilteringFields.t() | nil,
          :force => boolean() | nil,
          :inputGcsObject => String.t() | nil,
          :resultGcsBucket => String.t() | nil,
          :rollbackTime => DateTime.t() | nil,
          :type => list(String.t()) | nil
        }

  field(:changeType)
  field(:excludeRollbacks)
  field(:filteringFields, as: GoogleApi.HealthCare.V1.Model.RollbackFhirResourceFilteringFields)
  field(:force)
  field(:inputGcsObject)
  field(:resultGcsBucket)
  field(:rollbackTime, as: DateTime)
  field(:type, type: :list)
end

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

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