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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsElasticsearchDomainDomainEndpointOptions
import Amazonka.SecurityHub.Types.AwsElasticsearchDomainElasticsearchClusterConfigDetails
import Amazonka.SecurityHub.Types.AwsElasticsearchDomainEncryptionAtRestOptions
import Amazonka.SecurityHub.Types.AwsElasticsearchDomainLogPublishingOptions
import Amazonka.SecurityHub.Types.AwsElasticsearchDomainNodeToNodeEncryptionOptions
import Amazonka.SecurityHub.Types.AwsElasticsearchDomainServiceSoftwareOptions
import Amazonka.SecurityHub.Types.AwsElasticsearchDomainVPCOptions

-- | Information about an Elasticsearch domain.
--
-- /See:/ 'newAwsElasticsearchDomainDetails' smart constructor.
data AwsElasticsearchDomainDetails = AwsElasticsearchDomainDetails'
  { -- | Details about the configuration for node-to-node encryption.
    AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions :: Prelude.Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions,
    -- | IAM policy document specifying the access policies for the new
    -- Elasticsearch domain.
    AwsElasticsearchDomainDetails -> Maybe Text
accessPolicies :: Prelude.Maybe Prelude.Text,
    -- | Information about the status of a domain relative to the latest service
    -- software.
    AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainServiceSoftwareOptions
serviceSoftwareOptions :: Prelude.Maybe AwsElasticsearchDomainServiceSoftwareOptions,
    -- | Configures the CloudWatch Logs to publish for the Elasticsearch domain.
    AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainLogPublishingOptions
logPublishingOptions :: Prelude.Maybe AwsElasticsearchDomainLogPublishingOptions,
    -- | Information about an OpenSearch cluster configuration.
    AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
elasticsearchClusterConfig :: Prelude.Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails,
    -- | Name of an Elasticsearch domain.
    --
    -- Domain names are unique across all domains owned by the same account
    -- within an Amazon Web Services Region.
    --
    -- Domain names must start with a lowercase letter and must be between 3
    -- and 28 characters.
    --
    -- Valid characters are a-z (lowercase only), 0-9, and – (hyphen).
    AwsElasticsearchDomainDetails -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | Details about the configuration for encryption at rest.
    AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
encryptionAtRestOptions :: Prelude.Maybe AwsElasticsearchDomainEncryptionAtRestOptions,
    -- | Information that OpenSearch derives based on @VPCOptions@ for the
    -- domain.
    AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainVPCOptions
vPCOptions :: Prelude.Maybe AwsElasticsearchDomainVPCOptions,
    -- | Unique identifier for an Elasticsearch domain.
    AwsElasticsearchDomainDetails -> Maybe Text
domainId :: Prelude.Maybe Prelude.Text,
    -- | The key-value pair that exists if the Elasticsearch domain uses VPC
    -- endpoints.
    AwsElasticsearchDomainDetails -> Maybe (HashMap Text Text)
endpoints :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Additional options for the domain endpoint.
    AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainDomainEndpointOptions
domainEndpointOptions :: Prelude.Maybe AwsElasticsearchDomainDomainEndpointOptions,
    -- | Domain-specific endpoint used to submit index, search, and data upload
    -- requests to an Elasticsearch domain.
    --
    -- The endpoint is a service URL.
    AwsElasticsearchDomainDetails -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text,
    -- | OpenSearch version.
    AwsElasticsearchDomainDetails -> Maybe Text
elasticsearchVersion :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsElasticsearchDomainDetails
-> AwsElasticsearchDomainDetails -> Bool
(AwsElasticsearchDomainDetails
 -> AwsElasticsearchDomainDetails -> Bool)
-> (AwsElasticsearchDomainDetails
    -> AwsElasticsearchDomainDetails -> Bool)
-> Eq AwsElasticsearchDomainDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsElasticsearchDomainDetails
-> AwsElasticsearchDomainDetails -> Bool
$c/= :: AwsElasticsearchDomainDetails
-> AwsElasticsearchDomainDetails -> Bool
== :: AwsElasticsearchDomainDetails
-> AwsElasticsearchDomainDetails -> Bool
$c== :: AwsElasticsearchDomainDetails
-> AwsElasticsearchDomainDetails -> Bool
Prelude.Eq, ReadPrec [AwsElasticsearchDomainDetails]
ReadPrec AwsElasticsearchDomainDetails
Int -> ReadS AwsElasticsearchDomainDetails
ReadS [AwsElasticsearchDomainDetails]
(Int -> ReadS AwsElasticsearchDomainDetails)
-> ReadS [AwsElasticsearchDomainDetails]
-> ReadPrec AwsElasticsearchDomainDetails
-> ReadPrec [AwsElasticsearchDomainDetails]
-> Read AwsElasticsearchDomainDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsElasticsearchDomainDetails]
$creadListPrec :: ReadPrec [AwsElasticsearchDomainDetails]
readPrec :: ReadPrec AwsElasticsearchDomainDetails
$creadPrec :: ReadPrec AwsElasticsearchDomainDetails
readList :: ReadS [AwsElasticsearchDomainDetails]
$creadList :: ReadS [AwsElasticsearchDomainDetails]
readsPrec :: Int -> ReadS AwsElasticsearchDomainDetails
$creadsPrec :: Int -> ReadS AwsElasticsearchDomainDetails
Prelude.Read, Int -> AwsElasticsearchDomainDetails -> ShowS
[AwsElasticsearchDomainDetails] -> ShowS
AwsElasticsearchDomainDetails -> String
(Int -> AwsElasticsearchDomainDetails -> ShowS)
-> (AwsElasticsearchDomainDetails -> String)
-> ([AwsElasticsearchDomainDetails] -> ShowS)
-> Show AwsElasticsearchDomainDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsElasticsearchDomainDetails] -> ShowS
$cshowList :: [AwsElasticsearchDomainDetails] -> ShowS
show :: AwsElasticsearchDomainDetails -> String
$cshow :: AwsElasticsearchDomainDetails -> String
showsPrec :: Int -> AwsElasticsearchDomainDetails -> ShowS
$cshowsPrec :: Int -> AwsElasticsearchDomainDetails -> ShowS
Prelude.Show, (forall x.
 AwsElasticsearchDomainDetails
 -> Rep AwsElasticsearchDomainDetails x)
