{-# 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.ECR.DeleteRepositoryPolicy
-- 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)
--
-- Deletes the repository policy associated with the specified repository.
module Amazonka.ECR.DeleteRepositoryPolicy
  ( -- * Creating a Request
    DeleteRepositoryPolicy (..),
    newDeleteRepositoryPolicy,

    -- * Request Lenses
    deleteRepositoryPolicy_registryId,
    deleteRepositoryPolicy_repositoryName,

    -- * Destructuring the Response
    DeleteRepositoryPolicyResponse (..),
    newDeleteRepositoryPolicyResponse,

    -- * Response Lenses
    deleteRepositoryPolicyResponse_registryId,
    deleteRepositoryPolicyResponse_repositoryName,
    deleteRepositoryPolicyResponse_policyText,
    deleteRepositoryPolicyResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ECR.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

-- | /See:/ 'newDeleteRepositoryPolicy' smart constructor.
data DeleteRepositoryPolicy = DeleteRepositoryPolicy'
  { -- | The Amazon Web Services account ID associated with the registry that
    -- contains the repository policy to delete. If you do not specify a
    -- registry, the default registry is assumed.
    DeleteRepositoryPolicy -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository that is associated with the repository policy
    -- to delete.
    DeleteRepositoryPolicy -> Text
repositoryName :: Prelude.Text
  }
  deriving (DeleteRepositoryPolicy -> DeleteRepositoryPolicy -> Bool
(DeleteRepositoryPolicy -> DeleteRepositoryPolicy -> Bool)
-> (DeleteRepositoryPolicy -> DeleteRepositoryPolicy -> Bool)
-> Eq DeleteRepositoryPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRepositoryPolicy -> DeleteRepositoryPolicy -> Bool
$c/= :: DeleteRepositoryPolicy -> DeleteRepositoryPolicy -> Bool
== :: DeleteRepositoryPolicy -> DeleteRepositoryPolicy -> Bool
$c== :: DeleteRepositoryPolicy -> DeleteRepositoryPolicy -> Bool
Prelude.Eq, ReadPrec [DeleteRepositoryPolicy]
ReadPrec DeleteRepositoryPolicy
Int -> ReadS DeleteRepositoryPolicy
ReadS [DeleteRepositoryPolicy]
(Int -> ReadS DeleteRepositoryPolicy)
-> ReadS [DeleteRepositoryPolicy]
-> ReadPrec DeleteRepositoryPolicy
-> ReadPrec [DeleteRepositoryPolicy]
-> Read DeleteRepositoryPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRepositoryPolicy]
$creadListPrec :: ReadPrec [DeleteRepositoryPolicy]
readPrec :: ReadPrec DeleteRepositoryPolicy
$creadPrec :: ReadPrec DeleteRepositoryPolicy
readList :: ReadS [DeleteRepositoryPolicy]
$creadList :: ReadS [DeleteRepositoryPolicy]
readsPrec :: Int -> ReadS DeleteRepositoryPolicy
$creadsPrec :: Int -> ReadS DeleteRepositoryPolicy
Prelude.Read, Int -> DeleteRepositoryPolicy -> ShowS
[DeleteRepositoryPolicy] -> ShowS
DeleteRepositoryPolicy -> String
(Int -> DeleteRepositoryPolicy -> ShowS)
-> (DeleteRepositoryPolicy -> String)
-> ([DeleteRepositoryPolicy] -> ShowS)
-> Show DeleteRepositoryPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRepositoryPolicy] -> ShowS
$cshowList :: [DeleteRepositoryPolicy] -> ShowS
show :: DeleteRepositoryPolicy -> String
$cshow :: DeleteRepositoryPolicy -> String
showsPrec :: Int -> DeleteRepositoryPolicy -> ShowS
$cshowsPrec :: Int -> DeleteRepositoryPolicy -> ShowS
Prelude.Show, (forall x. DeleteRepositoryPolicy -> Rep DeleteRepositoryPolicy x)
-> (forall x.
    Rep DeleteRepositoryPolicy x -> DeleteRepositoryPolicy)
