# 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.DeveloperConnect.V1.Model.GitRepositoryLink do
  @moduledoc """
  Message describing the GitRepositoryLink object

  ## Attributes

  *   `annotations` (*type:* `map()`, *default:* `nil`) - Optional. Allows clients to store small amounts of arbitrary data.
  *   `cloneUri` (*type:* `String.t`, *default:* `nil`) - Required. Git Clone URI.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. [Output only] Create timestamp
  *   `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. [Output only] Delete timestamp
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  *   `gitProxyUri` (*type:* `String.t`, *default:* `nil`) - Output only. URI to access the linked repository through the Git Proxy. This field is only populated if the git proxy is enabled for the connection.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. Labels as key value pairs
  *   `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Resource name of the repository, in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
  *   `reconciling` (*type:* `boolean()`, *default:* `nil`) - Output only. Set to true when the connection is being set up or updated in the background.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. A system-assigned unique identifier for the GitRepositoryLink.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. [Output only] Update timestamp
  *   `webhookId` (*type:* `String.t`, *default:* `nil`) - Output only. External ID of the webhook created for the repository.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :annotations => map() | nil,
          :cloneUri => String.t() | nil,
          :createTime => DateTime.t() | nil,
          :deleteTime => DateTime.t() | nil,
          :etag => String.t() | nil,
          :gitProxyUri => String.t() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :reconciling => boolean() | nil,
          :uid => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :webhookId => String.t() | nil
        }

  field(:annotations, type: :map)
  field(:cloneUri)
  field(:createTime, as: DateTime)
  field(:deleteTime, as: DateTime)
  field(:etag)
  field(:gitProxyUri)
  field(:labels, type: :map)
  field(:name)
  field(:reconciling)
  field(:uid)
  field(:updateTime, as: DateTime)
  field(:webhookId)
end

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

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