# 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.VMMigration.V1.Model.Source do
  @moduledoc """
  Source message describes a specific vm migration Source resource. It contains the source environment information.

  ## Attributes

  *   `aws` (*type:* `GoogleApi.VMMigration.V1.Model.AwsSourceDetails.t`, *default:* `nil`) - AWS type source details.
  *   `azure` (*type:* `GoogleApi.VMMigration.V1.Model.AzureSourceDetails.t`, *default:* `nil`) - Azure type source details.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The create time timestamp.
  *   `description` (*type:* `String.t`, *default:* `nil`) - User-provided description of the source.
  *   `encryption` (*type:* `GoogleApi.VMMigration.V1.Model.Encryption.t`, *default:* `nil`) - Optional. Immutable. The encryption details of the source data stored by the service.
  *   `labels` (*type:* `map()`, *default:* `nil`) - The labels of the source.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The Source name.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The update time timestamp.
  *   `vmware` (*type:* `GoogleApi.VMMigration.V1.Model.VmwareSourceDetails.t`, *default:* `nil`) - Vmware type source details.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :aws => GoogleApi.VMMigration.V1.Model.AwsSourceDetails.t() | nil,
          :azure => GoogleApi.VMMigration.V1.Model.AzureSourceDetails.t() | nil,
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :encryption => GoogleApi.VMMigration.V1.Model.Encryption.t() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :vmware => GoogleApi.VMMigration.V1.Model.VmwareSourceDetails.t() | nil
        }

  field(:aws, as: GoogleApi.VMMigration.V1.Model.AwsSourceDetails)
  field(:azure, as: GoogleApi.VMMigration.V1.Model.AzureSourceDetails)
  field(:createTime, as: DateTime)
  field(:description)
  field(:encryption, as: GoogleApi.VMMigration.V1.Model.Encryption)
  field(:labels, type: :map)
  field(:name)
  field(:updateTime, as: DateTime)
  field(:vmware, as: GoogleApi.VMMigration.V1.Model.VmwareSourceDetails)
end

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

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