{-# 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.CodeCommit.BatchDisassociateApprovalRuleTemplateFromRepositories
-- 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)
--
-- Removes the association between an approval rule template and one or
-- more specified repositories.
module Amazonka.CodeCommit.BatchDisassociateApprovalRuleTemplateFromRepositories
  ( -- * Creating a Request
    BatchDisassociateApprovalRuleTemplateFromRepositories (..),
    newBatchDisassociateApprovalRuleTemplateFromRepositories,

    -- * Request Lenses
    batchDisassociateApprovalRuleTemplateFromRepositories_approvalRuleTemplateName,
    batchDisassociateApprovalRuleTemplateFromRepositories_repositoryNames,

    -- * Destructuring the Response
    BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse (..),
    newBatchDisassociateApprovalRuleTemplateFromRepositoriesResponse,

    -- * Response Lenses
    batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_httpStatus,
    batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_disassociatedRepositoryNames,
    batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_errors,
  )
where

import Amazonka.CodeCommit.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:/ 'newBatchDisassociateApprovalRuleTemplateFromRepositories' smart constructor.
data BatchDisassociateApprovalRuleTemplateFromRepositories = BatchDisassociateApprovalRuleTemplateFromRepositories'
  { -- | The name of the template that you want to disassociate from one or more
    -- repositories.
    BatchDisassociateApprovalRuleTemplateFromRepositories -> Text
approvalRuleTemplateName :: Prelude.Text,
    -- | The repository names that you want to disassociate from the approval
    -- rule template.
    --
    -- The length constraint limit is for each string in the array. The array
    -- itself can be empty.
    BatchDisassociateApprovalRuleTemplateFromRepositories -> [Text]
repositoryNames :: [Prelude.Text]
  }
  deriving (BatchDisassociateApprovalRuleTemplateFromRepositories
-> BatchDisassociateApprovalRuleTemplateFromRepositories -> Bool
(BatchDisassociateApprovalRuleTemplateFromRepositories
 -> BatchDisassociateApprovalRuleTemplateFromRepositories -> Bool)
-> (BatchDisassociateApprovalRuleTemplateFromRepositories
    -> BatchDisassociateApprovalRuleTemplateFromRepositories -> Bool)
-> Eq BatchDisassociateApprovalRuleTemplateFromRepositories
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDisassociateApprovalRuleTemplateFromRepositories
-> BatchDisassociateApprovalRuleTemplateFromRepositories -> Bool
$c/= :: BatchDisassociateApprovalRuleTemplateFromRepositories
-> BatchDisassociateApprovalRuleTemplateFromRepositories -> Bool
== :: BatchDisassociateApprovalRuleTemplateFromRepositories
-> BatchDisassociateApprovalRuleTemplateFromRepositories -> Bool
$c== :: BatchDisassociateApprovalRuleTemplateFromRepositories
-> BatchDisassociateApprovalRuleTemplateFromRepositories -> Bool
Prelude.Eq, ReadPrec [BatchDisassociateApprovalRuleTemplateFromRepositories]
ReadPrec BatchDisassociateApprovalRuleTemplateFromRepositories
Int -> ReadS BatchDisassociateApprovalRuleTemplateFromRepositories
ReadS [BatchDisassociateApprovalRuleTemplateFromRepositories]
(Int
 -> ReadS BatchDisassociateApprovalRuleTemplateFromRepositories)
-> ReadS [BatchDisassociateApprovalRuleTemplateFromRepositories]
-> ReadPrec BatchDisassociateApprovalRuleTemplateFromRepositories
-> ReadPrec [BatchDisassociateApprovalRuleTemplateFromRepositories]
-> Read BatchDisassociateApprovalRuleTemplateFromRepositories
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDisassociateApprovalRuleTemplateFromRepositories]
$creadListPrec :: ReadPrec [BatchDisassociateApprovalRuleTemplateFromRepositories]
readPrec :: ReadPrec BatchDisassociateApprovalRuleTemplateFromRepositories
$creadPrec :: ReadPrec BatchDisassociateApprovalRuleTemplateFromRepositories
readList :: ReadS [BatchDisassociateApprovalRuleTemplateFromRepositories]
$creadList :: ReadS [BatchDisassociateApprovalRuleTemplateFromRepositories]
readsPrec :: Int -> ReadS BatchDisassociateApprovalRuleTemplateFromRepositories
$creadsPrec :: Int -> ReadS BatchDisassociateApprovalRuleTemplateFromRepositories
Prelude.Read, Int
-> BatchDisassociateApprovalRuleTemplateFromRepositories -> ShowS
[BatchDisassociateApprovalRuleTemplateFromRepositories] -> ShowS
BatchDisassociateApprovalRuleTemplateFromRepositories -> String
(Int
 -> BatchDisassociateApprovalRuleTemplateFromRepositories -> ShowS)
