{-# 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.TableRestoreStatus
-- 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.TableRestoreStatus where

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

-- | Describes the status of a RestoreTableFromClusterSnapshot operation.
--
-- /See:/ 'newTableRestoreStatus' smart constructor.
data TableRestoreStatus = TableRestoreStatus'
  { -- | A value that describes the current state of the table restore request.
    --
    -- Valid Values: @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@,
    -- @IN_PROGRESS@
    TableRestoreStatus -> Maybe TableRestoreStatusType
status :: Prelude.Maybe TableRestoreStatusType,
    -- | The name of the schema to restore the table to.
    TableRestoreStatus -> Maybe Text
targetSchemaName :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the snapshot that the table is being restored from.
    TableRestoreStatus -> Maybe Text
snapshotIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The name of the source database that contains the table being restored.
    TableRestoreStatus -> Maybe Text
sourceDatabaseName :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the table restore request.
    TableRestoreStatus -> Maybe Text
tableRestoreRequestId :: Prelude.Maybe Prelude.Text,
    -- | The name of the table to create as a result of the table restore
    -- request.
    TableRestoreStatus -> Maybe Text
newTableName' :: Prelude.Maybe Prelude.Text,
    -- | The name of the database to restore the table to.
    TableRestoreStatus -> Maybe Text
targetDatabaseName :: Prelude.Maybe Prelude.Text,
    -- | The name of the source schema that contains the table being restored.
    TableRestoreStatus -> Maybe Text
sourceSchemaName :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the Amazon Redshift cluster that the table is being
    -- restored to.
    TableRestoreStatus -> Maybe Text
clusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The time that the table restore request was made, in Universal
    -- Coordinated Time (UTC).
    TableRestoreStatus -> Maybe ISO8601
requestTime :: Prelude.Maybe Core.ISO8601,
    -- | The name of the source table being restored.
    TableRestoreStatus -> Maybe Text
sourceTableName :: Prelude.Maybe Prelude.Text,
    -- | The total amount of data to restore to the new table, in megabytes (MB).
    TableRestoreStatus -> Maybe Integer
totalDataInMegaBytes :: Prelude.Maybe Prelude.Integer,
    -- | The amount of data restored to the new table so far, in megabytes (MB).
    TableRestoreStatus -> Maybe Integer
progressInMegaBytes :: Prelude.Maybe Prelude.Integer,
    -- | A description of the status of the table restore request. Status values
    -- include @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@, @IN_PROGRESS@.
    TableRestoreStatus -> Maybe Text
message :: Prelude.Maybe Prelude.Text
  }
  deriving (TableRestoreStatus -> TableRestoreStatus -> Bool
(TableRestoreStatus -> TableRestoreStatus -> Bool)
-> (TableRestoreStatus -> TableRestoreStatus -> Bool)
-> Eq TableRestoreStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableRestoreStatus -> TableRestoreStatus -> Bool
$c/= :: TableRestoreStatus -> TableRestoreStatus -> Bool
== :: TableRestoreStatus -> TableRestoreStatus -> Bool
$c== :: TableRestoreStatus -> TableRestoreStatus -> Bool
Prelude.Eq, ReadPrec [TableRestoreStatus]
ReadPrec TableRestoreStatus
Int -> ReadS TableRestoreStatus
ReadS [TableRestoreStatus]
(Int -> ReadS TableRestoreStatus)
-> ReadS [TableRestoreStatus]
-> ReadPrec TableRestoreStatus
-> ReadPrec [TableRestoreStatus]
-> Read TableRestoreStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TableRestoreStatus]
$creadListPrec :: ReadPrec [TableRestoreStatus]
readPrec :: ReadPrec TableRestoreStatus
$creadPrec :: ReadPrec TableRestoreStatus
readList :: ReadS [TableRestoreStatus]
$creadList :: ReadS [TableRestoreStatus]
readsPrec :: Int -> ReadS TableRestoreStatus
$creadsPrec :: Int -> ReadS TableRestoreStatus
Prelude.Read, Int -> TableRestoreStatus -> ShowS
[TableRestoreStatus] -> ShowS
TableRestoreStatus -> String
(Int -> TableRestoreStatus -> ShowS)
-> (TableRestoreStatus -> String)
-> ([TableRestoreStatus] -> ShowS)
-> Show TableRestoreStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TableRestoreStatus] -> ShowS
$cshowList :: [TableRestoreStatus] -> ShowS
show :: TableRestoreStatus -> String
$cshow :: TableRestoreStatus -> String
showsPrec :: Int -> TableRestoreStatus -> ShowS
$cshowsPrec :: Int -> TableRestoreStatus -> ShowS
Prelude.Show, (forall x. TableRestoreStatus -> Rep TableRestoreStatus x)
-> (forall x. Rep TableRestoreStatus x -> TableRestoreStatus)
-> Generic TableRestoreStatus
forall x. Rep TableRestoreStatus x -> TableRestoreStatus
forall x. TableRestoreStatus -> Rep TableRestoreStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TableRestoreStatus x -> TableRestoreStatus
$cfrom :: forall x. TableRestoreStatus -> Rep TableRestoreStatus x
Prelude.Generic)

