{-# 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.MemoryDb.Types.ClusterConfiguration
-- 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.MemoryDb.Types.ClusterConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MemoryDb.Types.ShardDetail
import qualified Amazonka.Prelude as Prelude

-- | A list of cluster configuration options.
--
-- /See:/ 'newClusterConfiguration' smart constructor.
data ClusterConfiguration = ClusterConfiguration'
  { -- | The description of the cluster configuration
    ClusterConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Redis engine version used by the cluster
    ClusterConfiguration -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The specified maintenance window for the cluster
    ClusterConfiguration -> Maybe Text
maintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The name of the cluster
    ClusterConfiguration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The node type used for the cluster
    ClusterConfiguration -> Maybe Text
nodeType :: Prelude.Maybe Prelude.Text,
    -- | The number of shards in the cluster
    ClusterConfiguration -> Maybe Int
numShards :: Prelude.Maybe Prelude.Int,
    -- | The name of parameter group used by the cluster
    ClusterConfiguration -> Maybe Text
parameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | The port used by the cluster
    ClusterConfiguration -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | The list of shards in the cluster
    ClusterConfiguration -> Maybe [ShardDetail]
shards :: Prelude.Maybe [ShardDetail],
    -- | The snapshot retention limit set by the cluster
    ClusterConfiguration -> Maybe Int
snapshotRetentionLimit :: Prelude.Maybe Prelude.Int,
    -- | The snapshot window set by the cluster
    ClusterConfiguration -> Maybe Text
snapshotWindow :: Prelude.Maybe Prelude.Text,
    -- | The name of the subnet group used by the cluster
    ClusterConfiguration -> Maybe Text
subnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the SNS notification topic for the
    -- cluster
    ClusterConfiguration -> Maybe Text
topicArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the VPC the cluster belongs to
    ClusterConfiguration -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
  }
  deriving (ClusterConfiguration -> ClusterConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterConfiguration -> ClusterConfiguration -> Bool
$c/= :: ClusterConfiguration -> ClusterConfiguration -> Bool
== :: ClusterConfiguration -> ClusterConfiguration -> Bool
$c== :: ClusterConfiguration -> ClusterConfiguration -> Bool
Prelude.Eq, ReadPrec [ClusterConfiguration]
ReadPrec ClusterConfiguration
Int -> ReadS ClusterConfiguration
ReadS [ClusterConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterConfiguration]
$creadListPrec :: ReadPrec [ClusterConfiguration]
readPrec :: ReadPrec ClusterConfiguration
$creadPrec :: ReadPrec ClusterConfiguration
readList :: ReadS [ClusterConfiguration]
$creadList :: ReadS [ClusterConfiguration]
readsPrec :: Int -> ReadS ClusterConfiguration
$creadsPrec :: Int -> ReadS ClusterConfiguration
Prelude.Read, Int -> ClusterConfiguration -> ShowS
[ClusterConfiguration] -> ShowS
ClusterConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterConfiguration] -> ShowS
$cshowList :: [ClusterConfiguration] -> ShowS
show :: ClusterConfiguration -> String
$cshow :: ClusterConfiguration -> String
showsPrec :: Int -> ClusterConfiguration -> ShowS
$cshowsPrec :: Int -> ClusterConfiguration -> ShowS
Prelude.Show, forall x. Rep ClusterConfiguration x -> ClusterConfiguration
forall x. ClusterConfiguration -> Rep ClusterConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterConfiguration x -> ClusterConfiguration
$cfrom :: forall x. ClusterConfiguration -> Rep ClusterConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'ClusterConfiguration' 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:
--
-- 'description', 'clusterConfiguration_description' - The description of the cluster configuration
--
-- 'engineVersion', 'clusterConfiguration_engineVersion' - The Redis engine version used by the cluster
--
-- 'maintenanceWindow', 'clusterConfiguration_maintenanceWindow' - The specified maintenance window for the cluster
--
-- 'name', 'clusterConfiguration_name' - The name of the cluster
--
-- 'nodeType', 'clusterConfiguration_nodeType' - The node type used for the cluster
--
-- 'numShards', 'clusterConfiguration_numShards' - The number of shards in the cluster
--
-- 'parameterGroupName', 'clusterConfiguration_parameterGroupName' - The name of parameter group used by the cluster
--
-- 'port', 'clusterConfiguration_port' - The port used by the cluster
--
-- 'shards', 'clusterConfiguration_shards' - The list of shards in the cluster
--
-- 'snapshotRetentionLimit', 'clusterConfiguration_snapshotRetentionLimit' - The snapshot retention limit set by the cluster
--
-- 'snapshotWindow', 'clusterConfiguration_snapshotWindow' - The snapshot window set by the cluster
--
-- 'subnetGroupName', 'clusterConfiguration_subnetGroupName' - The name of the subnet group used by the cluster
--
-- 'topicArn', 'clusterConfiguration_topicArn' - The Amazon Resource Name (ARN) of the SNS notification topic for the
-- cluster
--
-- 'vpcId', 'clusterConfiguration_vpcId' - The ID of the VPC the cluster belongs to
newClusterConfiguration ::
  ClusterConfiguration
newClusterConfiguration :: ClusterConfiguration
newClusterConfiguration =
  ClusterConfiguration'
    { $sel:description:ClusterConfiguration' :: Maybe Text
description =
        forall a. Maybe a
Prelude.Nothing,
      $sel:engineVersion:ClusterConfiguration' :: Maybe Text
engineVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:maintenanceWindow:ClusterConfiguration' :: Maybe Text
maintenanceWindow = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ClusterConfiguration' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:nodeType:ClusterConfiguration' :: Maybe Text
nodeType = forall a. Maybe a
Prelude.Nothing,
      $sel:numShards:ClusterConfiguration' :: Maybe Int
numShards = forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroupName:ClusterConfiguration' :: Maybe Text
parameterGroupName = forall a. Maybe a
Prelude.Nothing,
      $sel:port:ClusterConfiguration' :: Maybe Int
port = forall a. Maybe a
Prelude.Nothing,
      $sel:shards:ClusterConfiguration' :: Maybe [ShardDetail]
shards = forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotRetentionLimit:ClusterConfiguration' :: Maybe Int
snapshotRetentionLimit = forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotWindow:ClusterConfiguration' :: Maybe Text
snapshotWindow = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetGroupName:ClusterConfiguration' :: Maybe Text
subnetGroupName = forall a. Maybe a
Prelude.Nothing,
      $sel:topicArn:ClusterConfiguration' :: Maybe Text
topicArn = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:ClusterConfiguration' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing
    }

-- | The description of the cluster configuration
clusterConfiguration_description :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_description :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:description:ClusterConfiguration' :: Maybe Text
description = Maybe Text
a} :: ClusterConfiguration)

