{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.DynamoDB.RestoreTableToPointInTime
-- 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)
--
-- Restores the specified table to the specified point in time within
-- @EarliestRestorableDateTime@ and @LatestRestorableDateTime@. You can
-- restore your table to any point in time during the last 35 days. Any
-- number of users can execute up to 4 concurrent restores (any type of
-- restore) in a given account.
--
-- When you restore using point in time recovery, DynamoDB restores your
-- table data to the state based on the selected date and time
-- (day:hour:minute:second) to a new table.
--
-- Along with data, the following are also included on the new restored
-- table using point in time recovery:
--
-- -   Global secondary indexes (GSIs)
--
-- -   Local secondary indexes (LSIs)
--
-- -   Provisioned read and write capacity
--
-- -   Encryption settings
--
--     All these settings come from the current settings of the source
--     table at the time of restore.
--
-- You must manually set up the following on the restored table:
--
-- -   Auto scaling policies
--
-- -   IAM policies
--
-- -   Amazon CloudWatch metrics and alarms
--
-- -   Tags
--
-- -   Stream settings
--
-- -   Time to Live (TTL) settings
--
-- -   Point in time recovery settings
module Amazonka.DynamoDB.RestoreTableToPointInTime
  ( -- * Creating a Request
    RestoreTableToPointInTime (..),
    newRestoreTableToPointInTime,

    -- * Request Lenses
    restoreTableToPointInTime_billingModeOverride,
    restoreTableToPointInTime_useLatestRestorableTime,
    restoreTableToPointInTime_globalSecondaryIndexOverride,
    restoreTableToPointInTime_provisionedThroughputOverride,
    restoreTableToPointInTime_sourceTableArn,
    restoreTableToPointInTime_sSESpecificationOverride,
    restoreTableToPointInTime_sourceTableName,
    restoreTableToPointInTime_localSecondaryIndexOverride,
    restoreTableToPointInTime_restoreDateTime,
    restoreTableToPointInTime_targetTableName,

    -- * Destructuring the Response
    RestoreTableToPointInTimeResponse (..),
    newRestoreTableToPointInTimeResponse,

    -- * Response Lenses
    restoreTableToPointInTimeResponse_tableDescription,
    restoreTableToPointInTimeResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newRestoreTableToPointInTime' smart constructor.
data RestoreTableToPointInTime = RestoreTableToPointInTime'
  { -- | The billing mode of the restored table.
    RestoreTableToPointInTime -> Maybe BillingMode
billingModeOverride :: Prelude.Maybe BillingMode,
    -- | Restore the table to the latest possible time.
    -- @LatestRestorableDateTime@ is typically 5 minutes before the current
    -- time.
    RestoreTableToPointInTime -> Maybe Bool
useLatestRestorableTime :: Prelude.Maybe Prelude.Bool,
    -- | List of global secondary indexes for the restored table. The indexes
    -- provided should match existing secondary indexes. You can choose to
    -- exclude some or all of the indexes at the time of restore.
    RestoreTableToPointInTime -> Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride :: Prelude.Maybe [GlobalSecondaryIndex],
    -- | Provisioned throughput settings for the restored table.
    RestoreTableToPointInTime -> Maybe ProvisionedThroughput
provisionedThroughputOverride :: Prelude.Maybe ProvisionedThroughput,
    -- | The DynamoDB table that will be restored. This value is an Amazon
    -- Resource Name (ARN).
    RestoreTableToPointInTime -> Maybe Text
sourceTableArn :: Prelude.Maybe Prelude.Text,
    -- | The new server-side encryption settings for the restored table.
    RestoreTableToPointInTime -> Maybe SSESpecification
sSESpecificationOverride :: Prelude.Maybe SSESpecification,
    -- | Name of the source table that is being restored.
    RestoreTableToPointInTime -> Maybe Text
sourceTableName :: Prelude.Maybe Prelude.Text,
    -- | List of local secondary indexes for the restored table. The indexes
    -- provided should match existing secondary indexes. You can choose to
    -- exclude some or all of the indexes at the time of restore.
    RestoreTableToPointInTime -> Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride :: Prelude.Maybe [LocalSecondaryIndex],
    -- | Time in the past to restore the table to.
    RestoreTableToPointInTime -> Maybe POSIX
restoreDateTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the new table to which it must be restored to.
    RestoreTableToPointInTime -> Text
targetTableName :: Prelude.Text
  }
  deriving (RestoreTableToPointInTime -> RestoreTableToPointInTime -> Bool
(RestoreTableToPointInTime -> RestoreTableToPointInTime -> Bool)
-> (RestoreTableToPointInTime -> RestoreTableToPointInTime -> Bool)
-> Eq RestoreTableToPointInTime
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RestoreTableToPointInTime -> RestoreTableToPointInTime -> Bool
$c/= :: RestoreTableToPointInTime -> RestoreTableToPointInTime -> Bool
== :: RestoreTableToPointInTime -> RestoreTableToPointInTime -> Bool
$c== :: RestoreTableToPointInTime -> RestoreTableToPointInTime -> Bool
Prelude.Eq, ReadPrec [RestoreTableToPointInTime]
ReadPrec RestoreTableToPointInTime
Int -> ReadS RestoreTableToPointInTime
ReadS [RestoreTableToPointInTime]
(Int -> ReadS RestoreTableToPointInTime)
-> ReadS [RestoreTableToPointInTime]
-> ReadPrec RestoreTableToPointInTime
-> ReadPrec [RestoreTableToPointInTime]
-> Read RestoreTableToPointInTime
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RestoreTableToPointInTime]
$creadListPrec :: ReadPrec [RestoreTableToPointInTime]
readPrec :: ReadPrec RestoreTableToPointInTime
$creadPrec :: ReadPrec RestoreTableToPointInTime
readList :: ReadS [RestoreTableToPointInTime]
$creadList :: ReadS [RestoreTableToPointInTime]
readsPrec :: Int -> ReadS RestoreTableToPointInTime
$creadsPrec :: Int -> ReadS RestoreTableToPointInTime
Prelude.Read, Int -> RestoreTableToPointInTime -> ShowS
[RestoreTableToPointInTime] -> ShowS
RestoreTableToPointInTime -> String
(Int -> RestoreTableToPointInTime -> ShowS)
-> (RestoreTableToPointInTime -> String)
-> ([RestoreTableToPointInTime] -> ShowS)
-> Show RestoreTableToPointInTime
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RestoreTableToPointInTime] -> ShowS
$cshowList :: [RestoreTableToPointInTime] -> ShowS
show :: RestoreTableToPointInTime -> String
$cshow :: RestoreTableToPointInTime -> String
showsPrec :: Int -> RestoreTableToPointInTime -> ShowS
$cshowsPrec :: Int -> RestoreTableToPointInTime -> ShowS
Prelude.Show, (forall x.
 RestoreTableToPointInTime -> Rep RestoreTableToPointInTime x)
