{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ManagedBlockChain.Types.MemberFrameworkAttributes
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ManagedBlockChain.Types.MemberFrameworkAttributes where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ManagedBlockChain.Types.MemberFabricAttributes
import qualified Amazonka.Prelude as Prelude

-- | Attributes relevant to a member for the blockchain framework that the
-- Managed Blockchain network uses.
--
-- /See:/ 'newMemberFrameworkAttributes' smart constructor.
data MemberFrameworkAttributes = MemberFrameworkAttributes'
  { -- | Attributes of Hyperledger Fabric relevant to a member on a Managed
    -- Blockchain network that uses Hyperledger Fabric.
    MemberFrameworkAttributes -> Maybe MemberFabricAttributes
fabric :: Prelude.Maybe MemberFabricAttributes
  }
  deriving (MemberFrameworkAttributes -> MemberFrameworkAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemberFrameworkAttributes -> MemberFrameworkAttributes -> Bool
$c/= :: MemberFrameworkAttributes -> MemberFrameworkAttributes -> Bool
== :: MemberFrameworkAttributes -> MemberFrameworkAttributes -> Bool
$c== :: MemberFrameworkAttributes -> MemberFrameworkAttributes -> Bool
Prelude.Eq, ReadPrec [MemberFrameworkAttributes]
ReadPrec MemberFrameworkAttributes
Int -> ReadS MemberFrameworkAttributes
ReadS [MemberFrameworkAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MemberFrameworkAttributes]
$creadListPrec :: ReadPrec [MemberFrameworkAttributes]
readPrec :: ReadPrec MemberFrameworkAttributes
$creadPrec :: ReadPrec MemberFrameworkAttributes
readList :: ReadS [MemberFrameworkAttributes]
$creadList :: ReadS [MemberFrameworkAttributes]
readsPrec :: Int -> ReadS MemberFrameworkAttributes
$creadsPrec :: Int -> ReadS MemberFrameworkAttributes
Prelude.Read, Int -> MemberFrameworkAttributes -> ShowS
[MemberFrameworkAttributes] -> ShowS
MemberFrameworkAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MemberFrameworkAttributes] -> ShowS
$cshowList :: [MemberFrameworkAttributes] -> ShowS
show :: MemberFrameworkAttributes -> String
$cshow :: MemberFrameworkAttributes -> String
showsPrec :: Int -> MemberFrameworkAttributes -> ShowS
$cshowsPrec :: Int -> MemberFrameworkAttributes -> ShowS
Prelude.Show, forall x.
Rep MemberFrameworkAttributes x -> MemberFrameworkAttributes
forall x.
MemberFrameworkAttributes -> Rep MemberFrameworkAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MemberFrameworkAttributes x -> MemberFrameworkAttributes
$cfrom :: forall x.
MemberFrameworkAttributes -> Rep MemberFrameworkAttributes x
Prelude.Generic)

-- |
-- Create a value of 'MemberFrameworkAttributes' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'fabric', 'memberFrameworkAttributes_fabric' - Attributes of Hyperledger Fabric relevant to a member on a Managed
-- Blockchain network that uses Hyperledger Fabric.
newMemberFrameworkAttributes ::
  MemberFrameworkAttributes
newMemberFrameworkAttributes :: MemberFrameworkAttributes
newMemberFrameworkAttributes =
  MemberFrameworkAttributes'
    { $sel:fabric:MemberFrameworkAttributes' :: Maybe MemberFabricAttributes
fabric =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Attributes of Hyperledger Fabric relevant to a member on a Managed
-- Blockchain network that uses Hyperledger Fabric.
memberFrameworkAttributes_fabric :: Lens.Lens' MemberFrameworkAttributes (Prelude.Maybe MemberFabricAttributes)
memberFrameworkAttributes_fabric :: Lens' MemberFrameworkAttributes (Maybe MemberFabricAttributes)
memberFrameworkAttributes_fabric = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberFrameworkAttributes' {Maybe MemberFabricAttributes
fabric :: Maybe MemberFabricAttributes
$sel:fabric:MemberFrameworkAttributes' :: MemberFrameworkAttributes -> Maybe MemberFabricAttributes
fabric} -> Maybe MemberFabricAttributes
fabric) (\s :: MemberFrameworkAttributes
s@MemberFrameworkAttributes' {} Maybe MemberFabricAttributes
a -> MemberFrameworkAttributes
s {$sel:fabric:MemberFrameworkAttributes' :: Maybe MemberFabricAttributes
fabric = Maybe MemberFabricAttributes
a} :: MemberFrameworkAttributes)

instance Data.FromJSON MemberFrameworkAttributes where
  parseJSON :: Value -> Parser MemberFrameworkAttributes
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"MemberFrameworkAttributes"
      ( \Object
x ->
          Maybe MemberFabricAttributes -> MemberFrameworkAttributes
MemberFrameworkAttributes'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Fabric")
      )

instance Prelude.Hashable MemberFrameworkAttributes where
  hashWithSalt :: Int -> MemberFrameworkAttributes -> Int
hashWithSalt Int
_salt MemberFrameworkAttributes' {Maybe MemberFabricAttributes
fabric :: Maybe MemberFabricAttributes
$sel:fabric:MemberFrameworkAttributes' :: MemberFrameworkAttributes -> Maybe MemberFabricAttributes
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MemberFabricAttributes
fabric

instance Prelude.NFData MemberFrameworkAttributes where
  rnf :: MemberFrameworkAttributes -> ()
rnf MemberFrameworkAttributes' {Maybe MemberFabricAttributes
fabric :: Maybe MemberFabricAttributes
$sel:fabric:MemberFrameworkAttributes' :: MemberFrameworkAttributes -> Maybe MemberFabricAttributes
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe MemberFabricAttributes
fabric