{-# 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.MemberFabricAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MemberFabricAttributes = MemberFabricAttributes'
{
MemberFabricAttributes -> Maybe Text
caEndpoint :: Prelude.Maybe Prelude.Text,
MemberFabricAttributes -> Maybe Text
adminUsername :: Prelude.Maybe Prelude.Text
}
deriving (MemberFabricAttributes -> MemberFabricAttributes -> Bool
(MemberFabricAttributes -> MemberFabricAttributes -> Bool)
-> (MemberFabricAttributes -> MemberFabricAttributes -> Bool)
-> Eq MemberFabricAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemberFabricAttributes -> MemberFabricAttributes -> Bool
$c/= :: MemberFabricAttributes -> MemberFabricAttributes -> Bool
== :: MemberFabricAttributes -> MemberFabricAttributes -> Bool
$c== :: MemberFabricAttributes -> MemberFabricAttributes -> Bool
Prelude.Eq, ReadPrec [MemberFabricAttributes]
ReadPrec MemberFabricAttributes
Int -> ReadS MemberFabricAttributes
ReadS [MemberFabricAttributes]
(Int -> ReadS MemberFabricAttributes)
-> ReadS [MemberFabricAttributes]
-> ReadPrec MemberFabricAttributes
-> ReadPrec [MemberFabricAttributes]
-> Read MemberFabricAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MemberFabricAttributes]
$creadListPrec :: ReadPrec [MemberFabricAttributes]
readPrec :: ReadPrec MemberFabricAttributes
$creadPrec :: ReadPrec MemberFabricAttributes
readList :: ReadS [MemberFabricAttributes]
$creadList :: ReadS [MemberFabricAttributes]
readsPrec :: Int -> ReadS MemberFabricAttributes
$creadsPrec :: Int -> ReadS MemberFabricAttributes
Prelude.Read, Int -> MemberFabricAttributes -> ShowS
[MemberFabricAttributes] -> ShowS
MemberFabricAttributes -> String
(Int -> MemberFabricAttributes -> ShowS)
-> (MemberFabricAttributes -> String)
-> ([MemberFabricAttributes] -> ShowS)
-> Show MemberFabricAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MemberFabricAttributes] -> ShowS
$cshowList :: [MemberFabricAttributes] -> ShowS
show :: MemberFabricAttributes -> String
$cshow :: MemberFabricAttributes -> String
showsPrec :: Int -> MemberFabricAttributes -> ShowS
$cshowsPrec :: Int -> MemberFabricAttributes -> ShowS
Prelude.Show, (forall x. MemberFabricAttributes -> Rep MemberFabricAttributes x)
-> (forall x.
Rep MemberFabricAttributes x -> MemberFabricAttributes)
-> Generic MemberFabricAttributes
forall x. Rep MemberFabricAttributes x -> MemberFabricAttributes
forall x. MemberFabricAttributes -> Rep MemberFabricAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MemberFabricAttributes x -> MemberFabricAttributes
$cfrom :: forall x. MemberFabricAttributes -> Rep MemberFabricAttributes x
Prelude.Generic)
newMemberFabricAttributes ::
MemberFabricAttributes
newMemberFabricAttributes :: MemberFabricAttributes
newMemberFabricAttributes =
MemberFabricAttributes' :: Maybe Text -> Maybe Text -> MemberFabricAttributes
MemberFabricAttributes'
{ $sel:caEndpoint:MemberFabricAttributes' :: Maybe Text
caEndpoint =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:adminUsername:MemberFabricAttributes' :: Maybe Text
adminUsername = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
memberFabricAttributes_caEndpoint :: Lens.Lens' MemberFabricAttributes (Prelude.Maybe Prelude.Text)
memberFabricAttributes_caEndpoint :: (Maybe Text -> f (Maybe Text))
-> MemberFabricAttributes -> f MemberFabricAttributes
memberFabricAttributes_caEndpoint = (MemberFabricAttributes -> Maybe Text)
-> (MemberFabricAttributes -> Maybe Text -> MemberFabricAttributes)
-> Lens
MemberFabricAttributes
MemberFabricAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberFabricAttributes' {Maybe Text
caEndpoint :: Maybe Text
$sel:caEndpoint:MemberFabricAttributes' :: MemberFabricAttributes -> Maybe Text
caEndpoint} -> Maybe Text
caEndpoint) (\s :: MemberFabricAttributes
s@MemberFabricAttributes' {} Maybe Text
a -> MemberFabricAttributes
s {$sel:caEndpoint:MemberFabricAttributes' :: Maybe Text
caEndpoint = Maybe Text
a} :: MemberFabricAttributes)
memberFabricAttributes_adminUsername :: Lens.Lens' MemberFabricAttributes (Prelude.Maybe Prelude.Text)
memberFabricAttributes_adminUsername :: (Maybe Text -> f (Maybe Text))
-> MemberFabricAttributes -> f MemberFabricAttributes
memberFabricAttributes_adminUsername = (MemberFabricAttributes -> Maybe Text)
-> (MemberFabricAttributes -> Maybe Text -> MemberFabricAttributes)
-> Lens
MemberFabricAttributes
MemberFabricAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberFabricAttributes' {Maybe Text
adminUsername :: Maybe Text
$sel:adminUsername:MemberFabricAttributes' :: MemberFabricAttributes -> Maybe Text
adminUsername} -> Maybe Text
adminUsername) (\s :: MemberFabricAttributes
s@MemberFabricAttributes' {} Maybe Text
a -> MemberFabricAttributes
s {$sel:adminUsername:MemberFabricAttributes' :: Maybe Text
adminUsername = Maybe Text
a} :: MemberFabricAttributes)
instance Core.FromJSON MemberFabricAttributes where
parseJSON :: Value -> Parser MemberFabricAttributes
parseJSON =
String
-> (Object -> Parser MemberFabricAttributes)
-> Value
-> Parser MemberFabricAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MemberFabricAttributes"
( \Object
x ->
Maybe Text -> Maybe Text -> MemberFabricAttributes
MemberFabricAttributes'
(Maybe Text -> Maybe Text -> MemberFabricAttributes)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> MemberFabricAttributes)
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
"CaEndpoint")
Parser (Maybe Text -> MemberFabricAttributes)
-> Parser (Maybe Text) -> Parser MemberFabricAttributes
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
"AdminUsername")
)
instance Prelude.Hashable MemberFabricAttributes
instance Prelude.NFData MemberFabricAttributes