{-# 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.DMS.ModifyReplicationInstance
-- 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)
--
-- Modifies the replication instance to apply new settings. You can change
-- one or more parameters by specifying these parameters and the new values
-- in the request.
--
-- Some settings are applied during the maintenance window.
module Amazonka.DMS.ModifyReplicationInstance
  ( -- * Creating a Request
    ModifyReplicationInstance (..),
    newModifyReplicationInstance,

    -- * Request Lenses
    modifyReplicationInstance_engineVersion,
    modifyReplicationInstance_autoMinorVersionUpgrade,
    modifyReplicationInstance_allowMajorVersionUpgrade,
    modifyReplicationInstance_preferredMaintenanceWindow,
    modifyReplicationInstance_vpcSecurityGroupIds,
    modifyReplicationInstance_multiAZ,
    modifyReplicationInstance_allocatedStorage,
    modifyReplicationInstance_applyImmediately,
    modifyReplicationInstance_replicationInstanceClass,
    modifyReplicationInstance_replicationInstanceIdentifier,
    modifyReplicationInstance_replicationInstanceArn,

    -- * Destructuring the Response
    ModifyReplicationInstanceResponse (..),
    newModifyReplicationInstanceResponse,

    -- * Response Lenses
    modifyReplicationInstanceResponse_replicationInstance,
    modifyReplicationInstanceResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newModifyReplicationInstance' smart constructor.
data ModifyReplicationInstance = ModifyReplicationInstance'
  { -- | The engine version number of the replication instance.
    --
    -- When modifying a major engine version of an instance, also set
    -- @AllowMajorVersionUpgrade@ to @true@.
    ModifyReplicationInstance -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates that minor version upgrades are applied
    -- automatically to the replication instance during the maintenance window.
    -- Changing this parameter doesn\'t result in an outage, except in the case
    -- described following. The change is asynchronously applied as soon as
    -- possible.
    --
    -- An outage does result if these factors apply:
    --
    -- -   This parameter is set to @true@ during the maintenance window.
    --
    -- -   A newer minor version is available.
    --
    -- -   DMS has enabled automatic patching for the given engine version.
    ModifyReplicationInstance -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | Indicates that major version upgrades are allowed. Changing this
    -- parameter does not result in an outage, and the change is asynchronously
    -- applied as soon as possible.
    --
    -- This parameter must be set to @true@ when specifying a value for the
    -- @EngineVersion@ parameter that is a different major version than the
    -- replication instance\'s current version.
    ModifyReplicationInstance -> Maybe Bool
allowMajorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | The weekly time range (in UTC) during which system maintenance can
    -- occur, which might result in an outage. Changing this parameter does not
    -- result in an outage, except in the following situation, and the change
    -- is asynchronously applied as soon as possible. If moving this window to
    -- the current time, there must be at least 30 minutes between the current
    -- time and end of the window to ensure pending changes are applied.
    --
    -- Default: Uses existing setting
    --
    -- Format: ddd:hh24:mi-ddd:hh24:mi
    --
    -- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
    --
    -- Constraints: Must be at least 30 minutes
    ModifyReplicationInstance -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | Specifies the VPC security group to be used with the replication
    -- instance. The VPC security group must work with the VPC containing the
    -- replication instance.
    ModifyReplicationInstance -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | Specifies whether the replication instance is a Multi-AZ deployment. You
    -- can\'t set the @AvailabilityZone@ parameter if the Multi-AZ parameter is
    -- set to @true@.
    ModifyReplicationInstance -> Maybe Bool
multiAZ :: Prelude.Maybe Prelude.Bool,
    -- | The amount of storage (in gigabytes) to be allocated for the replication
    -- instance.
    ModifyReplicationInstance -> Maybe Int
allocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | Indicates whether the changes should be applied immediately or during
    -- the next maintenance window.
    ModifyReplicationInstance -> Maybe Bool
applyImmediately :: Prelude.Maybe Prelude.Bool,
    -- | The compute and memory capacity of the replication instance as defined
    -- for the specified replication instance class. For example to specify the
    -- instance class dms.c4.large, set this parameter to @\"dms.c4.large\"@.
    --
    -- For more information on the settings and capacities for the available
    -- replication instance classes, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.html#CHAP_ReplicationInstance.InDepth Selecting the right DMS replication instance for your migration>.
    ModifyReplicationInstance -> Maybe Text
replicationInstanceClass :: Prelude.Maybe Prelude.Text,
    -- | The replication instance identifier. This parameter is stored as a
    -- lowercase string.
    ModifyReplicationInstance -> Maybe Text
replicationInstanceIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the replication instance.
    ModifyReplicationInstance -> Text
replicationInstanceArn :: Prelude.Text
  }
  deriving (ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
(ModifyReplicationInstance -> ModifyReplicationInstance -> Bool)
-> (ModifyReplicationInstance -> ModifyReplicationInstance -> Bool)
-> Eq ModifyReplicationInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
$c/= :: ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
== :: ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
$c== :: ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
Prelude.Eq, ReadPrec [ModifyReplicationInstance]
ReadPrec ModifyReplicationInstance
Int -> ReadS ModifyReplicationInstance
ReadS [ModifyReplicationInstance]
(Int -> ReadS ModifyReplicationInstance)
-> ReadS [ModifyReplicationInstance]
-> ReadPrec ModifyReplicationInstance
-> ReadPrec [ModifyReplicationInstance]
-> Read ModifyReplicationInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyReplicationInstance]
$creadListPrec :: ReadPrec [ModifyReplicationInstance]
readPrec :: ReadPrec ModifyReplicationInstance
$creadPrec :: ReadPrec ModifyReplicationInstance
readList :: ReadS [ModifyReplicationInstance]
$creadList :: ReadS [ModifyReplicationInstance]
readsPrec :: Int -> ReadS ModifyReplicationInstance
$creadsPrec :: Int -> ReadS ModifyReplicationInstance
Prelude.Read, Int -> ModifyReplicationInstance -> ShowS
[ModifyReplicationInstance] -> ShowS
ModifyReplicationInstance -> String
(Int -> ModifyReplicationInstance -> ShowS)
-> (ModifyReplicationInstance -> String)
-> ([ModifyReplicationInstance] -> ShowS)
-> Show ModifyReplicationInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyReplicationInstance] -> ShowS
$cshowList :: [ModifyReplicationInstance] -> ShowS
show :: ModifyReplicationInstance -> String
$cshow :: ModifyReplicationInstance -> String
showsPrec :: Int -> ModifyReplicationInstance -> ShowS
$cshowsPrec :: Int -> ModifyReplicationInstance -> ShowS
Prelude.Show, (forall x.
 ModifyReplicationInstance -> Rep ModifyReplicationInstance x)
