{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DMS.Types.ReplicationPendingModifiedValues where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 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 amount of storage (in gigabytes) that is allocated for the
    -- replication instance.
    ReplicationPendingModifiedValues -> Maybe Int
allocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | 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
(ReplicationPendingModifiedValues
 -> ReplicationPendingModifiedValues -> Bool)
-> (ReplicationPendingModifiedValues
    -> ReplicationPendingModifiedValues -> Bool)
-> Eq ReplicationPendingModifiedValues
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]
(Int -> ReadS ReplicationPendingModifiedValues)
-> ReadS [ReplicationPendingModifiedValues]
-> ReadPrec ReplicationPendingModifiedValues
-> ReadPrec [ReplicationPendingModifiedValues]
-> Read 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
(Int -> ReplicationPendingModifiedValues -> ShowS)
-> (ReplicationPendingModifiedValues -> String)
-> ([ReplicationPendingModifiedValues] -> ShowS)
-> Show ReplicationPendingModifiedValues
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.
 ReplicationPendingModifiedValues
 -> Rep ReplicationPendingModifiedValues x)
-> (forall x.
    Rep ReplicationPendingModifiedValues x
    -> ReplicationPendingModifiedValues)
-> Generic ReplicationPendingModifiedValues
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:
--
-- '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@.
--
-- 'allocatedStorage', 'replicationPendingModifiedValues_allocatedStorage' - The amount of storage (in gigabytes) that is allocated for the
-- replication instance.
--
-- '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' :: Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> ReplicationPendingModifiedValues
ReplicationPendingModifiedValues'
    { $sel:engineVersion:ReplicationPendingModifiedValues' :: Maybe Text
engineVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:multiAZ:ReplicationPendingModifiedValues' :: Maybe Bool
multiAZ = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:allocatedStorage:ReplicationPendingModifiedValues' :: Maybe Int
allocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationInstanceClass:ReplicationPendingModifiedValues' :: Maybe Text
replicationInstanceClass =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The engine version number of the replication instance.
replicationPendingModifiedValues_engineVersion :: Lens.Lens' ReplicationPendingModifiedValues (Prelude.Maybe Prelude.Text)
replicationPendingModifiedValues_engineVersion :: (Maybe Text -> f (Maybe Text))
-> ReplicationPendingModifiedValues
-> f ReplicationPendingModifiedValues
replicationPendingModifiedValues_engineVersion = (ReplicationPendingModifiedValues -> Maybe Text)
-> (ReplicationPendingModifiedValues
    -> Maybe Text -> ReplicationPendingModifiedValues)
-> Lens
     ReplicationPendingModifiedValues
     ReplicationPendingModifiedValues
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Bool -> f (Maybe Bool))
-> ReplicationPendingModifiedValues
-> f ReplicationPendingModifiedValues
replicationPendingModifiedValues_multiAZ = (ReplicationPendingModifiedValues -> Maybe Bool)
-> (ReplicationPendingModifiedValues
    -> Maybe Bool -> ReplicationPendingModifiedValues)
-> Lens
     ReplicationPendingModifiedValues
     ReplicationPendingModifiedValues
     (Maybe Bool)
     (Maybe Bool)
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 amount of storage (in gigabytes) that is allocated for the
-- replication instance.
replicationPendingModifiedValues_allocatedStorage :: Lens.Lens' ReplicationPendingModifiedValues (Prelude.Maybe Prelude.Int)
replicationPendingModifiedValues_allocatedStorage :: (Maybe Int -> f (Maybe Int))
-> ReplicationPendingModifiedValues
-> f ReplicationPendingModifiedValues
replicationPendingModifiedValues_allocatedStorage = (ReplicationPendingModifiedValues -> Maybe Int)
-> (ReplicationPendingModifiedValues
    -> Maybe Int -> ReplicationPendingModifiedValues)
-> Lens
     ReplicationPendingModifiedValues
     ReplicationPendingModifiedValues
     (Maybe Int)
     (Maybe Int)
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 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 :: (Maybe Text -> f (Maybe Text))
-> ReplicationPendingModifiedValues
-> f ReplicationPendingModifiedValues
replicationPendingModifiedValues_replicationInstanceClass = (ReplicationPendingModifiedValues -> Maybe Text)
-> (ReplicationPendingModifiedValues
    -> Maybe Text -> ReplicationPendingModifiedValues)
-> Lens
     ReplicationPendingModifiedValues
     ReplicationPendingModifiedValues
     (Maybe Text)
     (Maybe Text)
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
  Core.FromJSON
    ReplicationPendingModifiedValues
  where
  parseJSON :: Value -> Parser ReplicationPendingModifiedValues
parseJSON =
    String
-> (Object -> Parser ReplicationPendingModifiedValues)
-> Value
-> Parser ReplicationPendingModifiedValues
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReplicationPendingModifiedValues"
      ( \Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> ReplicationPendingModifiedValues
ReplicationPendingModifiedValues'
            (Maybe Text
 -> Maybe Bool
 -> Maybe Int
 -> Maybe Text
 -> ReplicationPendingModifiedValues)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Int -> Maybe Text -> ReplicationPendingModifiedValues)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EngineVersion")
            Parser
  (Maybe Bool
   -> Maybe Int -> Maybe Text -> ReplicationPendingModifiedValues)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Int -> Maybe Text -> ReplicationPendingModifiedValues)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MultiAZ")
            Parser
  (Maybe Int -> Maybe Text -> ReplicationPendingModifiedValues)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> ReplicationPendingModifiedValues)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AllocatedStorage")
            Parser (Maybe Text -> ReplicationPendingModifiedValues)
-> Parser (Maybe Text) -> Parser ReplicationPendingModifiedValues
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReplicationInstanceClass")
      )

instance
  Prelude.Hashable
    ReplicationPendingModifiedValues

instance
  Prelude.NFData
    ReplicationPendingModifiedValues