{-# 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.S3.Types.Destination
-- 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.S3.Types.Destination where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
import Amazonka.S3.Types.AccessControlTranslation
import Amazonka.S3.Types.EncryptionConfiguration
import Amazonka.S3.Types.Metrics
import Amazonka.S3.Types.ReplicationTime
import Amazonka.S3.Types.StorageClass

-- | Specifies information about where to publish analysis or configuration
-- results for an Amazon S3 bucket and S3 Replication Time Control (S3
-- RTC).
--
-- /See:/ 'newDestination' smart constructor.
data Destination = Destination'
  { -- | A container specifying replication metrics-related settings enabling
    -- replication metrics and events.
    Destination -> Maybe Metrics
metrics :: Prelude.Maybe Metrics,
    -- | Specify this only in a cross-account scenario (where source and
    -- destination bucket owners are not the same), and you want to change
    -- replica ownership to the Amazon Web Services account that owns the
    -- destination bucket. If this is not specified in the replication
    -- configuration, the replicas are owned by same Amazon Web Services
    -- account that owns the source object.
    Destination -> Maybe AccessControlTranslation
accessControlTranslation :: Prelude.Maybe AccessControlTranslation,
    -- | Destination bucket owner account ID. In a cross-account scenario, if you
    -- direct Amazon S3 to change replica ownership to the Amazon Web Services
    -- account that owns the destination bucket by specifying the
    -- @AccessControlTranslation@ property, this is the account ID of the
    -- destination bucket owner. For more information, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html Replication Additional Configuration: Changing the Replica Owner>
    -- in the /Amazon S3 User Guide/.
    Destination -> Maybe Text
account :: Prelude.Maybe Prelude.Text,
    -- | The storage class to use when replicating objects, such as S3 Standard
    -- or reduced redundancy. By default, Amazon S3 uses the storage class of
    -- the source object to create the object replica.
    --
    -- For valid values, see the @StorageClass@ element of the
    -- <https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html PUT Bucket replication>
    -- action in the /Amazon S3 API Reference/.
    Destination -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | A container that provides information about encryption. If
    -- @SourceSelectionCriteria@ is specified, you must specify this element.
    Destination -> Maybe EncryptionConfiguration
encryptionConfiguration :: Prelude.Maybe EncryptionConfiguration,
    -- | A container specifying S3 Replication Time Control (S3 RTC), including
    -- whether S3 RTC is enabled and the time when all objects and operations
    -- on objects must be replicated. Must be specified together with a
    -- @Metrics@ block.
    Destination -> Maybe ReplicationTime
replicationTime :: Prelude.Maybe ReplicationTime,
    -- | The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
    -- store the results.
    Destination -> BucketName
bucket :: BucketName
  }
  deriving (Destination -> Destination -> Bool
(Destination -> Destination -> Bool)
-> (Destination -> Destination -> Bool) -> Eq Destination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Destination -> Destination -> Bool
$c/= :: Destination -> Destination -> Bool
== :: Destination -> Destination -> Bool
$c== :: Destination -> Destination -> Bool
Prelude.Eq, ReadPrec [Destination]
ReadPrec Destination
Int -> ReadS Destination
ReadS [Destination]
(Int -> ReadS Destination)
-> ReadS [Destination]
-> ReadPrec Destination
-> ReadPrec [Destination]
-> Read Destination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Destination]
$creadListPrec :: ReadPrec [Destination]
readPrec :: ReadPrec Destination
$creadPrec :: ReadPrec Destination
readList :: ReadS [Destination]
$creadList :: ReadS [Destination]
readsPrec :: Int -> ReadS Destination
$creadsPrec :: Int -> ReadS Destination
Prelude.Read, Int -> Destination -> ShowS
[Destination] -> ShowS
Destination -> String
(Int -> Destination -> ShowS)
-> (Destination -> String)
-> ([Destination] -> ShowS)
-> Show Destination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Destination] -> ShowS
$cshowList :: [Destination] -> ShowS
show :: Destination -> String
$cshow :: Destination -> String
showsPrec :: Int -> Destination -> ShowS
$cshowsPrec :: Int -> Destination -> ShowS
Prelude.Show, (forall x. Destination -> Rep Destination x)
-> (forall x. Rep Destination x -> Destination)
-> Generic Destination
forall x. Rep Destination x -> Destination
forall x. Destination -> Rep Destination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Destination x -> Destination
$cfrom :: forall x. Destination -> Rep Destination x
Prelude.Generic)