-> (forall x.
    Rep ModifyReplicationInstance x -> ModifyReplicationInstance)
-> Generic ModifyReplicationInstance
forall x.
Rep ModifyReplicationInstance x -> ModifyReplicationInstance
forall x.
ModifyReplicationInstance -> Rep ModifyReplicationInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyReplicationInstance x -> ModifyReplicationInstance
$cfrom :: forall x.
ModifyReplicationInstance -> Rep ModifyReplicationInstance x
Prelude.Generic)

-- |
-- Create a value of 'ModifyReplicationInstance' 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:
--
-- 'engineVersion', 'modifyReplicationInstance_engineVersion' - The engine version number of the replication instance.
--
-- When modifying a major engine version of an instance, also set
-- @AllowMajorVersionUpgrade@ to @true@.
--
-- 'autoMinorVersionUpgrade', 'modifyReplicationInstance_autoMinorVersionUpgrade' - A value that indicates that minor version upgrades are applied
-- automatically to the replication instance during the maintenance window.
-- Changing this parameter doesn\'t result in an outage, except in the case
-- described following. The change is asynchronously applied as soon as
-- possible.
--
-- An outage does result if these factors apply:
--
-- -   This parameter is set to @true@ during the maintenance window.
--
-- -   A newer minor version is available.
--
-- -   DMS has enabled automatic patching for the given engine version.
--
-- 'allowMajorVersionUpgrade', 'modifyReplicationInstance_allowMajorVersionUpgrade' - Indicates that major version upgrades are allowed. Changing this
-- parameter does not result in an outage, and the change is asynchronously
-- applied as soon as possible.
--
-- This parameter must be set to @true@ when specifying a value for the
-- @EngineVersion@ parameter that is a different major version than the
-- replication instance\'s current version.
--
-- 'preferredMaintenanceWindow', 'modifyReplicationInstance_preferredMaintenanceWindow' - The weekly time range (in UTC) during which system maintenance can
-- occur, which might result in an outage. Changing this parameter does not
-- result in an outage, except in the following situation, and the change
-- is asynchronously applied as soon as possible. If moving this window to
-- the current time, there must be at least 30 minutes between the current
-- time and end of the window to ensure pending changes are applied.
--
-- Default: Uses existing setting
--
-- Format: ddd:hh24:mi-ddd:hh24:mi
--
-- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
--
-- Constraints: Must be at least 30 minutes
--
-- 'vpcSecurityGroupIds', 'modifyReplicationInstance_vpcSecurityGroupIds' - Specifies the VPC security group to be used with the replication
-- instance. The VPC security group must work with the VPC containing the
-- replication instance.
--
-- 'multiAZ', 'modifyReplicationInstance_multiAZ' - Specifies whether the replication instance is a Multi-AZ deployment. You
-- can\'t set the @AvailabilityZone@ parameter if the Multi-AZ parameter is
-- set to @true@.
--
-- 'allocatedStorage', 'modifyReplicationInstance_allocatedStorage' - The amount of storage (in gigabytes) to be allocated for the replication
-- instance.
--
-- 'applyImmediately', 'modifyReplicationInstance_applyImmediately' - Indicates whether the changes should be applied immediately or during
-- the next maintenance window.
--
-- 'replicationInstanceClass', 'modifyReplicationInstance_replicationInstanceClass' - The compute and memory capacity of the replication instance as defined
-- for the specified replication instance class. For example to specify the
-- instance class dms.c4.large, set this parameter to @\"dms.c4.large\"@.
--
-- For more information on the settings and capacities for the available
-- replication instance classes, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.html#CHAP_ReplicationInstance.InDepth Selecting the right DMS replication instance for your migration>.
--
-- 'replicationInstanceIdentifier', 'modifyReplicationInstance_replicationInstanceIdentifier' - The replication instance identifier. This parameter is stored as a
-- lowercase string.
--
-- 'replicationInstanceArn', 'modifyReplicationInstance_replicationInstanceArn' - The Amazon Resource Name (ARN) of the replication instance.
newModifyReplicationInstance ::
  -- | 'replicationInstanceArn'
  Prelude.Text ->
  ModifyReplicationInstance
