{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Redshift.Types.ResizeProgressMessage
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Redshift.Types.ResizeProgressMessage where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal

-- | Describes the result of a cluster resize operation.
--
-- /See:/ 'newResizeProgressMessage' smart constructor.
data ResizeProgressMessage = ResizeProgressMessage'
  { -- | The names of tables that have not been yet imported.
    --
    -- Valid Values: List of table names
    ResizeProgressMessage -> Maybe [Text]
importTablesNotStarted :: Prelude.Maybe [Prelude.Text],
    -- | The status of the resize operation.
    --
    -- Valid Values: @NONE@ | @IN_PROGRESS@ | @FAILED@ | @SUCCEEDED@ |
    -- @CANCELLING@
    ResizeProgressMessage -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The estimated time remaining, in seconds, until the resize operation is
    -- complete. This value is calculated based on the average resize rate and
    -- the estimated amount of data remaining to be processed. Once the resize
    -- operation is complete, this value will be 0.
    ResizeProgressMessage -> Maybe Integer
estimatedTimeToCompletionInSeconds :: Prelude.Maybe Prelude.Integer,
    -- | The average rate of the resize operation over the last few minutes,
    -- measured in megabytes per second. After the resize operation completes,
    -- this value shows the average rate of the entire resize operation.
    ResizeProgressMessage -> Maybe Double
avgResizeRateInMegaBytesPerSecond :: Prelude.Maybe Prelude.Double,
    -- | The number of nodes that the cluster will have after the resize
    -- operation is complete.
    ResizeProgressMessage -> Maybe Int
targetNumberOfNodes :: Prelude.Maybe Prelude.Int,
    -- | The type of encryption for the cluster after the resize is complete.
    --
    -- Possible values are @KMS@ and @None@.
    ResizeProgressMessage -> Maybe Text
targetEncryptionType :: Prelude.Maybe Prelude.Text,
    -- | The node type that the cluster will have after the resize operation is
    -- complete.
    ResizeProgressMessage -> Maybe Text
targetNodeType :: Prelude.Maybe Prelude.Text,
    -- | The names of tables that are being currently imported.
    --
    -- Valid Values: List of table names.
    ResizeProgressMessage -> Maybe [Text]
importTablesInProgress :: Prelude.Maybe [Prelude.Text],
    -- | An enum with possible values of @ClassicResize@ and @ElasticResize@.
    -- These values describe the type of resize operation being performed.
    ResizeProgressMessage -> Maybe Text
resizeType :: Prelude.Maybe Prelude.Text,
    -- | The names of tables that have been completely imported .
    --
    -- Valid Values: List of table names.
    ResizeProgressMessage -> Maybe [Text]
importTablesCompleted :: Prelude.Maybe [Prelude.Text],
    -- | While the resize operation is in progress, this value shows the current
    -- amount of data, in megabytes, that has been processed so far. When the
    -- resize operation is complete, this value shows the total amount of data,
    -- in megabytes, on the cluster, which may be more or less than
    -- TotalResizeDataInMegaBytes (the estimated total amount of data before
    -- resize).
    ResizeProgressMessage -> Maybe Integer
progressInMegaBytes :: Prelude.Maybe Prelude.Integer,
    -- | The percent of data transferred from source cluster to target cluster.
    ResizeProgressMessage -> Maybe Double
dataTransferProgressPercent :: Prelude.Maybe Prelude.Double,
    -- | The estimated total amount of data, in megabytes, on the cluster before
    -- the resize operation began.
    ResizeProgressMessage -> Maybe Integer
totalResizeDataInMegaBytes :: Prelude.Maybe Prelude.Integer,
    -- | The cluster type after the resize operation is complete.
    --
    -- Valid Values: @multi-node@ | @single-node@
    ResizeProgressMessage -> Maybe Text
targetClusterType :: Prelude.Maybe Prelude.Text,
    -- | An optional string to provide additional details about the resize
    -- action.
    ResizeProgressMessage -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The amount of seconds that have elapsed since the resize operation
    -- began. After the resize operation completes, this value shows the total
    -- actual time, in seconds, for the resize operation.
    ResizeProgressMessage -> Maybe Integer
elapsedTimeInSeconds :: Prelude.Maybe Prelude.Integer
  }
  deriving (ResizeProgressMessage -> ResizeProgressMessage -> Bool
(ResizeProgressMessage -> ResizeProgressMessage -> Bool)
-> (ResizeProgressMessage -> ResizeProgressMessage -> Bool)
-> Eq ResizeProgressMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResizeProgressMessage -> ResizeProgressMessage -> Bool
$c/= :: ResizeProgressMessage -> ResizeProgressMessage -> Bool
== :: ResizeProgressMessage -> ResizeProgressMessage -> Bool
$c== :: ResizeProgressMessage -> ResizeProgressMessage -> Bool
Prelude.Eq, ReadPrec [ResizeProgressMessage]
ReadPrec ResizeProgressMessage
Int -> ReadS ResizeProgressMessage
ReadS [ResizeProgressMessage]
(Int -> ReadS ResizeProgressMessage)
-> ReadS [ResizeProgressMessage]
-> ReadPrec ResizeProgressMessage
-> ReadPrec [ResizeProgressMessage]
-> Read ResizeProgressMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResizeProgressMessage]
$creadListPrec :: ReadPrec [ResizeProgressMessage]
readPrec :: ReadPrec ResizeProgressMessage
$creadPrec :: ReadPrec ResizeProgressMessage
readList :: ReadS [ResizeProgressMessage]
$creadList :: ReadS [ResizeProgressMessage]
readsPrec :: Int -> ReadS ResizeProgressMessage
$creadsPrec :: Int -> ReadS ResizeProgressMessage
Prelude.Read, Int -> ResizeProgressMessage -> ShowS
[ResizeProgressMessage] -> ShowS
ResizeProgressMessage -> String
(Int -> ResizeProgressMessage -> ShowS)
-> (ResizeProgressMessage -> String)
-> ([ResizeProgressMessage] -> ShowS)
-> Show ResizeProgressMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResizeProgressMessage] -> ShowS
$cshowList :: [ResizeProgressMessage] -> ShowS
show :: ResizeProgressMessage -> String
$cshow :: ResizeProgressMessage -> String
showsPrec :: Int -> ResizeProgressMessage -> ShowS
$cshowsPrec :: Int -> ResizeProgressMessage -> ShowS
Prelude.Show, (forall x. ResizeProgressMessage -> Rep ResizeProgressMessage x)
-> (forall x. Rep ResizeProgressMessage x -> ResizeProgressMessage)
-> Generic ResizeProgressMessage
forall x. Rep ResizeProgressMessage x -> ResizeProgressMessage
forall x. ResizeProgressMessage -> Rep ResizeProgressMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResizeProgressMessage x -> ResizeProgressMessage
$cfrom :: forall x. ResizeProgressMessage -> Rep ResizeProgressMessage x
Prelude.Generic)

