{-# 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.MGN.UpdateReplicationConfiguration
-- 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)
--
-- Allows you to update multiple ReplicationConfigurations by Source Server
-- ID.
module Amazonka.MGN.UpdateReplicationConfiguration
  ( -- * Creating a Request
    UpdateReplicationConfiguration (..),
    newUpdateReplicationConfiguration,

    -- * Request Lenses
    updateReplicationConfiguration_createPublicIP,
    updateReplicationConfiguration_stagingAreaTags,
    updateReplicationConfiguration_stagingAreaSubnetId,
    updateReplicationConfiguration_replicationServerInstanceType,
    updateReplicationConfiguration_ebsEncryption,
    updateReplicationConfiguration_associateDefaultSecurityGroup,
    updateReplicationConfiguration_replicationServersSecurityGroupsIDs,
    updateReplicationConfiguration_ebsEncryptionKeyArn,
    updateReplicationConfiguration_name,
    updateReplicationConfiguration_defaultLargeStagingDiskType,
    updateReplicationConfiguration_bandwidthThrottling,
    updateReplicationConfiguration_dataPlaneRouting,
    updateReplicationConfiguration_replicatedDisks,
    updateReplicationConfiguration_useDedicatedReplicationServer,
    updateReplicationConfiguration_sourceServerID,

    -- * Destructuring the Response
    ReplicationConfiguration (..),
    newReplicationConfiguration,

    -- * Response Lenses
    replicationConfiguration_createPublicIP,
    replicationConfiguration_stagingAreaTags,
    replicationConfiguration_stagingAreaSubnetId,
    replicationConfiguration_replicationServerInstanceType,
    replicationConfiguration_ebsEncryption,
    replicationConfiguration_associateDefaultSecurityGroup,
    replicationConfiguration_replicationServersSecurityGroupsIDs,
    replicationConfiguration_ebsEncryptionKeyArn,
    replicationConfiguration_name,
    replicationConfiguration_defaultLargeStagingDiskType,
    replicationConfiguration_bandwidthThrottling,
    replicationConfiguration_dataPlaneRouting,
    replicationConfiguration_sourceServerID,
    replicationConfiguration_replicatedDisks,
    replicationConfiguration_useDedicatedReplicationServer,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MGN.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateReplicationConfiguration' smart constructor.
data UpdateReplicationConfiguration = UpdateReplicationConfiguration'
  { -- | Update replication configuration create Public IP request.
    UpdateReplicationConfiguration -> Maybe Bool
createPublicIP :: Prelude.Maybe Prelude.Bool,
    -- | Update replication configuration Staging Area Tags request.
    UpdateReplicationConfiguration
-> Maybe (Sensitive (HashMap Text Text))
stagingAreaTags :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | Update replication configuration Staging Area subnet request.
    UpdateReplicationConfiguration -> Maybe Text
stagingAreaSubnetId :: Prelude.Maybe Prelude.Text,
    -- | Update replication configuration Replication Server instance type
    -- request.
    UpdateReplicationConfiguration -> Maybe Text
replicationServerInstanceType :: Prelude.Maybe Prelude.Text,
    -- | Update replication configuration EBS encryption request.
    UpdateReplicationConfiguration
-> Maybe ReplicationConfigurationEbsEncryption
ebsEncryption :: Prelude.Maybe ReplicationConfigurationEbsEncryption,
    -- | Update replication configuration associate default Application Migration
    -- Service Security group request.
    UpdateReplicationConfiguration -> Maybe Bool
associateDefaultSecurityGroup :: Prelude.Maybe Prelude.Bool,
    -- | Update replication configuration Replication Server Security Groups IDs
    -- request.
    UpdateReplicationConfiguration -> Maybe [Text]
replicationServersSecurityGroupsIDs :: Prelude.Maybe [Prelude.Text],
    -- | Update replication configuration EBS encryption key ARN request.
    UpdateReplicationConfiguration -> Maybe Text
ebsEncryptionKeyArn :: Prelude.Maybe Prelude.Text,
    -- | Update replication configuration name request.
    UpdateReplicationConfiguration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Update replication configuration use default large Staging Disk type
    -- request.
    UpdateReplicationConfiguration
-> Maybe ReplicationConfigurationDefaultLargeStagingDiskType
defaultLargeStagingDiskType :: Prelude.Maybe ReplicationConfigurationDefaultLargeStagingDiskType,
    -- | Update replication configuration bandwidth throttling request.
    UpdateReplicationConfiguration -> Maybe Natural
bandwidthThrottling :: Prelude.Maybe Prelude.Natural,
    -- | Update replication configuration data plane routing request.
    UpdateReplicationConfiguration
-> Maybe ReplicationConfigurationDataPlaneRouting
dataPlaneRouting :: Prelude.Maybe ReplicationConfigurationDataPlaneRouting,
    -- | Update replication configuration replicated disks request.
    UpdateReplicationConfiguration
-> Maybe [ReplicationConfigurationReplicatedDisk]
replicatedDisks :: Prelude.Maybe [ReplicationConfigurationReplicatedDisk],
    -- | Update replication configuration use dedicated Replication Server
    -- request.
    UpdateReplicationConfiguration -> Maybe Bool
useDedicatedReplicationServer :: Prelude.Maybe Prelude.Bool,
    -- | Update replication configuration Source Server ID request.
    UpdateReplicationConfiguration -> Text
sourceServerID :: Prelude.Text
  }
  deriving (UpdateReplicationConfiguration
-> UpdateReplicationConfiguration -> Bool
(UpdateReplicationConfiguration
 -> UpdateReplicationConfiguration -> Bool)
-> (UpdateReplicationConfiguration
    -> UpdateReplicationConfiguration -> Bool)
-> Eq UpdateReplicationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateReplicationConfiguration
-> UpdateReplicationConfiguration -> Bool
$c/= :: UpdateReplicationConfiguration
-> UpdateReplicationConfiguration -> Bool
== :: UpdateReplicationConfiguration
-> UpdateReplicationConfiguration -> Bool
$c== :: UpdateReplicationConfiguration
-> UpdateReplicationConfiguration -> Bool
Prelude.Eq, Int -> UpdateReplicationConfiguration -> ShowS
[UpdateReplicationConfiguration] -> ShowS
UpdateReplicationConfiguration -> String
(Int -> UpdateReplicationConfiguration -> ShowS)
-> (UpdateReplicationConfiguration -> String)
-> ([UpdateReplicationConfiguration] -> ShowS)
-> Show UpdateReplicationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateReplicationConfiguration] -> ShowS
$cshowList :: [UpdateReplicationConfiguration] -> ShowS
show :: UpdateReplicationConfiguration -> String
$cshow :: UpdateReplicationConfiguration -> String
showsPrec :: Int -> UpdateReplicationConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateReplicationConfiguration -> ShowS
Prelude.Show, (forall x.
 UpdateReplicationConfiguration
 -> Rep UpdateReplicationConfiguration x)
-> (forall x.
    Rep UpdateReplicationConfiguration x
    -> UpdateReplicationConfiguration)
-> Generic UpdateReplicationConfiguration
forall x.
Rep UpdateReplicationConfiguration x
-> UpdateReplicationConfiguration
forall x.
UpdateReplicationConfiguration
-> Rep UpdateReplicationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateReplicationConfiguration x
-> UpdateReplicationConfiguration
$cfrom :: forall x.
UpdateReplicationConfiguration
-> Rep UpdateReplicationConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateReplicationConfiguration' 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:
--
-- 'createPublicIP', 'updateReplicationConfiguration_createPublicIP' - Update replication configuration create Public IP request.
--
-- 'stagingAreaTags', 'updateReplicationConfiguration_stagingAreaTags' - Update replication configuration Staging Area Tags request.
--
-- 'stagingAreaSubnetId', 'updateReplicationConfiguration_stagingAreaSubnetId' - Update replication configuration Staging Area subnet request.
--
-- 'replicationServerInstanceType', 'updateReplicationConfiguration_replicationServerInstanceType' - Update replication configuration Replication Server instance type
-- request.
--
-- 'ebsEncryption', 'updateReplicationConfiguration_ebsEncryption' - Update replication configuration EBS encryption request.
--
-- 'associateDefaultSecurityGroup', 'updateReplicationConfiguration_associateDefaultSecurityGroup' - Update replication configuration associate default Application Migration
-- Service Security group request.
--
-- 'replicationServersSecurityGroupsIDs', 'updateReplicationConfiguration_replicationServersSecurityGroupsIDs' - Update replication configuration Replication Server Security Groups IDs
-- request.
--
-- 'ebsEncryptionKeyArn', 'updateReplicationConfiguration_ebsEncryptionKeyArn' - Update replication configuration EBS encryption key ARN request.
--
-- 'name', 'updateReplicationConfiguration_name' - Update replication configuration name request.
--
-- 'defaultLargeStagingDiskType', 'updateReplicationConfiguration_defaultLargeStagingDiskType' - Update replication configuration use default large Staging Disk type
-- request.
--
-- 'bandwidthThrottling', 'updateReplicationConfiguration_bandwidthThrottling' - Update replication configuration bandwidth throttling request.
--
-- 'dataPlaneRouting', 'updateReplicationConfiguration_dataPlaneRouting' - Update replication configuration data plane routing request.
--
-- 'replicatedDisks', 'updateReplicationConfiguration_replicatedDisks' - Update replication configuration replicated disks request.
--
-- 'useDedicatedReplicationServer', 'updateReplicationConfiguration_useDedicatedReplicationServer' - Update replication configuration use dedicated Replication Server
-- request.
--
-- 'sourceServerID', 'updateReplicationConfiguration_sourceServerID' - Update replication configuration Source Server ID request.
newUpdateReplicationConfiguration ::
  -- | 'sourceServerID'
  Prelude.Text ->
  UpdateReplicationConfiguration
newUpdateReplicationConfiguration :: Text -> UpdateReplicationConfiguration
newUpdateReplicationConfiguration Text
pSourceServerID_ =
  UpdateReplicationConfiguration' :: Maybe Bool
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Maybe Text
-> Maybe ReplicationConfigurationEbsEncryption
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ReplicationConfigurationDefaultLargeStagingDiskType
-> Maybe Natural
-> Maybe ReplicationConfigurationDataPlaneRouting
-> Maybe [ReplicationConfigurationReplicatedDisk]
-> Maybe Bool
-> Text
-> UpdateReplicationConfiguration
UpdateReplicationConfiguration'
    { $sel:createPublicIP:UpdateReplicationConfiguration' :: Maybe Bool
createPublicIP =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:stagingAreaTags:UpdateReplicationConfiguration' :: Maybe (Sensitive (HashMap Text Text))
stagingAreaTags = Maybe (Sensitive (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
      $sel:stagingAreaSubnetId:UpdateReplicationConfiguration' :: Maybe Text
stagingAreaSubnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationServerInstanceType:UpdateReplicationConfiguration' :: Maybe Text
replicationServerInstanceType =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ebsEncryption:UpdateReplicationConfiguration' :: Maybe ReplicationConfigurationEbsEncryption
ebsEncryption = Maybe ReplicationConfigurationEbsEncryption
forall a. Maybe a
Prelude.Nothing,
      $sel:associateDefaultSecurityGroup:UpdateReplicationConfiguration' :: Maybe Bool
associateDefaultSecurityGroup =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationServersSecurityGroupsIDs:UpdateReplicationConfiguration' :: Maybe [Text]
replicationServersSecurityGroupsIDs =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:ebsEncryptionKeyArn:UpdateReplicationConfiguration' :: Maybe Text
ebsEncryptionKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateReplicationConfiguration' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultLargeStagingDiskType:UpdateReplicationConfiguration' :: Maybe ReplicationConfigurationDefaultLargeStagingDiskType
defaultLargeStagingDiskType =
        Maybe ReplicationConfigurationDefaultLargeStagingDiskType
forall a. Maybe a
Prelude.Nothing,
      $sel:bandwidthThrottling:UpdateReplicationConfiguration' :: Maybe Natural
bandwidthThrottling = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:dataPlaneRouting:UpdateReplicationConfiguration' :: Maybe ReplicationConfigurationDataPlaneRouting
dataPlaneRouting = Maybe ReplicationConfigurationDataPlaneRouting
forall a. Maybe a
Prelude.Nothing,
      $sel:replicatedDisks:UpdateReplicationConfiguration' :: Maybe [ReplicationConfigurationReplicatedDisk]
replicatedDisks = Maybe [ReplicationConfigurationReplicatedDisk]
forall a. Maybe a
Prelude.Nothing,
      $sel:useDedicatedReplicationServer:UpdateReplicationConfiguration' :: Maybe Bool
useDedicatedReplicationServer =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceServerID:UpdateReplicationConfiguration' :: Text
sourceServerID = Text
pSourceServerID_
    }

-- | Update replication configuration create Public IP request.
updateReplicationConfiguration_createPublicIP :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe Prelude.Bool)
updateReplicationConfiguration_createPublicIP :: (Maybe Bool -> f (Maybe Bool))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_createPublicIP = (UpdateReplicationConfiguration -> Maybe Bool)
-> (UpdateReplicationConfiguration
    -> Maybe Bool -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe Bool
createPublicIP :: Maybe Bool
$sel:createPublicIP:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Bool
createPublicIP} -> Maybe Bool
createPublicIP) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe Bool
a -> UpdateReplicationConfiguration
s {$sel:createPublicIP:UpdateReplicationConfiguration' :: Maybe Bool
createPublicIP = Maybe Bool
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration Staging Area Tags request.
updateReplicationConfiguration_stagingAreaTags :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateReplicationConfiguration_stagingAreaTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_stagingAreaTags = (UpdateReplicationConfiguration
 -> Maybe (Sensitive (HashMap Text Text)))
-> (UpdateReplicationConfiguration
    -> Maybe (Sensitive (HashMap Text Text))
    -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe (Sensitive (HashMap Text Text)))
     (Maybe (Sensitive (HashMap Text Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe (Sensitive (HashMap Text Text))
stagingAreaTags :: Maybe (Sensitive (HashMap Text Text))
$sel:stagingAreaTags:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe (Sensitive (HashMap Text Text))
stagingAreaTags} -> Maybe (Sensitive (HashMap Text Text))
stagingAreaTags) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe (Sensitive (HashMap Text Text))
a -> UpdateReplicationConfiguration
s {$sel:stagingAreaTags:UpdateReplicationConfiguration' :: Maybe (Sensitive (HashMap Text Text))
stagingAreaTags = Maybe (Sensitive (HashMap Text Text))
a} :: UpdateReplicationConfiguration) ((Maybe (Sensitive (HashMap Text Text))
  -> f (Maybe (Sensitive (HashMap Text Text))))
 -> UpdateReplicationConfiguration
 -> f UpdateReplicationConfiguration)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (Sensitive (HashMap Text Text))
    -> f (Maybe (Sensitive (HashMap Text Text))))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive (HashMap Text Text))
  (Sensitive (HashMap Text Text))
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (Sensitive (HashMap Text Text)))
     (Maybe (Sensitive (HashMap Text Text)))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (Sensitive (HashMap Text Text))
  (Sensitive (HashMap Text Text))
  (HashMap Text Text)
  (HashMap Text Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso
  (Sensitive (HashMap Text Text))
  (Sensitive (HashMap Text Text))
  (HashMap Text Text)
  (HashMap Text Text)
-> (Exchange
      (HashMap Text Text)
      (HashMap Text Text)
      (HashMap Text Text)
      (Identity (HashMap Text Text))
    -> Exchange
         (HashMap Text Text)
         (HashMap Text Text)
         (HashMap Text Text)
         (Identity (HashMap Text Text)))
-> AnIso
     (Sensitive (HashMap Text Text))
     (Sensitive (HashMap Text Text))
     (HashMap Text Text)
     (HashMap Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (Identity (HashMap Text Text))
-> Exchange
     (HashMap Text Text)
     (HashMap Text Text)
     (HashMap Text Text)
     (Identity (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | Update replication configuration Staging Area subnet request.
updateReplicationConfiguration_stagingAreaSubnetId :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe Prelude.Text)
updateReplicationConfiguration_stagingAreaSubnetId :: (Maybe Text -> f (Maybe Text))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_stagingAreaSubnetId = (UpdateReplicationConfiguration -> Maybe Text)
-> (UpdateReplicationConfiguration
    -> Maybe Text -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe Text
stagingAreaSubnetId :: Maybe Text
$sel:stagingAreaSubnetId:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Text
stagingAreaSubnetId} -> Maybe Text
stagingAreaSubnetId) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe Text
a -> UpdateReplicationConfiguration
s {$sel:stagingAreaSubnetId:UpdateReplicationConfiguration' :: Maybe Text
stagingAreaSubnetId = Maybe Text
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration Replication Server instance type
-- request.
updateReplicationConfiguration_replicationServerInstanceType :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe Prelude.Text)
updateReplicationConfiguration_replicationServerInstanceType :: (Maybe Text -> f (Maybe Text))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_replicationServerInstanceType = (UpdateReplicationConfiguration -> Maybe Text)
-> (UpdateReplicationConfiguration
    -> Maybe Text -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe Text
replicationServerInstanceType :: Maybe Text
$sel:replicationServerInstanceType:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Text
replicationServerInstanceType} -> Maybe Text
replicationServerInstanceType) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe Text
a -> UpdateReplicationConfiguration
s {$sel:replicationServerInstanceType:UpdateReplicationConfiguration' :: Maybe Text
replicationServerInstanceType = Maybe Text
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration EBS encryption request.
updateReplicationConfiguration_ebsEncryption :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe ReplicationConfigurationEbsEncryption)
updateReplicationConfiguration_ebsEncryption :: (Maybe ReplicationConfigurationEbsEncryption
 -> f (Maybe ReplicationConfigurationEbsEncryption))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_ebsEncryption = (UpdateReplicationConfiguration
 -> Maybe ReplicationConfigurationEbsEncryption)
-> (UpdateReplicationConfiguration
    -> Maybe ReplicationConfigurationEbsEncryption
    -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe ReplicationConfigurationEbsEncryption)
     (Maybe ReplicationConfigurationEbsEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe ReplicationConfigurationEbsEncryption
ebsEncryption :: Maybe ReplicationConfigurationEbsEncryption
$sel:ebsEncryption:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe ReplicationConfigurationEbsEncryption
ebsEncryption} -> Maybe ReplicationConfigurationEbsEncryption
ebsEncryption) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe ReplicationConfigurationEbsEncryption
a -> UpdateReplicationConfiguration
s {$sel:ebsEncryption:UpdateReplicationConfiguration' :: Maybe ReplicationConfigurationEbsEncryption
ebsEncryption = Maybe ReplicationConfigurationEbsEncryption
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration associate default Application Migration
-- Service Security group request.
updateReplicationConfiguration_associateDefaultSecurityGroup :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe Prelude.Bool)
updateReplicationConfiguration_associateDefaultSecurityGroup :: (Maybe Bool -> f (Maybe Bool))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_associateDefaultSecurityGroup = (UpdateReplicationConfiguration -> Maybe Bool)
-> (UpdateReplicationConfiguration
    -> Maybe Bool -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe Bool
associateDefaultSecurityGroup :: Maybe Bool
$sel:associateDefaultSecurityGroup:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Bool
associateDefaultSecurityGroup} -> Maybe Bool
associateDefaultSecurityGroup) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe Bool
a -> UpdateReplicationConfiguration
s {$sel:associateDefaultSecurityGroup:UpdateReplicationConfiguration' :: Maybe Bool
associateDefaultSecurityGroup = Maybe Bool
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration Replication Server Security Groups IDs
-- request.
updateReplicationConfiguration_replicationServersSecurityGroupsIDs :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe [Prelude.Text])
updateReplicationConfiguration_replicationServersSecurityGroupsIDs :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_replicationServersSecurityGroupsIDs = (UpdateReplicationConfiguration -> Maybe [Text])
-> (UpdateReplicationConfiguration
    -> Maybe [Text] -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe [Text]
replicationServersSecurityGroupsIDs :: Maybe [Text]
$sel:replicationServersSecurityGroupsIDs:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe [Text]
replicationServersSecurityGroupsIDs} -> Maybe [Text]
replicationServersSecurityGroupsIDs) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe [Text]
a -> UpdateReplicationConfiguration
s {$sel:replicationServersSecurityGroupsIDs:UpdateReplicationConfiguration' :: Maybe [Text]
replicationServersSecurityGroupsIDs = Maybe [Text]
a} :: UpdateReplicationConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateReplicationConfiguration
 -> f UpdateReplicationConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Update replication configuration EBS encryption key ARN request.
