{-# 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.SSM.Types.ResourceDataSyncS3Destination
-- 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.SSM.Types.ResourceDataSyncS3Destination where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.ResourceDataSyncDestinationDataSharing
import Amazonka.SSM.Types.ResourceDataSyncS3Format

-- | Information about the target S3 bucket for the resource data sync.
--
-- /See:/ 'newResourceDataSyncS3Destination' smart constructor.
data ResourceDataSyncS3Destination = ResourceDataSyncS3Destination'
  { -- | An Amazon S3 prefix for the bucket.
    ResourceDataSyncS3Destination -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
    -- | Enables destination data sharing. By default, this field is @null@.
    ResourceDataSyncS3Destination
-> Maybe ResourceDataSyncDestinationDataSharing
destinationDataSharing :: Prelude.Maybe ResourceDataSyncDestinationDataSharing,
    -- | The ARN of an encryption key for a destination in Amazon S3. Must belong
    -- to the same Region as the destination S3 bucket.
    ResourceDataSyncS3Destination -> Maybe Text
aWSKMSKeyARN :: Prelude.Maybe Prelude.Text,
    -- | The name of the S3 bucket where the aggregated data is stored.
    ResourceDataSyncS3Destination -> Text
bucketName :: Prelude.Text,
    -- | A supported sync format. The following format is currently supported:
    -- JsonSerDe
    ResourceDataSyncS3Destination -> ResourceDataSyncS3Format
syncFormat :: ResourceDataSyncS3Format,
    -- | The Amazon Web Services Region with the S3 bucket targeted by the
    -- resource data sync.
    ResourceDataSyncS3Destination -> Text
region :: Prelude.Text
  }
  deriving (ResourceDataSyncS3Destination
-> ResourceDataSyncS3Destination -> Bool
(ResourceDataSyncS3Destination
 -> ResourceDataSyncS3Destination -> Bool)
-> (ResourceDataSyncS3Destination
    -> ResourceDataSyncS3Destination -> Bool)
-> Eq ResourceDataSyncS3Destination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceDataSyncS3Destination
-> ResourceDataSyncS3Destination -> Bool
$c/= :: ResourceDataSyncS3Destination
-> ResourceDataSyncS3Destination -> Bool
== :: ResourceDataSyncS3Destination
-> ResourceDataSyncS3Destination -> Bool
$c== :: ResourceDataSyncS3Destination
-> ResourceDataSyncS3Destination -> Bool
Prelude.Eq, ReadPrec [ResourceDataSyncS3Destination]
ReadPrec ResourceDataSyncS3Destination
Int -> ReadS ResourceDataSyncS3Destination
ReadS [ResourceDataSyncS3Destination]
(Int -> ReadS ResourceDataSyncS3Destination)
-> ReadS [ResourceDataSyncS3Destination]
-> ReadPrec ResourceDataSyncS3Destination
-> ReadPrec [ResourceDataSyncS3Destination]
-> Read ResourceDataSyncS3Destination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceDataSyncS3Destination]
$creadListPrec :: ReadPrec [ResourceDataSyncS3Destination]
readPrec :: ReadPrec ResourceDataSyncS3Destination
$creadPrec :: ReadPrec ResourceDataSyncS3Destination
readList :: ReadS [ResourceDataSyncS3Destination]
$creadList :: ReadS [ResourceDataSyncS3Destination]
readsPrec :: Int -> ReadS ResourceDataSyncS3Destination
$creadsPrec :: Int -> ReadS ResourceDataSyncS3Destination
Prelude.Read, Int -> ResourceDataSyncS3Destination -> ShowS
[ResourceDataSyncS3Destination] -> ShowS
ResourceDataSyncS3Destination -> String
(Int -> ResourceDataSyncS3Destination -> ShowS)
-> (ResourceDataSyncS3Destination -> String)
-> ([ResourceDataSyncS3Destination] -> ShowS)
-> Show ResourceDataSyncS3Destination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceDataSyncS3Destination] -> ShowS
$cshowList :: [ResourceDataSyncS3Destination] -> ShowS
show :: ResourceDataSyncS3Destination -> String
$cshow :: ResourceDataSyncS3Destination -> String
showsPrec :: Int -> ResourceDataSyncS3Destination -> ShowS
$cshowsPrec :: Int -> ResourceDataSyncS3Destination -> ShowS
Prelude.Show, (forall x.
 ResourceDataSyncS3Destination
 -> Rep ResourceDataSyncS3Destination x)
-> (forall x.
    Rep ResourceDataSyncS3Destination x
    -> ResourceDataSyncS3Destination)
