{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CodeArtifact.GetRepositoryPermissionsPolicy
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the resource policy that is set on a repository.
module Amazonka.CodeArtifact.GetRepositoryPermissionsPolicy
  ( -- * Creating a Request
    GetRepositoryPermissionsPolicy (..),
    newGetRepositoryPermissionsPolicy,

    -- * Request Lenses
    getRepositoryPermissionsPolicy_domainOwner,
    getRepositoryPermissionsPolicy_domain,
    getRepositoryPermissionsPolicy_repository,

    -- * Destructuring the Response
    GetRepositoryPermissionsPolicyResponse (..),
    newGetRepositoryPermissionsPolicyResponse,

    -- * Response Lenses
    getRepositoryPermissionsPolicyResponse_policy,
    getRepositoryPermissionsPolicyResponse_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

-- | /See:/ 'newGetRepositoryPermissionsPolicy' smart constructor.
data GetRepositoryPermissionsPolicy = GetRepositoryPermissionsPolicy'
  { -- | The 12-digit account number of the AWS account that owns the domain. It
    -- does not include dashes or spaces.
    GetRepositoryPermissionsPolicy -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the domain containing the repository whose associated
    -- resource policy is to be retrieved.
    GetRepositoryPermissionsPolicy -> Text
domain :: Prelude.Text,
    -- | The name of the repository whose associated resource policy is to be
    -- retrieved.
    GetRepositoryPermissionsPolicy -> Text
repository :: Prelude.Text
  }
  deriving (GetRepositoryPermissionsPolicy
-> GetRepositoryPermissionsPolicy -> Bool
(GetRepositoryPermissionsPolicy
 -> GetRepositoryPermissionsPolicy -> Bool)
-> (GetRepositoryPermissionsPolicy
    -> GetRepositoryPermissionsPolicy -> Bool)
-> Eq GetRepositoryPermissionsPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRepositoryPermissionsPolicy
-> GetRepositoryPermissionsPolicy -> Bool
$c/= :: GetRepositoryPermissionsPolicy
-> GetRepositoryPermissionsPolicy -> Bool
== :: GetRepositoryPermissionsPolicy
-> GetRepositoryPermissionsPolicy -> Bool
$c== :: GetRepositoryPermissionsPolicy
-> GetRepositoryPermissionsPolicy -> Bool
Prelude.Eq, ReadPrec [GetRepositoryPermissionsPolicy]
ReadPrec GetRepositoryPermissionsPolicy
Int -> ReadS GetRepositoryPermissionsPolicy
ReadS [GetRepositoryPermissionsPolicy]
(Int -> ReadS GetRepositoryPermissionsPolicy)
-> ReadS [GetRepositoryPermissionsPolicy]
-> ReadPrec GetRepositoryPermissionsPolicy
-> ReadPrec [GetRepositoryPermissionsPolicy]
-> Read GetRepositoryPermissionsPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRepositoryPermissionsPolicy]
$creadListPrec :: ReadPrec [GetRepositoryPermissionsPolicy]
readPrec :: ReadPrec GetRepositoryPermissionsPolicy
$creadPrec :: ReadPrec GetRepositoryPermissionsPolicy
readList :: ReadS [GetRepositoryPermissionsPolicy]
$creadList :: ReadS [GetRepositoryPermissionsPolicy]
readsPrec :: Int -> ReadS GetRepositoryPermissionsPolicy
$creadsPrec :: Int -> ReadS GetRepositoryPermissionsPolicy
Prelude.Read, Int -> GetRepositoryPermissionsPolicy -> ShowS
[GetRepositoryPermissionsPolicy] -> ShowS
GetRepositoryPermissionsPolicy -> String
(Int -> GetRepositoryPermissionsPolicy -> ShowS)
-> (GetRepositoryPermissionsPolicy -> String)
-> ([GetRepositoryPermissionsPolicy] -> ShowS)
-> Show GetRepositoryPermissionsPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRepositoryPermissionsPolicy] -> ShowS
$cshowList :: [GetRepositoryPermissionsPolicy] -> ShowS
show :: GetRepositoryPermissionsPolicy -> String
$cshow :: GetRepositoryPermissionsPolicy -> String
showsPrec :: Int -> GetRepositoryPermissionsPolicy -> ShowS
$cshowsPrec :: Int -> GetRepositoryPermissionsPolicy -> ShowS
Prelude.Show, (forall x.
 GetRepositoryPermissionsPolicy
 -> Rep GetRepositoryPermissionsPolicy x)
-> (forall x.
    Rep GetRepositoryPermissionsPolicy x
    -> GetRepositoryPermissionsPolicy)
-> Generic GetRepositoryPermissionsPolicy
forall x.
Rep GetRepositoryPermissionsPolicy x
-> GetRepositoryPermissionsPolicy
forall x.
GetRepositoryPermissionsPolicy
-> Rep GetRepositoryPermissionsPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRepositoryPermissionsPolicy x
-> GetRepositoryPermissionsPolicy
$cfrom :: forall x.
GetRepositoryPermissionsPolicy
-> Rep GetRepositoryPermissionsPolicy x
Prelude.Generic)

