{-# 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.OpenSearch.Types.SAMLOptionsInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpenSearch.Types.SAMLIdp
import qualified Amazonka.Prelude as Prelude
data SAMLOptionsInput = SAMLOptionsInput'
{
SAMLOptionsInput -> Maybe (Sensitive Text)
masterUserName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
SAMLOptionsInput -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
SAMLOptionsInput -> Maybe SAMLIdp
idp :: Prelude.Maybe SAMLIdp,
SAMLOptionsInput -> Maybe Text
rolesKey :: Prelude.Maybe Prelude.Text,
SAMLOptionsInput -> Maybe Text
masterBackendRole :: Prelude.Maybe Prelude.Text,
SAMLOptionsInput -> Maybe Int
sessionTimeoutMinutes :: Prelude.Maybe Prelude.Int,
SAMLOptionsInput -> Maybe Text
subjectKey :: Prelude.Maybe Prelude.Text
}
deriving (SAMLOptionsInput -> SAMLOptionsInput -> Bool
(SAMLOptionsInput -> SAMLOptionsInput -> Bool)
-> (SAMLOptionsInput -> SAMLOptionsInput -> Bool)
-> Eq SAMLOptionsInput
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
(Int -> SAMLOptionsInput -> ShowS)
-> (SAMLOptionsInput -> String)
-> ([SAMLOptionsInput] -> ShowS)
-> Show SAMLOptionsInput
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. SAMLOptionsInput -> Rep SAMLOptionsInput x)
-> (forall x. Rep SAMLOptionsInput x -> SAMLOptionsInput)
-> Generic SAMLOptionsInput
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' :: Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe SAMLIdp
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> SAMLOptionsInput
SAMLOptionsInput'
{ $sel:masterUserName:SAMLOptionsInput' :: Maybe (Sensitive Text)
masterUserName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:SAMLOptionsInput' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:idp:SAMLOptionsInput' :: Maybe SAMLIdp
idp = Maybe SAMLIdp
forall a. Maybe a
Prelude.Nothing,
$sel:rolesKey:SAMLOptionsInput' :: Maybe Text
rolesKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:masterBackendRole:SAMLOptionsInput' :: Maybe Text
masterBackendRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sessionTimeoutMinutes:SAMLOptionsInput' :: Maybe Int
sessionTimeoutMinutes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:subjectKey:SAMLOptionsInput' :: Maybe Text
subjectKey = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
sAMLOptionsInput_masterUserName :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Text)
sAMLOptionsInput_masterUserName :: (Maybe Text -> f (Maybe Text))
-> SAMLOptionsInput -> f SAMLOptionsInput
sAMLOptionsInput_masterUserName = (SAMLOptionsInput -> Maybe (Sensitive Text))
-> (SAMLOptionsInput -> Maybe (Sensitive Text) -> SAMLOptionsInput)
-> Lens
SAMLOptionsInput
SAMLOptionsInput
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> SAMLOptionsInput -> f SAMLOptionsInput)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SAMLOptionsInput
-> f SAMLOptionsInput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
sAMLOptionsInput_enabled :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Bool)
sAMLOptionsInput_enabled :: (Maybe Bool -> f (Maybe Bool))
-> SAMLOptionsInput -> f SAMLOptionsInput
sAMLOptionsInput_enabled = (SAMLOptionsInput -> Maybe Bool)
-> (SAMLOptionsInput -> Maybe Bool -> SAMLOptionsInput)
-> Lens SAMLOptionsInput SAMLOptionsInput (Maybe Bool) (Maybe Bool)
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 :: (Maybe SAMLIdp -> f (Maybe SAMLIdp))
-> SAMLOptionsInput -> f SAMLOptionsInput
sAMLOptionsInput_idp = (SAMLOptionsInput -> Maybe SAMLIdp)
-> (SAMLOptionsInput -> Maybe SAMLIdp -> SAMLOptionsInput)
-> Lens
SAMLOptionsInput SAMLOptionsInput (Maybe SAMLIdp) (Maybe SAMLIdp)
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_rolesKey :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Text)
sAMLOptionsInput_rolesKey :: (Maybe Text -> f (Maybe Text))
-> SAMLOptionsInput -> f SAMLOptionsInput
sAMLOptionsInput_rolesKey = (SAMLOptionsInput -> Maybe Text)
-> (SAMLOptionsInput -> Maybe Text -> SAMLOptionsInput)
-> Lens SAMLOptionsInput SAMLOptionsInput (Maybe Text) (Maybe Text)
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_masterBackendRole :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Text)
sAMLOptionsInput_masterBackendRole :: (Maybe Text -> f (Maybe Text))
-> SAMLOptionsInput -> f SAMLOptionsInput
sAMLOptionsInput_masterBackendRole = (SAMLOptionsInput -> Maybe Text)
-> (SAMLOptionsInput -> Maybe Text -> SAMLOptionsInput)
-> Lens SAMLOptionsInput SAMLOptionsInput (Maybe Text) (Maybe Text)
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_sessionTimeoutMinutes :: Lens.Lens' SAMLOptionsInput (Prelude.Maybe Prelude.Int)
sAMLOptionsInput_sessionTimeoutMinutes :: (Maybe Int -> f (Maybe Int))
-> SAMLOptionsInput -> f SAMLOptionsInput
sAMLOptionsInput_sessionTimeoutMinutes = (SAMLOptionsInput -> Maybe Int)
-> (SAMLOptionsInput -> Maybe Int -> SAMLOptionsInput)
-> Lens SAMLOptionsInput SAMLOptionsInput (Maybe Int) (Maybe Int)
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 :: (Maybe Text -> f (Maybe Text))
-> SAMLOptionsInput -> f SAMLOptionsInput
sAMLOptionsInput_subjectKey = (SAMLOptionsInput -> Maybe Text)
-> (SAMLOptionsInput -> Maybe Text -> SAMLOptionsInput)
-> Lens SAMLOptionsInput SAMLOptionsInput (Maybe Text) (Maybe Text)
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
instance Prelude.NFData SAMLOptionsInput
instance Core.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
masterBackendRole :: Maybe Text
rolesKey :: Maybe Text
idp :: Maybe SAMLIdp
enabled :: Maybe Bool
masterUserName :: Maybe (Sensitive Text)
$sel:subjectKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:sessionTimeoutMinutes:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Int
$sel:masterBackendRole:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:rolesKey:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Text
$sel:idp:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe SAMLIdp
$sel:enabled:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe Bool
$sel:masterUserName:SAMLOptionsInput' :: SAMLOptionsInput -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"MasterUserName" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
masterUserName,
(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
"Idp" Text -> SAMLIdp -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SAMLIdp -> Pair) -> Maybe SAMLIdp -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SAMLIdp
idp,
(Text
"RolesKey" 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
rolesKey,
(Text
"MasterBackendRole" 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
masterBackendRole,
(Text
"SessionTimeoutMinutes" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
sessionTimeoutMinutes,
(Text
"SubjectKey" 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
subjectKey
]
)