# 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.AcmeDNS.V1.Model.AcmeTxtRecord do
  @moduledoc """
  The TXT record message that represents an ACME DNS-01 challenge.

  ## Attributes

  *   `digest` (*type:* `String.t`, *default:* `nil`) - Holds the ACME challenge data put in the TXT record. This will be checked to be a valid TXT record data entry.
  *   `fqdn` (*type:* `String.t`, *default:* `nil`) - The domain/subdomain for the record. In a request, this MAY be Unicode or Punycode. In a response, this will be in Unicode. The fqdn MUST contain the root_domain field on the request.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when this record was last updated. This will be in UTC time.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :digest => String.t() | nil,
          :fqdn => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:digest)
  field(:fqdn)
  field(:updateTime, as: DateTime)
end

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

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