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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about additional options for the domain endpoint.
--
-- /See:/ 'newAwsOpenSearchServiceDomainDomainEndpointOptionsDetails' smart constructor.
data AwsOpenSearchServiceDomainDomainEndpointOptionsDetails = AwsOpenSearchServiceDomainDomainEndpointOptionsDetails'
  { -- | Whether to require that all traffic to the domain arrive over HTTPS.
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Bool
enforceHTTPS :: Prelude.Maybe Prelude.Bool,
    -- | The TLS security policy to apply to the HTTPS endpoint of the OpenSearch
    -- domain.
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Text
tLSSecurityPolicy :: Prelude.Maybe Prelude.Text,
    -- | Whether to enable a custom endpoint for the domain.
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Bool
customEndpointEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The fully qualified URL for the custom endpoint.
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Text
customEndpoint :: Prelude.Maybe Prelude.Text,
    -- | The ARN for the security certificate. The certificate is managed in ACM.
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Text
customEndpointCertificateArn :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> Bool
(AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
 -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> Bool)
-> (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
    -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> Bool)
-> Eq AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> Bool
$c/= :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> Bool
== :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> Bool
$c== :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> Bool
Prelude.Eq, ReadPrec [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails]
ReadPrec AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
Int -> ReadS AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
ReadS [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails]
(Int
 -> ReadS AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> ReadS [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails]
-> ReadPrec AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> ReadPrec
     [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails]
-> Read AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails]
$creadListPrec :: ReadPrec [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails]
readPrec :: ReadPrec AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
$creadPrec :: ReadPrec AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
readList :: ReadS [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails]
$creadList :: ReadS [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails]
readsPrec :: Int -> ReadS AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
$creadsPrec :: Int -> ReadS AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
Prelude.Read, Int
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> ShowS
[AwsOpenSearchServiceDomainDomainEndpointOptionsDetails] -> ShowS
AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> String
(Int
 -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> ShowS)
-> (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
    -> String)
-> ([AwsOpenSearchServiceDomainDomainEndpointOptionsDetails]
    -> ShowS)
-> Show AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails] -> ShowS
$cshowList :: [AwsOpenSearchServiceDomainDomainEndpointOptionsDetails] -> ShowS
show :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> String
$cshow :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> String
showsPrec :: Int
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> ShowS
$cshowsPrec :: Int
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> ShowS
Prelude.Show, (forall x.
 AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
 -> Rep AwsOpenSearchServiceDomainDomainEndpointOptionsDetails x)
