{-# 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.ManagedBlockChain.Types.MemberFabricConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MemberFabricConfiguration = MemberFabricConfiguration'
{
MemberFabricConfiguration -> Text
adminUsername :: Prelude.Text,
MemberFabricConfiguration -> Sensitive Text
adminPassword :: Core.Sensitive Prelude.Text
}
deriving (MemberFabricConfiguration -> MemberFabricConfiguration -> Bool
(MemberFabricConfiguration -> MemberFabricConfiguration -> Bool)
-> (MemberFabricConfiguration -> MemberFabricConfiguration -> Bool)
-> Eq MemberFabricConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemberFabricConfiguration -> MemberFabricConfiguration -> Bool
$c/= :: MemberFabricConfiguration -> MemberFabricConfiguration -> Bool
== :: MemberFabricConfiguration -> MemberFabricConfiguration -> Bool
$c== :: MemberFabricConfiguration -> MemberFabricConfiguration -> Bool
Prelude.Eq, Int -> MemberFabricConfiguration -> ShowS
[MemberFabricConfiguration] -> ShowS
MemberFabricConfiguration -> String
(Int -> MemberFabricConfiguration -> ShowS)
-> (MemberFabricConfiguration -> String)
-> ([MemberFabricConfiguration] -> ShowS)
-> Show MemberFabricConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MemberFabricConfiguration] -> ShowS
$cshowList :: [MemberFabricConfiguration] -> ShowS
show :: MemberFabricConfiguration -> String
$cshow :: MemberFabricConfiguration -> String
showsPrec :: Int -> MemberFabricConfiguration -> ShowS
$cshowsPrec :: Int -> MemberFabricConfiguration -> ShowS
Prelude.Show, (forall x.
MemberFabricConfiguration -> Rep MemberFabricConfiguration x)
-> (forall x.
Rep MemberFabricConfiguration x -> MemberFabricConfiguration)
-> Generic MemberFabricConfiguration
forall x.
Rep MemberFabricConfiguration x -> MemberFabricConfiguration
forall x.
MemberFabricConfiguration -> Rep MemberFabricConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MemberFabricConfiguration x -> MemberFabricConfiguration
$cfrom :: forall x.
MemberFabricConfiguration -> Rep MemberFabricConfiguration x
Prelude.Generic)
newMemberFabricConfiguration ::
Prelude.Text ->
Prelude.Text ->
MemberFabricConfiguration
newMemberFabricConfiguration :: Text -> Text -> MemberFabricConfiguration
newMemberFabricConfiguration
Text
pAdminUsername_
Text
pAdminPassword_ =
MemberFabricConfiguration' :: Text -> Sensitive Text -> MemberFabricConfiguration
MemberFabricConfiguration'
{ $sel:adminUsername:MemberFabricConfiguration' :: Text
adminUsername =
Text
pAdminUsername_,
$sel:adminPassword:MemberFabricConfiguration' :: Sensitive Text
adminPassword =
Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pAdminPassword_
}
memberFabricConfiguration_adminUsername :: Lens.Lens' MemberFabricConfiguration Prelude.Text
memberFabricConfiguration_adminUsername :: (Text -> f Text)
-> MemberFabricConfiguration -> f MemberFabricConfiguration
memberFabricConfiguration_adminUsername = (MemberFabricConfiguration -> Text)
-> (MemberFabricConfiguration -> Text -> MemberFabricConfiguration)
-> Lens
MemberFabricConfiguration MemberFabricConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberFabricConfiguration' {Text
adminUsername :: Text
$sel:adminUsername:MemberFabricConfiguration' :: MemberFabricConfiguration -> Text
adminUsername} -> Text
adminUsername) (\s :: MemberFabricConfiguration
s@MemberFabricConfiguration' {} Text
a -> MemberFabricConfiguration
s {$sel:adminUsername:MemberFabricConfiguration' :: Text
adminUsername = Text
a} :: MemberFabricConfiguration)
memberFabricConfiguration_adminPassword :: Lens.Lens' MemberFabricConfiguration Prelude.Text
memberFabricConfiguration_adminPassword :: (Text -> f Text)
-> MemberFabricConfiguration -> f MemberFabricConfiguration
memberFabricConfiguration_adminPassword = (MemberFabricConfiguration -> Sensitive Text)
-> (MemberFabricConfiguration
-> Sensitive Text -> MemberFabricConfiguration)
-> Lens
MemberFabricConfiguration
MemberFabricConfiguration
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberFabricConfiguration' {Sensitive Text
adminPassword :: Sensitive Text
$sel:adminPassword:MemberFabricConfiguration' :: MemberFabricConfiguration -> Sensitive Text
adminPassword} -> Sensitive Text
adminPassword) (\s :: MemberFabricConfiguration
s@MemberFabricConfiguration' {} Sensitive Text
a -> MemberFabricConfiguration
s {$sel:adminPassword:MemberFabricConfiguration' :: Sensitive Text
adminPassword = Sensitive Text
a} :: MemberFabricConfiguration) ((Sensitive Text -> f (Sensitive Text))
-> MemberFabricConfiguration -> f MemberFabricConfiguration)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> MemberFabricConfiguration
-> f MemberFabricConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Prelude.Hashable MemberFabricConfiguration
instance Prelude.NFData MemberFabricConfiguration
instance Core.ToJSON MemberFabricConfiguration where
toJSON :: MemberFabricConfiguration -> Value
toJSON MemberFabricConfiguration' {Text
Sensitive Text
adminPassword :: Sensitive Text
adminUsername :: Text
$sel:adminPassword:MemberFabricConfiguration' :: MemberFabricConfiguration -> Sensitive Text
$sel:adminUsername:MemberFabricConfiguration' :: MemberFabricConfiguration -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AdminUsername" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
adminUsername),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AdminPassword" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
adminPassword)
]
)