{-# 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.AugmentedManifestsListItem where
import Amazonka.Comprehend.Types.AugmentedManifestsDocumentTypeFormat
import Amazonka.Comprehend.Types.Split
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AugmentedManifestsListItem = AugmentedManifestsListItem'
{
AugmentedManifestsListItem -> Maybe Text
sourceDocumentsS3Uri :: Prelude.Maybe Prelude.Text,
AugmentedManifestsListItem
-> Maybe AugmentedManifestsDocumentTypeFormat
documentType :: Prelude.Maybe AugmentedManifestsDocumentTypeFormat,
AugmentedManifestsListItem -> Maybe Split
split :: Prelude.Maybe Split,
AugmentedManifestsListItem -> Maybe Text
annotationDataS3Uri :: Prelude.Maybe Prelude.Text,
AugmentedManifestsListItem -> Text
s3Uri :: Prelude.Text,
AugmentedManifestsListItem -> [Text]
attributeNames :: [Prelude.Text]
}
deriving (AugmentedManifestsListItem -> AugmentedManifestsListItem -> Bool
(AugmentedManifestsListItem -> AugmentedManifestsListItem -> Bool)
-> (AugmentedManifestsListItem
-> AugmentedManifestsListItem -> Bool)
-> Eq AugmentedManifestsListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AugmentedManifestsListItem -> AugmentedManifestsListItem -> Bool
$c/= :: AugmentedManifestsListItem -> AugmentedManifestsListItem -> Bool
== :: AugmentedManifestsListItem -> AugmentedManifestsListItem -> Bool
$c== :: AugmentedManifestsListItem -> AugmentedManifestsListItem -> Bool
Prelude.Eq, ReadPrec [AugmentedManifestsListItem]
ReadPrec AugmentedManifestsListItem
Int -> ReadS AugmentedManifestsListItem
ReadS [AugmentedManifestsListItem]
(Int -> ReadS AugmentedManifestsListItem)
-> ReadS [AugmentedManifestsListItem]
-> ReadPrec AugmentedManifestsListItem
-> ReadPrec [AugmentedManifestsListItem]
-> Read AugmentedManifestsListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AugmentedManifestsListItem]
$creadListPrec :: ReadPrec [AugmentedManifestsListItem]
readPrec :: ReadPrec AugmentedManifestsListItem
$creadPrec :: ReadPrec AugmentedManifestsListItem
readList :: ReadS [AugmentedManifestsListItem]
$creadList :: ReadS [AugmentedManifestsListItem]
readsPrec :: Int -> ReadS AugmentedManifestsListItem
$creadsPrec :: Int -> ReadS AugmentedManifestsListItem
Prelude.Read, Int -> AugmentedManifestsListItem -> ShowS
[AugmentedManifestsListItem] -> ShowS
AugmentedManifestsListItem -> String
(Int -> AugmentedManifestsListItem -> ShowS)
-> (AugmentedManifestsListItem -> String)
-> ([AugmentedManifestsListItem] -> ShowS)
-> Show AugmentedManifestsListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AugmentedManifestsListItem] -> ShowS
$cshowList :: [AugmentedManifestsListItem] -> ShowS
show :: AugmentedManifestsListItem -> String
$cshow :: AugmentedManifestsListItem -> String
showsPrec :: Int -> AugmentedManifestsListItem -> ShowS
$cshowsPrec :: Int -> AugmentedManifestsListItem -> ShowS
Prelude.Show, (forall x.
AugmentedManifestsListItem -> Rep AugmentedManifestsListItem x)
-> (forall x.
Rep AugmentedManifestsListItem x -> AugmentedManifestsListItem)
-> Generic AugmentedManifestsListItem
forall x.
Rep AugmentedManifestsListItem x -> AugmentedManifestsListItem
forall x.
AugmentedManifestsListItem -> Rep AugmentedManifestsListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AugmentedManifestsListItem x -> AugmentedManifestsListItem
$cfrom :: forall x.
AugmentedManifestsListItem -> Rep AugmentedManifestsListItem x
Prelude.Generic)
newAugmentedManifestsListItem ::
Prelude.Text ->
AugmentedManifestsListItem
newAugmentedManifestsListItem :: Text -> AugmentedManifestsListItem
newAugmentedManifestsListItem Text
pS3Uri_ =
AugmentedManifestsListItem' :: Maybe Text
-> Maybe AugmentedManifestsDocumentTypeFormat
-> Maybe Split
-> Maybe Text
-> Text
-> [Text]
-> AugmentedManifestsListItem
AugmentedManifestsListItem'
{ $sel:sourceDocumentsS3Uri:AugmentedManifestsListItem' :: Maybe Text
sourceDocumentsS3Uri =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:documentType:AugmentedManifestsListItem' :: Maybe AugmentedManifestsDocumentTypeFormat
documentType = Maybe AugmentedManifestsDocumentTypeFormat
forall a. Maybe a
Prelude.Nothing,
$sel:split:AugmentedManifestsListItem' :: Maybe Split
split = Maybe Split
forall a. Maybe a
Prelude.Nothing,
$sel:annotationDataS3Uri:AugmentedManifestsListItem' :: Maybe Text
annotationDataS3Uri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Uri:AugmentedManifestsListItem' :: Text
s3Uri = Text
pS3Uri_,
$sel:attributeNames:AugmentedManifestsListItem' :: [Text]
attributeNames = [Text]
forall a. Monoid a => a
Prelude.mempty
}
augmentedManifestsListItem_sourceDocumentsS3Uri :: Lens.Lens' AugmentedManifestsListItem (Prelude.Maybe Prelude.Text)
augmentedManifestsListItem_sourceDocumentsS3Uri :: (Maybe Text -> f (Maybe Text))
-> AugmentedManifestsListItem -> f AugmentedManifestsListItem
augmentedManifestsListItem_sourceDocumentsS3Uri = (AugmentedManifestsListItem -> Maybe Text)
-> (AugmentedManifestsListItem
-> Maybe Text -> AugmentedManifestsListItem)
-> Lens
AugmentedManifestsListItem
AugmentedManifestsListItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AugmentedManifestsListItem' {Maybe Text
sourceDocumentsS3Uri :: Maybe Text
$sel:sourceDocumentsS3Uri:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> Maybe Text
sourceDocumentsS3Uri} -> Maybe Text
sourceDocumentsS3Uri) (\s :: AugmentedManifestsListItem
s@AugmentedManifestsListItem' {} Maybe Text
a -> AugmentedManifestsListItem
s {$sel:sourceDocumentsS3Uri:AugmentedManifestsListItem' :: Maybe Text
sourceDocumentsS3Uri = Maybe Text
a} :: AugmentedManifestsListItem)
augmentedManifestsListItem_documentType :: Lens.Lens' AugmentedManifestsListItem (Prelude.Maybe AugmentedManifestsDocumentTypeFormat)
augmentedManifestsListItem_documentType :: (Maybe AugmentedManifestsDocumentTypeFormat
-> f (Maybe AugmentedManifestsDocumentTypeFormat))
-> AugmentedManifestsListItem -> f AugmentedManifestsListItem
augmentedManifestsListItem_documentType = (AugmentedManifestsListItem
-> Maybe AugmentedManifestsDocumentTypeFormat)
-> (AugmentedManifestsListItem
-> Maybe AugmentedManifestsDocumentTypeFormat
-> AugmentedManifestsListItem)
-> Lens
AugmentedManifestsListItem
AugmentedManifestsListItem
(Maybe AugmentedManifestsDocumentTypeFormat)
(Maybe AugmentedManifestsDocumentTypeFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AugmentedManifestsListItem' {Maybe AugmentedManifestsDocumentTypeFormat
documentType :: Maybe AugmentedManifestsDocumentTypeFormat
$sel:documentType:AugmentedManifestsListItem' :: AugmentedManifestsListItem
-> Maybe AugmentedManifestsDocumentTypeFormat
documentType} -> Maybe AugmentedManifestsDocumentTypeFormat
documentType) (\s :: AugmentedManifestsListItem
s@AugmentedManifestsListItem' {} Maybe AugmentedManifestsDocumentTypeFormat
a -> AugmentedManifestsListItem
s {$sel:documentType:AugmentedManifestsListItem' :: Maybe AugmentedManifestsDocumentTypeFormat
documentType = Maybe AugmentedManifestsDocumentTypeFormat
a} :: AugmentedManifestsListItem)
augmentedManifestsListItem_split :: Lens.Lens' AugmentedManifestsListItem (Prelude.Maybe Split)
augmentedManifestsListItem_split :: (Maybe Split -> f (Maybe Split))
-> AugmentedManifestsListItem -> f AugmentedManifestsListItem
augmentedManifestsListItem_split = (AugmentedManifestsListItem -> Maybe Split)
-> (AugmentedManifestsListItem
-> Maybe Split -> AugmentedManifestsListItem)
-> Lens
AugmentedManifestsListItem
AugmentedManifestsListItem
(Maybe Split)
(Maybe Split)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AugmentedManifestsListItem' {Maybe Split
split :: Maybe Split
$sel:split:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> Maybe Split
split} -> Maybe Split
split) (\s :: AugmentedManifestsListItem
s@AugmentedManifestsListItem' {} Maybe Split
a -> AugmentedManifestsListItem
s {$sel:split:AugmentedManifestsListItem' :: Maybe Split
split = Maybe Split
a} :: AugmentedManifestsListItem)
augmentedManifestsListItem_annotationDataS3Uri :: Lens.Lens' AugmentedManifestsListItem (Prelude.Maybe Prelude.Text)
augmentedManifestsListItem_annotationDataS3Uri :: (Maybe Text -> f (Maybe Text))
-> AugmentedManifestsListItem -> f AugmentedManifestsListItem
augmentedManifestsListItem_annotationDataS3Uri = (AugmentedManifestsListItem -> Maybe Text)
-> (AugmentedManifestsListItem
-> Maybe Text -> AugmentedManifestsListItem)
-> Lens
AugmentedManifestsListItem
AugmentedManifestsListItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AugmentedManifestsListItem' {Maybe Text
annotationDataS3Uri :: Maybe Text
$sel:annotationDataS3Uri:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> Maybe Text
annotationDataS3Uri} -> Maybe Text
annotationDataS3Uri) (\s :: AugmentedManifestsListItem
s@AugmentedManifestsListItem' {} Maybe Text
a -> AugmentedManifestsListItem
s {$sel:annotationDataS3Uri:AugmentedManifestsListItem' :: Maybe Text
annotationDataS3Uri = Maybe Text
a} :: AugmentedManifestsListItem)
augmentedManifestsListItem_s3Uri :: Lens.Lens' AugmentedManifestsListItem Prelude.Text
augmentedManifestsListItem_s3Uri :: (Text -> f Text)
-> AugmentedManifestsListItem -> f AugmentedManifestsListItem
augmentedManifestsListItem_s3Uri = (AugmentedManifestsListItem -> Text)
-> (AugmentedManifestsListItem
-> Text -> AugmentedManifestsListItem)
-> Lens
AugmentedManifestsListItem AugmentedManifestsListItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AugmentedManifestsListItem' {Text
s3Uri :: Text
$sel:s3Uri:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> Text
s3Uri} -> Text
s3Uri) (\s :: AugmentedManifestsListItem
s@AugmentedManifestsListItem' {} Text
a -> AugmentedManifestsListItem
s {$sel:s3Uri:AugmentedManifestsListItem' :: Text
s3Uri = Text
a} :: AugmentedManifestsListItem)
augmentedManifestsListItem_attributeNames :: Lens.Lens' AugmentedManifestsListItem [Prelude.Text]
augmentedManifestsListItem_attributeNames :: ([Text] -> f [Text])
-> AugmentedManifestsListItem -> f AugmentedManifestsListItem
augmentedManifestsListItem_attributeNames = (AugmentedManifestsListItem -> [Text])
-> (AugmentedManifestsListItem
-> [Text] -> AugmentedManifestsListItem)
-> Lens
AugmentedManifestsListItem AugmentedManifestsListItem [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AugmentedManifestsListItem' {[Text]
attributeNames :: [Text]
$sel:attributeNames:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> [Text]
attributeNames} -> [Text]
attributeNames) (\s :: AugmentedManifestsListItem
s@AugmentedManifestsListItem' {} [Text]
a -> AugmentedManifestsListItem
s {$sel:attributeNames:AugmentedManifestsListItem' :: [Text]
attributeNames = [Text]
a} :: AugmentedManifestsListItem) (([Text] -> f [Text])
-> AugmentedManifestsListItem -> f AugmentedManifestsListItem)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> AugmentedManifestsListItem
-> f AugmentedManifestsListItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON AugmentedManifestsListItem where
parseJSON :: Value -> Parser AugmentedManifestsListItem
parseJSON =
String
-> (Object -> Parser AugmentedManifestsListItem)
-> Value
-> Parser AugmentedManifestsListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AugmentedManifestsListItem"
( \Object
x ->
Maybe Text
-> Maybe AugmentedManifestsDocumentTypeFormat
-> Maybe Split
-> Maybe Text
-> Text
-> [Text]
-> AugmentedManifestsListItem
AugmentedManifestsListItem'
(Maybe Text
-> Maybe AugmentedManifestsDocumentTypeFormat
-> Maybe Split
-> Maybe Text
-> Text
-> [Text]
-> AugmentedManifestsListItem)
-> Parser (Maybe Text)
-> Parser
(Maybe AugmentedManifestsDocumentTypeFormat
-> Maybe Split
-> Maybe Text
-> Text
-> [Text]
-> AugmentedManifestsListItem)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceDocumentsS3Uri")
Parser
(Maybe AugmentedManifestsDocumentTypeFormat
-> Maybe Split
-> Maybe Text
-> Text
-> [Text]
-> AugmentedManifestsListItem)
-> Parser (Maybe AugmentedManifestsDocumentTypeFormat)
-> Parser
(Maybe Split
-> Maybe Text -> Text -> [Text] -> AugmentedManifestsListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AugmentedManifestsDocumentTypeFormat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DocumentType")
Parser
(Maybe Split
-> Maybe Text -> Text -> [Text] -> AugmentedManifestsListItem)
-> Parser (Maybe Split)
-> Parser
(Maybe Text -> Text -> [Text] -> AugmentedManifestsListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Split)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Split")
Parser (Maybe Text -> Text -> [Text] -> AugmentedManifestsListItem)
-> Parser (Maybe Text)
-> Parser (Text -> [Text] -> AugmentedManifestsListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AnnotationDataS3Uri")
Parser (Text -> [Text] -> AugmentedManifestsListItem)
-> Parser Text -> Parser ([Text] -> AugmentedManifestsListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3Uri")
Parser ([Text] -> AugmentedManifestsListItem)
-> Parser [Text] -> Parser AugmentedManifestsListItem
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AttributeNames"
Parser (Maybe [Text]) -> [Text] -> Parser [Text]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [Text]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable AugmentedManifestsListItem
instance Prelude.NFData AugmentedManifestsListItem
instance Core.ToJSON AugmentedManifestsListItem where
toJSON :: AugmentedManifestsListItem -> Value
toJSON AugmentedManifestsListItem' {[Text]
Maybe Text
Maybe AugmentedManifestsDocumentTypeFormat
Maybe Split
Text
attributeNames :: [Text]
s3Uri :: Text
annotationDataS3Uri :: Maybe Text
split :: Maybe Split
documentType :: Maybe AugmentedManifestsDocumentTypeFormat
sourceDocumentsS3Uri :: Maybe Text
$sel:attributeNames:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> [Text]
$sel:s3Uri:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> Text
$sel:annotationDataS3Uri:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> Maybe Text
$sel:split:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> Maybe Split
$sel:documentType:AugmentedManifestsListItem' :: AugmentedManifestsListItem
-> Maybe AugmentedManifestsDocumentTypeFormat
$sel:sourceDocumentsS3Uri:AugmentedManifestsListItem' :: AugmentedManifestsListItem -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SourceDocumentsS3Uri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceDocumentsS3Uri,
(Text
"DocumentType" Text -> AugmentedManifestsDocumentTypeFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AugmentedManifestsDocumentTypeFormat -> Pair)
-> Maybe AugmentedManifestsDocumentTypeFormat -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AugmentedManifestsDocumentTypeFormat
documentType,
(Text
"Split" Text -> Split -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Split -> Pair) -> Maybe Split -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Split
split,
(Text
"AnnotationDataS3Uri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
annotationDataS3Uri,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"S3Uri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
s3Uri),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AttributeNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
attributeNames)
]
)