-> (forall x.
    Rep RestoreTableToPointInTime x -> RestoreTableToPointInTime)
-> Generic RestoreTableToPointInTime
forall x.
Rep RestoreTableToPointInTime x -> RestoreTableToPointInTime
forall x.
RestoreTableToPointInTime -> Rep RestoreTableToPointInTime x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RestoreTableToPointInTime x -> RestoreTableToPointInTime
$cfrom :: forall x.
RestoreTableToPointInTime -> Rep RestoreTableToPointInTime x
Prelude.Generic)

-- |
-- Create a value of 'RestoreTableToPointInTime' 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:
--
-- 'billingModeOverride', 'restoreTableToPointInTime_billingModeOverride' - The billing mode of the restored table.
--
-- 'useLatestRestorableTime', 'restoreTableToPointInTime_useLatestRestorableTime' - Restore the table to the latest possible time.
-- @LatestRestorableDateTime@ is typically 5 minutes before the current
-- time.
--
-- 'globalSecondaryIndexOverride', 'restoreTableToPointInTime_globalSecondaryIndexOverride' - List of global secondary indexes for the restored table. The indexes
-- provided should match existing secondary indexes. You can choose to
-- exclude some or all of the indexes at the time of restore.
--
-- 'provisionedThroughputOverride', 'restoreTableToPointInTime_provisionedThroughputOverride' - Provisioned throughput settings for the restored table.
--
-- 'sourceTableArn', 'restoreTableToPointInTime_sourceTableArn' - The DynamoDB table that will be restored. This value is an Amazon
-- Resource Name (ARN).
--
-- 'sSESpecificationOverride', 'restoreTableToPointInTime_sSESpecificationOverride' - The new server-side encryption settings for the restored table.
--
-- 'sourceTableName', 'restoreTableToPointInTime_sourceTableName' - Name of the source table that is being restored.
--
-- 'localSecondaryIndexOverride', 'restoreTableToPointInTime_localSecondaryIndexOverride' - List of local secondary indexes for the restored table. The indexes
-- provided should match existing secondary indexes. You can choose to
-- exclude some or all of the indexes at the time of restore.
--
-- 'restoreDateTime', 'restoreTableToPointInTime_restoreDateTime' - Time in the past to restore the table to.
--
-- 'targetTableName', 'restoreTableToPointInTime_targetTableName' - The name of the new table to which it must be restored to.
newRestoreTableToPointInTime ::
  -- | 'targetTableName'
  Prelude.Text ->
  RestoreTableToPointInTime