-- |
-- Create a value of 'ResizeProgressMessage' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'importTablesNotStarted', 'resizeProgressMessage_importTablesNotStarted' - The names of tables that have not been yet imported.
--
-- Valid Values: List of table names
--
-- 'status', 'resizeProgressMessage_status' - The status of the resize operation.
--
-- Valid Values: @NONE@ | @IN_PROGRESS@ | @FAILED@ | @SUCCEEDED@ |
-- @CANCELLING@
--
-- 'estimatedTimeToCompletionInSeconds', 'resizeProgressMessage_estimatedTimeToCompletionInSeconds' - The estimated time remaining, in seconds, until the resize operation is
-- complete. This value is calculated based on the average resize rate and
-- the estimated amount of data remaining to be processed. Once the resize
-- operation is complete, this value will be 0.
--
-- 'avgResizeRateInMegaBytesPerSecond', 'resizeProgressMessage_avgResizeRateInMegaBytesPerSecond' - The average rate of the resize operation over the last few minutes,
-- measured in megabytes per second. After the resize operation completes,
-- this value shows the average rate of the entire resize operation.
--
-- 'targetNumberOfNodes', 'resizeProgressMessage_targetNumberOfNodes' - The number of nodes that the cluster will have after the resize
-- operation is complete.
--
-- 'targetEncryptionType', 'resizeProgressMessage_targetEncryptionType' - The type of encryption for the cluster after the resize is complete.
--
-- Possible values are @KMS@ and @None@.
--
-- 'targetNodeType', 'resizeProgressMessage_targetNodeType' - The node type that the cluster will have after the resize operation is
-- complete.
--
-- 'importTablesInProgress', 'resizeProgressMessage_importTablesInProgress' - The names of tables that are being currently imported.
--
-- Valid Values: List of table names.
--
-- 'resizeType', 'resizeProgressMessage_resizeType' - An enum with possible values of @ClassicResize@ and @ElasticResize@.
-- These values describe the type of resize operation being performed.
--
-- 'importTablesCompleted', 'resizeProgressMessage_importTablesCompleted' - The names of tables that have been completely imported .
--
-- Valid Values: List of table names.
--
-- 'progressInMegaBytes', 'resizeProgressMessage_progressInMegaBytes' - While the resize operation is in progress, this value shows the current
-- amount of data, in megabytes, that has been processed so far. When the
-- resize operation is complete, this value shows the total amount of data,
-- in megabytes, on the cluster, which may be more or less than
-- TotalResizeDataInMegaBytes (the estimated total amount of data before
-- resize).
--
-- 'dataTransferProgressPercent', 'resizeProgressMessage_dataTransferProgressPercent' - The percent of data transferred from source cluster to target cluster.
--
-- 'totalResizeDataInMegaBytes', 'resizeProgressMessage_totalResizeDataInMegaBytes' - The estimated total amount of data, in megabytes, on the cluster before
-- the resize operation began.
--
-- 'targetClusterType', 'resizeProgressMessage_targetClusterType' - The cluster type after the resize operation is complete.
--
-- Valid Values: @multi-node@ | @single-node@
--
-- 'message', 'resizeProgressMessage_message' - An optional string to provide additional details about the resize
-- action.
--
-- 'elapsedTimeInSeconds', 'resizeProgressMessage_elapsedTimeInSeconds' - The amount of seconds that have elapsed since the resize operation
-- began. After the resize operation completes, this value shows the total
-- actual time, in seconds, for the resize operation.
newResizeProgressMessage ::
  ResizeProgressMessage
