# 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.Connector do
  @moduledoc """
  Connectors indicates a specific connector type, e.x. Salesforce, SAP etc.

  ## Attributes

  *   `category` (*type:* `String.t`, *default:* `nil`) - Output only. Category of the connector.
  *   `connectorType` (*type:* `String.t`, *default:* `nil`) - Output only. The type of the connector.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Created time.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Output only. Description of the resource.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. Display name.
  *   `documentationUri` (*type:* `String.t`, *default:* `nil`) - Output only. Link to documentation page.
  *   `eventingDetails` (*type:* `GoogleApi.Connectors.V1.Model.EventingDetails.t`, *default:* `nil`) - Output only. Eventing details. Will be null if eventing is not supported.
  *   `externalUri` (*type:* `String.t`, *default:* `nil`) - Output only. Link to external page.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Output only. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
  *   `launchStage` (*type:* `String.t`, *default:* `nil`) - Output only. Flag to mark the version indicating the launch stage.
  *   `marketplaceConnectorDetails` (*type:* `GoogleApi.Connectors.V1.Model.MarketplaceConnectorDetails.t`, *default:* `nil`) - Output only. Marketplace connector details. Will be null if the connector is not marketplace connector.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. Resource name of the Connector. Format: projects/{project}/locations/{location}/providers/{provider}/connectors/{connector} Only global location is supported for Connector resource.
  *   `tags` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Tags of the connector.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Updated time.
  *   `webAssetsLocation` (*type:* `String.t`, *default:* `nil`) - Output only. Cloud storage location of icons etc consumed by UI.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :category => String.t() | nil,
          :connectorType => String.t() | nil,
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :documentationUri => String.t() | nil,
          :eventingDetails => GoogleApi.Connectors.V1.Model.EventingDetails.t() | nil,
          :externalUri => String.t() | nil,
          :labels => map() | nil,
          :launchStage => String.t() | nil,
          :marketplaceConnectorDetails =>
            GoogleApi.Connectors.V1.Model.MarketplaceConnectorDetails.t() | nil,
          :name => String.t() | nil,
          :tags => list(String.t()) | nil,
          :updateTime => DateTime.t() | nil,
          :webAssetsLocation => String.t() | nil
        }

  field(:category)
  field(:connectorType)
  field(:createTime, as: DateTime)
  field(:description)
  field(:displayName)
  field(:documentationUri)
  field(:eventingDetails, as: GoogleApi.Connectors.V1.Model.EventingDetails)
  field(:externalUri)
  field(:labels, type: :map)
  field(:launchStage)

  field(:marketplaceConnectorDetails,
    as: GoogleApi.Connectors.V1.Model.MarketplaceConnectorDetails
  )

  field(:name)
  field(:tags, type: :list)
  field(:updateTime, as: DateTime)
  field(:webAssetsLocation)
end

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

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