{-# 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.SAMLOptionsOutput 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 SAMLOptionsOutput = SAMLOptionsOutput'
{
SAMLOptionsOutput -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
SAMLOptionsOutput -> Maybe SAMLIdp
idp :: Prelude.Maybe SAMLIdp,
SAMLOptionsOutput -> Maybe Text
rolesKey :: Prelude.Maybe Prelude.Text,
SAMLOptionsOutput -> Maybe Int
sessionTimeoutMinutes :: Prelude.Maybe Prelude.Int,
SAMLOptionsOutput -> Maybe Text
subjectKey :: Prelude.Maybe Prelude.Text
}
deriving (SAMLOptionsOutput -> SAMLOptionsOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SAMLOptionsOutput -> SAMLOptionsOutput -> Bool
$c/= :: SAMLOptionsOutput -> SAMLOptionsOutput -> Bool
== :: SAMLOptionsOutput -> SAMLOptionsOutput -> Bool
$c== :: SAMLOptionsOutput -> SAMLOptionsOutput -> Bool
Prelude.Eq, ReadPrec [SAMLOptionsOutput]
ReadPrec SAMLOptionsOutput
Int -> ReadS SAMLOptionsOutput
ReadS [SAMLOptionsOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SAMLOptionsOutput]
$creadListPrec :: ReadPrec [SAMLOptionsOutput]
readPrec :: ReadPrec SAMLOptionsOutput
$creadPrec :: ReadPrec SAMLOptionsOutput
readList :: ReadS [SAMLOptionsOutput]
$creadList :: ReadS [SAMLOptionsOutput]
readsPrec :: Int -> ReadS SAMLOptionsOutput
$creadsPrec :: Int -> ReadS SAMLOptionsOutput
Prelude.Read, Int -> SAMLOptionsOutput -> ShowS
[SAMLOptionsOutput] -> ShowS
SAMLOptionsOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SAMLOptionsOutput] -> ShowS
$cshowList :: [SAMLOptionsOutput] -> ShowS
show :: SAMLOptionsOutput -> String
$cshow :: SAMLOptionsOutput -> String
showsPrec :: Int -> SAMLOptionsOutput -> ShowS
$cshowsPrec :: Int -> SAMLOptionsOutput -> ShowS
Prelude.Show, forall x. Rep SAMLOptionsOutput x -> SAMLOptionsOutput
forall x. SAMLOptionsOutput -> Rep SAMLOptionsOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SAMLOptionsOutput x -> SAMLOptionsOutput
$cfrom :: forall x. SAMLOptionsOutput -> Rep SAMLOptionsOutput x
Prelude.Generic)
newSAMLOptionsOutput ::
SAMLOptionsOutput
newSAMLOptionsOutput :: SAMLOptionsOutput
newSAMLOptionsOutput =
SAMLOptionsOutput'
{ $sel:enabled:SAMLOptionsOutput' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing,
$sel:idp:SAMLOptionsOutput' :: Maybe SAMLIdp
idp = forall a. Maybe a
Prelude.Nothing,
$sel:rolesKey:SAMLOptionsOutput' :: Maybe Text
rolesKey = forall a. Maybe a
Prelude.Nothing,
$sel:sessionTimeoutMinutes:SAMLOptionsOutput' :: Maybe Int
sessionTimeoutMinutes = forall a. Maybe a
Prelude.Nothing,
$sel:subjectKey:SAMLOptionsOutput' :: Maybe Text
subjectKey = forall a. Maybe a
Prelude.Nothing
}
sAMLOptionsOutput_enabled :: Lens.Lens' SAMLOptionsOutput (Prelude.Maybe Prelude.Bool)
sAMLOptionsOutput_enabled :: Lens' SAMLOptionsOutput (Maybe Bool)
sAMLOptionsOutput_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsOutput' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: SAMLOptionsOutput
s@SAMLOptionsOutput' {} Maybe Bool
a -> SAMLOptionsOutput
s {$sel:enabled:SAMLOptionsOutput' :: Maybe Bool
enabled = Maybe Bool
a} :: SAMLOptionsOutput)
sAMLOptionsOutput_idp :: Lens.Lens' SAMLOptionsOutput (Prelude.Maybe SAMLIdp)
sAMLOptionsOutput_idp :: Lens' SAMLOptionsOutput (Maybe SAMLIdp)
sAMLOptionsOutput_idp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsOutput' {Maybe SAMLIdp
idp :: Maybe SAMLIdp
$sel:idp:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe SAMLIdp
idp} -> Maybe SAMLIdp
idp) (\s :: SAMLOptionsOutput
s@SAMLOptionsOutput' {} Maybe SAMLIdp
a -> SAMLOptionsOutput
s {$sel:idp:SAMLOptionsOutput' :: Maybe SAMLIdp
idp = Maybe SAMLIdp
a} :: SAMLOptionsOutput)
sAMLOptionsOutput_rolesKey :: Lens.Lens' SAMLOptionsOutput (Prelude.Maybe Prelude.Text)
sAMLOptionsOutput_rolesKey :: Lens' SAMLOptionsOutput (Maybe Text)
sAMLOptionsOutput_rolesKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsOutput' {Maybe Text
rolesKey :: Maybe Text
$sel:rolesKey:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Text
rolesKey} -> Maybe Text
rolesKey) (\s :: SAMLOptionsOutput
s@SAMLOptionsOutput' {} Maybe Text
a -> SAMLOptionsOutput
s {$sel:rolesKey:SAMLOptionsOutput' :: Maybe Text
rolesKey = Maybe Text
a} :: SAMLOptionsOutput)
sAMLOptionsOutput_sessionTimeoutMinutes :: Lens.Lens' SAMLOptionsOutput (Prelude.Maybe Prelude.Int)
sAMLOptionsOutput_sessionTimeoutMinutes :: Lens' SAMLOptionsOutput (Maybe Int)
sAMLOptionsOutput_sessionTimeoutMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsOutput' {Maybe Int
sessionTimeoutMinutes :: Maybe Int
$sel:sessionTimeoutMinutes:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Int
sessionTimeoutMinutes} -> Maybe Int
sessionTimeoutMinutes) (\s :: SAMLOptionsOutput
s@SAMLOptionsOutput' {} Maybe Int
a -> SAMLOptionsOutput
s {$sel:sessionTimeoutMinutes:SAMLOptionsOutput' :: Maybe Int
sessionTimeoutMinutes = Maybe Int
a} :: SAMLOptionsOutput)
sAMLOptionsOutput_subjectKey :: Lens.Lens' SAMLOptionsOutput (Prelude.Maybe Prelude.Text)
sAMLOptionsOutput_subjectKey :: Lens' SAMLOptionsOutput (Maybe Text)
sAMLOptionsOutput_subjectKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAMLOptionsOutput' {Maybe Text
subjectKey :: Maybe Text
$sel:subjectKey:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Text
subjectKey} -> Maybe Text
subjectKey) (\s :: SAMLOptionsOutput
s@SAMLOptionsOutput' {} Maybe Text
a -> SAMLOptionsOutput
s {$sel:subjectKey:SAMLOptionsOutput' :: Maybe Text
subjectKey = Maybe Text
a} :: SAMLOptionsOutput)
instance Data.FromJSON SAMLOptionsOutput where
parseJSON :: Value -> Parser SAMLOptionsOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SAMLOptionsOutput"
( \Object
x ->
Maybe Bool
-> Maybe SAMLIdp
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> SAMLOptionsOutput
SAMLOptionsOutput'
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
"Enabled")
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
"Idp")
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
"RolesKey")
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
"SessionTimeoutMinutes")
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
"SubjectKey")
)
instance Prelude.Hashable SAMLOptionsOutput where
hashWithSalt :: Int -> SAMLOptionsOutput -> Int
hashWithSalt Int
_salt SAMLOptionsOutput' {Maybe Bool
Maybe Int
Maybe Text
Maybe SAMLIdp
subjectKey :: Maybe Text
sessionTimeoutMinutes :: Maybe Int
rolesKey :: Maybe Text
idp :: Maybe SAMLIdp
enabled :: Maybe Bool
$sel:subjectKey:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Text
$sel:sessionTimeoutMinutes:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Int
$sel:rolesKey:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Text
$sel:idp:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe SAMLIdp
$sel:enabled:SAMLOptionsOutput' :: SAMLOptionsOutput -> 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
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 SAMLOptionsOutput where
rnf :: SAMLOptionsOutput -> ()
rnf SAMLOptionsOutput' {Maybe Bool
Maybe Int
Maybe Text
Maybe SAMLIdp
subjectKey :: Maybe Text
sessionTimeoutMinutes :: Maybe Int
rolesKey :: Maybe Text
idp :: Maybe SAMLIdp
enabled :: Maybe Bool
$sel:subjectKey:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Text
$sel:sessionTimeoutMinutes:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Int
$sel:rolesKey:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe Text
$sel:idp:SAMLOptionsOutput' :: SAMLOptionsOutput -> Maybe SAMLIdp
$sel:enabled:SAMLOptionsOutput' :: SAMLOptionsOutput -> 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
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