{-# 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.SecurityHub.Types.AwsElasticsearchDomainElasticsearchClusterConfigDetails
-- 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.SecurityHub.Types.AwsElasticsearchDomainElasticsearchClusterConfigDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails

-- | details about the configuration of an OpenSearch cluster.
--
-- /See:/ 'newAwsElasticsearchDomainElasticsearchClusterConfigDetails' smart constructor.
data AwsElasticsearchDomainElasticsearchClusterConfigDetails = AwsElasticsearchDomainElasticsearchClusterConfigDetails'
  { -- | The number of instances to use for the master node. If this attribute is
    -- specified, then @DedicatedMasterEnabled@ must be @true@.
    AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Int
dedicatedMasterCount :: Prelude.Maybe Prelude.Int,
    -- | The hardware configuration of the computer that hosts the dedicated
    -- master node. For example, @m3.medium.elasticsearch@. If this attribute
    -- is specified, then @DedicatedMasterEnabled@ must be @true@.
    AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Text
dedicatedMasterType :: Prelude.Maybe Prelude.Text,
    -- | Whether to use a dedicated master node for the Elasticsearch domain. A
    -- dedicated master node performs cluster management tasks, but doesn\'t
    -- hold data or respond to data upload requests.
    AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Bool
dedicatedMasterEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The number of data nodes to use in the Elasticsearch domain.
    AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Int
instanceCount :: Prelude.Maybe Prelude.Int,
    -- | Whether to enable zone awareness for the Elasticsearch domain. When zone
    -- awareness is enabled, OpenSearch allocates the cluster\'s nodes and
    -- replica index shards across Availability Zones in the same Region. This
    -- prevents data loss and minimizes downtime if a node or data center
    -- fails.
    AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Bool
zoneAwarenessEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The instance type for your data nodes. For example,
    -- @m3.medium.elasticsearch@.
    AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
    -- | Configuration options for zone awareness. Provided if
    -- @ZoneAwarenessEnabled@ is @true@.
    AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe
     AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
zoneAwarenessConfig :: Prelude.Maybe AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
  }
  deriving (AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Bool
(AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Bool)
-> (AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Bool)
-> Eq AwsElasticsearchDomainElasticsearchClusterConfigDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Bool
$c/= :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Bool
== :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Bool
$c== :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Bool
Prelude.Eq, ReadPrec [AwsElasticsearchDomainElasticsearchClusterConfigDetails]
ReadPrec AwsElasticsearchDomainElasticsearchClusterConfigDetails
Int
-> ReadS AwsElasticsearchDomainElasticsearchClusterConfigDetails
ReadS [AwsElasticsearchDomainElasticsearchClusterConfigDetails]
(Int
 -> ReadS AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> ReadS [AwsElasticsearchDomainElasticsearchClusterConfigDetails]
-> ReadPrec AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> ReadPrec
     [AwsElasticsearchDomainElasticsearchClusterConfigDetails]
-> Read AwsElasticsearchDomainElasticsearchClusterConfigDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsElasticsearchDomainElasticsearchClusterConfigDetails]
$creadListPrec :: ReadPrec [AwsElasticsearchDomainElasticsearchClusterConfigDetails]
readPrec :: ReadPrec AwsElasticsearchDomainElasticsearchClusterConfigDetails
$creadPrec :: ReadPrec AwsElasticsearchDomainElasticsearchClusterConfigDetails
readList :: ReadS [AwsElasticsearchDomainElasticsearchClusterConfigDetails]
$creadList :: ReadS [AwsElasticsearchDomainElasticsearchClusterConfigDetails]
readsPrec :: Int
-> ReadS AwsElasticsearchDomainElasticsearchClusterConfigDetails
$creadsPrec :: Int
-> ReadS AwsElasticsearchDomainElasticsearchClusterConfigDetails
Prelude.Read, Int
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> ShowS
[AwsElasticsearchDomainElasticsearchClusterConfigDetails] -> ShowS
AwsElasticsearchDomainElasticsearchClusterConfigDetails -> String
(Int
 -> AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> ShowS)
-> (AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> String)
-> ([AwsElasticsearchDomainElasticsearchClusterConfigDetails]
    -> ShowS)
-> Show AwsElasticsearchDomainElasticsearchClusterConfigDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsElasticsearchDomainElasticsearchClusterConfigDetails] -> ShowS
$cshowList :: [AwsElasticsearchDomainElasticsearchClusterConfigDetails] -> ShowS
show :: AwsElasticsearchDomainElasticsearchClusterConfigDetails -> String
$cshow :: AwsElasticsearchDomainElasticsearchClusterConfigDetails -> String
showsPrec :: Int
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> ShowS
$cshowsPrec :: Int
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> ShowS
Prelude.Show, (forall x.
 AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> Rep AwsElasticsearchDomainElasticsearchClusterConfigDetails x)
-> (forall x.
    Rep AwsElasticsearchDomainElasticsearchClusterConfigDetails x
    -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Generic AwsElasticsearchDomainElasticsearchClusterConfigDetails
forall x.
Rep AwsElasticsearchDomainElasticsearchClusterConfigDetails x
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
forall x.
AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Rep AwsElasticsearchDomainElasticsearchClusterConfigDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsElasticsearchDomainElasticsearchClusterConfigDetails x
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
$cfrom :: forall x.
AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Rep AwsElasticsearchDomainElasticsearchClusterConfigDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsElasticsearchDomainElasticsearchClusterConfigDetails' 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:
--
-- 'dedicatedMasterCount', 'awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterCount' - The number of instances to use for the master node. If this attribute is
-- specified, then @DedicatedMasterEnabled@ must be @true@.
--
-- 'dedicatedMasterType', 'awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterType' - The hardware configuration of the computer that hosts the dedicated
-- master node. For example, @m3.medium.elasticsearch@. If this attribute
-- is specified, then @DedicatedMasterEnabled@ must be @true@.
--
-- 'dedicatedMasterEnabled', 'awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterEnabled' - Whether to use a dedicated master node for the Elasticsearch domain. A
-- dedicated master node performs cluster management tasks, but doesn\'t
-- hold data or respond to data upload requests.
--
-- 'instanceCount', 'awsElasticsearchDomainElasticsearchClusterConfigDetails_instanceCount' - The number of data nodes to use in the Elasticsearch domain.
--
-- 'zoneAwarenessEnabled', 'awsElasticsearchDomainElasticsearchClusterConfigDetails_zoneAwarenessEnabled' - Whether to enable zone awareness for the Elasticsearch domain. When zone
-- awareness is enabled, OpenSearch allocates the cluster\'s nodes and
-- replica index shards across Availability Zones in the same Region. This
-- prevents data loss and minimizes downtime if a node or data center
-- fails.
--
-- 'instanceType', 'awsElasticsearchDomainElasticsearchClusterConfigDetails_instanceType' - The instance type for your data nodes. For example,
-- @m3.medium.elasticsearch@.
--
-- 'zoneAwarenessConfig', 'awsElasticsearchDomainElasticsearchClusterConfigDetails_zoneAwarenessConfig' - Configuration options for zone awareness. Provided if
-- @ZoneAwarenessEnabled@ is @true@.
newAwsElasticsearchDomainElasticsearchClusterConfigDetails ::
  AwsElasticsearchDomainElasticsearchClusterConfigDetails
newAwsElasticsearchDomainElasticsearchClusterConfigDetails :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
newAwsElasticsearchDomainElasticsearchClusterConfigDetails =
  AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe
     AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
AwsElasticsearchDomainElasticsearchClusterConfigDetails'
    { $sel:dedicatedMasterCount:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Int
dedicatedMasterCount =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:dedicatedMasterType:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Text
dedicatedMasterType =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dedicatedMasterEnabled:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Bool
dedicatedMasterEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceCount:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Int
instanceCount =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:zoneAwarenessEnabled:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Bool
zoneAwarenessEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Text
instanceType =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:zoneAwarenessConfig:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
zoneAwarenessConfig =
        Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
forall a. Maybe a
Prelude.Nothing
    }

-- | The number of instances to use for the master node. If this attribute is
-- specified, then @DedicatedMasterEnabled@ must be @true@.
awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterCount :: Lens.Lens' AwsElasticsearchDomainElasticsearchClusterConfigDetails (Prelude.Maybe Prelude.Int)
awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterCount :: (Maybe Int -> f (Maybe Int))
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> f AwsElasticsearchDomainElasticsearchClusterConfigDetails
awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterCount = (AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> Maybe Int)
-> (AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> Maybe Int
    -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Lens
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainElasticsearchClusterConfigDetails' {Maybe Int
dedicatedMasterCount :: Maybe Int
$sel:dedicatedMasterCount:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Int
dedicatedMasterCount} -> Maybe Int
dedicatedMasterCount) (\s :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
s@AwsElasticsearchDomainElasticsearchClusterConfigDetails' {} Maybe Int
a -> AwsElasticsearchDomainElasticsearchClusterConfigDetails
s {$sel:dedicatedMasterCount:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Int
dedicatedMasterCount = Maybe Int
a} :: AwsElasticsearchDomainElasticsearchClusterConfigDetails)

-- | The hardware configuration of the computer that hosts the dedicated
-- master node. For example, @m3.medium.elasticsearch@. If this attribute
-- is specified, then @DedicatedMasterEnabled@ must be @true@.
awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterType :: Lens.Lens' AwsElasticsearchDomainElasticsearchClusterConfigDetails (Prelude.Maybe Prelude.Text)
awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterType :: (Maybe Text -> f (Maybe Text))
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> f AwsElasticsearchDomainElasticsearchClusterConfigDetails
awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterType = (AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> Maybe Text)
-> (AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> Maybe Text
    -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Lens
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainElasticsearchClusterConfigDetails' {Maybe Text
dedicatedMasterType :: Maybe Text
$sel:dedicatedMasterType:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Text
dedicatedMasterType} -> Maybe Text
dedicatedMasterType) (\s :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
s@AwsElasticsearchDomainElasticsearchClusterConfigDetails' {} Maybe Text
a -> AwsElasticsearchDomainElasticsearchClusterConfigDetails
s {$sel:dedicatedMasterType:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Text
dedicatedMasterType = Maybe Text
a} :: AwsElasticsearchDomainElasticsearchClusterConfigDetails)

