{-# 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.OrderableReplicationInstance
-- 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.OrderableReplicationInstance where

import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.ReleaseStatusValues
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | In response to the @DescribeOrderableReplicationInstances@ operation,
-- this object describes an available replication instance. This
-- description includes the replication instance\'s type, engine version,
-- and allocated storage.
--
-- /See:/ 'newOrderableReplicationInstance' smart constructor.
data OrderableReplicationInstance = OrderableReplicationInstance'
  { -- | The version of the replication engine.
    OrderableReplicationInstance -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The minimum amount of storage (in gigabytes) that can be allocated for
    -- the replication instance.
    OrderableReplicationInstance -> Maybe Int
minAllocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | The value returned when the specified @EngineVersion@ of the replication
    -- instance is in Beta or test mode. This indicates some features might not
    -- work as expected.
    --
    -- DMS supports the @ReleaseStatus@ parameter in versions 3.1.4 and later.
    OrderableReplicationInstance -> Maybe ReleaseStatusValues
releaseStatus :: Prelude.Maybe ReleaseStatusValues,
    -- | The amount of storage (in gigabytes) that is allocated for the
    -- replication instance.
    OrderableReplicationInstance -> Maybe Int
includedAllocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | List of Availability Zones for this replication instance.
    OrderableReplicationInstance -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | The minimum amount of storage (in gigabytes) that can be allocated for
    -- the replication instance.
    OrderableReplicationInstance -> Maybe Int
maxAllocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | 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>.
    OrderableReplicationInstance -> Maybe Text
replicationInstanceClass :: Prelude.Maybe Prelude.Text,
    -- | The default amount of storage (in gigabytes) that is allocated for the
    -- replication instance.
    OrderableReplicationInstance -> Maybe Int
defaultAllocatedStorage :: Prelude.Maybe Prelude.Int,
    -- | The type of storage used by the replication instance.
    OrderableReplicationInstance -> Maybe Text
storageType :: Prelude.Maybe Prelude.Text
  }
  deriving (OrderableReplicationInstance
-> OrderableReplicationInstance -> Bool
(OrderableReplicationInstance
 -> OrderableReplicationInstance -> Bool)
-> (OrderableReplicationInstance
    -> OrderableReplicationInstance -> Bool)
-> Eq OrderableReplicationInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrderableReplicationInstance
-> OrderableReplicationInstance -> Bool
$c/= :: OrderableReplicationInstance
-> OrderableReplicationInstance -> Bool
== :: OrderableReplicationInstance
-> OrderableReplicationInstance -> Bool
$c== :: OrderableReplicationInstance
-> OrderableReplicationInstance -> Bool
Prelude.Eq, ReadPrec [OrderableReplicationInstance]
ReadPrec OrderableReplicationInstance
Int -> ReadS OrderableReplicationInstance
ReadS [OrderableReplicationInstance]
(Int -> ReadS OrderableReplicationInstance)
-> ReadS [OrderableReplicationInstance]
-> ReadPrec OrderableReplicationInstance
-> ReadPrec [OrderableReplicationInstance]
-> Read OrderableReplicationInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrderableReplicationInstance]
$creadListPrec :: ReadPrec [OrderableReplicationInstance]
readPrec :: ReadPrec OrderableReplicationInstance
$creadPrec :: ReadPrec OrderableReplicationInstance
readList :: ReadS [OrderableReplicationInstance]
$creadList :: ReadS [OrderableReplicationInstance]
readsPrec :: Int -> ReadS OrderableReplicationInstance
$creadsPrec :: Int -> ReadS OrderableReplicationInstance
Prelude.Read, Int -> OrderableReplicationInstance -> ShowS
[OrderableReplicationInstance] -> ShowS
OrderableReplicationInstance -> String
(Int -> OrderableReplicationInstance -> ShowS)
-> (OrderableReplicationInstance -> String)
-> ([OrderableReplicationInstance] -> ShowS)
-> Show OrderableReplicationInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrderableReplicationInstance] -> ShowS
$cshowList :: [OrderableReplicationInstance] -> ShowS
show :: OrderableReplicationInstance -> String
$cshow :: OrderableReplicationInstance -> String
showsPrec :: Int -> OrderableReplicationInstance -> ShowS
$cshowsPrec :: Int -> OrderableReplicationInstance -> ShowS
Prelude.Show, (forall x.
 OrderableReplicationInstance -> Rep OrderableReplicationInstance x)
-> (forall x.
    Rep OrderableReplicationInstance x -> OrderableReplicationInstance)
