{-# 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.CodeArtifact.PutRepositoryPermissionsPolicy
(
PutRepositoryPermissionsPolicy (..),
newPutRepositoryPermissionsPolicy,
putRepositoryPermissionsPolicy_policyRevision,
putRepositoryPermissionsPolicy_domainOwner,
putRepositoryPermissionsPolicy_domain,
putRepositoryPermissionsPolicy_repository,
putRepositoryPermissionsPolicy_policyDocument,
PutRepositoryPermissionsPolicyResponse (..),
newPutRepositoryPermissionsPolicyResponse,
putRepositoryPermissionsPolicyResponse_policy,
putRepositoryPermissionsPolicyResponse_httpStatus,
)
where
import Amazonka.CodeArtifact.Types
import qualified Amazonka.Core as Core
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 PutRepositoryPermissionsPolicy = PutRepositoryPermissionsPolicy'
{
PutRepositoryPermissionsPolicy -> Maybe Text
policyRevision :: Prelude.Maybe Prelude.Text,
PutRepositoryPermissionsPolicy -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
PutRepositoryPermissionsPolicy -> Text
domain :: Prelude.Text,
PutRepositoryPermissionsPolicy -> Text
repository :: Prelude.Text,
PutRepositoryPermissionsPolicy -> Text
policyDocument :: Prelude.Text
}
deriving (PutRepositoryPermissionsPolicy
-> PutRepositoryPermissionsPolicy -> Bool
(PutRepositoryPermissionsPolicy
-> PutRepositoryPermissionsPolicy -> Bool)
-> (PutRepositoryPermissionsPolicy
-> PutRepositoryPermissionsPolicy -> Bool)
-> Eq PutRepositoryPermissionsPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutRepositoryPermissionsPolicy
-> PutRepositoryPermissionsPolicy -> Bool
$c/= :: PutRepositoryPermissionsPolicy
-> PutRepositoryPermissionsPolicy -> Bool
== :: PutRepositoryPermissionsPolicy
-> PutRepositoryPermissionsPolicy -> Bool
$c== :: PutRepositoryPermissionsPolicy
-> PutRepositoryPermissionsPolicy -> Bool
Prelude.Eq, ReadPrec [PutRepositoryPermissionsPolicy]
ReadPrec PutRepositoryPermissionsPolicy
Int -> ReadS PutRepositoryPermissionsPolicy
ReadS [PutRepositoryPermissionsPolicy]
(Int -> ReadS PutRepositoryPermissionsPolicy)
-> ReadS [PutRepositoryPermissionsPolicy]
-> ReadPrec PutRepositoryPermissionsPolicy
-> ReadPrec [PutRepositoryPermissionsPolicy]
-> Read PutRepositoryPermissionsPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutRepositoryPermissionsPolicy]
$creadListPrec :: ReadPrec [PutRepositoryPermissionsPolicy]
readPrec :: ReadPrec PutRepositoryPermissionsPolicy
$creadPrec :: ReadPrec PutRepositoryPermissionsPolicy
readList :: ReadS [PutRepositoryPermissionsPolicy]
$creadList :: ReadS [PutRepositoryPermissionsPolicy]
readsPrec :: Int -> ReadS PutRepositoryPermissionsPolicy
$creadsPrec :: Int -> ReadS PutRepositoryPermissionsPolicy
Prelude.Read, Int -> PutRepositoryPermissionsPolicy -> ShowS
[PutRepositoryPermissionsPolicy] -> ShowS
PutRepositoryPermissionsPolicy -> String
(Int -> PutRepositoryPermissionsPolicy -> ShowS)
-> (PutRepositoryPermissionsPolicy -> String)
-> ([PutRepositoryPermissionsPolicy] -> ShowS)
-> Show PutRepositoryPermissionsPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutRepositoryPermissionsPolicy] -> ShowS
$cshowList :: [PutRepositoryPermissionsPolicy] -> ShowS
show :: PutRepositoryPermissionsPolicy -> String
$cshow :: PutRepositoryPermissionsPolicy -> String
showsPrec :: Int -> PutRepositoryPermissionsPolicy -> ShowS
$cshowsPrec :: Int -> PutRepositoryPermissionsPolicy -> ShowS
Prelude.Show, (forall x.
PutRepositoryPermissionsPolicy
-> Rep PutRepositoryPermissionsPolicy x)
-> (forall x.
Rep PutRepositoryPermissionsPolicy x
-> PutRepositoryPermissionsPolicy)
-> Generic PutRepositoryPermissionsPolicy
forall x.
Rep PutRepositoryPermissionsPolicy x
-> PutRepositoryPermissionsPolicy
forall x.
PutRepositoryPermissionsPolicy
-> Rep PutRepositoryPermissionsPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutRepositoryPermissionsPolicy x
-> PutRepositoryPermissionsPolicy
$cfrom :: forall x.
PutRepositoryPermissionsPolicy
-> Rep PutRepositoryPermissionsPolicy x
Prelude.Generic)
newPutRepositoryPermissionsPolicy ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
PutRepositoryPermissionsPolicy
newPutRepositoryPermissionsPolicy :: Text -> Text -> Text -> PutRepositoryPermissionsPolicy
newPutRepositoryPermissionsPolicy
Text
pDomain_
Text
pRepository_
Text
pPolicyDocument_ =
PutRepositoryPermissionsPolicy' :: Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> PutRepositoryPermissionsPolicy
PutRepositoryPermissionsPolicy'
{ $sel:policyRevision:PutRepositoryPermissionsPolicy' :: Maybe Text
policyRevision =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainOwner:PutRepositoryPermissionsPolicy' :: Maybe Text
domainOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domain:PutRepositoryPermissionsPolicy' :: Text
domain = Text
pDomain_,
$sel:repository:PutRepositoryPermissionsPolicy' :: Text
repository = Text
pRepository_,
$sel:policyDocument:PutRepositoryPermissionsPolicy' :: Text
policyDocument = Text
pPolicyDocument_
}
putRepositoryPermissionsPolicy_policyRevision :: Lens.Lens' PutRepositoryPermissionsPolicy (Prelude.Maybe Prelude.Text)
putRepositoryPermissionsPolicy_policyRevision :: (Maybe Text -> f (Maybe Text))
-> PutRepositoryPermissionsPolicy
-> f PutRepositoryPermissionsPolicy
putRepositoryPermissionsPolicy_policyRevision = (PutRepositoryPermissionsPolicy -> Maybe Text)
-> (PutRepositoryPermissionsPolicy
-> Maybe Text -> PutRepositoryPermissionsPolicy)
-> Lens
PutRepositoryPermissionsPolicy
PutRepositoryPermissionsPolicy
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRepositoryPermissionsPolicy' {Maybe Text
policyRevision :: Maybe Text
$sel:policyRevision:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Maybe Text
policyRevision} -> Maybe Text
policyRevision) (\s :: PutRepositoryPermissionsPolicy
s@PutRepositoryPermissionsPolicy' {} Maybe Text
a -> PutRepositoryPermissionsPolicy
s {$sel:policyRevision:PutRepositoryPermissionsPolicy' :: Maybe Text
policyRevision = Maybe Text
a} :: PutRepositoryPermissionsPolicy)
putRepositoryPermissionsPolicy_domainOwner :: Lens.Lens' PutRepositoryPermissionsPolicy (Prelude.Maybe Prelude.Text)
putRepositoryPermissionsPolicy_domainOwner :: (Maybe Text -> f (Maybe Text))
-> PutRepositoryPermissionsPolicy
-> f PutRepositoryPermissionsPolicy
putRepositoryPermissionsPolicy_domainOwner = (PutRepositoryPermissionsPolicy -> Maybe Text)
-> (PutRepositoryPermissionsPolicy
-> Maybe Text -> PutRepositoryPermissionsPolicy)
-> Lens
PutRepositoryPermissionsPolicy
PutRepositoryPermissionsPolicy
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRepositoryPermissionsPolicy' {Maybe Text
domainOwner :: Maybe Text
$sel:domainOwner:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Maybe Text
domainOwner} -> Maybe Text
domainOwner) (\s :: PutRepositoryPermissionsPolicy
s@PutRepositoryPermissionsPolicy' {} Maybe Text
a -> PutRepositoryPermissionsPolicy
s {$sel:domainOwner:PutRepositoryPermissionsPolicy' :: Maybe Text
domainOwner = Maybe Text
a} :: PutRepositoryPermissionsPolicy)
putRepositoryPermissionsPolicy_domain :: Lens.Lens' PutRepositoryPermissionsPolicy Prelude.Text
putRepositoryPermissionsPolicy_domain :: (Text -> f Text)
-> PutRepositoryPermissionsPolicy
-> f PutRepositoryPermissionsPolicy
putRepositoryPermissionsPolicy_domain = (PutRepositoryPermissionsPolicy -> Text)
-> (PutRepositoryPermissionsPolicy
-> Text -> PutRepositoryPermissionsPolicy)
-> Lens
PutRepositoryPermissionsPolicy
PutRepositoryPermissionsPolicy
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRepositoryPermissionsPolicy' {Text
domain :: Text
$sel:domain:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Text
domain} -> Text
domain) (\s :: PutRepositoryPermissionsPolicy
s@PutRepositoryPermissionsPolicy' {} Text
a -> PutRepositoryPermissionsPolicy
s {$sel:domain:PutRepositoryPermissionsPolicy' :: Text
domain = Text
a} :: PutRepositoryPermissionsPolicy)
putRepositoryPermissionsPolicy_repository :: Lens.Lens' PutRepositoryPermissionsPolicy Prelude.Text
putRepositoryPermissionsPolicy_repository :: (Text -> f Text)
-> PutRepositoryPermissionsPolicy
-> f PutRepositoryPermissionsPolicy
putRepositoryPermissionsPolicy_repository = (PutRepositoryPermissionsPolicy -> Text)
-> (PutRepositoryPermissionsPolicy
-> Text -> PutRepositoryPermissionsPolicy)
-> Lens
PutRepositoryPermissionsPolicy
PutRepositoryPermissionsPolicy
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRepositoryPermissionsPolicy' {Text
repository :: Text
$sel:repository:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Text
repository} -> Text
repository) (\s :: PutRepositoryPermissionsPolicy
s@PutRepositoryPermissionsPolicy' {} Text
a -> PutRepositoryPermissionsPolicy
s {$sel:repository:PutRepositoryPermissionsPolicy' :: Text
repository = Text
a} :: PutRepositoryPermissionsPolicy)
putRepositoryPermissionsPolicy_policyDocument :: Lens.Lens' PutRepositoryPermissionsPolicy Prelude.Text
putRepositoryPermissionsPolicy_policyDocument :: (Text -> f Text)
-> PutRepositoryPermissionsPolicy
-> f PutRepositoryPermissionsPolicy
putRepositoryPermissionsPolicy_policyDocument = (PutRepositoryPermissionsPolicy -> Text)
-> (PutRepositoryPermissionsPolicy
-> Text -> PutRepositoryPermissionsPolicy)
-> Lens
PutRepositoryPermissionsPolicy
PutRepositoryPermissionsPolicy
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRepositoryPermissionsPolicy' {Text
policyDocument :: Text
$sel:policyDocument:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Text
policyDocument} -> Text
policyDocument) (\s :: PutRepositoryPermissionsPolicy
s@PutRepositoryPermissionsPolicy' {} Text
a -> PutRepositoryPermissionsPolicy
s {$sel:policyDocument:PutRepositoryPermissionsPolicy' :: Text
policyDocument = Text
a} :: PutRepositoryPermissionsPolicy)
instance
Core.AWSRequest
PutRepositoryPermissionsPolicy
where
type
AWSResponse PutRepositoryPermissionsPolicy =
PutRepositoryPermissionsPolicyResponse
request :: PutRepositoryPermissionsPolicy
-> Request PutRepositoryPermissionsPolicy
request = Service
-> PutRepositoryPermissionsPolicy
-> Request PutRepositoryPermissionsPolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PutRepositoryPermissionsPolicy
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse PutRepositoryPermissionsPolicy)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse PutRepositoryPermissionsPolicy))
-> Logger
-> Service
-> Proxy PutRepositoryPermissionsPolicy
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse PutRepositoryPermissionsPolicy)))
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 ResourcePolicy
-> Int -> PutRepositoryPermissionsPolicyResponse
PutRepositoryPermissionsPolicyResponse'
(Maybe ResourcePolicy
-> Int -> PutRepositoryPermissionsPolicyResponse)
-> Either String (Maybe ResourcePolicy)
-> Either String (Int -> PutRepositoryPermissionsPolicyResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ResourcePolicy)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"policy")
Either String (Int -> PutRepositoryPermissionsPolicyResponse)
-> Either String Int
-> Either String PutRepositoryPermissionsPolicyResponse
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
PutRepositoryPermissionsPolicy
instance
Prelude.NFData
PutRepositoryPermissionsPolicy
instance
Core.ToHeaders
PutRepositoryPermissionsPolicy
where
toHeaders :: PutRepositoryPermissionsPolicy -> ResponseHeaders
toHeaders =
ResponseHeaders
-> PutRepositoryPermissionsPolicy -> 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 PutRepositoryPermissionsPolicy where
toJSON :: PutRepositoryPermissionsPolicy -> Value
toJSON PutRepositoryPermissionsPolicy' {Maybe Text
Text
policyDocument :: Text
repository :: Text
domain :: Text
domainOwner :: Maybe Text
policyRevision :: Maybe Text
$sel:policyDocument:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Text
$sel:repository:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Text
$sel:domain:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Text
$sel:domainOwner:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Maybe Text
$sel:policyRevision:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"policyRevision" 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
policyRevision,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"policyDocument" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
policyDocument)
]
)
instance Core.ToPath PutRepositoryPermissionsPolicy where
toPath :: PutRepositoryPermissionsPolicy -> ByteString
toPath =
ByteString -> PutRepositoryPermissionsPolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/repository/permissions/policy"
instance Core.ToQuery PutRepositoryPermissionsPolicy where
toQuery :: PutRepositoryPermissionsPolicy -> QueryString
toQuery PutRepositoryPermissionsPolicy' {Maybe Text
Text
policyDocument :: Text
repository :: Text
domain :: Text
domainOwner :: Maybe Text
policyRevision :: Maybe Text
$sel:policyDocument:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Text
$sel:repository:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Text
$sel:domain:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Text
$sel:domainOwner:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Maybe Text
$sel:policyRevision:PutRepositoryPermissionsPolicy' :: PutRepositoryPermissionsPolicy -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"domain-owner" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
domainOwner,
ByteString
"domain" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
domain,
ByteString
"repository" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
repository
]
data PutRepositoryPermissionsPolicyResponse = PutRepositoryPermissionsPolicyResponse'
{
PutRepositoryPermissionsPolicyResponse -> Maybe ResourcePolicy
policy :: Prelude.Maybe ResourcePolicy,
PutRepositoryPermissionsPolicyResponse -> Int
httpStatus :: Prelude.Int
}
deriving (PutRepositoryPermissionsPolicyResponse
-> PutRepositoryPermissionsPolicyResponse -> Bool
(PutRepositoryPermissionsPolicyResponse
-> PutRepositoryPermissionsPolicyResponse -> Bool)
-> (PutRepositoryPermissionsPolicyResponse
-> PutRepositoryPermissionsPolicyResponse -> Bool)
-> Eq PutRepositoryPermissionsPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutRepositoryPermissionsPolicyResponse
-> PutRepositoryPermissionsPolicyResponse -> Bool
$c/= :: PutRepositoryPermissionsPolicyResponse
-> PutRepositoryPermissionsPolicyResponse -> Bool
== :: PutRepositoryPermissionsPolicyResponse
-> PutRepositoryPermissionsPolicyResponse -> Bool
$c== :: PutRepositoryPermissionsPolicyResponse
-> PutRepositoryPermissionsPolicyResponse -> Bool
Prelude.Eq, ReadPrec [PutRepositoryPermissionsPolicyResponse]
ReadPrec PutRepositoryPermissionsPolicyResponse
Int -> ReadS PutRepositoryPermissionsPolicyResponse
ReadS [PutRepositoryPermissionsPolicyResponse]
(Int -> ReadS PutRepositoryPermissionsPolicyResponse)
-> ReadS [PutRepositoryPermissionsPolicyResponse]
-> ReadPrec PutRepositoryPermissionsPolicyResponse
-> ReadPrec [PutRepositoryPermissionsPolicyResponse]
-> Read PutRepositoryPermissionsPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutRepositoryPermissionsPolicyResponse]
$creadListPrec :: ReadPrec [PutRepositoryPermissionsPolicyResponse]
readPrec :: ReadPrec PutRepositoryPermissionsPolicyResponse
$creadPrec :: ReadPrec PutRepositoryPermissionsPolicyResponse
readList :: ReadS [PutRepositoryPermissionsPolicyResponse]
$creadList :: ReadS [PutRepositoryPermissionsPolicyResponse]
readsPrec :: Int -> ReadS PutRepositoryPermissionsPolicyResponse
$creadsPrec :: Int -> ReadS PutRepositoryPermissionsPolicyResponse
Prelude.Read, Int -> PutRepositoryPermissionsPolicyResponse -> ShowS
[PutRepositoryPermissionsPolicyResponse] -> ShowS
PutRepositoryPermissionsPolicyResponse -> String
(Int -> PutRepositoryPermissionsPolicyResponse -> ShowS)
-> (PutRepositoryPermissionsPolicyResponse -> String)
-> ([PutRepositoryPermissionsPolicyResponse] -> ShowS)
-> Show PutRepositoryPermissionsPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutRepositoryPermissionsPolicyResponse] -> ShowS
$cshowList :: [PutRepositoryPermissionsPolicyResponse] -> ShowS
show :: PutRepositoryPermissionsPolicyResponse -> String
$cshow :: PutRepositoryPermissionsPolicyResponse -> String
showsPrec :: Int -> PutRepositoryPermissionsPolicyResponse -> ShowS
$cshowsPrec :: Int -> PutRepositoryPermissionsPolicyResponse -> ShowS
Prelude.Show, (forall x.
PutRepositoryPermissionsPolicyResponse
-> Rep PutRepositoryPermissionsPolicyResponse x)
-> (forall x.
Rep PutRepositoryPermissionsPolicyResponse x
-> PutRepositoryPermissionsPolicyResponse)
-> Generic PutRepositoryPermissionsPolicyResponse
forall x.
Rep PutRepositoryPermissionsPolicyResponse x
-> PutRepositoryPermissionsPolicyResponse
forall x.
PutRepositoryPermissionsPolicyResponse
-> Rep PutRepositoryPermissionsPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutRepositoryPermissionsPolicyResponse x
-> PutRepositoryPermissionsPolicyResponse
$cfrom :: forall x.
PutRepositoryPermissionsPolicyResponse
-> Rep PutRepositoryPermissionsPolicyResponse x
Prelude.Generic)
newPutRepositoryPermissionsPolicyResponse ::
Prelude.Int ->
PutRepositoryPermissionsPolicyResponse
newPutRepositoryPermissionsPolicyResponse :: Int -> PutRepositoryPermissionsPolicyResponse
newPutRepositoryPermissionsPolicyResponse
Int
pHttpStatus_ =
PutRepositoryPermissionsPolicyResponse' :: Maybe ResourcePolicy
-> Int -> PutRepositoryPermissionsPolicyResponse
PutRepositoryPermissionsPolicyResponse'
{ $sel:policy:PutRepositoryPermissionsPolicyResponse' :: Maybe ResourcePolicy
policy =
Maybe ResourcePolicy
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:PutRepositoryPermissionsPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
}
putRepositoryPermissionsPolicyResponse_policy :: Lens.Lens' PutRepositoryPermissionsPolicyResponse (Prelude.Maybe ResourcePolicy)
putRepositoryPermissionsPolicyResponse_policy :: (Maybe ResourcePolicy -> f (Maybe ResourcePolicy))
-> PutRepositoryPermissionsPolicyResponse
-> f PutRepositoryPermissionsPolicyResponse
putRepositoryPermissionsPolicyResponse_policy = (PutRepositoryPermissionsPolicyResponse -> Maybe ResourcePolicy)
-> (PutRepositoryPermissionsPolicyResponse
-> Maybe ResourcePolicy -> PutRepositoryPermissionsPolicyResponse)
-> Lens
PutRepositoryPermissionsPolicyResponse
PutRepositoryPermissionsPolicyResponse
(Maybe ResourcePolicy)
(Maybe ResourcePolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRepositoryPermissionsPolicyResponse' {Maybe ResourcePolicy
policy :: Maybe ResourcePolicy
$sel:policy:PutRepositoryPermissionsPolicyResponse' :: PutRepositoryPermissionsPolicyResponse -> Maybe ResourcePolicy
policy} -> Maybe ResourcePolicy
policy) (\s :: PutRepositoryPermissionsPolicyResponse
s@PutRepositoryPermissionsPolicyResponse' {} Maybe ResourcePolicy
a -> PutRepositoryPermissionsPolicyResponse
s {$sel:policy:PutRepositoryPermissionsPolicyResponse' :: Maybe ResourcePolicy
policy = Maybe ResourcePolicy
a} :: PutRepositoryPermissionsPolicyResponse)
putRepositoryPermissionsPolicyResponse_httpStatus :: Lens.Lens' PutRepositoryPermissionsPolicyResponse Prelude.Int
putRepositoryPermissionsPolicyResponse_httpStatus :: (Int -> f Int)
-> PutRepositoryPermissionsPolicyResponse
-> f PutRepositoryPermissionsPolicyResponse
putRepositoryPermissionsPolicyResponse_httpStatus = (PutRepositoryPermissionsPolicyResponse -> Int)
-> (PutRepositoryPermissionsPolicyResponse
-> Int -> PutRepositoryPermissionsPolicyResponse)
-> Lens
PutRepositoryPermissionsPolicyResponse
PutRepositoryPermissionsPolicyResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRepositoryPermissionsPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutRepositoryPermissionsPolicyResponse' :: PutRepositoryPermissionsPolicyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutRepositoryPermissionsPolicyResponse
s@PutRepositoryPermissionsPolicyResponse' {} Int
a -> PutRepositoryPermissionsPolicyResponse
s {$sel:httpStatus:PutRepositoryPermissionsPolicyResponse' :: Int
httpStatus = Int
a} :: PutRepositoryPermissionsPolicyResponse)
instance
Prelude.NFData
PutRepositoryPermissionsPolicyResponse