{-# 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.DynamoDB.Types.ContributorInsightsSummary where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.ContributorInsightsStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ContributorInsightsSummary = ContributorInsightsSummary'
{
ContributorInsightsSummary -> Maybe ContributorInsightsStatus
contributorInsightsStatus :: Prelude.Maybe ContributorInsightsStatus,
ContributorInsightsSummary -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text,
ContributorInsightsSummary -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text
}
deriving (ContributorInsightsSummary -> ContributorInsightsSummary -> Bool
(ContributorInsightsSummary -> ContributorInsightsSummary -> Bool)
-> (ContributorInsightsSummary
-> ContributorInsightsSummary -> Bool)
-> Eq ContributorInsightsSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContributorInsightsSummary -> ContributorInsightsSummary -> Bool
$c/= :: ContributorInsightsSummary -> ContributorInsightsSummary -> Bool
== :: ContributorInsightsSummary -> ContributorInsightsSummary -> Bool
$c== :: ContributorInsightsSummary -> ContributorInsightsSummary -> Bool
Prelude.Eq, ReadPrec [ContributorInsightsSummary]
ReadPrec ContributorInsightsSummary
Int -> ReadS ContributorInsightsSummary
ReadS [ContributorInsightsSummary]
(Int -> ReadS ContributorInsightsSummary)
-> ReadS [ContributorInsightsSummary]
-> ReadPrec ContributorInsightsSummary
-> ReadPrec [ContributorInsightsSummary]
-> Read ContributorInsightsSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContributorInsightsSummary]
$creadListPrec :: ReadPrec [ContributorInsightsSummary]
readPrec :: ReadPrec ContributorInsightsSummary
$creadPrec :: ReadPrec ContributorInsightsSummary
readList :: ReadS [ContributorInsightsSummary]
$creadList :: ReadS [ContributorInsightsSummary]
readsPrec :: Int -> ReadS ContributorInsightsSummary
$creadsPrec :: Int -> ReadS ContributorInsightsSummary
Prelude.Read, Int -> ContributorInsightsSummary -> ShowS
[ContributorInsightsSummary] -> ShowS
ContributorInsightsSummary -> String
(Int -> ContributorInsightsSummary -> ShowS)
-> (ContributorInsightsSummary -> String)
-> ([ContributorInsightsSummary] -> ShowS)
-> Show ContributorInsightsSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContributorInsightsSummary] -> ShowS
$cshowList :: [ContributorInsightsSummary] -> ShowS
show :: ContributorInsightsSummary -> String
$cshow :: ContributorInsightsSummary -> String
showsPrec :: Int -> ContributorInsightsSummary -> ShowS
$cshowsPrec :: Int -> ContributorInsightsSummary -> ShowS
Prelude.Show, (forall x.
ContributorInsightsSummary -> Rep ContributorInsightsSummary x)
-> (forall x.
Rep ContributorInsightsSummary x -> ContributorInsightsSummary)
-> Generic ContributorInsightsSummary
forall x.
Rep ContributorInsightsSummary x -> ContributorInsightsSummary
forall x.
ContributorInsightsSummary -> Rep ContributorInsightsSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ContributorInsightsSummary x -> ContributorInsightsSummary
$cfrom :: forall x.
ContributorInsightsSummary -> Rep ContributorInsightsSummary x
Prelude.Generic)
newContributorInsightsSummary ::
ContributorInsightsSummary
newContributorInsightsSummary :: ContributorInsightsSummary
newContributorInsightsSummary =
ContributorInsightsSummary' :: Maybe ContributorInsightsStatus
-> Maybe Text -> Maybe Text -> ContributorInsightsSummary
ContributorInsightsSummary'
{ $sel:contributorInsightsStatus:ContributorInsightsSummary' :: Maybe ContributorInsightsStatus
contributorInsightsStatus =
Maybe ContributorInsightsStatus
forall a. Maybe a
Prelude.Nothing,
$sel:tableName:ContributorInsightsSummary' :: Maybe Text
tableName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:indexName:ContributorInsightsSummary' :: Maybe Text
indexName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
contributorInsightsSummary_contributorInsightsStatus :: Lens.Lens' ContributorInsightsSummary (Prelude.Maybe ContributorInsightsStatus)
contributorInsightsSummary_contributorInsightsStatus :: (Maybe ContributorInsightsStatus
-> f (Maybe ContributorInsightsStatus))
-> ContributorInsightsSummary -> f ContributorInsightsSummary
contributorInsightsSummary_contributorInsightsStatus = (ContributorInsightsSummary -> Maybe ContributorInsightsStatus)
-> (ContributorInsightsSummary
-> Maybe ContributorInsightsStatus -> ContributorInsightsSummary)
-> Lens
ContributorInsightsSummary
ContributorInsightsSummary
(Maybe ContributorInsightsStatus)
(Maybe ContributorInsightsStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContributorInsightsSummary' {Maybe ContributorInsightsStatus
contributorInsightsStatus :: Maybe ContributorInsightsStatus
$sel:contributorInsightsStatus:ContributorInsightsSummary' :: ContributorInsightsSummary -> Maybe ContributorInsightsStatus
contributorInsightsStatus} -> Maybe ContributorInsightsStatus
contributorInsightsStatus) (\s :: ContributorInsightsSummary
s@ContributorInsightsSummary' {} Maybe ContributorInsightsStatus
a -> ContributorInsightsSummary
s {$sel:contributorInsightsStatus:ContributorInsightsSummary' :: Maybe ContributorInsightsStatus
contributorInsightsStatus = Maybe ContributorInsightsStatus
a} :: ContributorInsightsSummary)
contributorInsightsSummary_tableName :: Lens.Lens' ContributorInsightsSummary (Prelude.Maybe Prelude.Text)
contributorInsightsSummary_tableName :: (Maybe Text -> f (Maybe Text))
-> ContributorInsightsSummary -> f ContributorInsightsSummary
contributorInsightsSummary_tableName = (ContributorInsightsSummary -> Maybe Text)
-> (ContributorInsightsSummary
-> Maybe Text -> ContributorInsightsSummary)
-> Lens
ContributorInsightsSummary
ContributorInsightsSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContributorInsightsSummary' {Maybe Text
tableName :: Maybe Text
$sel:tableName:ContributorInsightsSummary' :: ContributorInsightsSummary -> Maybe Text
tableName} -> Maybe Text
tableName) (\s :: ContributorInsightsSummary
s@ContributorInsightsSummary' {} Maybe Text
a -> ContributorInsightsSummary
s {$sel:tableName:ContributorInsightsSummary' :: Maybe Text
tableName = Maybe Text
a} :: ContributorInsightsSummary)
contributorInsightsSummary_indexName :: Lens.Lens' ContributorInsightsSummary (Prelude.Maybe Prelude.Text)
contributorInsightsSummary_indexName :: (Maybe Text -> f (Maybe Text))
-> ContributorInsightsSummary -> f ContributorInsightsSummary
contributorInsightsSummary_indexName = (ContributorInsightsSummary -> Maybe Text)
-> (ContributorInsightsSummary
-> Maybe Text -> ContributorInsightsSummary)
-> Lens
ContributorInsightsSummary
ContributorInsightsSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContributorInsightsSummary' {Maybe Text
indexName :: Maybe Text
$sel:indexName:ContributorInsightsSummary' :: ContributorInsightsSummary -> Maybe Text
indexName} -> Maybe Text
indexName) (\s :: ContributorInsightsSummary
s@ContributorInsightsSummary' {} Maybe Text
a -> ContributorInsightsSummary
s {$sel:indexName:ContributorInsightsSummary' :: Maybe Text
indexName = Maybe Text
a} :: ContributorInsightsSummary)
instance Core.FromJSON ContributorInsightsSummary where
parseJSON :: Value -> Parser ContributorInsightsSummary
parseJSON =
String
-> (Object -> Parser ContributorInsightsSummary)
-> Value
-> Parser ContributorInsightsSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ContributorInsightsSummary"
( \Object
x ->
Maybe ContributorInsightsStatus
-> Maybe Text -> Maybe Text -> ContributorInsightsSummary
ContributorInsightsSummary'
(Maybe ContributorInsightsStatus
-> Maybe Text -> Maybe Text -> ContributorInsightsSummary)
-> Parser (Maybe ContributorInsightsStatus)
-> Parser (Maybe Text -> Maybe Text -> ContributorInsightsSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ContributorInsightsStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ContributorInsightsStatus")
Parser (Maybe Text -> Maybe Text -> ContributorInsightsSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ContributorInsightsSummary)
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
"TableName")
Parser (Maybe Text -> ContributorInsightsSummary)
-> Parser (Maybe Text) -> Parser ContributorInsightsSummary
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
"IndexName")
)
instance Prelude.Hashable ContributorInsightsSummary
instance Prelude.NFData ContributorInsightsSummary