-> (forall x.
    Rep AwsElasticsearchDomainDetails x
    -> AwsElasticsearchDomainDetails)
-> Generic AwsElasticsearchDomainDetails
forall x.
Rep AwsElasticsearchDomainDetails x
-> AwsElasticsearchDomainDetails
forall x.
AwsElasticsearchDomainDetails
-> Rep AwsElasticsearchDomainDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsElasticsearchDomainDetails x
-> AwsElasticsearchDomainDetails
$cfrom :: forall x.
AwsElasticsearchDomainDetails
-> Rep AwsElasticsearchDomainDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsElasticsearchDomainDetails' 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:
--
-- 'nodeToNodeEncryptionOptions', 'awsElasticsearchDomainDetails_nodeToNodeEncryptionOptions' - Details about the configuration for node-to-node encryption.
--
-- 'accessPolicies', 'awsElasticsearchDomainDetails_accessPolicies' - IAM policy document specifying the access policies for the new
-- Elasticsearch domain.
--
-- 'serviceSoftwareOptions', 'awsElasticsearchDomainDetails_serviceSoftwareOptions' - Information about the status of a domain relative to the latest service
-- software.
--
-- 'logPublishingOptions', 'awsElasticsearchDomainDetails_logPublishingOptions' - Configures the CloudWatch Logs to publish for the Elasticsearch domain.
--
-- 'elasticsearchClusterConfig', 'awsElasticsearchDomainDetails_elasticsearchClusterConfig' - Information about an OpenSearch cluster configuration.
--
-- 'domainName', 'awsElasticsearchDomainDetails_domainName' - Name of an Elasticsearch domain.
--
-- Domain names are unique across all domains owned by the same account
-- within an Amazon Web Services Region.
--
-- Domain names must start with a lowercase letter and must be between 3
-- and 28 characters.
--
-- Valid characters are a-z (lowercase only), 0-9, and – (hyphen).
--
-- 'encryptionAtRestOptions', 'awsElasticsearchDomainDetails_encryptionAtRestOptions' - Details about the configuration for encryption at rest.
--
-- 'vPCOptions', 'awsElasticsearchDomainDetails_vPCOptions' - Information that OpenSearch derives based on @VPCOptions@ for the
-- domain.
--
-- 'domainId', 'awsElasticsearchDomainDetails_domainId' - Unique identifier for an Elasticsearch domain.
--
-- 'endpoints', 'awsElasticsearchDomainDetails_endpoints' - The key-value pair that exists if the Elasticsearch domain uses VPC
-- endpoints.
--
-- 'domainEndpointOptions', 'awsElasticsearchDomainDetails_domainEndpointOptions' - Additional options for the domain endpoint.
--
-- 'endpoint', 'awsElasticsearchDomainDetails_endpoint' - Domain-specific endpoint used to submit index, search, and data upload
-- requests to an Elasticsearch domain.
--
-- The endpoint is a service URL.
--
-- 'elasticsearchVersion', 'awsElasticsearchDomainDetails_elasticsearchVersion' - OpenSearch version.
newAwsElasticsearchDomainDetails ::
  AwsElasticsearchDomainDetails
