{-# 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.Lens as Lens
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
(UnmappedAttribute -> UnmappedAttribute -> Bool)
-> (UnmappedAttribute -> UnmappedAttribute -> Bool)
-> Eq UnmappedAttribute
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]
(Int -> ReadS UnmappedAttribute)
-> ReadS [UnmappedAttribute]
-> ReadPrec UnmappedAttribute
-> ReadPrec [UnmappedAttribute]
-> Read 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
(Int -> UnmappedAttribute -> ShowS)
-> (UnmappedAttribute -> String)
-> ([UnmappedAttribute] -> ShowS)
-> Show UnmappedAttribute
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. UnmappedAttribute -> Rep UnmappedAttribute x)
-> (forall x. Rep UnmappedAttribute x -> UnmappedAttribute)
-> Generic UnmappedAttribute
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' :: Maybe Attribute -> Maybe EntityType -> UnmappedAttribute
UnmappedAttribute'
{ $sel:attribute:UnmappedAttribute' :: Maybe Attribute
attribute = Maybe Attribute
forall a. Maybe a
Prelude.Nothing,
$sel:type':UnmappedAttribute' :: Maybe EntityType
type' = Maybe EntityType
forall a. Maybe a
Prelude.Nothing
}
unmappedAttribute_attribute :: Lens.Lens' UnmappedAttribute (Prelude.Maybe Attribute)
unmappedAttribute_attribute :: (Maybe Attribute -> f (Maybe Attribute))
-> UnmappedAttribute -> f UnmappedAttribute
unmappedAttribute_attribute = (UnmappedAttribute -> Maybe Attribute)
-> (UnmappedAttribute -> Maybe Attribute -> UnmappedAttribute)
-> Lens
UnmappedAttribute
UnmappedAttribute
(Maybe Attribute)
(Maybe 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 :: (Maybe EntityType -> f (Maybe EntityType))
-> UnmappedAttribute -> f UnmappedAttribute
unmappedAttribute_type = (UnmappedAttribute -> Maybe EntityType)
-> (UnmappedAttribute -> Maybe EntityType -> UnmappedAttribute)
-> Lens
UnmappedAttribute
UnmappedAttribute
(Maybe EntityType)
(Maybe EntityType)
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 Core.FromJSON UnmappedAttribute where
parseJSON :: Value -> Parser UnmappedAttribute
parseJSON =
String
-> (Object -> Parser UnmappedAttribute)
-> Value
-> Parser UnmappedAttribute
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UnmappedAttribute"
( \Object
x ->
Maybe Attribute -> Maybe EntityType -> UnmappedAttribute
UnmappedAttribute'
(Maybe Attribute -> Maybe EntityType -> UnmappedAttribute)
-> Parser (Maybe Attribute)
-> Parser (Maybe EntityType -> UnmappedAttribute)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Attribute)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Attribute")
Parser (Maybe EntityType -> UnmappedAttribute)
-> Parser (Maybe EntityType) -> Parser UnmappedAttribute
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EntityType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
)
instance Prelude.Hashable UnmappedAttribute
instance Prelude.NFData UnmappedAttribute