-- | The Redis engine version used by the cluster
clusterConfiguration_engineVersion :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_engineVersion :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_engineVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:engineVersion:ClusterConfiguration' :: Maybe Text
engineVersion = Maybe Text
a} :: ClusterConfiguration)

-- | The specified maintenance window for the cluster
clusterConfiguration_maintenanceWindow :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_maintenanceWindow :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_maintenanceWindow = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
maintenanceWindow :: Maybe Text
$sel:maintenanceWindow:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
maintenanceWindow} -> Maybe Text
maintenanceWindow) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:maintenanceWindow:ClusterConfiguration' :: Maybe Text
maintenanceWindow = Maybe Text
a} :: ClusterConfiguration)

-- | The name of the cluster
clusterConfiguration_name :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_name :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
name :: Maybe Text
$sel:name:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
name} -> Maybe Text
name) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:name:ClusterConfiguration' :: Maybe Text
name = Maybe Text
a} :: ClusterConfiguration)

-- | The node type used for the cluster
clusterConfiguration_nodeType :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_nodeType :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_nodeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
nodeType :: Maybe Text
$sel:nodeType:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
nodeType} -> Maybe Text
nodeType) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:nodeType:ClusterConfiguration' :: Maybe Text
nodeType = Maybe Text
a} :: ClusterConfiguration)