updateReplicationConfiguration_ebsEncryptionKeyArn :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe Prelude.Text)
updateReplicationConfiguration_ebsEncryptionKeyArn :: (Maybe Text -> f (Maybe Text))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_ebsEncryptionKeyArn = (UpdateReplicationConfiguration -> Maybe Text)
-> (UpdateReplicationConfiguration
    -> Maybe Text -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe Text
ebsEncryptionKeyArn :: Maybe Text
$sel:ebsEncryptionKeyArn:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Text
ebsEncryptionKeyArn} -> Maybe Text
ebsEncryptionKeyArn) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe Text
a -> UpdateReplicationConfiguration
s {$sel:ebsEncryptionKeyArn:UpdateReplicationConfiguration' :: Maybe Text
ebsEncryptionKeyArn = Maybe Text
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration name request.
updateReplicationConfiguration_name :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe Prelude.Text)
updateReplicationConfiguration_name :: (Maybe Text -> f (Maybe Text))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_name = (UpdateReplicationConfiguration -> Maybe Text)
-> (UpdateReplicationConfiguration
    -> Maybe Text -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe Text
name :: Maybe Text
$sel:name:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe Text
a -> UpdateReplicationConfiguration
s {$sel:name:UpdateReplicationConfiguration' :: Maybe Text
name = Maybe Text
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration use default large Staging Disk type
-- request.
updateReplicationConfiguration_defaultLargeStagingDiskType :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe ReplicationConfigurationDefaultLargeStagingDiskType)
updateReplicationConfiguration_defaultLargeStagingDiskType :: (Maybe ReplicationConfigurationDefaultLargeStagingDiskType
 -> f (Maybe ReplicationConfigurationDefaultLargeStagingDiskType))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_defaultLargeStagingDiskType = (UpdateReplicationConfiguration
 -> Maybe ReplicationConfigurationDefaultLargeStagingDiskType)
-> (UpdateReplicationConfiguration
    -> Maybe ReplicationConfigurationDefaultLargeStagingDiskType
    -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe ReplicationConfigurationDefaultLargeStagingDiskType)
     (Maybe ReplicationConfigurationDefaultLargeStagingDiskType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe ReplicationConfigurationDefaultLargeStagingDiskType
defaultLargeStagingDiskType :: Maybe ReplicationConfigurationDefaultLargeStagingDiskType
$sel:defaultLargeStagingDiskType:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe ReplicationConfigurationDefaultLargeStagingDiskType
defaultLargeStagingDiskType} -> Maybe ReplicationConfigurationDefaultLargeStagingDiskType
defaultLargeStagingDiskType) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe ReplicationConfigurationDefaultLargeStagingDiskType
a -> UpdateReplicationConfiguration
s {$sel:defaultLargeStagingDiskType:UpdateReplicationConfiguration' :: Maybe ReplicationConfigurationDefaultLargeStagingDiskType
defaultLargeStagingDiskType = Maybe ReplicationConfigurationDefaultLargeStagingDiskType
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration bandwidth throttling request.
updateReplicationConfiguration_bandwidthThrottling :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe Prelude.Natural)
updateReplicationConfiguration_bandwidthThrottling :: (Maybe Natural -> f (Maybe Natural))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_bandwidthThrottling = (UpdateReplicationConfiguration -> Maybe Natural)
-> (UpdateReplicationConfiguration
    -> Maybe Natural -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe Natural
bandwidthThrottling :: Maybe Natural
$sel:bandwidthThrottling:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Natural
bandwidthThrottling} -> Maybe Natural
bandwidthThrottling) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe Natural
a -> UpdateReplicationConfiguration
s {$sel:bandwidthThrottling:UpdateReplicationConfiguration' :: Maybe Natural
bandwidthThrottling = Maybe Natural
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration data plane routing request.
updateReplicationConfiguration_dataPlaneRouting :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe ReplicationConfigurationDataPlaneRouting)
updateReplicationConfiguration_dataPlaneRouting :: (Maybe ReplicationConfigurationDataPlaneRouting
 -> f (Maybe ReplicationConfigurationDataPlaneRouting))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_dataPlaneRouting = (UpdateReplicationConfiguration
 -> Maybe ReplicationConfigurationDataPlaneRouting)