-> Generic ResourceDataSyncS3Destination
forall x.
Rep ResourceDataSyncS3Destination x
-> ResourceDataSyncS3Destination
forall x.
ResourceDataSyncS3Destination
-> Rep ResourceDataSyncS3Destination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResourceDataSyncS3Destination x
-> ResourceDataSyncS3Destination
$cfrom :: forall x.
ResourceDataSyncS3Destination
-> Rep ResourceDataSyncS3Destination x
Prelude.Generic)

-- |
-- Create a value of 'ResourceDataSyncS3Destination' 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:
--
-- 'prefix', 'resourceDataSyncS3Destination_prefix' - An Amazon S3 prefix for the bucket.
--
-- 'destinationDataSharing', 'resourceDataSyncS3Destination_destinationDataSharing' - Enables destination data sharing. By default, this field is @null@.
--
-- 'aWSKMSKeyARN', 'resourceDataSyncS3Destination_aWSKMSKeyARN' - The ARN of an encryption key for a destination in Amazon S3. Must belong
-- to the same Region as the destination S3 bucket.
--
-- 'bucketName', 'resourceDataSyncS3Destination_bucketName' - The name of the S3 bucket where the aggregated data is stored.
--
-- 'syncFormat', 'resourceDataSyncS3Destination_syncFormat' - A supported sync format. The following format is currently supported:
-- JsonSerDe
--
-- 'region', 'resourceDataSyncS3Destination_region' - The Amazon Web Services Region with the S3 bucket targeted by the
-- resource data sync.
newResourceDataSyncS3Destination ::
  -- | 'bucketName'
  Prelude.Text ->
  -- | 'syncFormat'
  ResourceDataSyncS3Format ->
  -- | 'region'
  Prelude.Text ->
  ResourceDataSyncS3Destination
newResourceDataSyncS3Destination :: Text
-> ResourceDataSyncS3Format
-> Text
-> ResourceDataSyncS3Destination
newResourceDataSyncS3Destination
  Text
pBucketName_
  ResourceDataSyncS3Format
pSyncFormat_
  Text
pRegion_ =
    ResourceDataSyncS3Destination' :: Maybe Text
-> Maybe ResourceDataSyncDestinationDataSharing
-> Maybe Text
-> Text
-> ResourceDataSyncS3Format
-> Text
-> ResourceDataSyncS3Destination
ResourceDataSyncS3Destination'
      { $sel:prefix:ResourceDataSyncS3Destination' :: Maybe Text
prefix =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:destinationDataSharing:ResourceDataSyncS3Destination' :: Maybe ResourceDataSyncDestinationDataSharing
destinationDataSharing = Maybe ResourceDataSyncDestinationDataSharing
forall a. Maybe a
Prelude.Nothing,
        $sel:aWSKMSKeyARN:ResourceDataSyncS3Destination' :: Maybe Text
aWSKMSKeyARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:bucketName:ResourceDataSyncS3Destination' :: Text
bucketName = Text
pBucketName_,
        $sel:syncFormat:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Format
syncFormat = ResourceDataSyncS3Format
pSyncFormat_,
        $sel:region:ResourceDataSyncS3Destination' :: Text
region = Text
pRegion_
      }

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

-- | Enables destination data sharing. By default, this field is @null@.
resourceDataSyncS3Destination_destinationDataSharing :: Lens.Lens' ResourceDataSyncS3Destination (Prelude.Maybe ResourceDataSyncDestinationDataSharing)
resourceDataSyncS3Destination_destinationDataSharing :: (Maybe ResourceDataSyncDestinationDataSharing
 -> f (Maybe ResourceDataSyncDestinationDataSharing))
-> ResourceDataSyncS3Destination -> f ResourceDataSyncS3Destination
resourceDataSyncS3Destination_destinationDataSharing = (ResourceDataSyncS3Destination
 -> Maybe ResourceDataSyncDestinationDataSharing)
-> (ResourceDataSyncS3Destination
    -> Maybe ResourceDataSyncDestinationDataSharing
    -> ResourceDataSyncS3Destination)
-> Lens
     ResourceDataSyncS3Destination
     ResourceDataSyncS3Destination
     (Maybe ResourceDataSyncDestinationDataSharing)
     (Maybe ResourceDataSyncDestinationDataSharing)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncS3Destination' {Maybe ResourceDataSyncDestinationDataSharing
destinationDataSharing :: Maybe ResourceDataSyncDestinationDataSharing
$sel:destinationDataSharing:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination
-> Maybe ResourceDataSyncDestinationDataSharing
destinationDataSharing} -> Maybe ResourceDataSyncDestinationDataSharing
destinationDataSharing) (\s :: ResourceDataSyncS3Destination
s@ResourceDataSyncS3Destination' {} Maybe ResourceDataSyncDestinationDataSharing
a -> ResourceDataSyncS3Destination
s {$sel:destinationDataSharing:ResourceDataSyncS3Destination' :: Maybe ResourceDataSyncDestinationDataSharing
destinationDataSharing = Maybe ResourceDataSyncDestinationDataSharing
a} :: ResourceDataSyncS3Destination)