-> (forall x.
    Rep AwsOpenSearchServiceDomainDomainEndpointOptionsDetails x
    -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Generic AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
forall x.
Rep AwsOpenSearchServiceDomainDomainEndpointOptionsDetails x
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
forall x.
AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Rep AwsOpenSearchServiceDomainDomainEndpointOptionsDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsOpenSearchServiceDomainDomainEndpointOptionsDetails x
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
$cfrom :: forall x.
AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Rep AwsOpenSearchServiceDomainDomainEndpointOptionsDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' 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:
--
-- 'enforceHTTPS', 'awsOpenSearchServiceDomainDomainEndpointOptionsDetails_enforceHTTPS' - Whether to require that all traffic to the domain arrive over HTTPS.
--
-- 'tLSSecurityPolicy', 'awsOpenSearchServiceDomainDomainEndpointOptionsDetails_tLSSecurityPolicy' - The TLS security policy to apply to the HTTPS endpoint of the OpenSearch
-- domain.
--
-- 'customEndpointEnabled', 'awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpointEnabled' - Whether to enable a custom endpoint for the domain.
--
-- 'customEndpoint', 'awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpoint' - The fully qualified URL for the custom endpoint.
--
-- 'customEndpointCertificateArn', 'awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpointCertificateArn' - The ARN for the security certificate. The certificate is managed in ACM.
newAwsOpenSearchServiceDomainDomainEndpointOptionsDetails ::
  AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
newAwsOpenSearchServiceDomainDomainEndpointOptionsDetails :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
newAwsOpenSearchServiceDomainDomainEndpointOptionsDetails =
  AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
AwsOpenSearchServiceDomainDomainEndpointOptionsDetails'
    { $sel:enforceHTTPS:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Bool
enforceHTTPS =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:tLSSecurityPolicy:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Text
tLSSecurityPolicy =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customEndpointEnabled:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Bool
customEndpointEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:customEndpoint:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Text
customEndpoint =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customEndpointCertificateArn:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Text
customEndpointCertificateArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Whether to require that all traffic to the domain arrive over HTTPS.
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_enforceHTTPS :: Lens.Lens' AwsOpenSearchServiceDomainDomainEndpointOptionsDetails (Prelude.Maybe Prelude.Bool)
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_enforceHTTPS :: (Maybe Bool -> f (Maybe Bool))
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> f AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_enforceHTTPS = (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
 -> Maybe Bool)
-> (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
    -> Maybe Bool
    -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Lens
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {Maybe Bool
enforceHTTPS :: Maybe Bool
$sel:enforceHTTPS:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Bool
enforceHTTPS} -> Maybe Bool
enforceHTTPS) (\s :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s@AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {} Maybe Bool
a -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s {$sel:enforceHTTPS:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Bool
enforceHTTPS = Maybe Bool
a} :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)

-- | The TLS security policy to apply to the HTTPS endpoint of the OpenSearch
-- domain.
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_tLSSecurityPolicy :: Lens.Lens' AwsOpenSearchServiceDomainDomainEndpointOptionsDetails (Prelude.Maybe Prelude.Text)
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_tLSSecurityPolicy :: (Maybe Text -> f (Maybe Text))
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> f AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_tLSSecurityPolicy = (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
 -> Maybe Text)
-> (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
    -> Maybe Text
    -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Lens
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {Maybe Text
tLSSecurityPolicy :: Maybe Text
$sel:tLSSecurityPolicy:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Text
tLSSecurityPolicy} -> Maybe Text
tLSSecurityPolicy) (\s :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s@AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {} Maybe Text
a -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s {$sel:tLSSecurityPolicy:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Text
tLSSecurityPolicy = Maybe Text
a} :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)

-- | Whether to enable a custom endpoint for the domain.
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpointEnabled :: Lens.Lens' AwsOpenSearchServiceDomainDomainEndpointOptionsDetails (Prelude.Maybe Prelude.Bool)
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpointEnabled :: (Maybe Bool -> f (Maybe Bool))
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> f AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpointEnabled = (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
 -> Maybe Bool)
-> (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
    -> Maybe Bool
    -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Lens
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {Maybe Bool
customEndpointEnabled :: Maybe Bool
$sel:customEndpointEnabled:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Bool
customEndpointEnabled} -> Maybe Bool
customEndpointEnabled) (\s :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s@AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {} Maybe Bool
a -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s {$sel:customEndpointEnabled:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Bool
customEndpointEnabled = Maybe Bool
a} :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)

-- | The fully qualified URL for the custom endpoint.
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpoint :: Lens.Lens' AwsOpenSearchServiceDomainDomainEndpointOptionsDetails (Prelude.Maybe Prelude.Text)
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpoint :: (Maybe Text -> f (Maybe Text))
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> f AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpoint = (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
 -> Maybe Text)
-> (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
    -> Maybe Text
    -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Lens
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {Maybe Text
customEndpoint :: Maybe Text
$sel:customEndpoint:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Text
customEndpoint} -> Maybe Text
customEndpoint) (\s :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s@AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {} Maybe Text
a -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s {$sel:customEndpoint:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Text
customEndpoint = Maybe Text
a} :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)

-- | The ARN for the security certificate. The certificate is managed in ACM.
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpointCertificateArn :: Lens.Lens' AwsOpenSearchServiceDomainDomainEndpointOptionsDetails (Prelude.Maybe Prelude.Text)
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpointCertificateArn :: (Maybe Text -> f (Maybe Text))
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> f AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
awsOpenSearchServiceDomainDomainEndpointOptionsDetails_customEndpointCertificateArn = (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
 -> Maybe Text)
-> (AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
    -> Maybe Text
    -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Lens
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {Maybe Text
customEndpointCertificateArn :: Maybe Text
$sel:customEndpointCertificateArn:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Text
customEndpointCertificateArn} -> Maybe Text
customEndpointCertificateArn) (\s :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s@AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {} Maybe Text
a -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
s {$sel:customEndpointCertificateArn:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: Maybe Text
customEndpointCertificateArn = Maybe Text
a} :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)

instance
  Core.FromJSON
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
  where
  parseJSON :: Value
-> Parser AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
parseJSON =
    String
-> (Object
    -> Parser AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Value
-> Parser AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsOpenSearchServiceDomainDomainEndpointOptionsDetails"
      ( \Object
x ->
          Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
AwsOpenSearchServiceDomainDomainEndpointOptionsDetails'
            (Maybe Bool
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
forall (f :: * -> *) a b. Functor 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
"EnforceHTTPS")
              Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
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
"TLSSecurityPolicy")
              Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
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
"CustomEndpointEnabled")
              Parser
  (Maybe Text
   -> Maybe Text
   -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
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
"CustomEndpoint")
              Parser
  (Maybe Text
   -> AwsOpenSearchServiceDomainDomainEndpointOptionsDetails)
-> Parser (Maybe Text)
-> Parser AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
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
"CustomEndpointCertificateArn")
      )

instance
  Prelude.Hashable
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails

instance
  Prelude.NFData
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails

instance
  Core.ToJSON
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
  where
  toJSON :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails -> Value
toJSON
    AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' {Maybe Bool
Maybe Text
customEndpointCertificateArn :: Maybe Text
customEndpoint :: Maybe Text
customEndpointEnabled :: Maybe Bool
tLSSecurityPolicy :: Maybe Text
enforceHTTPS :: Maybe Bool
$sel:customEndpointCertificateArn:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Text
$sel:customEndpoint:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Text
$sel:customEndpointEnabled:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Bool
$sel:tLSSecurityPolicy:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Text
$sel:enforceHTTPS:AwsOpenSearchServiceDomainDomainEndpointOptionsDetails' :: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails
-> Maybe Bool
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Text
"EnforceHTTPS" 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
enforceHTTPS,
              (Text
"TLSSecurityPolicy" 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
tLSSecurityPolicy,
              (Text
"CustomEndpointEnabled" 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
customEndpointEnabled,
              (Text
"CustomEndpoint" 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
customEndpoint,
              (Text
"CustomEndpointCertificateArn" 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
customEndpointCertificateArn
            ]
        )