{-# 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.Redshift.Types.DataTransferProgress where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data DataTransferProgress = DataTransferProgress'
{
DataTransferProgress -> Maybe Double
currentRateInMegaBytesPerSecond :: Prelude.Maybe Prelude.Double,
DataTransferProgress -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
DataTransferProgress -> Maybe Integer
estimatedTimeToCompletionInSeconds :: Prelude.Maybe Prelude.Integer,
DataTransferProgress -> Maybe Integer
dataTransferredInMegaBytes :: Prelude.Maybe Prelude.Integer,
DataTransferProgress -> Maybe Integer
totalDataInMegaBytes :: Prelude.Maybe Prelude.Integer,
DataTransferProgress -> Maybe Integer
elapsedTimeInSeconds :: Prelude.Maybe Prelude.Integer
}
deriving (DataTransferProgress -> DataTransferProgress -> Bool
(DataTransferProgress -> DataTransferProgress -> Bool)
-> (DataTransferProgress -> DataTransferProgress -> Bool)
-> Eq DataTransferProgress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataTransferProgress -> DataTransferProgress -> Bool
$c/= :: DataTransferProgress -> DataTransferProgress -> Bool
== :: DataTransferProgress -> DataTransferProgress -> Bool
$c== :: DataTransferProgress -> DataTransferProgress -> Bool
Prelude.Eq, ReadPrec [DataTransferProgress]
ReadPrec DataTransferProgress
Int -> ReadS DataTransferProgress
ReadS [DataTransferProgress]
(Int -> ReadS DataTransferProgress)
-> ReadS [DataTransferProgress]
-> ReadPrec DataTransferProgress
-> ReadPrec [DataTransferProgress]
-> Read DataTransferProgress
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataTransferProgress]
$creadListPrec :: ReadPrec [DataTransferProgress]
readPrec :: ReadPrec DataTransferProgress
$creadPrec :: ReadPrec DataTransferProgress
readList :: ReadS [DataTransferProgress]
$creadList :: ReadS [DataTransferProgress]
readsPrec :: Int -> ReadS DataTransferProgress
$creadsPrec :: Int -> ReadS DataTransferProgress
Prelude.Read, Int -> DataTransferProgress -> ShowS
[DataTransferProgress] -> ShowS
DataTransferProgress -> String
(Int -> DataTransferProgress -> ShowS)
-> (DataTransferProgress -> String)
-> ([DataTransferProgress] -> ShowS)
-> Show DataTransferProgress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataTransferProgress] -> ShowS
$cshowList :: [DataTransferProgress] -> ShowS
show :: DataTransferProgress -> String
$cshow :: DataTransferProgress -> String
showsPrec :: Int -> DataTransferProgress -> ShowS
$cshowsPrec :: Int -> DataTransferProgress -> ShowS
Prelude.Show, (forall x. DataTransferProgress -> Rep DataTransferProgress x)
-> (forall x. Rep DataTransferProgress x -> DataTransferProgress)
-> Generic DataTransferProgress
forall x. Rep DataTransferProgress x -> DataTransferProgress
forall x. DataTransferProgress -> Rep DataTransferProgress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataTransferProgress x -> DataTransferProgress
$cfrom :: forall x. DataTransferProgress -> Rep DataTransferProgress x
Prelude.Generic)
newDataTransferProgress ::
DataTransferProgress
newDataTransferProgress :: DataTransferProgress
newDataTransferProgress =
DataTransferProgress' :: Maybe Double
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DataTransferProgress
DataTransferProgress'
{ $sel:currentRateInMegaBytesPerSecond:DataTransferProgress' :: Maybe Double
currentRateInMegaBytesPerSecond =
Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:status:DataTransferProgress' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:estimatedTimeToCompletionInSeconds:DataTransferProgress' :: Maybe Integer
estimatedTimeToCompletionInSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:dataTransferredInMegaBytes:DataTransferProgress' :: Maybe Integer
dataTransferredInMegaBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:totalDataInMegaBytes:DataTransferProgress' :: Maybe Integer
totalDataInMegaBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:elapsedTimeInSeconds:DataTransferProgress' :: Maybe Integer
elapsedTimeInSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
dataTransferProgress_currentRateInMegaBytesPerSecond :: Lens.Lens' DataTransferProgress (Prelude.Maybe Prelude.Double)
dataTransferProgress_currentRateInMegaBytesPerSecond :: (Maybe Double -> f (Maybe Double))
-> DataTransferProgress -> f DataTransferProgress
dataTransferProgress_currentRateInMegaBytesPerSecond = (DataTransferProgress -> Maybe Double)
-> (DataTransferProgress -> Maybe Double -> DataTransferProgress)
-> Lens
DataTransferProgress
DataTransferProgress
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataTransferProgress' {Maybe Double
currentRateInMegaBytesPerSecond :: Maybe Double
$sel:currentRateInMegaBytesPerSecond:DataTransferProgress' :: DataTransferProgress -> Maybe Double
currentRateInMegaBytesPerSecond} -> Maybe Double
currentRateInMegaBytesPerSecond) (\s :: DataTransferProgress
s@DataTransferProgress' {} Maybe Double
a -> DataTransferProgress
s {$sel:currentRateInMegaBytesPerSecond:DataTransferProgress' :: Maybe Double
currentRateInMegaBytesPerSecond = Maybe Double
a} :: DataTransferProgress)
dataTransferProgress_status :: Lens.Lens' DataTransferProgress (Prelude.Maybe Prelude.Text)
dataTransferProgress_status :: (Maybe Text -> f (Maybe Text))
-> DataTransferProgress -> f DataTransferProgress
dataTransferProgress_status = (DataTransferProgress -> Maybe Text)
-> (DataTransferProgress -> Maybe Text -> DataTransferProgress)
-> Lens
DataTransferProgress DataTransferProgress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataTransferProgress' {Maybe Text
status :: Maybe Text
$sel:status:DataTransferProgress' :: DataTransferProgress -> Maybe Text
status} -> Maybe Text
status) (\s :: DataTransferProgress
s@DataTransferProgress' {} Maybe Text
a -> DataTransferProgress
s {$sel:status:DataTransferProgress' :: Maybe Text
status = Maybe Text
a} :: DataTransferProgress)
dataTransferProgress_estimatedTimeToCompletionInSeconds :: Lens.Lens' DataTransferProgress (Prelude.Maybe Prelude.Integer)
dataTransferProgress_estimatedTimeToCompletionInSeconds :: (Maybe Integer -> f (Maybe Integer))
-> DataTransferProgress -> f DataTransferProgress
dataTransferProgress_estimatedTimeToCompletionInSeconds = (DataTransferProgress -> Maybe Integer)
-> (DataTransferProgress -> Maybe Integer -> DataTransferProgress)
-> Lens
DataTransferProgress
DataTransferProgress
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataTransferProgress' {Maybe Integer
estimatedTimeToCompletionInSeconds :: Maybe Integer
$sel:estimatedTimeToCompletionInSeconds:DataTransferProgress' :: DataTransferProgress -> Maybe Integer
estimatedTimeToCompletionInSeconds} -> Maybe Integer
estimatedTimeToCompletionInSeconds) (\s :: DataTransferProgress
s@DataTransferProgress' {} Maybe Integer
a -> DataTransferProgress
s {$sel:estimatedTimeToCompletionInSeconds:DataTransferProgress' :: Maybe Integer
estimatedTimeToCompletionInSeconds = Maybe Integer
a} :: DataTransferProgress)
dataTransferProgress_dataTransferredInMegaBytes :: Lens.Lens' DataTransferProgress (Prelude.Maybe Prelude.Integer)
dataTransferProgress_dataTransferredInMegaBytes :: (Maybe Integer -> f (Maybe Integer))
-> DataTransferProgress -> f DataTransferProgress
dataTransferProgress_dataTransferredInMegaBytes = (DataTransferProgress -> Maybe Integer)
-> (DataTransferProgress -> Maybe Integer -> DataTransferProgress)
-> Lens
DataTransferProgress
DataTransferProgress
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataTransferProgress' {Maybe Integer
dataTransferredInMegaBytes :: Maybe Integer
$sel:dataTransferredInMegaBytes:DataTransferProgress' :: DataTransferProgress -> Maybe Integer
dataTransferredInMegaBytes} -> Maybe Integer
dataTransferredInMegaBytes) (\s :: DataTransferProgress
s@DataTransferProgress' {} Maybe Integer
a -> DataTransferProgress
s {$sel:dataTransferredInMegaBytes:DataTransferProgress' :: Maybe Integer
dataTransferredInMegaBytes = Maybe Integer
a} :: DataTransferProgress)
dataTransferProgress_totalDataInMegaBytes :: Lens.Lens' DataTransferProgress (Prelude.Maybe Prelude.Integer)
dataTransferProgress_totalDataInMegaBytes :: (Maybe Integer -> f (Maybe Integer))
-> DataTransferProgress -> f DataTransferProgress
dataTransferProgress_totalDataInMegaBytes = (DataTransferProgress -> Maybe Integer)
-> (DataTransferProgress -> Maybe Integer -> DataTransferProgress)
-> Lens
DataTransferProgress
DataTransferProgress
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataTransferProgress' {Maybe Integer
totalDataInMegaBytes :: Maybe Integer
$sel:totalDataInMegaBytes:DataTransferProgress' :: DataTransferProgress -> Maybe Integer
totalDataInMegaBytes} -> Maybe Integer
totalDataInMegaBytes) (\s :: DataTransferProgress
s@DataTransferProgress' {} Maybe Integer
a -> DataTransferProgress
s {$sel:totalDataInMegaBytes:DataTransferProgress' :: Maybe Integer
totalDataInMegaBytes = Maybe Integer
a} :: DataTransferProgress)
dataTransferProgress_elapsedTimeInSeconds :: Lens.Lens' DataTransferProgress (Prelude.Maybe Prelude.Integer)
dataTransferProgress_elapsedTimeInSeconds :: (Maybe Integer -> f (Maybe Integer))
-> DataTransferProgress -> f DataTransferProgress
dataTransferProgress_elapsedTimeInSeconds = (DataTransferProgress -> Maybe Integer)
-> (DataTransferProgress -> Maybe Integer -> DataTransferProgress)
-> Lens
DataTransferProgress
DataTransferProgress
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataTransferProgress' {Maybe Integer
elapsedTimeInSeconds :: Maybe Integer
$sel:elapsedTimeInSeconds:DataTransferProgress' :: DataTransferProgress -> Maybe Integer
elapsedTimeInSeconds} -> Maybe Integer
elapsedTimeInSeconds) (\s :: DataTransferProgress
s@DataTransferProgress' {} Maybe Integer
a -> DataTransferProgress
s {$sel:elapsedTimeInSeconds:DataTransferProgress' :: Maybe Integer
elapsedTimeInSeconds = Maybe Integer
a} :: DataTransferProgress)
instance Core.FromXML DataTransferProgress where
parseXML :: [Node] -> Either String DataTransferProgress
parseXML [Node]
x =
Maybe Double
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DataTransferProgress
DataTransferProgress'
(Maybe Double
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DataTransferProgress)
-> Either String (Maybe Double)
-> Either
String
(Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DataTransferProgress)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Double)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CurrentRateInMegaBytesPerSecond")
Either
String
(Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DataTransferProgress)
-> Either String (Maybe Text)
-> Either
String
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DataTransferProgress)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
Either
String
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DataTransferProgress)
-> Either String (Maybe Integer)
-> Either
String
(Maybe Integer
-> Maybe Integer -> Maybe Integer -> DataTransferProgress)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EstimatedTimeToCompletionInSeconds")
Either
String
(Maybe Integer
-> Maybe Integer -> Maybe Integer -> DataTransferProgress)
-> Either String (Maybe Integer)
-> Either
String (Maybe Integer -> Maybe Integer -> DataTransferProgress)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DataTransferredInMegaBytes")
Either
String (Maybe Integer -> Maybe Integer -> DataTransferProgress)
-> Either String (Maybe Integer)
-> Either String (Maybe Integer -> DataTransferProgress)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TotalDataInMegaBytes")
Either String (Maybe Integer -> DataTransferProgress)
-> Either String (Maybe Integer)
-> Either String DataTransferProgress
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ElapsedTimeInSeconds")
instance Prelude.Hashable DataTransferProgress
instance Prelude.NFData DataTransferProgress