newRestoreTableToPointInTime :: Text -> RestoreTableToPointInTime
newRestoreTableToPointInTime Text
pTargetTableName_ =
  RestoreTableToPointInTime' :: Maybe BillingMode
-> Maybe Bool
-> Maybe [GlobalSecondaryIndex]
-> Maybe ProvisionedThroughput
-> Maybe Text
-> Maybe SSESpecification
-> Maybe Text
-> Maybe [LocalSecondaryIndex]
-> Maybe POSIX
-> Text
-> RestoreTableToPointInTime
RestoreTableToPointInTime'
    { $sel:billingModeOverride:RestoreTableToPointInTime' :: Maybe BillingMode
billingModeOverride =
        Maybe BillingMode
forall a. Maybe a
Prelude.Nothing,
      $sel:useLatestRestorableTime:RestoreTableToPointInTime' :: Maybe Bool
useLatestRestorableTime = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:globalSecondaryIndexOverride:RestoreTableToPointInTime' :: Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride = Maybe [GlobalSecondaryIndex]
forall a. Maybe a
Prelude.Nothing,
      $sel:provisionedThroughputOverride:RestoreTableToPointInTime' :: Maybe ProvisionedThroughput
provisionedThroughputOverride = Maybe ProvisionedThroughput
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceTableArn:RestoreTableToPointInTime' :: Maybe Text
sourceTableArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sSESpecificationOverride:RestoreTableToPointInTime' :: Maybe SSESpecification
sSESpecificationOverride = Maybe SSESpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceTableName:RestoreTableToPointInTime' :: Maybe Text
sourceTableName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:localSecondaryIndexOverride:RestoreTableToPointInTime' :: Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride = Maybe [LocalSecondaryIndex]
forall a. Maybe a
Prelude.Nothing,
      $sel:restoreDateTime:RestoreTableToPointInTime' :: Maybe POSIX
restoreDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:targetTableName:RestoreTableToPointInTime' :: Text
targetTableName = Text
pTargetTableName_
    }

-- | The billing mode of the restored table.
restoreTableToPointInTime_billingModeOverride :: Lens.Lens' RestoreTableToPointInTime (Prelude.Maybe BillingMode)
restoreTableToPointInTime_billingModeOverride :: (Maybe BillingMode -> f (Maybe BillingMode))
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_billingModeOverride = (RestoreTableToPointInTime -> Maybe BillingMode)
-> (RestoreTableToPointInTime
    -> Maybe BillingMode -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime
     RestoreTableToPointInTime
     (Maybe BillingMode)
     (Maybe BillingMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Maybe BillingMode
billingModeOverride :: Maybe BillingMode
$sel:billingModeOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe BillingMode
billingModeOverride} -> Maybe BillingMode
billingModeOverride) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Maybe BillingMode
a -> RestoreTableToPointInTime
s {$sel:billingModeOverride:RestoreTableToPointInTime' :: Maybe BillingMode
billingModeOverride = Maybe BillingMode
a} :: RestoreTableToPointInTime)

-- | Restore the table to the latest possible time.
-- @LatestRestorableDateTime@ is typically 5 minutes before the current
-- time.
restoreTableToPointInTime_useLatestRestorableTime :: Lens.Lens' RestoreTableToPointInTime (Prelude.Maybe Prelude.Bool)
restoreTableToPointInTime_useLatestRestorableTime :: (Maybe Bool -> f (Maybe Bool))
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_useLatestRestorableTime = (RestoreTableToPointInTime -> Maybe Bool)
-> (RestoreTableToPointInTime
    -> Maybe Bool -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime
     RestoreTableToPointInTime
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Maybe Bool
useLatestRestorableTime :: Maybe Bool
$sel:useLatestRestorableTime:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe Bool
useLatestRestorableTime} -> Maybe Bool
useLatestRestorableTime) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Maybe Bool
a -> RestoreTableToPointInTime
s {$sel:useLatestRestorableTime:RestoreTableToPointInTime' :: Maybe Bool
useLatestRestorableTime = Maybe Bool
a} :: RestoreTableToPointInTime)

