{-# 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.GetBackupVaultNotifications
-- 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 event notifications for the specified backup vault.
module Amazonka.Backup.GetBackupVaultNotifications
  ( -- * Creating a Request
    GetBackupVaultNotifications (..),
    newGetBackupVaultNotifications,

    -- * Request Lenses
    getBackupVaultNotifications_backupVaultName,

    -- * Destructuring the Response
    GetBackupVaultNotificationsResponse (..),
    newGetBackupVaultNotificationsResponse,

    -- * Response Lenses
    getBackupVaultNotificationsResponse_sNSTopicArn,
    getBackupVaultNotificationsResponse_backupVaultArn,
    getBackupVaultNotificationsResponse_backupVaultName,
    getBackupVaultNotificationsResponse_backupVaultEvents,
    getBackupVaultNotificationsResponse_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:/ 'newGetBackupVaultNotifications' smart constructor.
data GetBackupVaultNotifications = GetBackupVaultNotifications'
  { -- | 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.
    GetBackupVaultNotifications -> Text
backupVaultName :: Prelude.Text
  }
  deriving (GetBackupVaultNotifications -> GetBackupVaultNotifications -> Bool
(GetBackupVaultNotifications
 -> GetBackupVaultNotifications -> Bool)
-> (GetBackupVaultNotifications
    -> GetBackupVaultNotifications -> Bool)
-> Eq GetBackupVaultNotifications
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBackupVaultNotifications -> GetBackupVaultNotifications -> Bool
$c/= :: GetBackupVaultNotifications -> GetBackupVaultNotifications -> Bool
== :: GetBackupVaultNotifications -> GetBackupVaultNotifications -> Bool
$c== :: GetBackupVaultNotifications -> GetBackupVaultNotifications -> Bool
Prelude.Eq, ReadPrec [GetBackupVaultNotifications]
ReadPrec GetBackupVaultNotifications
Int -> ReadS GetBackupVaultNotifications
ReadS [GetBackupVaultNotifications]
(Int -> ReadS GetBackupVaultNotifications)
-> ReadS [GetBackupVaultNotifications]
-> ReadPrec GetBackupVaultNotifications
-> ReadPrec [GetBackupVaultNotifications]
-> Read GetBackupVaultNotifications
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBackupVaultNotifications]
$creadListPrec :: ReadPrec [GetBackupVaultNotifications]
readPrec :: ReadPrec GetBackupVaultNotifications
$creadPrec :: ReadPrec GetBackupVaultNotifications
readList :: ReadS [GetBackupVaultNotifications]
$creadList :: ReadS [GetBackupVaultNotifications]
readsPrec :: Int -> ReadS GetBackupVaultNotifications
$creadsPrec :: Int -> ReadS GetBackupVaultNotifications
Prelude.Read, Int -> GetBackupVaultNotifications -> ShowS
[GetBackupVaultNotifications] -> ShowS
GetBackupVaultNotifications -> String
(Int -> GetBackupVaultNotifications -> ShowS)
-> (GetBackupVaultNotifications -> String)
-> ([GetBackupVaultNotifications] -> ShowS)
-> Show GetBackupVaultNotifications
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBackupVaultNotifications] -> ShowS
$cshowList :: [GetBackupVaultNotifications] -> ShowS
show :: GetBackupVaultNotifications -> String
$cshow :: GetBackupVaultNotifications -> String
showsPrec :: Int -> GetBackupVaultNotifications -> ShowS
$cshowsPrec :: Int -> GetBackupVaultNotifications -> ShowS
Prelude.Show, (forall x.
 GetBackupVaultNotifications -> Rep GetBackupVaultNotifications x)
-> (forall x.
    Rep GetBackupVaultNotifications x -> GetBackupVaultNotifications)
-> Generic GetBackupVaultNotifications
forall x.
Rep GetBackupVaultNotifications x -> GetBackupVaultNotifications
forall x.
GetBackupVaultNotifications -> Rep GetBackupVaultNotifications x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBackupVaultNotifications x -> GetBackupVaultNotifications
$cfrom :: forall x.
GetBackupVaultNotifications -> Rep GetBackupVaultNotifications x
Prelude.Generic)

