{-# 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.Network
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ManagedBlockChain.Types.Network where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.ManagedBlockChain.Types.Framework
import Amazonka.ManagedBlockChain.Types.NetworkFrameworkAttributes
import Amazonka.ManagedBlockChain.Types.NetworkStatus
import Amazonka.ManagedBlockChain.Types.VotingPolicy
import qualified Amazonka.Prelude as Prelude

-- | Network configuration properties.
--
-- /See:/ 'newNetwork' smart constructor.
data Network = Network'
  { -- | The current status of the network.
    Network -> Maybe NetworkStatus
status :: Prelude.Maybe NetworkStatus,
    -- | The blockchain framework that the network uses.
    Network -> Maybe Framework
framework :: Prelude.Maybe Framework,
    -- | The Amazon Resource Name (ARN) of the network. For more information
    -- about ARNs and their format, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
    -- in the /AWS General Reference/.
    Network -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The version of the blockchain framework that the network uses.
    Network -> Maybe Text
frameworkVersion :: Prelude.Maybe Prelude.Text,
    -- | The VPC endpoint service name of the VPC endpoint service of the
    -- network. Members use the VPC endpoint service name to create a VPC
    -- endpoint to access network resources.
    Network -> Maybe Text
vpcEndpointServiceName :: Prelude.Maybe Prelude.Text,
    -- | The name of the network.
    Network -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the network.
    Network -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The voting rules for the network to decide if a proposal is accepted.
    Network -> Maybe VotingPolicy
votingPolicy :: Prelude.Maybe VotingPolicy,
    -- | The date and time that the network was created.
    Network -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | Attributes of the blockchain framework that the network uses.
    Network -> Maybe NetworkFrameworkAttributes
frameworkAttributes :: Prelude.Maybe NetworkFrameworkAttributes,
    -- | Attributes of the blockchain framework for the network.
    Network -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Tags assigned to the network. Each tag consists of a key and optional
    -- value.
    --
    -- For more information about tags, see
    -- <https://docs.aws.amazon.com/managed-blockchain/latest/ethereum-dev/tagging-resources.html Tagging Resources>
    -- in the /Amazon Managed Blockchain Ethereum Developer Guide/, or
    -- <https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html Tagging Resources>
    -- in the /Amazon Managed Blockchain Hyperledger Fabric Developer Guide/.
    Network -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (Network -> Network -> Bool
(Network -> Network -> Bool)
-> (Network -> Network -> Bool) -> Eq Network
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Network -> Network -> Bool
$c/= :: Network -> Network -> Bool
== :: Network -> Network -> Bool
$c== :: Network -> Network -> Bool
Prelude.Eq, ReadPrec [Network]
ReadPrec Network
Int -> ReadS Network
ReadS [Network]
(Int -> ReadS Network)
-> ReadS [Network]
-> ReadPrec Network
-> ReadPrec [Network]
-> Read Network
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Network]
$creadListPrec :: ReadPrec [Network]
readPrec :: ReadPrec Network
$creadPrec :: ReadPrec Network
readList :: ReadS [Network]
$creadList :: ReadS [Network]
readsPrec :: Int -> ReadS Network
$creadsPrec :: Int -> ReadS Network
Prelude.Read, Int -> Network -> ShowS
[Network] -> ShowS
Network -> String
(Int -> Network -> ShowS)
-> (Network -> String) -> ([Network] -> ShowS) -> Show Network
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Network] -> ShowS
$cshowList :: [Network] -> ShowS
show :: Network -> String
$cshow :: Network -> String
showsPrec :: Int -> Network -> ShowS
$cshowsPrec :: Int -> Network -> ShowS
Prelude.Show, (forall x. Network -> Rep Network x)
-> (forall x. Rep Network x -> Network) -> Generic Network
forall x. Rep Network x -> Network
forall x. Network -> Rep Network x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Network x -> Network
$cfrom :: forall x. Network -> Rep Network x
Prelude.Generic)