newAwsElasticsearchDomainDetails :: AwsElasticsearchDomainDetails
newAwsElasticsearchDomainDetails =
  AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
-> Maybe Text
-> Maybe AwsElasticsearchDomainServiceSoftwareOptions
-> Maybe AwsElasticsearchDomainLogPublishingOptions
-> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Text
-> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
-> Maybe AwsElasticsearchDomainVPCOptions
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe AwsElasticsearchDomainDomainEndpointOptions
-> Maybe Text
-> Maybe Text
-> AwsElasticsearchDomainDetails
AwsElasticsearchDomainDetails'
    { $sel:nodeToNodeEncryptionOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions =
        Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:accessPolicies:AwsElasticsearchDomainDetails' :: Maybe Text
accessPolicies = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceSoftwareOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainServiceSoftwareOptions
serviceSoftwareOptions = Maybe AwsElasticsearchDomainServiceSoftwareOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:logPublishingOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainLogPublishingOptions
logPublishingOptions = Maybe AwsElasticsearchDomainLogPublishingOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:elasticsearchClusterConfig:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
elasticsearchClusterConfig = Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:AwsElasticsearchDomainDetails' :: Maybe Text
domainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionAtRestOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainEncryptionAtRestOptions
encryptionAtRestOptions = Maybe AwsElasticsearchDomainEncryptionAtRestOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:vPCOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainVPCOptions
vPCOptions = Maybe AwsElasticsearchDomainVPCOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:domainId:AwsElasticsearchDomainDetails' :: Maybe Text
domainId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpoints:AwsElasticsearchDomainDetails' :: Maybe (HashMap Text Text)
endpoints = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:domainEndpointOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainDomainEndpointOptions
domainEndpointOptions = Maybe AwsElasticsearchDomainDomainEndpointOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:endpoint:AwsElasticsearchDomainDetails' :: Maybe Text
endpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:elasticsearchVersion:AwsElasticsearchDomainDetails' :: Maybe Text
elasticsearchVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Details about the configuration for node-to-node encryption.
awsElasticsearchDomainDetails_nodeToNodeEncryptionOptions :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions)
awsElasticsearchDomainDetails_nodeToNodeEncryptionOptions :: (Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
 -> f (Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_nodeToNodeEncryptionOptions = (AwsElasticsearchDomainDetails
 -> Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions)
-> (AwsElasticsearchDomainDetails
    -> Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
    -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions)
     (Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions :: Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
$sel:nodeToNodeEncryptionOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions} -> Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
a -> AwsElasticsearchDomainDetails
s {$sel:nodeToNodeEncryptionOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions = Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
a} :: AwsElasticsearchDomainDetails)

-- | IAM policy document specifying the access policies for the new
-- Elasticsearch domain.
awsElasticsearchDomainDetails_accessPolicies :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe Prelude.Text)
awsElasticsearchDomainDetails_accessPolicies :: (Maybe Text -> f (Maybe Text))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_accessPolicies = (AwsElasticsearchDomainDetails -> Maybe Text)
-> (AwsElasticsearchDomainDetails
    -> Maybe Text -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe Text
accessPolicies :: Maybe Text
$sel:accessPolicies:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
accessPolicies} -> Maybe Text
accessPolicies) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe Text
a -> AwsElasticsearchDomainDetails
s {$sel:accessPolicies:AwsElasticsearchDomainDetails' :: Maybe Text
accessPolicies = Maybe Text
a} :: AwsElasticsearchDomainDetails)

-- | Information about the status of a domain relative to the latest service
-- software.
awsElasticsearchDomainDetails_serviceSoftwareOptions :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe AwsElasticsearchDomainServiceSoftwareOptions)
awsElasticsearchDomainDetails_serviceSoftwareOptions :: (Maybe AwsElasticsearchDomainServiceSoftwareOptions
 -> f (Maybe AwsElasticsearchDomainServiceSoftwareOptions))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_serviceSoftwareOptions = (AwsElasticsearchDomainDetails
 -> Maybe AwsElasticsearchDomainServiceSoftwareOptions)
-> (AwsElasticsearchDomainDetails
    -> Maybe AwsElasticsearchDomainServiceSoftwareOptions
    -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe AwsElasticsearchDomainServiceSoftwareOptions)
     (Maybe AwsElasticsearchDomainServiceSoftwareOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe AwsElasticsearchDomainServiceSoftwareOptions
serviceSoftwareOptions :: Maybe AwsElasticsearchDomainServiceSoftwareOptions
$sel:serviceSoftwareOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainServiceSoftwareOptions
serviceSoftwareOptions} -> Maybe AwsElasticsearchDomainServiceSoftwareOptions
serviceSoftwareOptions) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe AwsElasticsearchDomainServiceSoftwareOptions
a -> AwsElasticsearchDomainDetails
s {$sel:serviceSoftwareOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainServiceSoftwareOptions
serviceSoftwareOptions = Maybe AwsElasticsearchDomainServiceSoftwareOptions
a} :: AwsElasticsearchDomainDetails)

