{-# 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.CloudWatchEvents.Types.PutPartnerEventsRequestEntry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PutPartnerEventsRequestEntry = PutPartnerEventsRequestEntry'
{
PutPartnerEventsRequestEntry -> Maybe POSIX
time :: Prelude.Maybe Core.POSIX,
PutPartnerEventsRequestEntry -> Maybe Text
detailType :: Prelude.Maybe Prelude.Text,
PutPartnerEventsRequestEntry -> Maybe [Text]
resources :: Prelude.Maybe [Prelude.Text],
PutPartnerEventsRequestEntry -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
PutPartnerEventsRequestEntry -> Maybe Text
detail :: Prelude.Maybe Prelude.Text
}
deriving (PutPartnerEventsRequestEntry
-> PutPartnerEventsRequestEntry -> Bool
(PutPartnerEventsRequestEntry
-> PutPartnerEventsRequestEntry -> Bool)
-> (PutPartnerEventsRequestEntry
-> PutPartnerEventsRequestEntry -> Bool)
-> Eq PutPartnerEventsRequestEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutPartnerEventsRequestEntry
-> PutPartnerEventsRequestEntry -> Bool
$c/= :: PutPartnerEventsRequestEntry
-> PutPartnerEventsRequestEntry -> Bool
== :: PutPartnerEventsRequestEntry
-> PutPartnerEventsRequestEntry -> Bool
$c== :: PutPartnerEventsRequestEntry
-> PutPartnerEventsRequestEntry -> Bool
Prelude.Eq, ReadPrec [PutPartnerEventsRequestEntry]
ReadPrec PutPartnerEventsRequestEntry
Int -> ReadS PutPartnerEventsRequestEntry
ReadS [PutPartnerEventsRequestEntry]
(Int -> ReadS PutPartnerEventsRequestEntry)
-> ReadS [PutPartnerEventsRequestEntry]
-> ReadPrec PutPartnerEventsRequestEntry
-> ReadPrec [PutPartnerEventsRequestEntry]
-> Read PutPartnerEventsRequestEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutPartnerEventsRequestEntry]
$creadListPrec :: ReadPrec [PutPartnerEventsRequestEntry]
readPrec :: ReadPrec PutPartnerEventsRequestEntry
$creadPrec :: ReadPrec PutPartnerEventsRequestEntry
readList :: ReadS [PutPartnerEventsRequestEntry]
$creadList :: ReadS [PutPartnerEventsRequestEntry]
readsPrec :: Int -> ReadS PutPartnerEventsRequestEntry
$creadsPrec :: Int -> ReadS PutPartnerEventsRequestEntry
Prelude.Read, Int -> PutPartnerEventsRequestEntry -> ShowS
[PutPartnerEventsRequestEntry] -> ShowS
PutPartnerEventsRequestEntry -> String
(Int -> PutPartnerEventsRequestEntry -> ShowS)
-> (PutPartnerEventsRequestEntry -> String)
-> ([PutPartnerEventsRequestEntry] -> ShowS)
-> Show PutPartnerEventsRequestEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutPartnerEventsRequestEntry] -> ShowS
$cshowList :: [PutPartnerEventsRequestEntry] -> ShowS
show :: PutPartnerEventsRequestEntry -> String
$cshow :: PutPartnerEventsRequestEntry -> String
showsPrec :: Int -> PutPartnerEventsRequestEntry -> ShowS
$cshowsPrec :: Int -> PutPartnerEventsRequestEntry -> ShowS
Prelude.Show, (forall x.
PutPartnerEventsRequestEntry -> Rep PutPartnerEventsRequestEntry x)
-> (forall x.
Rep PutPartnerEventsRequestEntry x -> PutPartnerEventsRequestEntry)
-> Generic PutPartnerEventsRequestEntry
forall x.
Rep PutPartnerEventsRequestEntry x -> PutPartnerEventsRequestEntry
forall x.
PutPartnerEventsRequestEntry -> Rep PutPartnerEventsRequestEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutPartnerEventsRequestEntry x -> PutPartnerEventsRequestEntry
$cfrom :: forall x.
PutPartnerEventsRequestEntry -> Rep PutPartnerEventsRequestEntry x
Prelude.Generic)
newPutPartnerEventsRequestEntry ::
PutPartnerEventsRequestEntry
newPutPartnerEventsRequestEntry :: PutPartnerEventsRequestEntry
newPutPartnerEventsRequestEntry =
PutPartnerEventsRequestEntry' :: Maybe POSIX
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> PutPartnerEventsRequestEntry
PutPartnerEventsRequestEntry'
{ $sel:time:PutPartnerEventsRequestEntry' :: Maybe POSIX
time =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:detailType:PutPartnerEventsRequestEntry' :: Maybe Text
detailType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resources:PutPartnerEventsRequestEntry' :: Maybe [Text]
resources = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:source:PutPartnerEventsRequestEntry' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:detail:PutPartnerEventsRequestEntry' :: Maybe Text
detail = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
putPartnerEventsRequestEntry_time :: Lens.Lens' PutPartnerEventsRequestEntry (Prelude.Maybe Prelude.UTCTime)
putPartnerEventsRequestEntry_time :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutPartnerEventsRequestEntry -> f PutPartnerEventsRequestEntry
putPartnerEventsRequestEntry_time = (PutPartnerEventsRequestEntry -> Maybe POSIX)
-> (PutPartnerEventsRequestEntry
-> Maybe POSIX -> PutPartnerEventsRequestEntry)
-> Lens
PutPartnerEventsRequestEntry
PutPartnerEventsRequestEntry
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutPartnerEventsRequestEntry' {Maybe POSIX
time :: Maybe POSIX
$sel:time:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe POSIX
time} -> Maybe POSIX
time) (\s :: PutPartnerEventsRequestEntry
s@PutPartnerEventsRequestEntry' {} Maybe POSIX
a -> PutPartnerEventsRequestEntry
s {$sel:time:PutPartnerEventsRequestEntry' :: Maybe POSIX
time = Maybe POSIX
a} :: PutPartnerEventsRequestEntry) ((Maybe POSIX -> f (Maybe POSIX))
-> PutPartnerEventsRequestEntry -> f PutPartnerEventsRequestEntry)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutPartnerEventsRequestEntry
-> f PutPartnerEventsRequestEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
putPartnerEventsRequestEntry_detailType :: Lens.Lens' PutPartnerEventsRequestEntry (Prelude.Maybe Prelude.Text)
putPartnerEventsRequestEntry_detailType :: (Maybe Text -> f (Maybe Text))
-> PutPartnerEventsRequestEntry -> f PutPartnerEventsRequestEntry
putPartnerEventsRequestEntry_detailType = (PutPartnerEventsRequestEntry -> Maybe Text)
-> (PutPartnerEventsRequestEntry
-> Maybe Text -> PutPartnerEventsRequestEntry)
-> Lens
PutPartnerEventsRequestEntry
PutPartnerEventsRequestEntry
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutPartnerEventsRequestEntry' {Maybe Text
detailType :: Maybe Text
$sel:detailType:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe Text
detailType} -> Maybe Text
detailType) (\s :: PutPartnerEventsRequestEntry
s@PutPartnerEventsRequestEntry' {} Maybe Text
a -> PutPartnerEventsRequestEntry
s {$sel:detailType:PutPartnerEventsRequestEntry' :: Maybe Text
detailType = Maybe Text
a} :: PutPartnerEventsRequestEntry)
putPartnerEventsRequestEntry_resources :: Lens.Lens' PutPartnerEventsRequestEntry (Prelude.Maybe [Prelude.Text])
putPartnerEventsRequestEntry_resources :: (Maybe [Text] -> f (Maybe [Text]))
-> PutPartnerEventsRequestEntry -> f PutPartnerEventsRequestEntry
putPartnerEventsRequestEntry_resources = (PutPartnerEventsRequestEntry -> Maybe [Text])
-> (PutPartnerEventsRequestEntry
-> Maybe [Text] -> PutPartnerEventsRequestEntry)
-> Lens
PutPartnerEventsRequestEntry
PutPartnerEventsRequestEntry
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutPartnerEventsRequestEntry' {Maybe [Text]
resources :: Maybe [Text]
$sel:resources:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe [Text]
resources} -> Maybe [Text]
resources) (\s :: PutPartnerEventsRequestEntry
s@PutPartnerEventsRequestEntry' {} Maybe [Text]
a -> PutPartnerEventsRequestEntry
s {$sel:resources:PutPartnerEventsRequestEntry' :: Maybe [Text]
resources = Maybe [Text]
a} :: PutPartnerEventsRequestEntry) ((Maybe [Text] -> f (Maybe [Text]))
-> PutPartnerEventsRequestEntry -> f PutPartnerEventsRequestEntry)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PutPartnerEventsRequestEntry
-> f PutPartnerEventsRequestEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
putPartnerEventsRequestEntry_source :: Lens.Lens' PutPartnerEventsRequestEntry (Prelude.Maybe Prelude.Text)
putPartnerEventsRequestEntry_source :: (Maybe Text -> f (Maybe Text))
-> PutPartnerEventsRequestEntry -> f PutPartnerEventsRequestEntry
putPartnerEventsRequestEntry_source = (PutPartnerEventsRequestEntry -> Maybe Text)
-> (PutPartnerEventsRequestEntry
-> Maybe Text -> PutPartnerEventsRequestEntry)
-> Lens
PutPartnerEventsRequestEntry
PutPartnerEventsRequestEntry
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutPartnerEventsRequestEntry' {Maybe Text
source :: Maybe Text
$sel:source:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe Text
source} -> Maybe Text
source) (\s :: PutPartnerEventsRequestEntry
s@PutPartnerEventsRequestEntry' {} Maybe Text
a -> PutPartnerEventsRequestEntry
s {$sel:source:PutPartnerEventsRequestEntry' :: Maybe Text
source = Maybe Text
a} :: PutPartnerEventsRequestEntry)
putPartnerEventsRequestEntry_detail :: Lens.Lens' PutPartnerEventsRequestEntry (Prelude.Maybe Prelude.Text)
putPartnerEventsRequestEntry_detail :: (Maybe Text -> f (Maybe Text))
-> PutPartnerEventsRequestEntry -> f PutPartnerEventsRequestEntry
putPartnerEventsRequestEntry_detail = (PutPartnerEventsRequestEntry -> Maybe Text)
-> (PutPartnerEventsRequestEntry
-> Maybe Text -> PutPartnerEventsRequestEntry)
-> Lens
PutPartnerEventsRequestEntry
PutPartnerEventsRequestEntry
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutPartnerEventsRequestEntry' {Maybe Text
detail :: Maybe Text
$sel:detail:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe Text
detail} -> Maybe Text
detail) (\s :: PutPartnerEventsRequestEntry
s@PutPartnerEventsRequestEntry' {} Maybe Text
a -> PutPartnerEventsRequestEntry
s {$sel:detail:PutPartnerEventsRequestEntry' :: Maybe Text
detail = Maybe Text
a} :: PutPartnerEventsRequestEntry)
instance
Prelude.Hashable
PutPartnerEventsRequestEntry
instance Prelude.NFData PutPartnerEventsRequestEntry
instance Core.ToJSON PutPartnerEventsRequestEntry where
toJSON :: PutPartnerEventsRequestEntry -> Value
toJSON PutPartnerEventsRequestEntry' {Maybe [Text]
Maybe Text
Maybe POSIX
detail :: Maybe Text
source :: Maybe Text
resources :: Maybe [Text]
detailType :: Maybe Text
time :: Maybe POSIX
$sel:detail:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe Text
$sel:source:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe Text
$sel:resources:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe [Text]
$sel:detailType:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe Text
$sel:time:PutPartnerEventsRequestEntry' :: PutPartnerEventsRequestEntry -> Maybe POSIX
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Time" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
time,
(Text
"DetailType" 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
detailType,
(Text
"Resources" 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]
resources,
(Text
"Source" 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
source,
(Text
"Detail" 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
detail
]
)