-- |
-- Create a value of 'TableRestoreStatus' 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:
--
-- 'status', 'tableRestoreStatus_status' - A value that describes the current state of the table restore request.
--
-- Valid Values: @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@,
-- @IN_PROGRESS@
--
-- 'targetSchemaName', 'tableRestoreStatus_targetSchemaName' - The name of the schema to restore the table to.
--
-- 'snapshotIdentifier', 'tableRestoreStatus_snapshotIdentifier' - The identifier of the snapshot that the table is being restored from.
--
-- 'sourceDatabaseName', 'tableRestoreStatus_sourceDatabaseName' - The name of the source database that contains the table being restored.
--
-- 'tableRestoreRequestId', 'tableRestoreStatus_tableRestoreRequestId' - The unique identifier for the table restore request.
--
-- 'newTableName'', 'tableRestoreStatus_newTableName' - The name of the table to create as a result of the table restore
-- request.
--
-- 'targetDatabaseName', 'tableRestoreStatus_targetDatabaseName' - The name of the database to restore the table to.
--
-- 'sourceSchemaName', 'tableRestoreStatus_sourceSchemaName' - The name of the source schema that contains the table being restored.
--
-- 'clusterIdentifier', 'tableRestoreStatus_clusterIdentifier' - The identifier of the Amazon Redshift cluster that the table is being
-- restored to.
--
-- 'requestTime', 'tableRestoreStatus_requestTime' - The time that the table restore request was made, in Universal
-- Coordinated Time (UTC).
--
-- 'sourceTableName', 'tableRestoreStatus_sourceTableName' - The name of the source table being restored.
--
-- 'totalDataInMegaBytes', 'tableRestoreStatus_totalDataInMegaBytes' - The total amount of data to restore to the new table, in megabytes (MB).
--
-- 'progressInMegaBytes', 'tableRestoreStatus_progressInMegaBytes' - The amount of data restored to the new table so far, in megabytes (MB).
--
-- 'message', 'tableRestoreStatus_message' - A description of the status of the table restore request. Status values
-- include @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@, @IN_PROGRESS@.
newTableRestoreStatus ::
  TableRestoreStatus
newTableRestoreStatus :: TableRestoreStatus
newTableRestoreStatus =
  TableRestoreStatus' :: Maybe TableRestoreStatusType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> TableRestoreStatus