newResizeProgressMessage :: ResizeProgressMessage
newResizeProgressMessage =
  ResizeProgressMessage' :: Maybe [Text]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe Integer
-> Maybe Double
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> ResizeProgressMessage
ResizeProgressMessage'
    { $sel:importTablesNotStarted:ResizeProgressMessage' :: Maybe [Text]
importTablesNotStarted =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ResizeProgressMessage' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedTimeToCompletionInSeconds:ResizeProgressMessage' :: Maybe Integer
estimatedTimeToCompletionInSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:avgResizeRateInMegaBytesPerSecond:ResizeProgressMessage' :: Maybe Double
avgResizeRateInMegaBytesPerSecond = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:targetNumberOfNodes:ResizeProgressMessage' :: Maybe Int
targetNumberOfNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:targetEncryptionType:ResizeProgressMessage' :: Maybe Text
targetEncryptionType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetNodeType:ResizeProgressMessage' :: Maybe Text
targetNodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:importTablesInProgress:ResizeProgressMessage' :: Maybe [Text]
importTablesInProgress = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:resizeType:ResizeProgressMessage' :: Maybe Text
resizeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:importTablesCompleted:ResizeProgressMessage' :: Maybe [Text]
importTablesCompleted = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:progressInMegaBytes:ResizeProgressMessage' :: Maybe Integer
progressInMegaBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:dataTransferProgressPercent:ResizeProgressMessage' :: Maybe Double
dataTransferProgressPercent = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:totalResizeDataInMegaBytes:ResizeProgressMessage' :: Maybe Integer
totalResizeDataInMegaBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:targetClusterType:ResizeProgressMessage' :: Maybe Text
targetClusterType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:ResizeProgressMessage' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:elapsedTimeInSeconds:ResizeProgressMessage' :: Maybe Integer
elapsedTimeInSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing
    }