newModifyReplicationInstance :: Text -> ModifyReplicationInstance
newModifyReplicationInstance Text
pReplicationInstanceArn_ =
  ModifyReplicationInstance' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> ModifyReplicationInstance
ModifyReplicationInstance'
    { $sel:engineVersion:ModifyReplicationInstance' :: Maybe Text
engineVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoMinorVersionUpgrade:ModifyReplicationInstance' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:allowMajorVersionUpgrade:ModifyReplicationInstance' :: Maybe Bool
allowMajorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:ModifyReplicationInstance' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcSecurityGroupIds:ModifyReplicationInstance' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:multiAZ:ModifyReplicationInstance' :: Maybe Bool
multiAZ = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:allocatedStorage:ModifyReplicationInstance' :: Maybe Int
allocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:applyImmediately:ModifyReplicationInstance' :: Maybe Bool
applyImmediately = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationInstanceClass:ModifyReplicationInstance' :: Maybe Text
replicationInstanceClass = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationInstanceIdentifier:ModifyReplicationInstance' :: Maybe Text
replicationInstanceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationInstanceArn:ModifyReplicationInstance' :: Text
replicationInstanceArn =
        Text
pReplicationInstanceArn_
    }

-- | The engine version number of the replication instance.
--
-- When modifying a major engine version of an instance, also set
-- @AllowMajorVersionUpgrade@ to @true@.
modifyReplicationInstance_engineVersion :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Text)
modifyReplicationInstance_engineVersion :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_engineVersion = (ModifyReplicationInstance -> Maybe Text)
-> (ModifyReplicationInstance
    -> Maybe Text -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Text
a -> ModifyReplicationInstance
s {$sel:engineVersion:ModifyReplicationInstance' :: Maybe Text
engineVersion = Maybe Text
a} :: ModifyReplicationInstance)