-- | List of global secondary indexes for the restored table. The indexes
-- provided should match existing secondary indexes. You can choose to
-- exclude some or all of the indexes at the time of restore.
restoreTableToPointInTime_globalSecondaryIndexOverride :: Lens.Lens' RestoreTableToPointInTime (Prelude.Maybe [GlobalSecondaryIndex])
restoreTableToPointInTime_globalSecondaryIndexOverride :: (Maybe [GlobalSecondaryIndex] -> f (Maybe [GlobalSecondaryIndex]))
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_globalSecondaryIndexOverride = (RestoreTableToPointInTime -> Maybe [GlobalSecondaryIndex])
-> (RestoreTableToPointInTime
    -> Maybe [GlobalSecondaryIndex] -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime
     RestoreTableToPointInTime
     (Maybe [GlobalSecondaryIndex])
     (Maybe [GlobalSecondaryIndex])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride :: Maybe [GlobalSecondaryIndex]
$sel:globalSecondaryIndexOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride} -> Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Maybe [GlobalSecondaryIndex]
a -> RestoreTableToPointInTime
s {$sel:globalSecondaryIndexOverride:RestoreTableToPointInTime' :: Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride = Maybe [GlobalSecondaryIndex]
a} :: RestoreTableToPointInTime) ((Maybe [GlobalSecondaryIndex] -> f (Maybe [GlobalSecondaryIndex]))
 -> RestoreTableToPointInTime -> f RestoreTableToPointInTime)
-> ((Maybe [GlobalSecondaryIndex]
     -> f (Maybe [GlobalSecondaryIndex]))
    -> Maybe [GlobalSecondaryIndex]
    -> f (Maybe [GlobalSecondaryIndex]))
-> (Maybe [GlobalSecondaryIndex]
    -> f (Maybe [GlobalSecondaryIndex]))
-> RestoreTableToPointInTime
-> f RestoreTableToPointInTime
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [GlobalSecondaryIndex]
  [GlobalSecondaryIndex]
  [GlobalSecondaryIndex]
  [GlobalSecondaryIndex]
-> Iso
     (Maybe [GlobalSecondaryIndex])
     (Maybe [GlobalSecondaryIndex])
     (Maybe [GlobalSecondaryIndex])
     (Maybe [GlobalSecondaryIndex])
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
  [GlobalSecondaryIndex]
  [GlobalSecondaryIndex]
  [GlobalSecondaryIndex]
  [GlobalSecondaryIndex]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Provisioned throughput settings for the restored table.
restoreTableToPointInTime_provisionedThroughputOverride :: Lens.Lens' RestoreTableToPointInTime (Prelude.Maybe ProvisionedThroughput)
restoreTableToPointInTime_provisionedThroughputOverride :: (Maybe ProvisionedThroughput -> f (Maybe ProvisionedThroughput))
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_provisionedThroughputOverride = (RestoreTableToPointInTime -> Maybe ProvisionedThroughput)
-> (RestoreTableToPointInTime
    -> Maybe ProvisionedThroughput -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime
     RestoreTableToPointInTime
     (Maybe ProvisionedThroughput)
     (Maybe ProvisionedThroughput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Maybe ProvisionedThroughput
provisionedThroughputOverride :: Maybe ProvisionedThroughput
$sel:provisionedThroughputOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe ProvisionedThroughput
provisionedThroughputOverride} -> Maybe ProvisionedThroughput
provisionedThroughputOverride) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Maybe ProvisionedThroughput
a -> RestoreTableToPointInTime
s {$sel:provisionedThroughputOverride:RestoreTableToPointInTime' :: Maybe ProvisionedThroughput
provisionedThroughputOverride = Maybe ProvisionedThroughput
a} :: RestoreTableToPointInTime)

-- | The DynamoDB table that will be restored. This value is an Amazon
-- Resource Name (ARN).
restoreTableToPointInTime_sourceTableArn :: Lens.Lens' RestoreTableToPointInTime (Prelude.Maybe Prelude.Text)
restoreTableToPointInTime_sourceTableArn :: (Maybe Text -> f (Maybe Text))
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_sourceTableArn = (RestoreTableToPointInTime -> Maybe Text)
-> (RestoreTableToPointInTime
    -> Maybe Text -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime
     RestoreTableToPointInTime
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Maybe Text
sourceTableArn :: Maybe Text
$sel:sourceTableArn:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe Text
sourceTableArn} -> Maybe Text
sourceTableArn) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Maybe Text
a -> RestoreTableToPointInTime
s {$sel:sourceTableArn:RestoreTableToPointInTime' :: Maybe Text
sourceTableArn = Maybe Text
a} :: RestoreTableToPointInTime)