-- |
-- Create a value of 'GetBackupVaultNotifications' 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', 'getBackupVaultNotifications_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.
newGetBackupVaultNotifications ::
  -- | 'backupVaultName'
  Prelude.Text ->
  GetBackupVaultNotifications
newGetBackupVaultNotifications :: Text -> GetBackupVaultNotifications
newGetBackupVaultNotifications Text
pBackupVaultName_ =
  GetBackupVaultNotifications' :: Text -> GetBackupVaultNotifications
GetBackupVaultNotifications'
    { $sel:backupVaultName:GetBackupVaultNotifications' :: 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.
getBackupVaultNotifications_backupVaultName :: Lens.Lens' GetBackupVaultNotifications Prelude.Text
getBackupVaultNotifications_backupVaultName :: (Text -> f Text)
-> GetBackupVaultNotifications -> f GetBackupVaultNotifications
getBackupVaultNotifications_backupVaultName = (GetBackupVaultNotifications -> Text)
-> (GetBackupVaultNotifications
    -> Text -> GetBackupVaultNotifications)
-> Lens
     GetBackupVaultNotifications GetBackupVaultNotifications Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBackupVaultNotifications' {Text
backupVaultName :: Text
$sel:backupVaultName:GetBackupVaultNotifications' :: GetBackupVaultNotifications -> Text
backupVaultName} -> Text
backupVaultName) (\s :: GetBackupVaultNotifications
s@GetBackupVaultNotifications' {} Text
a -> GetBackupVaultNotifications
s {$sel:backupVaultName:GetBackupVaultNotifications' :: Text
backupVaultName = Text
a} :: GetBackupVaultNotifications)

instance Core.AWSRequest GetBackupVaultNotifications where
  type
    AWSResponse GetBackupVaultNotifications =
      GetBackupVaultNotificationsResponse
  request :: GetBackupVaultNotifications -> Request GetBackupVaultNotifications
request = Service
-> GetBackupVaultNotifications
-> Request GetBackupVaultNotifications
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetBackupVaultNotifications
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBackupVaultNotifications)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetBackupVaultNotifications))
-> Logger
-> Service
-> Proxy GetBackupVaultNotifications
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBackupVaultNotifications)))
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
-> Maybe [BackupVaultEvent]
-> Int
-> GetBackupVaultNotificationsResponse
GetBackupVaultNotificationsResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [BackupVaultEvent]
 -> Int
 -> GetBackupVaultNotificationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [BackupVaultEvent]
      -> Int
      -> GetBackupVaultNotificationsResponse)
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
"SNSTopicArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [BackupVaultEvent]
   -> Int
   -> GetBackupVaultNotificationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [BackupVaultEvent]
      -> Int
      -> GetBackupVaultNotificationsResponse)
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
"BackupVaultArn")
            Either
  String
  (Maybe Text
   -> Maybe [BackupVaultEvent]
   -> Int
   -> GetBackupVaultNotificationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [BackupVaultEvent]
      -> Int -> GetBackupVaultNotificationsResponse)
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
  (Maybe [BackupVaultEvent]
   -> Int -> GetBackupVaultNotificationsResponse)
-> Either String (Maybe [BackupVaultEvent])
-> Either String (Int -> GetBackupVaultNotificationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [BackupVaultEvent]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BackupVaultEvents"
                            Either String (Maybe (Maybe [BackupVaultEvent]))
-> Maybe [BackupVaultEvent]
-> Either String (Maybe [BackupVaultEvent])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [BackupVaultEvent]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> GetBackupVaultNotificationsResponse)
-> Either String Int
-> Either String GetBackupVaultNotificationsResponse
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 GetBackupVaultNotifications

instance Prelude.NFData GetBackupVaultNotifications

instance Core.ToHeaders GetBackupVaultNotifications where
  toHeaders :: GetBackupVaultNotifications -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetBackupVaultNotifications -> 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 GetBackupVaultNotifications where
  toPath :: GetBackupVaultNotifications -> ByteString
toPath GetBackupVaultNotifications' {Text
backupVaultName :: Text
$sel:backupVaultName:GetBackupVaultNotifications' :: GetBackupVaultNotifications -> 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
"/notification-configuration"
      ]

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