-- | Whether to use a dedicated master node for the Elasticsearch domain. A
-- dedicated master node performs cluster management tasks, but doesn\'t
-- hold data or respond to data upload requests.
awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterEnabled :: Lens.Lens' AwsElasticsearchDomainElasticsearchClusterConfigDetails (Prelude.Maybe Prelude.Bool)
awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterEnabled :: (Maybe Bool -> f (Maybe Bool))
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> f AwsElasticsearchDomainElasticsearchClusterConfigDetails
awsElasticsearchDomainElasticsearchClusterConfigDetails_dedicatedMasterEnabled = (AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> Maybe Bool)
-> (AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> Maybe Bool
    -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Lens
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainElasticsearchClusterConfigDetails' {Maybe Bool
dedicatedMasterEnabled :: Maybe Bool
$sel:dedicatedMasterEnabled:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Bool
dedicatedMasterEnabled} -> Maybe Bool
dedicatedMasterEnabled) (\s :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
s@AwsElasticsearchDomainElasticsearchClusterConfigDetails' {} Maybe Bool
a -> AwsElasticsearchDomainElasticsearchClusterConfigDetails
s {$sel:dedicatedMasterEnabled:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Bool
dedicatedMasterEnabled = Maybe Bool
a} :: AwsElasticsearchDomainElasticsearchClusterConfigDetails)