-> (UpdateReplicationConfiguration
    -> Maybe ReplicationConfigurationDataPlaneRouting
    -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe ReplicationConfigurationDataPlaneRouting)
     (Maybe ReplicationConfigurationDataPlaneRouting)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe ReplicationConfigurationDataPlaneRouting
dataPlaneRouting :: Maybe ReplicationConfigurationDataPlaneRouting
$sel:dataPlaneRouting:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe ReplicationConfigurationDataPlaneRouting
dataPlaneRouting} -> Maybe ReplicationConfigurationDataPlaneRouting
dataPlaneRouting) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe ReplicationConfigurationDataPlaneRouting
a -> UpdateReplicationConfiguration
s {$sel:dataPlaneRouting:UpdateReplicationConfiguration' :: Maybe ReplicationConfigurationDataPlaneRouting
dataPlaneRouting = Maybe ReplicationConfigurationDataPlaneRouting
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration replicated disks request.
updateReplicationConfiguration_replicatedDisks :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe [ReplicationConfigurationReplicatedDisk])
updateReplicationConfiguration_replicatedDisks :: (Maybe [ReplicationConfigurationReplicatedDisk]
 -> f (Maybe [ReplicationConfigurationReplicatedDisk]))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_replicatedDisks = (UpdateReplicationConfiguration
 -> Maybe [ReplicationConfigurationReplicatedDisk])