-- | A value that indicates that minor version upgrades are applied
-- automatically to the replication instance during the maintenance window.
-- Changing this parameter doesn\'t result in an outage, except in the case
-- described following. The change is asynchronously applied as soon as
-- possible.
--
-- An outage does result if these factors apply:
--
-- -   This parameter is set to @true@ during the maintenance window.
--
-- -   A newer minor version is available.
--
-- -   DMS has enabled automatic patching for the given engine version.
modifyReplicationInstance_autoMinorVersionUpgrade :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Bool)
modifyReplicationInstance_autoMinorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_autoMinorVersionUpgrade = (ModifyReplicationInstance -> Maybe Bool)
-> (ModifyReplicationInstance
    -> Maybe Bool -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
$sel:autoMinorVersionUpgrade:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
autoMinorVersionUpgrade} -> Maybe Bool
autoMinorVersionUpgrade) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Bool
a -> ModifyReplicationInstance
s {$sel:autoMinorVersionUpgrade:ModifyReplicationInstance' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
a} :: ModifyReplicationInstance)

-- | Indicates that major version upgrades are allowed. Changing this
-- parameter does not result in an outage, and the change is asynchronously
-- applied as soon as possible.
--
-- This parameter must be set to @true@ when specifying a value for the
-- @EngineVersion@ parameter that is a different major version than the
-- replication instance\'s current version.
modifyReplicationInstance_allowMajorVersionUpgrade :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Bool)
modifyReplicationInstance_allowMajorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_allowMajorVersionUpgrade = (ModifyReplicationInstance -> Maybe Bool)
-> (ModifyReplicationInstance
    -> Maybe Bool -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Bool
allowMajorVersionUpgrade :: Maybe Bool
$sel:allowMajorVersionUpgrade:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
allowMajorVersionUpgrade} -> Maybe Bool
allowMajorVersionUpgrade) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Bool
a -> ModifyReplicationInstance
s {$sel:allowMajorVersionUpgrade:ModifyReplicationInstance' :: Maybe Bool
allowMajorVersionUpgrade = Maybe Bool
a} :: ModifyReplicationInstance)

