{-# 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.RestoreTableFromBackup
(
RestoreTableFromBackup (..),
newRestoreTableFromBackup,
restoreTableFromBackup_billingModeOverride,
restoreTableFromBackup_globalSecondaryIndexOverride,
restoreTableFromBackup_provisionedThroughputOverride,
restoreTableFromBackup_sSESpecificationOverride,
restoreTableFromBackup_localSecondaryIndexOverride,
restoreTableFromBackup_targetTableName,
restoreTableFromBackup_backupArn,
RestoreTableFromBackupResponse (..),
newRestoreTableFromBackupResponse,
restoreTableFromBackupResponse_tableDescription,
restoreTableFromBackupResponse_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 RestoreTableFromBackup = RestoreTableFromBackup'
{
RestoreTableFromBackup -> Maybe BillingMode
billingModeOverride :: Prelude.Maybe BillingMode,
RestoreTableFromBackup -> Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride :: Prelude.Maybe [GlobalSecondaryIndex],
RestoreTableFromBackup -> Maybe ProvisionedThroughput
provisionedThroughputOverride :: Prelude.Maybe ProvisionedThroughput,
RestoreTableFromBackup -> Maybe SSESpecification
sSESpecificationOverride :: Prelude.Maybe SSESpecification,
RestoreTableFromBackup -> Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride :: Prelude.Maybe [LocalSecondaryIndex],
RestoreTableFromBackup -> Text
targetTableName :: Prelude.Text,
RestoreTableFromBackup -> Text
backupArn :: Prelude.Text
}
deriving (RestoreTableFromBackup -> RestoreTableFromBackup -> Bool
(RestoreTableFromBackup -> RestoreTableFromBackup -> Bool)
-> (RestoreTableFromBackup -> RestoreTableFromBackup -> Bool)
-> Eq RestoreTableFromBackup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RestoreTableFromBackup -> RestoreTableFromBackup -> Bool
$c/= :: RestoreTableFromBackup -> RestoreTableFromBackup -> Bool
== :: RestoreTableFromBackup -> RestoreTableFromBackup -> Bool
$c== :: RestoreTableFromBackup -> RestoreTableFromBackup -> Bool
Prelude.Eq, ReadPrec [RestoreTableFromBackup]
ReadPrec RestoreTableFromBackup
Int -> ReadS RestoreTableFromBackup
ReadS [RestoreTableFromBackup]
(Int -> ReadS RestoreTableFromBackup)
-> ReadS [RestoreTableFromBackup]
-> ReadPrec RestoreTableFromBackup
-> ReadPrec [RestoreTableFromBackup]
-> Read RestoreTableFromBackup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RestoreTableFromBackup]
$creadListPrec :: ReadPrec [RestoreTableFromBackup]
readPrec :: ReadPrec RestoreTableFromBackup
$creadPrec :: ReadPrec RestoreTableFromBackup
readList :: ReadS [RestoreTableFromBackup]
$creadList :: ReadS [RestoreTableFromBackup]
readsPrec :: Int -> ReadS RestoreTableFromBackup
$creadsPrec :: Int -> ReadS RestoreTableFromBackup
Prelude.Read, Int -> RestoreTableFromBackup -> ShowS
[RestoreTableFromBackup] -> ShowS
RestoreTableFromBackup -> String
(Int -> RestoreTableFromBackup -> ShowS)
-> (RestoreTableFromBackup -> String)
-> ([RestoreTableFromBackup] -> ShowS)
-> Show RestoreTableFromBackup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RestoreTableFromBackup] -> ShowS
$cshowList :: [RestoreTableFromBackup] -> ShowS
show :: RestoreTableFromBackup -> String
$cshow :: RestoreTableFromBackup -> String
showsPrec :: Int -> RestoreTableFromBackup -> ShowS
$cshowsPrec :: Int -> RestoreTableFromBackup -> ShowS
Prelude.Show, (forall x. RestoreTableFromBackup -> Rep RestoreTableFromBackup x)
-> (forall x.
Rep RestoreTableFromBackup x -> RestoreTableFromBackup)
-> Generic RestoreTableFromBackup
forall x. Rep RestoreTableFromBackup x -> RestoreTableFromBackup
forall x. RestoreTableFromBackup -> Rep RestoreTableFromBackup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RestoreTableFromBackup x -> RestoreTableFromBackup
$cfrom :: forall x. RestoreTableFromBackup -> Rep RestoreTableFromBackup x
Prelude.Generic)
newRestoreTableFromBackup ::
Prelude.Text ->
Prelude.Text ->
RestoreTableFromBackup
newRestoreTableFromBackup :: Text -> Text -> RestoreTableFromBackup
newRestoreTableFromBackup
Text
pTargetTableName_
Text
pBackupArn_ =
RestoreTableFromBackup' :: Maybe BillingMode
-> Maybe [GlobalSecondaryIndex]
-> Maybe ProvisionedThroughput
-> Maybe SSESpecification
-> Maybe [LocalSecondaryIndex]
-> Text
-> Text
-> RestoreTableFromBackup
RestoreTableFromBackup'
{ $sel:billingModeOverride:RestoreTableFromBackup' :: Maybe BillingMode
billingModeOverride =
Maybe BillingMode
forall a. Maybe a
Prelude.Nothing,
$sel:globalSecondaryIndexOverride:RestoreTableFromBackup' :: Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride = Maybe [GlobalSecondaryIndex]
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedThroughputOverride:RestoreTableFromBackup' :: Maybe ProvisionedThroughput
provisionedThroughputOverride = Maybe ProvisionedThroughput
forall a. Maybe a
Prelude.Nothing,
$sel:sSESpecificationOverride:RestoreTableFromBackup' :: Maybe SSESpecification
sSESpecificationOverride = Maybe SSESpecification
forall a. Maybe a
Prelude.Nothing,
$sel:localSecondaryIndexOverride:RestoreTableFromBackup' :: Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride = Maybe [LocalSecondaryIndex]
forall a. Maybe a
Prelude.Nothing,
$sel:targetTableName:RestoreTableFromBackup' :: Text
targetTableName = Text
pTargetTableName_,
$sel:backupArn:RestoreTableFromBackup' :: Text
backupArn = Text
pBackupArn_
}
restoreTableFromBackup_billingModeOverride :: Lens.Lens' RestoreTableFromBackup (Prelude.Maybe BillingMode)
restoreTableFromBackup_billingModeOverride :: (Maybe BillingMode -> f (Maybe BillingMode))
-> RestoreTableFromBackup -> f RestoreTableFromBackup
restoreTableFromBackup_billingModeOverride = (RestoreTableFromBackup -> Maybe BillingMode)
-> (RestoreTableFromBackup
-> Maybe BillingMode -> RestoreTableFromBackup)
-> Lens
RestoreTableFromBackup
RestoreTableFromBackup
(Maybe BillingMode)
(Maybe BillingMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromBackup' {Maybe BillingMode
billingModeOverride :: Maybe BillingMode
$sel:billingModeOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> Maybe BillingMode
billingModeOverride} -> Maybe BillingMode
billingModeOverride) (\s :: RestoreTableFromBackup
s@RestoreTableFromBackup' {} Maybe BillingMode
a -> RestoreTableFromBackup
s {$sel:billingModeOverride:RestoreTableFromBackup' :: Maybe BillingMode
billingModeOverride = Maybe BillingMode
a} :: RestoreTableFromBackup)
restoreTableFromBackup_globalSecondaryIndexOverride :: Lens.Lens' RestoreTableFromBackup (Prelude.Maybe [GlobalSecondaryIndex])
restoreTableFromBackup_globalSecondaryIndexOverride :: (Maybe [GlobalSecondaryIndex] -> f (Maybe [GlobalSecondaryIndex]))
-> RestoreTableFromBackup -> f RestoreTableFromBackup
restoreTableFromBackup_globalSecondaryIndexOverride = (RestoreTableFromBackup -> Maybe [GlobalSecondaryIndex])
-> (RestoreTableFromBackup
-> Maybe [GlobalSecondaryIndex] -> RestoreTableFromBackup)
-> Lens
RestoreTableFromBackup
RestoreTableFromBackup
(Maybe [GlobalSecondaryIndex])
(Maybe [GlobalSecondaryIndex])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromBackup' {Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride :: Maybe [GlobalSecondaryIndex]
$sel:globalSecondaryIndexOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride} -> Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride) (\s :: RestoreTableFromBackup
s@RestoreTableFromBackup' {} Maybe [GlobalSecondaryIndex]
a -> RestoreTableFromBackup
s {$sel:globalSecondaryIndexOverride:RestoreTableFromBackup' :: Maybe [GlobalSecondaryIndex]
globalSecondaryIndexOverride = Maybe [GlobalSecondaryIndex]
a} :: RestoreTableFromBackup) ((Maybe [GlobalSecondaryIndex] -> f (Maybe [GlobalSecondaryIndex]))
-> RestoreTableFromBackup -> f RestoreTableFromBackup)
-> ((Maybe [GlobalSecondaryIndex]
-> f (Maybe [GlobalSecondaryIndex]))
-> Maybe [GlobalSecondaryIndex]
-> f (Maybe [GlobalSecondaryIndex]))
-> (Maybe [GlobalSecondaryIndex]
-> f (Maybe [GlobalSecondaryIndex]))
-> RestoreTableFromBackup
-> f RestoreTableFromBackup
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
restoreTableFromBackup_provisionedThroughputOverride :: Lens.Lens' RestoreTableFromBackup (Prelude.Maybe ProvisionedThroughput)
restoreTableFromBackup_provisionedThroughputOverride :: (Maybe ProvisionedThroughput -> f (Maybe ProvisionedThroughput))
-> RestoreTableFromBackup -> f RestoreTableFromBackup
restoreTableFromBackup_provisionedThroughputOverride = (RestoreTableFromBackup -> Maybe ProvisionedThroughput)
-> (RestoreTableFromBackup
-> Maybe ProvisionedThroughput -> RestoreTableFromBackup)
-> Lens
RestoreTableFromBackup
RestoreTableFromBackup
(Maybe ProvisionedThroughput)
(Maybe ProvisionedThroughput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromBackup' {Maybe ProvisionedThroughput
provisionedThroughputOverride :: Maybe ProvisionedThroughput
$sel:provisionedThroughputOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> Maybe ProvisionedThroughput
provisionedThroughputOverride} -> Maybe ProvisionedThroughput
provisionedThroughputOverride) (\s :: RestoreTableFromBackup
s@RestoreTableFromBackup' {} Maybe ProvisionedThroughput
a -> RestoreTableFromBackup
s {$sel:provisionedThroughputOverride:RestoreTableFromBackup' :: Maybe ProvisionedThroughput
provisionedThroughputOverride = Maybe ProvisionedThroughput
a} :: RestoreTableFromBackup)
restoreTableFromBackup_sSESpecificationOverride :: Lens.Lens' RestoreTableFromBackup (Prelude.Maybe SSESpecification)
restoreTableFromBackup_sSESpecificationOverride :: (Maybe SSESpecification -> f (Maybe SSESpecification))
-> RestoreTableFromBackup -> f RestoreTableFromBackup
restoreTableFromBackup_sSESpecificationOverride = (RestoreTableFromBackup -> Maybe SSESpecification)
-> (RestoreTableFromBackup
-> Maybe SSESpecification -> RestoreTableFromBackup)
-> Lens
RestoreTableFromBackup
RestoreTableFromBackup
(Maybe SSESpecification)
(Maybe SSESpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromBackup' {Maybe SSESpecification
sSESpecificationOverride :: Maybe SSESpecification
$sel:sSESpecificationOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> Maybe SSESpecification
sSESpecificationOverride} -> Maybe SSESpecification
sSESpecificationOverride) (\s :: RestoreTableFromBackup
s@RestoreTableFromBackup' {} Maybe SSESpecification
a -> RestoreTableFromBackup
s {$sel:sSESpecificationOverride:RestoreTableFromBackup' :: Maybe SSESpecification
sSESpecificationOverride = Maybe SSESpecification
a} :: RestoreTableFromBackup)
restoreTableFromBackup_localSecondaryIndexOverride :: Lens.Lens' RestoreTableFromBackup (Prelude.Maybe [LocalSecondaryIndex])
restoreTableFromBackup_localSecondaryIndexOverride :: (Maybe [LocalSecondaryIndex] -> f (Maybe [LocalSecondaryIndex]))
-> RestoreTableFromBackup -> f RestoreTableFromBackup
restoreTableFromBackup_localSecondaryIndexOverride = (RestoreTableFromBackup -> Maybe [LocalSecondaryIndex])
-> (RestoreTableFromBackup
-> Maybe [LocalSecondaryIndex] -> RestoreTableFromBackup)
-> Lens
RestoreTableFromBackup
RestoreTableFromBackup
(Maybe [LocalSecondaryIndex])
(Maybe [LocalSecondaryIndex])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromBackup' {Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride :: Maybe [LocalSecondaryIndex]
$sel:localSecondaryIndexOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride} -> Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride) (\s :: RestoreTableFromBackup
s@RestoreTableFromBackup' {} Maybe [LocalSecondaryIndex]
a -> RestoreTableFromBackup
s {$sel:localSecondaryIndexOverride:RestoreTableFromBackup' :: Maybe [LocalSecondaryIndex]
localSecondaryIndexOverride = Maybe [LocalSecondaryIndex]
a} :: RestoreTableFromBackup) ((Maybe [LocalSecondaryIndex] -> f (Maybe [LocalSecondaryIndex]))
-> RestoreTableFromBackup -> f RestoreTableFromBackup)
-> ((Maybe [LocalSecondaryIndex]
-> f (Maybe [LocalSecondaryIndex]))
-> Maybe [LocalSecondaryIndex] -> f (Maybe [LocalSecondaryIndex]))
-> (Maybe [LocalSecondaryIndex] -> f (Maybe [LocalSecondaryIndex]))
-> RestoreTableFromBackup
-> f RestoreTableFromBackup
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
restoreTableFromBackup_targetTableName :: Lens.Lens' RestoreTableFromBackup Prelude.Text
restoreTableFromBackup_targetTableName :: (Text -> f Text)
-> RestoreTableFromBackup -> f RestoreTableFromBackup
restoreTableFromBackup_targetTableName = (RestoreTableFromBackup -> Text)
-> (RestoreTableFromBackup -> Text -> RestoreTableFromBackup)
-> Lens RestoreTableFromBackup RestoreTableFromBackup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromBackup' {Text
targetTableName :: Text
$sel:targetTableName:RestoreTableFromBackup' :: RestoreTableFromBackup -> Text
targetTableName} -> Text
targetTableName) (\s :: RestoreTableFromBackup
s@RestoreTableFromBackup' {} Text
a -> RestoreTableFromBackup
s {$sel:targetTableName:RestoreTableFromBackup' :: Text
targetTableName = Text
a} :: RestoreTableFromBackup)
restoreTableFromBackup_backupArn :: Lens.Lens' RestoreTableFromBackup Prelude.Text
restoreTableFromBackup_backupArn :: (Text -> f Text)
-> RestoreTableFromBackup -> f RestoreTableFromBackup
restoreTableFromBackup_backupArn = (RestoreTableFromBackup -> Text)
-> (RestoreTableFromBackup -> Text -> RestoreTableFromBackup)
-> Lens RestoreTableFromBackup RestoreTableFromBackup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromBackup' {Text
backupArn :: Text
$sel:backupArn:RestoreTableFromBackup' :: RestoreTableFromBackup -> Text
backupArn} -> Text
backupArn) (\s :: RestoreTableFromBackup
s@RestoreTableFromBackup' {} Text
a -> RestoreTableFromBackup
s {$sel:backupArn:RestoreTableFromBackup' :: Text
backupArn = Text
a} :: RestoreTableFromBackup)
instance Core.AWSRequest RestoreTableFromBackup where
type
AWSResponse RestoreTableFromBackup =
RestoreTableFromBackupResponse
request :: RestoreTableFromBackup -> Request RestoreTableFromBackup
request = Service -> RestoreTableFromBackup -> Request RestoreTableFromBackup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RestoreTableFromBackup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RestoreTableFromBackup)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse RestoreTableFromBackup))
-> Logger
-> Service
-> Proxy RestoreTableFromBackup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RestoreTableFromBackup)))
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 -> RestoreTableFromBackupResponse
RestoreTableFromBackupResponse'
(Maybe TableDescription -> Int -> RestoreTableFromBackupResponse)
-> Either String (Maybe TableDescription)
-> Either String (Int -> RestoreTableFromBackupResponse)
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 -> RestoreTableFromBackupResponse)
-> Either String Int
-> Either String RestoreTableFromBackupResponse
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 RestoreTableFromBackup
instance Prelude.NFData RestoreTableFromBackup
instance Core.ToHeaders RestoreTableFromBackup where
toHeaders :: RestoreTableFromBackup -> ResponseHeaders
toHeaders =
ResponseHeaders -> RestoreTableFromBackup -> 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.RestoreTableFromBackup" ::
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 RestoreTableFromBackup where
toJSON :: RestoreTableFromBackup -> Value
toJSON RestoreTableFromBackup' {Maybe [LocalSecondaryIndex]
Maybe [GlobalSecondaryIndex]
Maybe BillingMode
Maybe ProvisionedThroughput
Maybe SSESpecification
Text
backupArn :: Text
targetTableName :: Text
localSecondaryIndexOverride :: Maybe [LocalSecondaryIndex]
sSESpecificationOverride :: Maybe SSESpecification
provisionedThroughputOverride :: Maybe ProvisionedThroughput
globalSecondaryIndexOverride :: Maybe [GlobalSecondaryIndex]
billingModeOverride :: Maybe BillingMode
$sel:backupArn:RestoreTableFromBackup' :: RestoreTableFromBackup -> Text
$sel:targetTableName:RestoreTableFromBackup' :: RestoreTableFromBackup -> Text
$sel:localSecondaryIndexOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> Maybe [LocalSecondaryIndex]
$sel:sSESpecificationOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> Maybe SSESpecification
$sel:provisionedThroughputOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> Maybe ProvisionedThroughput
$sel:globalSecondaryIndexOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> Maybe [GlobalSecondaryIndex]
$sel:billingModeOverride:RestoreTableFromBackup' :: RestoreTableFromBackup -> 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
"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
"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
"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,
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),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"BackupArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
backupArn)
]
)
instance Core.ToPath RestoreTableFromBackup where
toPath :: RestoreTableFromBackup -> ByteString
toPath = ByteString -> RestoreTableFromBackup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RestoreTableFromBackup where
toQuery :: RestoreTableFromBackup -> QueryString
toQuery = QueryString -> RestoreTableFromBackup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RestoreTableFromBackupResponse = RestoreTableFromBackupResponse'
{
RestoreTableFromBackupResponse -> Maybe TableDescription
tableDescription :: Prelude.Maybe TableDescription,
RestoreTableFromBackupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RestoreTableFromBackupResponse
-> RestoreTableFromBackupResponse -> Bool
(RestoreTableFromBackupResponse
-> RestoreTableFromBackupResponse -> Bool)
-> (RestoreTableFromBackupResponse
-> RestoreTableFromBackupResponse -> Bool)
-> Eq RestoreTableFromBackupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RestoreTableFromBackupResponse
-> RestoreTableFromBackupResponse -> Bool
$c/= :: RestoreTableFromBackupResponse
-> RestoreTableFromBackupResponse -> Bool
== :: RestoreTableFromBackupResponse
-> RestoreTableFromBackupResponse -> Bool
$c== :: RestoreTableFromBackupResponse
-> RestoreTableFromBackupResponse -> Bool
Prelude.Eq, ReadPrec [RestoreTableFromBackupResponse]
ReadPrec RestoreTableFromBackupResponse
Int -> ReadS RestoreTableFromBackupResponse
ReadS [RestoreTableFromBackupResponse]
(Int -> ReadS RestoreTableFromBackupResponse)
-> ReadS [RestoreTableFromBackupResponse]
-> ReadPrec RestoreTableFromBackupResponse
-> ReadPrec [RestoreTableFromBackupResponse]
-> Read RestoreTableFromBackupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RestoreTableFromBackupResponse]
$creadListPrec :: ReadPrec [RestoreTableFromBackupResponse]
readPrec :: ReadPrec RestoreTableFromBackupResponse
$creadPrec :: ReadPrec RestoreTableFromBackupResponse
readList :: ReadS [RestoreTableFromBackupResponse]
$creadList :: ReadS [RestoreTableFromBackupResponse]
readsPrec :: Int -> ReadS RestoreTableFromBackupResponse
$creadsPrec :: Int -> ReadS RestoreTableFromBackupResponse
Prelude.Read, Int -> RestoreTableFromBackupResponse -> ShowS
[RestoreTableFromBackupResponse] -> ShowS
RestoreTableFromBackupResponse -> String
(Int -> RestoreTableFromBackupResponse -> ShowS)
-> (RestoreTableFromBackupResponse -> String)
-> ([RestoreTableFromBackupResponse] -> ShowS)
-> Show RestoreTableFromBackupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RestoreTableFromBackupResponse] -> ShowS
$cshowList :: [RestoreTableFromBackupResponse] -> ShowS
show :: RestoreTableFromBackupResponse -> String
$cshow :: RestoreTableFromBackupResponse -> String
showsPrec :: Int -> RestoreTableFromBackupResponse -> ShowS
$cshowsPrec :: Int -> RestoreTableFromBackupResponse -> ShowS
Prelude.Show, (forall x.
RestoreTableFromBackupResponse
-> Rep RestoreTableFromBackupResponse x)
-> (forall x.
Rep RestoreTableFromBackupResponse x
-> RestoreTableFromBackupResponse)
-> Generic RestoreTableFromBackupResponse
forall x.
Rep RestoreTableFromBackupResponse x
-> RestoreTableFromBackupResponse
forall x.
RestoreTableFromBackupResponse
-> Rep RestoreTableFromBackupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RestoreTableFromBackupResponse x
-> RestoreTableFromBackupResponse
$cfrom :: forall x.
RestoreTableFromBackupResponse
-> Rep RestoreTableFromBackupResponse x
Prelude.Generic)
newRestoreTableFromBackupResponse ::
Prelude.Int ->
RestoreTableFromBackupResponse
newRestoreTableFromBackupResponse :: Int -> RestoreTableFromBackupResponse
newRestoreTableFromBackupResponse Int
pHttpStatus_ =
RestoreTableFromBackupResponse' :: Maybe TableDescription -> Int -> RestoreTableFromBackupResponse
RestoreTableFromBackupResponse'
{ $sel:tableDescription:RestoreTableFromBackupResponse' :: Maybe TableDescription
tableDescription =
Maybe TableDescription
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RestoreTableFromBackupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
restoreTableFromBackupResponse_tableDescription :: Lens.Lens' RestoreTableFromBackupResponse (Prelude.Maybe TableDescription)
restoreTableFromBackupResponse_tableDescription :: (Maybe TableDescription -> f (Maybe TableDescription))
-> RestoreTableFromBackupResponse
-> f RestoreTableFromBackupResponse
restoreTableFromBackupResponse_tableDescription = (RestoreTableFromBackupResponse -> Maybe TableDescription)
-> (RestoreTableFromBackupResponse
-> Maybe TableDescription -> RestoreTableFromBackupResponse)
-> Lens
RestoreTableFromBackupResponse
RestoreTableFromBackupResponse
(Maybe TableDescription)
(Maybe TableDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromBackupResponse' {Maybe TableDescription
tableDescription :: Maybe TableDescription
$sel:tableDescription:RestoreTableFromBackupResponse' :: RestoreTableFromBackupResponse -> Maybe TableDescription
tableDescription} -> Maybe TableDescription
tableDescription) (\s :: RestoreTableFromBackupResponse
s@RestoreTableFromBackupResponse' {} Maybe TableDescription
a -> RestoreTableFromBackupResponse
s {$sel:tableDescription:RestoreTableFromBackupResponse' :: Maybe TableDescription
tableDescription = Maybe TableDescription
a} :: RestoreTableFromBackupResponse)
restoreTableFromBackupResponse_httpStatus :: Lens.Lens' RestoreTableFromBackupResponse Prelude.Int
restoreTableFromBackupResponse_httpStatus :: (Int -> f Int)
-> RestoreTableFromBackupResponse
-> f RestoreTableFromBackupResponse
restoreTableFromBackupResponse_httpStatus = (RestoreTableFromBackupResponse -> Int)
-> (RestoreTableFromBackupResponse
-> Int -> RestoreTableFromBackupResponse)
-> Lens
RestoreTableFromBackupResponse
RestoreTableFromBackupResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromBackupResponse' {Int
httpStatus :: Int
$sel:httpStatus:RestoreTableFromBackupResponse' :: RestoreTableFromBackupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RestoreTableFromBackupResponse
s@RestoreTableFromBackupResponse' {} Int
a -> RestoreTableFromBackupResponse
s {$sel:httpStatus:RestoreTableFromBackupResponse' :: Int
httpStatus = Int
a} :: RestoreTableFromBackupResponse)
instance
Prelude.NFData
RestoreTableFromBackupResponse