{-# 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.EMR.Types.KerberosAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KerberosAttributes = KerberosAttributes'
{
KerberosAttributes -> Maybe Text
kdcAdminPassword :: Prelude.Maybe Prelude.Text,
KerberosAttributes -> Maybe Text
realm :: Prelude.Maybe Prelude.Text,
KerberosAttributes -> Maybe Text
aDDomainJoinPassword :: Prelude.Maybe Prelude.Text,
KerberosAttributes -> Maybe Text
crossRealmTrustPrincipalPassword :: Prelude.Maybe Prelude.Text,
KerberosAttributes -> Maybe Text
aDDomainJoinUser :: Prelude.Maybe Prelude.Text
}
deriving (KerberosAttributes -> KerberosAttributes -> Bool
(KerberosAttributes -> KerberosAttributes -> Bool)
-> (KerberosAttributes -> KerberosAttributes -> Bool)
-> Eq KerberosAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KerberosAttributes -> KerberosAttributes -> Bool
$c/= :: KerberosAttributes -> KerberosAttributes -> Bool
== :: KerberosAttributes -> KerberosAttributes -> Bool
$c== :: KerberosAttributes -> KerberosAttributes -> Bool
Prelude.Eq, ReadPrec [KerberosAttributes]
ReadPrec KerberosAttributes
Int -> ReadS KerberosAttributes
ReadS [KerberosAttributes]
(Int -> ReadS KerberosAttributes)
-> ReadS [KerberosAttributes]
-> ReadPrec KerberosAttributes
-> ReadPrec [KerberosAttributes]
-> Read KerberosAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KerberosAttributes]
$creadListPrec :: ReadPrec [KerberosAttributes]
readPrec :: ReadPrec KerberosAttributes
$creadPrec :: ReadPrec KerberosAttributes
readList :: ReadS [KerberosAttributes]
$creadList :: ReadS [KerberosAttributes]
readsPrec :: Int -> ReadS KerberosAttributes
$creadsPrec :: Int -> ReadS KerberosAttributes
Prelude.Read, Int -> KerberosAttributes -> ShowS
[KerberosAttributes] -> ShowS
KerberosAttributes -> String
(Int -> KerberosAttributes -> ShowS)
-> (KerberosAttributes -> String)
-> ([KerberosAttributes] -> ShowS)
-> Show KerberosAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KerberosAttributes] -> ShowS
$cshowList :: [KerberosAttributes] -> ShowS
show :: KerberosAttributes -> String
$cshow :: KerberosAttributes -> String
showsPrec :: Int -> KerberosAttributes -> ShowS
$cshowsPrec :: Int -> KerberosAttributes -> ShowS
Prelude.Show, (forall x. KerberosAttributes -> Rep KerberosAttributes x)
-> (forall x. Rep KerberosAttributes x -> KerberosAttributes)
-> Generic KerberosAttributes
forall x. Rep KerberosAttributes x -> KerberosAttributes
forall x. KerberosAttributes -> Rep KerberosAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KerberosAttributes x -> KerberosAttributes
$cfrom :: forall x. KerberosAttributes -> Rep KerberosAttributes x
Prelude.Generic)
newKerberosAttributes ::
KerberosAttributes
newKerberosAttributes :: KerberosAttributes
newKerberosAttributes =
KerberosAttributes' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> KerberosAttributes
KerberosAttributes'
{ $sel:kdcAdminPassword:KerberosAttributes' :: Maybe Text
kdcAdminPassword =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:realm:KerberosAttributes' :: Maybe Text
realm = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:aDDomainJoinPassword:KerberosAttributes' :: Maybe Text
aDDomainJoinPassword = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:crossRealmTrustPrincipalPassword:KerberosAttributes' :: Maybe Text
crossRealmTrustPrincipalPassword = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:aDDomainJoinUser:KerberosAttributes' :: Maybe Text
aDDomainJoinUser = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
kerberosAttributes_kdcAdminPassword :: Lens.Lens' KerberosAttributes (Prelude.Maybe Prelude.Text)
kerberosAttributes_kdcAdminPassword :: (Maybe Text -> f (Maybe Text))
-> KerberosAttributes -> f KerberosAttributes
kerberosAttributes_kdcAdminPassword = (KerberosAttributes -> Maybe Text)
-> (KerberosAttributes -> Maybe Text -> KerberosAttributes)
-> Lens
KerberosAttributes KerberosAttributes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KerberosAttributes' {Maybe Text
kdcAdminPassword :: Maybe Text
$sel:kdcAdminPassword:KerberosAttributes' :: KerberosAttributes -> Maybe Text
kdcAdminPassword} -> Maybe Text
kdcAdminPassword) (\s :: KerberosAttributes
s@KerberosAttributes' {} Maybe Text
a -> KerberosAttributes
s {$sel:kdcAdminPassword:KerberosAttributes' :: Maybe Text
kdcAdminPassword = Maybe Text
a} :: KerberosAttributes)
kerberosAttributes_realm :: Lens.Lens' KerberosAttributes (Prelude.Maybe Prelude.Text)
kerberosAttributes_realm :: (Maybe Text -> f (Maybe Text))
-> KerberosAttributes -> f KerberosAttributes
kerberosAttributes_realm = (KerberosAttributes -> Maybe Text)
-> (KerberosAttributes -> Maybe Text -> KerberosAttributes)
-> Lens
KerberosAttributes KerberosAttributes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KerberosAttributes' {Maybe Text
realm :: Maybe Text
$sel:realm:KerberosAttributes' :: KerberosAttributes -> Maybe Text
realm} -> Maybe Text
realm) (\s :: KerberosAttributes
s@KerberosAttributes' {} Maybe Text
a -> KerberosAttributes
s {$sel:realm:KerberosAttributes' :: Maybe Text
realm = Maybe Text
a} :: KerberosAttributes)
kerberosAttributes_aDDomainJoinPassword :: Lens.Lens' KerberosAttributes (Prelude.Maybe Prelude.Text)
kerberosAttributes_aDDomainJoinPassword :: (Maybe Text -> f (Maybe Text))
-> KerberosAttributes -> f KerberosAttributes
kerberosAttributes_aDDomainJoinPassword = (KerberosAttributes -> Maybe Text)
-> (KerberosAttributes -> Maybe Text -> KerberosAttributes)
-> Lens
KerberosAttributes KerberosAttributes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KerberosAttributes' {Maybe Text
aDDomainJoinPassword :: Maybe Text
$sel:aDDomainJoinPassword:KerberosAttributes' :: KerberosAttributes -> Maybe Text
aDDomainJoinPassword} -> Maybe Text
aDDomainJoinPassword) (\s :: KerberosAttributes
s@KerberosAttributes' {} Maybe Text
a -> KerberosAttributes
s {$sel:aDDomainJoinPassword:KerberosAttributes' :: Maybe Text
aDDomainJoinPassword = Maybe Text
a} :: KerberosAttributes)
kerberosAttributes_crossRealmTrustPrincipalPassword :: Lens.Lens' KerberosAttributes (Prelude.Maybe Prelude.Text)
kerberosAttributes_crossRealmTrustPrincipalPassword :: (Maybe Text -> f (Maybe Text))
-> KerberosAttributes -> f KerberosAttributes
kerberosAttributes_crossRealmTrustPrincipalPassword = (KerberosAttributes -> Maybe Text)
-> (KerberosAttributes -> Maybe Text -> KerberosAttributes)
-> Lens
KerberosAttributes KerberosAttributes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KerberosAttributes' {Maybe Text
crossRealmTrustPrincipalPassword :: Maybe Text
$sel:crossRealmTrustPrincipalPassword:KerberosAttributes' :: KerberosAttributes -> Maybe Text
crossRealmTrustPrincipalPassword} -> Maybe Text
crossRealmTrustPrincipalPassword) (\s :: KerberosAttributes
s@KerberosAttributes' {} Maybe Text
a -> KerberosAttributes
s {$sel:crossRealmTrustPrincipalPassword:KerberosAttributes' :: Maybe Text
crossRealmTrustPrincipalPassword = Maybe Text
a} :: KerberosAttributes)
kerberosAttributes_aDDomainJoinUser :: Lens.Lens' KerberosAttributes (Prelude.Maybe Prelude.Text)
kerberosAttributes_aDDomainJoinUser :: (Maybe Text -> f (Maybe Text))
-> KerberosAttributes -> f KerberosAttributes
kerberosAttributes_aDDomainJoinUser = (KerberosAttributes -> Maybe Text)
-> (KerberosAttributes -> Maybe Text -> KerberosAttributes)
-> Lens
KerberosAttributes KerberosAttributes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KerberosAttributes' {Maybe Text
aDDomainJoinUser :: Maybe Text
$sel:aDDomainJoinUser:KerberosAttributes' :: KerberosAttributes -> Maybe Text
aDDomainJoinUser} -> Maybe Text
aDDomainJoinUser) (\s :: KerberosAttributes
s@KerberosAttributes' {} Maybe Text
a -> KerberosAttributes
s {$sel:aDDomainJoinUser:KerberosAttributes' :: Maybe Text
aDDomainJoinUser = Maybe Text
a} :: KerberosAttributes)
instance Core.FromJSON KerberosAttributes where
parseJSON :: Value -> Parser KerberosAttributes
parseJSON =
String
-> (Object -> Parser KerberosAttributes)
-> Value
-> Parser KerberosAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"KerberosAttributes"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> KerberosAttributes
KerberosAttributes'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> KerberosAttributes)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> KerberosAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KdcAdminPassword")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> KerberosAttributes)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> KerberosAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Realm")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> KerberosAttributes)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> KerberosAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ADDomainJoinPassword")
Parser (Maybe Text -> Maybe Text -> KerberosAttributes)
-> Parser (Maybe Text) -> Parser (Maybe Text -> KerberosAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CrossRealmTrustPrincipalPassword")
Parser (Maybe Text -> KerberosAttributes)
-> Parser (Maybe Text) -> Parser KerberosAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ADDomainJoinUser")
)
instance Prelude.Hashable KerberosAttributes
instance Prelude.NFData KerberosAttributes
instance Core.ToJSON KerberosAttributes where
toJSON :: KerberosAttributes -> Value
toJSON KerberosAttributes' {Maybe Text
aDDomainJoinUser :: Maybe Text
crossRealmTrustPrincipalPassword :: Maybe Text
aDDomainJoinPassword :: Maybe Text
realm :: Maybe Text
kdcAdminPassword :: Maybe Text
$sel:aDDomainJoinUser:KerberosAttributes' :: KerberosAttributes -> Maybe Text
$sel:crossRealmTrustPrincipalPassword:KerberosAttributes' :: KerberosAttributes -> Maybe Text
$sel:aDDomainJoinPassword:KerberosAttributes' :: KerberosAttributes -> Maybe Text
$sel:realm:KerberosAttributes' :: KerberosAttributes -> Maybe Text
$sel:kdcAdminPassword:KerberosAttributes' :: KerberosAttributes -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"KdcAdminPassword" 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
kdcAdminPassword,
(Text
"Realm" 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
realm,
(Text
"ADDomainJoinPassword" 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
aDDomainJoinPassword,
(Text
"CrossRealmTrustPrincipalPassword" 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
crossRealmTrustPrincipalPassword,
(Text
"ADDomainJoinUser" 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
aDDomainJoinUser
]
)