-- | The weekly time range (in UTC) during which system maintenance can
-- occur, which might result in an outage. Changing this parameter does not
-- result in an outage, except in the following situation, and the change
-- is asynchronously applied as soon as possible. If moving this window to
-- the current time, there must be at least 30 minutes between the current
-- time and end of the window to ensure pending changes are applied.
--
-- Default: Uses existing setting
--
-- Format: ddd:hh24:mi-ddd:hh24:mi
--
-- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
--
-- Constraints: Must be at least 30 minutes
modifyReplicationInstance_preferredMaintenanceWindow :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Text)
modifyReplicationInstance_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_preferredMaintenanceWindow = (ModifyReplicationInstance -> Maybe Text)
-> (ModifyReplicationInstance
    -> Maybe Text -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Text
a -> ModifyReplicationInstance
s {$sel:preferredMaintenanceWindow:ModifyReplicationInstance' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: ModifyReplicationInstance)

-- | Specifies the VPC security group to be used with the replication
-- instance. The VPC security group must work with the VPC containing the
-- replication instance.
modifyReplicationInstance_vpcSecurityGroupIds :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe [Prelude.Text])
modifyReplicationInstance_vpcSecurityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_vpcSecurityGroupIds = (ModifyReplicationInstance -> Maybe [Text])
-> (ModifyReplicationInstance
    -> Maybe [Text] -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe [Text]
a -> ModifyReplicationInstance
s {$sel:vpcSecurityGroupIds:ModifyReplicationInstance' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: ModifyReplicationInstance) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyReplicationInstance -> f ModifyReplicationInstance)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationInstance
-> f ModifyReplicationInstance
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

-- | Specifies whether the replication instance is a Multi-AZ deployment. You
-- can\'t set the @AvailabilityZone@ parameter if the Multi-AZ parameter is
-- set to @true@.
modifyReplicationInstance_multiAZ :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Bool)
modifyReplicationInstance_multiAZ :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_multiAZ = (ModifyReplicationInstance -> Maybe Bool)
-> (ModifyReplicationInstance
    -> Maybe Bool -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Bool
multiAZ :: Maybe Bool
$sel:multiAZ:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
multiAZ} -> Maybe Bool
multiAZ) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Bool
a -> ModifyReplicationInstance
s {$sel:multiAZ:ModifyReplicationInstance' :: Maybe Bool
multiAZ = Maybe Bool
a} :: ModifyReplicationInstance)

-- | The amount of storage (in gigabytes) to be allocated for the replication
-- instance.
modifyReplicationInstance_allocatedStorage :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Int)
modifyReplicationInstance_allocatedStorage :: (Maybe Int -> f (Maybe Int))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_allocatedStorage = (ModifyReplicationInstance -> Maybe Int)
-> (ModifyReplicationInstance
    -> Maybe Int -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Int
allocatedStorage :: Maybe Int
$sel:allocatedStorage:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Int
allocatedStorage} -> Maybe Int
allocatedStorage) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Int
a -> ModifyReplicationInstance
s {$sel:allocatedStorage:ModifyReplicationInstance' :: Maybe Int
allocatedStorage = Maybe Int
a} :: ModifyReplicationInstance)

-- | Indicates whether the changes should be applied immediately or during
-- the next maintenance window.
modifyReplicationInstance_applyImmediately :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Bool)
modifyReplicationInstance_applyImmediately :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_applyImmediately = (ModifyReplicationInstance -> Maybe Bool)
-> (ModifyReplicationInstance
    -> Maybe Bool -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Bool
applyImmediately :: Maybe Bool
$sel:applyImmediately:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
applyImmediately} -> Maybe Bool
applyImmediately) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Bool
a -> ModifyReplicationInstance
s {$sel:applyImmediately:ModifyReplicationInstance' :: Maybe Bool
applyImmediately = Maybe Bool
a} :: ModifyReplicationInstance)

-- | The compute and memory capacity of the replication instance as defined
-- for the specified replication instance class. For example to specify the
-- instance class dms.c4.large, set this parameter to @\"dms.c4.large\"@.
--
-- For more information on the settings and capacities for the available
-- replication instance classes, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.html#CHAP_ReplicationInstance.InDepth Selecting the right DMS replication instance for your migration>.
modifyReplicationInstance_replicationInstanceClass :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Text)
modifyReplicationInstance_replicationInstanceClass :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_replicationInstanceClass = (ModifyReplicationInstance -> Maybe Text)
-> (ModifyReplicationInstance
    -> Maybe Text -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Text
replicationInstanceClass :: Maybe Text
$sel:replicationInstanceClass:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
replicationInstanceClass} -> Maybe Text
replicationInstanceClass) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Text
a -> ModifyReplicationInstance
s {$sel:replicationInstanceClass:ModifyReplicationInstance' :: Maybe Text
replicationInstanceClass = Maybe Text
a} :: ModifyReplicationInstance)

