# 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.TrafficDirector.V3.Model.Extension do
  @moduledoc """
  Version and identification for an Envoy extension. [#next-free-field: 7]

  ## Attributes

  *   `category` (*type:* `String.t`, *default:* `nil`) - Category of the extension. Extension category names use reverse DNS notation. For instance "envoy.filters.listener" for Envoy's built-in listener filters or "com.acme.filters.http" for HTTP filters from acme.com vendor. [#comment:
  *   `disabled` (*type:* `boolean()`, *default:* `nil`) - Indicates that the extension is present but was disabled via dynamic configuration.
  *   `name` (*type:* `String.t`, *default:* `nil`) - This is the name of the Envoy filter as specified in the Envoy configuration, e.g. envoy.filters.http.router, com.acme.widget.
  *   `typeDescriptor` (*type:* `String.t`, *default:* `nil`) - [#not-implemented-hide:] Type descriptor of extension configuration proto. [#comment:
  *   `typeUrls` (*type:* `list(String.t)`, *default:* `nil`) - Type URLs of extension configuration protos.
  *   `version` (*type:* `GoogleApi.TrafficDirector.V3.Model.BuildVersion.t`, *default:* `nil`) - The version is a property of the extension and maintained independently of other extensions and the Envoy API. This field is not set when extension did not provide version information.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :category => String.t() | nil,
          :disabled => boolean() | nil,
          :name => String.t() | nil,
          :typeDescriptor => String.t() | nil,
          :typeUrls => list(String.t()) | nil,
          :version => GoogleApi.TrafficDirector.V3.Model.BuildVersion.t() | nil
        }

  field(:category)
  field(:disabled)
  field(:name)
  field(:typeDescriptor)
  field(:typeUrls, type: :list)
  field(:version, as: GoogleApi.TrafficDirector.V3.Model.BuildVersion)
end

defimpl Poison.Decoder, for: GoogleApi.TrafficDirector.V3.Model.Extension do
  def decode(value, options) do
    GoogleApi.TrafficDirector.V3.Model.Extension.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.TrafficDirector.V3.Model.Extension do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