-- |
-- Create a value of 'Network' 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:
--
-- 'status', 'network_status' - The current status of the network.
--
-- 'framework', 'network_framework' - The blockchain framework that the network uses.
--
-- 'arn', 'network_arn' - The Amazon Resource Name (ARN) of the network. For more information
-- about ARNs and their format, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
--
-- 'frameworkVersion', 'network_frameworkVersion' - The version of the blockchain framework that the network uses.
--
-- 'vpcEndpointServiceName', 'network_vpcEndpointServiceName' - The VPC endpoint service name of the VPC endpoint service of the
-- network. Members use the VPC endpoint service name to create a VPC
-- endpoint to access network resources.
--
-- 'name', 'network_name' - The name of the network.
--
-- 'id', 'network_id' - The unique identifier of the network.
--
-- 'votingPolicy', 'network_votingPolicy' - The voting rules for the network to decide if a proposal is accepted.
--
-- 'creationDate', 'network_creationDate' - The date and time that the network was created.
--
-- 'frameworkAttributes', 'network_frameworkAttributes' - Attributes of the blockchain framework that the network uses.
--
-- 'description', 'network_description' - Attributes of the blockchain framework for the network.
--
-- 'tags', 'network_tags' - Tags assigned to the network. Each tag consists of a key and optional
-- value.
--
-- For more information about tags, see
-- <https://docs.aws.amazon.com/managed-blockchain/latest/ethereum-dev/tagging-resources.html Tagging Resources>
-- in the /Amazon Managed Blockchain Ethereum Developer Guide/, or
-- <https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html Tagging Resources>
-- in the /Amazon Managed Blockchain Hyperledger Fabric Developer Guide/.
newNetwork ::
  Network
newNetwork :: Network
newNetwork =
  Network' :: Maybe NetworkStatus
-> Maybe Framework
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe VotingPolicy
-> Maybe POSIX
-> Maybe NetworkFrameworkAttributes
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Network
Network'
    { $sel:status:Network' :: Maybe NetworkStatus
status = Maybe NetworkStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:framework:Network' :: Maybe Framework
framework = Maybe Framework
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Network' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:frameworkVersion:Network' :: Maybe Text
frameworkVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcEndpointServiceName:Network' :: Maybe Text
vpcEndpointServiceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Network' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Network' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:votingPolicy:Network' :: Maybe VotingPolicy
votingPolicy = Maybe VotingPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:Network' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:frameworkAttributes:Network' :: Maybe NetworkFrameworkAttributes
frameworkAttributes = Maybe NetworkFrameworkAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Network' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Network' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The current status of the network.
network_status :: Lens.Lens' Network (Prelude.Maybe NetworkStatus)
network_status :: (Maybe NetworkStatus -> f (Maybe NetworkStatus))
-> Network -> f Network
network_status = (Network -> Maybe NetworkStatus)
-> (Network -> Maybe NetworkStatus -> Network)
-> Lens Network Network (Maybe NetworkStatus) (Maybe NetworkStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe NetworkStatus
status :: Maybe NetworkStatus
$sel:status:Network' :: Network -> Maybe NetworkStatus
status} -> Maybe NetworkStatus
status) (\s :: Network
s@Network' {} Maybe NetworkStatus
a -> Network
s {$sel:status:Network' :: Maybe NetworkStatus
status = Maybe NetworkStatus
a} :: Network)

-- | The blockchain framework that the network uses.
network_framework :: Lens.Lens' Network (Prelude.Maybe Framework)
network_framework :: (Maybe Framework -> f (Maybe Framework)) -> Network -> f Network
network_framework = (Network -> Maybe Framework)
-> (Network -> Maybe Framework -> Network)
-> Lens Network Network (Maybe Framework) (Maybe Framework)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe Framework
framework :: Maybe Framework
$sel:framework:Network' :: Network -> Maybe Framework
framework} -> Maybe Framework
framework) (\s :: Network
s@Network' {} Maybe Framework
a -> Network
s {$sel:framework:Network' :: Maybe Framework
framework = Maybe Framework
a} :: Network)

-- | The Amazon Resource Name (ARN) of the network. For more information
-- about ARNs and their format, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
network_arn :: Lens.Lens' Network (Prelude.Maybe Prelude.Text)
network_arn :: (Maybe Text -> f (Maybe Text)) -> Network -> f Network
network_arn = (Network -> Maybe Text)
-> (Network -> Maybe Text -> Network)
-> Lens Network Network (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe Text
arn :: Maybe Text
$sel:arn:Network' :: Network -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Network
s@Network' {} Maybe Text
a -> Network
s {$sel:arn:Network' :: Maybe Text
arn = Maybe Text
a} :: Network)

-- | The version of the blockchain framework that the network uses.
network_frameworkVersion :: Lens.Lens' Network (Prelude.Maybe Prelude.Text)
network_frameworkVersion :: (Maybe Text -> f (Maybe Text)) -> Network -> f Network
network_frameworkVersion = (Network -> Maybe Text)
-> (Network -> Maybe Text -> Network)
-> Lens Network Network (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe Text
frameworkVersion :: Maybe Text
$sel:frameworkVersion:Network' :: Network -> Maybe Text
frameworkVersion} -> Maybe Text
frameworkVersion) (\s :: Network
s@Network' {} Maybe Text
a -> Network
s {$sel:frameworkVersion:Network' :: Maybe Text
frameworkVersion = Maybe Text
a} :: Network)