-- | The number of data nodes to use in the Elasticsearch domain.
awsElasticsearchDomainElasticsearchClusterConfigDetails_instanceCount :: Lens.Lens' AwsElasticsearchDomainElasticsearchClusterConfigDetails (Prelude.Maybe Prelude.Int)
awsElasticsearchDomainElasticsearchClusterConfigDetails_instanceCount :: (Maybe Int -> f (Maybe Int))
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> f AwsElasticsearchDomainElasticsearchClusterConfigDetails
awsElasticsearchDomainElasticsearchClusterConfigDetails_instanceCount = (AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> Maybe Int)
-> (AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> Maybe Int
    -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Lens
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainElasticsearchClusterConfigDetails' {Maybe Int
instanceCount :: Maybe Int
$sel:instanceCount:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Int
instanceCount} -> Maybe Int
instanceCount) (\s :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
s@AwsElasticsearchDomainElasticsearchClusterConfigDetails' {} Maybe Int
a -> AwsElasticsearchDomainElasticsearchClusterConfigDetails
s {$sel:instanceCount:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Int
instanceCount = Maybe Int
a} :: AwsElasticsearchDomainElasticsearchClusterConfigDetails)

-- | Whether to enable zone awareness for the Elasticsearch domain. When zone
-- awareness is enabled, OpenSearch allocates the cluster\'s nodes and
-- replica index shards across Availability Zones in the same Region. This
-- prevents data loss and minimizes downtime if a node or data center
-- fails.
awsElasticsearchDomainElasticsearchClusterConfigDetails_zoneAwarenessEnabled :: Lens.Lens' AwsElasticsearchDomainElasticsearchClusterConfigDetails (Prelude.Maybe Prelude.Bool)
awsElasticsearchDomainElasticsearchClusterConfigDetails_zoneAwarenessEnabled :: (Maybe Bool -> f (Maybe Bool))
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> f AwsElasticsearchDomainElasticsearchClusterConfigDetails
awsElasticsearchDomainElasticsearchClusterConfigDetails_zoneAwarenessEnabled = (AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> Maybe Bool)
-> (AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> Maybe Bool
    -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Lens
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainElasticsearchClusterConfigDetails' {Maybe Bool
zoneAwarenessEnabled :: Maybe Bool
$sel:zoneAwarenessEnabled:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Bool
zoneAwarenessEnabled} -> Maybe Bool
zoneAwarenessEnabled) (\s :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
s@AwsElasticsearchDomainElasticsearchClusterConfigDetails' {} Maybe Bool
a -> AwsElasticsearchDomainElasticsearchClusterConfigDetails
s {$sel:zoneAwarenessEnabled:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Bool
zoneAwarenessEnabled = Maybe Bool
a} :: AwsElasticsearchDomainElasticsearchClusterConfigDetails)