-- |
-- Create a value of 'GetRepositoryPermissionsPolicy' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'domainOwner', 'getRepositoryPermissionsPolicy_domainOwner' - The 12-digit account number of the AWS account that owns the domain. It
-- does not include dashes or spaces.
--
-- 'domain', 'getRepositoryPermissionsPolicy_domain' - The name of the domain containing the repository whose associated
-- resource policy is to be retrieved.
--
-- 'repository', 'getRepositoryPermissionsPolicy_repository' - The name of the repository whose associated resource policy is to be
-- retrieved.
newGetRepositoryPermissionsPolicy ::
  -- | 'domain'
  Prelude.Text ->
  -- | 'repository'
  Prelude.Text ->
  GetRepositoryPermissionsPolicy
newGetRepositoryPermissionsPolicy :: Text -> Text -> GetRepositoryPermissionsPolicy
newGetRepositoryPermissionsPolicy
  Text
pDomain_
  Text
pRepository_ =
    GetRepositoryPermissionsPolicy' :: Maybe Text -> Text -> Text -> GetRepositoryPermissionsPolicy
GetRepositoryPermissionsPolicy'
      { $sel:domainOwner:GetRepositoryPermissionsPolicy' :: Maybe Text
domainOwner =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domain:GetRepositoryPermissionsPolicy' :: Text
domain = Text
pDomain_,
        $sel:repository:GetRepositoryPermissionsPolicy' :: Text
repository = Text
pRepository_
      }

-- | The 12-digit account number of the AWS account that owns the domain. It
-- does not include dashes or spaces.
getRepositoryPermissionsPolicy_domainOwner :: Lens.Lens' GetRepositoryPermissionsPolicy (Prelude.Maybe Prelude.Text)
getRepositoryPermissionsPolicy_domainOwner :: (Maybe Text -> f (Maybe Text))
-> GetRepositoryPermissionsPolicy
-> f GetRepositoryPermissionsPolicy
getRepositoryPermissionsPolicy_domainOwner = (GetRepositoryPermissionsPolicy -> Maybe Text)
-> (GetRepositoryPermissionsPolicy
    -> Maybe Text -> GetRepositoryPermissionsPolicy)
-> Lens
     GetRepositoryPermissionsPolicy
     GetRepositoryPermissionsPolicy
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRepositoryPermissionsPolicy' {Maybe Text
domainOwner :: Maybe Text
$sel:domainOwner:GetRepositoryPermissionsPolicy' :: GetRepositoryPermissionsPolicy -> Maybe Text
domainOwner} -> Maybe Text
domainOwner) (\s :: GetRepositoryPermissionsPolicy
s@GetRepositoryPermissionsPolicy' {} Maybe Text
a -> GetRepositoryPermissionsPolicy
s {$sel:domainOwner:GetRepositoryPermissionsPolicy' :: Maybe Text
domainOwner = Maybe Text
a} :: GetRepositoryPermissionsPolicy)

-- | The name of the domain containing the repository whose associated
-- resource policy is to be retrieved.
getRepositoryPermissionsPolicy_domain :: Lens.Lens' GetRepositoryPermissionsPolicy Prelude.Text
getRepositoryPermissionsPolicy_domain :: (Text -> f Text)
-> GetRepositoryPermissionsPolicy
-> f GetRepositoryPermissionsPolicy
getRepositoryPermissionsPolicy_domain = (GetRepositoryPermissionsPolicy -> Text)
-> (GetRepositoryPermissionsPolicy
    -> Text -> GetRepositoryPermissionsPolicy)