-> (UpdateReplicationConfiguration
    -> Maybe [ReplicationConfigurationReplicatedDisk]
    -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe [ReplicationConfigurationReplicatedDisk])
     (Maybe [ReplicationConfigurationReplicatedDisk])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe [ReplicationConfigurationReplicatedDisk]
replicatedDisks :: Maybe [ReplicationConfigurationReplicatedDisk]
$sel:replicatedDisks:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe [ReplicationConfigurationReplicatedDisk]
replicatedDisks} -> Maybe [ReplicationConfigurationReplicatedDisk]
replicatedDisks) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe [ReplicationConfigurationReplicatedDisk]
a -> UpdateReplicationConfiguration
s {$sel:replicatedDisks:UpdateReplicationConfiguration' :: Maybe [ReplicationConfigurationReplicatedDisk]
replicatedDisks = Maybe [ReplicationConfigurationReplicatedDisk]
a} :: UpdateReplicationConfiguration) ((Maybe [ReplicationConfigurationReplicatedDisk]
  -> f (Maybe [ReplicationConfigurationReplicatedDisk]))
 -> UpdateReplicationConfiguration
 -> f UpdateReplicationConfiguration)
-> ((Maybe [ReplicationConfigurationReplicatedDisk]
     -> f (Maybe [ReplicationConfigurationReplicatedDisk]))
    -> Maybe [ReplicationConfigurationReplicatedDisk]
    -> f (Maybe [ReplicationConfigurationReplicatedDisk]))
