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