-- | The new server-side encryption settings for the restored table.
restoreTableToPointInTime_sSESpecificationOverride :: Lens.Lens' RestoreTableToPointInTime (Prelude.Maybe SSESpecification)
restoreTableToPointInTime_sSESpecificationOverride :: (Maybe SSESpecification -> f (Maybe SSESpecification))
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_sSESpecificationOverride = (RestoreTableToPointInTime -> Maybe SSESpecification)
-> (RestoreTableToPointInTime
    -> Maybe SSESpecification -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime
     RestoreTableToPointInTime
     (Maybe SSESpecification)
     (Maybe SSESpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Maybe SSESpecification
sSESpecificationOverride :: Maybe SSESpecification
$sel:sSESpecificationOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe SSESpecification
sSESpecificationOverride} -> Maybe SSESpecification
sSESpecificationOverride) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Maybe SSESpecification
a -> RestoreTableToPointInTime
s {$sel:sSESpecificationOverride:RestoreTableToPointInTime' :: Maybe SSESpecification
sSESpecificationOverride = Maybe SSESpecification
a} :: RestoreTableToPointInTime)

-- | Name of the source table that is being restored.
restoreTableToPointInTime_sourceTableName :: Lens.Lens' RestoreTableToPointInTime (Prelude.Maybe Prelude.Text)
restoreTableToPointInTime_sourceTableName :: (Maybe Text -> f (Maybe Text))
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_sourceTableName = (RestoreTableToPointInTime -> Maybe Text)
-> (RestoreTableToPointInTime
    -> Maybe Text -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime
     RestoreTableToPointInTime
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Maybe Text
sourceTableName :: Maybe Text
$sel:sourceTableName:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe Text
sourceTableName} -> Maybe Text
sourceTableName) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Maybe Text
a -> RestoreTableToPointInTime
s {$sel:sourceTableName:RestoreTableToPointInTime' :: Maybe Text
sourceTableName = Maybe Text
a} :: RestoreTableToPointInTime)

-- | List of local secondary indexes for the restored table. The indexes
-- provided should match existing secondary indexes. You can choose to
-- exclude some or all of the indexes at the time of restore.
restoreTableToPointInTime_localSecondaryIndexOverride :: Lens.Lens' RestoreTableToPointInTime (Prelude.Maybe [LocalSecondaryIndex])
restoreTableToPointInTime_localSecondaryIndexOverride :: (Maybe [LocalSecondaryIndex] -> f (Maybe [LocalSecondaryIndex]))
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_localSecondaryIndexOverride = (RestoreTableToPointInTime -> Maybe [LocalSecondaryIndex])
-> (RestoreTableToPointInTime
    -> Maybe [LocalSecondaryIndex] -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime
     RestoreTableToPointInTime
     (Maybe [LocalSecondaryIndex])
     (Maybe [LocalSecondaryIndex])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride :: Maybe [LocalSecondaryIndex]
$sel:localSecondaryIndexOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride} -> Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Maybe [LocalSecondaryIndex]
a -> RestoreTableToPointInTime
s {$sel:localSecondaryIndexOverride:RestoreTableToPointInTime' :: Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride = Maybe [LocalSecondaryIndex]
a} :: RestoreTableToPointInTime) ((Maybe [LocalSecondaryIndex] -> f (Maybe [LocalSecondaryIndex]))
 -> RestoreTableToPointInTime -> f RestoreTableToPointInTime)
-> ((Maybe [LocalSecondaryIndex]
     -> f (Maybe [LocalSecondaryIndex]))
    -> Maybe [LocalSecondaryIndex] -> f (Maybe [LocalSecondaryIndex]))
-> (Maybe [LocalSecondaryIndex] -> f (Maybe [LocalSecondaryIndex]))
-> RestoreTableToPointInTime
-> f RestoreTableToPointInTime
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LocalSecondaryIndex]
  [LocalSecondaryIndex]
  [LocalSecondaryIndex]
  [LocalSecondaryIndex]
-> Iso
     (Maybe [LocalSecondaryIndex])
     (Maybe [LocalSecondaryIndex])
     (Maybe [LocalSecondaryIndex])
     (Maybe [LocalSecondaryIndex])
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
  [LocalSecondaryIndex]
  [LocalSecondaryIndex]
  [LocalSecondaryIndex]
  [LocalSecondaryIndex]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Time in the past to restore the table to.