-- | The ARN of an encryption key for a destination in Amazon S3. Must belong
-- to the same Region as the destination S3 bucket.
resourceDataSyncS3Destination_aWSKMSKeyARN :: Lens.Lens' ResourceDataSyncS3Destination (Prelude.Maybe Prelude.Text)
resourceDataSyncS3Destination_aWSKMSKeyARN :: (Maybe Text -> f (Maybe Text))
-> ResourceDataSyncS3Destination -> f ResourceDataSyncS3Destination
resourceDataSyncS3Destination_aWSKMSKeyARN = (ResourceDataSyncS3Destination -> Maybe Text)
-> (ResourceDataSyncS3Destination
    -> Maybe Text -> ResourceDataSyncS3Destination)
-> Lens
     ResourceDataSyncS3Destination
     ResourceDataSyncS3Destination
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncS3Destination' {Maybe Text
aWSKMSKeyARN :: Maybe Text
$sel:aWSKMSKeyARN:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination -> Maybe Text
aWSKMSKeyARN} -> Maybe Text
aWSKMSKeyARN) (\s :: ResourceDataSyncS3Destination
s@ResourceDataSyncS3Destination' {} Maybe Text
a -> ResourceDataSyncS3Destination
s {$sel:aWSKMSKeyARN:ResourceDataSyncS3Destination' :: Maybe Text
aWSKMSKeyARN = Maybe Text
a} :: ResourceDataSyncS3Destination)

-- | The name of the S3 bucket where the aggregated data is stored.
resourceDataSyncS3Destination_bucketName :: Lens.Lens' ResourceDataSyncS3Destination Prelude.Text
resourceDataSyncS3Destination_bucketName :: (Text -> f Text)
-> ResourceDataSyncS3Destination -> f ResourceDataSyncS3Destination
resourceDataSyncS3Destination_bucketName = (ResourceDataSyncS3Destination -> Text)
-> (ResourceDataSyncS3Destination
    -> Text -> ResourceDataSyncS3Destination)
-> Lens
     ResourceDataSyncS3Destination
     ResourceDataSyncS3Destination
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncS3Destination' {Text
bucketName :: Text
$sel:bucketName:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination -> Text
bucketName} -> Text
bucketName) (\s :: ResourceDataSyncS3Destination
s@ResourceDataSyncS3Destination' {} Text
a -> ResourceDataSyncS3Destination
s {$sel:bucketName:ResourceDataSyncS3Destination' :: Text
bucketName = Text
a} :: ResourceDataSyncS3Destination)

-- | A supported sync format. The following format is currently supported:
-- JsonSerDe
resourceDataSyncS3Destination_syncFormat :: Lens.Lens' ResourceDataSyncS3Destination ResourceDataSyncS3Format
resourceDataSyncS3Destination_syncFormat :: (ResourceDataSyncS3Format -> f ResourceDataSyncS3Format)
-> ResourceDataSyncS3Destination -> f ResourceDataSyncS3Destination
resourceDataSyncS3Destination_syncFormat = (ResourceDataSyncS3Destination -> ResourceDataSyncS3Format)
-> (ResourceDataSyncS3Destination
    -> ResourceDataSyncS3Format -> ResourceDataSyncS3Destination)
-> Lens
     ResourceDataSyncS3Destination
     ResourceDataSyncS3Destination
     ResourceDataSyncS3Format
     ResourceDataSyncS3Format
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncS3Destination' {ResourceDataSyncS3Format
syncFormat :: ResourceDataSyncS3Format
$sel:syncFormat:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination -> ResourceDataSyncS3Format
syncFormat} -> ResourceDataSyncS3Format
syncFormat) (\s :: ResourceDataSyncS3Destination
s@ResourceDataSyncS3Destination' {} ResourceDataSyncS3Format
a -> ResourceDataSyncS3Destination
s {$sel:syncFormat:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Format
syncFormat = ResourceDataSyncS3Format
a} :: ResourceDataSyncS3Destination)

-- | The Amazon Web Services Region with the S3 bucket targeted by the
-- resource data sync.
resourceDataSyncS3Destination_region :: Lens.Lens' ResourceDataSyncS3Destination Prelude.Text
resourceDataSyncS3Destination_region :: (Text -> f Text)
-> ResourceDataSyncS3Destination -> f ResourceDataSyncS3Destination
resourceDataSyncS3Destination_region = (ResourceDataSyncS3Destination -> Text)
-> (ResourceDataSyncS3Destination
    -> Text -> ResourceDataSyncS3Destination)