-> Generic DeleteRepositoryPolicy
forall x. Rep DeleteRepositoryPolicy x -> DeleteRepositoryPolicy
forall x. DeleteRepositoryPolicy -> Rep DeleteRepositoryPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteRepositoryPolicy x -> DeleteRepositoryPolicy
$cfrom :: forall x. DeleteRepositoryPolicy -> Rep DeleteRepositoryPolicy x
Prelude.Generic)

-- |
-- Create a value of 'DeleteRepositoryPolicy' 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:
--
-- 'registryId', 'deleteRepositoryPolicy_registryId' - The Amazon Web Services account ID associated with the registry that
-- contains the repository policy to delete. If you do not specify a
-- registry, the default registry is assumed.
--
-- 'repositoryName', 'deleteRepositoryPolicy_repositoryName' - The name of the repository that is associated with the repository policy
-- to delete.
newDeleteRepositoryPolicy ::
  -- | 'repositoryName'
  Prelude.Text ->
  DeleteRepositoryPolicy
newDeleteRepositoryPolicy :: Text -> DeleteRepositoryPolicy
newDeleteRepositoryPolicy Text
pRepositoryName_ =
  DeleteRepositoryPolicy' :: Maybe Text -> Text -> DeleteRepositoryPolicy
DeleteRepositoryPolicy'
    { $sel:registryId:DeleteRepositoryPolicy' :: Maybe Text
registryId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:DeleteRepositoryPolicy' :: Text
repositoryName = Text
pRepositoryName_
    }

-- | The Amazon Web Services account ID associated with the registry that
-- contains the repository policy to delete. If you do not specify a
-- registry, the default registry is assumed.
deleteRepositoryPolicy_registryId :: Lens.Lens' DeleteRepositoryPolicy (Prelude.Maybe Prelude.Text)
deleteRepositoryPolicy_registryId :: (Maybe Text -> f (Maybe Text))
-> DeleteRepositoryPolicy -> f DeleteRepositoryPolicy
deleteRepositoryPolicy_registryId = (DeleteRepositoryPolicy -> Maybe Text)
-> (DeleteRepositoryPolicy -> Maybe Text -> DeleteRepositoryPolicy)
-> Lens
     DeleteRepositoryPolicy
     DeleteRepositoryPolicy
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRepositoryPolicy' {Maybe Text
registryId :: Maybe Text
$sel:registryId:DeleteRepositoryPolicy' :: DeleteRepositoryPolicy -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: DeleteRepositoryPolicy
s@DeleteRepositoryPolicy' {} Maybe Text
a -> DeleteRepositoryPolicy
s {$sel:registryId:DeleteRepositoryPolicy' :: Maybe Text
registryId = Maybe Text
a} :: DeleteRepositoryPolicy)

-- | The name of the repository that is associated with the repository policy
-- to delete.
deleteRepositoryPolicy_repositoryName :: Lens.Lens' DeleteRepositoryPolicy Prelude.Text
deleteRepositoryPolicy_repositoryName :: (Text -> f Text)
-> DeleteRepositoryPolicy -> f DeleteRepositoryPolicy
deleteRepositoryPolicy_repositoryName = (DeleteRepositoryPolicy -> Text)
-> (DeleteRepositoryPolicy -> Text -> DeleteRepositoryPolicy)
-> Lens DeleteRepositoryPolicy DeleteRepositoryPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRepositoryPolicy' {Text
repositoryName :: Text
$sel:repositoryName:DeleteRepositoryPolicy' :: DeleteRepositoryPolicy -> Text
repositoryName} -> Text
repositoryName) (\s :: DeleteRepositoryPolicy
s@DeleteRepositoryPolicy' {} Text
a -> DeleteRepositoryPolicy
s {$sel:repositoryName:DeleteRepositoryPolicy' :: Text
repositoryName = Text
a} :: DeleteRepositoryPolicy)

