{-# 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 #-}
module Amazonka.ComprehendMedical.Types.UnmappedAttribute where
import Amazonka.ComprehendMedical.Types.Attribute
import Amazonka.ComprehendMedical.Types.EntityType
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
data UnmappedAttribute = UnmappedAttribute'
{
UnmappedAttribute -> Maybe Attribute
attribute :: Prelude.Maybe Attribute,
UnmappedAttribute -> Maybe EntityType
type' :: Prelude.Maybe EntityType
}
deriving (UnmappedAttribute -> UnmappedAttribute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnmappedAttribute -> UnmappedAttribute -> Bool
$c/= :: UnmappedAttribute -> UnmappedAttribute -> Bool
== :: UnmappedAttribute -> UnmappedAttribute -> Bool
$c== :: UnmappedAttribute -> UnmappedAttribute -> Bool
Prelude.Eq, ReadPrec [UnmappedAttribute]
ReadPrec UnmappedAttribute
Int -> ReadS UnmappedAttribute
ReadS [UnmappedAttribute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UnmappedAttribute]
$creadListPrec :: ReadPrec [UnmappedAttribute]
readPrec :: ReadPrec UnmappedAttribute
$creadPrec :: ReadPrec UnmappedAttribute
readList :: ReadS [UnmappedAttribute]
$creadList :: ReadS [UnmappedAttribute]
readsPrec :: Int -> ReadS UnmappedAttribute
$creadsPrec :: Int -> ReadS UnmappedAttribute
Prelude.Read, Int -> UnmappedAttribute -> ShowS
[UnmappedAttribute] -> ShowS
UnmappedAttribute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnmappedAttribute] -> ShowS
$cshowList :: [UnmappedAttribute] -> ShowS
show :: UnmappedAttribute -> String
$cshow :: UnmappedAttribute -> String
showsPrec :: Int -> UnmappedAttribute -> ShowS
$cshowsPrec :: Int -> UnmappedAttribute -> ShowS
Prelude.Show, forall x. Rep UnmappedAttribute x -> UnmappedAttribute
forall x. UnmappedAttribute -> Rep UnmappedAttribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UnmappedAttribute x -> UnmappedAttribute
$cfrom :: forall x. UnmappedAttribute -> Rep UnmappedAttribute x
Prelude.Generic)
newUnmappedAttribute ::
UnmappedAttribute
newUnmappedAttribute :: UnmappedAttribute
newUnmappedAttribute =
UnmappedAttribute'
{ $sel:attribute:UnmappedAttribute' :: Maybe Attribute
attribute = forall a. Maybe a
Prelude.Nothing,
$sel:type':UnmappedAttribute' :: Maybe EntityType
type' = forall a. Maybe a
Prelude.Nothing
}
unmappedAttribute_attribute :: Lens.Lens' UnmappedAttribute (Prelude.Maybe Attribute)
unmappedAttribute_attribute :: Lens' UnmappedAttribute (Maybe Attribute)
unmappedAttribute_attribute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnmappedAttribute' {Maybe Attribute
attribute :: Maybe Attribute
$sel:attribute:UnmappedAttribute' :: UnmappedAttribute -> Maybe Attribute
attribute} -> Maybe Attribute
attribute) (\s :: UnmappedAttribute
s@UnmappedAttribute' {} Maybe Attribute
a -> UnmappedAttribute
s {$sel:attribute:UnmappedAttribute' :: Maybe Attribute
attribute = Maybe Attribute
a} :: UnmappedAttribute)
unmappedAttribute_type :: Lens.Lens' UnmappedAttribute (Prelude.Maybe EntityType)
unmappedAttribute_type :: Lens' UnmappedAttribute (Maybe EntityType)
unmappedAttribute_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnmappedAttribute' {Maybe EntityType
type' :: Maybe EntityType
$sel:type':UnmappedAttribute' :: UnmappedAttribute -> Maybe EntityType
type'} -> Maybe EntityType
type') (\s :: UnmappedAttribute
s@UnmappedAttribute' {} Maybe EntityType
a -> UnmappedAttribute
s {$sel:type':UnmappedAttribute' :: Maybe EntityType
type' = Maybe EntityType
a} :: UnmappedAttribute)
instance Data.FromJSON UnmappedAttribute where
parseJSON :: Value -> Parser UnmappedAttribute
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"UnmappedAttribute"
( \Object
x ->
Maybe Attribute -> Maybe EntityType -> UnmappedAttribute
UnmappedAttribute'
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
"Attribute")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Type")
)
instance Prelude.Hashable UnmappedAttribute where
hashWithSalt :: Int -> UnmappedAttribute -> Int
hashWithSalt Int
_salt UnmappedAttribute' {Maybe EntityType
Maybe Attribute
type' :: Maybe EntityType
attribute :: Maybe Attribute
$sel:type':UnmappedAttribute' :: UnmappedAttribute -> Maybe EntityType
$sel:attribute:UnmappedAttribute' :: UnmappedAttribute -> Maybe Attribute
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Attribute
attribute
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EntityType
type'
instance Prelude.NFData UnmappedAttribute where
rnf :: UnmappedAttribute -> ()
rnf UnmappedAttribute' {Maybe EntityType
Maybe Attribute
type' :: Maybe EntityType
attribute :: Maybe Attribute
$sel:type':UnmappedAttribute' :: UnmappedAttribute -> Maybe EntityType
$sel:attribute:UnmappedAttribute' :: UnmappedAttribute -> Maybe Attribute
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Attribute
attribute
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EntityType
type'