# 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.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5FullHash do
  @moduledoc """
  The full hash identified with one or more matches.

  ## Attributes

  *   `fullHash` (*type:* `String.t`, *default:* `nil`) - The matching full hash. This is the SHA256 hash. The length will be exactly 32 bytes.
  *   `fullHashDetails` (*type:* `list(GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5FullHashFullHashDetail.t)`, *default:* `nil`) - Unordered list. A repeated field identifying the details relevant to this full hash.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :fullHash => String.t() | nil,
          :fullHashDetails =>
            list(
              GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5FullHashFullHashDetail.t()
            )
            | nil
        }

  field(:fullHash)

  field(:fullHashDetails,
    as: GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5FullHashFullHashDetail,
    type: :list
  )
end

defimpl Poison.Decoder, for: GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5FullHash do
  def decode(value, options) do
    GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5FullHash.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.SafeBrowsing.V5.Model.GoogleSecuritySafebrowsingV5FullHash do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