TableRestoreStatus'
    { $sel:status:TableRestoreStatus' :: Maybe TableRestoreStatusType
status = Maybe TableRestoreStatusType
forall a. Maybe a
Prelude.Nothing,
      $sel:targetSchemaName:TableRestoreStatus' :: Maybe Text
targetSchemaName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotIdentifier:TableRestoreStatus' :: Maybe Text
snapshotIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceDatabaseName:TableRestoreStatus' :: Maybe Text
sourceDatabaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tableRestoreRequestId:TableRestoreStatus' :: Maybe Text
tableRestoreRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:newTableName':TableRestoreStatus' :: Maybe Text
newTableName' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetDatabaseName:TableRestoreStatus' :: Maybe Text
targetDatabaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceSchemaName:TableRestoreStatus' :: Maybe Text
sourceSchemaName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterIdentifier:TableRestoreStatus' :: Maybe Text
clusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestTime:TableRestoreStatus' :: Maybe ISO8601
requestTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceTableName:TableRestoreStatus' :: Maybe Text
sourceTableName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:totalDataInMegaBytes:TableRestoreStatus' :: Maybe Integer
totalDataInMegaBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:progressInMegaBytes:TableRestoreStatus' :: Maybe Integer
progressInMegaBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:message:TableRestoreStatus' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A value that describes the current state of the table restore request.
--
-- Valid Values: @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@,
-- @IN_PROGRESS@
tableRestoreStatus_status :: Lens.Lens' TableRestoreStatus (Prelude.Maybe TableRestoreStatusType)
tableRestoreStatus_status :: (Maybe TableRestoreStatusType -> f (Maybe TableRestoreStatusType))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_status = (TableRestoreStatus -> Maybe TableRestoreStatusType)
-> (TableRestoreStatus
    -> Maybe TableRestoreStatusType -> TableRestoreStatus)
-> Lens
     TableRestoreStatus
     TableRestoreStatus
     (Maybe TableRestoreStatusType)
     (Maybe TableRestoreStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe TableRestoreStatusType
status :: Maybe TableRestoreStatusType
$sel:status:TableRestoreStatus' :: TableRestoreStatus -> Maybe TableRestoreStatusType
status} -> Maybe TableRestoreStatusType
status) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe TableRestoreStatusType
a -> TableRestoreStatus
s {$sel:status:TableRestoreStatus' :: Maybe TableRestoreStatusType
status = Maybe TableRestoreStatusType
a} :: TableRestoreStatus)

-- | The name of the schema to restore the table to.
tableRestoreStatus_targetSchemaName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_targetSchemaName :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_targetSchemaName = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
targetSchemaName :: Maybe Text
$sel:targetSchemaName:TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
targetSchemaName} -> Maybe Text
targetSchemaName) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:targetSchemaName:TableRestoreStatus' :: Maybe Text
targetSchemaName = Maybe Text
a} :: TableRestoreStatus)

-- | The identifier of the snapshot that the table is being restored from.
tableRestoreStatus_snapshotIdentifier :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_snapshotIdentifier :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_snapshotIdentifier = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
snapshotIdentifier :: Maybe Text
$sel:snapshotIdentifier:TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
snapshotIdentifier} -> Maybe Text
snapshotIdentifier) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:snapshotIdentifier:TableRestoreStatus' :: Maybe Text
snapshotIdentifier = Maybe Text
a} :: TableRestoreStatus)

-- | The name of the source database that contains the table being restored.
tableRestoreStatus_sourceDatabaseName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_sourceDatabaseName :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_sourceDatabaseName = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
sourceDatabaseName :: Maybe Text
$sel:sourceDatabaseName:TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
sourceDatabaseName} -> Maybe Text
sourceDatabaseName) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:sourceDatabaseName:TableRestoreStatus' :: Maybe Text
sourceDatabaseName = Maybe Text
a} :: TableRestoreStatus)

-- | The unique identifier for the table restore request.
tableRestoreStatus_tableRestoreRequestId :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_tableRestoreRequestId :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_tableRestoreRequestId = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
tableRestoreRequestId :: Maybe Text
$sel:tableRestoreRequestId:TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
tableRestoreRequestId} -> Maybe Text
tableRestoreRequestId) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:tableRestoreRequestId:TableRestoreStatus' :: Maybe Text
tableRestoreRequestId = Maybe Text
a} :: TableRestoreStatus)