-- | The VPC endpoint service name of the VPC endpoint service of the
-- network. Members use the VPC endpoint service name to create a VPC
-- endpoint to access network resources.
network_vpcEndpointServiceName :: Lens.Lens' Network (Prelude.Maybe Prelude.Text)
network_vpcEndpointServiceName :: (Maybe Text -> f (Maybe Text)) -> Network -> f Network
network_vpcEndpointServiceName = (Network -> Maybe Text)
-> (Network -> Maybe Text -> Network)
-> Lens Network Network (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe Text
vpcEndpointServiceName :: Maybe Text
$sel:vpcEndpointServiceName:Network' :: Network -> Maybe Text
vpcEndpointServiceName} -> Maybe Text
vpcEndpointServiceName) (\s :: Network
s@Network' {} Maybe Text
a -> Network
s {$sel:vpcEndpointServiceName:Network' :: Maybe Text
vpcEndpointServiceName = Maybe Text
a} :: Network)

-- | The name of the network.
network_name :: Lens.Lens' Network (Prelude.Maybe Prelude.Text)
network_name :: (Maybe Text -> f (Maybe Text)) -> Network -> f Network
network_name = (Network -> Maybe Text)
-> (Network -> Maybe Text -> Network)
-> Lens Network Network (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe Text
name :: Maybe Text
$sel:name:Network' :: Network -> Maybe Text
name} -> Maybe Text
name) (\s :: Network
s@Network' {} Maybe Text
a -> Network
s {$sel:name:Network' :: Maybe Text
name = Maybe Text
a} :: Network)

-- | The unique identifier of the network.
network_id :: Lens.Lens' Network (Prelude.Maybe Prelude.Text)
network_id :: (Maybe Text -> f (Maybe Text)) -> Network -> f Network
network_id = (Network -> Maybe Text)
-> (Network -> Maybe Text -> Network)
-> Lens Network Network (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe Text
id :: Maybe Text
$sel:id:Network' :: Network -> Maybe Text
id} -> Maybe Text
id) (\s :: Network
s@Network' {} Maybe Text
a -> Network
s {$sel:id:Network' :: Maybe Text
id = Maybe Text
a} :: Network)

-- | The voting rules for the network to decide if a proposal is accepted.
network_votingPolicy :: Lens.Lens' Network (Prelude.Maybe VotingPolicy)
network_votingPolicy :: (Maybe VotingPolicy -> f (Maybe VotingPolicy))
-> Network -> f Network
network_votingPolicy = (Network -> Maybe VotingPolicy)
-> (Network -> Maybe VotingPolicy -> Network)
-> Lens Network Network (Maybe VotingPolicy) (Maybe VotingPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe VotingPolicy
votingPolicy :: Maybe VotingPolicy
$sel:votingPolicy:Network' :: Network -> Maybe VotingPolicy
votingPolicy} -> Maybe VotingPolicy
votingPolicy) (\s :: Network
s@Network' {} Maybe VotingPolicy
a -> Network
s {$sel:votingPolicy:Network' :: Maybe VotingPolicy
votingPolicy = Maybe VotingPolicy
a} :: Network)

-- | The date and time that the network was created.
network_creationDate :: Lens.Lens' Network (Prelude.Maybe Prelude.UTCTime)
network_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Network -> f Network
network_creationDate = (Network -> Maybe POSIX)
-> (Network -> Maybe POSIX -> Network)
-> Lens Network Network (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:Network' :: Network -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: Network
s@Network' {} Maybe POSIX
a -> Network
s {$sel:creationDate:Network' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: Network) ((Maybe POSIX -> f (Maybe POSIX)) -> Network -> f Network)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Network
-> f Network
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Attributes of the blockchain framework that the network uses.
network_frameworkAttributes :: Lens.Lens' Network (Prelude.Maybe NetworkFrameworkAttributes)
network_frameworkAttributes :: (Maybe NetworkFrameworkAttributes
 -> f (Maybe NetworkFrameworkAttributes))
-> Network -> f Network
network_frameworkAttributes = (Network -> Maybe NetworkFrameworkAttributes)
-> (Network -> Maybe NetworkFrameworkAttributes -> Network)
-> Lens
     Network
     Network
     (Maybe NetworkFrameworkAttributes)
     (Maybe NetworkFrameworkAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe NetworkFrameworkAttributes
frameworkAttributes :: Maybe NetworkFrameworkAttributes
$sel:frameworkAttributes:Network' :: Network -> Maybe NetworkFrameworkAttributes
frameworkAttributes} -> Maybe NetworkFrameworkAttributes
frameworkAttributes) (\s :: Network
s@Network' {} Maybe NetworkFrameworkAttributes
a -> Network
s {$sel:frameworkAttributes:Network' :: Maybe NetworkFrameworkAttributes
frameworkAttributes = Maybe NetworkFrameworkAttributes
a} :: Network)

-- | Attributes of the blockchain framework for the network.
network_description :: Lens.Lens' Network (Prelude.Maybe Prelude.Text)
network_description :: (Maybe Text -> f (Maybe Text)) -> Network -> f Network
network_description = (Network -> Maybe Text)
-> (Network -> Maybe Text -> Network)
-> Lens Network Network (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe Text
description :: Maybe Text
$sel:description:Network' :: Network -> Maybe Text
description} -> Maybe Text
description) (\s :: Network
s@Network' {} Maybe Text
a -> Network
s {$sel:description:Network' :: Maybe Text
description = Maybe Text
a} :: Network)