-- | /See:/ 'newGetBackupVaultNotificationsResponse' smart constructor.
data GetBackupVaultNotificationsResponse = GetBackupVaultNotificationsResponse'
  { -- | An ARN that uniquely identifies an Amazon Simple Notification Service
    -- (Amazon SNS) topic; for example,
    -- @arn:aws:sns:us-west-2:111122223333:MyTopic@.
    GetBackupVaultNotificationsResponse -> Maybe Text
sNSTopicArn :: Prelude.Maybe Prelude.Text,
    -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
    -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
    GetBackupVaultNotificationsResponse -> Maybe Text
backupVaultArn :: 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.
    GetBackupVaultNotificationsResponse -> Maybe Text
backupVaultName :: Prelude.Maybe Prelude.Text,
    -- | An array of events that indicate the status of jobs to back up resources
    -- to the backup vault.
    GetBackupVaultNotificationsResponse -> Maybe [BackupVaultEvent]
backupVaultEvents :: Prelude.Maybe [BackupVaultEvent],
    -- | The response's http status code.
    GetBackupVaultNotificationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBackupVaultNotificationsResponse
-> GetBackupVaultNotificationsResponse -> Bool
(GetBackupVaultNotificationsResponse
 -> GetBackupVaultNotificationsResponse -> Bool)
-> (GetBackupVaultNotificationsResponse
    -> GetBackupVaultNotificationsResponse -> Bool)
-> Eq GetBackupVaultNotificationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBackupVaultNotificationsResponse
-> GetBackupVaultNotificationsResponse -> Bool
$c/= :: GetBackupVaultNotificationsResponse
-> GetBackupVaultNotificationsResponse -> Bool
== :: GetBackupVaultNotificationsResponse
-> GetBackupVaultNotificationsResponse -> Bool
$c== :: GetBackupVaultNotificationsResponse
-> GetBackupVaultNotificationsResponse -> Bool
Prelude.Eq, ReadPrec [GetBackupVaultNotificationsResponse]
ReadPrec GetBackupVaultNotificationsResponse
Int -> ReadS GetBackupVaultNotificationsResponse
ReadS [GetBackupVaultNotificationsResponse]
(Int -> ReadS GetBackupVaultNotificationsResponse)
-> ReadS [GetBackupVaultNotificationsResponse]
-> ReadPrec GetBackupVaultNotificationsResponse
-> ReadPrec [GetBackupVaultNotificationsResponse]
-> Read GetBackupVaultNotificationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBackupVaultNotificationsResponse]
$creadListPrec :: ReadPrec [GetBackupVaultNotificationsResponse]
readPrec :: ReadPrec GetBackupVaultNotificationsResponse
$creadPrec :: ReadPrec GetBackupVaultNotificationsResponse
readList :: ReadS [GetBackupVaultNotificationsResponse]
$creadList :: ReadS [GetBackupVaultNotificationsResponse]
readsPrec :: Int -> ReadS GetBackupVaultNotificationsResponse
$creadsPrec :: Int -> ReadS GetBackupVaultNotificationsResponse
Prelude.Read, Int -> GetBackupVaultNotificationsResponse -> ShowS
[GetBackupVaultNotificationsResponse] -> ShowS
GetBackupVaultNotificationsResponse -> String
(Int -> GetBackupVaultNotificationsResponse -> ShowS)
-> (GetBackupVaultNotificationsResponse -> String)
-> ([GetBackupVaultNotificationsResponse] -> ShowS)
-> Show GetBackupVaultNotificationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBackupVaultNotificationsResponse] -> ShowS
$cshowList :: [GetBackupVaultNotificationsResponse] -> ShowS
show :: GetBackupVaultNotificationsResponse -> String
$cshow :: GetBackupVaultNotificationsResponse -> String
showsPrec :: Int -> GetBackupVaultNotificationsResponse -> ShowS
$cshowsPrec :: Int -> GetBackupVaultNotificationsResponse -> ShowS
Prelude.Show, (forall x.
 GetBackupVaultNotificationsResponse
 -> Rep GetBackupVaultNotificationsResponse x)