-- | The names of tables that have not been yet imported.
--
-- Valid Values: List of table names
resizeProgressMessage_importTablesNotStarted :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe [Prelude.Text])
resizeProgressMessage_importTablesNotStarted :: (Maybe [Text] -> f (Maybe [Text]))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_importTablesNotStarted = (ResizeProgressMessage -> Maybe [Text])
-> (ResizeProgressMessage -> Maybe [Text] -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe [Text]
importTablesNotStarted :: Maybe [Text]
$sel:importTablesNotStarted:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe [Text]
importTablesNotStarted} -> Maybe [Text]
importTablesNotStarted) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe [Text]
a -> ResizeProgressMessage
s {$sel:importTablesNotStarted:ResizeProgressMessage' :: Maybe [Text]
importTablesNotStarted = Maybe [Text]
a} :: ResizeProgressMessage) ((Maybe [Text] -> f (Maybe [Text]))
 -> ResizeProgressMessage -> f ResizeProgressMessage)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ResizeProgressMessage
-> f ResizeProgressMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The status of the resize operation.
--
-- Valid Values: @NONE@ | @IN_PROGRESS@ | @FAILED@ | @SUCCEEDED@ |
-- @CANCELLING@
resizeProgressMessage_status :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Text)
resizeProgressMessage_status :: (Maybe Text -> f (Maybe Text))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_status = (ResizeProgressMessage -> Maybe Text)
-> (ResizeProgressMessage -> Maybe Text -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Text
status :: Maybe Text
$sel:status:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Text
status} -> Maybe Text
status) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Text
a -> ResizeProgressMessage
s {$sel:status:ResizeProgressMessage' :: Maybe Text
status = Maybe Text
a} :: ResizeProgressMessage)

-- | The estimated time remaining, in seconds, until the resize operation is
-- complete. This value is calculated based on the average resize rate and
-- the estimated amount of data remaining to be processed. Once the resize
-- operation is complete, this value will be 0.
resizeProgressMessage_estimatedTimeToCompletionInSeconds :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Integer)
resizeProgressMessage_estimatedTimeToCompletionInSeconds :: (Maybe Integer -> f (Maybe Integer))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_estimatedTimeToCompletionInSeconds = (ResizeProgressMessage -> Maybe Integer)
-> (ResizeProgressMessage
    -> Maybe Integer -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Integer
estimatedTimeToCompletionInSeconds :: Maybe Integer
$sel:estimatedTimeToCompletionInSeconds:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Integer
estimatedTimeToCompletionInSeconds} -> Maybe Integer
estimatedTimeToCompletionInSeconds) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Integer
a -> ResizeProgressMessage
s {$sel:estimatedTimeToCompletionInSeconds:ResizeProgressMessage' :: Maybe Integer
estimatedTimeToCompletionInSeconds = Maybe Integer
a} :: ResizeProgressMessage)

-- | The average rate of the resize operation over the last few minutes,
-- measured in megabytes per second. After the resize operation completes,
-- this value shows the average rate of the entire resize operation.
resizeProgressMessage_avgResizeRateInMegaBytesPerSecond :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Double)
resizeProgressMessage_avgResizeRateInMegaBytesPerSecond :: (Maybe Double -> f (Maybe Double))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_avgResizeRateInMegaBytesPerSecond = (ResizeProgressMessage -> Maybe Double)
-> (ResizeProgressMessage -> Maybe Double -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Double
avgResizeRateInMegaBytesPerSecond :: Maybe Double
$sel:avgResizeRateInMegaBytesPerSecond:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Double
avgResizeRateInMegaBytesPerSecond} -> Maybe Double
avgResizeRateInMegaBytesPerSecond) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Double
a -> ResizeProgressMessage
s {$sel:avgResizeRateInMegaBytesPerSecond:ResizeProgressMessage' :: Maybe Double
avgResizeRateInMegaBytesPerSecond = Maybe Double
a} :: ResizeProgressMessage)

