{-# 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.Comprehend.Types.EntityTypesListItem 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
data EntityTypesListItem = EntityTypesListItem'
{
EntityTypesListItem -> Text
type' :: Prelude.Text
}
deriving (EntityTypesListItem -> EntityTypesListItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EntityTypesListItem -> EntityTypesListItem -> Bool
$c/= :: EntityTypesListItem -> EntityTypesListItem -> Bool
== :: EntityTypesListItem -> EntityTypesListItem -> Bool
$c== :: EntityTypesListItem -> EntityTypesListItem -> Bool
Prelude.Eq, ReadPrec [EntityTypesListItem]
ReadPrec EntityTypesListItem
Int -> ReadS EntityTypesListItem
ReadS [EntityTypesListItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EntityTypesListItem]
$creadListPrec :: ReadPrec [EntityTypesListItem]
readPrec :: ReadPrec EntityTypesListItem
$creadPrec :: ReadPrec EntityTypesListItem
readList :: ReadS [EntityTypesListItem]
$creadList :: ReadS [EntityTypesListItem]
readsPrec :: Int -> ReadS EntityTypesListItem
$creadsPrec :: Int -> ReadS EntityTypesListItem
Prelude.Read, Int -> EntityTypesListItem -> ShowS
[EntityTypesListItem] -> ShowS
EntityTypesListItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EntityTypesListItem] -> ShowS
$cshowList :: [EntityTypesListItem] -> ShowS
show :: EntityTypesListItem -> String
$cshow :: EntityTypesListItem -> String
showsPrec :: Int -> EntityTypesListItem -> ShowS
$cshowsPrec :: Int -> EntityTypesListItem -> ShowS
Prelude.Show, forall x. Rep EntityTypesListItem x -> EntityTypesListItem
forall x. EntityTypesListItem -> Rep EntityTypesListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EntityTypesListItem x -> EntityTypesListItem
$cfrom :: forall x. EntityTypesListItem -> Rep EntityTypesListItem x
Prelude.Generic)
newEntityTypesListItem ::
Prelude.Text ->
EntityTypesListItem
newEntityTypesListItem :: Text -> EntityTypesListItem
newEntityTypesListItem Text
pType_ =
EntityTypesListItem' {$sel:type':EntityTypesListItem' :: Text
type' = Text
pType_}
entityTypesListItem_type :: Lens.Lens' EntityTypesListItem Prelude.Text
entityTypesListItem_type :: Lens' EntityTypesListItem Text
entityTypesListItem_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityTypesListItem' {Text
type' :: Text
$sel:type':EntityTypesListItem' :: EntityTypesListItem -> Text
type'} -> Text
type') (\s :: EntityTypesListItem
s@EntityTypesListItem' {} Text
a -> EntityTypesListItem
s {$sel:type':EntityTypesListItem' :: Text
type' = Text
a} :: EntityTypesListItem)
instance Data.FromJSON EntityTypesListItem where
parseJSON :: Value -> Parser EntityTypesListItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EntityTypesListItem"
( \Object
x ->
Text -> EntityTypesListItem
EntityTypesListItem' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Type")
)
instance Prelude.Hashable EntityTypesListItem where
hashWithSalt :: Int -> EntityTypesListItem -> Int
hashWithSalt Int
_salt EntityTypesListItem' {Text
type' :: Text
$sel:type':EntityTypesListItem' :: EntityTypesListItem -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
type'
instance Prelude.NFData EntityTypesListItem where
rnf :: EntityTypesListItem -> ()
rnf EntityTypesListItem' {Text
type' :: Text
$sel:type':EntityTypesListItem' :: EntityTypesListItem -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
type'
instance Data.ToJSON EntityTypesListItem where
toJSON :: EntityTypesListItem -> Value
toJSON EntityTypesListItem' {Text
type' :: Text
$sel:type':EntityTypesListItem' :: EntityTypesListItem -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"Type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
type')]
)