-- | The instance type for your data nodes. For example,
-- @m3.medium.elasticsearch@.
awsElasticsearchDomainElasticsearchClusterConfigDetails_instanceType :: Lens.Lens' AwsElasticsearchDomainElasticsearchClusterConfigDetails (Prelude.Maybe Prelude.Text)
awsElasticsearchDomainElasticsearchClusterConfigDetails_instanceType :: (Maybe Text -> f (Maybe Text))
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> f AwsElasticsearchDomainElasticsearchClusterConfigDetails
awsElasticsearchDomainElasticsearchClusterConfigDetails_instanceType = (AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> Maybe Text)
-> (AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> Maybe Text
    -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Lens
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainElasticsearchClusterConfigDetails' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
s@AwsElasticsearchDomainElasticsearchClusterConfigDetails' {} Maybe Text
a -> AwsElasticsearchDomainElasticsearchClusterConfigDetails
s {$sel:instanceType:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe Text
instanceType = Maybe Text
a} :: AwsElasticsearchDomainElasticsearchClusterConfigDetails)

-- | Configuration options for zone awareness. Provided if
-- @ZoneAwarenessEnabled@ is @true@.
awsElasticsearchDomainElasticsearchClusterConfigDetails_zoneAwarenessConfig :: Lens.Lens' AwsElasticsearchDomainElasticsearchClusterConfigDetails (Prelude.Maybe AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails)
awsElasticsearchDomainElasticsearchClusterConfigDetails_zoneAwarenessConfig :: (Maybe
   AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
 -> f (Maybe
         AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails))
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> f AwsElasticsearchDomainElasticsearchClusterConfigDetails
awsElasticsearchDomainElasticsearchClusterConfigDetails_zoneAwarenessConfig = (AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> Maybe
      AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails)