-> (BatchDisassociateApprovalRuleTemplateFromRepositories
    -> String)
-> ([BatchDisassociateApprovalRuleTemplateFromRepositories]
    -> ShowS)
-> Show BatchDisassociateApprovalRuleTemplateFromRepositories
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDisassociateApprovalRuleTemplateFromRepositories] -> ShowS
$cshowList :: [BatchDisassociateApprovalRuleTemplateFromRepositories] -> ShowS
show :: BatchDisassociateApprovalRuleTemplateFromRepositories -> String
$cshow :: BatchDisassociateApprovalRuleTemplateFromRepositories -> String
showsPrec :: Int
-> BatchDisassociateApprovalRuleTemplateFromRepositories -> ShowS
$cshowsPrec :: Int
-> BatchDisassociateApprovalRuleTemplateFromRepositories -> ShowS
Prelude.Show, (forall x.
 BatchDisassociateApprovalRuleTemplateFromRepositories
 -> Rep BatchDisassociateApprovalRuleTemplateFromRepositories x)
-> (forall x.
    Rep BatchDisassociateApprovalRuleTemplateFromRepositories x
    -> BatchDisassociateApprovalRuleTemplateFromRepositories)
-> Generic BatchDisassociateApprovalRuleTemplateFromRepositories
forall x.
Rep BatchDisassociateApprovalRuleTemplateFromRepositories x
-> BatchDisassociateApprovalRuleTemplateFromRepositories
forall x.
BatchDisassociateApprovalRuleTemplateFromRepositories
-> Rep BatchDisassociateApprovalRuleTemplateFromRepositories x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDisassociateApprovalRuleTemplateFromRepositories x
-> BatchDisassociateApprovalRuleTemplateFromRepositories
$cfrom :: forall x.
BatchDisassociateApprovalRuleTemplateFromRepositories
-> Rep BatchDisassociateApprovalRuleTemplateFromRepositories x
Prelude.Generic)

-- |
-- Create a value of 'BatchDisassociateApprovalRuleTemplateFromRepositories' 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:
--
-- 'approvalRuleTemplateName', 'batchDisassociateApprovalRuleTemplateFromRepositories_approvalRuleTemplateName' - The name of the template that you want to disassociate from one or more
-- repositories.
--
-- 'repositoryNames', 'batchDisassociateApprovalRuleTemplateFromRepositories_repositoryNames' - The repository names that you want to disassociate from the approval
-- rule template.
--
-- The length constraint limit is for each string in the array. The array
-- itself can be empty.
newBatchDisassociateApprovalRuleTemplateFromRepositories ::
  -- | 'approvalRuleTemplateName'
  Prelude.Text ->
  BatchDisassociateApprovalRuleTemplateFromRepositories
newBatchDisassociateApprovalRuleTemplateFromRepositories :: Text -> BatchDisassociateApprovalRuleTemplateFromRepositories
newBatchDisassociateApprovalRuleTemplateFromRepositories
  Text
pApprovalRuleTemplateName_ =
    BatchDisassociateApprovalRuleTemplateFromRepositories' :: Text
