{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.Config.Types.DeliveryChannel
-- 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)
module Amazonka.Config.Types.DeliveryChannel where

import Amazonka.Config.Types.ConfigSnapshotDeliveryProperties
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The channel through which Config delivers notifications and updated
-- configuration states.
--
-- /See:/ 'newDeliveryChannel' smart constructor.
data DeliveryChannel = DeliveryChannel'
  { -- | The prefix for the specified Amazon S3 bucket.
    DeliveryChannel -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Amazon SNS topic to which Config
    -- sends notifications about configuration changes.
    --
    -- If you choose a topic from another account, the topic must have policies
    -- that grant access permissions to Config. For more information, see
    -- <https://docs.aws.amazon.com/config/latest/developerguide/sns-topic-policy.html Permissions for the Amazon SNS Topic>
    -- in the Config Developer Guide.
    DeliveryChannel -> Maybe Text
snsTopicARN :: Prelude.Maybe Prelude.Text,
    -- | The name of the delivery channel. By default, Config assigns the name
    -- \"default\" when creating the delivery channel. To change the delivery
    -- channel name, you must use the DeleteDeliveryChannel action to delete
    -- your current delivery channel, and then you must use the
    -- PutDeliveryChannel command to create a delivery channel that has the
    -- desired name.
    DeliveryChannel -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Key Management Service (KMS ) KMS
    -- key (KMS key) used to encrypt objects delivered by Config. Must belong
    -- to the same Region as the destination S3 bucket.
    DeliveryChannel -> Maybe Text
s3KmsKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The options for how often Config delivers configuration snapshots to the
    -- Amazon S3 bucket.
    DeliveryChannel -> Maybe ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties :: Prelude.Maybe ConfigSnapshotDeliveryProperties,
    -- | The name of the Amazon S3 bucket to which Config delivers configuration
    -- snapshots and configuration history files.
    --
    -- If you specify a bucket that belongs to another Amazon Web Services
    -- account, that bucket must have policies that grant access permissions to
    -- Config. For more information, see
    -- <https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-policy.html Permissions for the Amazon S3 Bucket>
    -- in the Config Developer Guide.
    DeliveryChannel -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text
  }
  deriving (DeliveryChannel -> DeliveryChannel -> Bool
(DeliveryChannel -> DeliveryChannel -> Bool)
-> (DeliveryChannel -> DeliveryChannel -> Bool)
-> Eq DeliveryChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeliveryChannel -> DeliveryChannel -> Bool
$c/= :: DeliveryChannel -> DeliveryChannel -> Bool
== :: DeliveryChannel -> DeliveryChannel -> Bool
$c== :: DeliveryChannel -> DeliveryChannel -> Bool
Prelude.Eq, ReadPrec [DeliveryChannel]
ReadPrec DeliveryChannel
Int -> ReadS DeliveryChannel
ReadS [DeliveryChannel]
(Int -> ReadS DeliveryChannel)
-> ReadS [DeliveryChannel]
-> ReadPrec DeliveryChannel
-> ReadPrec [DeliveryChannel]
-> Read DeliveryChannel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeliveryChannel]
$creadListPrec :: ReadPrec [DeliveryChannel]
readPrec :: ReadPrec DeliveryChannel
$creadPrec :: ReadPrec DeliveryChannel
readList :: ReadS [DeliveryChannel]
$creadList :: ReadS [DeliveryChannel]
readsPrec :: Int -> ReadS DeliveryChannel
$creadsPrec :: Int -> ReadS DeliveryChannel
Prelude.Read, Int -> DeliveryChannel -> ShowS
[DeliveryChannel] -> ShowS
DeliveryChannel -> String
(Int -> DeliveryChannel -> ShowS)
-> (DeliveryChannel -> String)
-> ([DeliveryChannel] -> ShowS)
-> Show DeliveryChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeliveryChannel] -> ShowS
$cshowList :: [DeliveryChannel] -> ShowS
show :: DeliveryChannel -> String
$cshow :: DeliveryChannel -> String
showsPrec :: Int -> DeliveryChannel -> ShowS
$cshowsPrec :: Int -> DeliveryChannel -> ShowS
Prelude.Show, (forall x. DeliveryChannel -> Rep DeliveryChannel x)
-> (forall x. Rep DeliveryChannel x -> DeliveryChannel)
-> Generic DeliveryChannel
forall x. Rep DeliveryChannel x -> DeliveryChannel
forall x. DeliveryChannel -> Rep DeliveryChannel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeliveryChannel x -> DeliveryChannel
$cfrom :: forall x. DeliveryChannel -> Rep DeliveryChannel x
Prelude.Generic)

