{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Textract.Types.UndetectedSignature
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Textract.Types.UndetectedSignature where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | A structure containing information about an undetected signature on a
-- page where it was expected but not found.
--
-- /See:/ 'newUndetectedSignature' smart constructor.
data UndetectedSignature = UndetectedSignature'
  { -- | The page where a signature was expected but not found.
    UndetectedSignature -> Maybe Natural
page :: Prelude.Maybe Prelude.Natural
  }
  deriving (UndetectedSignature -> UndetectedSignature -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UndetectedSignature -> UndetectedSignature -> Bool
$c/= :: UndetectedSignature -> UndetectedSignature -> Bool
== :: UndetectedSignature -> UndetectedSignature -> Bool
$c== :: UndetectedSignature -> UndetectedSignature -> Bool
Prelude.Eq, ReadPrec [UndetectedSignature]
ReadPrec UndetectedSignature
Int -> ReadS UndetectedSignature
ReadS [UndetectedSignature]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UndetectedSignature]
$creadListPrec :: ReadPrec [UndetectedSignature]
readPrec :: ReadPrec UndetectedSignature
$creadPrec :: ReadPrec UndetectedSignature
readList :: ReadS [UndetectedSignature]
$creadList :: ReadS [UndetectedSignature]
readsPrec :: Int -> ReadS UndetectedSignature
$creadsPrec :: Int -> ReadS UndetectedSignature
Prelude.Read, Int -> UndetectedSignature -> ShowS
[UndetectedSignature] -> ShowS
UndetectedSignature -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UndetectedSignature] -> ShowS
$cshowList :: [UndetectedSignature] -> ShowS
show :: UndetectedSignature -> String
$cshow :: UndetectedSignature -> String
showsPrec :: Int -> UndetectedSignature -> ShowS
$cshowsPrec :: Int -> UndetectedSignature -> ShowS
Prelude.Show, forall x. Rep UndetectedSignature x -> UndetectedSignature
forall x. UndetectedSignature -> Rep UndetectedSignature x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UndetectedSignature x -> UndetectedSignature
$cfrom :: forall x. UndetectedSignature -> Rep UndetectedSignature x
Prelude.Generic)

-- |
-- Create a value of 'UndetectedSignature' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'page', 'undetectedSignature_page' - The page where a signature was expected but not found.
newUndetectedSignature ::
  UndetectedSignature
newUndetectedSignature :: UndetectedSignature
newUndetectedSignature =
  UndetectedSignature' {$sel:page:UndetectedSignature' :: Maybe Natural
page = forall a. Maybe a
Prelude.Nothing}

-- | The page where a signature was expected but not found.
undetectedSignature_page :: Lens.Lens' UndetectedSignature (Prelude.Maybe Prelude.Natural)
undetectedSignature_page :: Lens' UndetectedSignature (Maybe Natural)
undetectedSignature_page = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UndetectedSignature' {Maybe Natural
page :: Maybe Natural
$sel:page:UndetectedSignature' :: UndetectedSignature -> Maybe Natural
page} -> Maybe Natural
page) (\s :: UndetectedSignature
s@UndetectedSignature' {} Maybe Natural
a -> UndetectedSignature
s {$sel:page:UndetectedSignature' :: Maybe Natural
page = Maybe Natural
a} :: UndetectedSignature)

instance Data.FromJSON UndetectedSignature where
  parseJSON :: Value -> Parser UndetectedSignature
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"UndetectedSignature"
      ( \Object
x ->
          Maybe Natural -> UndetectedSignature
UndetectedSignature' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Page")
      )

instance Prelude.Hashable UndetectedSignature where
  hashWithSalt :: Int -> UndetectedSignature -> Int
hashWithSalt Int
_salt UndetectedSignature' {Maybe Natural
page :: Maybe Natural
$sel:page:UndetectedSignature' :: UndetectedSignature -> Maybe Natural
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
page

instance Prelude.NFData UndetectedSignature where
  rnf :: UndetectedSignature -> ()
rnf UndetectedSignature' {Maybe Natural
page :: Maybe Natural
$sel:page:UndetectedSignature' :: UndetectedSignature -> Maybe Natural
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
page