-> Generic OrderableReplicationInstance
forall x.
Rep OrderableReplicationInstance x -> OrderableReplicationInstance
forall x.
OrderableReplicationInstance -> Rep OrderableReplicationInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OrderableReplicationInstance x -> OrderableReplicationInstance
$cfrom :: forall x.
OrderableReplicationInstance -> Rep OrderableReplicationInstance x
Prelude.Generic)

-- |
-- Create a value of 'OrderableReplicationInstance' 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', 'orderableReplicationInstance_engineVersion' - The version of the replication engine.
--
-- 'minAllocatedStorage', 'orderableReplicationInstance_minAllocatedStorage' - The minimum amount of storage (in gigabytes) that can be allocated for
-- the replication instance.
--
-- 'releaseStatus', 'orderableReplicationInstance_releaseStatus' - The value returned when the specified @EngineVersion@ of the replication
-- instance is in Beta or test mode. This indicates some features might not
-- work as expected.
--
-- DMS supports the @ReleaseStatus@ parameter in versions 3.1.4 and later.
--
-- 'includedAllocatedStorage', 'orderableReplicationInstance_includedAllocatedStorage' - The amount of storage (in gigabytes) that is allocated for the
-- replication instance.
--
-- 'availabilityZones', 'orderableReplicationInstance_availabilityZones' - List of Availability Zones for this replication instance.
--
-- 'maxAllocatedStorage', 'orderableReplicationInstance_maxAllocatedStorage' - The minimum amount of storage (in gigabytes) that can be allocated for
-- the replication instance.
--
-- 'replicationInstanceClass', 'orderableReplicationInstance_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>.
--
-- 'defaultAllocatedStorage', 'orderableReplicationInstance_defaultAllocatedStorage' - The default amount of storage (in gigabytes) that is allocated for the
-- replication instance.
--
-- 'storageType', 'orderableReplicationInstance_storageType' - The type of storage used by the replication instance.
newOrderableReplicationInstance ::
  OrderableReplicationInstance
newOrderableReplicationInstance :: OrderableReplicationInstance
newOrderableReplicationInstance =
  OrderableReplicationInstance' :: Maybe Text
-> Maybe Int
-> Maybe ReleaseStatusValues
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> OrderableReplicationInstance
OrderableReplicationInstance'
    { $sel:engineVersion:OrderableReplicationInstance' :: Maybe Text
engineVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:minAllocatedStorage:OrderableReplicationInstance' :: Maybe Int
minAllocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:releaseStatus:OrderableReplicationInstance' :: Maybe ReleaseStatusValues
releaseStatus = Maybe ReleaseStatusValues
forall a. Maybe a
Prelude.Nothing,
      $sel:includedAllocatedStorage:OrderableReplicationInstance' :: Maybe Int
includedAllocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZones:OrderableReplicationInstance' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:maxAllocatedStorage:OrderableReplicationInstance' :: Maybe Int
maxAllocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationInstanceClass:OrderableReplicationInstance' :: Maybe Text
replicationInstanceClass = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultAllocatedStorage:OrderableReplicationInstance' :: Maybe Int
defaultAllocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:storageType:OrderableReplicationInstance' :: Maybe Text
storageType = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The minimum amount of storage (in gigabytes) that can be allocated for
-- the replication instance.
orderableReplicationInstance_minAllocatedStorage :: Lens.Lens' OrderableReplicationInstance (Prelude.Maybe Prelude.Int)
orderableReplicationInstance_minAllocatedStorage :: (Maybe Int -> f (Maybe Int))
-> OrderableReplicationInstance -> f OrderableReplicationInstance
orderableReplicationInstance_minAllocatedStorage = (OrderableReplicationInstance -> Maybe Int)
-> (OrderableReplicationInstance
    -> Maybe Int -> OrderableReplicationInstance)
-> Lens
     OrderableReplicationInstance
     OrderableReplicationInstance
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableReplicationInstance' {Maybe Int
minAllocatedStorage :: Maybe Int
$sel:minAllocatedStorage:OrderableReplicationInstance' :: OrderableReplicationInstance -> Maybe Int
minAllocatedStorage} -> Maybe Int
minAllocatedStorage) (\s :: OrderableReplicationInstance
s@OrderableReplicationInstance' {} Maybe Int
a -> OrderableReplicationInstance
s {$sel:minAllocatedStorage:OrderableReplicationInstance' :: Maybe Int
minAllocatedStorage = Maybe Int
a} :: OrderableReplicationInstance)