-- | Tags assigned to the network. Each tag consists of a key and optional
-- value.
--
-- For more information about tags, see
-- <https://docs.aws.amazon.com/managed-blockchain/latest/ethereum-dev/tagging-resources.html Tagging Resources>
-- in the /Amazon Managed Blockchain Ethereum Developer Guide/, or
-- <https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html Tagging Resources>
-- in the /Amazon Managed Blockchain Hyperledger Fabric Developer Guide/.
network_tags :: Lens.Lens' Network (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
network_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Network -> f Network
network_tags = (Network -> Maybe (HashMap Text Text))
-> (Network -> Maybe (HashMap Text Text) -> Network)
-> Lens
     Network
     Network
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Network' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Network' :: Network -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Network
s@Network' {} Maybe (HashMap Text Text)
a -> Network
s {$sel:tags:Network' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Network) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Network -> f Network)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Network
-> f Network
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON Network where
  parseJSON :: Value -> Parser Network
parseJSON =
    String -> (Object -> Parser Network) -> Value -> Parser Network
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Network"
      ( \Object
x ->
          Maybe NetworkStatus
-> Maybe Framework
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe VotingPolicy
-> Maybe POSIX
-> Maybe NetworkFrameworkAttributes
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Network
Network'
            (Maybe NetworkStatus
 -> Maybe Framework
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe VotingPolicy
 -> Maybe POSIX
 -> Maybe NetworkFrameworkAttributes
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Network)
-> Parser (Maybe NetworkStatus)
-> Parser
     (Maybe Framework
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe VotingPolicy
      -> Maybe POSIX
      -> Maybe NetworkFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Network)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe NetworkStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Framework
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe VotingPolicy
   -> Maybe POSIX
   -> Maybe NetworkFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Network)
-> Parser (Maybe Framework)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe VotingPolicy
      -> Maybe POSIX
      -> Maybe NetworkFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Network)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Framework)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Framework")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe VotingPolicy
   -> Maybe POSIX
   -> Maybe NetworkFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Network)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe VotingPolicy
      -> Maybe POSIX
      -> Maybe NetworkFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Network)
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
"Arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe VotingPolicy
   -> Maybe POSIX
   -> Maybe NetworkFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Network)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe VotingPolicy
      -> Maybe POSIX
      -> Maybe NetworkFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Network)
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
"FrameworkVersion")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe VotingPolicy
   -> Maybe POSIX
   -> Maybe NetworkFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Network)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe VotingPolicy
      -> Maybe POSIX
      -> Maybe NetworkFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Network)
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
"VpcEndpointServiceName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe VotingPolicy
   -> Maybe POSIX
   -> Maybe NetworkFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Network)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe VotingPolicy
      -> Maybe POSIX
      -> Maybe NetworkFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Network)
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
"Name")
            Parser
  (Maybe Text
   -> Maybe VotingPolicy
   -> Maybe POSIX
   -> Maybe NetworkFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Network)
-> Parser (Maybe Text)
-> Parser
     (Maybe VotingPolicy
      -> Maybe POSIX
      -> Maybe NetworkFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Network)
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
"Id")
            Parser
  (Maybe VotingPolicy
   -> Maybe POSIX
   -> Maybe NetworkFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Network)
-> Parser (Maybe VotingPolicy)
-> Parser
     (Maybe POSIX
      -> Maybe NetworkFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Network)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VotingPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VotingPolicy")
            Parser
  (Maybe POSIX
   -> Maybe NetworkFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Network)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe NetworkFrameworkAttributes
      -> Maybe Text -> Maybe (HashMap Text Text) -> Network)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationDate")
            Parser
  (Maybe NetworkFrameworkAttributes
   -> Maybe Text -> Maybe (HashMap Text Text) -> Network)
-> Parser (Maybe NetworkFrameworkAttributes)
-> Parser (Maybe Text -> Maybe (HashMap Text Text) -> Network)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NetworkFrameworkAttributes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FrameworkAttributes")
            Parser (Maybe Text -> Maybe (HashMap Text Text) -> Network)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Network)
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
"Description")
            Parser (Maybe (HashMap Text Text) -> Network)
-> Parser (Maybe (HashMap Text Text)) -> Parser Network
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable Network

instance Prelude.NFData Network