-> Lens
     GetRepositoryPermissionsPolicy
     GetRepositoryPermissionsPolicy
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRepositoryPermissionsPolicy' {Text
domain :: Text
$sel:domain:GetRepositoryPermissionsPolicy' :: GetRepositoryPermissionsPolicy -> Text
domain} -> Text
domain) (\s :: GetRepositoryPermissionsPolicy
s@GetRepositoryPermissionsPolicy' {} Text
a -> GetRepositoryPermissionsPolicy
s {$sel:domain:GetRepositoryPermissionsPolicy' :: Text
domain = Text
a} :: GetRepositoryPermissionsPolicy)

-- | The name of the repository whose associated resource policy is to be
-- retrieved.
getRepositoryPermissionsPolicy_repository :: Lens.Lens' GetRepositoryPermissionsPolicy Prelude.Text
getRepositoryPermissionsPolicy_repository :: (Text -> f Text)
-> GetRepositoryPermissionsPolicy
-> f GetRepositoryPermissionsPolicy
getRepositoryPermissionsPolicy_repository = (GetRepositoryPermissionsPolicy -> Text)
-> (GetRepositoryPermissionsPolicy
    -> Text -> GetRepositoryPermissionsPolicy)
-> Lens
     GetRepositoryPermissionsPolicy
     GetRepositoryPermissionsPolicy
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRepositoryPermissionsPolicy' {Text
repository :: Text
$sel:repository:GetRepositoryPermissionsPolicy' :: GetRepositoryPermissionsPolicy -> Text
repository} -> Text
repository) (\s :: GetRepositoryPermissionsPolicy
s@GetRepositoryPermissionsPolicy' {} Text
a -> GetRepositoryPermissionsPolicy
s {$sel:repository:GetRepositoryPermissionsPolicy' :: Text
repository = Text
a} :: GetRepositoryPermissionsPolicy)

instance
  Core.AWSRequest
    GetRepositoryPermissionsPolicy
  where
  type
    AWSResponse GetRepositoryPermissionsPolicy =
      GetRepositoryPermissionsPolicyResponse
  request :: GetRepositoryPermissionsPolicy
-> Request GetRepositoryPermissionsPolicy
request = Service
-> GetRepositoryPermissionsPolicy
-> Request GetRepositoryPermissionsPolicy
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetRepositoryPermissionsPolicy
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetRepositoryPermissionsPolicy)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetRepositoryPermissionsPolicy))
-> Logger
-> Service
-> Proxy GetRepositoryPermissionsPolicy
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetRepositoryPermissionsPolicy)))
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 -> GetRepositoryPermissionsPolicyResponse
GetRepositoryPermissionsPolicyResponse'
            (Maybe ResourcePolicy
 -> Int -> GetRepositoryPermissionsPolicyResponse)
-> Either String (Maybe ResourcePolicy)
-> Either String (Int -> GetRepositoryPermissionsPolicyResponse)
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 -> GetRepositoryPermissionsPolicyResponse)
-> Either String Int
-> Either String GetRepositoryPermissionsPolicyResponse
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
    GetRepositoryPermissionsPolicy

instance
  Prelude.NFData
    GetRepositoryPermissionsPolicy

instance
  Core.ToHeaders
    GetRepositoryPermissionsPolicy
  where
  toHeaders :: GetRepositoryPermissionsPolicy -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> GetRepositoryPermissionsPolicy -> 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.ToPath GetRepositoryPermissionsPolicy where
  toPath :: GetRepositoryPermissionsPolicy -> ByteString
toPath =
    ByteString -> GetRepositoryPermissionsPolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/repository/permissions/policy"

instance Core.ToQuery GetRepositoryPermissionsPolicy where
  toQuery :: GetRepositoryPermissionsPolicy -> QueryString
toQuery GetRepositoryPermissionsPolicy' {Maybe Text
Text
repository :: Text
domain :: Text
domainOwner :: Maybe Text
$sel:repository:GetRepositoryPermissionsPolicy' :: GetRepositoryPermissionsPolicy -> Text
$sel:domain:GetRepositoryPermissionsPolicy' :: GetRepositoryPermissionsPolicy -> Text
$sel:domainOwner:GetRepositoryPermissionsPolicy' :: GetRepositoryPermissionsPolicy -> 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
      ]