-- | The number of nodes that the cluster will have after the resize
-- operation is complete.
resizeProgressMessage_targetNumberOfNodes :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Int)
resizeProgressMessage_targetNumberOfNodes :: (Maybe Int -> f (Maybe Int))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_targetNumberOfNodes = (ResizeProgressMessage -> Maybe Int)
-> (ResizeProgressMessage -> Maybe Int -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage ResizeProgressMessage (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Int
targetNumberOfNodes :: Maybe Int
$sel:targetNumberOfNodes:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Int
targetNumberOfNodes} -> Maybe Int
targetNumberOfNodes) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Int
a -> ResizeProgressMessage
s {$sel:targetNumberOfNodes:ResizeProgressMessage' :: Maybe Int
targetNumberOfNodes = Maybe Int
a} :: ResizeProgressMessage)

-- | The type of encryption for the cluster after the resize is complete.
--
-- Possible values are @KMS@ and @None@.
resizeProgressMessage_targetEncryptionType :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Text)
resizeProgressMessage_targetEncryptionType :: (Maybe Text -> f (Maybe Text))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_targetEncryptionType = (ResizeProgressMessage -> Maybe Text)
-> (ResizeProgressMessage -> Maybe Text -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Text
targetEncryptionType :: Maybe Text
$sel:targetEncryptionType:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Text
targetEncryptionType} -> Maybe Text
targetEncryptionType) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Text
a -> ResizeProgressMessage
s {$sel:targetEncryptionType:ResizeProgressMessage' :: Maybe Text
targetEncryptionType = Maybe Text
a} :: ResizeProgressMessage)

-- | The node type that the cluster will have after the resize operation is
-- complete.
resizeProgressMessage_targetNodeType :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Text)
resizeProgressMessage_targetNodeType :: (Maybe Text -> f (Maybe Text))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_targetNodeType = (ResizeProgressMessage -> Maybe Text)
-> (ResizeProgressMessage -> Maybe Text -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Text
targetNodeType :: Maybe Text
$sel:targetNodeType:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Text
targetNodeType} -> Maybe Text
targetNodeType) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Text
a -> ResizeProgressMessage
s {$sel:targetNodeType:ResizeProgressMessage' :: Maybe Text
targetNodeType = Maybe Text
a} :: ResizeProgressMessage)

-- | The names of tables that are being currently imported.
--
-- Valid Values: List of table names.
resizeProgressMessage_importTablesInProgress :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe [Prelude.Text])
resizeProgressMessage_importTablesInProgress :: (Maybe [Text] -> f (Maybe [Text]))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_importTablesInProgress = (ResizeProgressMessage -> Maybe [Text])
-> (ResizeProgressMessage -> Maybe [Text] -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe [Text]
importTablesInProgress :: Maybe [Text]
$sel:importTablesInProgress:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe [Text]
importTablesInProgress} -> Maybe [Text]
importTablesInProgress) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe [Text]
a -> ResizeProgressMessage
s {$sel:importTablesInProgress:ResizeProgressMessage' :: Maybe [Text]
importTablesInProgress = Maybe [Text]
a} :: ResizeProgressMessage) ((Maybe [Text] -> f (Maybe [Text]))
 -> ResizeProgressMessage -> f ResizeProgressMessage)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ResizeProgressMessage
-> f ResizeProgressMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An enum with possible values of @ClassicResize@ and @ElasticResize@.
-- These values describe the type of resize operation being performed.
resizeProgressMessage_resizeType :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Text)
resizeProgressMessage_resizeType :: (Maybe Text -> f (Maybe Text))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_resizeType = (ResizeProgressMessage -> Maybe Text)
-> (ResizeProgressMessage -> Maybe Text -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Text
resizeType :: Maybe Text
$sel:resizeType:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Text
resizeType} -> Maybe Text
resizeType) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Text
a -> ResizeProgressMessage
s {$sel:resizeType:ResizeProgressMessage' :: Maybe Text
resizeType = Maybe Text
a} :: ResizeProgressMessage)