-- | Configures the CloudWatch Logs to publish for the Elasticsearch domain.
awsElasticsearchDomainDetails_logPublishingOptions :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe AwsElasticsearchDomainLogPublishingOptions)
awsElasticsearchDomainDetails_logPublishingOptions :: (Maybe AwsElasticsearchDomainLogPublishingOptions
 -> f (Maybe AwsElasticsearchDomainLogPublishingOptions))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_logPublishingOptions = (AwsElasticsearchDomainDetails
 -> Maybe AwsElasticsearchDomainLogPublishingOptions)
-> (AwsElasticsearchDomainDetails
    -> Maybe AwsElasticsearchDomainLogPublishingOptions
    -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe AwsElasticsearchDomainLogPublishingOptions)
     (Maybe AwsElasticsearchDomainLogPublishingOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe AwsElasticsearchDomainLogPublishingOptions
logPublishingOptions :: Maybe AwsElasticsearchDomainLogPublishingOptions
$sel:logPublishingOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainLogPublishingOptions
logPublishingOptions} -> Maybe AwsElasticsearchDomainLogPublishingOptions
logPublishingOptions) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe AwsElasticsearchDomainLogPublishingOptions
a -> AwsElasticsearchDomainDetails
s {$sel:logPublishingOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainLogPublishingOptions
logPublishingOptions = Maybe AwsElasticsearchDomainLogPublishingOptions
a} :: AwsElasticsearchDomainDetails)

-- | Information about an OpenSearch cluster configuration.
awsElasticsearchDomainDetails_elasticsearchClusterConfig :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails)
awsElasticsearchDomainDetails_elasticsearchClusterConfig :: (Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> f (Maybe
         AwsElasticsearchDomainElasticsearchClusterConfigDetails))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_elasticsearchClusterConfig = (AwsElasticsearchDomainDetails
 -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> (AwsElasticsearchDomainDetails
    -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
    -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails)
     (Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
elasticsearchClusterConfig :: Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
$sel:elasticsearchClusterConfig:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
elasticsearchClusterConfig} -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
elasticsearchClusterConfig) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
a -> AwsElasticsearchDomainDetails
s {$sel:elasticsearchClusterConfig:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
elasticsearchClusterConfig = Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
a} :: AwsElasticsearchDomainDetails)

-- | Name of an Elasticsearch domain.
--
-- Domain names are unique across all domains owned by the same account
-- within an Amazon Web Services Region.
--
-- Domain names must start with a lowercase letter and must be between 3
-- and 28 characters.
--
-- Valid characters are a-z (lowercase only), 0-9, and – (hyphen).
awsElasticsearchDomainDetails_domainName :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe Prelude.Text)
awsElasticsearchDomainDetails_domainName :: (Maybe Text -> f (Maybe Text))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_domainName = (AwsElasticsearchDomainDetails -> Maybe Text)
-> (AwsElasticsearchDomainDetails
    -> Maybe Text -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe Text
domainName :: Maybe Text
$sel:domainName:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe Text
a -> AwsElasticsearchDomainDetails
s {$sel:domainName:AwsElasticsearchDomainDetails' :: Maybe Text
domainName = Maybe Text
a} :: AwsElasticsearchDomainDetails)

-- | Details about the configuration for encryption at rest.
awsElasticsearchDomainDetails_encryptionAtRestOptions :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe AwsElasticsearchDomainEncryptionAtRestOptions)
awsElasticsearchDomainDetails_encryptionAtRestOptions :: (Maybe AwsElasticsearchDomainEncryptionAtRestOptions
 -> f (Maybe AwsElasticsearchDomainEncryptionAtRestOptions))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_encryptionAtRestOptions = (AwsElasticsearchDomainDetails
 -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions)
-> (AwsElasticsearchDomainDetails
    -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
    -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe AwsElasticsearchDomainEncryptionAtRestOptions)
     (Maybe AwsElasticsearchDomainEncryptionAtRestOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe AwsElasticsearchDomainEncryptionAtRestOptions
encryptionAtRestOptions :: Maybe AwsElasticsearchDomainEncryptionAtRestOptions
$sel:encryptionAtRestOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
encryptionAtRestOptions} -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
encryptionAtRestOptions) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe AwsElasticsearchDomainEncryptionAtRestOptions
a -> AwsElasticsearchDomainDetails
s {$sel:encryptionAtRestOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainEncryptionAtRestOptions
encryptionAtRestOptions = Maybe AwsElasticsearchDomainEncryptionAtRestOptions
a} :: AwsElasticsearchDomainDetails)

