# 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.AwsSourceDetails do
  @moduledoc """
  AwsSourceDetails message describes a specific source details for the AWS source type.

  ## Attributes

  *   `accessKeyCreds` (*type:* `GoogleApi.VMMigration.V1.Model.AccessKeyCredentials.t`, *default:* `nil`) - AWS Credentials using access key id and secret.
  *   `awsRegion` (*type:* `String.t`, *default:* `nil`) - Immutable. The AWS region that the source VMs will be migrated from.
  *   `error` (*type:* `GoogleApi.VMMigration.V1.Model.Status.t`, *default:* `nil`) - Output only. Provides details on the state of the Source in case of an error.
  *   `inventorySecurityGroupNames` (*type:* `list(String.t)`, *default:* `nil`) - AWS security group names to limit the scope of the source inventory.
  *   `inventoryTagList` (*type:* `list(GoogleApi.VMMigration.V1.Model.Tag.t)`, *default:* `nil`) - AWS resource tags to limit the scope of the source inventory.
  *   `migrationResourcesUserTags` (*type:* `map()`, *default:* `nil`) - User specified tags to add to every M2VM generated resource in AWS. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m2vm`.
  *   `publicIp` (*type:* `String.t`, *default:* `nil`) - Output only. The source's public IP. All communication initiated by this source will originate from this IP.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of the source as determined by the health check.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accessKeyCreds => GoogleApi.VMMigration.V1.Model.AccessKeyCredentials.t() | nil,
          :awsRegion => String.t() | nil,
          :error => GoogleApi.VMMigration.V1.Model.Status.t() | nil,
          :inventorySecurityGroupNames => list(String.t()) | nil,
          :inventoryTagList => list(GoogleApi.VMMigration.V1.Model.Tag.t()) | nil,
          :migrationResourcesUserTags => map() | nil,
          :publicIp => String.t() | nil,
          :state => String.t() | nil
        }

  field(:accessKeyCreds, as: GoogleApi.VMMigration.V1.Model.AccessKeyCredentials)
  field(:awsRegion)
  field(:error, as: GoogleApi.VMMigration.V1.Model.Status)
  field(:inventorySecurityGroupNames, type: :list)
  field(:inventoryTagList, as: GoogleApi.VMMigration.V1.Model.Tag, type: :list)
  field(:migrationResourcesUserTags, type: :map)
  field(:publicIp)
  field(:state)
end

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

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