-- | The replication instance identifier. This parameter is stored as a
-- lowercase string.
modifyReplicationInstance_replicationInstanceIdentifier :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Text)
modifyReplicationInstance_replicationInstanceIdentifier :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_replicationInstanceIdentifier = (ModifyReplicationInstance -> Maybe Text)
-> (ModifyReplicationInstance
    -> Maybe Text -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance
     ModifyReplicationInstance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Text
replicationInstanceIdentifier :: Maybe Text
$sel:replicationInstanceIdentifier:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
replicationInstanceIdentifier} -> Maybe Text
replicationInstanceIdentifier) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Text
a -> ModifyReplicationInstance
s {$sel:replicationInstanceIdentifier:ModifyReplicationInstance' :: Maybe Text
replicationInstanceIdentifier = Maybe Text
a} :: ModifyReplicationInstance)

-- | The Amazon Resource Name (ARN) of the replication instance.
modifyReplicationInstance_replicationInstanceArn :: Lens.Lens' ModifyReplicationInstance Prelude.Text
modifyReplicationInstance_replicationInstanceArn :: (Text -> f Text)
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_replicationInstanceArn = (ModifyReplicationInstance -> Text)
-> (ModifyReplicationInstance -> Text -> ModifyReplicationInstance)
-> Lens
     ModifyReplicationInstance ModifyReplicationInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Text
replicationInstanceArn :: Text
$sel:replicationInstanceArn:ModifyReplicationInstance' :: ModifyReplicationInstance -> Text
replicationInstanceArn} -> Text
replicationInstanceArn) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Text
a -> ModifyReplicationInstance
s {$sel:replicationInstanceArn:ModifyReplicationInstance' :: Text
replicationInstanceArn = Text
a} :: ModifyReplicationInstance)

instance Core.AWSRequest ModifyReplicationInstance where
  type
    AWSResponse ModifyReplicationInstance =
      ModifyReplicationInstanceResponse
  request :: ModifyReplicationInstance -> Request ModifyReplicationInstance
request = Service
-> ModifyReplicationInstance -> Request ModifyReplicationInstance
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyReplicationInstance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyReplicationInstance)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ModifyReplicationInstance))
-> Logger
-> Service
-> Proxy ModifyReplicationInstance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyReplicationInstance)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ReplicationInstance
-> Int -> ModifyReplicationInstanceResponse
ModifyReplicationInstanceResponse'
            (Maybe ReplicationInstance
 -> Int -> ModifyReplicationInstanceResponse)
-> Either String (Maybe ReplicationInstance)
-> Either String (Int -> ModifyReplicationInstanceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ReplicationInstance)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReplicationInstance")
            Either String (Int -> ModifyReplicationInstanceResponse)
-> Either String Int
-> Either String ModifyReplicationInstanceResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ModifyReplicationInstance

instance Prelude.NFData ModifyReplicationInstance

instance Core.ToHeaders ModifyReplicationInstance where
  toHeaders :: ModifyReplicationInstance -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ModifyReplicationInstance -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonDMSv20160101.ModifyReplicationInstance" ::
                          Prelude.ByteString
                      ),
            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 ModifyReplicationInstance where
  toJSON :: ModifyReplicationInstance -> Value