-> (forall x.
    Rep GetBackupVaultNotificationsResponse x
    -> GetBackupVaultNotificationsResponse)
-> Generic GetBackupVaultNotificationsResponse
forall x.
Rep GetBackupVaultNotificationsResponse x
-> GetBackupVaultNotificationsResponse
forall x.
GetBackupVaultNotificationsResponse
-> Rep GetBackupVaultNotificationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBackupVaultNotificationsResponse x
-> GetBackupVaultNotificationsResponse
$cfrom :: forall x.
GetBackupVaultNotificationsResponse
-> Rep GetBackupVaultNotificationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBackupVaultNotificationsResponse' 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:
--
-- 'sNSTopicArn', 'getBackupVaultNotificationsResponse_sNSTopicArn' - An ARN that uniquely identifies an Amazon Simple Notification Service
-- (Amazon SNS) topic; for example,
-- @arn:aws:sns:us-west-2:111122223333:MyTopic@.
--
-- 'backupVaultArn', 'getBackupVaultNotificationsResponse_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
--
-- 'backupVaultName', 'getBackupVaultNotificationsResponse_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.
--
-- 'backupVaultEvents', 'getBackupVaultNotificationsResponse_backupVaultEvents' - An array of events that indicate the status of jobs to back up resources
-- to the backup vault.
--
-- 'httpStatus', 'getBackupVaultNotificationsResponse_httpStatus' - The response's http status code.
newGetBackupVaultNotificationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBackupVaultNotificationsResponse
newGetBackupVaultNotificationsResponse :: Int -> GetBackupVaultNotificationsResponse
newGetBackupVaultNotificationsResponse Int
pHttpStatus_ =
  GetBackupVaultNotificationsResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [BackupVaultEvent]
-> Int
-> GetBackupVaultNotificationsResponse
GetBackupVaultNotificationsResponse'
    { $sel:sNSTopicArn:GetBackupVaultNotificationsResponse' :: Maybe Text
sNSTopicArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultArn:GetBackupVaultNotificationsResponse' :: Maybe Text
backupVaultArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultName:GetBackupVaultNotificationsResponse' :: Maybe Text
backupVaultName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultEvents:GetBackupVaultNotificationsResponse' :: Maybe [BackupVaultEvent]
backupVaultEvents = Maybe [BackupVaultEvent]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBackupVaultNotificationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An ARN that uniquely identifies an Amazon Simple Notification Service
-- (Amazon SNS) topic; for example,
-- @arn:aws:sns:us-west-2:111122223333:MyTopic@.
getBackupVaultNotificationsResponse_sNSTopicArn :: Lens.Lens' GetBackupVaultNotificationsResponse (Prelude.Maybe Prelude.Text)
getBackupVaultNotificationsResponse_sNSTopicArn :: (Maybe Text -> f (Maybe Text))
-> GetBackupVaultNotificationsResponse
-> f GetBackupVaultNotificationsResponse
getBackupVaultNotificationsResponse_sNSTopicArn = (GetBackupVaultNotificationsResponse -> Maybe Text)
-> (GetBackupVaultNotificationsResponse
    -> Maybe Text -> GetBackupVaultNotificationsResponse)
-> Lens
     GetBackupVaultNotificationsResponse
     GetBackupVaultNotificationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBackupVaultNotificationsResponse' {Maybe Text
sNSTopicArn :: Maybe Text
$sel:sNSTopicArn:GetBackupVaultNotificationsResponse' :: GetBackupVaultNotificationsResponse -> Maybe Text
sNSTopicArn} -> Maybe Text
sNSTopicArn) (\s :: GetBackupVaultNotificationsResponse
s@GetBackupVaultNotificationsResponse' {} Maybe Text
a -> GetBackupVaultNotificationsResponse
s {$sel:sNSTopicArn:GetBackupVaultNotificationsResponse' :: Maybe Text
sNSTopicArn = Maybe Text
a} :: GetBackupVaultNotificationsResponse)

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

