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

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

-- |
-- Module      : Amazonka.DMS.Types.ReplicationPendingModifiedValues
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DMS.Types.ReplicationPendingModifiedValues where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Provides information about the values of pending modifications to a
-- replication instance. This data type is an object of the
-- <https://docs.aws.amazon.com/dms/latest/APIReference/API_ReplicationInstance.html ReplicationInstance>
-- user-defined data type.
--
-- /See:/ 'newReplicationPendingModifiedValues' smart constructor.
data ReplicationPendingModifiedValues = ReplicationPendingModifiedValues'
  { -- | The amount of storage (in gigabytes) that is allocated for the
    -- replication instance.
    ReplicationPendingModifiedValues -> Maybe Int
allocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | The engine version number of the replication instance.
    ReplicationPendingModifiedValues -> Maybe Text
engineVersion :: 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@.
    ReplicationPendingModifiedValues -> Maybe Bool
multiAZ :: Prelude.Maybe Prelude.Bool,
    -- | The type of IP address protocol used by a replication instance, such as
    -- IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing.
    -- IPv6 only is not yet supported.
    ReplicationPendingModifiedValues -> Maybe Text
networkType :: Prelude.Maybe Prelude.Text,
    -- | The compute and memory capacity of the replication instance as defined
    -- for the specified replication instance class.
    --
    -- 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>.
    ReplicationPendingModifiedValues -> Maybe Text
replicationInstanceClass :: Prelude.Maybe Prelude.Text
  }
  deriving (ReplicationPendingModifiedValues
-> ReplicationPendingModifiedValues -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicationPendingModifiedValues
-> ReplicationPendingModifiedValues -> Bool
$c/= :: ReplicationPendingModifiedValues
-> ReplicationPendingModifiedValues -> Bool
== :: ReplicationPendingModifiedValues
-> ReplicationPendingModifiedValues -> Bool
$c== :: ReplicationPendingModifiedValues
-> ReplicationPendingModifiedValues -> Bool
Prelude.Eq, ReadPrec [ReplicationPendingModifiedValues]
ReadPrec ReplicationPendingModifiedValues
Int -> ReadS ReplicationPendingModifiedValues
ReadS [ReplicationPendingModifiedValues]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicationPendingModifiedValues]
$creadListPrec :: ReadPrec [ReplicationPendingModifiedValues]
readPrec :: ReadPrec ReplicationPendingModifiedValues
$creadPrec :: ReadPrec ReplicationPendingModifiedValues
readList :: ReadS [ReplicationPendingModifiedValues]
$creadList :: ReadS [ReplicationPendingModifiedValues]
readsPrec :: Int -> ReadS ReplicationPendingModifiedValues
$creadsPrec :: Int -> ReadS ReplicationPendingModifiedValues
Prelude.Read, Int -> ReplicationPendingModifiedValues -> ShowS
[ReplicationPendingModifiedValues] -> ShowS
ReplicationPendingModifiedValues -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicationPendingModifiedValues] -> ShowS
$cshowList :: [ReplicationPendingModifiedValues] -> ShowS
show :: ReplicationPendingModifiedValues -> String
$cshow :: ReplicationPendingModifiedValues -> String
showsPrec :: Int -> ReplicationPendingModifiedValues -> ShowS
$cshowsPrec :: Int -> ReplicationPendingModifiedValues -> ShowS
Prelude.Show, forall x.
Rep ReplicationPendingModifiedValues x
-> ReplicationPendingModifiedValues
forall x.
ReplicationPendingModifiedValues
-> Rep ReplicationPendingModifiedValues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicationPendingModifiedValues x
-> ReplicationPendingModifiedValues
$cfrom :: forall x.
ReplicationPendingModifiedValues
-> Rep ReplicationPendingModifiedValues x
Prelude.Generic)

-- |
-- Create a value of 'ReplicationPendingModifiedValues' 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:
--
-- 'allocatedStorage', 'replicationPendingModifiedValues_allocatedStorage' - The amount of storage (in gigabytes) that is allocated for the
-- replication instance.
--
-- 'engineVersion', 'replicationPendingModifiedValues_engineVersion' - The engine version number of the replication instance.
--
-- 'multiAZ', 'replicationPendingModifiedValues_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@.
--
-- 'networkType', 'replicationPendingModifiedValues_networkType' - The type of IP address protocol used by a replication instance, such as
-- IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing.
-- IPv6 only is not yet supported.
--
-- 'replicationInstanceClass', 'replicationPendingModifiedValues_replicationInstanceClass' - The compute and memory capacity of the replication instance as defined
-- for the specified replication instance class.
--
-- 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>.
newReplicationPendingModifiedValues ::
  ReplicationPendingModifiedValues
newReplicationPendingModifiedValues :: ReplicationPendingModifiedValues
newReplicationPendingModifiedValues =
  ReplicationPendingModifiedValues'
    { $sel:allocatedStorage:ReplicationPendingModifiedValues' :: Maybe Int
allocatedStorage =
        forall a. Maybe a
Prelude.Nothing,
      $sel:engineVersion:ReplicationPendingModifiedValues' :: Maybe Text
engineVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:multiAZ:ReplicationPendingModifiedValues' :: Maybe Bool
multiAZ = forall a. Maybe a
Prelude.Nothing,
      $sel:networkType:ReplicationPendingModifiedValues' :: Maybe Text
networkType = forall a. Maybe a
Prelude.Nothing,
      $sel:replicationInstanceClass:ReplicationPendingModifiedValues' :: Maybe Text
replicationInstanceClass =
        forall a. Maybe a
Prelude.Nothing
    }

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