-> (Maybe [ReplicationConfigurationReplicatedDisk]
    -> f (Maybe [ReplicationConfigurationReplicatedDisk]))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReplicationConfigurationReplicatedDisk]
  [ReplicationConfigurationReplicatedDisk]
  [ReplicationConfigurationReplicatedDisk]
  [ReplicationConfigurationReplicatedDisk]
-> Iso
     (Maybe [ReplicationConfigurationReplicatedDisk])
     (Maybe [ReplicationConfigurationReplicatedDisk])
     (Maybe [ReplicationConfigurationReplicatedDisk])
     (Maybe [ReplicationConfigurationReplicatedDisk])
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
  [ReplicationConfigurationReplicatedDisk]
  [ReplicationConfigurationReplicatedDisk]
  [ReplicationConfigurationReplicatedDisk]
  [ReplicationConfigurationReplicatedDisk]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Update replication configuration use dedicated Replication Server
-- request.
updateReplicationConfiguration_useDedicatedReplicationServer :: Lens.Lens' UpdateReplicationConfiguration (Prelude.Maybe Prelude.Bool)
updateReplicationConfiguration_useDedicatedReplicationServer :: (Maybe Bool -> f (Maybe Bool))
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_useDedicatedReplicationServer = (UpdateReplicationConfiguration -> Maybe Bool)
-> (UpdateReplicationConfiguration
    -> Maybe Bool -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Maybe Bool
useDedicatedReplicationServer :: Maybe Bool
$sel:useDedicatedReplicationServer:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Bool
useDedicatedReplicationServer} -> Maybe Bool
useDedicatedReplicationServer) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Maybe Bool
a -> UpdateReplicationConfiguration
s {$sel:useDedicatedReplicationServer:UpdateReplicationConfiguration' :: Maybe Bool
useDedicatedReplicationServer = Maybe Bool
a} :: UpdateReplicationConfiguration)

