{-# 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.AdvancedSecurityOptionsInput where
import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types.MasterUserOptions
import Amazonka.ElasticSearch.Types.SAMLOptionsInput
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AdvancedSecurityOptionsInput = AdvancedSecurityOptionsInput'
{
AdvancedSecurityOptionsInput -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
AdvancedSecurityOptionsInput -> Maybe Bool
internalUserDatabaseEnabled :: Prelude.Maybe Prelude.Bool,
AdvancedSecurityOptionsInput -> Maybe MasterUserOptions
masterUserOptions :: Prelude.Maybe MasterUserOptions,
AdvancedSecurityOptionsInput -> Maybe SAMLOptionsInput
sAMLOptions :: Prelude.Maybe SAMLOptionsInput
}
deriving (AdvancedSecurityOptionsInput
-> AdvancedSecurityOptionsInput -> Bool
(AdvancedSecurityOptionsInput
-> AdvancedSecurityOptionsInput -> Bool)
-> (AdvancedSecurityOptionsInput
-> AdvancedSecurityOptionsInput -> Bool)
-> Eq AdvancedSecurityOptionsInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdvancedSecurityOptionsInput
-> AdvancedSecurityOptionsInput -> Bool
$c/= :: AdvancedSecurityOptionsInput
-> AdvancedSecurityOptionsInput -> Bool
== :: AdvancedSecurityOptionsInput
-> AdvancedSecurityOptionsInput -> Bool
$c== :: AdvancedSecurityOptionsInput
-> AdvancedSecurityOptionsInput -> Bool
Prelude.Eq, Int -> AdvancedSecurityOptionsInput -> ShowS
[AdvancedSecurityOptionsInput] -> ShowS
AdvancedSecurityOptionsInput -> String
(Int -> AdvancedSecurityOptionsInput -> ShowS)
-> (AdvancedSecurityOptionsInput -> String)
-> ([AdvancedSecurityOptionsInput] -> ShowS)
-> Show AdvancedSecurityOptionsInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdvancedSecurityOptionsInput] -> ShowS
$cshowList :: [AdvancedSecurityOptionsInput] -> ShowS
show :: AdvancedSecurityOptionsInput -> String
$cshow :: AdvancedSecurityOptionsInput -> String
showsPrec :: Int -> AdvancedSecurityOptionsInput -> ShowS
$cshowsPrec :: Int -> AdvancedSecurityOptionsInput -> ShowS
Prelude.Show, (forall x.
AdvancedSecurityOptionsInput -> Rep AdvancedSecurityOptionsInput x)
-> (forall x.
Rep AdvancedSecurityOptionsInput x -> AdvancedSecurityOptionsInput)
-> Generic AdvancedSecurityOptionsInput
forall x.
Rep AdvancedSecurityOptionsInput x -> AdvancedSecurityOptionsInput
forall x.
AdvancedSecurityOptionsInput -> Rep AdvancedSecurityOptionsInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AdvancedSecurityOptionsInput x -> AdvancedSecurityOptionsInput
$cfrom :: forall x.
AdvancedSecurityOptionsInput -> Rep AdvancedSecurityOptionsInput x
Prelude.Generic)
newAdvancedSecurityOptionsInput ::
AdvancedSecurityOptionsInput
newAdvancedSecurityOptionsInput :: AdvancedSecurityOptionsInput
newAdvancedSecurityOptionsInput =
AdvancedSecurityOptionsInput' :: Maybe Bool
-> Maybe Bool
-> Maybe MasterUserOptions
-> Maybe SAMLOptionsInput
-> AdvancedSecurityOptionsInput
AdvancedSecurityOptionsInput'
{ $sel:enabled:AdvancedSecurityOptionsInput' :: Maybe Bool
enabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:internalUserDatabaseEnabled:AdvancedSecurityOptionsInput' :: Maybe Bool
internalUserDatabaseEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:masterUserOptions:AdvancedSecurityOptionsInput' :: Maybe MasterUserOptions
masterUserOptions = Maybe MasterUserOptions
forall a. Maybe a
Prelude.Nothing,
$sel:sAMLOptions:AdvancedSecurityOptionsInput' :: Maybe SAMLOptionsInput
sAMLOptions = Maybe SAMLOptionsInput
forall a. Maybe a
Prelude.Nothing
}
advancedSecurityOptionsInput_enabled :: Lens.Lens' AdvancedSecurityOptionsInput (Prelude.Maybe Prelude.Bool)
advancedSecurityOptionsInput_enabled :: (Maybe Bool -> f (Maybe Bool))
-> AdvancedSecurityOptionsInput -> f AdvancedSecurityOptionsInput
advancedSecurityOptionsInput_enabled = (AdvancedSecurityOptionsInput -> Maybe Bool)
-> (AdvancedSecurityOptionsInput
-> Maybe Bool -> AdvancedSecurityOptionsInput)
-> Lens
AdvancedSecurityOptionsInput
AdvancedSecurityOptionsInput
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedSecurityOptionsInput' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:AdvancedSecurityOptionsInput' :: AdvancedSecurityOptionsInput -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: AdvancedSecurityOptionsInput
s@AdvancedSecurityOptionsInput' {} Maybe Bool
a -> AdvancedSecurityOptionsInput
s {$sel:enabled:AdvancedSecurityOptionsInput' :: Maybe Bool
enabled = Maybe Bool
a} :: AdvancedSecurityOptionsInput)
advancedSecurityOptionsInput_internalUserDatabaseEnabled :: Lens.Lens' AdvancedSecurityOptionsInput (Prelude.Maybe Prelude.Bool)
advancedSecurityOptionsInput_internalUserDatabaseEnabled :: (Maybe Bool -> f (Maybe Bool))
-> AdvancedSecurityOptionsInput -> f AdvancedSecurityOptionsInput
advancedSecurityOptionsInput_internalUserDatabaseEnabled = (AdvancedSecurityOptionsInput -> Maybe Bool)
-> (AdvancedSecurityOptionsInput
-> Maybe Bool -> AdvancedSecurityOptionsInput)
-> Lens
AdvancedSecurityOptionsInput
AdvancedSecurityOptionsInput
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedSecurityOptionsInput' {Maybe Bool
internalUserDatabaseEnabled :: Maybe Bool
$sel:internalUserDatabaseEnabled:AdvancedSecurityOptionsInput' :: AdvancedSecurityOptionsInput -> Maybe Bool
internalUserDatabaseEnabled} -> Maybe Bool
internalUserDatabaseEnabled) (\s :: AdvancedSecurityOptionsInput
s@AdvancedSecurityOptionsInput' {} Maybe Bool
a -> AdvancedSecurityOptionsInput
s {$sel:internalUserDatabaseEnabled:AdvancedSecurityOptionsInput' :: Maybe Bool
internalUserDatabaseEnabled = Maybe Bool
a} :: AdvancedSecurityOptionsInput)
advancedSecurityOptionsInput_masterUserOptions :: Lens.Lens' AdvancedSecurityOptionsInput (Prelude.Maybe MasterUserOptions)
advancedSecurityOptionsInput_masterUserOptions :: (Maybe MasterUserOptions -> f (Maybe MasterUserOptions))
-> AdvancedSecurityOptionsInput -> f AdvancedSecurityOptionsInput
advancedSecurityOptionsInput_masterUserOptions = (AdvancedSecurityOptionsInput -> Maybe MasterUserOptions)
-> (AdvancedSecurityOptionsInput
-> Maybe MasterUserOptions -> AdvancedSecurityOptionsInput)
-> Lens
AdvancedSecurityOptionsInput
AdvancedSecurityOptionsInput
(Maybe MasterUserOptions)
(Maybe MasterUserOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedSecurityOptionsInput' {Maybe MasterUserOptions
masterUserOptions :: Maybe MasterUserOptions
$sel:masterUserOptions:AdvancedSecurityOptionsInput' :: AdvancedSecurityOptionsInput -> Maybe MasterUserOptions
masterUserOptions} -> Maybe MasterUserOptions
masterUserOptions) (\s :: AdvancedSecurityOptionsInput
s@AdvancedSecurityOptionsInput' {} Maybe MasterUserOptions
a -> AdvancedSecurityOptionsInput
s {$sel:masterUserOptions:AdvancedSecurityOptionsInput' :: Maybe MasterUserOptions
masterUserOptions = Maybe MasterUserOptions
a} :: AdvancedSecurityOptionsInput)
advancedSecurityOptionsInput_sAMLOptions :: Lens.Lens' AdvancedSecurityOptionsInput (Prelude.Maybe SAMLOptionsInput)
advancedSecurityOptionsInput_sAMLOptions :: (Maybe SAMLOptionsInput -> f (Maybe SAMLOptionsInput))
-> AdvancedSecurityOptionsInput -> f AdvancedSecurityOptionsInput
advancedSecurityOptionsInput_sAMLOptions = (AdvancedSecurityOptionsInput -> Maybe SAMLOptionsInput)
-> (AdvancedSecurityOptionsInput
-> Maybe SAMLOptionsInput -> AdvancedSecurityOptionsInput)
-> Lens
AdvancedSecurityOptionsInput
AdvancedSecurityOptionsInput
(Maybe SAMLOptionsInput)
(Maybe SAMLOptionsInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedSecurityOptionsInput' {Maybe SAMLOptionsInput
sAMLOptions :: Maybe SAMLOptionsInput
$sel:sAMLOptions:AdvancedSecurityOptionsInput' :: AdvancedSecurityOptionsInput -> Maybe SAMLOptionsInput
sAMLOptions} -> Maybe SAMLOptionsInput
sAMLOptions) (\s :: AdvancedSecurityOptionsInput
s@AdvancedSecurityOptionsInput' {} Maybe SAMLOptionsInput
a -> AdvancedSecurityOptionsInput
s {$sel:sAMLOptions:AdvancedSecurityOptionsInput' :: Maybe SAMLOptionsInput
sAMLOptions = Maybe SAMLOptionsInput
a} :: AdvancedSecurityOptionsInput)
instance
Prelude.Hashable
AdvancedSecurityOptionsInput
instance Prelude.NFData AdvancedSecurityOptionsInput
instance Core.ToJSON AdvancedSecurityOptionsInput where
toJSON :: AdvancedSecurityOptionsInput -> Value
toJSON AdvancedSecurityOptionsInput' {Maybe Bool
Maybe MasterUserOptions
Maybe SAMLOptionsInput
sAMLOptions :: Maybe SAMLOptionsInput
masterUserOptions :: Maybe MasterUserOptions
internalUserDatabaseEnabled :: Maybe Bool
enabled :: Maybe Bool
$sel:sAMLOptions:AdvancedSecurityOptionsInput' :: AdvancedSecurityOptionsInput -> Maybe SAMLOptionsInput
$sel:masterUserOptions:AdvancedSecurityOptionsInput' :: AdvancedSecurityOptionsInput -> Maybe MasterUserOptions
$sel:internalUserDatabaseEnabled:AdvancedSecurityOptionsInput' :: AdvancedSecurityOptionsInput -> Maybe Bool
$sel:enabled:AdvancedSecurityOptionsInput' :: AdvancedSecurityOptionsInput -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Enabled" 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
enabled,
(Text
"InternalUserDatabaseEnabled" 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
internalUserDatabaseEnabled,
(Text
"MasterUserOptions" Text -> MasterUserOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MasterUserOptions -> Pair)
-> Maybe MasterUserOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MasterUserOptions
masterUserOptions,
(Text
"SAMLOptions" Text -> SAMLOptionsInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SAMLOptionsInput -> Pair) -> Maybe SAMLOptionsInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SAMLOptionsInput
sAMLOptions
]
)