{-# 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.RDSData.BatchExecuteStatement
(
BatchExecuteStatement (..),
newBatchExecuteStatement,
batchExecuteStatement_database,
batchExecuteStatement_parameterSets,
batchExecuteStatement_transactionId,
batchExecuteStatement_schema,
batchExecuteStatement_resourceArn,
batchExecuteStatement_secretArn,
batchExecuteStatement_sql,
BatchExecuteStatementResponse (..),
newBatchExecuteStatementResponse,
batchExecuteStatementResponse_updateResults,
batchExecuteStatementResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDSData.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data BatchExecuteStatement = BatchExecuteStatement'
{
BatchExecuteStatement -> Maybe Text
database :: Prelude.Maybe Prelude.Text,
BatchExecuteStatement -> Maybe [[SqlParameter]]
parameterSets :: Prelude.Maybe [[SqlParameter]],
BatchExecuteStatement -> Maybe Text
transactionId :: Prelude.Maybe Prelude.Text,
BatchExecuteStatement -> Maybe Text
schema :: Prelude.Maybe Prelude.Text,
BatchExecuteStatement -> Text
resourceArn :: Prelude.Text,
BatchExecuteStatement -> Text
secretArn :: Prelude.Text,
BatchExecuteStatement -> Text
sql :: Prelude.Text
}
deriving (BatchExecuteStatement -> BatchExecuteStatement -> Bool
(BatchExecuteStatement -> BatchExecuteStatement -> Bool)
-> (BatchExecuteStatement -> BatchExecuteStatement -> Bool)
-> Eq BatchExecuteStatement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchExecuteStatement -> BatchExecuteStatement -> Bool
$c/= :: BatchExecuteStatement -> BatchExecuteStatement -> Bool
== :: BatchExecuteStatement -> BatchExecuteStatement -> Bool
$c== :: BatchExecuteStatement -> BatchExecuteStatement -> Bool
Prelude.Eq, ReadPrec [BatchExecuteStatement]
ReadPrec BatchExecuteStatement
Int -> ReadS BatchExecuteStatement
ReadS [BatchExecuteStatement]
(Int -> ReadS BatchExecuteStatement)
-> ReadS [BatchExecuteStatement]
-> ReadPrec BatchExecuteStatement
-> ReadPrec [BatchExecuteStatement]
-> Read BatchExecuteStatement
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchExecuteStatement]
$creadListPrec :: ReadPrec [BatchExecuteStatement]
readPrec :: ReadPrec BatchExecuteStatement
$creadPrec :: ReadPrec BatchExecuteStatement
readList :: ReadS [BatchExecuteStatement]
$creadList :: ReadS [BatchExecuteStatement]
readsPrec :: Int -> ReadS BatchExecuteStatement
$creadsPrec :: Int -> ReadS BatchExecuteStatement
Prelude.Read, Int -> BatchExecuteStatement -> ShowS
[BatchExecuteStatement] -> ShowS
BatchExecuteStatement -> String
(Int -> BatchExecuteStatement -> ShowS)
-> (BatchExecuteStatement -> String)
-> ([BatchExecuteStatement] -> ShowS)
-> Show BatchExecuteStatement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchExecuteStatement] -> ShowS
$cshowList :: [BatchExecuteStatement] -> ShowS
show :: BatchExecuteStatement -> String
$cshow :: BatchExecuteStatement -> String
showsPrec :: Int -> BatchExecuteStatement -> ShowS
$cshowsPrec :: Int -> BatchExecuteStatement -> ShowS
Prelude.Show, (forall x. BatchExecuteStatement -> Rep BatchExecuteStatement x)
-> (forall x. Rep BatchExecuteStatement x -> BatchExecuteStatement)
-> Generic BatchExecuteStatement
forall x. Rep BatchExecuteStatement x -> BatchExecuteStatement
forall x. BatchExecuteStatement -> Rep BatchExecuteStatement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchExecuteStatement x -> BatchExecuteStatement
$cfrom :: forall x. BatchExecuteStatement -> Rep BatchExecuteStatement x
Prelude.Generic)
newBatchExecuteStatement ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
BatchExecuteStatement
newBatchExecuteStatement :: Text -> Text -> Text -> BatchExecuteStatement
newBatchExecuteStatement
Text
pResourceArn_
Text
pSecretArn_
Text
pSql_ =
BatchExecuteStatement' :: Maybe Text
-> Maybe [[SqlParameter]]
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> BatchExecuteStatement
BatchExecuteStatement'
{ $sel:database:BatchExecuteStatement' :: Maybe Text
database = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:parameterSets:BatchExecuteStatement' :: Maybe [[SqlParameter]]
parameterSets = Maybe [[SqlParameter]]
forall a. Maybe a
Prelude.Nothing,
$sel:transactionId:BatchExecuteStatement' :: Maybe Text
transactionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schema:BatchExecuteStatement' :: Maybe Text
schema = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:BatchExecuteStatement' :: Text
resourceArn = Text
pResourceArn_,
$sel:secretArn:BatchExecuteStatement' :: Text
secretArn = Text
pSecretArn_,
$sel:sql:BatchExecuteStatement' :: Text
sql = Text
pSql_
}
batchExecuteStatement_database :: Lens.Lens' BatchExecuteStatement (Prelude.Maybe Prelude.Text)
batchExecuteStatement_database :: (Maybe Text -> f (Maybe Text))
-> BatchExecuteStatement -> f BatchExecuteStatement
batchExecuteStatement_database = (BatchExecuteStatement -> Maybe Text)
-> (BatchExecuteStatement -> Maybe Text -> BatchExecuteStatement)
-> Lens
BatchExecuteStatement
BatchExecuteStatement
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchExecuteStatement' {Maybe Text
database :: Maybe Text
$sel:database:BatchExecuteStatement' :: BatchExecuteStatement -> Maybe Text
database} -> Maybe Text
database) (\s :: BatchExecuteStatement
s@BatchExecuteStatement' {} Maybe Text
a -> BatchExecuteStatement
s {$sel:database:BatchExecuteStatement' :: Maybe Text
database = Maybe Text
a} :: BatchExecuteStatement)
batchExecuteStatement_parameterSets :: Lens.Lens' BatchExecuteStatement (Prelude.Maybe [[SqlParameter]])
batchExecuteStatement_parameterSets :: (Maybe [[SqlParameter]] -> f (Maybe [[SqlParameter]]))
-> BatchExecuteStatement -> f BatchExecuteStatement
batchExecuteStatement_parameterSets = (BatchExecuteStatement -> Maybe [[SqlParameter]])
-> (BatchExecuteStatement
-> Maybe [[SqlParameter]] -> BatchExecuteStatement)
-> Lens
BatchExecuteStatement
BatchExecuteStatement
(Maybe [[SqlParameter]])
(Maybe [[SqlParameter]])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchExecuteStatement' {Maybe [[SqlParameter]]
parameterSets :: Maybe [[SqlParameter]]
$sel:parameterSets:BatchExecuteStatement' :: BatchExecuteStatement -> Maybe [[SqlParameter]]
parameterSets} -> Maybe [[SqlParameter]]
parameterSets) (\s :: BatchExecuteStatement
s@BatchExecuteStatement' {} Maybe [[SqlParameter]]
a -> BatchExecuteStatement
s {$sel:parameterSets:BatchExecuteStatement' :: Maybe [[SqlParameter]]
parameterSets = Maybe [[SqlParameter]]
a} :: BatchExecuteStatement) ((Maybe [[SqlParameter]] -> f (Maybe [[SqlParameter]]))
-> BatchExecuteStatement -> f BatchExecuteStatement)
-> ((Maybe [[SqlParameter]] -> f (Maybe [[SqlParameter]]))
-> Maybe [[SqlParameter]] -> f (Maybe [[SqlParameter]]))
-> (Maybe [[SqlParameter]] -> f (Maybe [[SqlParameter]]))
-> BatchExecuteStatement
-> f BatchExecuteStatement
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[[SqlParameter]] [[SqlParameter]] [[SqlParameter]] [[SqlParameter]]
-> Iso
(Maybe [[SqlParameter]])
(Maybe [[SqlParameter]])
(Maybe [[SqlParameter]])
(Maybe [[SqlParameter]])
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
[[SqlParameter]] [[SqlParameter]] [[SqlParameter]] [[SqlParameter]]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchExecuteStatement_transactionId :: Lens.Lens' BatchExecuteStatement (Prelude.Maybe Prelude.Text)
batchExecuteStatement_transactionId :: (Maybe Text -> f (Maybe Text))
-> BatchExecuteStatement -> f BatchExecuteStatement
batchExecuteStatement_transactionId = (BatchExecuteStatement -> Maybe Text)
-> (BatchExecuteStatement -> Maybe Text -> BatchExecuteStatement)
-> Lens
BatchExecuteStatement
BatchExecuteStatement
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchExecuteStatement' {Maybe Text
transactionId :: Maybe Text
$sel:transactionId:BatchExecuteStatement' :: BatchExecuteStatement -> Maybe Text
transactionId} -> Maybe Text
transactionId) (\s :: BatchExecuteStatement
s@BatchExecuteStatement' {} Maybe Text
a -> BatchExecuteStatement
s {$sel:transactionId:BatchExecuteStatement' :: Maybe Text
transactionId = Maybe Text
a} :: BatchExecuteStatement)
batchExecuteStatement_schema :: Lens.Lens' BatchExecuteStatement (Prelude.Maybe Prelude.Text)
batchExecuteStatement_schema :: (Maybe Text -> f (Maybe Text))
-> BatchExecuteStatement -> f BatchExecuteStatement
batchExecuteStatement_schema = (BatchExecuteStatement -> Maybe Text)
-> (BatchExecuteStatement -> Maybe Text -> BatchExecuteStatement)
-> Lens
BatchExecuteStatement
BatchExecuteStatement
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchExecuteStatement' {Maybe Text
schema :: Maybe Text
$sel:schema:BatchExecuteStatement' :: BatchExecuteStatement -> Maybe Text
schema} -> Maybe Text
schema) (\s :: BatchExecuteStatement
s@BatchExecuteStatement' {} Maybe Text
a -> BatchExecuteStatement
s {$sel:schema:BatchExecuteStatement' :: Maybe Text
schema = Maybe Text
a} :: BatchExecuteStatement)
batchExecuteStatement_resourceArn :: Lens.Lens' BatchExecuteStatement Prelude.Text
batchExecuteStatement_resourceArn :: (Text -> f Text)
-> BatchExecuteStatement -> f BatchExecuteStatement
batchExecuteStatement_resourceArn = (BatchExecuteStatement -> Text)
-> (BatchExecuteStatement -> Text -> BatchExecuteStatement)
-> Lens BatchExecuteStatement BatchExecuteStatement Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchExecuteStatement' {Text
resourceArn :: Text
$sel:resourceArn:BatchExecuteStatement' :: BatchExecuteStatement -> Text
resourceArn} -> Text
resourceArn) (\s :: BatchExecuteStatement
s@BatchExecuteStatement' {} Text
a -> BatchExecuteStatement
s {$sel:resourceArn:BatchExecuteStatement' :: Text
resourceArn = Text
a} :: BatchExecuteStatement)
batchExecuteStatement_secretArn :: Lens.Lens' BatchExecuteStatement Prelude.Text
batchExecuteStatement_secretArn :: (Text -> f Text)
-> BatchExecuteStatement -> f BatchExecuteStatement
batchExecuteStatement_secretArn = (BatchExecuteStatement -> Text)
-> (BatchExecuteStatement -> Text -> BatchExecuteStatement)
-> Lens BatchExecuteStatement BatchExecuteStatement Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchExecuteStatement' {Text
secretArn :: Text
$sel:secretArn:BatchExecuteStatement' :: BatchExecuteStatement -> Text
secretArn} -> Text
secretArn) (\s :: BatchExecuteStatement
s@BatchExecuteStatement' {} Text
a -> BatchExecuteStatement
s {$sel:secretArn:BatchExecuteStatement' :: Text
secretArn = Text
a} :: BatchExecuteStatement)
batchExecuteStatement_sql :: Lens.Lens' BatchExecuteStatement Prelude.Text
batchExecuteStatement_sql :: (Text -> f Text)
-> BatchExecuteStatement -> f BatchExecuteStatement
batchExecuteStatement_sql = (BatchExecuteStatement -> Text)
-> (BatchExecuteStatement -> Text -> BatchExecuteStatement)
-> Lens BatchExecuteStatement BatchExecuteStatement Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchExecuteStatement' {Text
sql :: Text
$sel:sql:BatchExecuteStatement' :: BatchExecuteStatement -> Text
sql} -> Text
sql) (\s :: BatchExecuteStatement
s@BatchExecuteStatement' {} Text
a -> BatchExecuteStatement
s {$sel:sql:BatchExecuteStatement' :: Text
sql = Text
a} :: BatchExecuteStatement)
instance Core.AWSRequest BatchExecuteStatement where
type
AWSResponse BatchExecuteStatement =
BatchExecuteStatementResponse
request :: BatchExecuteStatement -> Request BatchExecuteStatement
request = Service -> BatchExecuteStatement -> Request BatchExecuteStatement
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy BatchExecuteStatement
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse BatchExecuteStatement)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse BatchExecuteStatement))
-> Logger
-> Service
-> Proxy BatchExecuteStatement
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse BatchExecuteStatement)))
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 [UpdateResult] -> Int -> BatchExecuteStatementResponse
BatchExecuteStatementResponse'
(Maybe [UpdateResult] -> Int -> BatchExecuteStatementResponse)
-> Either String (Maybe [UpdateResult])
-> Either String (Int -> BatchExecuteStatementResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [UpdateResult]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"updateResults" Either String (Maybe (Maybe [UpdateResult]))
-> Maybe [UpdateResult] -> Either String (Maybe [UpdateResult])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [UpdateResult]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> BatchExecuteStatementResponse)
-> Either String Int -> Either String BatchExecuteStatementResponse
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 BatchExecuteStatement
instance Prelude.NFData BatchExecuteStatement
instance Core.ToHeaders BatchExecuteStatement where
toHeaders :: BatchExecuteStatement -> ResponseHeaders
toHeaders =
ResponseHeaders -> BatchExecuteStatement -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON BatchExecuteStatement where
toJSON :: BatchExecuteStatement -> Value
toJSON BatchExecuteStatement' {Maybe [[SqlParameter]]
Maybe Text
Text
sql :: Text
secretArn :: Text
resourceArn :: Text
schema :: Maybe Text
transactionId :: Maybe Text
parameterSets :: Maybe [[SqlParameter]]
database :: Maybe Text
$sel:sql:BatchExecuteStatement' :: BatchExecuteStatement -> Text
$sel:secretArn:BatchExecuteStatement' :: BatchExecuteStatement -> Text
$sel:resourceArn:BatchExecuteStatement' :: BatchExecuteStatement -> Text
$sel:schema:BatchExecuteStatement' :: BatchExecuteStatement -> Maybe Text
$sel:transactionId:BatchExecuteStatement' :: BatchExecuteStatement -> Maybe Text
$sel:parameterSets:BatchExecuteStatement' :: BatchExecuteStatement -> Maybe [[SqlParameter]]
$sel:database:BatchExecuteStatement' :: BatchExecuteStatement -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"database" 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
database,
(Text
"parameterSets" Text -> [[SqlParameter]] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([[SqlParameter]] -> Pair) -> Maybe [[SqlParameter]] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [[SqlParameter]]
parameterSets,
(Text
"transactionId" 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
transactionId,
(Text
"schema" 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
schema,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"resourceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"secretArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
secretArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"sql" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sql)
]
)
instance Core.ToPath BatchExecuteStatement where
toPath :: BatchExecuteStatement -> ByteString
toPath = ByteString -> BatchExecuteStatement -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/BatchExecute"
instance Core.ToQuery BatchExecuteStatement where
toQuery :: BatchExecuteStatement -> QueryString
toQuery = QueryString -> BatchExecuteStatement -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data BatchExecuteStatementResponse = BatchExecuteStatementResponse'
{
BatchExecuteStatementResponse -> Maybe [UpdateResult]
updateResults :: Prelude.Maybe [UpdateResult],
BatchExecuteStatementResponse -> Int
httpStatus :: Prelude.Int
}
deriving (BatchExecuteStatementResponse
-> BatchExecuteStatementResponse -> Bool
(BatchExecuteStatementResponse
-> BatchExecuteStatementResponse -> Bool)
-> (BatchExecuteStatementResponse
-> BatchExecuteStatementResponse -> Bool)
-> Eq BatchExecuteStatementResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchExecuteStatementResponse
-> BatchExecuteStatementResponse -> Bool
$c/= :: BatchExecuteStatementResponse
-> BatchExecuteStatementResponse -> Bool
== :: BatchExecuteStatementResponse
-> BatchExecuteStatementResponse -> Bool
$c== :: BatchExecuteStatementResponse
-> BatchExecuteStatementResponse -> Bool
Prelude.Eq, ReadPrec [BatchExecuteStatementResponse]
ReadPrec BatchExecuteStatementResponse
Int -> ReadS BatchExecuteStatementResponse
ReadS [BatchExecuteStatementResponse]
(Int -> ReadS BatchExecuteStatementResponse)
-> ReadS [BatchExecuteStatementResponse]
-> ReadPrec BatchExecuteStatementResponse
-> ReadPrec [BatchExecuteStatementResponse]
-> Read BatchExecuteStatementResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchExecuteStatementResponse]
$creadListPrec :: ReadPrec [BatchExecuteStatementResponse]
readPrec :: ReadPrec BatchExecuteStatementResponse
$creadPrec :: ReadPrec BatchExecuteStatementResponse
readList :: ReadS [BatchExecuteStatementResponse]
$creadList :: ReadS [BatchExecuteStatementResponse]
readsPrec :: Int -> ReadS BatchExecuteStatementResponse
$creadsPrec :: Int -> ReadS BatchExecuteStatementResponse
Prelude.Read, Int -> BatchExecuteStatementResponse -> ShowS
[BatchExecuteStatementResponse] -> ShowS
BatchExecuteStatementResponse -> String
(Int -> BatchExecuteStatementResponse -> ShowS)
-> (BatchExecuteStatementResponse -> String)
-> ([BatchExecuteStatementResponse] -> ShowS)
-> Show BatchExecuteStatementResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchExecuteStatementResponse] -> ShowS
$cshowList :: [BatchExecuteStatementResponse] -> ShowS
show :: BatchExecuteStatementResponse -> String
$cshow :: BatchExecuteStatementResponse -> String
showsPrec :: Int -> BatchExecuteStatementResponse -> ShowS
$cshowsPrec :: Int -> BatchExecuteStatementResponse -> ShowS
Prelude.Show, (forall x.
BatchExecuteStatementResponse
-> Rep BatchExecuteStatementResponse x)
-> (forall x.
Rep BatchExecuteStatementResponse x
-> BatchExecuteStatementResponse)
-> Generic BatchExecuteStatementResponse
forall x.
Rep BatchExecuteStatementResponse x
-> BatchExecuteStatementResponse
forall x.
BatchExecuteStatementResponse
-> Rep BatchExecuteStatementResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchExecuteStatementResponse x
-> BatchExecuteStatementResponse
$cfrom :: forall x.
BatchExecuteStatementResponse
-> Rep BatchExecuteStatementResponse x
Prelude.Generic)
newBatchExecuteStatementResponse ::
Prelude.Int ->
BatchExecuteStatementResponse
newBatchExecuteStatementResponse :: Int -> BatchExecuteStatementResponse
newBatchExecuteStatementResponse Int
pHttpStatus_ =
BatchExecuteStatementResponse' :: Maybe [UpdateResult] -> Int -> BatchExecuteStatementResponse
BatchExecuteStatementResponse'
{ $sel:updateResults:BatchExecuteStatementResponse' :: Maybe [UpdateResult]
updateResults =
Maybe [UpdateResult]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:BatchExecuteStatementResponse' :: Int
httpStatus = Int
pHttpStatus_
}
batchExecuteStatementResponse_updateResults :: Lens.Lens' BatchExecuteStatementResponse (Prelude.Maybe [UpdateResult])
batchExecuteStatementResponse_updateResults :: (Maybe [UpdateResult] -> f (Maybe [UpdateResult]))
-> BatchExecuteStatementResponse -> f BatchExecuteStatementResponse
batchExecuteStatementResponse_updateResults = (BatchExecuteStatementResponse -> Maybe [UpdateResult])
-> (BatchExecuteStatementResponse
-> Maybe [UpdateResult] -> BatchExecuteStatementResponse)
-> Lens
BatchExecuteStatementResponse
BatchExecuteStatementResponse
(Maybe [UpdateResult])
(Maybe [UpdateResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchExecuteStatementResponse' {Maybe [UpdateResult]
updateResults :: Maybe [UpdateResult]
$sel:updateResults:BatchExecuteStatementResponse' :: BatchExecuteStatementResponse -> Maybe [UpdateResult]
updateResults} -> Maybe [UpdateResult]
updateResults) (\s :: BatchExecuteStatementResponse
s@BatchExecuteStatementResponse' {} Maybe [UpdateResult]
a -> BatchExecuteStatementResponse
s {$sel:updateResults:BatchExecuteStatementResponse' :: Maybe [UpdateResult]
updateResults = Maybe [UpdateResult]
a} :: BatchExecuteStatementResponse) ((Maybe [UpdateResult] -> f (Maybe [UpdateResult]))
-> BatchExecuteStatementResponse
-> f BatchExecuteStatementResponse)
-> ((Maybe [UpdateResult] -> f (Maybe [UpdateResult]))
-> Maybe [UpdateResult] -> f (Maybe [UpdateResult]))
-> (Maybe [UpdateResult] -> f (Maybe [UpdateResult]))
-> BatchExecuteStatementResponse
-> f BatchExecuteStatementResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [UpdateResult] [UpdateResult] [UpdateResult] [UpdateResult]
-> Iso
(Maybe [UpdateResult])
(Maybe [UpdateResult])
(Maybe [UpdateResult])
(Maybe [UpdateResult])
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 [UpdateResult] [UpdateResult] [UpdateResult] [UpdateResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchExecuteStatementResponse_httpStatus :: Lens.Lens' BatchExecuteStatementResponse Prelude.Int
batchExecuteStatementResponse_httpStatus :: (Int -> f Int)
-> BatchExecuteStatementResponse -> f BatchExecuteStatementResponse
batchExecuteStatementResponse_httpStatus = (BatchExecuteStatementResponse -> Int)
-> (BatchExecuteStatementResponse
-> Int -> BatchExecuteStatementResponse)
-> Lens
BatchExecuteStatementResponse BatchExecuteStatementResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchExecuteStatementResponse' {Int
httpStatus :: Int
$sel:httpStatus:BatchExecuteStatementResponse' :: BatchExecuteStatementResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: BatchExecuteStatementResponse
s@BatchExecuteStatementResponse' {} Int
a -> BatchExecuteStatementResponse
s {$sel:httpStatus:BatchExecuteStatementResponse' :: Int
httpStatus = Int
a} :: BatchExecuteStatementResponse)
instance Prelude.NFData BatchExecuteStatementResponse