-- | Information that OpenSearch derives based on @VPCOptions@ for the
-- domain.
awsElasticsearchDomainDetails_vPCOptions :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe AwsElasticsearchDomainVPCOptions)
awsElasticsearchDomainDetails_vPCOptions :: (Maybe AwsElasticsearchDomainVPCOptions
 -> f (Maybe AwsElasticsearchDomainVPCOptions))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_vPCOptions = (AwsElasticsearchDomainDetails
 -> Maybe AwsElasticsearchDomainVPCOptions)
-> (AwsElasticsearchDomainDetails
    -> Maybe AwsElasticsearchDomainVPCOptions
    -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe AwsElasticsearchDomainVPCOptions)
     (Maybe AwsElasticsearchDomainVPCOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe AwsElasticsearchDomainVPCOptions
vPCOptions :: Maybe AwsElasticsearchDomainVPCOptions
$sel:vPCOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainVPCOptions
vPCOptions} -> Maybe AwsElasticsearchDomainVPCOptions
vPCOptions) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe AwsElasticsearchDomainVPCOptions
a -> AwsElasticsearchDomainDetails
s {$sel:vPCOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainVPCOptions
vPCOptions = Maybe AwsElasticsearchDomainVPCOptions
a} :: AwsElasticsearchDomainDetails)

-- | Unique identifier for an Elasticsearch domain.
awsElasticsearchDomainDetails_domainId :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe Prelude.Text)
awsElasticsearchDomainDetails_domainId :: (Maybe Text -> f (Maybe Text))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_domainId = (AwsElasticsearchDomainDetails -> Maybe Text)
-> (AwsElasticsearchDomainDetails
    -> Maybe Text -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe Text
domainId :: Maybe Text
$sel:domainId:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
domainId} -> Maybe Text
domainId) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe Text
a -> AwsElasticsearchDomainDetails
s {$sel:domainId:AwsElasticsearchDomainDetails' :: Maybe Text
domainId = Maybe Text
a} :: AwsElasticsearchDomainDetails)

-- | The key-value pair that exists if the Elasticsearch domain uses VPC
-- endpoints.
awsElasticsearchDomainDetails_endpoints :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
awsElasticsearchDomainDetails_endpoints :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_endpoints = (AwsElasticsearchDomainDetails -> Maybe (HashMap Text Text))
-> (AwsElasticsearchDomainDetails
    -> Maybe (HashMap Text Text) -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe (HashMap Text Text)
endpoints :: Maybe (HashMap Text Text)
$sel:endpoints:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe (HashMap Text Text)
endpoints} -> Maybe (HashMap Text Text)
endpoints) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe (HashMap Text Text)
a -> AwsElasticsearchDomainDetails
s {$sel:endpoints:AwsElasticsearchDomainDetails' :: Maybe (HashMap Text Text)
endpoints = Maybe (HashMap Text Text)
a} :: AwsElasticsearchDomainDetails) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> AwsElasticsearchDomainDetails
 -> f AwsElasticsearchDomainDetails)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AwsElasticsearchDomainDetails
-> f AwsElasticsearchDomainDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Additional options for the domain endpoint.
awsElasticsearchDomainDetails_domainEndpointOptions :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe AwsElasticsearchDomainDomainEndpointOptions)
awsElasticsearchDomainDetails_domainEndpointOptions :: (Maybe AwsElasticsearchDomainDomainEndpointOptions
 -> f (Maybe AwsElasticsearchDomainDomainEndpointOptions))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_domainEndpointOptions = (AwsElasticsearchDomainDetails
 -> Maybe AwsElasticsearchDomainDomainEndpointOptions)
-> (AwsElasticsearchDomainDetails
    -> Maybe AwsElasticsearchDomainDomainEndpointOptions
    -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe AwsElasticsearchDomainDomainEndpointOptions)
     (Maybe AwsElasticsearchDomainDomainEndpointOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe AwsElasticsearchDomainDomainEndpointOptions
domainEndpointOptions :: Maybe AwsElasticsearchDomainDomainEndpointOptions
$sel:domainEndpointOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainDomainEndpointOptions
domainEndpointOptions} -> Maybe AwsElasticsearchDomainDomainEndpointOptions
domainEndpointOptions) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe AwsElasticsearchDomainDomainEndpointOptions
a -> AwsElasticsearchDomainDetails
s {$sel:domainEndpointOptions:AwsElasticsearchDomainDetails' :: Maybe AwsElasticsearchDomainDomainEndpointOptions
domainEndpointOptions = Maybe AwsElasticsearchDomainDomainEndpointOptions
a} :: AwsElasticsearchDomainDetails)