-- | 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.
getBackupVaultNotificationsResponse_backupVaultName :: Lens.Lens' GetBackupVaultNotificationsResponse (Prelude.Maybe Prelude.Text)
getBackupVaultNotificationsResponse_backupVaultName :: (Maybe Text -> f (Maybe Text))
-> GetBackupVaultNotificationsResponse
-> f GetBackupVaultNotificationsResponse
getBackupVaultNotificationsResponse_backupVaultName = (GetBackupVaultNotificationsResponse -> Maybe Text)
-> (GetBackupVaultNotificationsResponse
    -> Maybe Text -> GetBackupVaultNotificationsResponse)
-> Lens
     GetBackupVaultNotificationsResponse
     GetBackupVaultNotificationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBackupVaultNotificationsResponse' {Maybe Text
backupVaultName :: Maybe Text
$sel:backupVaultName:GetBackupVaultNotificationsResponse' :: GetBackupVaultNotificationsResponse -> Maybe Text
backupVaultName} -> Maybe Text
backupVaultName) (\s :: GetBackupVaultNotificationsResponse
s@GetBackupVaultNotificationsResponse' {} Maybe Text
a -> GetBackupVaultNotificationsResponse
s {$sel:backupVaultName:GetBackupVaultNotificationsResponse' :: Maybe Text
backupVaultName = Maybe Text
a} :: GetBackupVaultNotificationsResponse)

-- | An array of events that indicate the status of jobs to back up resources
-- to the backup vault.
getBackupVaultNotificationsResponse_backupVaultEvents :: Lens.Lens' GetBackupVaultNotificationsResponse (Prelude.Maybe [BackupVaultEvent])
getBackupVaultNotificationsResponse_backupVaultEvents :: (Maybe [BackupVaultEvent] -> f (Maybe [BackupVaultEvent]))
-> GetBackupVaultNotificationsResponse
-> f GetBackupVaultNotificationsResponse
getBackupVaultNotificationsResponse_backupVaultEvents = (GetBackupVaultNotificationsResponse -> Maybe [BackupVaultEvent])
-> (GetBackupVaultNotificationsResponse
    -> Maybe [BackupVaultEvent] -> GetBackupVaultNotificationsResponse)
-> Lens
     GetBackupVaultNotificationsResponse
     GetBackupVaultNotificationsResponse
     (Maybe [BackupVaultEvent])
     (Maybe [BackupVaultEvent])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBackupVaultNotificationsResponse' {Maybe [BackupVaultEvent]
backupVaultEvents :: Maybe [BackupVaultEvent]
$sel:backupVaultEvents:GetBackupVaultNotificationsResponse' :: GetBackupVaultNotificationsResponse -> Maybe [BackupVaultEvent]
backupVaultEvents} -> Maybe [BackupVaultEvent]
backupVaultEvents) (\s :: GetBackupVaultNotificationsResponse
s@GetBackupVaultNotificationsResponse' {} Maybe [BackupVaultEvent]
a -> GetBackupVaultNotificationsResponse
s {$sel:backupVaultEvents:GetBackupVaultNotificationsResponse' :: Maybe [BackupVaultEvent]
backupVaultEvents = Maybe [BackupVaultEvent]
a} :: GetBackupVaultNotificationsResponse) ((Maybe [BackupVaultEvent] -> f (Maybe [BackupVaultEvent]))
 -> GetBackupVaultNotificationsResponse
 -> f GetBackupVaultNotificationsResponse)
-> ((Maybe [BackupVaultEvent] -> f (Maybe [BackupVaultEvent]))
    -> Maybe [BackupVaultEvent] -> f (Maybe [BackupVaultEvent]))
-> (Maybe [BackupVaultEvent] -> f (Maybe [BackupVaultEvent]))
-> GetBackupVaultNotificationsResponse
-> f GetBackupVaultNotificationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BackupVaultEvent]
  [BackupVaultEvent]
  [BackupVaultEvent]
  [BackupVaultEvent]
-> Iso
     (Maybe [BackupVaultEvent])
     (Maybe [BackupVaultEvent])
     (Maybe [BackupVaultEvent])
     (Maybe [BackupVaultEvent])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [BackupVaultEvent]
  [BackupVaultEvent]
  [BackupVaultEvent]
  [BackupVaultEvent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    GetBackupVaultNotificationsResponse