{-# 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.TimeStreamQuery.Types.ScheduledQueryRunSummary 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
import Amazonka.TimeStreamQuery.Types.ErrorReportLocation
import Amazonka.TimeStreamQuery.Types.ExecutionStats
import Amazonka.TimeStreamQuery.Types.ScheduledQueryRunStatus
data ScheduledQueryRunSummary = ScheduledQueryRunSummary'
{
ScheduledQueryRunSummary -> Maybe ErrorReportLocation
errorReportLocation :: Prelude.Maybe ErrorReportLocation,
ScheduledQueryRunSummary -> Maybe ExecutionStats
executionStats :: Prelude.Maybe ExecutionStats,
ScheduledQueryRunSummary -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
ScheduledQueryRunSummary -> Maybe POSIX
invocationTime :: Prelude.Maybe Data.POSIX,
ScheduledQueryRunSummary -> Maybe ScheduledQueryRunStatus
runStatus :: Prelude.Maybe ScheduledQueryRunStatus,
ScheduledQueryRunSummary -> Maybe POSIX
triggerTime :: Prelude.Maybe Data.POSIX
}
deriving (ScheduledQueryRunSummary -> ScheduledQueryRunSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduledQueryRunSummary -> ScheduledQueryRunSummary -> Bool
$c/= :: ScheduledQueryRunSummary -> ScheduledQueryRunSummary -> Bool
== :: ScheduledQueryRunSummary -> ScheduledQueryRunSummary -> Bool
$c== :: ScheduledQueryRunSummary -> ScheduledQueryRunSummary -> Bool
Prelude.Eq, ReadPrec [ScheduledQueryRunSummary]
ReadPrec ScheduledQueryRunSummary
Int -> ReadS ScheduledQueryRunSummary
ReadS [ScheduledQueryRunSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduledQueryRunSummary]
$creadListPrec :: ReadPrec [ScheduledQueryRunSummary]
readPrec :: ReadPrec ScheduledQueryRunSummary
$creadPrec :: ReadPrec ScheduledQueryRunSummary
readList :: ReadS [ScheduledQueryRunSummary]
$creadList :: ReadS [ScheduledQueryRunSummary]
readsPrec :: Int -> ReadS ScheduledQueryRunSummary
$creadsPrec :: Int -> ReadS ScheduledQueryRunSummary
Prelude.Read, Int -> ScheduledQueryRunSummary -> ShowS
[ScheduledQueryRunSummary] -> ShowS
ScheduledQueryRunSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduledQueryRunSummary] -> ShowS
$cshowList :: [ScheduledQueryRunSummary] -> ShowS
show :: ScheduledQueryRunSummary -> String
$cshow :: ScheduledQueryRunSummary -> String
showsPrec :: Int -> ScheduledQueryRunSummary -> ShowS
$cshowsPrec :: Int -> ScheduledQueryRunSummary -> ShowS
Prelude.Show, forall x.
Rep ScheduledQueryRunSummary x -> ScheduledQueryRunSummary
forall x.
ScheduledQueryRunSummary -> Rep ScheduledQueryRunSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScheduledQueryRunSummary x -> ScheduledQueryRunSummary
$cfrom :: forall x.
ScheduledQueryRunSummary -> Rep ScheduledQueryRunSummary x
Prelude.Generic)
newScheduledQueryRunSummary ::
ScheduledQueryRunSummary
newScheduledQueryRunSummary :: ScheduledQueryRunSummary
newScheduledQueryRunSummary =
ScheduledQueryRunSummary'
{ $sel:errorReportLocation:ScheduledQueryRunSummary' :: Maybe ErrorReportLocation
errorReportLocation =
forall a. Maybe a
Prelude.Nothing,
$sel:executionStats:ScheduledQueryRunSummary' :: Maybe ExecutionStats
executionStats = forall a. Maybe a
Prelude.Nothing,
$sel:failureReason:ScheduledQueryRunSummary' :: Maybe Text
failureReason = forall a. Maybe a
Prelude.Nothing,
$sel:invocationTime:ScheduledQueryRunSummary' :: Maybe POSIX
invocationTime = forall a. Maybe a
Prelude.Nothing,
$sel:runStatus:ScheduledQueryRunSummary' :: Maybe ScheduledQueryRunStatus
runStatus = forall a. Maybe a
Prelude.Nothing,
$sel:triggerTime:ScheduledQueryRunSummary' :: Maybe POSIX
triggerTime = forall a. Maybe a
Prelude.Nothing
}
scheduledQueryRunSummary_errorReportLocation :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe ErrorReportLocation)
scheduledQueryRunSummary_errorReportLocation :: Lens' ScheduledQueryRunSummary (Maybe ErrorReportLocation)
scheduledQueryRunSummary_errorReportLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledQueryRunSummary' {Maybe ErrorReportLocation
errorReportLocation :: Maybe ErrorReportLocation
$sel:errorReportLocation:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe ErrorReportLocation
errorReportLocation} -> Maybe ErrorReportLocation
errorReportLocation) (\s :: ScheduledQueryRunSummary
s@ScheduledQueryRunSummary' {} Maybe ErrorReportLocation
a -> ScheduledQueryRunSummary
s {$sel:errorReportLocation:ScheduledQueryRunSummary' :: Maybe ErrorReportLocation
errorReportLocation = Maybe ErrorReportLocation
a} :: ScheduledQueryRunSummary)
scheduledQueryRunSummary_executionStats :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe ExecutionStats)
scheduledQueryRunSummary_executionStats :: Lens' ScheduledQueryRunSummary (Maybe ExecutionStats)
scheduledQueryRunSummary_executionStats = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledQueryRunSummary' {Maybe ExecutionStats
executionStats :: Maybe ExecutionStats
$sel:executionStats:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe ExecutionStats
executionStats} -> Maybe ExecutionStats
executionStats) (\s :: ScheduledQueryRunSummary
s@ScheduledQueryRunSummary' {} Maybe ExecutionStats
a -> ScheduledQueryRunSummary
s {$sel:executionStats:ScheduledQueryRunSummary' :: Maybe ExecutionStats
executionStats = Maybe ExecutionStats
a} :: ScheduledQueryRunSummary)
scheduledQueryRunSummary_failureReason :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe Prelude.Text)
scheduledQueryRunSummary_failureReason :: Lens' ScheduledQueryRunSummary (Maybe Text)
scheduledQueryRunSummary_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledQueryRunSummary' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: ScheduledQueryRunSummary
s@ScheduledQueryRunSummary' {} Maybe Text
a -> ScheduledQueryRunSummary
s {$sel:failureReason:ScheduledQueryRunSummary' :: Maybe Text
failureReason = Maybe Text
a} :: ScheduledQueryRunSummary)
scheduledQueryRunSummary_invocationTime :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe Prelude.UTCTime)
scheduledQueryRunSummary_invocationTime :: Lens' ScheduledQueryRunSummary (Maybe UTCTime)
scheduledQueryRunSummary_invocationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledQueryRunSummary' {Maybe POSIX
invocationTime :: Maybe POSIX
$sel:invocationTime:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe POSIX
invocationTime} -> Maybe POSIX
invocationTime) (\s :: ScheduledQueryRunSummary
s@ScheduledQueryRunSummary' {} Maybe POSIX
a -> ScheduledQueryRunSummary
s {$sel:invocationTime:ScheduledQueryRunSummary' :: Maybe POSIX
invocationTime = Maybe POSIX
a} :: ScheduledQueryRunSummary) 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
scheduledQueryRunSummary_runStatus :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe ScheduledQueryRunStatus)
scheduledQueryRunSummary_runStatus :: Lens' ScheduledQueryRunSummary (Maybe ScheduledQueryRunStatus)
scheduledQueryRunSummary_runStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledQueryRunSummary' {Maybe ScheduledQueryRunStatus
runStatus :: Maybe ScheduledQueryRunStatus
$sel:runStatus:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe ScheduledQueryRunStatus
runStatus} -> Maybe ScheduledQueryRunStatus
runStatus) (\s :: ScheduledQueryRunSummary
s@ScheduledQueryRunSummary' {} Maybe ScheduledQueryRunStatus
a -> ScheduledQueryRunSummary
s {$sel:runStatus:ScheduledQueryRunSummary' :: Maybe ScheduledQueryRunStatus
runStatus = Maybe ScheduledQueryRunStatus
a} :: ScheduledQueryRunSummary)
scheduledQueryRunSummary_triggerTime :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe Prelude.UTCTime)
scheduledQueryRunSummary_triggerTime :: Lens' ScheduledQueryRunSummary (Maybe UTCTime)
scheduledQueryRunSummary_triggerTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledQueryRunSummary' {Maybe POSIX
triggerTime :: Maybe POSIX
$sel:triggerTime:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe POSIX
triggerTime} -> Maybe POSIX
triggerTime) (\s :: ScheduledQueryRunSummary
s@ScheduledQueryRunSummary' {} Maybe POSIX
a -> ScheduledQueryRunSummary
s {$sel:triggerTime:ScheduledQueryRunSummary' :: Maybe POSIX
triggerTime = Maybe POSIX
a} :: ScheduledQueryRunSummary) 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
instance Data.FromJSON ScheduledQueryRunSummary where
parseJSON :: Value -> Parser ScheduledQueryRunSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ScheduledQueryRunSummary"
( \Object
x ->
Maybe ErrorReportLocation
-> Maybe ExecutionStats
-> Maybe Text
-> Maybe POSIX
-> Maybe ScheduledQueryRunStatus
-> Maybe POSIX
-> ScheduledQueryRunSummary
ScheduledQueryRunSummary'
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
"ErrorReportLocation")
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
"ExecutionStats")
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
"FailureReason")
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
"InvocationTime")
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
"RunStatus")
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
"TriggerTime")
)
instance Prelude.Hashable ScheduledQueryRunSummary where
hashWithSalt :: Int -> ScheduledQueryRunSummary -> Int
hashWithSalt Int
_salt ScheduledQueryRunSummary' {Maybe Text
Maybe POSIX
Maybe ExecutionStats
Maybe ErrorReportLocation
Maybe ScheduledQueryRunStatus
triggerTime :: Maybe POSIX
runStatus :: Maybe ScheduledQueryRunStatus
invocationTime :: Maybe POSIX
failureReason :: Maybe Text
executionStats :: Maybe ExecutionStats
errorReportLocation :: Maybe ErrorReportLocation
$sel:triggerTime:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe POSIX
$sel:runStatus:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe ScheduledQueryRunStatus
$sel:invocationTime:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe POSIX
$sel:failureReason:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe Text
$sel:executionStats:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe ExecutionStats
$sel:errorReportLocation:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe ErrorReportLocation
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ErrorReportLocation
errorReportLocation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExecutionStats
executionStats
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
failureReason
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
invocationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScheduledQueryRunStatus
runStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
triggerTime
instance Prelude.NFData ScheduledQueryRunSummary where
rnf :: ScheduledQueryRunSummary -> ()
rnf ScheduledQueryRunSummary' {Maybe Text
Maybe POSIX
Maybe ExecutionStats
Maybe ErrorReportLocation
Maybe ScheduledQueryRunStatus
triggerTime :: Maybe POSIX
runStatus :: Maybe ScheduledQueryRunStatus
invocationTime :: Maybe POSIX
failureReason :: Maybe Text
executionStats :: Maybe ExecutionStats
errorReportLocation :: Maybe ErrorReportLocation
$sel:triggerTime:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe POSIX
$sel:runStatus:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe ScheduledQueryRunStatus
$sel:invocationTime:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe POSIX
$sel:failureReason:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe Text
$sel:executionStats:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe ExecutionStats
$sel:errorReportLocation:ScheduledQueryRunSummary' :: ScheduledQueryRunSummary -> Maybe ErrorReportLocation
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ErrorReportLocation
errorReportLocation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExecutionStats
executionStats
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureReason
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
invocationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ScheduledQueryRunStatus
runStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
triggerTime