{-# 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.Redshift.RestoreTableFromClusterSnapshot
(
RestoreTableFromClusterSnapshot (..),
newRestoreTableFromClusterSnapshot,
restoreTableFromClusterSnapshot_targetSchemaName,
restoreTableFromClusterSnapshot_enableCaseSensitiveIdentifier,
restoreTableFromClusterSnapshot_targetDatabaseName,
restoreTableFromClusterSnapshot_sourceSchemaName,
restoreTableFromClusterSnapshot_clusterIdentifier,
restoreTableFromClusterSnapshot_snapshotIdentifier,
restoreTableFromClusterSnapshot_sourceDatabaseName,
restoreTableFromClusterSnapshot_sourceTableName,
restoreTableFromClusterSnapshot_newTableName,
RestoreTableFromClusterSnapshotResponse (..),
newRestoreTableFromClusterSnapshotResponse,
restoreTableFromClusterSnapshotResponse_tableRestoreStatus,
restoreTableFromClusterSnapshotResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RestoreTableFromClusterSnapshot = RestoreTableFromClusterSnapshot'
{
RestoreTableFromClusterSnapshot -> Maybe Text
targetSchemaName :: Prelude.Maybe Prelude.Text,
RestoreTableFromClusterSnapshot -> Maybe Bool
enableCaseSensitiveIdentifier :: Prelude.Maybe Prelude.Bool,
RestoreTableFromClusterSnapshot -> Maybe Text
targetDatabaseName :: Prelude.Maybe Prelude.Text,
RestoreTableFromClusterSnapshot -> Maybe Text
sourceSchemaName :: Prelude.Maybe Prelude.Text,
RestoreTableFromClusterSnapshot -> Text
clusterIdentifier :: Prelude.Text,
RestoreTableFromClusterSnapshot -> Text
snapshotIdentifier :: Prelude.Text,
RestoreTableFromClusterSnapshot -> Text
sourceDatabaseName :: Prelude.Text,
RestoreTableFromClusterSnapshot -> Text
sourceTableName :: Prelude.Text,
RestoreTableFromClusterSnapshot -> Text
newTableName' :: Prelude.Text
}
deriving (RestoreTableFromClusterSnapshot
-> RestoreTableFromClusterSnapshot -> Bool
(RestoreTableFromClusterSnapshot
-> RestoreTableFromClusterSnapshot -> Bool)
-> (RestoreTableFromClusterSnapshot
-> RestoreTableFromClusterSnapshot -> Bool)
-> Eq RestoreTableFromClusterSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RestoreTableFromClusterSnapshot
-> RestoreTableFromClusterSnapshot -> Bool
$c/= :: RestoreTableFromClusterSnapshot
-> RestoreTableFromClusterSnapshot -> Bool
== :: RestoreTableFromClusterSnapshot
-> RestoreTableFromClusterSnapshot -> Bool
$c== :: RestoreTableFromClusterSnapshot
-> RestoreTableFromClusterSnapshot -> Bool
Prelude.Eq, ReadPrec [RestoreTableFromClusterSnapshot]
ReadPrec RestoreTableFromClusterSnapshot
Int -> ReadS RestoreTableFromClusterSnapshot
ReadS [RestoreTableFromClusterSnapshot]
(Int -> ReadS RestoreTableFromClusterSnapshot)
-> ReadS [RestoreTableFromClusterSnapshot]
-> ReadPrec RestoreTableFromClusterSnapshot
-> ReadPrec [RestoreTableFromClusterSnapshot]
-> Read RestoreTableFromClusterSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RestoreTableFromClusterSnapshot]
$creadListPrec :: ReadPrec [RestoreTableFromClusterSnapshot]
readPrec :: ReadPrec RestoreTableFromClusterSnapshot
$creadPrec :: ReadPrec RestoreTableFromClusterSnapshot
readList :: ReadS [RestoreTableFromClusterSnapshot]
$creadList :: ReadS [RestoreTableFromClusterSnapshot]
readsPrec :: Int -> ReadS RestoreTableFromClusterSnapshot
$creadsPrec :: Int -> ReadS RestoreTableFromClusterSnapshot
Prelude.Read, Int -> RestoreTableFromClusterSnapshot -> ShowS
[RestoreTableFromClusterSnapshot] -> ShowS
RestoreTableFromClusterSnapshot -> String
(Int -> RestoreTableFromClusterSnapshot -> ShowS)
-> (RestoreTableFromClusterSnapshot -> String)
-> ([RestoreTableFromClusterSnapshot] -> ShowS)
-> Show RestoreTableFromClusterSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RestoreTableFromClusterSnapshot] -> ShowS
$cshowList :: [RestoreTableFromClusterSnapshot] -> ShowS
show :: RestoreTableFromClusterSnapshot -> String
$cshow :: RestoreTableFromClusterSnapshot -> String
showsPrec :: Int -> RestoreTableFromClusterSnapshot -> ShowS
$cshowsPrec :: Int -> RestoreTableFromClusterSnapshot -> ShowS
Prelude.Show, (forall x.
RestoreTableFromClusterSnapshot
-> Rep RestoreTableFromClusterSnapshot x)
-> (forall x.
Rep RestoreTableFromClusterSnapshot x
-> RestoreTableFromClusterSnapshot)
-> Generic RestoreTableFromClusterSnapshot
forall x.
Rep RestoreTableFromClusterSnapshot x
-> RestoreTableFromClusterSnapshot
forall x.
RestoreTableFromClusterSnapshot
-> Rep RestoreTableFromClusterSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RestoreTableFromClusterSnapshot x
-> RestoreTableFromClusterSnapshot
$cfrom :: forall x.
RestoreTableFromClusterSnapshot
-> Rep RestoreTableFromClusterSnapshot x
Prelude.Generic)
newRestoreTableFromClusterSnapshot ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
RestoreTableFromClusterSnapshot
newRestoreTableFromClusterSnapshot :: Text
-> Text -> Text -> Text -> Text -> RestoreTableFromClusterSnapshot
newRestoreTableFromClusterSnapshot
Text
pClusterIdentifier_
Text
pSnapshotIdentifier_
Text
pSourceDatabaseName_
Text
pSourceTableName_
Text
pNewTableName_ =
RestoreTableFromClusterSnapshot' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot'
{ $sel:targetSchemaName:RestoreTableFromClusterSnapshot' :: Maybe Text
targetSchemaName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enableCaseSensitiveIdentifier:RestoreTableFromClusterSnapshot' :: Maybe Bool
enableCaseSensitiveIdentifier =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:targetDatabaseName:RestoreTableFromClusterSnapshot' :: Maybe Text
targetDatabaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceSchemaName:RestoreTableFromClusterSnapshot' :: Maybe Text
sourceSchemaName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clusterIdentifier:RestoreTableFromClusterSnapshot' :: Text
clusterIdentifier = Text
pClusterIdentifier_,
$sel:snapshotIdentifier:RestoreTableFromClusterSnapshot' :: Text
snapshotIdentifier = Text
pSnapshotIdentifier_,
$sel:sourceDatabaseName:RestoreTableFromClusterSnapshot' :: Text
sourceDatabaseName = Text
pSourceDatabaseName_,
$sel:sourceTableName:RestoreTableFromClusterSnapshot' :: Text
sourceTableName = Text
pSourceTableName_,
$sel:newTableName':RestoreTableFromClusterSnapshot' :: Text
newTableName' = Text
pNewTableName_
}
restoreTableFromClusterSnapshot_targetSchemaName :: Lens.Lens' RestoreTableFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreTableFromClusterSnapshot_targetSchemaName :: (Maybe Text -> f (Maybe Text))
-> RestoreTableFromClusterSnapshot
-> f RestoreTableFromClusterSnapshot
restoreTableFromClusterSnapshot_targetSchemaName = (RestoreTableFromClusterSnapshot -> Maybe Text)
-> (RestoreTableFromClusterSnapshot
-> Maybe Text -> RestoreTableFromClusterSnapshot)
-> Lens
RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshot' {Maybe Text
targetSchemaName :: Maybe Text
$sel:targetSchemaName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Maybe Text
targetSchemaName} -> Maybe Text
targetSchemaName) (\s :: RestoreTableFromClusterSnapshot
s@RestoreTableFromClusterSnapshot' {} Maybe Text
a -> RestoreTableFromClusterSnapshot
s {$sel:targetSchemaName:RestoreTableFromClusterSnapshot' :: Maybe Text
targetSchemaName = Maybe Text
a} :: RestoreTableFromClusterSnapshot)
restoreTableFromClusterSnapshot_enableCaseSensitiveIdentifier :: Lens.Lens' RestoreTableFromClusterSnapshot (Prelude.Maybe Prelude.Bool)
restoreTableFromClusterSnapshot_enableCaseSensitiveIdentifier :: (Maybe Bool -> f (Maybe Bool))
-> RestoreTableFromClusterSnapshot
-> f RestoreTableFromClusterSnapshot
restoreTableFromClusterSnapshot_enableCaseSensitiveIdentifier = (RestoreTableFromClusterSnapshot -> Maybe Bool)
-> (RestoreTableFromClusterSnapshot
-> Maybe Bool -> RestoreTableFromClusterSnapshot)
-> Lens
RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshot' {Maybe Bool
enableCaseSensitiveIdentifier :: Maybe Bool
$sel:enableCaseSensitiveIdentifier:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Maybe Bool
enableCaseSensitiveIdentifier} -> Maybe Bool
enableCaseSensitiveIdentifier) (\s :: RestoreTableFromClusterSnapshot
s@RestoreTableFromClusterSnapshot' {} Maybe Bool
a -> RestoreTableFromClusterSnapshot
s {$sel:enableCaseSensitiveIdentifier:RestoreTableFromClusterSnapshot' :: Maybe Bool
enableCaseSensitiveIdentifier = Maybe Bool
a} :: RestoreTableFromClusterSnapshot)
restoreTableFromClusterSnapshot_targetDatabaseName :: Lens.Lens' RestoreTableFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreTableFromClusterSnapshot_targetDatabaseName :: (Maybe Text -> f (Maybe Text))
-> RestoreTableFromClusterSnapshot
-> f RestoreTableFromClusterSnapshot
restoreTableFromClusterSnapshot_targetDatabaseName = (RestoreTableFromClusterSnapshot -> Maybe Text)
-> (RestoreTableFromClusterSnapshot
-> Maybe Text -> RestoreTableFromClusterSnapshot)
-> Lens
RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshot' {Maybe Text
targetDatabaseName :: Maybe Text
$sel:targetDatabaseName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Maybe Text
targetDatabaseName} -> Maybe Text
targetDatabaseName) (\s :: RestoreTableFromClusterSnapshot
s@RestoreTableFromClusterSnapshot' {} Maybe Text
a -> RestoreTableFromClusterSnapshot
s {$sel:targetDatabaseName:RestoreTableFromClusterSnapshot' :: Maybe Text
targetDatabaseName = Maybe Text
a} :: RestoreTableFromClusterSnapshot)
restoreTableFromClusterSnapshot_sourceSchemaName :: Lens.Lens' RestoreTableFromClusterSnapshot (Prelude.Maybe Prelude.Text)
restoreTableFromClusterSnapshot_sourceSchemaName :: (Maybe Text -> f (Maybe Text))
-> RestoreTableFromClusterSnapshot
-> f RestoreTableFromClusterSnapshot
restoreTableFromClusterSnapshot_sourceSchemaName = (RestoreTableFromClusterSnapshot -> Maybe Text)
-> (RestoreTableFromClusterSnapshot
-> Maybe Text -> RestoreTableFromClusterSnapshot)
-> Lens
RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshot' {Maybe Text
sourceSchemaName :: Maybe Text
$sel:sourceSchemaName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Maybe Text
sourceSchemaName} -> Maybe Text
sourceSchemaName) (\s :: RestoreTableFromClusterSnapshot
s@RestoreTableFromClusterSnapshot' {} Maybe Text
a -> RestoreTableFromClusterSnapshot
s {$sel:sourceSchemaName:RestoreTableFromClusterSnapshot' :: Maybe Text
sourceSchemaName = Maybe Text
a} :: RestoreTableFromClusterSnapshot)
restoreTableFromClusterSnapshot_clusterIdentifier :: Lens.Lens' RestoreTableFromClusterSnapshot Prelude.Text
restoreTableFromClusterSnapshot_clusterIdentifier :: (Text -> f Text)
-> RestoreTableFromClusterSnapshot
-> f RestoreTableFromClusterSnapshot
restoreTableFromClusterSnapshot_clusterIdentifier = (RestoreTableFromClusterSnapshot -> Text)
-> (RestoreTableFromClusterSnapshot
-> Text -> RestoreTableFromClusterSnapshot)
-> Lens
RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshot' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: RestoreTableFromClusterSnapshot
s@RestoreTableFromClusterSnapshot' {} Text
a -> RestoreTableFromClusterSnapshot
s {$sel:clusterIdentifier:RestoreTableFromClusterSnapshot' :: Text
clusterIdentifier = Text
a} :: RestoreTableFromClusterSnapshot)
restoreTableFromClusterSnapshot_snapshotIdentifier :: Lens.Lens' RestoreTableFromClusterSnapshot Prelude.Text
restoreTableFromClusterSnapshot_snapshotIdentifier :: (Text -> f Text)
-> RestoreTableFromClusterSnapshot
-> f RestoreTableFromClusterSnapshot
restoreTableFromClusterSnapshot_snapshotIdentifier = (RestoreTableFromClusterSnapshot -> Text)
-> (RestoreTableFromClusterSnapshot
-> Text -> RestoreTableFromClusterSnapshot)
-> Lens
RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshot' {Text
snapshotIdentifier :: Text
$sel:snapshotIdentifier:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
snapshotIdentifier} -> Text
snapshotIdentifier) (\s :: RestoreTableFromClusterSnapshot
s@RestoreTableFromClusterSnapshot' {} Text
a -> RestoreTableFromClusterSnapshot
s {$sel:snapshotIdentifier:RestoreTableFromClusterSnapshot' :: Text
snapshotIdentifier = Text
a} :: RestoreTableFromClusterSnapshot)
restoreTableFromClusterSnapshot_sourceDatabaseName :: Lens.Lens' RestoreTableFromClusterSnapshot Prelude.Text
restoreTableFromClusterSnapshot_sourceDatabaseName :: (Text -> f Text)
-> RestoreTableFromClusterSnapshot
-> f RestoreTableFromClusterSnapshot
restoreTableFromClusterSnapshot_sourceDatabaseName = (RestoreTableFromClusterSnapshot -> Text)
-> (RestoreTableFromClusterSnapshot
-> Text -> RestoreTableFromClusterSnapshot)
-> Lens
RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshot' {Text
sourceDatabaseName :: Text
$sel:sourceDatabaseName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
sourceDatabaseName} -> Text
sourceDatabaseName) (\s :: RestoreTableFromClusterSnapshot
s@RestoreTableFromClusterSnapshot' {} Text
a -> RestoreTableFromClusterSnapshot
s {$sel:sourceDatabaseName:RestoreTableFromClusterSnapshot' :: Text
sourceDatabaseName = Text
a} :: RestoreTableFromClusterSnapshot)
restoreTableFromClusterSnapshot_sourceTableName :: Lens.Lens' RestoreTableFromClusterSnapshot Prelude.Text
restoreTableFromClusterSnapshot_sourceTableName :: (Text -> f Text)
-> RestoreTableFromClusterSnapshot
-> f RestoreTableFromClusterSnapshot
restoreTableFromClusterSnapshot_sourceTableName = (RestoreTableFromClusterSnapshot -> Text)
-> (RestoreTableFromClusterSnapshot
-> Text -> RestoreTableFromClusterSnapshot)
-> Lens
RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshot' {Text
sourceTableName :: Text
$sel:sourceTableName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
sourceTableName} -> Text
sourceTableName) (\s :: RestoreTableFromClusterSnapshot
s@RestoreTableFromClusterSnapshot' {} Text
a -> RestoreTableFromClusterSnapshot
s {$sel:sourceTableName:RestoreTableFromClusterSnapshot' :: Text
sourceTableName = Text
a} :: RestoreTableFromClusterSnapshot)
restoreTableFromClusterSnapshot_newTableName :: Lens.Lens' RestoreTableFromClusterSnapshot Prelude.Text
restoreTableFromClusterSnapshot_newTableName :: (Text -> f Text)
-> RestoreTableFromClusterSnapshot
-> f RestoreTableFromClusterSnapshot
restoreTableFromClusterSnapshot_newTableName = (RestoreTableFromClusterSnapshot -> Text)
-> (RestoreTableFromClusterSnapshot
-> Text -> RestoreTableFromClusterSnapshot)
-> Lens
RestoreTableFromClusterSnapshot
RestoreTableFromClusterSnapshot
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshot' {Text
newTableName' :: Text
$sel:newTableName':RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
newTableName'} -> Text
newTableName') (\s :: RestoreTableFromClusterSnapshot
s@RestoreTableFromClusterSnapshot' {} Text
a -> RestoreTableFromClusterSnapshot
s {$sel:newTableName':RestoreTableFromClusterSnapshot' :: Text
newTableName' = Text
a} :: RestoreTableFromClusterSnapshot)
instance
Core.AWSRequest
RestoreTableFromClusterSnapshot
where
type
AWSResponse RestoreTableFromClusterSnapshot =
RestoreTableFromClusterSnapshotResponse
request :: RestoreTableFromClusterSnapshot
-> Request RestoreTableFromClusterSnapshot
request = Service
-> RestoreTableFromClusterSnapshot
-> Request RestoreTableFromClusterSnapshot
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy RestoreTableFromClusterSnapshot
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse RestoreTableFromClusterSnapshot)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse RestoreTableFromClusterSnapshot))
-> Logger
-> Service
-> Proxy RestoreTableFromClusterSnapshot
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse RestoreTableFromClusterSnapshot)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"RestoreTableFromClusterSnapshotResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe TableRestoreStatus
-> Int -> RestoreTableFromClusterSnapshotResponse
RestoreTableFromClusterSnapshotResponse'
(Maybe TableRestoreStatus
-> Int -> RestoreTableFromClusterSnapshotResponse)
-> Either String (Maybe TableRestoreStatus)
-> Either String (Int -> RestoreTableFromClusterSnapshotResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe TableRestoreStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TableRestoreStatus")
Either String (Int -> RestoreTableFromClusterSnapshotResponse)
-> Either String Int
-> Either String RestoreTableFromClusterSnapshotResponse
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
RestoreTableFromClusterSnapshot
instance
Prelude.NFData
RestoreTableFromClusterSnapshot
instance
Core.ToHeaders
RestoreTableFromClusterSnapshot
where
toHeaders :: RestoreTableFromClusterSnapshot -> ResponseHeaders
toHeaders = ResponseHeaders
-> RestoreTableFromClusterSnapshot -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath RestoreTableFromClusterSnapshot where
toPath :: RestoreTableFromClusterSnapshot -> ByteString
toPath = ByteString -> RestoreTableFromClusterSnapshot -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RestoreTableFromClusterSnapshot where
toQuery :: RestoreTableFromClusterSnapshot -> QueryString
toQuery RestoreTableFromClusterSnapshot' {Maybe Bool
Maybe Text
Text
newTableName' :: Text
sourceTableName :: Text
sourceDatabaseName :: Text
snapshotIdentifier :: Text
clusterIdentifier :: Text
sourceSchemaName :: Maybe Text
targetDatabaseName :: Maybe Text
enableCaseSensitiveIdentifier :: Maybe Bool
targetSchemaName :: Maybe Text
$sel:newTableName':RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
$sel:sourceTableName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
$sel:sourceDatabaseName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
$sel:snapshotIdentifier:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
$sel:clusterIdentifier:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Text
$sel:sourceSchemaName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Maybe Text
$sel:targetDatabaseName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Maybe Text
$sel:enableCaseSensitiveIdentifier:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Maybe Bool
$sel:targetSchemaName:RestoreTableFromClusterSnapshot' :: RestoreTableFromClusterSnapshot -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"RestoreTableFromClusterSnapshot" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"TargetSchemaName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
targetSchemaName,
ByteString
"EnableCaseSensitiveIdentifier"
ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enableCaseSensitiveIdentifier,
ByteString
"TargetDatabaseName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
targetDatabaseName,
ByteString
"SourceSchemaName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
sourceSchemaName,
ByteString
"ClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterIdentifier,
ByteString
"SnapshotIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
snapshotIdentifier,
ByteString
"SourceDatabaseName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sourceDatabaseName,
ByteString
"SourceTableName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sourceTableName,
ByteString
"NewTableName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
newTableName'
]
data RestoreTableFromClusterSnapshotResponse = RestoreTableFromClusterSnapshotResponse'
{ RestoreTableFromClusterSnapshotResponse -> Maybe TableRestoreStatus
tableRestoreStatus :: Prelude.Maybe TableRestoreStatus,
RestoreTableFromClusterSnapshotResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RestoreTableFromClusterSnapshotResponse
-> RestoreTableFromClusterSnapshotResponse -> Bool
(RestoreTableFromClusterSnapshotResponse
-> RestoreTableFromClusterSnapshotResponse -> Bool)
-> (RestoreTableFromClusterSnapshotResponse
-> RestoreTableFromClusterSnapshotResponse -> Bool)
-> Eq RestoreTableFromClusterSnapshotResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RestoreTableFromClusterSnapshotResponse
-> RestoreTableFromClusterSnapshotResponse -> Bool
$c/= :: RestoreTableFromClusterSnapshotResponse
-> RestoreTableFromClusterSnapshotResponse -> Bool
== :: RestoreTableFromClusterSnapshotResponse
-> RestoreTableFromClusterSnapshotResponse -> Bool
$c== :: RestoreTableFromClusterSnapshotResponse
-> RestoreTableFromClusterSnapshotResponse -> Bool
Prelude.Eq, ReadPrec [RestoreTableFromClusterSnapshotResponse]
ReadPrec RestoreTableFromClusterSnapshotResponse
Int -> ReadS RestoreTableFromClusterSnapshotResponse
ReadS [RestoreTableFromClusterSnapshotResponse]
(Int -> ReadS RestoreTableFromClusterSnapshotResponse)
-> ReadS [RestoreTableFromClusterSnapshotResponse]
-> ReadPrec RestoreTableFromClusterSnapshotResponse
-> ReadPrec [RestoreTableFromClusterSnapshotResponse]
-> Read RestoreTableFromClusterSnapshotResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RestoreTableFromClusterSnapshotResponse]
$creadListPrec :: ReadPrec [RestoreTableFromClusterSnapshotResponse]
readPrec :: ReadPrec RestoreTableFromClusterSnapshotResponse
$creadPrec :: ReadPrec RestoreTableFromClusterSnapshotResponse
readList :: ReadS [RestoreTableFromClusterSnapshotResponse]
$creadList :: ReadS [RestoreTableFromClusterSnapshotResponse]
readsPrec :: Int -> ReadS RestoreTableFromClusterSnapshotResponse
$creadsPrec :: Int -> ReadS RestoreTableFromClusterSnapshotResponse
Prelude.Read, Int -> RestoreTableFromClusterSnapshotResponse -> ShowS
[RestoreTableFromClusterSnapshotResponse] -> ShowS
RestoreTableFromClusterSnapshotResponse -> String
(Int -> RestoreTableFromClusterSnapshotResponse -> ShowS)
-> (RestoreTableFromClusterSnapshotResponse -> String)
-> ([RestoreTableFromClusterSnapshotResponse] -> ShowS)
-> Show RestoreTableFromClusterSnapshotResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RestoreTableFromClusterSnapshotResponse] -> ShowS
$cshowList :: [RestoreTableFromClusterSnapshotResponse] -> ShowS
show :: RestoreTableFromClusterSnapshotResponse -> String
$cshow :: RestoreTableFromClusterSnapshotResponse -> String
showsPrec :: Int -> RestoreTableFromClusterSnapshotResponse -> ShowS
$cshowsPrec :: Int -> RestoreTableFromClusterSnapshotResponse -> ShowS
Prelude.Show, (forall x.
RestoreTableFromClusterSnapshotResponse
-> Rep RestoreTableFromClusterSnapshotResponse x)
-> (forall x.
Rep RestoreTableFromClusterSnapshotResponse x
-> RestoreTableFromClusterSnapshotResponse)
-> Generic RestoreTableFromClusterSnapshotResponse
forall x.
Rep RestoreTableFromClusterSnapshotResponse x
-> RestoreTableFromClusterSnapshotResponse
forall x.
RestoreTableFromClusterSnapshotResponse
-> Rep RestoreTableFromClusterSnapshotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RestoreTableFromClusterSnapshotResponse x
-> RestoreTableFromClusterSnapshotResponse
$cfrom :: forall x.
RestoreTableFromClusterSnapshotResponse
-> Rep RestoreTableFromClusterSnapshotResponse x
Prelude.Generic)
newRestoreTableFromClusterSnapshotResponse ::
Prelude.Int ->
RestoreTableFromClusterSnapshotResponse
newRestoreTableFromClusterSnapshotResponse :: Int -> RestoreTableFromClusterSnapshotResponse
newRestoreTableFromClusterSnapshotResponse
Int
pHttpStatus_ =
RestoreTableFromClusterSnapshotResponse' :: Maybe TableRestoreStatus
-> Int -> RestoreTableFromClusterSnapshotResponse
RestoreTableFromClusterSnapshotResponse'
{ $sel:tableRestoreStatus:RestoreTableFromClusterSnapshotResponse' :: Maybe TableRestoreStatus
tableRestoreStatus =
Maybe TableRestoreStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RestoreTableFromClusterSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
}
restoreTableFromClusterSnapshotResponse_tableRestoreStatus :: Lens.Lens' RestoreTableFromClusterSnapshotResponse (Prelude.Maybe TableRestoreStatus)
restoreTableFromClusterSnapshotResponse_tableRestoreStatus :: (Maybe TableRestoreStatus -> f (Maybe TableRestoreStatus))
-> RestoreTableFromClusterSnapshotResponse
-> f RestoreTableFromClusterSnapshotResponse
restoreTableFromClusterSnapshotResponse_tableRestoreStatus = (RestoreTableFromClusterSnapshotResponse
-> Maybe TableRestoreStatus)
-> (RestoreTableFromClusterSnapshotResponse
-> Maybe TableRestoreStatus
-> RestoreTableFromClusterSnapshotResponse)
-> Lens
RestoreTableFromClusterSnapshotResponse
RestoreTableFromClusterSnapshotResponse
(Maybe TableRestoreStatus)
(Maybe TableRestoreStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshotResponse' {Maybe TableRestoreStatus
tableRestoreStatus :: Maybe TableRestoreStatus
$sel:tableRestoreStatus:RestoreTableFromClusterSnapshotResponse' :: RestoreTableFromClusterSnapshotResponse -> Maybe TableRestoreStatus
tableRestoreStatus} -> Maybe TableRestoreStatus
tableRestoreStatus) (\s :: RestoreTableFromClusterSnapshotResponse
s@RestoreTableFromClusterSnapshotResponse' {} Maybe TableRestoreStatus
a -> RestoreTableFromClusterSnapshotResponse
s {$sel:tableRestoreStatus:RestoreTableFromClusterSnapshotResponse' :: Maybe TableRestoreStatus
tableRestoreStatus = Maybe TableRestoreStatus
a} :: RestoreTableFromClusterSnapshotResponse)
restoreTableFromClusterSnapshotResponse_httpStatus :: Lens.Lens' RestoreTableFromClusterSnapshotResponse Prelude.Int
restoreTableFromClusterSnapshotResponse_httpStatus :: (Int -> f Int)
-> RestoreTableFromClusterSnapshotResponse
-> f RestoreTableFromClusterSnapshotResponse
restoreTableFromClusterSnapshotResponse_httpStatus = (RestoreTableFromClusterSnapshotResponse -> Int)
-> (RestoreTableFromClusterSnapshotResponse
-> Int -> RestoreTableFromClusterSnapshotResponse)
-> Lens
RestoreTableFromClusterSnapshotResponse
RestoreTableFromClusterSnapshotResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RestoreTableFromClusterSnapshotResponse' {Int
httpStatus :: Int
$sel:httpStatus:RestoreTableFromClusterSnapshotResponse' :: RestoreTableFromClusterSnapshotResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RestoreTableFromClusterSnapshotResponse
s@RestoreTableFromClusterSnapshotResponse' {} Int
a -> RestoreTableFromClusterSnapshotResponse
s {$sel:httpStatus:RestoreTableFromClusterSnapshotResponse' :: Int
httpStatus = Int
a} :: RestoreTableFromClusterSnapshotResponse)
instance
Prelude.NFData
RestoreTableFromClusterSnapshotResponse