-- | The name of the table to create as a result of the table restore
-- request.
tableRestoreStatus_newTableName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_newTableName :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_newTableName = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
newTableName' :: Maybe Text
$sel:newTableName':TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
newTableName'} -> Maybe Text
newTableName') (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:newTableName':TableRestoreStatus' :: Maybe Text
newTableName' = Maybe Text
a} :: TableRestoreStatus)

-- | The name of the database to restore the table to.
tableRestoreStatus_targetDatabaseName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_targetDatabaseName :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_targetDatabaseName = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
targetDatabaseName :: Maybe Text
$sel:targetDatabaseName:TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
targetDatabaseName} -> Maybe Text
targetDatabaseName) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:targetDatabaseName:TableRestoreStatus' :: Maybe Text
targetDatabaseName = Maybe Text
a} :: TableRestoreStatus)

-- | The name of the source schema that contains the table being restored.
tableRestoreStatus_sourceSchemaName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_sourceSchemaName :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_sourceSchemaName = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
sourceSchemaName :: Maybe Text
$sel:sourceSchemaName:TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
sourceSchemaName} -> Maybe Text
sourceSchemaName) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:sourceSchemaName:TableRestoreStatus' :: Maybe Text
sourceSchemaName = Maybe Text
a} :: TableRestoreStatus)

-- | The identifier of the Amazon Redshift cluster that the table is being
-- restored to.
tableRestoreStatus_clusterIdentifier :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_clusterIdentifier :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_clusterIdentifier = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
clusterIdentifier :: Maybe Text
$sel:clusterIdentifier:TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
clusterIdentifier} -> Maybe Text
clusterIdentifier) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:clusterIdentifier:TableRestoreStatus' :: Maybe Text
clusterIdentifier = Maybe Text
a} :: TableRestoreStatus)

-- | The time that the table restore request was made, in Universal
-- Coordinated Time (UTC).
tableRestoreStatus_requestTime :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.UTCTime)
tableRestoreStatus_requestTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_requestTime = (TableRestoreStatus -> Maybe ISO8601)
-> (TableRestoreStatus -> Maybe ISO8601 -> TableRestoreStatus)
-> Lens
     TableRestoreStatus
     TableRestoreStatus
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe ISO8601
requestTime :: Maybe ISO8601
$sel:requestTime:TableRestoreStatus' :: TableRestoreStatus -> Maybe ISO8601
requestTime} -> Maybe ISO8601
requestTime) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe ISO8601
a -> TableRestoreStatus
s {$sel:requestTime:TableRestoreStatus' :: Maybe ISO8601
requestTime = Maybe ISO8601
a} :: TableRestoreStatus) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> TableRestoreStatus -> f TableRestoreStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TableRestoreStatus
-> f TableRestoreStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the source table being restored.
tableRestoreStatus_sourceTableName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_sourceTableName :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_sourceTableName = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
sourceTableName :: Maybe Text
$sel:sourceTableName:TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
sourceTableName} -> Maybe Text
sourceTableName) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:sourceTableName:TableRestoreStatus' :: Maybe Text
sourceTableName = Maybe Text
a} :: TableRestoreStatus)

-- | The total amount of data to restore to the new table, in megabytes (MB).
tableRestoreStatus_totalDataInMegaBytes :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Integer)
tableRestoreStatus_totalDataInMegaBytes :: (Maybe Integer -> f (Maybe Integer))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_totalDataInMegaBytes = (TableRestoreStatus -> Maybe Integer)
-> (TableRestoreStatus -> Maybe Integer -> TableRestoreStatus)
-> Lens
     TableRestoreStatus
     TableRestoreStatus
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Integer
totalDataInMegaBytes :: Maybe Integer
$sel:totalDataInMegaBytes:TableRestoreStatus' :: TableRestoreStatus -> Maybe Integer
totalDataInMegaBytes} -> Maybe Integer
totalDataInMegaBytes) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Integer
a -> TableRestoreStatus
s {$sel:totalDataInMegaBytes:TableRestoreStatus' :: Maybe Integer
totalDataInMegaBytes = Maybe Integer
a} :: TableRestoreStatus)