-- |
-- Create a value of 'DeliveryChannel' 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:
--
-- 's3KeyPrefix', 'deliveryChannel_s3KeyPrefix' - The prefix for the specified Amazon S3 bucket.
--
-- 'snsTopicARN', 'deliveryChannel_snsTopicARN' - The Amazon Resource Name (ARN) of the Amazon SNS topic to which Config
-- sends notifications about configuration changes.
--
-- If you choose a topic from another account, the topic must have policies
-- that grant access permissions to Config. For more information, see
-- <https://docs.aws.amazon.com/config/latest/developerguide/sns-topic-policy.html Permissions for the Amazon SNS Topic>
-- in the Config Developer Guide.
--
-- 'name', 'deliveryChannel_name' - The name of the delivery channel. By default, Config assigns the name
-- \"default\" when creating the delivery channel. To change the delivery
-- channel name, you must use the DeleteDeliveryChannel action to delete
-- your current delivery channel, and then you must use the
-- PutDeliveryChannel command to create a delivery channel that has the
-- desired name.
--
-- 's3KmsKeyArn', 'deliveryChannel_s3KmsKeyArn' - The Amazon Resource Name (ARN) of the Key Management Service (KMS ) KMS
-- key (KMS key) used to encrypt objects delivered by Config. Must belong
-- to the same Region as the destination S3 bucket.
--
-- 'configSnapshotDeliveryProperties', 'deliveryChannel_configSnapshotDeliveryProperties' - The options for how often Config delivers configuration snapshots to the
-- Amazon S3 bucket.
--
-- 's3BucketName', 'deliveryChannel_s3BucketName' - The name of the Amazon S3 bucket to which Config delivers configuration
-- snapshots and configuration history files.
--
-- If you specify a bucket that belongs to another Amazon Web Services
-- account, that bucket must have policies that grant access permissions to
-- Config. For more information, see
-- <https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-policy.html Permissions for the Amazon S3 Bucket>
-- in the Config Developer Guide.
newDeliveryChannel ::
  DeliveryChannel
newDeliveryChannel :: DeliveryChannel
newDeliveryChannel =
  DeliveryChannel' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ConfigSnapshotDeliveryProperties
-> Maybe Text
-> DeliveryChannel
DeliveryChannel'
    { $sel:s3KeyPrefix:DeliveryChannel' :: Maybe Text
s3KeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopicARN:DeliveryChannel' :: Maybe Text
snsTopicARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DeliveryChannel' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3KmsKeyArn:DeliveryChannel' :: Maybe Text
s3KmsKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configSnapshotDeliveryProperties:DeliveryChannel' :: Maybe ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties = Maybe ConfigSnapshotDeliveryProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:s3BucketName:DeliveryChannel' :: Maybe Text
s3BucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The prefix for the specified Amazon S3 bucket.
deliveryChannel_s3KeyPrefix :: Lens.Lens' DeliveryChannel (Prelude.Maybe Prelude.Text)
deliveryChannel_s3KeyPrefix :: (Maybe Text -> f (Maybe Text))
-> DeliveryChannel -> f DeliveryChannel
deliveryChannel_s3KeyPrefix = (DeliveryChannel -> Maybe Text)
-> (DeliveryChannel -> Maybe Text -> DeliveryChannel)
-> Lens DeliveryChannel DeliveryChannel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannel' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:DeliveryChannel' :: DeliveryChannel -> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: DeliveryChannel
s@DeliveryChannel' {} Maybe Text
a -> DeliveryChannel
s {$sel:s3KeyPrefix:DeliveryChannel' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: DeliveryChannel)

-- | The Amazon Resource Name (ARN) of the Amazon SNS topic to which Config
-- sends notifications about configuration changes.
--
-- If you choose a topic from another account, the topic must have policies
-- that grant access permissions to Config. For more information, see
-- <https://docs.aws.amazon.com/config/latest/developerguide/sns-topic-policy.html Permissions for the Amazon SNS Topic>
-- in the Config Developer Guide.
deliveryChannel_snsTopicARN :: Lens.Lens' DeliveryChannel (Prelude.Maybe Prelude.Text)
deliveryChannel_snsTopicARN :: (Maybe Text -> f (Maybe Text))
-> DeliveryChannel -> f DeliveryChannel
deliveryChannel_snsTopicARN = (DeliveryChannel -> Maybe Text)
-> (DeliveryChannel -> Maybe Text -> DeliveryChannel)
-> Lens DeliveryChannel DeliveryChannel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannel' {Maybe Text
snsTopicARN :: Maybe Text
$sel:snsTopicARN:DeliveryChannel' :: DeliveryChannel -> Maybe Text
snsTopicARN} -> Maybe Text
snsTopicARN) (\s :: DeliveryChannel
s@DeliveryChannel' {} Maybe Text
a -> DeliveryChannel
s {$sel:snsTopicARN:DeliveryChannel' :: Maybe Text
snsTopicARN = Maybe Text
a} :: DeliveryChannel)