restoreTableToPointInTime_restoreDateTime :: Lens.Lens' RestoreTableToPointInTime (Prelude.Maybe Prelude.UTCTime)
restoreTableToPointInTime_restoreDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_restoreDateTime = (RestoreTableToPointInTime -> Maybe POSIX)
-> (RestoreTableToPointInTime
    -> Maybe POSIX -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime
     RestoreTableToPointInTime
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Maybe POSIX
restoreDateTime :: Maybe POSIX
$sel:restoreDateTime:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe POSIX
restoreDateTime} -> Maybe POSIX
restoreDateTime) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Maybe POSIX
a -> RestoreTableToPointInTime
s {$sel:restoreDateTime:RestoreTableToPointInTime' :: Maybe POSIX
restoreDateTime = Maybe POSIX
a} :: RestoreTableToPointInTime) ((Maybe POSIX -> f (Maybe POSIX))
 -> RestoreTableToPointInTime -> f RestoreTableToPointInTime)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RestoreTableToPointInTime
-> f RestoreTableToPointInTime
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the new table to which it must be restored to.
restoreTableToPointInTime_targetTableName :: Lens.Lens' RestoreTableToPointInTime Prelude.Text
restoreTableToPointInTime_targetTableName :: (Text -> f Text)
-> RestoreTableToPointInTime -> f RestoreTableToPointInTime
restoreTableToPointInTime_targetTableName = (RestoreTableToPointInTime -> Text)
-> (RestoreTableToPointInTime -> Text -> RestoreTableToPointInTime)
-> Lens
     RestoreTableToPointInTime RestoreTableToPointInTime Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTime' {Text
targetTableName :: Text
$sel:targetTableName:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Text
targetTableName} -> Text
targetTableName) (\s :: RestoreTableToPointInTime
s@RestoreTableToPointInTime' {} Text
a -> RestoreTableToPointInTime
s {$sel:targetTableName:RestoreTableToPointInTime' :: Text
targetTableName = Text
a} :: RestoreTableToPointInTime)

instance Core.AWSRequest RestoreTableToPointInTime where
  type
    AWSResponse RestoreTableToPointInTime =
      RestoreTableToPointInTimeResponse
  request :: RestoreTableToPointInTime -> Request RestoreTableToPointInTime
request = Service
-> RestoreTableToPointInTime -> Request RestoreTableToPointInTime
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy RestoreTableToPointInTime
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RestoreTableToPointInTime)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse RestoreTableToPointInTime))
-> Logger
-> Service
-> Proxy RestoreTableToPointInTime
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RestoreTableToPointInTime)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe TableDescription -> Int -> RestoreTableToPointInTimeResponse
RestoreTableToPointInTimeResponse'
            (Maybe TableDescription
 -> Int -> RestoreTableToPointInTimeResponse)