-> (AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> Maybe
         AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
    -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Lens
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     AwsElasticsearchDomainElasticsearchClusterConfigDetails
     (Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails)
     (Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainElasticsearchClusterConfigDetails' {Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
zoneAwarenessConfig :: Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
$sel:zoneAwarenessConfig:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe
     AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
zoneAwarenessConfig} -> Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
zoneAwarenessConfig) (\s :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
s@AwsElasticsearchDomainElasticsearchClusterConfigDetails' {} Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
a -> AwsElasticsearchDomainElasticsearchClusterConfigDetails
s {$sel:zoneAwarenessConfig:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
zoneAwarenessConfig = Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
a} :: AwsElasticsearchDomainElasticsearchClusterConfigDetails)

instance
  Core.FromJSON
    AwsElasticsearchDomainElasticsearchClusterConfigDetails
  where
  parseJSON :: Value
-> Parser AwsElasticsearchDomainElasticsearchClusterConfigDetails
parseJSON =
    String
-> (Object
    -> Parser AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Value
-> Parser AwsElasticsearchDomainElasticsearchClusterConfigDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsElasticsearchDomainElasticsearchClusterConfigDetails"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe
     AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails
AwsElasticsearchDomainElasticsearchClusterConfigDetails'
            (Maybe Int
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Int
 -> Maybe Bool
 -> Maybe Text
 -> Maybe
      AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
 -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe
           AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
      -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
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 Text
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
   -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe
           AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
      -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
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
"DedicatedMasterType")
              Parser
  (Maybe Bool
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
   -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe
           AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
      -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
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 Bool
   -> Maybe Text
   -> Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
   -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe
           AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
      -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
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 Bool
   -> Maybe Text
   -> Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
   -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe
           AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
      -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
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 Text
   -> Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
   -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
      -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
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
"InstanceType")
              Parser
  (Maybe
     AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
   -> AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Parser
     (Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails)
-> Parser AwsElasticsearchDomainElasticsearchClusterConfigDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe
        AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ZoneAwarenessConfig")
      )

instance
  Prelude.Hashable
    AwsElasticsearchDomainElasticsearchClusterConfigDetails

instance
  Prelude.NFData
    AwsElasticsearchDomainElasticsearchClusterConfigDetails

instance
  Core.ToJSON
    AwsElasticsearchDomainElasticsearchClusterConfigDetails
  where
  toJSON :: AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Value
toJSON
    AwsElasticsearchDomainElasticsearchClusterConfigDetails' {Maybe Bool
Maybe Int
Maybe Text
Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
zoneAwarenessConfig :: Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
instanceType :: Maybe Text
zoneAwarenessEnabled :: Maybe Bool
instanceCount :: Maybe Int
dedicatedMasterEnabled :: Maybe Bool
dedicatedMasterType :: Maybe Text
dedicatedMasterCount :: Maybe Int
$sel:zoneAwarenessConfig:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe
     AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
$sel:instanceType:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Text
$sel:zoneAwarenessEnabled:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Bool
$sel:instanceCount:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Int
$sel:dedicatedMasterEnabled:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Bool
$sel:dedicatedMasterType:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Text
$sel:dedicatedMasterCount:AwsElasticsearchDomainElasticsearchClusterConfigDetails' :: AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> 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 -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
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
"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 -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
instanceType,
              (Text
"ZoneAwarenessConfig" Text
-> AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
 -> Pair)
-> Maybe
     AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe
  AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails
zoneAwarenessConfig
            ]
        )