-- | Domain-specific endpoint used to submit index, search, and data upload
-- requests to an Elasticsearch domain.
--
-- The endpoint is a service URL.
awsElasticsearchDomainDetails_endpoint :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe Prelude.Text)
awsElasticsearchDomainDetails_endpoint :: (Maybe Text -> f (Maybe Text))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_endpoint = (AwsElasticsearchDomainDetails -> Maybe Text)
-> (AwsElasticsearchDomainDetails
    -> Maybe Text -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe Text
endpoint :: Maybe Text
$sel:endpoint:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
endpoint} -> Maybe Text
endpoint) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe Text
a -> AwsElasticsearchDomainDetails
s {$sel:endpoint:AwsElasticsearchDomainDetails' :: Maybe Text
endpoint = Maybe Text
a} :: AwsElasticsearchDomainDetails)

-- | OpenSearch version.
awsElasticsearchDomainDetails_elasticsearchVersion :: Lens.Lens' AwsElasticsearchDomainDetails (Prelude.Maybe Prelude.Text)
awsElasticsearchDomainDetails_elasticsearchVersion :: (Maybe Text -> f (Maybe Text))
-> AwsElasticsearchDomainDetails -> f AwsElasticsearchDomainDetails
awsElasticsearchDomainDetails_elasticsearchVersion = (AwsElasticsearchDomainDetails -> Maybe Text)
-> (AwsElasticsearchDomainDetails
    -> Maybe Text -> AwsElasticsearchDomainDetails)
-> Lens
     AwsElasticsearchDomainDetails
     AwsElasticsearchDomainDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainDetails' {Maybe Text
elasticsearchVersion :: Maybe Text
$sel:elasticsearchVersion:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
elasticsearchVersion} -> Maybe Text
elasticsearchVersion) (\s :: AwsElasticsearchDomainDetails
s@AwsElasticsearchDomainDetails' {} Maybe Text
a -> AwsElasticsearchDomainDetails
s {$sel:elasticsearchVersion:AwsElasticsearchDomainDetails' :: Maybe Text
elasticsearchVersion = Maybe Text
a} :: AwsElasticsearchDomainDetails)

instance Core.FromJSON AwsElasticsearchDomainDetails where
  parseJSON :: Value -> Parser AwsElasticsearchDomainDetails
parseJSON =
    String
