{-# 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.Backup.GetBackupVaultAccessPolicy
-- 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 access policy document that is associated with the named
-- backup vault.
module Amazonka.Backup.GetBackupVaultAccessPolicy
  ( -- * Creating a Request
    GetBackupVaultAccessPolicy (..),
    newGetBackupVaultAccessPolicy,

    -- * Request Lenses
    getBackupVaultAccessPolicy_backupVaultName,

    -- * Destructuring the Response
    GetBackupVaultAccessPolicyResponse (..),
    newGetBackupVaultAccessPolicyResponse,

    -- * Response Lenses
    getBackupVaultAccessPolicyResponse_backupVaultArn,
    getBackupVaultAccessPolicyResponse_policy,
    getBackupVaultAccessPolicyResponse_backupVaultName,
    getBackupVaultAccessPolicyResponse_httpStatus,
  )
where

import Amazonka.Backup.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:/ 'newGetBackupVaultAccessPolicy' smart constructor.
data GetBackupVaultAccessPolicy = GetBackupVaultAccessPolicy'
  { -- | The name of a logical container where backups are stored. Backup vaults
    -- are identified by names that are unique to the account used to create
    -- them and the Amazon Web Services Region where they are created. They
    -- consist of lowercase letters, numbers, and hyphens.
    GetBackupVaultAccessPolicy -> Text
backupVaultName :: Prelude.Text
  }
  deriving (GetBackupVaultAccessPolicy -> GetBackupVaultAccessPolicy -> Bool
(GetBackupVaultAccessPolicy -> GetBackupVaultAccessPolicy -> Bool)
-> (GetBackupVaultAccessPolicy
    -> GetBackupVaultAccessPolicy -> Bool)
-> Eq GetBackupVaultAccessPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBackupVaultAccessPolicy -> GetBackupVaultAccessPolicy -> Bool
$c/= :: GetBackupVaultAccessPolicy -> GetBackupVaultAccessPolicy -> Bool
== :: GetBackupVaultAccessPolicy -> GetBackupVaultAccessPolicy -> Bool
$c== :: GetBackupVaultAccessPolicy -> GetBackupVaultAccessPolicy -> Bool
Prelude.Eq, ReadPrec [GetBackupVaultAccessPolicy]
ReadPrec GetBackupVaultAccessPolicy
Int -> ReadS GetBackupVaultAccessPolicy
ReadS [GetBackupVaultAccessPolicy]
(Int -> ReadS GetBackupVaultAccessPolicy)
-> ReadS [GetBackupVaultAccessPolicy]
-> ReadPrec GetBackupVaultAccessPolicy
-> ReadPrec [GetBackupVaultAccessPolicy]
-> Read GetBackupVaultAccessPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBackupVaultAccessPolicy]
$creadListPrec :: ReadPrec [GetBackupVaultAccessPolicy]
readPrec :: ReadPrec GetBackupVaultAccessPolicy
$creadPrec :: ReadPrec GetBackupVaultAccessPolicy
readList :: ReadS [GetBackupVaultAccessPolicy]
$creadList :: ReadS [GetBackupVaultAccessPolicy]
readsPrec :: Int -> ReadS GetBackupVaultAccessPolicy
$creadsPrec :: Int -> ReadS GetBackupVaultAccessPolicy
Prelude.Read, Int -> GetBackupVaultAccessPolicy -> ShowS
[GetBackupVaultAccessPolicy] -> ShowS
GetBackupVaultAccessPolicy -> String
(Int -> GetBackupVaultAccessPolicy -> ShowS)
-> (GetBackupVaultAccessPolicy -> String)
-> ([GetBackupVaultAccessPolicy] -> ShowS)
-> Show GetBackupVaultAccessPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBackupVaultAccessPolicy] -> ShowS
$cshowList :: [GetBackupVaultAccessPolicy] -> ShowS
show :: GetBackupVaultAccessPolicy -> String
$cshow :: GetBackupVaultAccessPolicy -> String
showsPrec :: Int -> GetBackupVaultAccessPolicy -> ShowS
$cshowsPrec :: Int -> GetBackupVaultAccessPolicy -> ShowS
Prelude.Show, (forall x.
 GetBackupVaultAccessPolicy -> Rep GetBackupVaultAccessPolicy x)
-> (forall x.
    Rep GetBackupVaultAccessPolicy x -> GetBackupVaultAccessPolicy)
