{-# 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.SAMLOptionsInput 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.SAMLIdp
import qualified Amazonka.Prelude as Prelude
data SAMLOptionsInput = SAMLOptionsInput'
{
SAMLOptionsInput -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
SAMLOptionsInput -> Maybe SAMLIdp
idp :: Prelude.Maybe SAMLIdp,
SAMLOptionsInput -> Maybe Text
masterBackendRole :: Prelude.Maybe Prelude.Text,
SAMLOptionsInput -> Maybe (Sensitive Text)
masterUserName :: Prelude.Maybe (Data.Sensitive Prelude.Text),
SAMLOptionsInput -> Maybe Text
rolesKey :: Prelude.Maybe Prelude.Text,
SAMLOptionsInput -> Maybe Int
sessionTimeoutMinutes :: Prelude.Maybe Prelude.Int,
SAMLOptionsInput -> Maybe Text
subjectKey :: Prelude.Maybe Prelude.Text
}
deriving (SAMLOptionsInput -> SAMLOptionsInput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SAMLOptionsInput -> SAMLOptionsInput -> Bool
$c/= :: SAMLOptionsInput -> SAMLOptionsInput -> Bool
== :: SAMLOptionsInput -> SAMLOptionsInput -> Bool
$c== :: SAMLOptionsInput -> SAMLOptionsInput -> Bool
Prelude.Eq, Int -> SAMLOptionsInput -> ShowS
[SAMLOptionsInput] -> ShowS
SAMLOptionsInput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SAMLOptionsInput] -> ShowS
$cshowList :: [SAMLOptionsInput] -> ShowS
show :: SAMLOptionsInput -> String
$cshow :: SAMLOptionsInput -> String
showsPrec :: Int -> SAMLOptionsInput -> ShowS
$cshowsPrec :: Int -> SAMLOptionsInput -> ShowS
Prelude.Show, forall x. Rep SAMLOptionsInput x -> SAMLOptionsInput
forall x. SAMLOptionsInput -> Rep SAMLOptionsInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SAMLOptionsInput x -> SAMLOptionsInput
$cfrom :: forall x. SAMLOptionsInput -> Rep SAMLOptionsInput x
Prelude.Generic)
newSAMLOptionsInput ::
SAMLOptionsInput
newSAMLOptionsInput :: SAMLOptionsInput
newSAMLOptionsInput =
SAMLOptionsInput'
{ $sel:enabled:SAMLOptionsInput' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing,
$sel:idp:SAMLOptionsInput' :: Maybe SAMLIdp
idp = forall a. Maybe a
Prelude.Nothing,
$sel:masterBackendRole:SAMLOptionsInput' :: Maybe Text
masterBackendRole = forall a. Maybe a
Prelude.Nothing,
$sel:masterUserName:SAMLOptionsInput' :: Maybe (Sensitive Text)
masterUserName = forall a. Maybe a
Prelude.Nothing,
$sel:rolesKey:SAMLOptionsInput' :: Maybe Text
rolesKey = forall a. Maybe a
Prelude.Nothing,
$sel:sessionTimeoutMinutes:SAMLOptionsInput' :: Maybe Int
sessionTimeoutMinutes = forall a. Maybe a
Prelude.Nothing,
$sel:subjectKey:SAMLOptionsInput' :: Maybe Text
subjectKey = forall a. Maybe a
Prelude.Nothing
}
sAMLOptionsInput_enabled :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Bool)
sAMLOptionsInput_enabled :: Lens' SAMLOptionsInput (Maybe Bool)
sAMLOptionsInput_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsInput' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: SAMLOptionsInput
s@SAMLOptionsInput' {} Maybe Bool
a -> SAMLOptionsInput
s {$sel:enabled:SAMLOptionsInput' :: Maybe Bool
enabled = Maybe Bool
a} :: SAMLOptionsInput)
sAMLOptionsInput_idp :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe SAMLIdp)
sAMLOptionsInput_idp :: Lens' SAMLOptionsInput (Maybe SAMLIdp)
sAMLOptionsInput_idp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsInput' {Maybe SAMLIdp
idp :: Maybe SAMLIdp
$sel:idp:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe SAMLIdp
idp} -> Maybe SAMLIdp
idp) (\s :: SAMLOptionsInput
s@SAMLOptionsInput' {} Maybe SAMLIdp
a -> SAMLOptionsInput
s {$sel:idp:SAMLOptionsInput' :: Maybe SAMLIdp
idp = Maybe SAMLIdp
a} :: SAMLOptionsInput)
sAMLOptionsInput_masterBackendRole :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Text)
sAMLOptionsInput_masterBackendRole :: Lens' SAMLOptionsInput (Maybe Text)
sAMLOptionsInput_masterBackendRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsInput' {Maybe Text
masterBackendRole :: Maybe Text
$sel:masterBackendRole:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
masterBackendRole} -> Maybe Text
masterBackendRole) (\s :: SAMLOptionsInput
s@SAMLOptionsInput' {} Maybe Text
a -> SAMLOptionsInput
s {$sel:masterBackendRole:SAMLOptionsInput' :: Maybe Text
masterBackendRole = Maybe Text
a} :: SAMLOptionsInput)
sAMLOptionsInput_masterUserName :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Text)
sAMLOptionsInput_masterUserName :: Lens' SAMLOptionsInput (Maybe Text)
sAMLOptionsInput_masterUserName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsInput' {Maybe (Sensitive Text)
masterUserName :: Maybe (Sensitive Text)
$sel:masterUserName:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe (Sensitive Text)
masterUserName} -> Maybe (Sensitive Text)
masterUserName) (\s :: SAMLOptionsInput
s@SAMLOptionsInput' {} Maybe (Sensitive Text)
a -> SAMLOptionsInput
s {$sel:masterUserName:SAMLOptionsInput' :: Maybe (Sensitive Text)
masterUserName = Maybe (Sensitive Text)
a} :: SAMLOptionsInput) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
sAMLOptionsInput_rolesKey :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Text)
sAMLOptionsInput_rolesKey :: Lens' SAMLOptionsInput (Maybe Text)
sAMLOptionsInput_rolesKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsInput' {Maybe Text
rolesKey :: Maybe Text
$sel:rolesKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
rolesKey} -> Maybe Text
rolesKey) (\s :: SAMLOptionsInput
s@SAMLOptionsInput' {} Maybe Text
a -> SAMLOptionsInput
s {$sel:rolesKey:SAMLOptionsInput' :: Maybe Text
rolesKey = Maybe Text
a} :: SAMLOptionsInput)
sAMLOptionsInput_sessionTimeoutMinutes :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Int)
sAMLOptionsInput_sessionTimeoutMinutes :: Lens' SAMLOptionsInput (Maybe Int)
sAMLOptionsInput_sessionTimeoutMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsInput' {Maybe Int
sessionTimeoutMinutes :: Maybe Int
$sel:sessionTimeoutMinutes:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Int
sessionTimeoutMinutes} -> Maybe Int
sessionTimeoutMinutes) (\s :: SAMLOptionsInput
s@SAMLOptionsInput' {} Maybe Int
a -> SAMLOptionsInput
s {$sel:sessionTimeoutMinutes:SAMLOptionsInput' :: Maybe Int
sessionTimeoutMinutes = Maybe Int
a} :: SAMLOptionsInput)
sAMLOptionsInput_subjectKey :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Text)
sAMLOptionsInput_subjectKey :: Lens' SAMLOptionsInput (Maybe Text)
sAMLOptionsInput_subjectKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsInput' {Maybe Text
subjectKey :: Maybe Text
$sel:subjectKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
subjectKey} -> Maybe Text
subjectKey) (\s :: SAMLOptionsInput
s@SAMLOptionsInput' {} Maybe Text
a -> SAMLOptionsInput
s {$sel:subjectKey:SAMLOptionsInput' :: Maybe Text
subjectKey = Maybe Text
a} :: SAMLOptionsInput)
instance Prelude.Hashable SAMLOptionsInput where
hashWithSalt :: Int -> SAMLOptionsInput -> Int
hashWithSalt Int
_salt SAMLOptionsInput' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe SAMLIdp
subjectKey :: Maybe Text
sessionTimeoutMinutes :: Maybe Int
rolesKey :: Maybe Text
masterUserName :: Maybe (Sensitive Text)
masterBackendRole :: Maybe Text
idp :: Maybe SAMLIdp
enabled :: Maybe Bool
$sel:subjectKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:sessionTimeoutMinutes:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Int
$sel:rolesKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:masterUserName:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe (Sensitive Text)
$sel:masterBackendRole:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:idp:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe SAMLIdp
$sel:enabled:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SAMLIdp
idp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
masterBackendRole
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
masterUserName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
rolesKey
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
sessionTimeoutMinutes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subjectKey
instance Prelude.NFData SAMLOptionsInput where
rnf :: SAMLOptionsInput -> ()
rnf SAMLOptionsInput' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe SAMLIdp
subjectKey :: Maybe Text
sessionTimeoutMinutes :: Maybe Int
rolesKey :: Maybe Text
masterUserName :: Maybe (Sensitive Text)
masterBackendRole :: Maybe Text
idp :: Maybe SAMLIdp
enabled :: Maybe Bool
$sel:subjectKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:sessionTimeoutMinutes:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Int
$sel:rolesKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:masterUserName:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe (Sensitive Text)
$sel:masterBackendRole:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:idp:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe SAMLIdp
$sel:enabled:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SAMLIdp
idp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
masterBackendRole
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
masterUserName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
rolesKey
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
sessionTimeoutMinutes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subjectKey
instance Data.ToJSON SAMLOptionsInput where
toJSON :: SAMLOptionsInput -> Value
toJSON SAMLOptionsInput' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe SAMLIdp
subjectKey :: Maybe Text
sessionTimeoutMinutes :: Maybe Int
rolesKey :: Maybe Text
masterUserName :: Maybe (Sensitive Text)
masterBackendRole :: Maybe Text
idp :: Maybe SAMLIdp
enabled :: Maybe Bool
$sel:subjectKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:sessionTimeoutMinutes:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Int
$sel:rolesKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:masterUserName:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe (Sensitive Text)
$sel:masterBackendRole:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:idp:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe SAMLIdp
$sel:enabled:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Enabled" 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
enabled,
(Key
"Idp" 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 SAMLIdp
idp,
(Key
"MasterBackendRole" 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
masterBackendRole,
(Key
"MasterUserName" 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 (Sensitive Text)
masterUserName,
(Key
"RolesKey" 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
rolesKey,
(Key
"SessionTimeoutMinutes" 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 Int
sessionTimeoutMinutes,
(Key
"SubjectKey" 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
subjectKey
]
)