-- | Update replication configuration Source Server ID request.
updateReplicationConfiguration_sourceServerID :: Lens.Lens' UpdateReplicationConfiguration Prelude.Text
updateReplicationConfiguration_sourceServerID :: (Text -> f Text)
-> UpdateReplicationConfiguration
-> f UpdateReplicationConfiguration
updateReplicationConfiguration_sourceServerID = (UpdateReplicationConfiguration -> Text)
-> (UpdateReplicationConfiguration
    -> Text -> UpdateReplicationConfiguration)
-> Lens
     UpdateReplicationConfiguration
     UpdateReplicationConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReplicationConfiguration' {Text
sourceServerID :: Text
$sel:sourceServerID:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Text
sourceServerID} -> Text
sourceServerID) (\s :: UpdateReplicationConfiguration
s@UpdateReplicationConfiguration' {} Text
a -> UpdateReplicationConfiguration
s {$sel:sourceServerID:UpdateReplicationConfiguration' :: Text
sourceServerID = Text
a} :: UpdateReplicationConfiguration)

instance
  Core.AWSRequest
    UpdateReplicationConfiguration
  where
  type
    AWSResponse UpdateReplicationConfiguration =
      ReplicationConfiguration
  request :: UpdateReplicationConfiguration
-> Request UpdateReplicationConfiguration
request = Service
-> UpdateReplicationConfiguration
-> Request UpdateReplicationConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateReplicationConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateReplicationConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateReplicationConfiguration))
-> Logger
-> Service
-> Proxy UpdateReplicationConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateReplicationConfiguration)))
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 -> Object -> Either String ReplicationConfiguration
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)