-> Generic GetBackupVaultAccessPolicy
forall x.
Rep GetBackupVaultAccessPolicy x -> GetBackupVaultAccessPolicy
forall x.
GetBackupVaultAccessPolicy -> Rep GetBackupVaultAccessPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBackupVaultAccessPolicy x -> GetBackupVaultAccessPolicy
$cfrom :: forall x.
GetBackupVaultAccessPolicy -> Rep GetBackupVaultAccessPolicy x
Prelude.Generic)

-- |
-- Create a value of 'GetBackupVaultAccessPolicy' 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:
--
-- 'backupVaultName', 'getBackupVaultAccessPolicy_backupVaultName' - The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Amazon Web Services Region where they are created. They
-- consist of lowercase letters, numbers, and hyphens.
newGetBackupVaultAccessPolicy ::
  -- | 'backupVaultName'
  Prelude.Text ->
  GetBackupVaultAccessPolicy
newGetBackupVaultAccessPolicy :: Text -> GetBackupVaultAccessPolicy
newGetBackupVaultAccessPolicy Text
pBackupVaultName_ =
  GetBackupVaultAccessPolicy' :: Text -> GetBackupVaultAccessPolicy
GetBackupVaultAccessPolicy'
    { $sel:backupVaultName:GetBackupVaultAccessPolicy' :: Text
backupVaultName =
        Text
pBackupVaultName_
    }

-- | The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Amazon Web Services Region where they are created. They
-- consist of lowercase letters, numbers, and hyphens.
getBackupVaultAccessPolicy_backupVaultName :: Lens.Lens' GetBackupVaultAccessPolicy Prelude.Text
getBackupVaultAccessPolicy_backupVaultName :: (Text -> f Text)
-> GetBackupVaultAccessPolicy -> f GetBackupVaultAccessPolicy
getBackupVaultAccessPolicy_backupVaultName = (GetBackupVaultAccessPolicy -> Text)
-> (GetBackupVaultAccessPolicy
    -> Text -> GetBackupVaultAccessPolicy)
-> Lens
     GetBackupVaultAccessPolicy GetBackupVaultAccessPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBackupVaultAccessPolicy' {Text
backupVaultName :: Text
$sel:backupVaultName:GetBackupVaultAccessPolicy' :: GetBackupVaultAccessPolicy -> Text
backupVaultName} -> Text
backupVaultName) (\s :: GetBackupVaultAccessPolicy
s@GetBackupVaultAccessPolicy' {} Text
a -> GetBackupVaultAccessPolicy
s {$sel:backupVaultName:GetBackupVaultAccessPolicy' :: Text
backupVaultName = Text
a} :: GetBackupVaultAccessPolicy)

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

instance Prelude.NFData GetBackupVaultAccessPolicy

instance Core.ToHeaders GetBackupVaultAccessPolicy where
  toHeaders :: GetBackupVaultAccessPolicy -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetBackupVaultAccessPolicy -> 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 GetBackupVaultAccessPolicy where
  toPath :: GetBackupVaultAccessPolicy -> ByteString
toPath GetBackupVaultAccessPolicy' {Text
backupVaultName :: Text
$sel:backupVaultName:GetBackupVaultAccessPolicy' :: GetBackupVaultAccessPolicy -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/backup-vaults/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
backupVaultName,
        ByteString
"/access-policy"
      ]

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

