{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ElasticSearch.Types.DomainEndpointOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticSearch.Types.TLSSecurityPolicy
import qualified Amazonka.Prelude as Prelude
data DomainEndpointOptions = DomainEndpointOptions'
{
DomainEndpointOptions -> Maybe Text
customEndpoint :: Prelude.Maybe Prelude.Text,
DomainEndpointOptions -> Maybe Text
customEndpointCertificateArn :: Prelude.Maybe Prelude.Text,
DomainEndpointOptions -> Maybe Bool
customEndpointEnabled :: Prelude.Maybe Prelude.Bool,
DomainEndpointOptions -> Maybe Bool
enforceHTTPS :: Prelude.Maybe Prelude.Bool,
DomainEndpointOptions -> Maybe TLSSecurityPolicy
tLSSecurityPolicy :: Prelude.Maybe TLSSecurityPolicy
}
deriving (DomainEndpointOptions -> DomainEndpointOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainEndpointOptions -> DomainEndpointOptions -> Bool
$c/= :: DomainEndpointOptions -> DomainEndpointOptions -> Bool
== :: DomainEndpointOptions -> DomainEndpointOptions -> Bool
$c== :: DomainEndpointOptions -> DomainEndpointOptions -> Bool
Prelude.Eq, ReadPrec [DomainEndpointOptions]
ReadPrec DomainEndpointOptions
Int -> ReadS DomainEndpointOptions
ReadS [DomainEndpointOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainEndpointOptions]
$creadListPrec :: ReadPrec [DomainEndpointOptions]
readPrec :: ReadPrec DomainEndpointOptions
$creadPrec :: ReadPrec DomainEndpointOptions
readList :: ReadS [DomainEndpointOptions]
$creadList :: ReadS [DomainEndpointOptions]
readsPrec :: Int -> ReadS DomainEndpointOptions
$creadsPrec :: Int -> ReadS DomainEndpointOptions
Prelude.Read, Int -> DomainEndpointOptions -> ShowS
[DomainEndpointOptions] -> ShowS
DomainEndpointOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainEndpointOptions] -> ShowS
$cshowList :: [DomainEndpointOptions] -> ShowS
show :: DomainEndpointOptions -> String
$cshow :: DomainEndpointOptions -> String
showsPrec :: Int -> DomainEndpointOptions -> ShowS
$cshowsPrec :: Int -> DomainEndpointOptions -> ShowS
Prelude.Show, forall x. Rep DomainEndpointOptions x -> DomainEndpointOptions
forall x. DomainEndpointOptions -> Rep DomainEndpointOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainEndpointOptions x -> DomainEndpointOptions
$cfrom :: forall x. DomainEndpointOptions -> Rep DomainEndpointOptions x
Prelude.Generic)
newDomainEndpointOptions ::
DomainEndpointOptions
newDomainEndpointOptions :: DomainEndpointOptions
newDomainEndpointOptions =
DomainEndpointOptions'
{ $sel:customEndpoint:DomainEndpointOptions' :: Maybe Text
customEndpoint =
forall a. Maybe a
Prelude.Nothing,
$sel:customEndpointCertificateArn:DomainEndpointOptions' :: Maybe Text
customEndpointCertificateArn = forall a. Maybe a
Prelude.Nothing,
$sel:customEndpointEnabled:DomainEndpointOptions' :: Maybe Bool
customEndpointEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:enforceHTTPS:DomainEndpointOptions' :: Maybe Bool
enforceHTTPS = forall a. Maybe a
Prelude.Nothing,
$sel:tLSSecurityPolicy:DomainEndpointOptions' :: Maybe TLSSecurityPolicy
tLSSecurityPolicy = forall a. Maybe a
Prelude.Nothing
}
domainEndpointOptions_customEndpoint :: Lens.Lens' DomainEndpointOptions (Prelude.Maybe Prelude.Text)
domainEndpointOptions_customEndpoint :: Lens' DomainEndpointOptions (Maybe Text)
domainEndpointOptions_customEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEndpointOptions' {Maybe Text
customEndpoint :: Maybe Text
$sel:customEndpoint:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Text
customEndpoint} -> Maybe Text
customEndpoint) (\s :: DomainEndpointOptions
s@DomainEndpointOptions' {} Maybe Text
a -> DomainEndpointOptions
s {$sel:customEndpoint:DomainEndpointOptions' :: Maybe Text
customEndpoint = Maybe Text
a} :: DomainEndpointOptions)
domainEndpointOptions_customEndpointCertificateArn :: Lens.Lens' DomainEndpointOptions (Prelude.Maybe Prelude.Text)
domainEndpointOptions_customEndpointCertificateArn :: Lens' DomainEndpointOptions (Maybe Text)
domainEndpointOptions_customEndpointCertificateArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEndpointOptions' {Maybe Text
customEndpointCertificateArn :: Maybe Text
$sel:customEndpointCertificateArn:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Text
customEndpointCertificateArn} -> Maybe Text
customEndpointCertificateArn) (\s :: DomainEndpointOptions
s@DomainEndpointOptions' {} Maybe Text
a -> DomainEndpointOptions
s {$sel:customEndpointCertificateArn:DomainEndpointOptions' :: Maybe Text
customEndpointCertificateArn = Maybe Text
a} :: DomainEndpointOptions)
domainEndpointOptions_customEndpointEnabled :: Lens.Lens' DomainEndpointOptions (Prelude.Maybe Prelude.Bool)
domainEndpointOptions_customEndpointEnabled :: Lens' DomainEndpointOptions (Maybe Bool)
domainEndpointOptions_customEndpointEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEndpointOptions' {Maybe Bool
customEndpointEnabled :: Maybe Bool
$sel:customEndpointEnabled:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Bool
customEndpointEnabled} -> Maybe Bool
customEndpointEnabled) (\s :: DomainEndpointOptions
s@DomainEndpointOptions' {} Maybe Bool
a -> DomainEndpointOptions
s {$sel:customEndpointEnabled:DomainEndpointOptions' :: Maybe Bool
customEndpointEnabled = Maybe Bool
a} :: DomainEndpointOptions)
domainEndpointOptions_enforceHTTPS :: Lens.Lens' DomainEndpointOptions (Prelude.Maybe Prelude.Bool)
domainEndpointOptions_enforceHTTPS :: Lens' DomainEndpointOptions (Maybe Bool)
domainEndpointOptions_enforceHTTPS = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEndpointOptions' {Maybe Bool
enforceHTTPS :: Maybe Bool
$sel:enforceHTTPS:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Bool
enforceHTTPS} -> Maybe Bool
enforceHTTPS) (\s :: DomainEndpointOptions
s@DomainEndpointOptions' {} Maybe Bool
a -> DomainEndpointOptions
s {$sel:enforceHTTPS:DomainEndpointOptions' :: Maybe Bool
enforceHTTPS = Maybe Bool
a} :: DomainEndpointOptions)
domainEndpointOptions_tLSSecurityPolicy :: Lens.Lens' DomainEndpointOptions (Prelude.Maybe TLSSecurityPolicy)
domainEndpointOptions_tLSSecurityPolicy :: Lens' DomainEndpointOptions (Maybe TLSSecurityPolicy)
domainEndpointOptions_tLSSecurityPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEndpointOptions' {Maybe TLSSecurityPolicy
tLSSecurityPolicy :: Maybe TLSSecurityPolicy
$sel:tLSSecurityPolicy:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe TLSSecurityPolicy
tLSSecurityPolicy} -> Maybe TLSSecurityPolicy
tLSSecurityPolicy) (\s :: DomainEndpointOptions
s@DomainEndpointOptions' {} Maybe TLSSecurityPolicy
a -> DomainEndpointOptions
s {$sel:tLSSecurityPolicy:DomainEndpointOptions' :: Maybe TLSSecurityPolicy
tLSSecurityPolicy = Maybe TLSSecurityPolicy
a} :: DomainEndpointOptions)
instance Data.FromJSON DomainEndpointOptions where
parseJSON :: Value -> Parser DomainEndpointOptions
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DomainEndpointOptions"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe TLSSecurityPolicy
-> DomainEndpointOptions
DomainEndpointOptions'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CustomEndpoint")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CustomEndpointCertificateArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CustomEndpointEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EnforceHTTPS")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TLSSecurityPolicy")
)
instance Prelude.Hashable DomainEndpointOptions where
hashWithSalt :: Int -> DomainEndpointOptions -> Int
hashWithSalt Int
_salt DomainEndpointOptions' {Maybe Bool
Maybe Text
Maybe TLSSecurityPolicy
tLSSecurityPolicy :: Maybe TLSSecurityPolicy
enforceHTTPS :: Maybe Bool
customEndpointEnabled :: Maybe Bool
customEndpointCertificateArn :: Maybe Text
customEndpoint :: Maybe Text
$sel:tLSSecurityPolicy:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe TLSSecurityPolicy
$sel:enforceHTTPS:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Bool
$sel:customEndpointEnabled:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Bool
$sel:customEndpointCertificateArn:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Text
$sel:customEndpoint:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customEndpoint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customEndpointCertificateArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
customEndpointEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enforceHTTPS
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TLSSecurityPolicy
tLSSecurityPolicy
instance Prelude.NFData DomainEndpointOptions where
rnf :: DomainEndpointOptions -> ()
rnf DomainEndpointOptions' {Maybe Bool
Maybe Text
Maybe TLSSecurityPolicy
tLSSecurityPolicy :: Maybe TLSSecurityPolicy
enforceHTTPS :: Maybe Bool
customEndpointEnabled :: Maybe Bool
customEndpointCertificateArn :: Maybe Text
customEndpoint :: Maybe Text
$sel:tLSSecurityPolicy:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe TLSSecurityPolicy
$sel:enforceHTTPS:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Bool
$sel:customEndpointEnabled:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Bool
$sel:customEndpointCertificateArn:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Text
$sel:customEndpoint:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customEndpoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customEndpointCertificateArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
customEndpointEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enforceHTTPS
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TLSSecurityPolicy
tLSSecurityPolicy
instance Data.ToJSON DomainEndpointOptions where
toJSON :: DomainEndpointOptions -> Value
toJSON DomainEndpointOptions' {Maybe Bool
Maybe Text
Maybe TLSSecurityPolicy
tLSSecurityPolicy :: Maybe TLSSecurityPolicy
enforceHTTPS :: Maybe Bool
customEndpointEnabled :: Maybe Bool
customEndpointCertificateArn :: Maybe Text
customEndpoint :: Maybe Text
$sel:tLSSecurityPolicy:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe TLSSecurityPolicy
$sel:enforceHTTPS:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Bool
$sel:customEndpointEnabled:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Bool
$sel:customEndpointCertificateArn:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Text
$sel:customEndpoint:DomainEndpointOptions' :: DomainEndpointOptions -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CustomEndpoint" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customEndpoint,
(Key
"CustomEndpointCertificateArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customEndpointCertificateArn,
(Key
"CustomEndpointEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
customEndpointEnabled,
(Key
"EnforceHTTPS" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enforceHTTPS,
(Key
"TLSSecurityPolicy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TLSSecurityPolicy
tLSSecurityPolicy
]
)