{-# 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.NetworkFabricConfiguration 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 NetworkFabricConfiguration = NetworkFabricConfiguration'
{
NetworkFabricConfiguration -> Edition
edition :: Edition
}
deriving (NetworkFabricConfiguration -> NetworkFabricConfiguration -> Bool
(NetworkFabricConfiguration -> NetworkFabricConfiguration -> Bool)
-> (NetworkFabricConfiguration
-> NetworkFabricConfiguration -> Bool)
-> Eq NetworkFabricConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkFabricConfiguration -> NetworkFabricConfiguration -> Bool
$c/= :: NetworkFabricConfiguration -> NetworkFabricConfiguration -> Bool
== :: NetworkFabricConfiguration -> NetworkFabricConfiguration -> Bool
$c== :: NetworkFabricConfiguration -> NetworkFabricConfiguration -> Bool
Prelude.Eq, ReadPrec [NetworkFabricConfiguration]
ReadPrec NetworkFabricConfiguration
Int -> ReadS NetworkFabricConfiguration
ReadS [NetworkFabricConfiguration]
(Int -> ReadS NetworkFabricConfiguration)
-> ReadS [NetworkFabricConfiguration]
-> ReadPrec NetworkFabricConfiguration
-> ReadPrec [NetworkFabricConfiguration]
-> Read NetworkFabricConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkFabricConfiguration]
$creadListPrec :: ReadPrec [NetworkFabricConfiguration]
readPrec :: ReadPrec NetworkFabricConfiguration
$creadPrec :: ReadPrec NetworkFabricConfiguration
readList :: ReadS [NetworkFabricConfiguration]
$creadList :: ReadS [NetworkFabricConfiguration]
readsPrec :: Int -> ReadS NetworkFabricConfiguration
$creadsPrec :: Int -> ReadS NetworkFabricConfiguration
Prelude.Read, Int -> NetworkFabricConfiguration -> ShowS
[NetworkFabricConfiguration] -> ShowS
NetworkFabricConfiguration -> String
(Int -> NetworkFabricConfiguration -> ShowS)
-> (NetworkFabricConfiguration -> String)
-> ([NetworkFabricConfiguration] -> ShowS)
-> Show NetworkFabricConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkFabricConfiguration] -> ShowS
$cshowList :: [NetworkFabricConfiguration] -> ShowS
show :: NetworkFabricConfiguration -> String
$cshow :: NetworkFabricConfiguration -> String
showsPrec :: Int -> NetworkFabricConfiguration -> ShowS
$cshowsPrec :: Int -> NetworkFabricConfiguration -> ShowS
Prelude.Show, (forall x.
NetworkFabricConfiguration -> Rep NetworkFabricConfiguration x)
-> (forall x.
Rep NetworkFabricConfiguration x -> NetworkFabricConfiguration)
-> Generic NetworkFabricConfiguration
forall x.
Rep NetworkFabricConfiguration x -> NetworkFabricConfiguration
forall x.
NetworkFabricConfiguration -> Rep NetworkFabricConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NetworkFabricConfiguration x -> NetworkFabricConfiguration
$cfrom :: forall x.
NetworkFabricConfiguration -> Rep NetworkFabricConfiguration x
Prelude.Generic)
newNetworkFabricConfiguration ::
Edition ->
NetworkFabricConfiguration
newNetworkFabricConfiguration :: Edition -> NetworkFabricConfiguration
newNetworkFabricConfiguration Edition
pEdition_ =
NetworkFabricConfiguration' :: Edition -> NetworkFabricConfiguration
NetworkFabricConfiguration' {$sel:edition:NetworkFabricConfiguration' :: Edition
edition = Edition
pEdition_}
networkFabricConfiguration_edition :: Lens.Lens' NetworkFabricConfiguration Edition
networkFabricConfiguration_edition :: (Edition -> f Edition)
-> NetworkFabricConfiguration -> f NetworkFabricConfiguration
networkFabricConfiguration_edition = (NetworkFabricConfiguration -> Edition)
-> (NetworkFabricConfiguration
-> Edition -> NetworkFabricConfiguration)
-> Lens
NetworkFabricConfiguration
NetworkFabricConfiguration
Edition
Edition
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFabricConfiguration' {Edition
edition :: Edition
$sel:edition:NetworkFabricConfiguration' :: NetworkFabricConfiguration -> Edition
edition} -> Edition
edition) (\s :: NetworkFabricConfiguration
s@NetworkFabricConfiguration' {} Edition
a -> NetworkFabricConfiguration
s {$sel:edition:NetworkFabricConfiguration' :: Edition
edition = Edition
a} :: NetworkFabricConfiguration)
instance Prelude.Hashable NetworkFabricConfiguration
instance Prelude.NFData NetworkFabricConfiguration
instance Core.ToJSON NetworkFabricConfiguration where
toJSON :: NetworkFabricConfiguration -> Value
toJSON NetworkFabricConfiguration' {Edition
edition :: Edition
$sel:edition:NetworkFabricConfiguration' :: NetworkFabricConfiguration -> Edition
..} =
[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
"Edition" Text -> Edition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Edition
edition)]
)