{-# 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.Wisdom.Types.ContentSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Wisdom.Types.ContentStatus
data ContentSummary = ContentSummary'
{
ContentSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ContentSummary -> Text
contentArn :: Prelude.Text,
ContentSummary -> Text
contentId :: Prelude.Text,
ContentSummary -> Text
contentType :: Prelude.Text,
ContentSummary -> Text
knowledgeBaseArn :: Prelude.Text,
ContentSummary -> Text
knowledgeBaseId :: Prelude.Text,
ContentSummary -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
ContentSummary -> Text
name :: Prelude.Text,
ContentSummary -> Text
revisionId :: Prelude.Text,
ContentSummary -> ContentStatus
status :: ContentStatus,
ContentSummary -> Text
title :: Prelude.Text
}
deriving (ContentSummary -> ContentSummary -> Bool
(ContentSummary -> ContentSummary -> Bool)
-> (ContentSummary -> ContentSummary -> Bool) -> Eq ContentSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContentSummary -> ContentSummary -> Bool
$c/= :: ContentSummary -> ContentSummary -> Bool
== :: ContentSummary -> ContentSummary -> Bool
$c== :: ContentSummary -> ContentSummary -> Bool
Prelude.Eq, ReadPrec [ContentSummary]
ReadPrec ContentSummary
Int -> ReadS ContentSummary
ReadS [ContentSummary]
(Int -> ReadS ContentSummary)
-> ReadS [ContentSummary]
-> ReadPrec ContentSummary
-> ReadPrec [ContentSummary]
-> Read ContentSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContentSummary]
$creadListPrec :: ReadPrec [ContentSummary]
readPrec :: ReadPrec ContentSummary
$creadPrec :: ReadPrec ContentSummary
readList :: ReadS [ContentSummary]
$creadList :: ReadS [ContentSummary]
readsPrec :: Int -> ReadS ContentSummary
$creadsPrec :: Int -> ReadS ContentSummary
Prelude.Read, Int -> ContentSummary -> ShowS
[ContentSummary] -> ShowS
ContentSummary -> String
(Int -> ContentSummary -> ShowS)
-> (ContentSummary -> String)
-> ([ContentSummary] -> ShowS)
-> Show ContentSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContentSummary] -> ShowS
$cshowList :: [ContentSummary] -> ShowS
show :: ContentSummary -> String
$cshow :: ContentSummary -> String
showsPrec :: Int -> ContentSummary -> ShowS
$cshowsPrec :: Int -> ContentSummary -> ShowS
Prelude.Show, (forall x. ContentSummary -> Rep ContentSummary x)
-> (forall x. Rep ContentSummary x -> ContentSummary)
-> Generic ContentSummary
forall x. Rep ContentSummary x -> ContentSummary
forall x. ContentSummary -> Rep ContentSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContentSummary x -> ContentSummary
$cfrom :: forall x. ContentSummary -> Rep ContentSummary x
Prelude.Generic)
newContentSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ContentStatus ->
Prelude.Text ->
ContentSummary
newContentSummary :: Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary
newContentSummary
Text
pContentArn_
Text
pContentId_
Text
pContentType_
Text
pKnowledgeBaseArn_
Text
pKnowledgeBaseId_
Text
pName_
Text
pRevisionId_
ContentStatus
pStatus_
Text
pTitle_ =
ContentSummary' :: Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary
ContentSummary'
{ $sel:tags:ContentSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:contentArn:ContentSummary' :: Text
contentArn = Text
pContentArn_,
$sel:contentId:ContentSummary' :: Text
contentId = Text
pContentId_,
$sel:contentType:ContentSummary' :: Text
contentType = Text
pContentType_,
$sel:knowledgeBaseArn:ContentSummary' :: Text
knowledgeBaseArn = Text
pKnowledgeBaseArn_,
$sel:knowledgeBaseId:ContentSummary' :: Text
knowledgeBaseId = Text
pKnowledgeBaseId_,
$sel:metadata:ContentSummary' :: HashMap Text Text
metadata = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
$sel:name:ContentSummary' :: Text
name = Text
pName_,
$sel:revisionId:ContentSummary' :: Text
revisionId = Text
pRevisionId_,
$sel:status:ContentSummary' :: ContentStatus
status = ContentStatus
pStatus_,
$sel:title:ContentSummary' :: Text
title = Text
pTitle_
}
contentSummary_tags :: Lens.Lens' ContentSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
contentSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ContentSummary -> f ContentSummary
contentSummary_tags = (ContentSummary -> Maybe (HashMap Text Text))
-> (ContentSummary -> Maybe (HashMap Text Text) -> ContentSummary)
-> Lens
ContentSummary
ContentSummary
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ContentSummary' :: ContentSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ContentSummary
s@ContentSummary' {} Maybe (HashMap Text Text)
a -> ContentSummary
s {$sel:tags:ContentSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ContentSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ContentSummary -> f ContentSummary)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ContentSummary
-> f ContentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
contentSummary_contentArn :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_contentArn :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_contentArn = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
contentArn :: Text
$sel:contentArn:ContentSummary' :: ContentSummary -> Text
contentArn} -> Text
contentArn) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:contentArn:ContentSummary' :: Text
contentArn = Text
a} :: ContentSummary)
contentSummary_contentId :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_contentId :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_contentId = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
contentId :: Text
$sel:contentId:ContentSummary' :: ContentSummary -> Text
contentId} -> Text
contentId) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:contentId:ContentSummary' :: Text
contentId = Text
a} :: ContentSummary)
contentSummary_contentType :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_contentType :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_contentType = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
contentType :: Text
$sel:contentType:ContentSummary' :: ContentSummary -> Text
contentType} -> Text
contentType) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:contentType:ContentSummary' :: Text
contentType = Text
a} :: ContentSummary)
contentSummary_knowledgeBaseArn :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_knowledgeBaseArn :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_knowledgeBaseArn = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
knowledgeBaseArn :: Text
$sel:knowledgeBaseArn:ContentSummary' :: ContentSummary -> Text
knowledgeBaseArn} -> Text
knowledgeBaseArn) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:knowledgeBaseArn:ContentSummary' :: Text
knowledgeBaseArn = Text
a} :: ContentSummary)
contentSummary_knowledgeBaseId :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_knowledgeBaseId :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_knowledgeBaseId = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
knowledgeBaseId :: Text
$sel:knowledgeBaseId:ContentSummary' :: ContentSummary -> Text
knowledgeBaseId} -> Text
knowledgeBaseId) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:knowledgeBaseId:ContentSummary' :: Text
knowledgeBaseId = Text
a} :: ContentSummary)
contentSummary_metadata :: Lens.Lens' ContentSummary (Prelude.HashMap Prelude.Text Prelude.Text)
contentSummary_metadata :: (HashMap Text Text -> f (HashMap Text Text))
-> ContentSummary -> f ContentSummary
contentSummary_metadata = (ContentSummary -> HashMap Text Text)
-> (ContentSummary -> HashMap Text Text -> ContentSummary)
-> Lens
ContentSummary
ContentSummary
(HashMap Text Text)
(HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {HashMap Text Text
metadata :: HashMap Text Text
$sel:metadata:ContentSummary' :: ContentSummary -> HashMap Text Text
metadata} -> HashMap Text Text
metadata) (\s :: ContentSummary
s@ContentSummary' {} HashMap Text Text
a -> ContentSummary
s {$sel:metadata:ContentSummary' :: HashMap Text Text
metadata = HashMap Text Text
a} :: ContentSummary) ((HashMap Text Text -> f (HashMap Text Text))
-> ContentSummary -> f ContentSummary)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> ContentSummary
-> f ContentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
contentSummary_name :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_name :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_name = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
name :: Text
$sel:name:ContentSummary' :: ContentSummary -> Text
name} -> Text
name) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:name:ContentSummary' :: Text
name = Text
a} :: ContentSummary)
contentSummary_revisionId :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_revisionId :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_revisionId = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
revisionId :: Text
$sel:revisionId:ContentSummary' :: ContentSummary -> Text
revisionId} -> Text
revisionId) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:revisionId:ContentSummary' :: Text
revisionId = Text
a} :: ContentSummary)
contentSummary_status :: Lens.Lens' ContentSummary ContentStatus
contentSummary_status :: (ContentStatus -> f ContentStatus)
-> ContentSummary -> f ContentSummary
contentSummary_status = (ContentSummary -> ContentStatus)
-> (ContentSummary -> ContentStatus -> ContentSummary)
-> Lens ContentSummary ContentSummary ContentStatus ContentStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {ContentStatus
status :: ContentStatus
$sel:status:ContentSummary' :: ContentSummary -> ContentStatus
status} -> ContentStatus
status) (\s :: ContentSummary
s@ContentSummary' {} ContentStatus
a -> ContentSummary
s {$sel:status:ContentSummary' :: ContentStatus
status = ContentStatus
a} :: ContentSummary)
contentSummary_title :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_title :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_title = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
title :: Text
$sel:title:ContentSummary' :: ContentSummary -> Text
title} -> Text
title) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:title:ContentSummary' :: Text
title = Text
a} :: ContentSummary)
instance Core.FromJSON ContentSummary where
parseJSON :: Value -> Parser ContentSummary
parseJSON =
String
-> (Object -> Parser ContentSummary)
-> Value
-> Parser ContentSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ContentSummary"
( \Object
x ->
Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary
ContentSummary'
(Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Text
-> Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Text
-> Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
-> Parser Text
-> Parser
(Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
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
"contentArn")
Parser
(Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
-> Parser Text
-> Parser
(Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
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
"contentId")
Parser
(Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
-> Parser Text
-> Parser
(Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
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
"contentType")
Parser
(Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
-> Parser Text
-> Parser
(Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
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
"knowledgeBaseArn")
Parser
(Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary)
-> Parser Text
-> Parser
(HashMap Text Text
-> Text -> Text -> ContentStatus -> Text -> ContentSummary)
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
"knowledgeBaseId")
Parser
(HashMap Text Text
-> Text -> Text -> ContentStatus -> Text -> ContentSummary)
-> Parser (HashMap Text Text)
-> Parser (Text -> Text -> ContentStatus -> Text -> ContentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (HashMap Text Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"metadata" Parser (Maybe (HashMap Text Text))
-> HashMap Text Text -> Parser (HashMap Text Text)
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= HashMap Text Text
forall a. Monoid a => a
Prelude.mempty)
Parser (Text -> Text -> ContentStatus -> Text -> ContentSummary)
-> Parser Text
-> Parser (Text -> ContentStatus -> Text -> ContentSummary)
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
"name")
Parser (Text -> ContentStatus -> Text -> ContentSummary)
-> Parser Text -> Parser (ContentStatus -> Text -> ContentSummary)
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
"revisionId")
Parser (ContentStatus -> Text -> ContentSummary)
-> Parser ContentStatus -> Parser (Text -> ContentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ContentStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (Text -> ContentSummary)
-> Parser Text -> Parser ContentSummary
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
"title")
)
instance Prelude.Hashable ContentSummary
instance Prelude.NFData ContentSummary