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