-- | /See:/ 'newGetBackupVaultAccessPolicyResponse' smart constructor.
data GetBackupVaultAccessPolicyResponse = GetBackupVaultAccessPolicyResponse'
  { -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
    -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
    GetBackupVaultAccessPolicyResponse -> Maybe Text
backupVaultArn :: Prelude.Maybe Prelude.Text,
    -- | The backup vault access policy document in JSON format.
    GetBackupVaultAccessPolicyResponse -> Maybe Text
policy :: Prelude.Maybe Prelude.Text,
    -- | The name of a logical container where backups are stored. Backup vaults
    -- are identified by names that are unique to the account used to create
    -- them and the Region where they are created. They consist of lowercase
    -- letters, numbers, and hyphens.
    GetBackupVaultAccessPolicyResponse -> Maybe Text
backupVaultName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetBackupVaultAccessPolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBackupVaultAccessPolicyResponse
-> GetBackupVaultAccessPolicyResponse -> Bool
(GetBackupVaultAccessPolicyResponse
 -> GetBackupVaultAccessPolicyResponse -> Bool)
-> (GetBackupVaultAccessPolicyResponse
    -> GetBackupVaultAccessPolicyResponse -> Bool)
-> Eq GetBackupVaultAccessPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBackupVaultAccessPolicyResponse
-> GetBackupVaultAccessPolicyResponse -> Bool
$c/= :: GetBackupVaultAccessPolicyResponse
-> GetBackupVaultAccessPolicyResponse -> Bool
== :: GetBackupVaultAccessPolicyResponse
-> GetBackupVaultAccessPolicyResponse -> Bool
$c== :: GetBackupVaultAccessPolicyResponse
-> GetBackupVaultAccessPolicyResponse -> Bool
Prelude.Eq, ReadPrec [GetBackupVaultAccessPolicyResponse]
ReadPrec GetBackupVaultAccessPolicyResponse
Int -> ReadS GetBackupVaultAccessPolicyResponse
ReadS [GetBackupVaultAccessPolicyResponse]
(Int -> ReadS GetBackupVaultAccessPolicyResponse)
-> ReadS [GetBackupVaultAccessPolicyResponse]
-> ReadPrec GetBackupVaultAccessPolicyResponse
-> ReadPrec [GetBackupVaultAccessPolicyResponse]
-> Read GetBackupVaultAccessPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBackupVaultAccessPolicyResponse]
$creadListPrec :: ReadPrec [GetBackupVaultAccessPolicyResponse]
readPrec :: ReadPrec GetBackupVaultAccessPolicyResponse
$creadPrec :: ReadPrec GetBackupVaultAccessPolicyResponse
readList :: ReadS [GetBackupVaultAccessPolicyResponse]
$creadList :: ReadS [GetBackupVaultAccessPolicyResponse]
readsPrec :: Int -> ReadS GetBackupVaultAccessPolicyResponse
$creadsPrec :: Int -> ReadS GetBackupVaultAccessPolicyResponse
Prelude.Read, Int -> GetBackupVaultAccessPolicyResponse -> ShowS
[GetBackupVaultAccessPolicyResponse] -> ShowS
GetBackupVaultAccessPolicyResponse -> String
(Int -> GetBackupVaultAccessPolicyResponse -> ShowS)
-> (GetBackupVaultAccessPolicyResponse -> String)
-> ([GetBackupVaultAccessPolicyResponse] -> ShowS)
-> Show GetBackupVaultAccessPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBackupVaultAccessPolicyResponse] -> ShowS
$cshowList :: [GetBackupVaultAccessPolicyResponse] -> ShowS
show :: GetBackupVaultAccessPolicyResponse -> String
$cshow :: GetBackupVaultAccessPolicyResponse -> String
showsPrec :: Int -> GetBackupVaultAccessPolicyResponse -> ShowS
$cshowsPrec :: Int -> GetBackupVaultAccessPolicyResponse -> ShowS
Prelude.Show, (forall x.
 GetBackupVaultAccessPolicyResponse
 -> Rep GetBackupVaultAccessPolicyResponse x)
-> (forall x.
    Rep GetBackupVaultAccessPolicyResponse x
    -> GetBackupVaultAccessPolicyResponse)
-> Generic GetBackupVaultAccessPolicyResponse
forall x.
Rep GetBackupVaultAccessPolicyResponse x
-> GetBackupVaultAccessPolicyResponse
forall x.
GetBackupVaultAccessPolicyResponse
-> Rep GetBackupVaultAccessPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBackupVaultAccessPolicyResponse x
-> GetBackupVaultAccessPolicyResponse
$cfrom :: forall x.
GetBackupVaultAccessPolicyResponse
-> Rep GetBackupVaultAccessPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBackupVaultAccessPolicyResponse' 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:
--
-- 'backupVaultArn', 'getBackupVaultAccessPolicyResponse_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
--
-- 'policy', 'getBackupVaultAccessPolicyResponse_policy' - The backup vault access policy document in JSON format.
--
-- 'backupVaultName', 'getBackupVaultAccessPolicyResponse_backupVaultName' - The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Region where they are created. They consist of lowercase
-- letters, numbers, and hyphens.
--
-- 'httpStatus', 'getBackupVaultAccessPolicyResponse_httpStatus' - The response's http status code.
newGetBackupVaultAccessPolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBackupVaultAccessPolicyResponse
newGetBackupVaultAccessPolicyResponse :: Int -> GetBackupVaultAccessPolicyResponse
newGetBackupVaultAccessPolicyResponse Int
pHttpStatus_ =
  GetBackupVaultAccessPolicyResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetBackupVaultAccessPolicyResponse
