{-# 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.Lens as Lens
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 Int
dedicatedMasterCount :: Prelude.Maybe Prelude.Int,
ClusterConfig -> Maybe OpenSearchPartitionInstanceType
dedicatedMasterType :: Prelude.Maybe OpenSearchPartitionInstanceType,
ClusterConfig -> Maybe Bool
dedicatedMasterEnabled :: Prelude.Maybe Prelude.Bool,
ClusterConfig -> Maybe Int
instanceCount :: Prelude.Maybe Prelude.Int,
ClusterConfig -> Maybe ColdStorageOptions
coldStorageOptions :: Prelude.Maybe ColdStorageOptions,
ClusterConfig -> Maybe Bool
zoneAwarenessEnabled :: Prelude.Maybe Prelude.Bool,
ClusterConfig -> Maybe OpenSearchPartitionInstanceType
instanceType :: Prelude.Maybe OpenSearchPartitionInstanceType,
ClusterConfig -> Maybe Bool
warmEnabled :: Prelude.Maybe Prelude.Bool,
ClusterConfig -> Maybe ZoneAwarenessConfig
zoneAwarenessConfig :: Prelude.Maybe ZoneAwarenessConfig,
ClusterConfig -> Maybe Int
warmCount :: Prelude.Maybe Prelude.Int,
ClusterConfig -> Maybe OpenSearchWarmPartitionInstanceType
warmType :: Prelude.Maybe OpenSearchWarmPartitionInstanceType
}
deriving (ClusterConfig -> ClusterConfig -> Bool
(ClusterConfig -> ClusterConfig -> Bool)
-> (ClusterConfig -> ClusterConfig -> Bool) -> Eq ClusterConfig
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]
(Int -> ReadS ClusterConfig)
-> ReadS [ClusterConfig]
-> ReadPrec ClusterConfig
-> ReadPrec [ClusterConfig]
-> Read 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
(Int -> ClusterConfig -> ShowS)
-> (ClusterConfig -> String)
-> ([ClusterConfig] -> ShowS)
-> Show ClusterConfig
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. ClusterConfig -> Rep ClusterConfig x)
-> (forall x. Rep ClusterConfig x -> ClusterConfig)
-> Generic ClusterConfig
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' :: Maybe Int
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe Int
-> Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig
ClusterConfig'
{ $sel:dedicatedMasterCount:ClusterConfig' :: Maybe Int
dedicatedMasterCount =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:dedicatedMasterType:ClusterConfig' :: Maybe OpenSearchPartitionInstanceType
dedicatedMasterType = Maybe OpenSearchPartitionInstanceType
forall a. Maybe a
Prelude.Nothing,
$sel:dedicatedMasterEnabled:ClusterConfig' :: Maybe Bool
dedicatedMasterEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:instanceCount:ClusterConfig' :: Maybe Int
instanceCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:coldStorageOptions:ClusterConfig' :: Maybe ColdStorageOptions
coldStorageOptions = Maybe ColdStorageOptions
forall a. Maybe a
Prelude.Nothing,
$sel:zoneAwarenessEnabled:ClusterConfig' :: Maybe Bool
zoneAwarenessEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:ClusterConfig' :: Maybe OpenSearchPartitionInstanceType
instanceType = Maybe OpenSearchPartitionInstanceType
forall a. Maybe a
Prelude.Nothing,
$sel:warmEnabled:ClusterConfig' :: Maybe Bool
warmEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:zoneAwarenessConfig:ClusterConfig' :: Maybe ZoneAwarenessConfig
zoneAwarenessConfig = Maybe ZoneAwarenessConfig
forall a. Maybe a
Prelude.Nothing,
$sel:warmCount:ClusterConfig' :: Maybe Int
warmCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:warmType:ClusterConfig' :: Maybe OpenSearchWarmPartitionInstanceType
warmType = Maybe OpenSearchWarmPartitionInstanceType
forall a. Maybe a
Prelude.Nothing
}
clusterConfig_dedicatedMasterCount :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Int)
clusterConfig_dedicatedMasterCount :: (Maybe Int -> f (Maybe Int)) -> ClusterConfig -> f ClusterConfig
clusterConfig_dedicatedMasterCount = (ClusterConfig -> Maybe Int)
-> (ClusterConfig -> Maybe Int -> ClusterConfig)
-> Lens ClusterConfig ClusterConfig (Maybe Int) (Maybe Int)
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_dedicatedMasterType :: Lens.Lens' ClusterConfig (Prelude.Maybe OpenSearchPartitionInstanceType)
clusterConfig_dedicatedMasterType :: (Maybe OpenSearchPartitionInstanceType
-> f (Maybe OpenSearchPartitionInstanceType))
-> ClusterConfig -> f ClusterConfig
clusterConfig_dedicatedMasterType = (ClusterConfig -> Maybe OpenSearchPartitionInstanceType)
-> (ClusterConfig
-> Maybe OpenSearchPartitionInstanceType -> ClusterConfig)
-> Lens
ClusterConfig
ClusterConfig
(Maybe OpenSearchPartitionInstanceType)
(Maybe OpenSearchPartitionInstanceType)
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_dedicatedMasterEnabled :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Bool)
clusterConfig_dedicatedMasterEnabled :: (Maybe Bool -> f (Maybe Bool)) -> ClusterConfig -> f ClusterConfig
clusterConfig_dedicatedMasterEnabled = (ClusterConfig -> Maybe Bool)
-> (ClusterConfig -> Maybe Bool -> ClusterConfig)
-> Lens ClusterConfig ClusterConfig (Maybe Bool) (Maybe Bool)
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_instanceCount :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Int)
clusterConfig_instanceCount :: (Maybe Int -> f (Maybe Int)) -> ClusterConfig -> f ClusterConfig
clusterConfig_instanceCount = (ClusterConfig -> Maybe Int)
-> (ClusterConfig -> Maybe Int -> ClusterConfig)
-> Lens ClusterConfig ClusterConfig (Maybe Int) (Maybe Int)
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_coldStorageOptions :: Lens.Lens' ClusterConfig (Prelude.Maybe ColdStorageOptions)
clusterConfig_coldStorageOptions :: (Maybe ColdStorageOptions -> f (Maybe ColdStorageOptions))
-> ClusterConfig -> f ClusterConfig
clusterConfig_coldStorageOptions = (ClusterConfig -> Maybe ColdStorageOptions)
-> (ClusterConfig -> Maybe ColdStorageOptions -> ClusterConfig)
-> Lens
ClusterConfig
ClusterConfig
(Maybe ColdStorageOptions)
(Maybe 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_zoneAwarenessEnabled :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Bool)
clusterConfig_zoneAwarenessEnabled :: (Maybe Bool -> f (Maybe Bool)) -> ClusterConfig -> f ClusterConfig
clusterConfig_zoneAwarenessEnabled = (ClusterConfig -> Maybe Bool)
-> (ClusterConfig -> Maybe Bool -> ClusterConfig)
-> Lens ClusterConfig ClusterConfig (Maybe Bool) (Maybe Bool)
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)
clusterConfig_instanceType :: Lens.Lens' ClusterConfig (Prelude.Maybe OpenSearchPartitionInstanceType)
clusterConfig_instanceType :: (Maybe OpenSearchPartitionInstanceType
-> f (Maybe OpenSearchPartitionInstanceType))
-> ClusterConfig -> f ClusterConfig
clusterConfig_instanceType = (ClusterConfig -> Maybe OpenSearchPartitionInstanceType)
-> (ClusterConfig
-> Maybe OpenSearchPartitionInstanceType -> ClusterConfig)
-> Lens
ClusterConfig
ClusterConfig
(Maybe OpenSearchPartitionInstanceType)
(Maybe OpenSearchPartitionInstanceType)
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_warmEnabled :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Bool)
clusterConfig_warmEnabled :: (Maybe Bool -> f (Maybe Bool)) -> ClusterConfig -> f ClusterConfig
clusterConfig_warmEnabled = (ClusterConfig -> Maybe Bool)
-> (ClusterConfig -> Maybe Bool -> ClusterConfig)
-> Lens ClusterConfig ClusterConfig (Maybe Bool) (Maybe Bool)
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_zoneAwarenessConfig :: Lens.Lens' ClusterConfig (Prelude.Maybe ZoneAwarenessConfig)
clusterConfig_zoneAwarenessConfig :: (Maybe ZoneAwarenessConfig -> f (Maybe ZoneAwarenessConfig))
-> ClusterConfig -> f ClusterConfig
clusterConfig_zoneAwarenessConfig = (ClusterConfig -> Maybe ZoneAwarenessConfig)
-> (ClusterConfig -> Maybe ZoneAwarenessConfig -> ClusterConfig)
-> Lens
ClusterConfig
ClusterConfig
(Maybe ZoneAwarenessConfig)
(Maybe 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_warmCount :: Lens.Lens' ClusterConfig (Prelude.Maybe Prelude.Int)
clusterConfig_warmCount :: (Maybe Int -> f (Maybe Int)) -> ClusterConfig -> f ClusterConfig
clusterConfig_warmCount = (ClusterConfig -> Maybe Int)
-> (ClusterConfig -> Maybe Int -> ClusterConfig)
-> Lens ClusterConfig ClusterConfig (Maybe Int) (Maybe Int)
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_warmType :: Lens.Lens' ClusterConfig (Prelude.Maybe OpenSearchWarmPartitionInstanceType)
clusterConfig_warmType :: (Maybe OpenSearchWarmPartitionInstanceType
-> f (Maybe OpenSearchWarmPartitionInstanceType))
-> ClusterConfig -> f ClusterConfig
clusterConfig_warmType = (ClusterConfig -> Maybe OpenSearchWarmPartitionInstanceType)
-> (ClusterConfig
-> Maybe OpenSearchWarmPartitionInstanceType -> ClusterConfig)
-> Lens
ClusterConfig
ClusterConfig
(Maybe OpenSearchWarmPartitionInstanceType)
(Maybe OpenSearchWarmPartitionInstanceType)
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)
instance Core.FromJSON ClusterConfig where
parseJSON :: Value -> Parser ClusterConfig
parseJSON =
String
-> (Object -> Parser ClusterConfig)
-> Value
-> Parser ClusterConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ClusterConfig"
( \Object
x ->
Maybe Int
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe Int
-> Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig
ClusterConfig'
(Maybe Int
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe Int
-> Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
-> Parser (Maybe Int)
-> Parser
(Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe Int
-> Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
forall (f :: * -> *) a b. Functor 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
"DedicatedMasterCount")
Parser
(Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe Int
-> Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
-> Parser (Maybe OpenSearchPartitionInstanceType)
-> Parser
(Maybe Bool
-> Maybe Int
-> Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OpenSearchPartitionInstanceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DedicatedMasterType")
Parser
(Maybe Bool
-> Maybe Int
-> Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
-> Parser (Maybe Bool)
-> Parser
(Maybe Int
-> Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
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
"DedicatedMasterEnabled")
Parser
(Maybe Int
-> Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
-> Parser (Maybe Int)
-> Parser
(Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
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
"InstanceCount")
Parser
(Maybe ColdStorageOptions
-> Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
-> Parser (Maybe ColdStorageOptions)
-> Parser
(Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ColdStorageOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ColdStorageOptions")
Parser
(Maybe Bool
-> Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
-> Parser (Maybe Bool)
-> Parser
(Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
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
"ZoneAwarenessEnabled")
Parser
(Maybe OpenSearchPartitionInstanceType
-> Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
-> Parser (Maybe OpenSearchPartitionInstanceType)
-> Parser
(Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OpenSearchPartitionInstanceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstanceType")
Parser
(Maybe Bool
-> Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
-> Parser (Maybe Bool)
-> Parser
(Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
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
"WarmEnabled")
Parser
(Maybe ZoneAwarenessConfig
-> Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType
-> ClusterConfig)
-> Parser (Maybe ZoneAwarenessConfig)
-> Parser
(Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType -> ClusterConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ZoneAwarenessConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ZoneAwarenessConfig")
Parser
(Maybe Int
-> Maybe OpenSearchWarmPartitionInstanceType -> ClusterConfig)
-> Parser (Maybe Int)
-> Parser
(Maybe OpenSearchWarmPartitionInstanceType -> ClusterConfig)
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
"WarmCount")
Parser (Maybe OpenSearchWarmPartitionInstanceType -> ClusterConfig)
-> Parser (Maybe OpenSearchWarmPartitionInstanceType)
-> Parser ClusterConfig
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe OpenSearchWarmPartitionInstanceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WarmType")
)
instance Prelude.Hashable ClusterConfig
instance Prelude.NFData ClusterConfig
instance Core.ToJSON ClusterConfig where
toJSON :: ClusterConfig -> Value
toJSON ClusterConfig' {Maybe Bool
Maybe Int
Maybe ColdStorageOptions
Maybe OpenSearchPartitionInstanceType
Maybe OpenSearchWarmPartitionInstanceType
Maybe ZoneAwarenessConfig
warmType :: Maybe OpenSearchWarmPartitionInstanceType
warmCount :: Maybe Int
zoneAwarenessConfig :: Maybe ZoneAwarenessConfig
warmEnabled :: Maybe Bool
instanceType :: Maybe OpenSearchPartitionInstanceType
zoneAwarenessEnabled :: Maybe Bool
coldStorageOptions :: Maybe ColdStorageOptions
instanceCount :: Maybe Int
dedicatedMasterEnabled :: Maybe Bool
dedicatedMasterType :: Maybe OpenSearchPartitionInstanceType
dedicatedMasterCount :: Maybe Int
$sel:warmType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchWarmPartitionInstanceType
$sel:warmCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:zoneAwarenessConfig:ClusterConfig' :: ClusterConfig -> Maybe ZoneAwarenessConfig
$sel:warmEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:instanceType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
$sel:zoneAwarenessEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:coldStorageOptions:ClusterConfig' :: ClusterConfig -> Maybe ColdStorageOptions
$sel:instanceCount:ClusterConfig' :: ClusterConfig -> Maybe Int
$sel:dedicatedMasterEnabled:ClusterConfig' :: ClusterConfig -> Maybe Bool
$sel:dedicatedMasterType:ClusterConfig' :: ClusterConfig -> Maybe OpenSearchPartitionInstanceType
$sel:dedicatedMasterCount:ClusterConfig' :: ClusterConfig -> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DedicatedMasterCount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
dedicatedMasterCount,
(Text
"DedicatedMasterType" Text -> OpenSearchPartitionInstanceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(OpenSearchPartitionInstanceType -> Pair)
-> Maybe OpenSearchPartitionInstanceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpenSearchPartitionInstanceType
dedicatedMasterType,
(Text
"DedicatedMasterEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dedicatedMasterEnabled,
(Text
"InstanceCount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
instanceCount,
(Text
"ColdStorageOptions" Text -> ColdStorageOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ColdStorageOptions -> Pair)
-> Maybe ColdStorageOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ColdStorageOptions
coldStorageOptions,
(Text
"ZoneAwarenessEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
zoneAwarenessEnabled,
(Text
"InstanceType" Text -> OpenSearchPartitionInstanceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OpenSearchPartitionInstanceType -> Pair)
-> Maybe OpenSearchPartitionInstanceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpenSearchPartitionInstanceType
instanceType,
(Text
"WarmEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
warmEnabled,
(Text
"ZoneAwarenessConfig" Text -> ZoneAwarenessConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ZoneAwarenessConfig -> Pair)
-> Maybe ZoneAwarenessConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ZoneAwarenessConfig
zoneAwarenessConfig,
(Text
"WarmCount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
warmCount,
(Text
"WarmType" Text -> OpenSearchWarmPartitionInstanceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OpenSearchWarmPartitionInstanceType -> Pair)
-> Maybe OpenSearchWarmPartitionInstanceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpenSearchWarmPartitionInstanceType
warmType
]
)