-- |
-- Create a value of 'Destination' 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:
--
-- 'metrics', 'destination_metrics' - A container specifying replication metrics-related settings enabling
-- replication metrics and events.
--
-- 'accessControlTranslation', 'destination_accessControlTranslation' - Specify this only in a cross-account scenario (where source and
-- destination bucket owners are not the same), and you want to change
-- replica ownership to the Amazon Web Services account that owns the
-- destination bucket. If this is not specified in the replication
-- configuration, the replicas are owned by same Amazon Web Services
-- account that owns the source object.
--
-- 'account', 'destination_account' - Destination bucket owner account ID. In a cross-account scenario, if you
-- direct Amazon S3 to change replica ownership to the Amazon Web Services
-- account that owns the destination bucket by specifying the
-- @AccessControlTranslation@ property, this is the account ID of the
-- destination bucket owner. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html Replication Additional Configuration: Changing the Replica Owner>
-- in the /Amazon S3 User Guide/.
--
-- 'storageClass', 'destination_storageClass' - The storage class to use when replicating objects, such as S3 Standard
-- or reduced redundancy. By default, Amazon S3 uses the storage class of
-- the source object to create the object replica.
--
-- For valid values, see the @StorageClass@ element of the
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html PUT Bucket replication>
-- action in the /Amazon S3 API Reference/.
--
-- 'encryptionConfiguration', 'destination_encryptionConfiguration' - A container that provides information about encryption. If
-- @SourceSelectionCriteria@ is specified, you must specify this element.
--
-- 'replicationTime', 'destination_replicationTime' - A container specifying S3 Replication Time Control (S3 RTC), including
-- whether S3 RTC is enabled and the time when all objects and operations
-- on objects must be replicated. Must be specified together with a
-- @Metrics@ block.
--
-- 'bucket', 'destination_bucket' - The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
-- store the results.
newDestination ::
  -- | 'bucket'
  BucketName ->
  Destination
newDestination :: BucketName -> Destination
newDestination BucketName
pBucket_ =
  Destination' :: Maybe Metrics
-> Maybe AccessControlTranslation
-> Maybe Text
-> Maybe StorageClass
-> Maybe EncryptionConfiguration
-> Maybe ReplicationTime
-> BucketName
-> Destination
Destination'
    { $sel:metrics:Destination' :: Maybe Metrics
metrics = Maybe Metrics
forall a. Maybe a
Prelude.Nothing,
      $sel:accessControlTranslation:Destination' :: Maybe AccessControlTranslation
accessControlTranslation = Maybe AccessControlTranslation
forall a. Maybe a
Prelude.Nothing,
      $sel:account:Destination' :: Maybe Text
account = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:Destination' :: Maybe StorageClass
storageClass = Maybe StorageClass
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionConfiguration:Destination' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationTime:Destination' :: Maybe ReplicationTime
replicationTime = Maybe ReplicationTime
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:Destination' :: BucketName
bucket = BucketName
pBucket_
    }

-- | A container specifying replication metrics-related settings enabling
-- replication metrics and events.
destination_metrics :: Lens.Lens' Destination (Prelude.Maybe Metrics)
destination_metrics :: (Maybe Metrics -> f (Maybe Metrics))
-> Destination -> f Destination
destination_metrics = (Destination -> Maybe Metrics)
-> (Destination -> Maybe Metrics -> Destination)
-> Lens Destination Destination (Maybe Metrics) (Maybe Metrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe Metrics
metrics :: Maybe Metrics
$sel:metrics:Destination' :: Destination -> Maybe Metrics
metrics} -> Maybe Metrics
metrics) (\s :: Destination
s@Destination' {} Maybe Metrics
a -> Destination
s {$sel:metrics:Destination' :: Maybe Metrics
metrics = Maybe Metrics
a} :: Destination)

-- | Specify this only in a cross-account scenario (where source and
-- destination bucket owners are not the same), and you want to change
-- replica ownership to the Amazon Web Services account that owns the
-- destination bucket. If this is not specified in the replication
-- configuration, the replicas are owned by same Amazon Web Services
-- account that owns the source object.
destination_accessControlTranslation :: Lens.Lens' Destination (Prelude.Maybe AccessControlTranslation)
destination_accessControlTranslation :: (Maybe AccessControlTranslation
 -> f (Maybe AccessControlTranslation))
-> Destination -> f Destination
destination_accessControlTranslation = (Destination -> Maybe AccessControlTranslation)
-> (Destination -> Maybe AccessControlTranslation -> Destination)
-> Lens
     Destination
     Destination
     (Maybe AccessControlTranslation)
     (Maybe AccessControlTranslation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe AccessControlTranslation
accessControlTranslation :: Maybe AccessControlTranslation
$sel:accessControlTranslation:Destination' :: Destination -> Maybe AccessControlTranslation
accessControlTranslation} -> Maybe AccessControlTranslation
accessControlTranslation) (\s :: Destination
s@Destination' {} Maybe AccessControlTranslation
a -> Destination
s {$sel:accessControlTranslation:Destination' :: Maybe AccessControlTranslation
accessControlTranslation = Maybe AccessControlTranslation
a} :: Destination)