instance Core.AWSRequest DeleteRepositoryPolicy where
  type
    AWSResponse DeleteRepositoryPolicy =
      DeleteRepositoryPolicyResponse
  request :: DeleteRepositoryPolicy -> Request DeleteRepositoryPolicy
request = Service -> DeleteRepositoryPolicy -> Request DeleteRepositoryPolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteRepositoryPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteRepositoryPolicy)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeleteRepositoryPolicy))
-> Logger
-> Service
-> Proxy DeleteRepositoryPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteRepositoryPolicy)))
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
-> Maybe Text
-> Maybe Text
-> Int
-> DeleteRepositoryPolicyResponse
DeleteRepositoryPolicyResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DeleteRepositoryPolicyResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> DeleteRepositoryPolicyResponse)
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
"registryId")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> DeleteRepositoryPolicyResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> DeleteRepositoryPolicyResponse)
forall (f :: * -> *) a b. Applicative f => 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
"repositoryName")
            Either String (Maybe Text -> Int -> DeleteRepositoryPolicyResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DeleteRepositoryPolicyResponse)
forall (f :: * -> *) a b. Applicative f => 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
"policyText")
            Either String (Int -> DeleteRepositoryPolicyResponse)
-> Either String Int
-> Either String DeleteRepositoryPolicyResponse
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 DeleteRepositoryPolicy

instance Prelude.NFData DeleteRepositoryPolicy

instance Core.ToHeaders DeleteRepositoryPolicy where
  toHeaders :: DeleteRepositoryPolicy -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteRepositoryPolicy -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonEC2ContainerRegistry_V20150921.DeleteRepositoryPolicy" ::
                          Prelude.ByteString
                      ),
            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 DeleteRepositoryPolicy where
  toJSON :: DeleteRepositoryPolicy -> Value
toJSON DeleteRepositoryPolicy' {Maybe Text
Text
repositoryName :: Text
registryId :: Maybe Text
$sel:repositoryName:DeleteRepositoryPolicy' :: DeleteRepositoryPolicy -> Text
$sel:registryId:DeleteRepositoryPolicy' :: DeleteRepositoryPolicy -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"registryId" 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
registryId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"repositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
repositoryName)
          ]
      )

instance Core.ToPath DeleteRepositoryPolicy where
  toPath :: DeleteRepositoryPolicy -> ByteString
toPath = ByteString -> DeleteRepositoryPolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DeleteRepositoryPolicy where
  toQuery :: DeleteRepositoryPolicy -> QueryString
