# 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.ServiceNetworking.V1.Model.Publishing do
  @moduledoc """
  This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.

  ## Attributes

  *   `apiShortName` (*type:* `String.t`, *default:* `nil`) - Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: "speech".
  *   `codeownerGithubTeams` (*type:* `list(String.t)`, *default:* `nil`) - GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.
  *   `docTagPrefix` (*type:* `String.t`, *default:* `nil`) - A prefix used in sample code when demarking regions to be included in documentation.
  *   `documentationUri` (*type:* `String.t`, *default:* `nil`) - Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview
  *   `githubLabel` (*type:* `String.t`, *default:* `nil`) - GitHub label to apply to issues and pull requests opened for this API.
  *   `librarySettings` (*type:* `list(GoogleApi.ServiceNetworking.V1.Model.ClientLibrarySettings.t)`, *default:* `nil`) - Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.
  *   `methodSettings` (*type:* `list(GoogleApi.ServiceNetworking.V1.Model.MethodSettings.t)`, *default:* `nil`) - A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.
  *   `newIssueUri` (*type:* `String.t`, *default:* `nil`) - Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103
  *   `organization` (*type:* `String.t`, *default:* `nil`) - For whom the client library is being published.
  *   `protoReferenceDocumentationUri` (*type:* `String.t`, *default:* `nil`) - Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc
  *   `restReferenceDocumentationUri` (*type:* `String.t`, *default:* `nil`) - Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :apiShortName => String.t() | nil,
          :codeownerGithubTeams => list(String.t()) | nil,
          :docTagPrefix => String.t() | nil,
          :documentationUri => String.t() | nil,
          :githubLabel => String.t() | nil,
          :librarySettings =>
            list(GoogleApi.ServiceNetworking.V1.Model.ClientLibrarySettings.t()) | nil,
          :methodSettings => list(GoogleApi.ServiceNetworking.V1.Model.MethodSettings.t()) | nil,
          :newIssueUri => String.t() | nil,
          :organization => String.t() | nil,
          :protoReferenceDocumentationUri => String.t() | nil,
          :restReferenceDocumentationUri => String.t() | nil
        }

  field(:apiShortName)
  field(:codeownerGithubTeams, type: :list)
  field(:docTagPrefix)
  field(:documentationUri)
  field(:githubLabel)

  field(:librarySettings,
    as: GoogleApi.ServiceNetworking.V1.Model.ClientLibrarySettings,
    type: :list
  )

  field(:methodSettings, as: GoogleApi.ServiceNetworking.V1.Model.MethodSettings, type: :list)
  field(:newIssueUri)
  field(:organization)
  field(:protoReferenceDocumentationUri)
  field(:restReferenceDocumentationUri)
end

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

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