-- | The value returned when the specified @EngineVersion@ of the replication
-- instance is in Beta or test mode. This indicates some features might not
-- work as expected.
--
-- DMS supports the @ReleaseStatus@ parameter in versions 3.1.4 and later.
orderableReplicationInstance_releaseStatus :: Lens.Lens' OrderableReplicationInstance (Prelude.Maybe ReleaseStatusValues)
orderableReplicationInstance_releaseStatus :: (Maybe ReleaseStatusValues -> f (Maybe ReleaseStatusValues))
-> OrderableReplicationInstance -> f OrderableReplicationInstance
orderableReplicationInstance_releaseStatus = (OrderableReplicationInstance -> Maybe ReleaseStatusValues)
-> (OrderableReplicationInstance
    -> Maybe ReleaseStatusValues -> OrderableReplicationInstance)
-> Lens
     OrderableReplicationInstance
     OrderableReplicationInstance
     (Maybe ReleaseStatusValues)
     (Maybe ReleaseStatusValues)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableReplicationInstance' {Maybe ReleaseStatusValues
releaseStatus :: Maybe ReleaseStatusValues
$sel:releaseStatus:OrderableReplicationInstance' :: OrderableReplicationInstance -> Maybe ReleaseStatusValues
releaseStatus} -> Maybe ReleaseStatusValues
releaseStatus) (\s :: OrderableReplicationInstance
s@OrderableReplicationInstance' {} Maybe ReleaseStatusValues
a -> OrderableReplicationInstance
s {$sel:releaseStatus:OrderableReplicationInstance' :: Maybe ReleaseStatusValues
releaseStatus = Maybe ReleaseStatusValues
a} :: OrderableReplicationInstance)

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

-- | List of Availability Zones for this replication instance.
orderableReplicationInstance_availabilityZones :: Lens.Lens' OrderableReplicationInstance (Prelude.Maybe [Prelude.Text])
orderableReplicationInstance_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> OrderableReplicationInstance -> f OrderableReplicationInstance
orderableReplicationInstance_availabilityZones = (OrderableReplicationInstance -> Maybe [Text])
-> (OrderableReplicationInstance
    -> Maybe [Text] -> OrderableReplicationInstance)
-> Lens
     OrderableReplicationInstance
     OrderableReplicationInstance
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableReplicationInstance' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:OrderableReplicationInstance' :: OrderableReplicationInstance -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: OrderableReplicationInstance
s@OrderableReplicationInstance' {} Maybe [Text]
a -> OrderableReplicationInstance
s {$sel:availabilityZones:OrderableReplicationInstance' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: OrderableReplicationInstance) ((Maybe [Text] -> f (Maybe [Text]))
 -> OrderableReplicationInstance -> f OrderableReplicationInstance)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> OrderableReplicationInstance
-> f OrderableReplicationInstance
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

-- | The minimum amount of storage (in gigabytes) that can be allocated for
-- the replication instance.
orderableReplicationInstance_maxAllocatedStorage :: Lens.Lens' OrderableReplicationInstance (Prelude.Maybe Prelude.Int)
orderableReplicationInstance_maxAllocatedStorage :: (Maybe Int -> f (Maybe Int))
-> OrderableReplicationInstance -> f OrderableReplicationInstance
orderableReplicationInstance_maxAllocatedStorage = (OrderableReplicationInstance -> Maybe Int)
-> (OrderableReplicationInstance
    -> Maybe Int -> OrderableReplicationInstance)
-> Lens
     OrderableReplicationInstance
     OrderableReplicationInstance
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableReplicationInstance' {Maybe Int
maxAllocatedStorage :: Maybe Int
$sel:maxAllocatedStorage:OrderableReplicationInstance' :: OrderableReplicationInstance -> Maybe Int
maxAllocatedStorage} -> Maybe Int
maxAllocatedStorage) (\s :: OrderableReplicationInstance
s@OrderableReplicationInstance' {} Maybe Int
a -> OrderableReplicationInstance
s {$sel:maxAllocatedStorage:OrderableReplicationInstance' :: Maybe Int
maxAllocatedStorage = Maybe Int
a} :: OrderableReplicationInstance)

-- | 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>.
orderableReplicationInstance_replicationInstanceClass :: Lens.Lens' OrderableReplicationInstance (Prelude.Maybe Prelude.Text)
orderableReplicationInstance_replicationInstanceClass :: (Maybe Text -> f (Maybe Text))
-> OrderableReplicationInstance -> f OrderableReplicationInstance
orderableReplicationInstance_replicationInstanceClass = (OrderableReplicationInstance -> Maybe Text)
-> (OrderableReplicationInstance
    -> Maybe Text -> OrderableReplicationInstance)