-- | Destination bucket owner account ID. In a cross-account scenario, if you
-- direct Amazon S3 to change replica ownership to the Amazon Web Services
-- account that owns the destination bucket by specifying the
-- @AccessControlTranslation@ property, this is the account ID of the
-- destination bucket owner. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html Replication Additional Configuration: Changing the Replica Owner>
-- in the /Amazon S3 User Guide/.
destination_account :: Lens.Lens' Destination (Prelude.Maybe Prelude.Text)
destination_account :: (Maybe Text -> f (Maybe Text)) -> Destination -> f Destination
destination_account = (Destination -> Maybe Text)
-> (Destination -> Maybe Text -> Destination)
-> Lens Destination Destination (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe Text
account :: Maybe Text
$sel:account:Destination' :: Destination -> Maybe Text
account} -> Maybe Text
account) (\s :: Destination
s@Destination' {} Maybe Text
a -> Destination
s {$sel:account:Destination' :: Maybe Text
account = Maybe Text
a} :: Destination)

-- | The storage class to use when replicating objects, such as S3 Standard
-- or reduced redundancy. By default, Amazon S3 uses the storage class of
-- the source object to create the object replica.
--
-- For valid values, see the @StorageClass@ element of the
-- <https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html PUT Bucket replication>
-- action in the /Amazon S3 API Reference/.
destination_storageClass :: Lens.Lens' Destination (Prelude.Maybe StorageClass)
destination_storageClass :: (Maybe StorageClass -> f (Maybe StorageClass))
-> Destination -> f Destination
destination_storageClass = (Destination -> Maybe StorageClass)
-> (Destination -> Maybe StorageClass -> Destination)
-> Lens
     Destination Destination (Maybe StorageClass) (Maybe StorageClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe StorageClass
storageClass :: Maybe StorageClass
$sel:storageClass:Destination' :: Destination -> Maybe StorageClass
storageClass} -> Maybe StorageClass
storageClass) (\s :: Destination
s@Destination' {} Maybe StorageClass
a -> Destination
s {$sel:storageClass:Destination' :: Maybe StorageClass
storageClass = Maybe StorageClass
a} :: Destination)

-- | A container that provides information about encryption. If
-- @SourceSelectionCriteria@ is specified, you must specify this element.
destination_encryptionConfiguration :: Lens.Lens' Destination (Prelude.Maybe EncryptionConfiguration)
destination_encryptionConfiguration :: (Maybe EncryptionConfiguration
 -> f (Maybe EncryptionConfiguration))
-> Destination -> f Destination
destination_encryptionConfiguration = (Destination -> Maybe EncryptionConfiguration)
-> (Destination -> Maybe EncryptionConfiguration -> Destination)
-> Lens
     Destination
     Destination
     (Maybe EncryptionConfiguration)
     (Maybe EncryptionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe EncryptionConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
$sel:encryptionConfiguration:Destination' :: Destination -> Maybe EncryptionConfiguration
encryptionConfiguration} -> Maybe EncryptionConfiguration
encryptionConfiguration) (\s :: Destination
s@Destination' {} Maybe EncryptionConfiguration
a -> Destination
s {$sel:encryptionConfiguration:Destination' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
a} :: Destination)

-- | A container specifying S3 Replication Time Control (S3 RTC), including
-- whether S3 RTC is enabled and the time when all objects and operations
-- on objects must be replicated. Must be specified together with a
-- @Metrics@ block.
destination_replicationTime :: Lens.Lens' Destination (Prelude.Maybe ReplicationTime)
destination_replicationTime :: (Maybe ReplicationTime -> f (Maybe ReplicationTime))
-> Destination -> f Destination
destination_replicationTime = (Destination -> Maybe ReplicationTime)
-> (Destination -> Maybe ReplicationTime -> Destination)
-> Lens
     Destination
     Destination
     (Maybe ReplicationTime)
     (Maybe ReplicationTime)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe ReplicationTime
replicationTime :: Maybe ReplicationTime
$sel:replicationTime:Destination' :: Destination -> Maybe ReplicationTime
replicationTime} -> Maybe ReplicationTime
replicationTime) (\s :: Destination
s@Destination' {} Maybe ReplicationTime
a -> Destination
s {$sel:replicationTime:Destination' :: Maybe ReplicationTime
replicationTime = Maybe ReplicationTime
a} :: Destination)

-- | The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
-- store the results.
destination_bucket :: Lens.Lens' Destination BucketName
destination_bucket :: (BucketName -> f BucketName) -> Destination -> f Destination
destination_bucket = (Destination -> BucketName)
-> (Destination -> BucketName -> Destination)
-> Lens Destination Destination BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {BucketName
bucket :: BucketName
$sel:bucket:Destination' :: Destination -> BucketName
bucket} -> BucketName
bucket) (\s :: Destination
s@Destination' {} BucketName
a -> Destination
s {$sel:bucket:Destination' :: BucketName
bucket = BucketName
a} :: Destination)