-> Either String (Maybe TableDescription)
-> Either String (Int -> RestoreTableToPointInTimeResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe TableDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TableDescription")
            Either String (Int -> RestoreTableToPointInTimeResponse)
-> Either String Int
-> Either String RestoreTableToPointInTimeResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable RestoreTableToPointInTime

instance Prelude.NFData RestoreTableToPointInTime

instance Core.ToHeaders RestoreTableToPointInTime where
  toHeaders :: RestoreTableToPointInTime -> ResponseHeaders
toHeaders =
    ResponseHeaders -> RestoreTableToPointInTime -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"DynamoDB_20120810.RestoreTableToPointInTime" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON RestoreTableToPointInTime where
  toJSON :: RestoreTableToPointInTime -> Value
toJSON RestoreTableToPointInTime' {Maybe Bool
Maybe [LocalSecondaryIndex]
Maybe [GlobalSecondaryIndex]
Maybe Text
Maybe POSIX
Maybe BillingMode
Maybe ProvisionedThroughput
Maybe SSESpecification
Text
targetTableName :: Text
restoreDateTime :: Maybe POSIX
localSecondaryIndexOverride :: Maybe [LocalSecondaryIndex]
sourceTableName :: Maybe Text
sSESpecificationOverride :: Maybe SSESpecification
sourceTableArn :: Maybe Text
provisionedThroughputOverride :: Maybe ProvisionedThroughput
globalSecondaryIndexOverride :: Maybe [GlobalSecondaryIndex]
useLatestRestorableTime :: Maybe Bool
billingModeOverride :: Maybe BillingMode
$sel:targetTableName:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Text
$sel:restoreDateTime:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe POSIX
$sel:localSecondaryIndexOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe [LocalSecondaryIndex]
$sel:sourceTableName:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe Text
$sel:sSESpecificationOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe SSESpecification
$sel:sourceTableArn:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe Text
$sel:provisionedThroughputOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe ProvisionedThroughput
$sel:globalSecondaryIndexOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe [GlobalSecondaryIndex]
$sel:useLatestRestorableTime:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe Bool
$sel:billingModeOverride:RestoreTableToPointInTime' :: RestoreTableToPointInTime -> Maybe BillingMode
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"BillingModeOverride" Text -> BillingMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BillingMode -> Pair) -> Maybe BillingMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BillingMode
billingModeOverride,
            (Text
"UseLatestRestorableTime" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useLatestRestorableTime,
            (Text
"GlobalSecondaryIndexOverride" Text -> [GlobalSecondaryIndex] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([GlobalSecondaryIndex] -> Pair)
-> Maybe [GlobalSecondaryIndex] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride,
            (Text
"ProvisionedThroughputOverride" Text -> ProvisionedThroughput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProvisionedThroughput -> Pair)
-> Maybe ProvisionedThroughput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProvisionedThroughput
provisionedThroughputOverride,
            (Text
"SourceTableArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceTableArn,
            (Text
"SSESpecificationOverride" Text -> SSESpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SSESpecification -> Pair) -> Maybe SSESpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SSESpecification
sSESpecificationOverride,
            (Text
"SourceTableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceTableName,
            (Text
"LocalSecondaryIndexOverride" Text -> [LocalSecondaryIndex] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([LocalSecondaryIndex] -> Pair)
-> Maybe [LocalSecondaryIndex] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride,
            (Text
"RestoreDateTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
restoreDateTime,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"TargetTableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
targetTableName)
          ]
      )

instance Core.ToPath RestoreTableToPointInTime where
  toPath :: RestoreTableToPointInTime -> ByteString
toPath = ByteString -> RestoreTableToPointInTime -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery RestoreTableToPointInTime where
  toQuery :: RestoreTableToPointInTime -> QueryString
toQuery = QueryString -> RestoreTableToPointInTime -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newRestoreTableToPointInTimeResponse' smart constructor.
data RestoreTableToPointInTimeResponse = RestoreTableToPointInTimeResponse'
  { -- | Represents the properties of a table.
    RestoreTableToPointInTimeResponse -> Maybe TableDescription
tableDescription :: Prelude.Maybe TableDescription,
    -- | The response's http status code.
    RestoreTableToPointInTimeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RestoreTableToPointInTimeResponse
-> RestoreTableToPointInTimeResponse -> Bool
(RestoreTableToPointInTimeResponse
 -> RestoreTableToPointInTimeResponse -> Bool)
-> (RestoreTableToPointInTimeResponse
    -> RestoreTableToPointInTimeResponse -> Bool)
-> Eq RestoreTableToPointInTimeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RestoreTableToPointInTimeResponse
-> RestoreTableToPointInTimeResponse -> Bool
$c/= :: RestoreTableToPointInTimeResponse
-> RestoreTableToPointInTimeResponse -> Bool
== :: RestoreTableToPointInTimeResponse
-> RestoreTableToPointInTimeResponse -> Bool
$c== :: RestoreTableToPointInTimeResponse
-> RestoreTableToPointInTimeResponse -> Bool
Prelude.Eq, ReadPrec [RestoreTableToPointInTimeResponse]
ReadPrec RestoreTableToPointInTimeResponse
Int -> ReadS RestoreTableToPointInTimeResponse
ReadS [RestoreTableToPointInTimeResponse]
(Int -> ReadS RestoreTableToPointInTimeResponse)
-> ReadS [RestoreTableToPointInTimeResponse]
-> ReadPrec RestoreTableToPointInTimeResponse
-> ReadPrec [RestoreTableToPointInTimeResponse]
-> Read RestoreTableToPointInTimeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RestoreTableToPointInTimeResponse]
$creadListPrec :: ReadPrec [RestoreTableToPointInTimeResponse]
readPrec :: ReadPrec RestoreTableToPointInTimeResponse
$creadPrec :: ReadPrec RestoreTableToPointInTimeResponse
readList :: ReadS [RestoreTableToPointInTimeResponse]
$creadList :: ReadS [RestoreTableToPointInTimeResponse]
readsPrec :: Int -> ReadS RestoreTableToPointInTimeResponse
$creadsPrec :: Int -> ReadS RestoreTableToPointInTimeResponse
Prelude.Read, Int -> RestoreTableToPointInTimeResponse -> ShowS
[RestoreTableToPointInTimeResponse] -> ShowS
RestoreTableToPointInTimeResponse -> String
(Int -> RestoreTableToPointInTimeResponse -> ShowS)
-> (RestoreTableToPointInTimeResponse -> String)
-> ([RestoreTableToPointInTimeResponse] -> ShowS)
-> Show RestoreTableToPointInTimeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RestoreTableToPointInTimeResponse] -> ShowS
$cshowList :: [RestoreTableToPointInTimeResponse] -> ShowS
show :: RestoreTableToPointInTimeResponse -> String
$cshow :: RestoreTableToPointInTimeResponse -> String
showsPrec :: Int -> RestoreTableToPointInTimeResponse -> ShowS
$cshowsPrec :: Int -> RestoreTableToPointInTimeResponse -> ShowS
Prelude.Show, (forall x.
 RestoreTableToPointInTimeResponse
 -> Rep RestoreTableToPointInTimeResponse x)
-> (forall x.
    Rep RestoreTableToPointInTimeResponse x
    -> RestoreTableToPointInTimeResponse)
-> Generic RestoreTableToPointInTimeResponse
forall x.
Rep RestoreTableToPointInTimeResponse x
-> RestoreTableToPointInTimeResponse
forall x.
RestoreTableToPointInTimeResponse
-> Rep RestoreTableToPointInTimeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RestoreTableToPointInTimeResponse x
-> RestoreTableToPointInTimeResponse
$cfrom :: forall x.
RestoreTableToPointInTimeResponse
-> Rep RestoreTableToPointInTimeResponse x
Prelude.Generic)

-- |
-- Create a value of 'RestoreTableToPointInTimeResponse' 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:
--
-- 'tableDescription', 'restoreTableToPointInTimeResponse_tableDescription' - Represents the properties of a table.
--
-- 'httpStatus', 'restoreTableToPointInTimeResponse_httpStatus' - The response's http status code.
newRestoreTableToPointInTimeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RestoreTableToPointInTimeResponse
newRestoreTableToPointInTimeResponse :: Int -> RestoreTableToPointInTimeResponse
newRestoreTableToPointInTimeResponse Int
pHttpStatus_ =
  RestoreTableToPointInTimeResponse' :: Maybe TableDescription -> Int -> RestoreTableToPointInTimeResponse
RestoreTableToPointInTimeResponse'
    { $sel:tableDescription:RestoreTableToPointInTimeResponse' :: Maybe TableDescription
tableDescription =
        Maybe TableDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RestoreTableToPointInTimeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Represents the properties of a table.
restoreTableToPointInTimeResponse_tableDescription :: Lens.Lens' RestoreTableToPointInTimeResponse (Prelude.Maybe TableDescription)
restoreTableToPointInTimeResponse_tableDescription :: (Maybe TableDescription -> f (Maybe TableDescription))
-> RestoreTableToPointInTimeResponse
-> f RestoreTableToPointInTimeResponse
restoreTableToPointInTimeResponse_tableDescription = (RestoreTableToPointInTimeResponse -> Maybe TableDescription)
-> (RestoreTableToPointInTimeResponse
    -> Maybe TableDescription -> RestoreTableToPointInTimeResponse)
-> Lens
     RestoreTableToPointInTimeResponse
     RestoreTableToPointInTimeResponse
     (Maybe TableDescription)
     (Maybe TableDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTimeResponse' {Maybe TableDescription
tableDescription :: Maybe TableDescription
$sel:tableDescription:RestoreTableToPointInTimeResponse' :: RestoreTableToPointInTimeResponse -> Maybe TableDescription
tableDescription} -> Maybe TableDescription
tableDescription) (\s :: RestoreTableToPointInTimeResponse
s@RestoreTableToPointInTimeResponse' {} Maybe TableDescription
a -> RestoreTableToPointInTimeResponse
s {$sel:tableDescription:RestoreTableToPointInTimeResponse' :: Maybe TableDescription
tableDescription = Maybe TableDescription
a} :: RestoreTableToPointInTimeResponse)

-- | The response's http status code.
restoreTableToPointInTimeResponse_httpStatus :: Lens.Lens' RestoreTableToPointInTimeResponse Prelude.Int
restoreTableToPointInTimeResponse_httpStatus :: (Int -> f Int)
-> RestoreTableToPointInTimeResponse
-> f RestoreTableToPointInTimeResponse
restoreTableToPointInTimeResponse_httpStatus = (RestoreTableToPointInTimeResponse -> Int)
-> (RestoreTableToPointInTimeResponse
    -> Int -> RestoreTableToPointInTimeResponse)
-> Lens
     RestoreTableToPointInTimeResponse
     RestoreTableToPointInTimeResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableToPointInTimeResponse' {Int
httpStatus :: Int
$sel:httpStatus:RestoreTableToPointInTimeResponse' :: RestoreTableToPointInTimeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RestoreTableToPointInTimeResponse
s@RestoreTableToPointInTimeResponse' {} Int
a -> RestoreTableToPointInTimeResponse
s {$sel:httpStatus:RestoreTableToPointInTimeResponse' :: Int
httpStatus = Int
a} :: RestoreTableToPointInTimeResponse)

instance
  Prelude.NFData
    RestoreTableToPointInTimeResponse