-- | The number of shards in the cluster
clusterConfiguration_numShards :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Int)
clusterConfiguration_numShards :: Lens' ClusterConfiguration (Maybe Int)
clusterConfiguration_numShards = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Int
numShards :: Maybe Int
$sel:numShards:ClusterConfiguration' :: ClusterConfiguration -> Maybe Int
numShards} -> Maybe Int
numShards) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Int
a -> ClusterConfiguration
s {$sel:numShards:ClusterConfiguration' :: Maybe Int
numShards = Maybe Int
a} :: ClusterConfiguration)

-- | The name of parameter group used by the cluster
clusterConfiguration_parameterGroupName :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_parameterGroupName :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_parameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
parameterGroupName :: Maybe Text
$sel:parameterGroupName:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
parameterGroupName} -> Maybe Text
parameterGroupName) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:parameterGroupName:ClusterConfiguration' :: Maybe Text
parameterGroupName = Maybe Text
a} :: ClusterConfiguration)

-- | The port used by the cluster
clusterConfiguration_port :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Int)
clusterConfiguration_port :: Lens' ClusterConfiguration (Maybe Int)
clusterConfiguration_port = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Int
port :: Maybe Int
$sel:port:ClusterConfiguration' :: ClusterConfiguration -> Maybe Int
port} -> Maybe Int
port) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Int
a -> ClusterConfiguration
s {$sel:port:ClusterConfiguration' :: Maybe Int
port = Maybe Int
a} :: ClusterConfiguration)

-- | The list of shards in the cluster
clusterConfiguration_shards :: Lens.Lens' ClusterConfiguration (Prelude.Maybe [ShardDetail])
clusterConfiguration_shards :: Lens' ClusterConfiguration (Maybe [ShardDetail])
clusterConfiguration_shards = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe [ShardDetail]
shards :: Maybe [ShardDetail]
$sel:shards:ClusterConfiguration' :: ClusterConfiguration -> Maybe [ShardDetail]
shards} -> Maybe [ShardDetail]
shards) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe [ShardDetail]
a -> ClusterConfiguration
s {$sel:shards:ClusterConfiguration' :: Maybe [ShardDetail]
shards = Maybe [ShardDetail]
a} :: ClusterConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The snapshot retention limit set by the cluster
clusterConfiguration_snapshotRetentionLimit :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Int)
clusterConfiguration_snapshotRetentionLimit :: Lens' ClusterConfiguration (Maybe Int)
clusterConfiguration_snapshotRetentionLimit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Int
snapshotRetentionLimit :: Maybe Int
$sel:snapshotRetentionLimit:ClusterConfiguration' :: ClusterConfiguration -> Maybe Int
snapshotRetentionLimit} -> Maybe Int
snapshotRetentionLimit) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Int
a -> ClusterConfiguration
s {$sel:snapshotRetentionLimit:ClusterConfiguration' :: Maybe Int
snapshotRetentionLimit = Maybe Int
a} :: ClusterConfiguration)

-- | The snapshot window set by the cluster
clusterConfiguration_snapshotWindow :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_snapshotWindow :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_snapshotWindow = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
snapshotWindow :: Maybe Text
$sel:snapshotWindow:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
snapshotWindow} -> Maybe Text
snapshotWindow) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:snapshotWindow:ClusterConfiguration' :: Maybe Text
snapshotWindow = Maybe Text
a} :: ClusterConfiguration)

-- | The name of the subnet group used by the cluster
clusterConfiguration_subnetGroupName :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_subnetGroupName :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_subnetGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
subnetGroupName :: Maybe Text
$sel:subnetGroupName:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
subnetGroupName} -> Maybe Text
subnetGroupName) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:subnetGroupName:ClusterConfiguration' :: Maybe Text
subnetGroupName = Maybe Text
a} :: ClusterConfiguration)

-- | The Amazon Resource Name (ARN) of the SNS notification topic for the
-- cluster
clusterConfiguration_topicArn :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_topicArn :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_topicArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
topicArn :: Maybe Text
$sel:topicArn:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
topicArn} -> Maybe Text
topicArn) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:topicArn:ClusterConfiguration' :: Maybe Text
topicArn = Maybe Text
a} :: ClusterConfiguration)