-> [Text] -> BatchDisassociateApprovalRuleTemplateFromRepositories
BatchDisassociateApprovalRuleTemplateFromRepositories'
      { $sel:approvalRuleTemplateName:BatchDisassociateApprovalRuleTemplateFromRepositories' :: Text
approvalRuleTemplateName =
          Text
pApprovalRuleTemplateName_,
        $sel:repositoryNames:BatchDisassociateApprovalRuleTemplateFromRepositories' :: [Text]
repositoryNames =
          [Text]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The name of the template that you want to disassociate from one or more
-- repositories.
batchDisassociateApprovalRuleTemplateFromRepositories_approvalRuleTemplateName :: Lens.Lens' BatchDisassociateApprovalRuleTemplateFromRepositories Prelude.Text
batchDisassociateApprovalRuleTemplateFromRepositories_approvalRuleTemplateName :: (Text -> f Text)
-> BatchDisassociateApprovalRuleTemplateFromRepositories
-> f BatchDisassociateApprovalRuleTemplateFromRepositories
batchDisassociateApprovalRuleTemplateFromRepositories_approvalRuleTemplateName = (BatchDisassociateApprovalRuleTemplateFromRepositories -> Text)
-> (BatchDisassociateApprovalRuleTemplateFromRepositories
    -> Text -> BatchDisassociateApprovalRuleTemplateFromRepositories)
-> Lens
     BatchDisassociateApprovalRuleTemplateFromRepositories
     BatchDisassociateApprovalRuleTemplateFromRepositories
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateApprovalRuleTemplateFromRepositories' {Text
approvalRuleTemplateName :: Text
$sel:approvalRuleTemplateName:BatchDisassociateApprovalRuleTemplateFromRepositories' :: BatchDisassociateApprovalRuleTemplateFromRepositories -> Text
approvalRuleTemplateName} -> Text
approvalRuleTemplateName) (\s :: BatchDisassociateApprovalRuleTemplateFromRepositories
s@BatchDisassociateApprovalRuleTemplateFromRepositories' {} Text
a -> BatchDisassociateApprovalRuleTemplateFromRepositories
s {$sel:approvalRuleTemplateName:BatchDisassociateApprovalRuleTemplateFromRepositories' :: Text
approvalRuleTemplateName = Text
a} :: BatchDisassociateApprovalRuleTemplateFromRepositories)

-- | The repository names that you want to disassociate from the approval
-- rule template.
--
-- The length constraint limit is for each string in the array. The array
-- itself can be empty.
batchDisassociateApprovalRuleTemplateFromRepositories_repositoryNames :: Lens.Lens' BatchDisassociateApprovalRuleTemplateFromRepositories [Prelude.Text]
batchDisassociateApprovalRuleTemplateFromRepositories_repositoryNames :: ([Text] -> f [Text])
-> BatchDisassociateApprovalRuleTemplateFromRepositories
-> f BatchDisassociateApprovalRuleTemplateFromRepositories
batchDisassociateApprovalRuleTemplateFromRepositories_repositoryNames = (BatchDisassociateApprovalRuleTemplateFromRepositories -> [Text])
-> (BatchDisassociateApprovalRuleTemplateFromRepositories
    -> [Text] -> BatchDisassociateApprovalRuleTemplateFromRepositories)
-> Lens
     BatchDisassociateApprovalRuleTemplateFromRepositories
     BatchDisassociateApprovalRuleTemplateFromRepositories
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateApprovalRuleTemplateFromRepositories' {[Text]
repositoryNames :: [Text]
$sel:repositoryNames:BatchDisassociateApprovalRuleTemplateFromRepositories' :: BatchDisassociateApprovalRuleTemplateFromRepositories -> [Text]
repositoryNames} -> [Text]
repositoryNames) (\s :: BatchDisassociateApprovalRuleTemplateFromRepositories
s@BatchDisassociateApprovalRuleTemplateFromRepositories' {} [Text]
a -> BatchDisassociateApprovalRuleTemplateFromRepositories
s {$sel:repositoryNames:BatchDisassociateApprovalRuleTemplateFromRepositories' :: [Text]
repositoryNames = [Text]
a} :: BatchDisassociateApprovalRuleTemplateFromRepositories) (([Text] -> f [Text])
 -> BatchDisassociateApprovalRuleTemplateFromRepositories
 -> f BatchDisassociateApprovalRuleTemplateFromRepositories)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> BatchDisassociateApprovalRuleTemplateFromRepositories
-> f BatchDisassociateApprovalRuleTemplateFromRepositories
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    BatchDisassociateApprovalRuleTemplateFromRepositories
  where
  type
    AWSResponse
      BatchDisassociateApprovalRuleTemplateFromRepositories =
      BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
  request :: BatchDisassociateApprovalRuleTemplateFromRepositories
