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