GetBackupVaultAccessPolicyResponse'
    { $sel:backupVaultArn:GetBackupVaultAccessPolicyResponse' :: Maybe Text
backupVaultArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:policy:GetBackupVaultAccessPolicyResponse' :: Maybe Text
policy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultName:GetBackupVaultAccessPolicyResponse' :: Maybe Text
backupVaultName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBackupVaultAccessPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
getBackupVaultAccessPolicyResponse_backupVaultArn :: Lens.Lens' GetBackupVaultAccessPolicyResponse (Prelude.Maybe Prelude.Text)
getBackupVaultAccessPolicyResponse_backupVaultArn :: (Maybe Text -> f (Maybe Text))
-> GetBackupVaultAccessPolicyResponse
-> f GetBackupVaultAccessPolicyResponse
getBackupVaultAccessPolicyResponse_backupVaultArn = (GetBackupVaultAccessPolicyResponse -> Maybe Text)
-> (GetBackupVaultAccessPolicyResponse
    -> Maybe Text -> GetBackupVaultAccessPolicyResponse)
-> Lens
     GetBackupVaultAccessPolicyResponse
     GetBackupVaultAccessPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBackupVaultAccessPolicyResponse' {Maybe Text
backupVaultArn :: Maybe Text
$sel:backupVaultArn:GetBackupVaultAccessPolicyResponse' :: GetBackupVaultAccessPolicyResponse -> Maybe Text
backupVaultArn} -> Maybe Text
backupVaultArn) (\s :: GetBackupVaultAccessPolicyResponse
s@GetBackupVaultAccessPolicyResponse' {} Maybe Text
a -> GetBackupVaultAccessPolicyResponse
s {$sel:backupVaultArn:GetBackupVaultAccessPolicyResponse' :: Maybe Text
backupVaultArn = Maybe Text
a} :: GetBackupVaultAccessPolicyResponse)

-- | The backup vault access policy document in JSON format.
getBackupVaultAccessPolicyResponse_policy :: Lens.Lens' GetBackupVaultAccessPolicyResponse (Prelude.Maybe Prelude.Text)
getBackupVaultAccessPolicyResponse_policy :: (Maybe Text -> f (Maybe Text))
-> GetBackupVaultAccessPolicyResponse
-> f GetBackupVaultAccessPolicyResponse
getBackupVaultAccessPolicyResponse_policy = (GetBackupVaultAccessPolicyResponse -> Maybe Text)
-> (GetBackupVaultAccessPolicyResponse
    -> Maybe Text -> GetBackupVaultAccessPolicyResponse)
-> Lens
     GetBackupVaultAccessPolicyResponse
     GetBackupVaultAccessPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBackupVaultAccessPolicyResponse' {Maybe Text
policy :: Maybe Text
$sel:policy:GetBackupVaultAccessPolicyResponse' :: GetBackupVaultAccessPolicyResponse -> Maybe Text
policy} -> Maybe Text
policy) (\s :: GetBackupVaultAccessPolicyResponse
s@GetBackupVaultAccessPolicyResponse' {} Maybe Text
a -> GetBackupVaultAccessPolicyResponse
s {$sel:policy:GetBackupVaultAccessPolicyResponse' :: Maybe Text
policy = Maybe Text
a} :: GetBackupVaultAccessPolicyResponse)

-- | The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Region where they are created. They consist of lowercase
-- letters, numbers, and hyphens.
getBackupVaultAccessPolicyResponse_backupVaultName :: Lens.Lens' GetBackupVaultAccessPolicyResponse (Prelude.Maybe Prelude.Text)
getBackupVaultAccessPolicyResponse_backupVaultName :: (Maybe Text -> f (Maybe Text))
-> GetBackupVaultAccessPolicyResponse
-> f GetBackupVaultAccessPolicyResponse
getBackupVaultAccessPolicyResponse_backupVaultName = (GetBackupVaultAccessPolicyResponse -> Maybe Text)
-> (GetBackupVaultAccessPolicyResponse
    -> Maybe Text -> GetBackupVaultAccessPolicyResponse)
-> Lens
     GetBackupVaultAccessPolicyResponse
     GetBackupVaultAccessPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBackupVaultAccessPolicyResponse' {Maybe Text
backupVaultName :: Maybe Text
$sel:backupVaultName:GetBackupVaultAccessPolicyResponse' :: GetBackupVaultAccessPolicyResponse -> Maybe Text
backupVaultName} -> Maybe Text
backupVaultName) (\s :: GetBackupVaultAccessPolicyResponse
s@GetBackupVaultAccessPolicyResponse' {} Maybe Text
a -> GetBackupVaultAccessPolicyResponse
s {$sel:backupVaultName:GetBackupVaultAccessPolicyResponse' :: Maybe Text
backupVaultName = Maybe Text
a} :: GetBackupVaultAccessPolicyResponse)

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

instance
  Prelude.NFData
    GetBackupVaultAccessPolicyResponse