instance
  Prelude.Hashable
    UpdateReplicationConfiguration

instance
  Prelude.NFData
    UpdateReplicationConfiguration

instance
  Core.ToHeaders
    UpdateReplicationConfiguration
  where
  toHeaders :: UpdateReplicationConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> UpdateReplicationConfiguration -> 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.ToJSON UpdateReplicationConfiguration where
  toJSON :: UpdateReplicationConfiguration -> Value
toJSON UpdateReplicationConfiguration' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [ReplicationConfigurationReplicatedDisk]
Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe ReplicationConfigurationDataPlaneRouting
Maybe ReplicationConfigurationDefaultLargeStagingDiskType
Maybe ReplicationConfigurationEbsEncryption
Text
sourceServerID :: Text
useDedicatedReplicationServer :: Maybe Bool
replicatedDisks :: Maybe [ReplicationConfigurationReplicatedDisk]
dataPlaneRouting :: Maybe ReplicationConfigurationDataPlaneRouting
bandwidthThrottling :: Maybe Natural
defaultLargeStagingDiskType :: Maybe ReplicationConfigurationDefaultLargeStagingDiskType
name :: Maybe Text
ebsEncryptionKeyArn :: Maybe Text
replicationServersSecurityGroupsIDs :: Maybe [Text]
associateDefaultSecurityGroup :: Maybe Bool
ebsEncryption :: Maybe ReplicationConfigurationEbsEncryption
replicationServerInstanceType :: Maybe Text
stagingAreaSubnetId :: Maybe Text
stagingAreaTags :: Maybe (Sensitive (HashMap Text Text))
createPublicIP :: Maybe Bool
$sel:sourceServerID:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Text
$sel:useDedicatedReplicationServer:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Bool
$sel:replicatedDisks:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe [ReplicationConfigurationReplicatedDisk]
$sel:dataPlaneRouting:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe ReplicationConfigurationDataPlaneRouting
$sel:bandwidthThrottling:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Natural
$sel:defaultLargeStagingDiskType:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe ReplicationConfigurationDefaultLargeStagingDiskType
$sel:name:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Text
$sel:ebsEncryptionKeyArn:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Text
$sel:replicationServersSecurityGroupsIDs:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe [Text]
$sel:associateDefaultSecurityGroup:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Bool
$sel:ebsEncryption:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe ReplicationConfigurationEbsEncryption
$sel:replicationServerInstanceType:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Text
$sel:stagingAreaSubnetId:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Text
$sel:stagingAreaTags:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration
-> Maybe (Sensitive (HashMap Text Text))
$sel:createPublicIP:UpdateReplicationConfiguration' :: UpdateReplicationConfiguration -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"createPublicIP" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
createPublicIP,
            (Text
"stagingAreaTags" Text -> Sensitive (HashMap Text Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Sensitive (HashMap Text Text) -> Pair)
-> Maybe (Sensitive (HashMap Text Text)) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text Text))
stagingAreaTags,
            (Text
"stagingAreaSubnetId" 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
stagingAreaSubnetId,
            (Text
"replicationServerInstanceType" 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
replicationServerInstanceType,
            (Text
"ebsEncryption" Text -> ReplicationConfigurationEbsEncryption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ReplicationConfigurationEbsEncryption -> Pair)
-> Maybe ReplicationConfigurationEbsEncryption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReplicationConfigurationEbsEncryption
ebsEncryption,
            (Text
"associateDefaultSecurityGroup" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
associateDefaultSecurityGroup,
            (Text
"replicationServersSecurityGroupsIDs" 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]
replicationServersSecurityGroupsIDs,
            (Text
"ebsEncryptionKeyArn" 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
ebsEncryptionKeyArn,
            (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
"defaultLargeStagingDiskType" Text -> ReplicationConfigurationDefaultLargeStagingDiskType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ReplicationConfigurationDefaultLargeStagingDiskType -> Pair)
-> Maybe ReplicationConfigurationDefaultLargeStagingDiskType
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReplicationConfigurationDefaultLargeStagingDiskType
defaultLargeStagingDiskType,
            (Text
"bandwidthThrottling" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
bandwidthThrottling,
            (Text
"dataPlaneRouting" Text -> ReplicationConfigurationDataPlaneRouting -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ReplicationConfigurationDataPlaneRouting -> Pair)
-> Maybe ReplicationConfigurationDataPlaneRouting -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReplicationConfigurationDataPlaneRouting
dataPlaneRouting,
            (Text
"replicatedDisks" Text -> [ReplicationConfigurationReplicatedDisk] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ReplicationConfigurationReplicatedDisk] -> Pair)
-> Maybe [ReplicationConfigurationReplicatedDisk] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ReplicationConfigurationReplicatedDisk]
replicatedDisks,
            (Text
"useDedicatedReplicationServer" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useDedicatedReplicationServer,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"sourceServerID" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceServerID)
          ]
      )

instance Core.ToPath UpdateReplicationConfiguration where
  toPath :: UpdateReplicationConfiguration -> ByteString
toPath =
    ByteString -> UpdateReplicationConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/UpdateReplicationConfiguration"

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