# 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.Admin.Datatransfer_v1.Model.ApplicationDataTransfer do
  @moduledoc """
  Template to map fields of ApplicationDataTransfer resource.

  ## Attributes

  *   `applicationId` (*type:* `String.t`, *default:* `nil`) - The application's ID.
  *   `applicationTransferParams` (*type:* `list(GoogleApi.Admin.Datatransfer_v1.Model.ApplicationTransferParam.t)`, *default:* `nil`) - The transfer parameters for the application. These parameters are used to select the data which will get transferred in context of this application. For more information about the specific values available for each application, see the [Transfer parameters](/admin-sdk/data-transfer/v1/parameters) reference.
  *   `applicationTransferStatus` (*type:* `String.t`, *default:* `nil`) - Read-only. Current status of transfer for this application.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :applicationId => String.t() | nil,
          :applicationTransferParams =>
            list(GoogleApi.Admin.Datatransfer_v1.Model.ApplicationTransferParam.t()) | nil,
          :applicationTransferStatus => String.t() | nil
        }

  field(:applicationId)

  field(:applicationTransferParams,
    as: GoogleApi.Admin.Datatransfer_v1.Model.ApplicationTransferParam,
    type: :list
  )

  field(:applicationTransferStatus)
end

defimpl Poison.Decoder, for: GoogleApi.Admin.Datatransfer_v1.Model.ApplicationDataTransfer do
  def decode(value, options) do
    GoogleApi.Admin.Datatransfer_v1.Model.ApplicationDataTransfer.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Admin.Datatransfer_v1.Model.ApplicationDataTransfer do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