-- | The engine version number of the replication instance.
replicationPendingModifiedValues_engineVersion :: Lens.Lens' ReplicationPendingModifiedValues (Prelude.Maybe Prelude.Text)
replicationPendingModifiedValues_engineVersion :: Lens' ReplicationPendingModifiedValues (Maybe Text)
replicationPendingModifiedValues_engineVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationPendingModifiedValues' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: ReplicationPendingModifiedValues
s@ReplicationPendingModifiedValues' {} Maybe Text
a -> ReplicationPendingModifiedValues
s {$sel:engineVersion:ReplicationPendingModifiedValues' :: Maybe Text
engineVersion = Maybe Text
a} :: ReplicationPendingModifiedValues)

-- | 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@.
replicationPendingModifiedValues_multiAZ :: Lens.Lens' ReplicationPendingModifiedValues (Prelude.Maybe Prelude.Bool)
replicationPendingModifiedValues_multiAZ :: Lens' ReplicationPendingModifiedValues (Maybe Bool)
replicationPendingModifiedValues_multiAZ = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationPendingModifiedValues' {Maybe Bool
multiAZ :: Maybe Bool
$sel:multiAZ:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Bool
multiAZ} -> Maybe Bool
multiAZ) (\s :: ReplicationPendingModifiedValues
s@ReplicationPendingModifiedValues' {} Maybe Bool
a -> ReplicationPendingModifiedValues
s {$sel:multiAZ:ReplicationPendingModifiedValues' :: Maybe Bool
multiAZ = Maybe Bool
a} :: ReplicationPendingModifiedValues)

-- | The type of IP address protocol used by a replication instance, such as
-- IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing.
-- IPv6 only is not yet supported.
replicationPendingModifiedValues_networkType :: Lens.Lens' ReplicationPendingModifiedValues (Prelude.Maybe Prelude.Text)
replicationPendingModifiedValues_networkType :: Lens' ReplicationPendingModifiedValues (Maybe Text)
replicationPendingModifiedValues_networkType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationPendingModifiedValues' {Maybe Text
networkType :: Maybe Text
$sel:networkType:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Text
networkType} -> Maybe Text
networkType) (\s :: ReplicationPendingModifiedValues
s@ReplicationPendingModifiedValues' {} Maybe Text
a -> ReplicationPendingModifiedValues
s {$sel:networkType:ReplicationPendingModifiedValues' :: Maybe Text
networkType = Maybe Text
a} :: ReplicationPendingModifiedValues)

-- | The compute and memory capacity of the replication instance as defined
-- for the specified replication instance class.
--
-- 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>.
replicationPendingModifiedValues_replicationInstanceClass :: Lens.Lens' ReplicationPendingModifiedValues (Prelude.Maybe Prelude.Text)
replicationPendingModifiedValues_replicationInstanceClass :: Lens' ReplicationPendingModifiedValues (Maybe Text)
replicationPendingModifiedValues_replicationInstanceClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationPendingModifiedValues' {Maybe Text
replicationInstanceClass :: Maybe Text
$sel:replicationInstanceClass:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Text
replicationInstanceClass} -> Maybe Text
replicationInstanceClass) (\s :: ReplicationPendingModifiedValues
s@ReplicationPendingModifiedValues' {} Maybe Text
a -> ReplicationPendingModifiedValues
s {$sel:replicationInstanceClass:ReplicationPendingModifiedValues' :: Maybe Text
replicationInstanceClass = Maybe Text
a} :: ReplicationPendingModifiedValues)

instance
  Data.FromJSON
    ReplicationPendingModifiedValues
  where
  parseJSON :: Value -> Parser ReplicationPendingModifiedValues
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ReplicationPendingModifiedValues"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> ReplicationPendingModifiedValues
ReplicationPendingModifiedValues'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AllocatedStorage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EngineVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MultiAZ")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NetworkType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReplicationInstanceClass")
      )

instance
  Prelude.Hashable
    ReplicationPendingModifiedValues
  where
  hashWithSalt :: Int -> ReplicationPendingModifiedValues -> Int
hashWithSalt
    Int
_salt
    ReplicationPendingModifiedValues' {Maybe Bool
Maybe Int
Maybe Text
replicationInstanceClass :: Maybe Text
networkType :: Maybe Text
multiAZ :: Maybe Bool
engineVersion :: Maybe Text
allocatedStorage :: Maybe Int
$sel:replicationInstanceClass:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Text
$sel:networkType:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Text
$sel:multiAZ:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Bool
$sel:engineVersion:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Text
$sel:allocatedStorage:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Int
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
allocatedStorage
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engineVersion
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
multiAZ
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkType
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
replicationInstanceClass

instance
  Prelude.NFData
    ReplicationPendingModifiedValues
  where
  rnf :: ReplicationPendingModifiedValues -> ()
rnf ReplicationPendingModifiedValues' {Maybe Bool
Maybe Int
Maybe Text
replicationInstanceClass :: Maybe Text
networkType :: Maybe Text
multiAZ :: Maybe Bool
engineVersion :: Maybe Text
allocatedStorage :: Maybe Int
$sel:replicationInstanceClass:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Text
$sel:networkType:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Text
$sel:multiAZ:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Bool
$sel:engineVersion:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Text
$sel:allocatedStorage:ReplicationPendingModifiedValues' :: ReplicationPendingModifiedValues -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
allocatedStorage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engineVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
multiAZ
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
replicationInstanceClass