toJSON ModifyReplicationInstance' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe Text
Text
replicationInstanceArn :: Text
replicationInstanceIdentifier :: Maybe Text
replicationInstanceClass :: Maybe Text
applyImmediately :: Maybe Bool
allocatedStorage :: Maybe Int
multiAZ :: Maybe Bool
vpcSecurityGroupIds :: Maybe [Text]
preferredMaintenanceWindow :: Maybe Text
allowMajorVersionUpgrade :: Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
engineVersion :: Maybe Text
$sel:replicationInstanceArn:ModifyReplicationInstance' :: ModifyReplicationInstance -> Text
$sel:replicationInstanceIdentifier:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
$sel:replicationInstanceClass:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
$sel:applyImmediately:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
$sel:allocatedStorage:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Int
$sel:multiAZ:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
$sel:vpcSecurityGroupIds:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe [Text]
$sel:preferredMaintenanceWindow:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
$sel:allowMajorVersionUpgrade:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
$sel:autoMinorVersionUpgrade:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
$sel:engineVersion:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EngineVersion" 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
engineVersion,
            (Text
"AutoMinorVersionUpgrade" 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
autoMinorVersionUpgrade,
            (Text
"AllowMajorVersionUpgrade" 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
allowMajorVersionUpgrade,
            (Text
"PreferredMaintenanceWindow" 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
preferredMaintenanceWindow,
            (Text
"VpcSecurityGroupIds" 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]
vpcSecurityGroupIds,
            (Text
"MultiAZ" 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
multiAZ,
            (Text
"AllocatedStorage" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
allocatedStorage,
            (Text
"ApplyImmediately" 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
applyImmediately,
            (Text
"ReplicationInstanceClass" 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
replicationInstanceClass,
            (Text
"ReplicationInstanceIdentifier" 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
replicationInstanceIdentifier,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ReplicationInstanceArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
replicationInstanceArn
              )
          ]
      )

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

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

-- |
--
-- /See:/ 'newModifyReplicationInstanceResponse' smart constructor.
data ModifyReplicationInstanceResponse = ModifyReplicationInstanceResponse'
  { -- | The modified replication instance.
    ModifyReplicationInstanceResponse -> Maybe ReplicationInstance
replicationInstance :: Prelude.Maybe ReplicationInstance,
    -- | The response's http status code.
    ModifyReplicationInstanceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
(ModifyReplicationInstanceResponse
 -> ModifyReplicationInstanceResponse -> Bool)
-> (ModifyReplicationInstanceResponse
    -> ModifyReplicationInstanceResponse -> Bool)
-> Eq ModifyReplicationInstanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
$c/= :: ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
== :: ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
$c== :: ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
Prelude.Eq, ReadPrec [ModifyReplicationInstanceResponse]
ReadPrec ModifyReplicationInstanceResponse
Int -> ReadS ModifyReplicationInstanceResponse
ReadS [ModifyReplicationInstanceResponse]
(Int -> ReadS ModifyReplicationInstanceResponse)
-> ReadS [ModifyReplicationInstanceResponse]
-> ReadPrec ModifyReplicationInstanceResponse
-> ReadPrec [ModifyReplicationInstanceResponse]
-> Read ModifyReplicationInstanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyReplicationInstanceResponse]
$creadListPrec :: ReadPrec [ModifyReplicationInstanceResponse]
readPrec :: ReadPrec ModifyReplicationInstanceResponse
$creadPrec :: ReadPrec ModifyReplicationInstanceResponse
readList :: ReadS [ModifyReplicationInstanceResponse]
$creadList :: ReadS [ModifyReplicationInstanceResponse]
readsPrec :: Int -> ReadS ModifyReplicationInstanceResponse
$creadsPrec :: Int -> ReadS ModifyReplicationInstanceResponse
Prelude.Read, Int -> ModifyReplicationInstanceResponse -> ShowS
[ModifyReplicationInstanceResponse] -> ShowS
ModifyReplicationInstanceResponse -> String
(Int -> ModifyReplicationInstanceResponse -> ShowS)
-> (ModifyReplicationInstanceResponse -> String)
-> ([ModifyReplicationInstanceResponse] -> ShowS)
-> Show ModifyReplicationInstanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyReplicationInstanceResponse] -> ShowS
$cshowList :: [ModifyReplicationInstanceResponse] -> ShowS
show :: ModifyReplicationInstanceResponse -> String
$cshow :: ModifyReplicationInstanceResponse -> String
showsPrec :: Int -> ModifyReplicationInstanceResponse -> ShowS
$cshowsPrec :: Int -> ModifyReplicationInstanceResponse -> ShowS
Prelude.Show, (forall x.
 ModifyReplicationInstanceResponse
 -> Rep ModifyReplicationInstanceResponse x)
-> (forall x.
    Rep ModifyReplicationInstanceResponse x
    -> ModifyReplicationInstanceResponse)
-> Generic ModifyReplicationInstanceResponse
forall x.
Rep ModifyReplicationInstanceResponse x
-> ModifyReplicationInstanceResponse
forall x.
ModifyReplicationInstanceResponse
-> Rep ModifyReplicationInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyReplicationInstanceResponse x
-> ModifyReplicationInstanceResponse
$cfrom :: forall x.
ModifyReplicationInstanceResponse
-> Rep ModifyReplicationInstanceResponse x
Prelude.Generic)

-- |
-- Create a value of 'ModifyReplicationInstanceResponse' 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:
--
-- 'replicationInstance', 'modifyReplicationInstanceResponse_replicationInstance' - The modified replication instance.
--
-- 'httpStatus', 'modifyReplicationInstanceResponse_httpStatus' - The response's http status code.
newModifyReplicationInstanceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyReplicationInstanceResponse
newModifyReplicationInstanceResponse :: Int -> ModifyReplicationInstanceResponse
newModifyReplicationInstanceResponse Int
pHttpStatus_ =
  ModifyReplicationInstanceResponse' :: Maybe ReplicationInstance
-> Int -> ModifyReplicationInstanceResponse
ModifyReplicationInstanceResponse'
    { $sel:replicationInstance:ModifyReplicationInstanceResponse' :: Maybe ReplicationInstance
replicationInstance =
        Maybe ReplicationInstance
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ModifyReplicationInstanceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The modified replication instance.
modifyReplicationInstanceResponse_replicationInstance :: Lens.Lens' ModifyReplicationInstanceResponse (Prelude.Maybe ReplicationInstance)
modifyReplicationInstanceResponse_replicationInstance :: (Maybe ReplicationInstance -> f (Maybe ReplicationInstance))
-> ModifyReplicationInstanceResponse
-> f ModifyReplicationInstanceResponse
modifyReplicationInstanceResponse_replicationInstance = (ModifyReplicationInstanceResponse -> Maybe ReplicationInstance)
-> (ModifyReplicationInstanceResponse
    -> Maybe ReplicationInstance -> ModifyReplicationInstanceResponse)
-> Lens
     ModifyReplicationInstanceResponse
     ModifyReplicationInstanceResponse
     (Maybe ReplicationInstance)
     (Maybe ReplicationInstance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstanceResponse' {Maybe ReplicationInstance
replicationInstance :: Maybe ReplicationInstance
$sel:replicationInstance:ModifyReplicationInstanceResponse' :: ModifyReplicationInstanceResponse -> Maybe ReplicationInstance
replicationInstance} -> Maybe ReplicationInstance
replicationInstance) (\s :: ModifyReplicationInstanceResponse
s@ModifyReplicationInstanceResponse' {} Maybe ReplicationInstance
a -> ModifyReplicationInstanceResponse
s {$sel:replicationInstance:ModifyReplicationInstanceResponse' :: Maybe ReplicationInstance
replicationInstance = Maybe ReplicationInstance
a} :: ModifyReplicationInstanceResponse)

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

instance
  Prelude.NFData
    ModifyReplicationInstanceResponse