{-# 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.SSMContacts.Types.Page 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 Page = Page'
{
Page -> Maybe POSIX
deliveryTime :: Prelude.Maybe Data.POSIX,
Page -> Maybe Text
incidentId :: Prelude.Maybe Prelude.Text,
Page -> Maybe POSIX
readTime :: Prelude.Maybe Data.POSIX,
Page -> Maybe POSIX
sentTime :: Prelude.Maybe Data.POSIX,
Page -> Text
pageArn :: Prelude.Text,
Page -> Text
engagementArn :: Prelude.Text,
Page -> Text
contactArn :: Prelude.Text,
Page -> Text
sender :: Prelude.Text
}
deriving (Page -> Page -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Page -> Page -> Bool
$c/= :: Page -> Page -> Bool
== :: Page -> Page -> Bool
$c== :: Page -> Page -> Bool
Prelude.Eq, ReadPrec [Page]
ReadPrec Page
Int -> ReadS Page
ReadS [Page]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Page]
$creadListPrec :: ReadPrec [Page]
readPrec :: ReadPrec Page
$creadPrec :: ReadPrec Page
readList :: ReadS [Page]
$creadList :: ReadS [Page]
readsPrec :: Int -> ReadS Page
$creadsPrec :: Int -> ReadS Page
Prelude.Read, Int -> Page -> ShowS
[Page] -> ShowS
Page -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Page] -> ShowS
$cshowList :: [Page] -> ShowS
show :: Page -> String
$cshow :: Page -> String
showsPrec :: Int -> Page -> ShowS
$cshowsPrec :: Int -> Page -> ShowS
Prelude.Show, forall x. Rep Page x -> Page
forall x. Page -> Rep Page x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Page x -> Page
$cfrom :: forall x. Page -> Rep Page x
Prelude.Generic)
newPage ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Page
newPage :: Text -> Text -> Text -> Text -> Page
newPage
Text
pPageArn_
Text
pEngagementArn_
Text
pContactArn_
Text
pSender_ =
Page'
{ $sel:deliveryTime:Page' :: Maybe POSIX
deliveryTime = forall a. Maybe a
Prelude.Nothing,
$sel:incidentId:Page' :: Maybe Text
incidentId = forall a. Maybe a
Prelude.Nothing,
$sel:readTime:Page' :: Maybe POSIX
readTime = forall a. Maybe a
Prelude.Nothing,
$sel:sentTime:Page' :: Maybe POSIX
sentTime = forall a. Maybe a
Prelude.Nothing,
$sel:pageArn:Page' :: Text
pageArn = Text
pPageArn_,
$sel:engagementArn:Page' :: Text
engagementArn = Text
pEngagementArn_,
$sel:contactArn:Page' :: Text
contactArn = Text
pContactArn_,
$sel:sender:Page' :: Text
sender = Text
pSender_
}
page_deliveryTime :: Lens.Lens' Page (Prelude.Maybe Prelude.UTCTime)
page_deliveryTime :: Lens' Page (Maybe UTCTime)
page_deliveryTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Page' {Maybe POSIX
deliveryTime :: Maybe POSIX
$sel:deliveryTime:Page' :: Page -> Maybe POSIX
deliveryTime} -> Maybe POSIX
deliveryTime) (\s :: Page
s@Page' {} Maybe POSIX
a -> Page
s {$sel:deliveryTime:Page' :: Maybe POSIX
deliveryTime = Maybe POSIX
a} :: Page) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
page_incidentId :: Lens.Lens' Page (Prelude.Maybe Prelude.Text)
page_incidentId :: Lens' Page (Maybe Text)
page_incidentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Page' {Maybe Text
incidentId :: Maybe Text
$sel:incidentId:Page' :: Page -> Maybe Text
incidentId} -> Maybe Text
incidentId) (\s :: Page
s@Page' {} Maybe Text
a -> Page
s {$sel:incidentId:Page' :: Maybe Text
incidentId = Maybe Text
a} :: Page)
page_readTime :: Lens.Lens' Page (Prelude.Maybe Prelude.UTCTime)
page_readTime :: Lens' Page (Maybe UTCTime)
page_readTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Page' {Maybe POSIX
readTime :: Maybe POSIX
$sel:readTime:Page' :: Page -> Maybe POSIX
readTime} -> Maybe POSIX
readTime) (\s :: Page
s@Page' {} Maybe POSIX
a -> Page
s {$sel:readTime:Page' :: Maybe POSIX
readTime = Maybe POSIX
a} :: Page) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
page_sentTime :: Lens.Lens' Page (Prelude.Maybe Prelude.UTCTime)
page_sentTime :: Lens' Page (Maybe UTCTime)
page_sentTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Page' {Maybe POSIX
sentTime :: Maybe POSIX
$sel:sentTime:Page' :: Page -> Maybe POSIX
sentTime} -> Maybe POSIX
sentTime) (\s :: Page
s@Page' {} Maybe POSIX
a -> Page
s {$sel:sentTime:Page' :: Maybe POSIX
sentTime = Maybe POSIX
a} :: Page) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
page_pageArn :: Lens.Lens' Page Prelude.Text
page_pageArn :: Lens' Page Text
page_pageArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Page' {Text
pageArn :: Text
$sel:pageArn:Page' :: Page -> Text
pageArn} -> Text
pageArn) (\s :: Page
s@Page' {} Text
a -> Page
s {$sel:pageArn:Page' :: Text
pageArn = Text
a} :: Page)
page_engagementArn :: Lens.Lens' Page Prelude.Text
page_engagementArn :: Lens' Page Text
page_engagementArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Page' {Text
engagementArn :: Text
$sel:engagementArn:Page' :: Page -> Text
engagementArn} -> Text
engagementArn) (\s :: Page
s@Page' {} Text
a -> Page
s {$sel:engagementArn:Page' :: Text
engagementArn = Text
a} :: Page)
page_contactArn :: Lens.Lens' Page Prelude.Text
page_contactArn :: Lens' Page Text
page_contactArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Page' {Text
contactArn :: Text
$sel:contactArn:Page' :: Page -> Text
contactArn} -> Text
contactArn) (\s :: Page
s@Page' {} Text
a -> Page
s {$sel:contactArn:Page' :: Text
contactArn = Text
a} :: Page)
page_sender :: Lens.Lens' Page Prelude.Text
page_sender :: Lens' Page Text
page_sender = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Page' {Text
sender :: Text
$sel:sender:Page' :: Page -> Text
sender} -> Text
sender) (\s :: Page
s@Page' {} Text
a -> Page
s {$sel:sender:Page' :: Text
sender = Text
a} :: Page)
instance Data.FromJSON Page where
parseJSON :: Value -> Parser Page
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Page"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Text
-> Text
-> Text
-> Text
-> Page
Page'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DeliveryTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IncidentId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReadTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SentTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"PageArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"EngagementArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ContactArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Sender")
)
instance Prelude.Hashable Page where
hashWithSalt :: Int -> Page -> Int
hashWithSalt Int
_salt Page' {Maybe Text
Maybe POSIX
Text
sender :: Text
contactArn :: Text
engagementArn :: Text
pageArn :: Text
sentTime :: Maybe POSIX
readTime :: Maybe POSIX
incidentId :: Maybe Text
deliveryTime :: Maybe POSIX
$sel:sender:Page' :: Page -> Text
$sel:contactArn:Page' :: Page -> Text
$sel:engagementArn:Page' :: Page -> Text
$sel:pageArn:Page' :: Page -> Text
$sel:sentTime:Page' :: Page -> Maybe POSIX
$sel:readTime:Page' :: Page -> Maybe POSIX
$sel:incidentId:Page' :: Page -> Maybe Text
$sel:deliveryTime:Page' :: Page -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
deliveryTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
incidentId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
readTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
sentTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
pageArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
engagementArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
contactArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sender
instance Prelude.NFData Page where
rnf :: Page -> ()
rnf Page' {Maybe Text
Maybe POSIX
Text
sender :: Text
contactArn :: Text
engagementArn :: Text
pageArn :: Text
sentTime :: Maybe POSIX
readTime :: Maybe POSIX
incidentId :: Maybe Text
deliveryTime :: Maybe POSIX
$sel:sender:Page' :: Page -> Text
$sel:contactArn:Page' :: Page -> Text
$sel:engagementArn:Page' :: Page -> Text
$sel:pageArn:Page' :: Page -> Text
$sel:sentTime:Page' :: Page -> Maybe POSIX
$sel:readTime:Page' :: Page -> Maybe POSIX
$sel:incidentId:Page' :: Page -> Maybe Text
$sel:deliveryTime:Page' :: Page -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
deliveryTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
incidentId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
readTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
sentTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
pageArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
engagementArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
contactArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sender