# 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.Connectors.V1.Model.EndpointAttachment do
  @moduledoc """
  represents the Connector's Endpoint Attachment resource

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Created time.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. Description of the resource.
  *   `endpointGlobalAccess` (*type:* `boolean()`, *default:* `nil`) - Optional. The Private Service Connect Connection Endpoint Global Access. https://cloud.google.com/vpc/docs/about-accessing-vpc-hosted-services-endpoints#global-access
  *   `endpointIp` (*type:* `String.t`, *default:* `nil`) - Output only. The Private Service Connect connection endpoint ip
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. Resource name of the Endpoint Attachment. Format: projects/{project}/locations/{location}/endpointAttachments/{endpoint_attachment}
  *   `serviceAttachment` (*type:* `String.t`, *default:* `nil`) - Required. The path of the service attachment
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The Private Service Connect Connection Endpoint State. This value is only available in the Full view.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Updated time.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :endpointGlobalAccess => boolean() | nil,
          :endpointIp => String.t() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :serviceAttachment => String.t() | nil,
          :state => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:createTime, as: DateTime)
  field(:description)
  field(:endpointGlobalAccess)
  field(:endpointIp)
  field(:labels, type: :map)
  field(:name)
  field(:serviceAttachment)
  field(:state)
  field(:updateTime, as: DateTime)
end

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

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