-> Lens
     ResourceDataSyncS3Destination
     ResourceDataSyncS3Destination
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncS3Destination' {Text
region :: Text
$sel:region:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination -> Text
region} -> Text
region) (\s :: ResourceDataSyncS3Destination
s@ResourceDataSyncS3Destination' {} Text
a -> ResourceDataSyncS3Destination
s {$sel:region:ResourceDataSyncS3Destination' :: Text
region = Text
a} :: ResourceDataSyncS3Destination)

instance Core.FromJSON ResourceDataSyncS3Destination where
  parseJSON :: Value -> Parser ResourceDataSyncS3Destination
parseJSON =
    String
-> (Object -> Parser ResourceDataSyncS3Destination)
-> Value
-> Parser ResourceDataSyncS3Destination
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ResourceDataSyncS3Destination"
      ( \Object
x ->
          Maybe Text
-> Maybe ResourceDataSyncDestinationDataSharing
-> Maybe Text
-> Text
-> ResourceDataSyncS3Format
-> Text
-> ResourceDataSyncS3Destination
ResourceDataSyncS3Destination'
            (Maybe Text
 -> Maybe ResourceDataSyncDestinationDataSharing
 -> Maybe Text
 -> Text
 -> ResourceDataSyncS3Format
 -> Text
 -> ResourceDataSyncS3Destination)
-> Parser (Maybe Text)
-> Parser
     (Maybe ResourceDataSyncDestinationDataSharing
      -> Maybe Text
      -> Text
      -> ResourceDataSyncS3Format
      -> Text
      -> ResourceDataSyncS3Destination)
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
"Prefix")
            Parser
  (Maybe ResourceDataSyncDestinationDataSharing
   -> Maybe Text
   -> Text
   -> ResourceDataSyncS3Format
   -> Text
   -> ResourceDataSyncS3Destination)
-> Parser (Maybe ResourceDataSyncDestinationDataSharing)
-> Parser
     (Maybe Text
      -> Text
      -> ResourceDataSyncS3Format
      -> Text
      -> ResourceDataSyncS3Destination)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe ResourceDataSyncDestinationDataSharing)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DestinationDataSharing")
            Parser
  (Maybe Text
   -> Text
   -> ResourceDataSyncS3Format
   -> Text
   -> ResourceDataSyncS3Destination)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> ResourceDataSyncS3Format
      -> Text
      -> ResourceDataSyncS3Destination)
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
"AWSKMSKeyARN")
            Parser
  (Text
   -> ResourceDataSyncS3Format
   -> Text
   -> ResourceDataSyncS3Destination)
-> Parser Text
-> Parser
     (ResourceDataSyncS3Format -> Text -> ResourceDataSyncS3Destination)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"BucketName")
            Parser
  (ResourceDataSyncS3Format -> Text -> ResourceDataSyncS3Destination)
-> Parser ResourceDataSyncS3Format
-> Parser (Text -> ResourceDataSyncS3Destination)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ResourceDataSyncS3Format
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SyncFormat")
            Parser (Text -> ResourceDataSyncS3Destination)
-> Parser Text -> Parser ResourceDataSyncS3Destination
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Region")
      )

instance
  Prelude.Hashable
    ResourceDataSyncS3Destination

instance Prelude.NFData ResourceDataSyncS3Destination

instance Core.ToJSON ResourceDataSyncS3Destination where
  toJSON :: ResourceDataSyncS3Destination -> Value
toJSON ResourceDataSyncS3Destination' {Maybe Text
Maybe ResourceDataSyncDestinationDataSharing
Text
ResourceDataSyncS3Format
region :: Text
syncFormat :: ResourceDataSyncS3Format
bucketName :: Text
aWSKMSKeyARN :: Maybe Text
destinationDataSharing :: Maybe ResourceDataSyncDestinationDataSharing
prefix :: Maybe Text
$sel:region:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination -> Text
$sel:syncFormat:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination -> ResourceDataSyncS3Format
$sel:bucketName:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination -> Text
$sel:aWSKMSKeyARN:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination -> Maybe Text
$sel:destinationDataSharing:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination
-> Maybe ResourceDataSyncDestinationDataSharing
$sel:prefix:ResourceDataSyncS3Destination' :: ResourceDataSyncS3Destination -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Prefix" 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
prefix,
            (Text
"DestinationDataSharing" Text -> ResourceDataSyncDestinationDataSharing -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ResourceDataSyncDestinationDataSharing -> Pair)
-> Maybe ResourceDataSyncDestinationDataSharing -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResourceDataSyncDestinationDataSharing
destinationDataSharing,
            (Text
"AWSKMSKeyARN" 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
aWSKMSKeyARN,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"BucketName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
bucketName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SyncFormat" Text -> ResourceDataSyncS3Format -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ResourceDataSyncS3Format
syncFormat),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Region" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
region)
          ]
      )