-> (Object -> Parser AwsElasticsearchDomainDetails)
-> Value
-> Parser AwsElasticsearchDomainDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsElasticsearchDomainDetails"
      ( \Object
x ->
          Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
-> Maybe Text
-> Maybe AwsElasticsearchDomainServiceSoftwareOptions
-> Maybe AwsElasticsearchDomainLogPublishingOptions
-> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Text
-> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
-> Maybe AwsElasticsearchDomainVPCOptions
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe AwsElasticsearchDomainDomainEndpointOptions
-> Maybe Text
-> Maybe Text
-> AwsElasticsearchDomainDetails
AwsElasticsearchDomainDetails'
            (Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
 -> Maybe Text
 -> Maybe AwsElasticsearchDomainServiceSoftwareOptions
 -> Maybe AwsElasticsearchDomainLogPublishingOptions
 -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
 -> Maybe Text
 -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
 -> Maybe AwsElasticsearchDomainVPCOptions
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe AwsElasticsearchDomainDomainEndpointOptions
 -> Maybe Text
 -> Maybe Text
 -> AwsElasticsearchDomainDetails)
-> Parser (Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions)
-> Parser
     (Maybe Text
      -> Maybe AwsElasticsearchDomainServiceSoftwareOptions
      -> Maybe AwsElasticsearchDomainLogPublishingOptions
      -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
      -> Maybe Text
      -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
      -> Maybe AwsElasticsearchDomainVPCOptions
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text
      -> Maybe Text
      -> AwsElasticsearchDomainDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Parser (Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NodeToNodeEncryptionOptions")
            Parser
  (Maybe Text
   -> Maybe AwsElasticsearchDomainServiceSoftwareOptions
   -> Maybe AwsElasticsearchDomainLogPublishingOptions
   -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
   -> Maybe Text
   -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
   -> Maybe AwsElasticsearchDomainVPCOptions
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text
   -> Maybe Text
   -> AwsElasticsearchDomainDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe AwsElasticsearchDomainServiceSoftwareOptions
      -> Maybe AwsElasticsearchDomainLogPublishingOptions
      -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
      -> Maybe Text
      -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
      -> Maybe AwsElasticsearchDomainVPCOptions
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text
      -> Maybe Text
      -> AwsElasticsearchDomainDetails)
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
"AccessPolicies")
            Parser
  (Maybe AwsElasticsearchDomainServiceSoftwareOptions
   -> Maybe AwsElasticsearchDomainLogPublishingOptions
   -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
   -> Maybe Text
   -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
   -> Maybe AwsElasticsearchDomainVPCOptions
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text
   -> Maybe Text
   -> AwsElasticsearchDomainDetails)
-> Parser (Maybe AwsElasticsearchDomainServiceSoftwareOptions)
-> Parser
     (Maybe AwsElasticsearchDomainLogPublishingOptions
      -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
      -> Maybe Text
      -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
      -> Maybe AwsElasticsearchDomainVPCOptions
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text
      -> Maybe Text
      -> AwsElasticsearchDomainDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe AwsElasticsearchDomainServiceSoftwareOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceSoftwareOptions")
            Parser
  (Maybe AwsElasticsearchDomainLogPublishingOptions
   -> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
   -> Maybe Text
   -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
   -> Maybe AwsElasticsearchDomainVPCOptions
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text
   -> Maybe Text
   -> AwsElasticsearchDomainDetails)
-> Parser (Maybe AwsElasticsearchDomainLogPublishingOptions)
-> Parser
     (Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
      -> Maybe Text
      -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
      -> Maybe AwsElasticsearchDomainVPCOptions
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text
      -> Maybe Text
      -> AwsElasticsearchDomainDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe AwsElasticsearchDomainLogPublishingOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LogPublishingOptions")
            Parser
  (Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
   -> Maybe Text
   -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
   -> Maybe AwsElasticsearchDomainVPCOptions
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text
   -> Maybe Text
   -> AwsElasticsearchDomainDetails)
-> Parser
     (Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails)
-> Parser
     (Maybe Text
      -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
      -> Maybe AwsElasticsearchDomainVPCOptions
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text
      -> Maybe Text
      -> AwsElasticsearchDomainDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ElasticsearchClusterConfig")
            Parser
  (Maybe Text
   -> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
   -> Maybe AwsElasticsearchDomainVPCOptions
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text
   -> Maybe Text
   -> AwsElasticsearchDomainDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe AwsElasticsearchDomainEncryptionAtRestOptions
      -> Maybe AwsElasticsearchDomainVPCOptions
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text
      -> Maybe Text
      -> AwsElasticsearchDomainDetails)
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
"DomainName")
            Parser
  (Maybe AwsElasticsearchDomainEncryptionAtRestOptions
   -> Maybe AwsElasticsearchDomainVPCOptions
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text
   -> Maybe Text
   -> AwsElasticsearchDomainDetails)
-> Parser (Maybe AwsElasticsearchDomainEncryptionAtRestOptions)
-> Parser
     (Maybe AwsElasticsearchDomainVPCOptions
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text
      -> Maybe Text
      -> AwsElasticsearchDomainDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe AwsElasticsearchDomainEncryptionAtRestOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EncryptionAtRestOptions")
            Parser
  (Maybe AwsElasticsearchDomainVPCOptions
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text
   -> Maybe Text
   -> AwsElasticsearchDomainDetails)
-> Parser (Maybe AwsElasticsearchDomainVPCOptions)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text
      -> Maybe Text
      -> AwsElasticsearchDomainDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AwsElasticsearchDomainVPCOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VPCOptions")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text
   -> Maybe Text
   -> AwsElasticsearchDomainDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text
      -> Maybe Text
      -> AwsElasticsearchDomainDetails)
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
"DomainId")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text
   -> Maybe Text
   -> AwsElasticsearchDomainDetails)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe AwsElasticsearchDomainDomainEndpointOptions
      -> Maybe Text -> Maybe Text -> AwsElasticsearchDomainDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Endpoints" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe AwsElasticsearchDomainDomainEndpointOptions
   -> Maybe Text -> Maybe Text -> AwsElasticsearchDomainDetails)
-> Parser (Maybe AwsElasticsearchDomainDomainEndpointOptions)
-> Parser
     (Maybe Text -> Maybe Text -> AwsElasticsearchDomainDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe AwsElasticsearchDomainDomainEndpointOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DomainEndpointOptions")
            Parser (Maybe Text -> Maybe Text -> AwsElasticsearchDomainDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsElasticsearchDomainDetails)
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
"Endpoint")
            Parser (Maybe Text -> AwsElasticsearchDomainDetails)
-> Parser (Maybe Text) -> Parser AwsElasticsearchDomainDetails
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
"ElasticsearchVersion")
      )