-- | The names of tables that have been completely imported .
--
-- Valid Values: List of table names.
resizeProgressMessage_importTablesCompleted :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe [Prelude.Text])
resizeProgressMessage_importTablesCompleted :: (Maybe [Text] -> f (Maybe [Text]))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_importTablesCompleted = (ResizeProgressMessage -> Maybe [Text])
-> (ResizeProgressMessage -> Maybe [Text] -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe [Text]
importTablesCompleted :: Maybe [Text]
$sel:importTablesCompleted:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe [Text]
importTablesCompleted} -> Maybe [Text]
importTablesCompleted) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe [Text]
a -> ResizeProgressMessage
s {$sel:importTablesCompleted:ResizeProgressMessage' :: Maybe [Text]
importTablesCompleted = Maybe [Text]
a} :: ResizeProgressMessage) ((Maybe [Text] -> f (Maybe [Text]))
 -> ResizeProgressMessage -> f ResizeProgressMessage)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ResizeProgressMessage
-> f ResizeProgressMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | While the resize operation is in progress, this value shows the current
-- amount of data, in megabytes, that has been processed so far. When the
-- resize operation is complete, this value shows the total amount of data,
-- in megabytes, on the cluster, which may be more or less than
-- TotalResizeDataInMegaBytes (the estimated total amount of data before
-- resize).
resizeProgressMessage_progressInMegaBytes :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Integer)
resizeProgressMessage_progressInMegaBytes :: (Maybe Integer -> f (Maybe Integer))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_progressInMegaBytes = (ResizeProgressMessage -> Maybe Integer)
-> (ResizeProgressMessage
    -> Maybe Integer -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Integer
progressInMegaBytes :: Maybe Integer
$sel:progressInMegaBytes:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Integer
progressInMegaBytes} -> Maybe Integer
progressInMegaBytes) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Integer
a -> ResizeProgressMessage
s {$sel:progressInMegaBytes:ResizeProgressMessage' :: Maybe Integer
progressInMegaBytes = Maybe Integer
a} :: ResizeProgressMessage)

-- | The percent of data transferred from source cluster to target cluster.
resizeProgressMessage_dataTransferProgressPercent :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Double)
resizeProgressMessage_dataTransferProgressPercent :: (Maybe Double -> f (Maybe Double))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_dataTransferProgressPercent = (ResizeProgressMessage -> Maybe Double)
-> (ResizeProgressMessage -> Maybe Double -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Double
dataTransferProgressPercent :: Maybe Double
$sel:dataTransferProgressPercent:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Double
dataTransferProgressPercent} -> Maybe Double
dataTransferProgressPercent) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Double
a -> ResizeProgressMessage
s {$sel:dataTransferProgressPercent:ResizeProgressMessage' :: Maybe Double
dataTransferProgressPercent = Maybe Double
a} :: ResizeProgressMessage)

-- | The estimated total amount of data, in megabytes, on the cluster before
-- the resize operation began.
resizeProgressMessage_totalResizeDataInMegaBytes :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Integer)
resizeProgressMessage_totalResizeDataInMegaBytes :: (Maybe Integer -> f (Maybe Integer))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_totalResizeDataInMegaBytes = (ResizeProgressMessage -> Maybe Integer)
-> (ResizeProgressMessage
    -> Maybe Integer -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Integer
totalResizeDataInMegaBytes :: Maybe Integer
$sel:totalResizeDataInMegaBytes:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Integer
totalResizeDataInMegaBytes} -> Maybe Integer
totalResizeDataInMegaBytes) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Integer
a -> ResizeProgressMessage
s {$sel:totalResizeDataInMegaBytes:ResizeProgressMessage' :: Maybe Integer
totalResizeDataInMegaBytes = Maybe Integer
a} :: ResizeProgressMessage)

-- | The cluster type after the resize operation is complete.
--
-- Valid Values: @multi-node@ | @single-node@
resizeProgressMessage_targetClusterType :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Text)
resizeProgressMessage_targetClusterType :: (Maybe Text -> f (Maybe Text))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_targetClusterType = (ResizeProgressMessage -> Maybe Text)
-> (ResizeProgressMessage -> Maybe Text -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Text
targetClusterType :: Maybe Text
$sel:targetClusterType:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Text
targetClusterType} -> Maybe Text
targetClusterType) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Text
a -> ResizeProgressMessage
s {$sel:targetClusterType:ResizeProgressMessage' :: Maybe Text
targetClusterType = Maybe Text
a} :: ResizeProgressMessage)

