# 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.DomainsRDAP.V1.Model.Notice do
  @moduledoc """
  Notices object defined in [section 4.3 of RFC 7483](https://tools.ietf.org/html/rfc7483#section-4.3).

  ## Attributes

  *   `description` (*type:* `list(String.t)`, *default:* `nil`) - Description of the notice.
  *   `links` (*type:* `list(GoogleApi.DomainsRDAP.V1.Model.Link.t)`, *default:* `nil`) - Link to a document containing more information.
  *   `title` (*type:* `String.t`, *default:* `nil`) - Title of a notice. Example: "Terms of Service".
  *   `type` (*type:* `String.t`, *default:* `nil`) - Type values defined in [section 10.2.1 of RFC 7483](https://tools.ietf.org/html/rfc7483#section-10.2.1) specific to a whole response: "result set truncated due to authorization", "result set truncated due to excessive load", "result set truncated due to unexplainable reasons".
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :description => list(String.t()) | nil,
          :links => list(GoogleApi.DomainsRDAP.V1.Model.Link.t()) | nil,
          :title => String.t() | nil,
          :type => String.t() | nil
        }

  field(:description, type: :list)
  field(:links, as: GoogleApi.DomainsRDAP.V1.Model.Link, type: :list)
  field(:title)
  field(:type)
end

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

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