instance
  Prelude.Hashable
    AwsElasticsearchDomainDetails

instance Prelude.NFData AwsElasticsearchDomainDetails

instance Core.ToJSON AwsElasticsearchDomainDetails where
  toJSON :: AwsElasticsearchDomainDetails -> Value
toJSON AwsElasticsearchDomainDetails' {Maybe Text
Maybe (HashMap Text Text)
Maybe AwsElasticsearchDomainDomainEndpointOptions
Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
Maybe AwsElasticsearchDomainEncryptionAtRestOptions
Maybe AwsElasticsearchDomainLogPublishingOptions
Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
Maybe AwsElasticsearchDomainServiceSoftwareOptions
Maybe AwsElasticsearchDomainVPCOptions
elasticsearchVersion :: Maybe Text
endpoint :: Maybe Text
domainEndpointOptions :: Maybe AwsElasticsearchDomainDomainEndpointOptions
endpoints :: Maybe (HashMap Text Text)
domainId :: Maybe Text
vPCOptions :: Maybe AwsElasticsearchDomainVPCOptions
encryptionAtRestOptions :: Maybe AwsElasticsearchDomainEncryptionAtRestOptions
domainName :: Maybe Text
elasticsearchClusterConfig :: Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
logPublishingOptions :: Maybe AwsElasticsearchDomainLogPublishingOptions
serviceSoftwareOptions :: Maybe AwsElasticsearchDomainServiceSoftwareOptions
accessPolicies :: Maybe Text
nodeToNodeEncryptionOptions :: Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
$sel:elasticsearchVersion:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
$sel:endpoint:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
$sel:domainEndpointOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainDomainEndpointOptions
$sel:endpoints:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe (HashMap Text Text)
$sel:domainId:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
$sel:vPCOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainVPCOptions
$sel:encryptionAtRestOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
$sel:domainName:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
$sel:elasticsearchClusterConfig:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
$sel:logPublishingOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainLogPublishingOptions
$sel:serviceSoftwareOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainServiceSoftwareOptions
$sel:accessPolicies:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails -> Maybe Text
$sel:nodeToNodeEncryptionOptions:AwsElasticsearchDomainDetails' :: AwsElasticsearchDomainDetails
-> Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NodeToNodeEncryptionOptions" Text -> AwsElasticsearchDomainNodeToNodeEncryptionOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsElasticsearchDomainNodeToNodeEncryptionOptions -> Pair)
-> Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElasticsearchDomainNodeToNodeEncryptionOptions
nodeToNodeEncryptionOptions,
            (Text
"AccessPolicies" 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
accessPolicies,
            (Text
"ServiceSoftwareOptions" Text -> AwsElasticsearchDomainServiceSoftwareOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsElasticsearchDomainServiceSoftwareOptions -> Pair)
-> Maybe AwsElasticsearchDomainServiceSoftwareOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElasticsearchDomainServiceSoftwareOptions
serviceSoftwareOptions,
            (Text
"LogPublishingOptions" Text -> AwsElasticsearchDomainLogPublishingOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsElasticsearchDomainLogPublishingOptions -> Pair)
-> Maybe AwsElasticsearchDomainLogPublishingOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElasticsearchDomainLogPublishingOptions
logPublishingOptions,
            (Text
"ElasticsearchClusterConfig" Text
-> AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsElasticsearchDomainElasticsearchClusterConfigDetails -> Pair)
-> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElasticsearchDomainElasticsearchClusterConfigDetails
elasticsearchClusterConfig,
            (Text
"DomainName" 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
domainName,
            (Text
"EncryptionAtRestOptions" Text -> AwsElasticsearchDomainEncryptionAtRestOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsElasticsearchDomainEncryptionAtRestOptions -> Pair)
-> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElasticsearchDomainEncryptionAtRestOptions
encryptionAtRestOptions,
            (Text
"VPCOptions" Text -> AwsElasticsearchDomainVPCOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AwsElasticsearchDomainVPCOptions -> Pair)
-> Maybe AwsElasticsearchDomainVPCOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElasticsearchDomainVPCOptions
vPCOptions,
            (Text
"DomainId" 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
domainId,
            (Text
"Endpoints" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
endpoints,
            (Text
"DomainEndpointOptions" Text -> AwsElasticsearchDomainDomainEndpointOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsElasticsearchDomainDomainEndpointOptions -> Pair)
-> Maybe AwsElasticsearchDomainDomainEndpointOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElasticsearchDomainDomainEndpointOptions
domainEndpointOptions,
            (Text
"Endpoint" 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
endpoint,
            (Text
"ElasticsearchVersion" 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
elasticsearchVersion
          ]
      )