-> Request BatchDisassociateApprovalRuleTemplateFromRepositories
request = Service
-> BatchDisassociateApprovalRuleTemplateFromRepositories
-> Request BatchDisassociateApprovalRuleTemplateFromRepositories
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchDisassociateApprovalRuleTemplateFromRepositories
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse
              BatchDisassociateApprovalRuleTemplateFromRepositories)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String
      (AWSResponse
         BatchDisassociateApprovalRuleTemplateFromRepositories))
-> Logger
-> Service
-> Proxy BatchDisassociateApprovalRuleTemplateFromRepositories
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse
              BatchDisassociateApprovalRuleTemplateFromRepositories)))
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]
-> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse'
            (Int
 -> [Text]
 -> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
 -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
-> Either String Int
-> Either
     String
     ([Text]
      -> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
      -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
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]
   -> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
   -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
-> Either String [Text]
-> Either
     String
     ([BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
      -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
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
"disassociatedRepositoryNames"
                              Either String (Maybe [Text]) -> [Text] -> Either String [Text]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Text]
forall a. Monoid a => a
Prelude.mempty
                          )
              Either
  String
  ([BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
   -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
-> Either
     String [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
-> Either
     String
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either
     String
     (Maybe
        [BatchDisassociateApprovalRuleTemplateFromRepositoriesError])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"errors" Either
  String
  (Maybe
     [BatchDisassociateApprovalRuleTemplateFromRepositoriesError])
-> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
-> Either
     String [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
forall a. Monoid a => a
Prelude.mempty)
      )

instance
  Prelude.Hashable
    BatchDisassociateApprovalRuleTemplateFromRepositories

instance
  Prelude.NFData
    BatchDisassociateApprovalRuleTemplateFromRepositories

instance
  Core.ToHeaders
    BatchDisassociateApprovalRuleTemplateFromRepositories
  where
  toHeaders :: BatchDisassociateApprovalRuleTemplateFromRepositories
-> ResponseHeaders
toHeaders =
    ResponseHeaders
-> BatchDisassociateApprovalRuleTemplateFromRepositories
-> 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
"CodeCommit_20150413.BatchDisassociateApprovalRuleTemplateFromRepositories" ::
                          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
    BatchDisassociateApprovalRuleTemplateFromRepositories
  where
  toJSON :: BatchDisassociateApprovalRuleTemplateFromRepositories -> Value
toJSON
    BatchDisassociateApprovalRuleTemplateFromRepositories' {[Text]
Text
repositoryNames :: [Text]
approvalRuleTemplateName :: Text
$sel:repositoryNames:BatchDisassociateApprovalRuleTemplateFromRepositories' :: BatchDisassociateApprovalRuleTemplateFromRepositories -> [Text]
$sel:approvalRuleTemplateName:BatchDisassociateApprovalRuleTemplateFromRepositories' :: BatchDisassociateApprovalRuleTemplateFromRepositories -> Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
                ( Text
"approvalRuleTemplateName"
                    Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
approvalRuleTemplateName
                ),
              Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
                (Text
"repositoryNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
repositoryNames)
            ]
        )

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

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

-- | /See:/ 'newBatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' smart constructor.
data BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse = BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse'
  { -- | The response's http status code.
    BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> Int
httpStatus :: Prelude.Int,
    -- | A list of repository names that have had their association with the
    -- template removed.
    BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> [Text]
disassociatedRepositoryNames :: [Prelude.Text],
    -- | A list of any errors that might have occurred while attempting to remove
    -- the association between the template and the repositories.
    BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
errors :: [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
  }
  deriving (BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> Bool
(BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
 -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
 -> Bool)
-> (BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
    -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
    -> Bool)
-> Eq BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> Bool
$c/= :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> Bool
== :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> Bool
$c== :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> Bool
Prelude.Eq, ReadPrec
  [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
ReadPrec
  BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
Int
-> ReadS
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
ReadS
  [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
(Int
 -> ReadS
      BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
-> ReadS
     [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
-> ReadPrec
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> ReadPrec
     [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
-> Read
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
  [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
$creadListPrec :: ReadPrec
  [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
readPrec :: ReadPrec
  BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
$creadPrec :: ReadPrec
  BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
readList :: ReadS
  [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
$creadList :: ReadS
  [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
readsPrec :: Int
-> ReadS
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
$creadsPrec :: Int
-> ReadS
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
Prelude.Read, Int
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> ShowS
[BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
-> ShowS
BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> String
(Int
 -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
 -> ShowS)
-> (BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
    -> String)
-> ([BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
    -> ShowS)
-> Show
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
-> ShowS
$cshowList :: [BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse]
-> ShowS
show :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> String
$cshow :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> String
showsPrec :: Int
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> ShowS
$cshowsPrec :: Int
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> ShowS
Prelude.Show, (forall x.
 BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
 -> Rep
      BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse x)
-> (forall x.
    Rep BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse x
    -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
-> Generic
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
forall x.
Rep BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse x
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
forall x.
BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> Rep
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse x
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
$cfrom :: forall x.
BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> Rep
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' 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:
--
-- 'httpStatus', 'batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_httpStatus' - The response's http status code.
--
-- 'disassociatedRepositoryNames', 'batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_disassociatedRepositoryNames' - A list of repository names that have had their association with the
-- template removed.
--
-- 'errors', 'batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_errors' - A list of any errors that might have occurred while attempting to remove
-- the association between the template and the repositories.
newBatchDisassociateApprovalRuleTemplateFromRepositoriesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
newBatchDisassociateApprovalRuleTemplateFromRepositoriesResponse :: Int
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
newBatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
  Int
pHttpStatus_ =
    BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' :: Int
-> [Text]
-> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse'
      { $sel:httpStatus:BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:disassociatedRepositoryNames:BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' :: [Text]
disassociatedRepositoryNames =
          [Text]
forall a. Monoid a => a
Prelude.mempty,
        $sel:errors:BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' :: [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
errors =
          [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
forall a. Monoid a => a
Prelude.mempty
      }

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

-- | A list of repository names that have had their association with the
-- template removed.
batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_disassociatedRepositoryNames :: Lens.Lens' BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse [Prelude.Text]
batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_disassociatedRepositoryNames :: ([Text] -> f [Text])
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> f BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_disassociatedRepositoryNames = (BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
 -> [Text])
-> (BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
    -> [Text]
    -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
-> Lens
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' {[Text]
disassociatedRepositoryNames :: [Text]
$sel:disassociatedRepositoryNames:BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> [Text]
disassociatedRepositoryNames} -> [Text]
disassociatedRepositoryNames) (\s :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
s@BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' {} [Text]
a -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
s {$sel:disassociatedRepositoryNames:BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' :: [Text]
disassociatedRepositoryNames = [Text]
a} :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse) (([Text] -> f [Text])
 -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
 -> f BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> f BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of any errors that might have occurred while attempting to remove
-- the association between the template and the repositories.
batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_errors :: Lens.Lens' BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_errors :: ([BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
 -> f [BatchDisassociateApprovalRuleTemplateFromRepositoriesError])
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> f BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
batchDisassociateApprovalRuleTemplateFromRepositoriesResponse_errors = (BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
 -> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError])
-> (BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
    -> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
    -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
-> Lens
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
     BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
     [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
     [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' {[BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
errors :: [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
$sel:errors:BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
errors} -> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
errors) (\s :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
s@BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' {} [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
a -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
s {$sel:errors:BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse' :: [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
errors = [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
a} :: BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse) (([BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
  -> f [BatchDisassociateApprovalRuleTemplateFromRepositoriesError])
 -> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
 -> f BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse)
-> (([BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
     -> f [BatchDisassociateApprovalRuleTemplateFromRepositoriesError])
    -> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
    -> f [BatchDisassociateApprovalRuleTemplateFromRepositoriesError])
-> ([BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
    -> f [BatchDisassociateApprovalRuleTemplateFromRepositoriesError])
-> BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
-> f BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
 -> f [BatchDisassociateApprovalRuleTemplateFromRepositoriesError])
-> [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
-> f [BatchDisassociateApprovalRuleTemplateFromRepositoriesError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    BatchDisassociateApprovalRuleTemplateFromRepositoriesResponse