{-# 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.Lambda.AddPermission
(
AddPermission (..),
newAddPermission,
addPermission_sourceAccount,
addPermission_eventSourceToken,
addPermission_sourceArn,
addPermission_qualifier,
addPermission_revisionId,
addPermission_functionName,
addPermission_statementId,
addPermission_action,
addPermission_principal,
AddPermissionResponse (..),
newAddPermissionResponse,
addPermissionResponse_statement,
addPermissionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Lambda.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 AddPermission = AddPermission'
{
AddPermission -> Maybe Text
sourceAccount :: Prelude.Maybe Prelude.Text,
AddPermission -> Maybe Text
eventSourceToken :: Prelude.Maybe Prelude.Text,
AddPermission -> Maybe Text
sourceArn :: Prelude.Maybe Prelude.Text,
AddPermission -> Maybe Text
qualifier :: Prelude.Maybe Prelude.Text,
AddPermission -> Maybe Text
revisionId :: Prelude.Maybe Prelude.Text,
AddPermission -> Text
functionName :: Prelude.Text,
AddPermission -> Text
statementId :: Prelude.Text,
AddPermission -> Text
action :: Prelude.Text,
AddPermission -> Text
principal :: Prelude.Text
}
deriving (AddPermission -> AddPermission -> Bool
(AddPermission -> AddPermission -> Bool)
-> (AddPermission -> AddPermission -> Bool) -> Eq AddPermission
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddPermission -> AddPermission -> Bool
$c/= :: AddPermission -> AddPermission -> Bool
== :: AddPermission -> AddPermission -> Bool
$c== :: AddPermission -> AddPermission -> Bool
Prelude.Eq, ReadPrec [AddPermission]
ReadPrec AddPermission
Int -> ReadS AddPermission
ReadS [AddPermission]
(Int -> ReadS AddPermission)
-> ReadS [AddPermission]
-> ReadPrec AddPermission
-> ReadPrec [AddPermission]
-> Read AddPermission
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddPermission]
$creadListPrec :: ReadPrec [AddPermission]
readPrec :: ReadPrec AddPermission
$creadPrec :: ReadPrec AddPermission
readList :: ReadS [AddPermission]
$creadList :: ReadS [AddPermission]
readsPrec :: Int -> ReadS AddPermission
$creadsPrec :: Int -> ReadS AddPermission
Prelude.Read, Int -> AddPermission -> ShowS
[AddPermission] -> ShowS
AddPermission -> String
(Int -> AddPermission -> ShowS)
-> (AddPermission -> String)
-> ([AddPermission] -> ShowS)
-> Show AddPermission
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddPermission] -> ShowS
$cshowList :: [AddPermission] -> ShowS
show :: AddPermission -> String
$cshow :: AddPermission -> String
showsPrec :: Int -> AddPermission -> ShowS
$cshowsPrec :: Int -> AddPermission -> ShowS
Prelude.Show, (forall x. AddPermission -> Rep AddPermission x)
-> (forall x. Rep AddPermission x -> AddPermission)
-> Generic AddPermission
forall x. Rep AddPermission x -> AddPermission
forall x. AddPermission -> Rep AddPermission x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddPermission x -> AddPermission
$cfrom :: forall x. AddPermission -> Rep AddPermission x
Prelude.Generic)
newAddPermission ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
AddPermission
newAddPermission :: Text -> Text -> Text -> Text -> AddPermission
newAddPermission
Text
pFunctionName_
Text
pStatementId_
Text
pAction_
Text
pPrincipal_ =
AddPermission' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> AddPermission
AddPermission'
{ $sel:sourceAccount:AddPermission' :: Maybe Text
sourceAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventSourceToken:AddPermission' :: Maybe Text
eventSourceToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceArn:AddPermission' :: Maybe Text
sourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:qualifier:AddPermission' :: Maybe Text
qualifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revisionId:AddPermission' :: Maybe Text
revisionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:functionName:AddPermission' :: Text
functionName = Text
pFunctionName_,
$sel:statementId:AddPermission' :: Text
statementId = Text
pStatementId_,
$sel:action:AddPermission' :: Text
action = Text
pAction_,
$sel:principal:AddPermission' :: Text
principal = Text
pPrincipal_
}
addPermission_sourceAccount :: Lens.Lens' AddPermission (Prelude.Maybe Prelude.Text)
addPermission_sourceAccount :: (Maybe Text -> f (Maybe Text)) -> AddPermission -> f AddPermission
addPermission_sourceAccount = (AddPermission -> Maybe Text)
-> (AddPermission -> Maybe Text -> AddPermission)
-> Lens AddPermission AddPermission (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermission' {Maybe Text
sourceAccount :: Maybe Text
$sel:sourceAccount:AddPermission' :: AddPermission -> Maybe Text
sourceAccount} -> Maybe Text
sourceAccount) (\s :: AddPermission
s@AddPermission' {} Maybe Text
a -> AddPermission
s {$sel:sourceAccount:AddPermission' :: Maybe Text
sourceAccount = Maybe Text
a} :: AddPermission)
addPermission_eventSourceToken :: Lens.Lens' AddPermission (Prelude.Maybe Prelude.Text)
addPermission_eventSourceToken :: (Maybe Text -> f (Maybe Text)) -> AddPermission -> f AddPermission
addPermission_eventSourceToken = (AddPermission -> Maybe Text)
-> (AddPermission -> Maybe Text -> AddPermission)
-> Lens AddPermission AddPermission (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermission' {Maybe Text
eventSourceToken :: Maybe Text
$sel:eventSourceToken:AddPermission' :: AddPermission -> Maybe Text
eventSourceToken} -> Maybe Text
eventSourceToken) (\s :: AddPermission
s@AddPermission' {} Maybe Text
a -> AddPermission
s {$sel:eventSourceToken:AddPermission' :: Maybe Text
eventSourceToken = Maybe Text
a} :: AddPermission)
addPermission_sourceArn :: Lens.Lens' AddPermission (Prelude.Maybe Prelude.Text)
addPermission_sourceArn :: (Maybe Text -> f (Maybe Text)) -> AddPermission -> f AddPermission
addPermission_sourceArn = (AddPermission -> Maybe Text)
-> (AddPermission -> Maybe Text -> AddPermission)
-> Lens AddPermission AddPermission (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermission' {Maybe Text
sourceArn :: Maybe Text
$sel:sourceArn:AddPermission' :: AddPermission -> Maybe Text
sourceArn} -> Maybe Text
sourceArn) (\s :: AddPermission
s@AddPermission' {} Maybe Text
a -> AddPermission
s {$sel:sourceArn:AddPermission' :: Maybe Text
sourceArn = Maybe Text
a} :: AddPermission)
addPermission_qualifier :: Lens.Lens' AddPermission (Prelude.Maybe Prelude.Text)
addPermission_qualifier :: (Maybe Text -> f (Maybe Text)) -> AddPermission -> f AddPermission
addPermission_qualifier = (AddPermission -> Maybe Text)
-> (AddPermission -> Maybe Text -> AddPermission)
-> Lens AddPermission AddPermission (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermission' {Maybe Text
qualifier :: Maybe Text
$sel:qualifier:AddPermission' :: AddPermission -> Maybe Text
qualifier} -> Maybe Text
qualifier) (\s :: AddPermission
s@AddPermission' {} Maybe Text
a -> AddPermission
s {$sel:qualifier:AddPermission' :: Maybe Text
qualifier = Maybe Text
a} :: AddPermission)
addPermission_revisionId :: Lens.Lens' AddPermission (Prelude.Maybe Prelude.Text)
addPermission_revisionId :: (Maybe Text -> f (Maybe Text)) -> AddPermission -> f AddPermission
addPermission_revisionId = (AddPermission -> Maybe Text)
-> (AddPermission -> Maybe Text -> AddPermission)
-> Lens AddPermission AddPermission (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermission' {Maybe Text
revisionId :: Maybe Text
$sel:revisionId:AddPermission' :: AddPermission -> Maybe Text
revisionId} -> Maybe Text
revisionId) (\s :: AddPermission
s@AddPermission' {} Maybe Text
a -> AddPermission
s {$sel:revisionId:AddPermission' :: Maybe Text
revisionId = Maybe Text
a} :: AddPermission)
addPermission_functionName :: Lens.Lens' AddPermission Prelude.Text
addPermission_functionName :: (Text -> f Text) -> AddPermission -> f AddPermission
addPermission_functionName = (AddPermission -> Text)
-> (AddPermission -> Text -> AddPermission)
-> Lens AddPermission AddPermission Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermission' {Text
functionName :: Text
$sel:functionName:AddPermission' :: AddPermission -> Text
functionName} -> Text
functionName) (\s :: AddPermission
s@AddPermission' {} Text
a -> AddPermission
s {$sel:functionName:AddPermission' :: Text
functionName = Text
a} :: AddPermission)
addPermission_statementId :: Lens.Lens' AddPermission Prelude.Text
addPermission_statementId :: (Text -> f Text) -> AddPermission -> f AddPermission
addPermission_statementId = (AddPermission -> Text)
-> (AddPermission -> Text -> AddPermission)
-> Lens AddPermission AddPermission Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermission' {Text
statementId :: Text
$sel:statementId:AddPermission' :: AddPermission -> Text
statementId} -> Text
statementId) (\s :: AddPermission
s@AddPermission' {} Text
a -> AddPermission
s {$sel:statementId:AddPermission' :: Text
statementId = Text
a} :: AddPermission)
addPermission_action :: Lens.Lens' AddPermission Prelude.Text
addPermission_action :: (Text -> f Text) -> AddPermission -> f AddPermission
addPermission_action = (AddPermission -> Text)
-> (AddPermission -> Text -> AddPermission)
-> Lens AddPermission AddPermission Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermission' {Text
action :: Text
$sel:action:AddPermission' :: AddPermission -> Text
action} -> Text
action) (\s :: AddPermission
s@AddPermission' {} Text
a -> AddPermission
s {$sel:action:AddPermission' :: Text
action = Text
a} :: AddPermission)
addPermission_principal :: Lens.Lens' AddPermission Prelude.Text
addPermission_principal :: (Text -> f Text) -> AddPermission -> f AddPermission
addPermission_principal = (AddPermission -> Text)
-> (AddPermission -> Text -> AddPermission)
-> Lens AddPermission AddPermission Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermission' {Text
principal :: Text
$sel:principal:AddPermission' :: AddPermission -> Text
principal} -> Text
principal) (\s :: AddPermission
s@AddPermission' {} Text
a -> AddPermission
s {$sel:principal:AddPermission' :: Text
principal = Text
a} :: AddPermission)
instance Core.AWSRequest AddPermission where
type
AWSResponse AddPermission =
AddPermissionResponse
request :: AddPermission -> Request AddPermission
request = Service -> AddPermission -> Request AddPermission
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy AddPermission
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse AddPermission)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse AddPermission))
-> Logger
-> Service
-> Proxy AddPermission
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse AddPermission)))
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 Text -> Int -> AddPermissionResponse
AddPermissionResponse'
(Maybe Text -> Int -> AddPermissionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> AddPermissionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Statement")
Either String (Int -> AddPermissionResponse)
-> Either String Int -> Either String AddPermissionResponse
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 AddPermission
instance Prelude.NFData AddPermission
instance Core.ToHeaders AddPermission where
toHeaders :: AddPermission -> ResponseHeaders
toHeaders = ResponseHeaders -> AddPermission -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON AddPermission where
toJSON :: AddPermission -> Value
toJSON AddPermission' {Maybe Text
Text
principal :: Text
action :: Text
statementId :: Text
functionName :: Text
revisionId :: Maybe Text
qualifier :: Maybe Text
sourceArn :: Maybe Text
eventSourceToken :: Maybe Text
sourceAccount :: Maybe Text
$sel:principal:AddPermission' :: AddPermission -> Text
$sel:action:AddPermission' :: AddPermission -> Text
$sel:statementId:AddPermission' :: AddPermission -> Text
$sel:functionName:AddPermission' :: AddPermission -> Text
$sel:revisionId:AddPermission' :: AddPermission -> Maybe Text
$sel:qualifier:AddPermission' :: AddPermission -> Maybe Text
$sel:sourceArn:AddPermission' :: AddPermission -> Maybe Text
$sel:eventSourceToken:AddPermission' :: AddPermission -> Maybe Text
$sel:sourceAccount:AddPermission' :: AddPermission -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SourceAccount" 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
sourceAccount,
(Text
"EventSourceToken" 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
eventSourceToken,
(Text
"SourceArn" 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
sourceArn,
(Text
"RevisionId" 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
revisionId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StatementId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
statementId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Action" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
action),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Principal" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
principal)
]
)
instance Core.ToPath AddPermission where
toPath :: AddPermission -> ByteString
toPath AddPermission' {Maybe Text
Text
principal :: Text
action :: Text
statementId :: Text
functionName :: Text
revisionId :: Maybe Text
qualifier :: Maybe Text
sourceArn :: Maybe Text
eventSourceToken :: Maybe Text
sourceAccount :: Maybe Text
$sel:principal:AddPermission' :: AddPermission -> Text
$sel:action:AddPermission' :: AddPermission -> Text
$sel:statementId:AddPermission' :: AddPermission -> Text
$sel:functionName:AddPermission' :: AddPermission -> Text
$sel:revisionId:AddPermission' :: AddPermission -> Maybe Text
$sel:qualifier:AddPermission' :: AddPermission -> Maybe Text
$sel:sourceArn:AddPermission' :: AddPermission -> Maybe Text
$sel:eventSourceToken:AddPermission' :: AddPermission -> Maybe Text
$sel:sourceAccount:AddPermission' :: AddPermission -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-03-31/functions/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
functionName,
ByteString
"/policy"
]
instance Core.ToQuery AddPermission where
toQuery :: AddPermission -> QueryString
toQuery AddPermission' {Maybe Text
Text
principal :: Text
action :: Text
statementId :: Text
functionName :: Text
revisionId :: Maybe Text
qualifier :: Maybe Text
sourceArn :: Maybe Text
eventSourceToken :: Maybe Text
sourceAccount :: Maybe Text
$sel:principal:AddPermission' :: AddPermission -> Text
$sel:action:AddPermission' :: AddPermission -> Text
$sel:statementId:AddPermission' :: AddPermission -> Text
$sel:functionName:AddPermission' :: AddPermission -> Text
$sel:revisionId:AddPermission' :: AddPermission -> Maybe Text
$sel:qualifier:AddPermission' :: AddPermission -> Maybe Text
$sel:sourceArn:AddPermission' :: AddPermission -> Maybe Text
$sel:eventSourceToken:AddPermission' :: AddPermission -> Maybe Text
$sel:sourceAccount:AddPermission' :: AddPermission -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"Qualifier" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
qualifier]
data AddPermissionResponse = AddPermissionResponse'
{
AddPermissionResponse -> Maybe Text
statement :: Prelude.Maybe Prelude.Text,
AddPermissionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AddPermissionResponse -> AddPermissionResponse -> Bool
(AddPermissionResponse -> AddPermissionResponse -> Bool)
-> (AddPermissionResponse -> AddPermissionResponse -> Bool)
-> Eq AddPermissionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddPermissionResponse -> AddPermissionResponse -> Bool
$c/= :: AddPermissionResponse -> AddPermissionResponse -> Bool
== :: AddPermissionResponse -> AddPermissionResponse -> Bool
$c== :: AddPermissionResponse -> AddPermissionResponse -> Bool
Prelude.Eq, ReadPrec [AddPermissionResponse]
ReadPrec AddPermissionResponse
Int -> ReadS AddPermissionResponse
ReadS [AddPermissionResponse]
(Int -> ReadS AddPermissionResponse)
-> ReadS [AddPermissionResponse]
-> ReadPrec AddPermissionResponse
-> ReadPrec [AddPermissionResponse]
-> Read AddPermissionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddPermissionResponse]
$creadListPrec :: ReadPrec [AddPermissionResponse]
readPrec :: ReadPrec AddPermissionResponse
$creadPrec :: ReadPrec AddPermissionResponse
readList :: ReadS [AddPermissionResponse]
$creadList :: ReadS [AddPermissionResponse]
readsPrec :: Int -> ReadS AddPermissionResponse
$creadsPrec :: Int -> ReadS AddPermissionResponse
Prelude.Read, Int -> AddPermissionResponse -> ShowS
[AddPermissionResponse] -> ShowS
AddPermissionResponse -> String
(Int -> AddPermissionResponse -> ShowS)
-> (AddPermissionResponse -> String)
-> ([AddPermissionResponse] -> ShowS)
-> Show AddPermissionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddPermissionResponse] -> ShowS
$cshowList :: [AddPermissionResponse] -> ShowS
show :: AddPermissionResponse -> String
$cshow :: AddPermissionResponse -> String
showsPrec :: Int -> AddPermissionResponse -> ShowS
$cshowsPrec :: Int -> AddPermissionResponse -> ShowS
Prelude.Show, (forall x. AddPermissionResponse -> Rep AddPermissionResponse x)
-> (forall x. Rep AddPermissionResponse x -> AddPermissionResponse)
-> Generic AddPermissionResponse
forall x. Rep AddPermissionResponse x -> AddPermissionResponse
forall x. AddPermissionResponse -> Rep AddPermissionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddPermissionResponse x -> AddPermissionResponse
$cfrom :: forall x. AddPermissionResponse -> Rep AddPermissionResponse x
Prelude.Generic)
newAddPermissionResponse ::
Prelude.Int ->
AddPermissionResponse
newAddPermissionResponse :: Int -> AddPermissionResponse
newAddPermissionResponse Int
pHttpStatus_ =
AddPermissionResponse' :: Maybe Text -> Int -> AddPermissionResponse
AddPermissionResponse'
{ $sel:statement:AddPermissionResponse' :: Maybe Text
statement = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:AddPermissionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
addPermissionResponse_statement :: Lens.Lens' AddPermissionResponse (Prelude.Maybe Prelude.Text)
addPermissionResponse_statement :: (Maybe Text -> f (Maybe Text))
-> AddPermissionResponse -> f AddPermissionResponse
addPermissionResponse_statement = (AddPermissionResponse -> Maybe Text)
-> (AddPermissionResponse -> Maybe Text -> AddPermissionResponse)
-> Lens
AddPermissionResponse
AddPermissionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermissionResponse' {Maybe Text
statement :: Maybe Text
$sel:statement:AddPermissionResponse' :: AddPermissionResponse -> Maybe Text
statement} -> Maybe Text
statement) (\s :: AddPermissionResponse
s@AddPermissionResponse' {} Maybe Text
a -> AddPermissionResponse
s {$sel:statement:AddPermissionResponse' :: Maybe Text
statement = Maybe Text
a} :: AddPermissionResponse)
addPermissionResponse_httpStatus :: Lens.Lens' AddPermissionResponse Prelude.Int
addPermissionResponse_httpStatus :: (Int -> f Int) -> AddPermissionResponse -> f AddPermissionResponse
addPermissionResponse_httpStatus = (AddPermissionResponse -> Int)
-> (AddPermissionResponse -> Int -> AddPermissionResponse)
-> Lens AddPermissionResponse AddPermissionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddPermissionResponse' {Int
httpStatus :: Int
$sel:httpStatus:AddPermissionResponse' :: AddPermissionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AddPermissionResponse
s@AddPermissionResponse' {} Int
a -> AddPermissionResponse
s {$sel:httpStatus:AddPermissionResponse' :: Int
httpStatus = Int
a} :: AddPermissionResponse)
instance Prelude.NFData AddPermissionResponse