-- | /See:/ 'newGetRepositoryPermissionsPolicyResponse' smart constructor.
data GetRepositoryPermissionsPolicyResponse = GetRepositoryPermissionsPolicyResponse'
  { -- | The returned resource policy.
    GetRepositoryPermissionsPolicyResponse -> Maybe ResourcePolicy
policy :: Prelude.Maybe ResourcePolicy,
    -- | The response's http status code.
    GetRepositoryPermissionsPolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetRepositoryPermissionsPolicyResponse
-> GetRepositoryPermissionsPolicyResponse -> Bool
(GetRepositoryPermissionsPolicyResponse
 -> GetRepositoryPermissionsPolicyResponse -> Bool)
-> (GetRepositoryPermissionsPolicyResponse
    -> GetRepositoryPermissionsPolicyResponse -> Bool)
-> Eq GetRepositoryPermissionsPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRepositoryPermissionsPolicyResponse
-> GetRepositoryPermissionsPolicyResponse -> Bool
$c/= :: GetRepositoryPermissionsPolicyResponse
-> GetRepositoryPermissionsPolicyResponse -> Bool
== :: GetRepositoryPermissionsPolicyResponse
-> GetRepositoryPermissionsPolicyResponse -> Bool
$c== :: GetRepositoryPermissionsPolicyResponse
-> GetRepositoryPermissionsPolicyResponse -> Bool
Prelude.Eq, ReadPrec [GetRepositoryPermissionsPolicyResponse]
ReadPrec GetRepositoryPermissionsPolicyResponse
Int -> ReadS GetRepositoryPermissionsPolicyResponse
ReadS [GetRepositoryPermissionsPolicyResponse]
(Int -> ReadS GetRepositoryPermissionsPolicyResponse)
-> ReadS [GetRepositoryPermissionsPolicyResponse]
-> ReadPrec GetRepositoryPermissionsPolicyResponse
-> ReadPrec [GetRepositoryPermissionsPolicyResponse]
-> Read GetRepositoryPermissionsPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRepositoryPermissionsPolicyResponse]
$creadListPrec :: ReadPrec [GetRepositoryPermissionsPolicyResponse]
readPrec :: ReadPrec GetRepositoryPermissionsPolicyResponse
$creadPrec :: ReadPrec GetRepositoryPermissionsPolicyResponse
readList :: ReadS [GetRepositoryPermissionsPolicyResponse]
$creadList :: ReadS [GetRepositoryPermissionsPolicyResponse]
readsPrec :: Int -> ReadS GetRepositoryPermissionsPolicyResponse
$creadsPrec :: Int -> ReadS GetRepositoryPermissionsPolicyResponse
Prelude.Read, Int -> GetRepositoryPermissionsPolicyResponse -> ShowS
[GetRepositoryPermissionsPolicyResponse] -> ShowS
GetRepositoryPermissionsPolicyResponse -> String
(Int -> GetRepositoryPermissionsPolicyResponse -> ShowS)
-> (GetRepositoryPermissionsPolicyResponse -> String)
-> ([GetRepositoryPermissionsPolicyResponse] -> ShowS)
-> Show GetRepositoryPermissionsPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRepositoryPermissionsPolicyResponse] -> ShowS
$cshowList :: [GetRepositoryPermissionsPolicyResponse] -> ShowS
show :: GetRepositoryPermissionsPolicyResponse -> String
$cshow :: GetRepositoryPermissionsPolicyResponse -> String
showsPrec :: Int -> GetRepositoryPermissionsPolicyResponse -> ShowS
$cshowsPrec :: Int -> GetRepositoryPermissionsPolicyResponse -> ShowS
Prelude.Show, (forall x.
 GetRepositoryPermissionsPolicyResponse
 -> Rep GetRepositoryPermissionsPolicyResponse x)
-> (forall x.
    Rep GetRepositoryPermissionsPolicyResponse x
    -> GetRepositoryPermissionsPolicyResponse)