-> Lens
     OrderableReplicationInstance
     OrderableReplicationInstance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableReplicationInstance' {Maybe Text
replicationInstanceClass :: Maybe Text
$sel:replicationInstanceClass:OrderableReplicationInstance' :: OrderableReplicationInstance -> Maybe Text
replicationInstanceClass} -> Maybe Text
replicationInstanceClass) (\s :: OrderableReplicationInstance
s@OrderableReplicationInstance' {} Maybe Text
a -> OrderableReplicationInstance
s {$sel:replicationInstanceClass:OrderableReplicationInstance' :: Maybe Text
replicationInstanceClass = Maybe Text
a} :: OrderableReplicationInstance)

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

-- | The type of storage used by the replication instance.
orderableReplicationInstance_storageType :: Lens.Lens' OrderableReplicationInstance (Prelude.Maybe Prelude.Text)
orderableReplicationInstance_storageType :: (Maybe Text -> f (Maybe Text))
-> OrderableReplicationInstance -> f OrderableReplicationInstance
orderableReplicationInstance_storageType = (OrderableReplicationInstance -> Maybe Text)
-> (OrderableReplicationInstance
    -> Maybe Text -> OrderableReplicationInstance)
-> Lens
     OrderableReplicationInstance
     OrderableReplicationInstance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrderableReplicationInstance' {Maybe Text
storageType :: Maybe Text
$sel:storageType:OrderableReplicationInstance' :: OrderableReplicationInstance -> Maybe Text
storageType} -> Maybe Text
storageType) (\s :: OrderableReplicationInstance
s@OrderableReplicationInstance' {} Maybe Text
a -> OrderableReplicationInstance
s {$sel:storageType:OrderableReplicationInstance' :: Maybe Text
storageType = Maybe Text
a} :: OrderableReplicationInstance)

instance Core.FromJSON OrderableReplicationInstance where
  parseJSON :: Value -> Parser OrderableReplicationInstance
parseJSON =
    String
-> (Object -> Parser OrderableReplicationInstance)
-> Value
-> Parser OrderableReplicationInstance
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"OrderableReplicationInstance"
      ( \Object
x ->
          Maybe Text
-> Maybe Int
-> Maybe ReleaseStatusValues
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> OrderableReplicationInstance
OrderableReplicationInstance'
            (Maybe Text
 -> Maybe Int
 -> Maybe ReleaseStatusValues
 -> Maybe Int
 -> Maybe [Text]
 -> Maybe Int
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> OrderableReplicationInstance)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe ReleaseStatusValues
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> OrderableReplicationInstance)
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 Int
   -> Maybe ReleaseStatusValues
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> OrderableReplicationInstance)
-> Parser (Maybe Int)
-> Parser
     (Maybe ReleaseStatusValues
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> OrderableReplicationInstance)
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
"MinAllocatedStorage")
            Parser
  (Maybe ReleaseStatusValues
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> OrderableReplicationInstance)
-> Parser (Maybe ReleaseStatusValues)
-> Parser
     (Maybe Int
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> OrderableReplicationInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReleaseStatusValues)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReleaseStatus")
            Parser
  (Maybe Int
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> OrderableReplicationInstance)
-> Parser (Maybe Int)
-> Parser
     (Maybe [Text]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> OrderableReplicationInstance)
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
"IncludedAllocatedStorage")
            Parser
  (Maybe [Text]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> OrderableReplicationInstance)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> OrderableReplicationInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AvailabilityZones"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> OrderableReplicationInstance)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Int -> Maybe Text -> OrderableReplicationInstance)
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
"MaxAllocatedStorage")
            Parser
  (Maybe Text
   -> Maybe Int -> Maybe Text -> OrderableReplicationInstance)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe Text -> OrderableReplicationInstance)
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")
            Parser (Maybe Int -> Maybe Text -> OrderableReplicationInstance)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> OrderableReplicationInstance)
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
"DefaultAllocatedStorage")
            Parser (Maybe Text -> OrderableReplicationInstance)
-> Parser (Maybe Text) -> Parser OrderableReplicationInstance
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
"StorageType")
      )

instance
  Prelude.Hashable
    OrderableReplicationInstance

instance Prelude.NFData OrderableReplicationInstance