{-# 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.Route53Domains.Types.OperationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53Domains.Types.OperationStatus
import Amazonka.Route53Domains.Types.OperationType
data OperationSummary = OperationSummary'
{
OperationSummary -> Text
operationId :: Prelude.Text,
OperationSummary -> OperationStatus
status :: OperationStatus,
OperationSummary -> OperationType
type' :: OperationType,
OperationSummary -> POSIX
submittedDate :: Core.POSIX
}
deriving (OperationSummary -> OperationSummary -> Bool
(OperationSummary -> OperationSummary -> Bool)
-> (OperationSummary -> OperationSummary -> Bool)
-> Eq OperationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OperationSummary -> OperationSummary -> Bool
$c/= :: OperationSummary -> OperationSummary -> Bool
== :: OperationSummary -> OperationSummary -> Bool
$c== :: OperationSummary -> OperationSummary -> Bool
Prelude.Eq, ReadPrec [OperationSummary]
ReadPrec OperationSummary
Int -> ReadS OperationSummary
ReadS [OperationSummary]
(Int -> ReadS OperationSummary)
-> ReadS [OperationSummary]
-> ReadPrec OperationSummary
-> ReadPrec [OperationSummary]
-> Read OperationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OperationSummary]
$creadListPrec :: ReadPrec [OperationSummary]
readPrec :: ReadPrec OperationSummary
$creadPrec :: ReadPrec OperationSummary
readList :: ReadS [OperationSummary]
$creadList :: ReadS [OperationSummary]
readsPrec :: Int -> ReadS OperationSummary
$creadsPrec :: Int -> ReadS OperationSummary
Prelude.Read, Int -> OperationSummary -> ShowS
[OperationSummary] -> ShowS
OperationSummary -> String
(Int -> OperationSummary -> ShowS)
-> (OperationSummary -> String)
-> ([OperationSummary] -> ShowS)
-> Show OperationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OperationSummary] -> ShowS
$cshowList :: [OperationSummary] -> ShowS
show :: OperationSummary -> String
$cshow :: OperationSummary -> String
showsPrec :: Int -> OperationSummary -> ShowS
$cshowsPrec :: Int -> OperationSummary -> ShowS
Prelude.Show, (forall x. OperationSummary -> Rep OperationSummary x)
-> (forall x. Rep OperationSummary x -> OperationSummary)
-> Generic OperationSummary
forall x. Rep OperationSummary x -> OperationSummary
forall x. OperationSummary -> Rep OperationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OperationSummary x -> OperationSummary
$cfrom :: forall x. OperationSummary -> Rep OperationSummary x
Prelude.Generic)
newOperationSummary ::
Prelude.Text ->
OperationStatus ->
OperationType ->
Prelude.UTCTime ->
OperationSummary
newOperationSummary :: Text
-> OperationStatus -> OperationType -> UTCTime -> OperationSummary
newOperationSummary
Text
pOperationId_
OperationStatus
pStatus_
OperationType
pType_
UTCTime
pSubmittedDate_ =
OperationSummary' :: Text
-> OperationStatus -> OperationType -> POSIX -> OperationSummary
OperationSummary'
{ $sel:operationId:OperationSummary' :: Text
operationId = Text
pOperationId_,
$sel:status:OperationSummary' :: OperationStatus
status = OperationStatus
pStatus_,
$sel:type':OperationSummary' :: OperationType
type' = OperationType
pType_,
$sel:submittedDate:OperationSummary' :: POSIX
submittedDate = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pSubmittedDate_
}
operationSummary_operationId :: Lens.Lens' OperationSummary Prelude.Text
operationSummary_operationId :: (Text -> f Text) -> OperationSummary -> f OperationSummary
operationSummary_operationId = (OperationSummary -> Text)
-> (OperationSummary -> Text -> OperationSummary)
-> Lens OperationSummary OperationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperationSummary' {Text
operationId :: Text
$sel:operationId:OperationSummary' :: OperationSummary -> Text
operationId} -> Text
operationId) (\s :: OperationSummary
s@OperationSummary' {} Text
a -> OperationSummary
s {$sel:operationId:OperationSummary' :: Text
operationId = Text
a} :: OperationSummary)
operationSummary_status :: Lens.Lens' OperationSummary OperationStatus
operationSummary_status :: (OperationStatus -> f OperationStatus)
-> OperationSummary -> f OperationSummary
operationSummary_status = (OperationSummary -> OperationStatus)
-> (OperationSummary -> OperationStatus -> OperationSummary)
-> Lens
OperationSummary OperationSummary OperationStatus OperationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperationSummary' {OperationStatus
status :: OperationStatus
$sel:status:OperationSummary' :: OperationSummary -> OperationStatus
status} -> OperationStatus
status) (\s :: OperationSummary
s@OperationSummary' {} OperationStatus
a -> OperationSummary
s {$sel:status:OperationSummary' :: OperationStatus
status = OperationStatus
a} :: OperationSummary)
operationSummary_type :: Lens.Lens' OperationSummary OperationType
operationSummary_type :: (OperationType -> f OperationType)
-> OperationSummary -> f OperationSummary
operationSummary_type = (OperationSummary -> OperationType)
-> (OperationSummary -> OperationType -> OperationSummary)
-> Lens
OperationSummary OperationSummary OperationType OperationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperationSummary' {OperationType
type' :: OperationType
$sel:type':OperationSummary' :: OperationSummary -> OperationType
type'} -> OperationType
type') (\s :: OperationSummary
s@OperationSummary' {} OperationType
a -> OperationSummary
s {$sel:type':OperationSummary' :: OperationType
type' = OperationType
a} :: OperationSummary)
operationSummary_submittedDate :: Lens.Lens' OperationSummary Prelude.UTCTime
operationSummary_submittedDate :: (UTCTime -> f UTCTime) -> OperationSummary -> f OperationSummary
operationSummary_submittedDate = (OperationSummary -> POSIX)
-> (OperationSummary -> POSIX -> OperationSummary)
-> Lens OperationSummary OperationSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperationSummary' {POSIX
submittedDate :: POSIX
$sel:submittedDate:OperationSummary' :: OperationSummary -> POSIX
submittedDate} -> POSIX
submittedDate) (\s :: OperationSummary
s@OperationSummary' {} POSIX
a -> OperationSummary
s {$sel:submittedDate:OperationSummary' :: POSIX
submittedDate = POSIX
a} :: OperationSummary) ((POSIX -> f POSIX) -> OperationSummary -> f OperationSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> OperationSummary
-> f OperationSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON OperationSummary where
parseJSON :: Value -> Parser OperationSummary
parseJSON =
String
-> (Object -> Parser OperationSummary)
-> Value
-> Parser OperationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OperationSummary"
( \Object
x ->
Text
-> OperationStatus -> OperationType -> POSIX -> OperationSummary
OperationSummary'
(Text
-> OperationStatus -> OperationType -> POSIX -> OperationSummary)
-> Parser Text
-> Parser
(OperationStatus -> OperationType -> POSIX -> OperationSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OperationId")
Parser
(OperationStatus -> OperationType -> POSIX -> OperationSummary)
-> Parser OperationStatus
-> Parser (OperationType -> POSIX -> OperationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OperationStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Status")
Parser (OperationType -> POSIX -> OperationSummary)
-> Parser OperationType -> Parser (POSIX -> OperationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OperationType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Type")
Parser (POSIX -> OperationSummary)
-> Parser POSIX -> Parser OperationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SubmittedDate")
)
instance Prelude.Hashable OperationSummary
instance Prelude.NFData OperationSummary