{-# 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 #-}
module Amazonka.DynamoDB.RestoreTableToPointInTime
(
RestoreTableToPointInTime (..),
newRestoreTableToPointInTime,
restoreTableToPointInTime_billingModeOverride,
restoreTableToPointInTime_useLatestRestorableTime,
restoreTableToPointInTime_globalSecondaryIndexOverride,
restoreTableToPointInTime_provisionedThroughputOverride,
restoreTableToPointInTime_sourceTableArn,
restoreTableToPointInTime_sSESpecificationOverride,
restoreTableToPointInTime_sourceTableName,
restoreTableToPointInTime_localSecondaryIndexOverride,
restoreTableToPointInTime_restoreDateTime,
restoreTableToPointInTime_targetTableName,
RestoreTableToPointInTimeResponse (..),
newRestoreTableToPointInTimeResponse,
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
data RestoreTableToPointInTime = RestoreTableToPointInTime'
{
RestoreTableToPointInTime -> Maybe BillingMode
billingModeOverride :: Prelude.Maybe BillingMode,
RestoreTableToPointInTime -> Maybe Bool
useLatestRestorableTime :: Prelude.Maybe Prelude.Bool,
RestoreTableToPointInTime -> Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride :: Prelude.Maybe [GlobalSecondaryIndex],
RestoreTableToPointInTime -> Maybe ProvisionedThroughput
provisionedThroughputOverride :: Prelude.Maybe ProvisionedThroughput,
RestoreTableToPointInTime -> Maybe Text
sourceTableArn :: Prelude.Maybe Prelude.Text,
RestoreTableToPointInTime -> Maybe SSESpecification
sSESpecificationOverride :: Prelude.Maybe SSESpecification,
RestoreTableToPointInTime -> Maybe Text
sourceTableName :: Prelude.Maybe Prelude.Text,
RestoreTableToPointInTime -> Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride :: Prelude.Maybe [LocalSecondaryIndex],
RestoreTableToPointInTime -> Maybe POSIX
restoreDateTime :: Prelude.Maybe Core.POSIX,
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)
newRestoreTableToPointInTime ::
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_
}
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)
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)
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
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)
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)
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)
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)
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
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
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
data RestoreTableToPointInTimeResponse = RestoreTableToPointInTimeResponse'
{
RestoreTableToPointInTimeResponse -> Maybe TableDescription
tableDescription :: Prelude.Maybe TableDescription,
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)
newRestoreTableToPointInTimeResponse ::
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_
}
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)
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