toQuery = QueryString -> DeleteRepositoryPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDeleteRepositoryPolicyResponse' smart constructor.
data DeleteRepositoryPolicyResponse = DeleteRepositoryPolicyResponse'
  { -- | The registry ID associated with the request.
    DeleteRepositoryPolicyResponse -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
    -- | The repository name associated with the request.
    DeleteRepositoryPolicyResponse -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text,
    -- | The JSON repository policy that was deleted from the repository.
    DeleteRepositoryPolicyResponse -> Maybe Text
policyText :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DeleteRepositoryPolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteRepositoryPolicyResponse
-> DeleteRepositoryPolicyResponse -> Bool
(DeleteRepositoryPolicyResponse
 -> DeleteRepositoryPolicyResponse -> Bool)
-> (DeleteRepositoryPolicyResponse
    -> DeleteRepositoryPolicyResponse -> Bool)
-> Eq DeleteRepositoryPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRepositoryPolicyResponse
-> DeleteRepositoryPolicyResponse -> Bool
$c/= :: DeleteRepositoryPolicyResponse
-> DeleteRepositoryPolicyResponse -> Bool
== :: DeleteRepositoryPolicyResponse
-> DeleteRepositoryPolicyResponse -> Bool
$c== :: DeleteRepositoryPolicyResponse
-> DeleteRepositoryPolicyResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRepositoryPolicyResponse]
ReadPrec DeleteRepositoryPolicyResponse
Int -> ReadS DeleteRepositoryPolicyResponse
ReadS [DeleteRepositoryPolicyResponse]
(Int -> ReadS DeleteRepositoryPolicyResponse)
-> ReadS [DeleteRepositoryPolicyResponse]
-> ReadPrec DeleteRepositoryPolicyResponse
-> ReadPrec [DeleteRepositoryPolicyResponse]
-> Read DeleteRepositoryPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRepositoryPolicyResponse]
$creadListPrec :: ReadPrec [DeleteRepositoryPolicyResponse]
readPrec :: ReadPrec DeleteRepositoryPolicyResponse
$creadPrec :: ReadPrec DeleteRepositoryPolicyResponse
readList :: ReadS [DeleteRepositoryPolicyResponse]
$creadList :: ReadS [DeleteRepositoryPolicyResponse]
readsPrec :: Int -> ReadS DeleteRepositoryPolicyResponse
$creadsPrec :: Int -> ReadS DeleteRepositoryPolicyResponse
Prelude.Read, Int -> DeleteRepositoryPolicyResponse -> ShowS
[DeleteRepositoryPolicyResponse] -> ShowS
DeleteRepositoryPolicyResponse -> String
(Int -> DeleteRepositoryPolicyResponse -> ShowS)
-> (DeleteRepositoryPolicyResponse -> String)
-> ([DeleteRepositoryPolicyResponse] -> ShowS)
-> Show DeleteRepositoryPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRepositoryPolicyResponse] -> ShowS
$cshowList :: [DeleteRepositoryPolicyResponse] -> ShowS
show :: DeleteRepositoryPolicyResponse -> String
$cshow :: DeleteRepositoryPolicyResponse -> String
showsPrec :: Int -> DeleteRepositoryPolicyResponse -> ShowS
$cshowsPrec :: Int -> DeleteRepositoryPolicyResponse -> ShowS
Prelude.Show, (forall x.
 DeleteRepositoryPolicyResponse
 -> Rep DeleteRepositoryPolicyResponse x)
-> (forall x.
    Rep DeleteRepositoryPolicyResponse x
    -> DeleteRepositoryPolicyResponse)
-> Generic DeleteRepositoryPolicyResponse
forall x.
Rep DeleteRepositoryPolicyResponse x
-> DeleteRepositoryPolicyResponse
forall x.
DeleteRepositoryPolicyResponse
-> Rep DeleteRepositoryPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRepositoryPolicyResponse x
-> DeleteRepositoryPolicyResponse
$cfrom :: forall x.
DeleteRepositoryPolicyResponse
-> Rep DeleteRepositoryPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteRepositoryPolicyResponse' 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:
--
-- 'registryId', 'deleteRepositoryPolicyResponse_registryId' - The registry ID associated with the request.
--
-- 'repositoryName', 'deleteRepositoryPolicyResponse_repositoryName' - The repository name associated with the request.
--
-- 'policyText', 'deleteRepositoryPolicyResponse_policyText' - The JSON repository policy that was deleted from the repository.
--
-- 'httpStatus', 'deleteRepositoryPolicyResponse_httpStatus' - The response's http status code.
newDeleteRepositoryPolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteRepositoryPolicyResponse
newDeleteRepositoryPolicyResponse :: Int -> DeleteRepositoryPolicyResponse
newDeleteRepositoryPolicyResponse Int
pHttpStatus_ =
  DeleteRepositoryPolicyResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DeleteRepositoryPolicyResponse