instance Core.FromXML Destination where
  parseXML :: [Node] -> Either String Destination
parseXML [Node]
x =
    Maybe Metrics
-> Maybe AccessControlTranslation
-> Maybe Text
-> Maybe StorageClass
-> Maybe EncryptionConfiguration
-> Maybe ReplicationTime
-> BucketName
-> Destination
Destination'
      (Maybe Metrics
 -> Maybe AccessControlTranslation
 -> Maybe Text
 -> Maybe StorageClass
 -> Maybe EncryptionConfiguration
 -> Maybe ReplicationTime
 -> BucketName
 -> Destination)
-> Either String (Maybe Metrics)
-> Either
     String
     (Maybe AccessControlTranslation
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe EncryptionConfiguration
      -> Maybe ReplicationTime
      -> BucketName
      -> Destination)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Metrics)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Metrics")
      Either
  String
  (Maybe AccessControlTranslation
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe EncryptionConfiguration
   -> Maybe ReplicationTime
   -> BucketName
   -> Destination)
-> Either String (Maybe AccessControlTranslation)
-> Either
     String
     (Maybe Text
      -> Maybe StorageClass
      -> Maybe EncryptionConfiguration
      -> Maybe ReplicationTime
      -> BucketName
      -> Destination)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe AccessControlTranslation)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AccessControlTranslation")
      Either
  String
  (Maybe Text
   -> Maybe StorageClass
   -> Maybe EncryptionConfiguration
   -> Maybe ReplicationTime
   -> BucketName
   -> Destination)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe StorageClass
      -> Maybe EncryptionConfiguration
      -> Maybe ReplicationTime
      -> BucketName
      -> Destination)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Account")
      Either
  String
  (Maybe StorageClass
   -> Maybe EncryptionConfiguration
   -> Maybe ReplicationTime
   -> BucketName
   -> Destination)
-> Either String (Maybe StorageClass)
-> Either
     String
     (Maybe EncryptionConfiguration
      -> Maybe ReplicationTime -> BucketName -> Destination)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe StorageClass)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StorageClass")
      Either
  String
  (Maybe EncryptionConfiguration
   -> Maybe ReplicationTime -> BucketName -> Destination)
-> Either String (Maybe EncryptionConfiguration)
-> Either
     String (Maybe ReplicationTime -> BucketName -> Destination)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe EncryptionConfiguration)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EncryptionConfiguration")
      Either String (Maybe ReplicationTime -> BucketName -> Destination)
-> Either String (Maybe ReplicationTime)
-> Either String (BucketName -> Destination)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ReplicationTime)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReplicationTime")
      Either String (BucketName -> Destination)
-> Either String BucketName -> Either String Destination
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String BucketName
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Bucket")

instance Prelude.Hashable Destination

instance Prelude.NFData Destination

instance Core.ToXML Destination where
  toXML :: Destination -> XML
toXML Destination' {Maybe Text
Maybe EncryptionConfiguration
Maybe AccessControlTranslation
Maybe ReplicationTime
Maybe Metrics
Maybe StorageClass
BucketName
bucket :: BucketName
replicationTime :: Maybe ReplicationTime
encryptionConfiguration :: Maybe EncryptionConfiguration
storageClass :: Maybe StorageClass
account :: Maybe Text
accessControlTranslation :: Maybe AccessControlTranslation
metrics :: Maybe Metrics
$sel:bucket:Destination' :: Destination -> BucketName
$sel:replicationTime:Destination' :: Destination -> Maybe ReplicationTime
$sel:encryptionConfiguration:Destination' :: Destination -> Maybe EncryptionConfiguration
$sel:storageClass:Destination' :: Destination -> Maybe StorageClass
$sel:account:Destination' :: Destination -> Maybe Text
$sel:accessControlTranslation:Destination' :: Destination -> Maybe AccessControlTranslation
$sel:metrics:Destination' :: Destination -> Maybe Metrics
..} =
    [XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ Name
"Metrics" Name -> Maybe Metrics -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Metrics
metrics,
        Name
"AccessControlTranslation"
          Name -> Maybe AccessControlTranslation -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe AccessControlTranslation
accessControlTranslation,
        Name
"Account" Name -> Maybe Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Text
account,
        Name
"StorageClass" Name -> Maybe StorageClass -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe StorageClass
storageClass,
        Name
"EncryptionConfiguration"
          Name -> Maybe EncryptionConfiguration -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe EncryptionConfiguration
encryptionConfiguration,
        Name
"ReplicationTime" Name -> Maybe ReplicationTime -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe ReplicationTime
replicationTime,
        Name
"Bucket" Name -> BucketName -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= BucketName
bucket
      ]