-- | The name of the delivery channel. By default, Config assigns the name
-- \"default\" when creating the delivery channel. To change the delivery
-- channel name, you must use the DeleteDeliveryChannel action to delete
-- your current delivery channel, and then you must use the
-- PutDeliveryChannel command to create a delivery channel that has the
-- desired name.
deliveryChannel_name :: Lens.Lens' DeliveryChannel (Prelude.Maybe Prelude.Text)
deliveryChannel_name :: (Maybe Text -> f (Maybe Text))
-> DeliveryChannel -> f DeliveryChannel
deliveryChannel_name = (DeliveryChannel -> Maybe Text)
-> (DeliveryChannel -> Maybe Text -> DeliveryChannel)
-> Lens DeliveryChannel DeliveryChannel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannel' {Maybe Text
name :: Maybe Text
$sel:name:DeliveryChannel' :: DeliveryChannel -> Maybe Text
name} -> Maybe Text
name) (\s :: DeliveryChannel
s@DeliveryChannel' {} Maybe Text
a -> DeliveryChannel
s {$sel:name:DeliveryChannel' :: Maybe Text
name = Maybe Text
a} :: DeliveryChannel)

-- | The Amazon Resource Name (ARN) of the Key Management Service (KMS ) KMS
-- key (KMS key) used to encrypt objects delivered by Config. Must belong
-- to the same Region as the destination S3 bucket.
deliveryChannel_s3KmsKeyArn :: Lens.Lens' DeliveryChannel (Prelude.Maybe Prelude.Text)
deliveryChannel_s3KmsKeyArn :: (Maybe Text -> f (Maybe Text))
-> DeliveryChannel -> f DeliveryChannel
deliveryChannel_s3KmsKeyArn = (DeliveryChannel -> Maybe Text)
-> (DeliveryChannel -> Maybe Text -> DeliveryChannel)
-> Lens DeliveryChannel DeliveryChannel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannel' {Maybe Text
s3KmsKeyArn :: Maybe Text
$sel:s3KmsKeyArn:DeliveryChannel' :: DeliveryChannel -> Maybe Text
s3KmsKeyArn} -> Maybe Text
s3KmsKeyArn) (\s :: DeliveryChannel
s@DeliveryChannel' {} Maybe Text
a -> DeliveryChannel
s {$sel:s3KmsKeyArn:DeliveryChannel' :: Maybe Text
s3KmsKeyArn = Maybe Text
a} :: DeliveryChannel)

-- | The options for how often Config delivers configuration snapshots to the
-- Amazon S3 bucket.
deliveryChannel_configSnapshotDeliveryProperties :: Lens.Lens' DeliveryChannel (Prelude.Maybe ConfigSnapshotDeliveryProperties)
deliveryChannel_configSnapshotDeliveryProperties :: (Maybe ConfigSnapshotDeliveryProperties
 -> f (Maybe ConfigSnapshotDeliveryProperties))
-> DeliveryChannel -> f DeliveryChannel
deliveryChannel_configSnapshotDeliveryProperties = (DeliveryChannel -> Maybe ConfigSnapshotDeliveryProperties)
-> (DeliveryChannel
    -> Maybe ConfigSnapshotDeliveryProperties -> DeliveryChannel)
-> Lens
     DeliveryChannel
     DeliveryChannel
     (Maybe ConfigSnapshotDeliveryProperties)
     (Maybe ConfigSnapshotDeliveryProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannel' {Maybe ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties :: Maybe ConfigSnapshotDeliveryProperties
$sel:configSnapshotDeliveryProperties:DeliveryChannel' :: DeliveryChannel -> Maybe ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties} -> Maybe ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties) (\s :: DeliveryChannel
s@DeliveryChannel' {} Maybe ConfigSnapshotDeliveryProperties
a -> DeliveryChannel
s {$sel:configSnapshotDeliveryProperties:DeliveryChannel' :: Maybe ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties = Maybe ConfigSnapshotDeliveryProperties
a} :: DeliveryChannel)