DeleteRepositoryPolicyResponse'
    { $sel:registryId:DeleteRepositoryPolicyResponse' :: Maybe Text
registryId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:DeleteRepositoryPolicyResponse' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:policyText:DeleteRepositoryPolicyResponse' :: Maybe Text
policyText = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteRepositoryPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The registry ID associated with the request.
deleteRepositoryPolicyResponse_registryId :: Lens.Lens' DeleteRepositoryPolicyResponse (Prelude.Maybe Prelude.Text)
deleteRepositoryPolicyResponse_registryId :: (Maybe Text -> f (Maybe Text))
-> DeleteRepositoryPolicyResponse
-> f DeleteRepositoryPolicyResponse
deleteRepositoryPolicyResponse_registryId = (DeleteRepositoryPolicyResponse -> Maybe Text)
-> (DeleteRepositoryPolicyResponse
    -> Maybe Text -> DeleteRepositoryPolicyResponse)
-> Lens
     DeleteRepositoryPolicyResponse
     DeleteRepositoryPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRepositoryPolicyResponse' {Maybe Text
registryId :: Maybe Text
$sel:registryId:DeleteRepositoryPolicyResponse' :: DeleteRepositoryPolicyResponse -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: DeleteRepositoryPolicyResponse
s@DeleteRepositoryPolicyResponse' {} Maybe Text
a -> DeleteRepositoryPolicyResponse
s {$sel:registryId:DeleteRepositoryPolicyResponse' :: Maybe Text
registryId = Maybe Text
a} :: DeleteRepositoryPolicyResponse)

-- | The repository name associated with the request.
deleteRepositoryPolicyResponse_repositoryName :: Lens.Lens' DeleteRepositoryPolicyResponse (Prelude.Maybe Prelude.Text)
deleteRepositoryPolicyResponse_repositoryName :: (Maybe Text -> f (Maybe Text))
-> DeleteRepositoryPolicyResponse
-> f DeleteRepositoryPolicyResponse
deleteRepositoryPolicyResponse_repositoryName = (DeleteRepositoryPolicyResponse -> Maybe Text)
-> (DeleteRepositoryPolicyResponse
    -> Maybe Text -> DeleteRepositoryPolicyResponse)
-> Lens
     DeleteRepositoryPolicyResponse
     DeleteRepositoryPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRepositoryPolicyResponse' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:DeleteRepositoryPolicyResponse' :: DeleteRepositoryPolicyResponse -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: DeleteRepositoryPolicyResponse
s@DeleteRepositoryPolicyResponse' {} Maybe Text
a -> DeleteRepositoryPolicyResponse
s {$sel:repositoryName:DeleteRepositoryPolicyResponse' :: Maybe Text
repositoryName = Maybe Text
a} :: DeleteRepositoryPolicyResponse)

-- | The JSON repository policy that was deleted from the repository.
deleteRepositoryPolicyResponse_policyText :: Lens.Lens' DeleteRepositoryPolicyResponse (Prelude.Maybe Prelude.Text)
deleteRepositoryPolicyResponse_policyText :: (Maybe Text -> f (Maybe Text))
-> DeleteRepositoryPolicyResponse
-> f DeleteRepositoryPolicyResponse
deleteRepositoryPolicyResponse_policyText = (DeleteRepositoryPolicyResponse -> Maybe Text)
-> (DeleteRepositoryPolicyResponse
    -> Maybe Text -> DeleteRepositoryPolicyResponse)
-> Lens
     DeleteRepositoryPolicyResponse
     DeleteRepositoryPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRepositoryPolicyResponse' {Maybe Text
policyText :: Maybe Text
$sel:policyText:DeleteRepositoryPolicyResponse' :: DeleteRepositoryPolicyResponse -> Maybe Text
policyText} -> Maybe Text
policyText) (\s :: DeleteRepositoryPolicyResponse
s@DeleteRepositoryPolicyResponse' {} Maybe Text
a -> DeleteRepositoryPolicyResponse
s {$sel:policyText:DeleteRepositoryPolicyResponse' :: Maybe Text
policyText = Maybe Text
a} :: DeleteRepositoryPolicyResponse)

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

instance
  Prelude.NFData
    DeleteRepositoryPolicyResponse