-- | An optional string to provide additional details about the resize
-- action.
resizeProgressMessage_message :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Text)
resizeProgressMessage_message :: (Maybe Text -> f (Maybe Text))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_message = (ResizeProgressMessage -> Maybe Text)
-> (ResizeProgressMessage -> Maybe Text -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Text
message :: Maybe Text
$sel:message:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Text
message} -> Maybe Text
message) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Text
a -> ResizeProgressMessage
s {$sel:message:ResizeProgressMessage' :: Maybe Text
message = Maybe Text
a} :: ResizeProgressMessage)

-- | The amount of seconds that have elapsed since the resize operation
-- began. After the resize operation completes, this value shows the total
-- actual time, in seconds, for the resize operation.
resizeProgressMessage_elapsedTimeInSeconds :: Lens.Lens' ResizeProgressMessage (Prelude.Maybe Prelude.Integer)
resizeProgressMessage_elapsedTimeInSeconds :: (Maybe Integer -> f (Maybe Integer))
-> ResizeProgressMessage -> f ResizeProgressMessage
resizeProgressMessage_elapsedTimeInSeconds = (ResizeProgressMessage -> Maybe Integer)
-> (ResizeProgressMessage
    -> Maybe Integer -> ResizeProgressMessage)
-> Lens
     ResizeProgressMessage
     ResizeProgressMessage
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResizeProgressMessage' {Maybe Integer
elapsedTimeInSeconds :: Maybe Integer
$sel:elapsedTimeInSeconds:ResizeProgressMessage' :: ResizeProgressMessage -> Maybe Integer
elapsedTimeInSeconds} -> Maybe Integer
elapsedTimeInSeconds) (\s :: ResizeProgressMessage
s@ResizeProgressMessage' {} Maybe Integer
a -> ResizeProgressMessage
s {$sel:elapsedTimeInSeconds:ResizeProgressMessage' :: Maybe Integer
elapsedTimeInSeconds = Maybe Integer
a} :: ResizeProgressMessage)

instance Core.FromXML ResizeProgressMessage where
  parseXML :: [Node] -> Either String ResizeProgressMessage
parseXML [Node]
x =
    Maybe [Text]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe Integer
-> Maybe Double
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> ResizeProgressMessage
ResizeProgressMessage'
      (Maybe [Text]
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Double
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Integer
 -> Maybe Double
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> ResizeProgressMessage)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ImportTablesNotStarted"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Text
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe Double
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
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 Double
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Double
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
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 Double
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
forall (f :: * -> *) a b. Applicative f => 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
"AvgResizeRateInMegaBytesPerSecond")
      Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TargetNumberOfNodes")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
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
"TargetEncryptionType")
      Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
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
"TargetNodeType")
      Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ImportTablesInProgress"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
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
"ResizeType")
      Either
  String
  (Maybe [Text]
   -> Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Integer
      -> Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ImportTablesCompleted"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Integer
   -> Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Double
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
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
"ProgressInMegaBytes")
      Either
  String
  (Maybe Double
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> ResizeProgressMessage)
forall (f :: * -> *) a b. Applicative f => 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
"DataTransferProgressPercent")
      Either
  String
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> ResizeProgressMessage)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Integer -> ResizeProgressMessage)
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
"TotalResizeDataInMegaBytes")
      Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Integer -> ResizeProgressMessage)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Integer -> ResizeProgressMessage)
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
"TargetClusterType")
      Either
  String (Maybe Text -> Maybe Integer -> ResizeProgressMessage)
-> Either String (Maybe Text)
-> Either String (Maybe Integer -> ResizeProgressMessage)
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
"Message")
      Either String (Maybe Integer -> ResizeProgressMessage)
-> Either String (Maybe Integer)
-> Either String ResizeProgressMessage
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 ResizeProgressMessage

instance Prelude.NFData ResizeProgressMessage