{-# 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.IoTSiteWise.CreateAccessPolicy
(
CreateAccessPolicy (..),
newCreateAccessPolicy,
createAccessPolicy_clientToken,
createAccessPolicy_tags,
createAccessPolicy_accessPolicyIdentity,
createAccessPolicy_accessPolicyResource,
createAccessPolicy_accessPolicyPermission,
CreateAccessPolicyResponse (..),
newCreateAccessPolicyResponse,
createAccessPolicyResponse_httpStatus,
createAccessPolicyResponse_accessPolicyId,
createAccessPolicyResponse_accessPolicyArn,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.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 CreateAccessPolicy = CreateAccessPolicy'
{
CreateAccessPolicy -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateAccessPolicy -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateAccessPolicy -> Identity
accessPolicyIdentity :: Identity,
CreateAccessPolicy -> Resource
accessPolicyResource :: Resource,
CreateAccessPolicy -> Permission
accessPolicyPermission :: Permission
}
deriving (CreateAccessPolicy -> CreateAccessPolicy -> Bool
(CreateAccessPolicy -> CreateAccessPolicy -> Bool)
-> (CreateAccessPolicy -> CreateAccessPolicy -> Bool)
-> Eq CreateAccessPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAccessPolicy -> CreateAccessPolicy -> Bool
$c/= :: CreateAccessPolicy -> CreateAccessPolicy -> Bool
== :: CreateAccessPolicy -> CreateAccessPolicy -> Bool
$c== :: CreateAccessPolicy -> CreateAccessPolicy -> Bool
Prelude.Eq, ReadPrec [CreateAccessPolicy]
ReadPrec CreateAccessPolicy
Int -> ReadS CreateAccessPolicy
ReadS [CreateAccessPolicy]
(Int -> ReadS CreateAccessPolicy)
-> ReadS [CreateAccessPolicy]
-> ReadPrec CreateAccessPolicy
-> ReadPrec [CreateAccessPolicy]
-> Read CreateAccessPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAccessPolicy]
$creadListPrec :: ReadPrec [CreateAccessPolicy]
readPrec :: ReadPrec CreateAccessPolicy
$creadPrec :: ReadPrec CreateAccessPolicy
readList :: ReadS [CreateAccessPolicy]
$creadList :: ReadS [CreateAccessPolicy]
readsPrec :: Int -> ReadS CreateAccessPolicy
$creadsPrec :: Int -> ReadS CreateAccessPolicy
Prelude.Read, Int -> CreateAccessPolicy -> ShowS
[CreateAccessPolicy] -> ShowS
CreateAccessPolicy -> String
(Int -> CreateAccessPolicy -> ShowS)
-> (CreateAccessPolicy -> String)
-> ([CreateAccessPolicy] -> ShowS)
-> Show CreateAccessPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAccessPolicy] -> ShowS
$cshowList :: [CreateAccessPolicy] -> ShowS
show :: CreateAccessPolicy -> String
$cshow :: CreateAccessPolicy -> String
showsPrec :: Int -> CreateAccessPolicy -> ShowS
$cshowsPrec :: Int -> CreateAccessPolicy -> ShowS
Prelude.Show, (forall x. CreateAccessPolicy -> Rep CreateAccessPolicy x)
-> (forall x. Rep CreateAccessPolicy x -> CreateAccessPolicy)
-> Generic CreateAccessPolicy
forall x. Rep CreateAccessPolicy x -> CreateAccessPolicy
forall x. CreateAccessPolicy -> Rep CreateAccessPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAccessPolicy x -> CreateAccessPolicy
$cfrom :: forall x. CreateAccessPolicy -> Rep CreateAccessPolicy x
Prelude.Generic)
newCreateAccessPolicy ::
Identity ->
Resource ->
Permission ->
CreateAccessPolicy
newCreateAccessPolicy :: Identity -> Resource -> Permission -> CreateAccessPolicy
newCreateAccessPolicy
Identity
pAccessPolicyIdentity_
Resource
pAccessPolicyResource_
Permission
pAccessPolicyPermission_ =
CreateAccessPolicy' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Identity
-> Resource
-> Permission
-> CreateAccessPolicy
CreateAccessPolicy'
{ $sel:clientToken:CreateAccessPolicy' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateAccessPolicy' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:accessPolicyIdentity:CreateAccessPolicy' :: Identity
accessPolicyIdentity = Identity
pAccessPolicyIdentity_,
$sel:accessPolicyResource:CreateAccessPolicy' :: Resource
accessPolicyResource = Resource
pAccessPolicyResource_,
$sel:accessPolicyPermission:CreateAccessPolicy' :: Permission
accessPolicyPermission = Permission
pAccessPolicyPermission_
}
createAccessPolicy_clientToken :: Lens.Lens' CreateAccessPolicy (Prelude.Maybe Prelude.Text)
createAccessPolicy_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateAccessPolicy -> f CreateAccessPolicy
createAccessPolicy_clientToken = (CreateAccessPolicy -> Maybe Text)
-> (CreateAccessPolicy -> Maybe Text -> CreateAccessPolicy)
-> Lens
CreateAccessPolicy CreateAccessPolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccessPolicy' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateAccessPolicy' :: CreateAccessPolicy -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateAccessPolicy
s@CreateAccessPolicy' {} Maybe Text
a -> CreateAccessPolicy
s {$sel:clientToken:CreateAccessPolicy' :: Maybe Text
clientToken = Maybe Text
a} :: CreateAccessPolicy)
createAccessPolicy_tags :: Lens.Lens' CreateAccessPolicy (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAccessPolicy_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAccessPolicy -> f CreateAccessPolicy
createAccessPolicy_tags = (CreateAccessPolicy -> Maybe (HashMap Text Text))
-> (CreateAccessPolicy
-> Maybe (HashMap Text Text) -> CreateAccessPolicy)
-> Lens
CreateAccessPolicy
CreateAccessPolicy
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccessPolicy' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateAccessPolicy' :: CreateAccessPolicy -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateAccessPolicy
s@CreateAccessPolicy' {} Maybe (HashMap Text Text)
a -> CreateAccessPolicy
s {$sel:tags:CreateAccessPolicy' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateAccessPolicy) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAccessPolicy -> f CreateAccessPolicy)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAccessPolicy
-> f CreateAccessPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAccessPolicy_accessPolicyIdentity :: Lens.Lens' CreateAccessPolicy Identity
createAccessPolicy_accessPolicyIdentity :: (Identity -> f Identity)
-> CreateAccessPolicy -> f CreateAccessPolicy
createAccessPolicy_accessPolicyIdentity = (CreateAccessPolicy -> Identity)
-> (CreateAccessPolicy -> Identity -> CreateAccessPolicy)
-> Lens CreateAccessPolicy CreateAccessPolicy Identity Identity
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccessPolicy' {Identity
accessPolicyIdentity :: Identity
$sel:accessPolicyIdentity:CreateAccessPolicy' :: CreateAccessPolicy -> Identity
accessPolicyIdentity} -> Identity
accessPolicyIdentity) (\s :: CreateAccessPolicy
s@CreateAccessPolicy' {} Identity
a -> CreateAccessPolicy
s {$sel:accessPolicyIdentity:CreateAccessPolicy' :: Identity
accessPolicyIdentity = Identity
a} :: CreateAccessPolicy)
createAccessPolicy_accessPolicyResource :: Lens.Lens' CreateAccessPolicy Resource
createAccessPolicy_accessPolicyResource :: (Resource -> f Resource)
-> CreateAccessPolicy -> f CreateAccessPolicy
createAccessPolicy_accessPolicyResource = (CreateAccessPolicy -> Resource)
-> (CreateAccessPolicy -> Resource -> CreateAccessPolicy)
-> Lens CreateAccessPolicy CreateAccessPolicy Resource Resource
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccessPolicy' {Resource
accessPolicyResource :: Resource
$sel:accessPolicyResource:CreateAccessPolicy' :: CreateAccessPolicy -> Resource
accessPolicyResource} -> Resource
accessPolicyResource) (\s :: CreateAccessPolicy
s@CreateAccessPolicy' {} Resource
a -> CreateAccessPolicy
s {$sel:accessPolicyResource:CreateAccessPolicy' :: Resource
accessPolicyResource = Resource
a} :: CreateAccessPolicy)
createAccessPolicy_accessPolicyPermission :: Lens.Lens' CreateAccessPolicy Permission
createAccessPolicy_accessPolicyPermission :: (Permission -> f Permission)
-> CreateAccessPolicy -> f CreateAccessPolicy
createAccessPolicy_accessPolicyPermission = (CreateAccessPolicy -> Permission)
-> (CreateAccessPolicy -> Permission -> CreateAccessPolicy)
-> Lens CreateAccessPolicy CreateAccessPolicy Permission Permission
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccessPolicy' {Permission
accessPolicyPermission :: Permission
$sel:accessPolicyPermission:CreateAccessPolicy' :: CreateAccessPolicy -> Permission
accessPolicyPermission} -> Permission
accessPolicyPermission) (\s :: CreateAccessPolicy
s@CreateAccessPolicy' {} Permission
a -> CreateAccessPolicy
s {$sel:accessPolicyPermission:CreateAccessPolicy' :: Permission
accessPolicyPermission = Permission
a} :: CreateAccessPolicy)
instance Core.AWSRequest CreateAccessPolicy where
type
AWSResponse CreateAccessPolicy =
CreateAccessPolicyResponse
request :: CreateAccessPolicy -> Request CreateAccessPolicy
request = Service -> CreateAccessPolicy -> Request CreateAccessPolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateAccessPolicy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateAccessPolicy)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateAccessPolicy))
-> Logger
-> Service
-> Proxy CreateAccessPolicy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateAccessPolicy)))
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 ->
Int -> Text -> Text -> CreateAccessPolicyResponse
CreateAccessPolicyResponse'
(Int -> Text -> Text -> CreateAccessPolicyResponse)
-> Either String Int
-> Either String (Text -> Text -> CreateAccessPolicyResponse)
forall (f :: * -> *) a b. Functor 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))
Either String (Text -> Text -> CreateAccessPolicyResponse)
-> Either String Text
-> Either String (Text -> CreateAccessPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"accessPolicyId")
Either String (Text -> CreateAccessPolicyResponse)
-> Either String Text -> Either String CreateAccessPolicyResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"accessPolicyArn")
)
instance Prelude.Hashable CreateAccessPolicy
instance Prelude.NFData CreateAccessPolicy
instance Core.ToHeaders CreateAccessPolicy where
toHeaders :: CreateAccessPolicy -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateAccessPolicy -> 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 CreateAccessPolicy where
toJSON :: CreateAccessPolicy -> Value
toJSON CreateAccessPolicy' {Maybe Text
Maybe (HashMap Text Text)
Permission
Resource
Identity
accessPolicyPermission :: Permission
accessPolicyResource :: Resource
accessPolicyIdentity :: Identity
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
$sel:accessPolicyPermission:CreateAccessPolicy' :: CreateAccessPolicy -> Permission
$sel:accessPolicyResource:CreateAccessPolicy' :: CreateAccessPolicy -> Resource
$sel:accessPolicyIdentity:CreateAccessPolicy' :: CreateAccessPolicy -> Identity
$sel:tags:CreateAccessPolicy' :: CreateAccessPolicy -> Maybe (HashMap Text Text)
$sel:clientToken:CreateAccessPolicy' :: CreateAccessPolicy -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"clientToken" 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
clientToken,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"accessPolicyIdentity"
Text -> Identity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Identity
accessPolicyIdentity
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"accessPolicyResource"
Text -> Resource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Resource
accessPolicyResource
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"accessPolicyPermission"
Text -> Permission -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Permission
accessPolicyPermission
)
]
)
instance Core.ToPath CreateAccessPolicy where
toPath :: CreateAccessPolicy -> ByteString
toPath = ByteString -> CreateAccessPolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/access-policies"
instance Core.ToQuery CreateAccessPolicy where
toQuery :: CreateAccessPolicy -> QueryString
toQuery = QueryString -> CreateAccessPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateAccessPolicyResponse = CreateAccessPolicyResponse'
{
CreateAccessPolicyResponse -> Int
httpStatus :: Prelude.Int,
CreateAccessPolicyResponse -> Text
accessPolicyId :: Prelude.Text,
CreateAccessPolicyResponse -> Text
accessPolicyArn :: Prelude.Text
}
deriving (CreateAccessPolicyResponse -> CreateAccessPolicyResponse -> Bool
(CreateAccessPolicyResponse -> CreateAccessPolicyResponse -> Bool)
-> (CreateAccessPolicyResponse
-> CreateAccessPolicyResponse -> Bool)
-> Eq CreateAccessPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAccessPolicyResponse -> CreateAccessPolicyResponse -> Bool
$c/= :: CreateAccessPolicyResponse -> CreateAccessPolicyResponse -> Bool
== :: CreateAccessPolicyResponse -> CreateAccessPolicyResponse -> Bool
$c== :: CreateAccessPolicyResponse -> CreateAccessPolicyResponse -> Bool
Prelude.Eq, ReadPrec [CreateAccessPolicyResponse]
ReadPrec CreateAccessPolicyResponse
Int -> ReadS CreateAccessPolicyResponse
ReadS [CreateAccessPolicyResponse]
(Int -> ReadS CreateAccessPolicyResponse)
-> ReadS [CreateAccessPolicyResponse]
-> ReadPrec CreateAccessPolicyResponse
-> ReadPrec [CreateAccessPolicyResponse]
-> Read CreateAccessPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAccessPolicyResponse]
$creadListPrec :: ReadPrec [CreateAccessPolicyResponse]
readPrec :: ReadPrec CreateAccessPolicyResponse
$creadPrec :: ReadPrec CreateAccessPolicyResponse
readList :: ReadS [CreateAccessPolicyResponse]
$creadList :: ReadS [CreateAccessPolicyResponse]
readsPrec :: Int -> ReadS CreateAccessPolicyResponse
$creadsPrec :: Int -> ReadS CreateAccessPolicyResponse
Prelude.Read, Int -> CreateAccessPolicyResponse -> ShowS
[CreateAccessPolicyResponse] -> ShowS
CreateAccessPolicyResponse -> String
(Int -> CreateAccessPolicyResponse -> ShowS)
-> (CreateAccessPolicyResponse -> String)
-> ([CreateAccessPolicyResponse] -> ShowS)
-> Show CreateAccessPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAccessPolicyResponse] -> ShowS
$cshowList :: [CreateAccessPolicyResponse] -> ShowS
show :: CreateAccessPolicyResponse -> String
$cshow :: CreateAccessPolicyResponse -> String
showsPrec :: Int -> CreateAccessPolicyResponse -> ShowS
$cshowsPrec :: Int -> CreateAccessPolicyResponse -> ShowS
Prelude.Show, (forall x.
CreateAccessPolicyResponse -> Rep CreateAccessPolicyResponse x)
-> (forall x.
Rep CreateAccessPolicyResponse x -> CreateAccessPolicyResponse)
-> Generic CreateAccessPolicyResponse
forall x.
Rep CreateAccessPolicyResponse x -> CreateAccessPolicyResponse
forall x.
CreateAccessPolicyResponse -> Rep CreateAccessPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAccessPolicyResponse x -> CreateAccessPolicyResponse
$cfrom :: forall x.
CreateAccessPolicyResponse -> Rep CreateAccessPolicyResponse x
Prelude.Generic)
newCreateAccessPolicyResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
CreateAccessPolicyResponse
newCreateAccessPolicyResponse :: Int -> Text -> Text -> CreateAccessPolicyResponse
newCreateAccessPolicyResponse
Int
pHttpStatus_
Text
pAccessPolicyId_
Text
pAccessPolicyArn_ =
CreateAccessPolicyResponse' :: Int -> Text -> Text -> CreateAccessPolicyResponse
CreateAccessPolicyResponse'
{ $sel:httpStatus:CreateAccessPolicyResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:accessPolicyId:CreateAccessPolicyResponse' :: Text
accessPolicyId = Text
pAccessPolicyId_,
$sel:accessPolicyArn:CreateAccessPolicyResponse' :: Text
accessPolicyArn = Text
pAccessPolicyArn_
}
createAccessPolicyResponse_httpStatus :: Lens.Lens' CreateAccessPolicyResponse Prelude.Int
createAccessPolicyResponse_httpStatus :: (Int -> f Int)
-> CreateAccessPolicyResponse -> f CreateAccessPolicyResponse
createAccessPolicyResponse_httpStatus = (CreateAccessPolicyResponse -> Int)
-> (CreateAccessPolicyResponse
-> Int -> CreateAccessPolicyResponse)
-> Lens
CreateAccessPolicyResponse CreateAccessPolicyResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccessPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAccessPolicyResponse' :: CreateAccessPolicyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAccessPolicyResponse
s@CreateAccessPolicyResponse' {} Int
a -> CreateAccessPolicyResponse
s {$sel:httpStatus:CreateAccessPolicyResponse' :: Int
httpStatus = Int
a} :: CreateAccessPolicyResponse)
createAccessPolicyResponse_accessPolicyId :: Lens.Lens' CreateAccessPolicyResponse Prelude.Text
createAccessPolicyResponse_accessPolicyId :: (Text -> f Text)
-> CreateAccessPolicyResponse -> f CreateAccessPolicyResponse
createAccessPolicyResponse_accessPolicyId = (CreateAccessPolicyResponse -> Text)
-> (CreateAccessPolicyResponse
-> Text -> CreateAccessPolicyResponse)
-> Lens
CreateAccessPolicyResponse CreateAccessPolicyResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccessPolicyResponse' {Text
accessPolicyId :: Text
$sel:accessPolicyId:CreateAccessPolicyResponse' :: CreateAccessPolicyResponse -> Text
accessPolicyId} -> Text
accessPolicyId) (\s :: CreateAccessPolicyResponse
s@CreateAccessPolicyResponse' {} Text
a -> CreateAccessPolicyResponse
s {$sel:accessPolicyId:CreateAccessPolicyResponse' :: Text
accessPolicyId = Text
a} :: CreateAccessPolicyResponse)
createAccessPolicyResponse_accessPolicyArn :: Lens.Lens' CreateAccessPolicyResponse Prelude.Text
createAccessPolicyResponse_accessPolicyArn :: (Text -> f Text)
-> CreateAccessPolicyResponse -> f CreateAccessPolicyResponse
createAccessPolicyResponse_accessPolicyArn = (CreateAccessPolicyResponse -> Text)
-> (CreateAccessPolicyResponse
-> Text -> CreateAccessPolicyResponse)
-> Lens
CreateAccessPolicyResponse CreateAccessPolicyResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccessPolicyResponse' {Text
accessPolicyArn :: Text
$sel:accessPolicyArn:CreateAccessPolicyResponse' :: CreateAccessPolicyResponse -> Text
accessPolicyArn} -> Text
accessPolicyArn) (\s :: CreateAccessPolicyResponse
s@CreateAccessPolicyResponse' {} Text
a -> CreateAccessPolicyResponse
s {$sel:accessPolicyArn:CreateAccessPolicyResponse' :: Text
accessPolicyArn = Text
a} :: CreateAccessPolicyResponse)
instance Prelude.NFData CreateAccessPolicyResponse