{-# 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 #-}
module Amazonka.OpenSearch.Types.ClusterConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.OpenSearch.Types.ColdStorageOptions
import Amazonka.OpenSearch.Types.OpenSearchPartitionInstanceType
import Amazonka.OpenSearch.Types.OpenSearchWarmPartitionInstanceType
import Amazonka.OpenSearch.Types.ZoneAwarenessConfig
import qualified Amazonka.Prelude as Prelude
data ClusterConfig = ClusterConfig'
{
ClusterConfig -> Maybe ColdStorageOptions
coldStorageOptions :: Prelude.Maybe ColdStorageOptions,
ClusterConfig -> Maybe Int
dedicatedMasterCount :: Prelude.Maybe Prelude.Int,
ClusterConfig -> Maybe Bool
dedicatedMasterEnabled :: Prelude.Maybe Prelude.Bool,
ClusterConfig -> Maybe OpenSearchPartitionInstanceType
dedicatedMasterType :: Prelude.Maybe OpenSearchPartitionInstanceType,
ClusterConfig -> Maybe Int
instanceCount :: Prelude.Maybe Prelude.Int,
ClusterConfig -> Maybe OpenSearchPartitionInstanceType
instanceType :: Prelude.Maybe OpenSearchPartitionInstanceType,
ClusterConfig -> Maybe Int
warmCount :: Prelude.Maybe Prelude.Int,
ClusterConfig -> Maybe Bool
warmEnabled :: Prelude.Maybe Prelude.Bool,
ClusterConfig -> Maybe OpenSearchWarmPartitionInstanceType
warmType :: Prelude.Maybe OpenSearchWarmPartitionInstanceType,
ClusterConfig -> Maybe ZoneAwarenessConfig
zoneAwarenessConfig :: Prelude.Maybe ZoneAwarenessConfig,
ClusterConfig -> Maybe Bool
zoneAwarenessEnabled :: Prelude.Maybe Prelude.Bool
}
deriving (ClusterConfig -> ClusterConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterConfig -> ClusterConfig -> Bool
$c/= :: ClusterConfig -> ClusterConfig -> Bool
== :: ClusterConfig -> ClusterConfig -> Bool
$c== :: ClusterConfig -> ClusterConfig -> Bool
Prelude.Eq, ReadPrec [ClusterConfig]
ReadPrec ClusterConfig
Int -> ReadS ClusterConfig
ReadS [ClusterConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterConfig]
$creadListPrec :: ReadPrec [ClusterConfig]
readPrec :: ReadPrec ClusterConfig
$creadPrec :: ReadPrec ClusterConfig
readList :: ReadS [ClusterConfig]
$creadList :: ReadS [ClusterConfig]
readsPrec :: Int -> ReadS ClusterConfig
$creadsPrec :: Int -> ReadS ClusterConfig
Prelude.Read, Int -> ClusterConfig -> ShowS
[ClusterConfig] -> ShowS
ClusterConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterConfig] -> ShowS
$cshowList :: [ClusterConfig] -> ShowS
show :: ClusterConfig -> String
$cshow :: ClusterConfig -> String
showsPrec :: Int -> ClusterConfig -> ShowS
$cshowsPrec :: Int -> ClusterConfig -> ShowS
Prelude.Show, forall x. Rep ClusterConfig x -> ClusterConfig
forall x. ClusterConfig -> Rep ClusterConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterConfig x -> ClusterConfig
$cfrom :: forall x. ClusterConfig -> Rep ClusterConfig x
Prelude.Generic)
newClusterConfig ::
ClusterConfig
newClusterConfig :: ClusterConfig
newClusterConfig =
ClusterConfig'
{ $sel:coldStorageOptions:ClusterConfig' :: Maybe ColdStorageOptions
coldStorageOptions =
forall a. Maybe a
Prelude.Nothing,
$sel:dedicatedMasterCount:ClusterConfig' :: Maybe Int
dedicatedMasterCount = forall a. Maybe a
Prelude.Nothing,
$sel:dedicatedMasterEnabled:ClusterConfig' :: Maybe Bool
dedicatedMasterEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:dedicatedMasterType:ClusterConfig' :: Maybe OpenSearchPartitionInstanceType
dedicatedMasterType = forall a. Maybe a
Prelude.Nothing,
$sel:instanceCount:ClusterConfig' :: Maybe Int
instanceCount = forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:ClusterConfig' :: Maybe OpenSearchPartitionInstanceType
instanceType = forall a. Maybe a
Prelude.Nothing,
$sel:warmCount:ClusterConfig' :: Maybe Int
warmCount = forall a. Maybe a
Prelude.Nothing,
$sel:warmEnabled:ClusterConfig' :: Maybe Bool
warmEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:warmType:ClusterConfig' :: Maybe OpenSearchWarmPartitionInstanceType
warmType = forall a. Maybe a
Prelude.Nothing,
$sel:zoneAwarenessConfig:ClusterConfig' :: Maybe ZoneAwarenessConfig
zoneAwarenessConfig = forall a. Maybe a
Prelude.Nothing,
$sel:zoneAwarenessEnabled:ClusterConfig' :: Maybe Bool
zoneAwarenessEnabled = forall a. Maybe a
Prelude.Nothing
}
clusterConfig_coldStorageOptions :: Lens.Lens' ClusterConfig (Prelude.Maybe ColdStorageOptions)
clusterConfig_coldStorageOptions :: Lens' ClusterConfig (Maybe ColdStorageOptions)
clusterConfig_coldStorageOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe ColdStorageOptions
coldStorageOptions :: Maybe ColdStorageOptions
$sel:coldStorageOptions:ClusterConfig' :: ClusterConfig -> Maybe ColdStorageOptions
coldStorageOptions} -> Maybe ColdStorageOptions
coldStorageOptions) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe ColdStorageOptions
a -> ClusterConfig
s {$sel:coldStorageOptions:ClusterConfig' :: Maybe ColdStorageOptions
coldStorageOptions = Maybe ColdStorageOptions
a} :: ClusterConfig)
clusterConfig_dedicatedMasterCount :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Int)
clusterConfig_dedicatedMasterCount :: Lens' ClusterConfig (Maybe Int)
clusterConfig_dedicatedMasterCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe Int
dedicatedMasterCount :: Maybe Int
$sel:dedicatedMasterCount:ClusterConfig' :: ClusterConfig -> Maybe Int
dedicatedMasterCount} -> Maybe Int
dedicatedMasterCount) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe Int
a -> ClusterConfig
s {$sel:dedicatedMasterCount:ClusterConfig' :: Maybe Int
dedicatedMasterCount = Maybe Int
a} :: ClusterConfig)
clusterConfig_dedicatedMasterEnabled :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Bool)
clusterConfig_dedicatedMasterEnabled :: Lens' ClusterConfig (Maybe Bool)
clusterConfig_dedicatedMasterEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe Bool
dedicatedMasterEnabled :: Maybe Bool
$sel:dedicatedMasterEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
dedicatedMasterEnabled} -> Maybe Bool
dedicatedMasterEnabled) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe Bool
a -> ClusterConfig
s {$sel:dedicatedMasterEnabled:ClusterConfig' :: Maybe Bool
dedicatedMasterEnabled = Maybe Bool
a} :: ClusterConfig)
clusterConfig_dedicatedMasterType :: Lens.Lens' ClusterConfig (Prelude.Maybe OpenSearchPartitionInstanceType)
clusterConfig_dedicatedMasterType :: Lens' ClusterConfig (Maybe OpenSearchPartitionInstanceType)
clusterConfig_dedicatedMasterType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe OpenSearchPartitionInstanceType
dedicatedMasterType :: Maybe OpenSearchPartitionInstanceType
$sel:dedicatedMasterType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
dedicatedMasterType} -> Maybe OpenSearchPartitionInstanceType
dedicatedMasterType) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe OpenSearchPartitionInstanceType
a -> ClusterConfig
s {$sel:dedicatedMasterType:ClusterConfig' :: Maybe OpenSearchPartitionInstanceType
dedicatedMasterType = Maybe OpenSearchPartitionInstanceType
a} :: ClusterConfig)
clusterConfig_instanceCount :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Int)
clusterConfig_instanceCount :: Lens' ClusterConfig (Maybe Int)
clusterConfig_instanceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe Int
instanceCount :: Maybe Int
$sel:instanceCount:ClusterConfig' :: ClusterConfig -> Maybe Int
instanceCount} -> Maybe Int
instanceCount) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe Int
a -> ClusterConfig
s {$sel:instanceCount:ClusterConfig' :: Maybe Int
instanceCount = Maybe Int
a} :: ClusterConfig)
clusterConfig_instanceType :: Lens.Lens' ClusterConfig (Prelude.Maybe OpenSearchPartitionInstanceType)
clusterConfig_instanceType :: Lens' ClusterConfig (Maybe OpenSearchPartitionInstanceType)
clusterConfig_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe OpenSearchPartitionInstanceType
instanceType :: Maybe OpenSearchPartitionInstanceType
$sel:instanceType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
instanceType} -> Maybe OpenSearchPartitionInstanceType
instanceType) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe OpenSearchPartitionInstanceType
a -> ClusterConfig
s {$sel:instanceType:ClusterConfig' :: Maybe OpenSearchPartitionInstanceType
instanceType = Maybe OpenSearchPartitionInstanceType
a} :: ClusterConfig)
clusterConfig_warmCount :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Int)
clusterConfig_warmCount :: Lens' ClusterConfig (Maybe Int)
clusterConfig_warmCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe Int
warmCount :: Maybe Int
$sel:warmCount:ClusterConfig' :: ClusterConfig -> Maybe Int
warmCount} -> Maybe Int
warmCount) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe Int
a -> ClusterConfig
s {$sel:warmCount:ClusterConfig' :: Maybe Int
warmCount = Maybe Int
a} :: ClusterConfig)
clusterConfig_warmEnabled :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Bool)
clusterConfig_warmEnabled :: Lens' ClusterConfig (Maybe Bool)
clusterConfig_warmEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe Bool
warmEnabled :: Maybe Bool
$sel:warmEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
warmEnabled} -> Maybe Bool
warmEnabled) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe Bool
a -> ClusterConfig
s {$sel:warmEnabled:ClusterConfig' :: Maybe Bool
warmEnabled = Maybe Bool
a} :: ClusterConfig)
clusterConfig_warmType :: Lens.Lens' ClusterConfig (Prelude.Maybe OpenSearchWarmPartitionInstanceType)
clusterConfig_warmType :: Lens' ClusterConfig (Maybe OpenSearchWarmPartitionInstanceType)
clusterConfig_warmType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe OpenSearchWarmPartitionInstanceType
warmType :: Maybe OpenSearchWarmPartitionInstanceType
$sel:warmType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchWarmPartitionInstanceType
warmType} -> Maybe OpenSearchWarmPartitionInstanceType
warmType) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe OpenSearchWarmPartitionInstanceType
a -> ClusterConfig
s {$sel:warmType:ClusterConfig' :: Maybe OpenSearchWarmPartitionInstanceType
warmType = Maybe OpenSearchWarmPartitionInstanceType
a} :: ClusterConfig)
clusterConfig_zoneAwarenessConfig :: Lens.Lens' ClusterConfig (Prelude.Maybe ZoneAwarenessConfig)
clusterConfig_zoneAwarenessConfig :: Lens' ClusterConfig (Maybe ZoneAwarenessConfig)
clusterConfig_zoneAwarenessConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe ZoneAwarenessConfig
zoneAwarenessConfig :: Maybe ZoneAwarenessConfig
$sel:zoneAwarenessConfig:ClusterConfig' :: ClusterConfig -> Maybe ZoneAwarenessConfig
zoneAwarenessConfig} -> Maybe ZoneAwarenessConfig
zoneAwarenessConfig) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe ZoneAwarenessConfig
a -> ClusterConfig
s {$sel:zoneAwarenessConfig:ClusterConfig' :: Maybe ZoneAwarenessConfig
zoneAwarenessConfig = Maybe ZoneAwarenessConfig
a} :: ClusterConfig)
clusterConfig_zoneAwarenessEnabled :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Bool)
clusterConfig_zoneAwarenessEnabled :: Lens' ClusterConfig (Maybe Bool)
clusterConfig_zoneAwarenessEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterConfig' {Maybe Bool
zoneAwarenessEnabled :: Maybe Bool
$sel:zoneAwarenessEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
zoneAwarenessEnabled} -> Maybe Bool
zoneAwarenessEnabled) (\s :: ClusterConfig
s@ClusterConfig' {} Maybe Bool
a -> ClusterConfig
s {$sel:zoneAwarenessEnabled:ClusterConfig' :: Maybe Bool
zoneAwarenessEnabled = Maybe Bool
a} :: ClusterConfig)
instance Data.FromJSON ClusterConfig where
parseJSON :: Value -> Parser ClusterConfig
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ClusterConfig"
( \Object
x ->
Maybe ColdStorageOptions
-> Maybe Int
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Int
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Int
-> Maybe Bool
-> Maybe OpenSearchWarmPartitionInstanceType
-> Maybe ZoneAwarenessConfig
-> Maybe Bool
-> ClusterConfig
ClusterConfig'
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
"ColdStorageOptions")
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
"DedicatedMasterCount")
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
"DedicatedMasterEnabled")
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
"DedicatedMasterType")
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
"InstanceCount")
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
"InstanceType")
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
"WarmCount")
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
"WarmEnabled")
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
"WarmType")
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
"ZoneAwarenessConfig")
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
"ZoneAwarenessEnabled")
)
instance Prelude.Hashable ClusterConfig where
hashWithSalt :: Int -> ClusterConfig -> Int
hashWithSalt Int
_salt ClusterConfig' {Maybe Bool
Maybe Int
Maybe ColdStorageOptions
Maybe OpenSearchPartitionInstanceType
Maybe OpenSearchWarmPartitionInstanceType
Maybe ZoneAwarenessConfig
zoneAwarenessEnabled :: Maybe Bool
zoneAwarenessConfig :: Maybe ZoneAwarenessConfig
warmType :: Maybe OpenSearchWarmPartitionInstanceType
warmEnabled :: Maybe Bool
warmCount :: Maybe Int
instanceType :: Maybe OpenSearchPartitionInstanceType
instanceCount :: Maybe Int
dedicatedMasterType :: Maybe OpenSearchPartitionInstanceType
dedicatedMasterEnabled :: Maybe Bool
dedicatedMasterCount :: Maybe Int
coldStorageOptions :: Maybe ColdStorageOptions
$sel:zoneAwarenessEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:zoneAwarenessConfig:ClusterConfig' :: ClusterConfig -> Maybe ZoneAwarenessConfig
$sel:warmType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchWarmPartitionInstanceType
$sel:warmEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:warmCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:instanceType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
$sel:instanceCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:dedicatedMasterType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
$sel:dedicatedMasterEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:dedicatedMasterCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:coldStorageOptions:ClusterConfig' :: ClusterConfig -> Maybe ColdStorageOptions
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ColdStorageOptions
coldStorageOptions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
dedicatedMasterCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dedicatedMasterEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OpenSearchPartitionInstanceType
dedicatedMasterType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
instanceCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OpenSearchPartitionInstanceType
instanceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
warmCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
warmEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OpenSearchWarmPartitionInstanceType
warmType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ZoneAwarenessConfig
zoneAwarenessConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
zoneAwarenessEnabled
instance Prelude.NFData ClusterConfig where
rnf :: ClusterConfig -> ()
rnf ClusterConfig' {Maybe Bool
Maybe Int
Maybe ColdStorageOptions
Maybe OpenSearchPartitionInstanceType
Maybe OpenSearchWarmPartitionInstanceType
Maybe ZoneAwarenessConfig
zoneAwarenessEnabled :: Maybe Bool
zoneAwarenessConfig :: Maybe ZoneAwarenessConfig
warmType :: Maybe OpenSearchWarmPartitionInstanceType
warmEnabled :: Maybe Bool
warmCount :: Maybe Int
instanceType :: Maybe OpenSearchPartitionInstanceType
instanceCount :: Maybe Int
dedicatedMasterType :: Maybe OpenSearchPartitionInstanceType
dedicatedMasterEnabled :: Maybe Bool
dedicatedMasterCount :: Maybe Int
coldStorageOptions :: Maybe ColdStorageOptions
$sel:zoneAwarenessEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:zoneAwarenessConfig:ClusterConfig' :: ClusterConfig -> Maybe ZoneAwarenessConfig
$sel:warmType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchWarmPartitionInstanceType
$sel:warmEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:warmCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:instanceType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
$sel:instanceCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:dedicatedMasterType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
$sel:dedicatedMasterEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:dedicatedMasterCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:coldStorageOptions:ClusterConfig' :: ClusterConfig -> Maybe ColdStorageOptions
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ColdStorageOptions
coldStorageOptions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
dedicatedMasterCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dedicatedMasterEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OpenSearchPartitionInstanceType
dedicatedMasterType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
instanceCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OpenSearchPartitionInstanceType
instanceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
warmCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
warmEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OpenSearchWarmPartitionInstanceType
warmType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ZoneAwarenessConfig
zoneAwarenessConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
zoneAwarenessEnabled
instance Data.ToJSON ClusterConfig where
toJSON :: ClusterConfig -> Value
toJSON ClusterConfig' {Maybe Bool
Maybe Int
Maybe ColdStorageOptions
Maybe OpenSearchPartitionInstanceType
Maybe OpenSearchWarmPartitionInstanceType
Maybe ZoneAwarenessConfig
zoneAwarenessEnabled :: Maybe Bool
zoneAwarenessConfig :: Maybe ZoneAwarenessConfig
warmType :: Maybe OpenSearchWarmPartitionInstanceType
warmEnabled :: Maybe Bool
warmCount :: Maybe Int
instanceType :: Maybe OpenSearchPartitionInstanceType
instanceCount :: Maybe Int
dedicatedMasterType :: Maybe OpenSearchPartitionInstanceType
dedicatedMasterEnabled :: Maybe Bool
dedicatedMasterCount :: Maybe Int
coldStorageOptions :: Maybe ColdStorageOptions
$sel:zoneAwarenessEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:zoneAwarenessConfig:ClusterConfig' :: ClusterConfig -> Maybe ZoneAwarenessConfig
$sel:warmType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchWarmPartitionInstanceType
$sel:warmEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:warmCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:instanceType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
$sel:instanceCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:dedicatedMasterType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
$sel:dedicatedMasterEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:dedicatedMasterCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:coldStorageOptions:ClusterConfig' :: ClusterConfig -> Maybe ColdStorageOptions
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ColdStorageOptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ColdStorageOptions
coldStorageOptions,
(Key
"DedicatedMasterCount" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
dedicatedMasterCount,
(Key
"DedicatedMasterEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dedicatedMasterEnabled,
(Key
"DedicatedMasterType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpenSearchPartitionInstanceType
dedicatedMasterType,
(Key
"InstanceCount" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
instanceCount,
(Key
"InstanceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpenSearchPartitionInstanceType
instanceType,
(Key
"WarmCount" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
warmCount,
(Key
"WarmEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
warmEnabled,
(Key
"WarmType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpenSearchWarmPartitionInstanceType
warmType,
(Key
"ZoneAwarenessConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ZoneAwarenessConfig
zoneAwarenessConfig,
(Key
"ZoneAwarenessEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
zoneAwarenessEnabled
]
)