-- | The name of the Amazon S3 bucket to which Config delivers configuration
-- snapshots and configuration history files.
--
-- If you specify a bucket that belongs to another Amazon Web Services
-- account, that bucket must have policies that grant access permissions to
-- Config. For more information, see
-- <https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-policy.html Permissions for the Amazon S3 Bucket>
-- in the Config Developer Guide.
deliveryChannel_s3BucketName :: Lens.Lens' DeliveryChannel (Prelude.Maybe Prelude.Text)
deliveryChannel_s3BucketName :: (Maybe Text -> f (Maybe Text))
-> DeliveryChannel -> f DeliveryChannel
deliveryChannel_s3BucketName = (DeliveryChannel -> Maybe Text)
-> (DeliveryChannel -> Maybe Text -> DeliveryChannel)
-> Lens DeliveryChannel DeliveryChannel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannel' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:DeliveryChannel' :: DeliveryChannel -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: DeliveryChannel
s@DeliveryChannel' {} Maybe Text
a -> DeliveryChannel
s {$sel:s3BucketName:DeliveryChannel' :: Maybe Text
s3BucketName = Maybe Text
a} :: DeliveryChannel)

instance Core.FromJSON DeliveryChannel where
  parseJSON :: Value -> Parser DeliveryChannel
parseJSON =
    String
-> (Object -> Parser DeliveryChannel)
-> Value
-> Parser DeliveryChannel
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DeliveryChannel"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ConfigSnapshotDeliveryProperties
-> Maybe Text
-> DeliveryChannel
DeliveryChannel'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ConfigSnapshotDeliveryProperties
 -> Maybe Text
 -> DeliveryChannel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConfigSnapshotDeliveryProperties
      -> Maybe Text
      -> DeliveryChannel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"s3KeyPrefix")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConfigSnapshotDeliveryProperties
   -> Maybe Text
   -> DeliveryChannel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ConfigSnapshotDeliveryProperties
      -> Maybe Text
      -> DeliveryChannel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"snsTopicARN")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ConfigSnapshotDeliveryProperties
   -> Maybe Text
   -> DeliveryChannel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ConfigSnapshotDeliveryProperties
      -> Maybe Text
      -> DeliveryChannel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe Text
   -> Maybe ConfigSnapshotDeliveryProperties
   -> Maybe Text
   -> DeliveryChannel)
-> Parser (Maybe Text)
-> Parser
     (Maybe ConfigSnapshotDeliveryProperties
      -> Maybe Text -> DeliveryChannel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"s3KmsKeyArn")
            Parser
  (Maybe ConfigSnapshotDeliveryProperties
   -> Maybe Text -> DeliveryChannel)
-> Parser (Maybe ConfigSnapshotDeliveryProperties)
-> Parser (Maybe Text -> DeliveryChannel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConfigSnapshotDeliveryProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configSnapshotDeliveryProperties")
            Parser (Maybe Text -> DeliveryChannel)
-> Parser (Maybe Text) -> Parser DeliveryChannel
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"s3BucketName")
      )

instance Prelude.Hashable DeliveryChannel

instance Prelude.NFData DeliveryChannel

instance Core.ToJSON DeliveryChannel where
  toJSON :: DeliveryChannel -> Value
toJSON DeliveryChannel' {Maybe Text
Maybe ConfigSnapshotDeliveryProperties
s3BucketName :: Maybe Text
configSnapshotDeliveryProperties :: Maybe ConfigSnapshotDeliveryProperties
s3KmsKeyArn :: Maybe Text
name :: Maybe Text
snsTopicARN :: Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3BucketName:DeliveryChannel' :: DeliveryChannel -> Maybe Text
$sel:configSnapshotDeliveryProperties:DeliveryChannel' :: DeliveryChannel -> Maybe ConfigSnapshotDeliveryProperties
$sel:s3KmsKeyArn:DeliveryChannel' :: DeliveryChannel -> Maybe Text
$sel:name:DeliveryChannel' :: DeliveryChannel -> Maybe Text
$sel:snsTopicARN:DeliveryChannel' :: DeliveryChannel -> Maybe Text
$sel:s3KeyPrefix:DeliveryChannel' :: DeliveryChannel -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"s3KeyPrefix" 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
s3KeyPrefix,
            (Text
"snsTopicARN" 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
snsTopicARN,
            (Text
"name" 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
name,
            (Text
"s3KmsKeyArn" 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
s3KmsKeyArn,
            (Text
"configSnapshotDeliveryProperties" Text -> ConfigSnapshotDeliveryProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ConfigSnapshotDeliveryProperties -> Pair)
-> Maybe ConfigSnapshotDeliveryProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties,
            (Text
"s3BucketName" 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
s3BucketName
          ]
      )