-- | The amount of data restored to the new table so far, in megabytes (MB).
tableRestoreStatus_progressInMegaBytes :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Integer)
tableRestoreStatus_progressInMegaBytes :: (Maybe Integer -> f (Maybe Integer))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_progressInMegaBytes = (TableRestoreStatus -> Maybe Integer)
-> (TableRestoreStatus -> Maybe Integer -> TableRestoreStatus)
-> Lens
     TableRestoreStatus
     TableRestoreStatus
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Integer
progressInMegaBytes :: Maybe Integer
$sel:progressInMegaBytes:TableRestoreStatus' :: TableRestoreStatus -> Maybe Integer
progressInMegaBytes} -> Maybe Integer
progressInMegaBytes) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Integer
a -> TableRestoreStatus
s {$sel:progressInMegaBytes:TableRestoreStatus' :: Maybe Integer
progressInMegaBytes = Maybe Integer
a} :: TableRestoreStatus)

-- | A description of the status of the table restore request. Status values
-- include @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@, @IN_PROGRESS@.
tableRestoreStatus_message :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)
tableRestoreStatus_message :: (Maybe Text -> f (Maybe Text))
-> TableRestoreStatus -> f TableRestoreStatus
tableRestoreStatus_message = (TableRestoreStatus -> Maybe Text)
-> (TableRestoreStatus -> Maybe Text -> TableRestoreStatus)
-> Lens
     TableRestoreStatus TableRestoreStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableRestoreStatus' {Maybe Text
message :: Maybe Text
$sel:message:TableRestoreStatus' :: TableRestoreStatus -> Maybe Text
message} -> Maybe Text
message) (\s :: TableRestoreStatus
s@TableRestoreStatus' {} Maybe Text
a -> TableRestoreStatus
s {$sel:message:TableRestoreStatus' :: Maybe Text
message = Maybe Text
a} :: TableRestoreStatus)

instance Core.FromXML TableRestoreStatus where
  parseXML :: [Node] -> Either String TableRestoreStatus
parseXML [Node]
x =
    Maybe TableRestoreStatusType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> TableRestoreStatus
TableRestoreStatus'
      (Maybe TableRestoreStatusType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Integer
 -> Maybe Text
 -> TableRestoreStatus)
-> Either String (Maybe TableRestoreStatusType)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe TableRestoreStatusType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
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
"TargetSchemaName")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
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
"SnapshotIdentifier")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
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
"SourceDatabaseName")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
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
"TableRestoreRequestId")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
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
"NewTableName")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
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
"TargetDatabaseName")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
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
"SourceSchemaName")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
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
"ClusterIdentifier")
      Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> TableRestoreStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"RequestTime")
      Either
  String
  (Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> TableRestoreStatus)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe Integer -> Maybe Text -> TableRestoreStatus)
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
"SourceTableName")
      Either
  String
  (Maybe Integer
   -> Maybe Integer -> Maybe Text -> TableRestoreStatus)
-> Either String (Maybe Integer)
-> Either
     String (Maybe Integer -> Maybe Text -> TableRestoreStatus)
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 -> Maybe Text -> TableRestoreStatus)
-> Either String (Maybe Integer)
-> Either String (Maybe Text -> TableRestoreStatus)
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 Text -> TableRestoreStatus)
-> Either String (Maybe Text) -> Either String TableRestoreStatus
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")

instance Prelude.Hashable TableRestoreStatus

instance Prelude.NFData TableRestoreStatus