-> Generic GetRepositoryPermissionsPolicyResponse
forall x.
Rep GetRepositoryPermissionsPolicyResponse x
-> GetRepositoryPermissionsPolicyResponse
forall x.
GetRepositoryPermissionsPolicyResponse
-> Rep GetRepositoryPermissionsPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRepositoryPermissionsPolicyResponse x
-> GetRepositoryPermissionsPolicyResponse
$cfrom :: forall x.
GetRepositoryPermissionsPolicyResponse
-> Rep GetRepositoryPermissionsPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetRepositoryPermissionsPolicyResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'policy', 'getRepositoryPermissionsPolicyResponse_policy' - The returned resource policy.
--
-- 'httpStatus', 'getRepositoryPermissionsPolicyResponse_httpStatus' - The response's http status code.
newGetRepositoryPermissionsPolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetRepositoryPermissionsPolicyResponse
newGetRepositoryPermissionsPolicyResponse :: Int -> GetRepositoryPermissionsPolicyResponse
newGetRepositoryPermissionsPolicyResponse
  Int
pHttpStatus_ =
    GetRepositoryPermissionsPolicyResponse' :: Maybe ResourcePolicy
-> Int -> GetRepositoryPermissionsPolicyResponse
GetRepositoryPermissionsPolicyResponse'
      { $sel:policy:GetRepositoryPermissionsPolicyResponse' :: Maybe ResourcePolicy
policy =
          Maybe ResourcePolicy
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetRepositoryPermissionsPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The returned resource policy.
getRepositoryPermissionsPolicyResponse_policy :: Lens.Lens' GetRepositoryPermissionsPolicyResponse (Prelude.Maybe ResourcePolicy)
getRepositoryPermissionsPolicyResponse_policy :: (Maybe ResourcePolicy -> f (Maybe ResourcePolicy))
-> GetRepositoryPermissionsPolicyResponse
-> f GetRepositoryPermissionsPolicyResponse
getRepositoryPermissionsPolicyResponse_policy = (GetRepositoryPermissionsPolicyResponse -> Maybe ResourcePolicy)
-> (GetRepositoryPermissionsPolicyResponse
    -> Maybe ResourcePolicy -> GetRepositoryPermissionsPolicyResponse)
-> Lens
     GetRepositoryPermissionsPolicyResponse
     GetRepositoryPermissionsPolicyResponse
     (Maybe ResourcePolicy)
     (Maybe ResourcePolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRepositoryPermissionsPolicyResponse' {Maybe ResourcePolicy
policy :: Maybe ResourcePolicy
$sel:policy:GetRepositoryPermissionsPolicyResponse' :: GetRepositoryPermissionsPolicyResponse -> Maybe ResourcePolicy
policy} -> Maybe ResourcePolicy
policy) (\s :: GetRepositoryPermissionsPolicyResponse
s@GetRepositoryPermissionsPolicyResponse' {} Maybe ResourcePolicy
a -> GetRepositoryPermissionsPolicyResponse
s {$sel:policy:GetRepositoryPermissionsPolicyResponse' :: Maybe ResourcePolicy
policy = Maybe ResourcePolicy
a} :: GetRepositoryPermissionsPolicyResponse)

-- | The response's http status code.
getRepositoryPermissionsPolicyResponse_httpStatus :: Lens.Lens' GetRepositoryPermissionsPolicyResponse Prelude.Int
getRepositoryPermissionsPolicyResponse_httpStatus :: (Int -> f Int)
-> GetRepositoryPermissionsPolicyResponse
-> f GetRepositoryPermissionsPolicyResponse
getRepositoryPermissionsPolicyResponse_httpStatus = (GetRepositoryPermissionsPolicyResponse -> Int)
-> (GetRepositoryPermissionsPolicyResponse
    -> Int -> GetRepositoryPermissionsPolicyResponse)
-> Lens
     GetRepositoryPermissionsPolicyResponse
     GetRepositoryPermissionsPolicyResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRepositoryPermissionsPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetRepositoryPermissionsPolicyResponse' :: GetRepositoryPermissionsPolicyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetRepositoryPermissionsPolicyResponse
s@GetRepositoryPermissionsPolicyResponse' {} Int
a -> GetRepositoryPermissionsPolicyResponse
s {$sel:httpStatus:GetRepositoryPermissionsPolicyResponse' :: Int
httpStatus = Int
a} :: GetRepositoryPermissionsPolicyResponse)

instance
  Prelude.NFData
    GetRepositoryPermissionsPolicyResponse