-- | The ID of the VPC the cluster belongs to
clusterConfiguration_vpcId :: Lens.Lens' ClusterConfiguration (Prelude.Maybe Prelude.Text)
clusterConfiguration_vpcId :: Lens' ClusterConfiguration (Maybe Text)
clusterConfiguration_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfiguration' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: ClusterConfiguration
s@ClusterConfiguration' {} Maybe Text
a -> ClusterConfiguration
s {$sel:vpcId:ClusterConfiguration' :: Maybe Text
vpcId = Maybe Text
a} :: ClusterConfiguration)

instance Data.FromJSON ClusterConfiguration where
  parseJSON :: Value -> Parser ClusterConfiguration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ClusterConfiguration"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe [ShardDetail]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ClusterConfiguration
ClusterConfiguration'
            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
"Description")
            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
"MaintenanceWindow")
            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
"Name")
            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
"NodeType")
            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
"NumShards")
            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
"ParameterGroupName")
            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
"Port")
            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
"Shards" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"SnapshotRetentionLimit")
            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
"SnapshotWindow")
            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
"SubnetGroupName")
            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
"TopicArn")
            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
"VpcId")
      )

instance Prelude.Hashable ClusterConfiguration where
  hashWithSalt :: Int -> ClusterConfiguration -> Int
hashWithSalt Int
_salt ClusterConfiguration' {Maybe Int
Maybe [ShardDetail]
Maybe Text
vpcId :: Maybe Text
topicArn :: Maybe Text
subnetGroupName :: Maybe Text
snapshotWindow :: Maybe Text
snapshotRetentionLimit :: Maybe Int
shards :: Maybe [ShardDetail]
port :: Maybe Int
parameterGroupName :: Maybe Text
numShards :: Maybe Int
nodeType :: Maybe Text
name :: Maybe Text
maintenanceWindow :: Maybe Text
engineVersion :: Maybe Text
description :: Maybe Text
$sel:vpcId:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:topicArn:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:subnetGroupName:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:snapshotWindow:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:snapshotRetentionLimit:ClusterConfiguration' :: ClusterConfiguration -> Maybe Int
$sel:shards:ClusterConfiguration' :: ClusterConfiguration -> Maybe [ShardDetail]
$sel:port:ClusterConfiguration' :: ClusterConfiguration -> Maybe Int
$sel:parameterGroupName:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:numShards:ClusterConfiguration' :: ClusterConfiguration -> Maybe Int
$sel:nodeType:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:name:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:maintenanceWindow:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:engineVersion:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:description:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engineVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maintenanceWindow
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nodeType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numShards
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parameterGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
port
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ShardDetail]
shards
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
snapshotRetentionLimit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotWindow
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
topicArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId

instance Prelude.NFData ClusterConfiguration where
  rnf :: ClusterConfiguration -> ()
rnf ClusterConfiguration' {Maybe Int
Maybe [ShardDetail]
Maybe Text
vpcId :: Maybe Text
topicArn :: Maybe Text
subnetGroupName :: Maybe Text
snapshotWindow :: Maybe Text
snapshotRetentionLimit :: Maybe Int
shards :: Maybe [ShardDetail]
port :: Maybe Int
parameterGroupName :: Maybe Text
numShards :: Maybe Int
nodeType :: Maybe Text
name :: Maybe Text
maintenanceWindow :: Maybe Text
engineVersion :: Maybe Text
description :: Maybe Text
$sel:vpcId:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:topicArn:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:subnetGroupName:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:snapshotWindow:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:snapshotRetentionLimit:ClusterConfiguration' :: ClusterConfiguration -> Maybe Int
$sel:shards:ClusterConfiguration' :: ClusterConfiguration -> Maybe [ShardDetail]
$sel:port:ClusterConfiguration' :: ClusterConfiguration -> Maybe Int
$sel:parameterGroupName:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:numShards:ClusterConfiguration' :: ClusterConfiguration -> Maybe Int
$sel:nodeType:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:name:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:maintenanceWindow:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:engineVersion:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
$sel:description:ClusterConfiguration' :: ClusterConfiguration -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      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 Text
maintenanceWindow
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nodeType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numShards
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parameterGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ShardDetail]
shards
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
snapshotRetentionLimit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snapshotWindow
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
topicArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId