{-# 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.Panorama.Types.NodeInterface where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Panorama.Types.NodeInputPort
import Amazonka.Panorama.Types.NodeOutputPort
import qualified Amazonka.Prelude as Prelude
data NodeInterface = NodeInterface'
{
NodeInterface -> [NodeInputPort]
inputs :: [NodeInputPort],
NodeInterface -> [NodeOutputPort]
outputs :: [NodeOutputPort]
}
deriving (NodeInterface -> NodeInterface -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeInterface -> NodeInterface -> Bool
$c/= :: NodeInterface -> NodeInterface -> Bool
== :: NodeInterface -> NodeInterface -> Bool
$c== :: NodeInterface -> NodeInterface -> Bool
Prelude.Eq, ReadPrec [NodeInterface]
ReadPrec NodeInterface
Int -> ReadS NodeInterface
ReadS [NodeInterface]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeInterface]
$creadListPrec :: ReadPrec [NodeInterface]
readPrec :: ReadPrec NodeInterface
$creadPrec :: ReadPrec NodeInterface
readList :: ReadS [NodeInterface]
$creadList :: ReadS [NodeInterface]
readsPrec :: Int -> ReadS NodeInterface
$creadsPrec :: Int -> ReadS NodeInterface
Prelude.Read, Int -> NodeInterface -> ShowS
[NodeInterface] -> ShowS
NodeInterface -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeInterface] -> ShowS
$cshowList :: [NodeInterface] -> ShowS
show :: NodeInterface -> String
$cshow :: NodeInterface -> String
showsPrec :: Int -> NodeInterface -> ShowS
$cshowsPrec :: Int -> NodeInterface -> ShowS
Prelude.Show, forall x. Rep NodeInterface x -> NodeInterface
forall x. NodeInterface -> Rep NodeInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodeInterface x -> NodeInterface
$cfrom :: forall x. NodeInterface -> Rep NodeInterface x
Prelude.Generic)
newNodeInterface ::
NodeInterface
newNodeInterface :: NodeInterface
newNodeInterface =
NodeInterface'
{ $sel:inputs:NodeInterface' :: [NodeInputPort]
inputs = forall a. Monoid a => a
Prelude.mempty,
$sel:outputs:NodeInterface' :: [NodeOutputPort]
outputs = forall a. Monoid a => a
Prelude.mempty
}
nodeInterface_inputs :: Lens.Lens' NodeInterface [NodeInputPort]
nodeInterface_inputs :: Lens' NodeInterface [NodeInputPort]
nodeInterface_inputs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeInterface' {[NodeInputPort]
inputs :: [NodeInputPort]
$sel:inputs:NodeInterface' :: NodeInterface -> [NodeInputPort]
inputs} -> [NodeInputPort]
inputs) (\s :: NodeInterface
s@NodeInterface' {} [NodeInputPort]
a -> NodeInterface
s {$sel:inputs:NodeInterface' :: [NodeInputPort]
inputs = [NodeInputPort]
a} :: NodeInterface) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
nodeInterface_outputs :: Lens.Lens' NodeInterface [NodeOutputPort]
nodeInterface_outputs :: Lens' NodeInterface [NodeOutputPort]
nodeInterface_outputs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeInterface' {[NodeOutputPort]
outputs :: [NodeOutputPort]
$sel:outputs:NodeInterface' :: NodeInterface -> [NodeOutputPort]
outputs} -> [NodeOutputPort]
outputs) (\s :: NodeInterface
s@NodeInterface' {} [NodeOutputPort]
a -> NodeInterface
s {$sel:outputs:NodeInterface' :: [NodeOutputPort]
outputs = [NodeOutputPort]
a} :: NodeInterface) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON NodeInterface where
parseJSON :: Value -> Parser NodeInterface
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"NodeInterface"
( \Object
x ->
[NodeInputPort] -> [NodeOutputPort] -> NodeInterface
NodeInterface'
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
"Inputs" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Outputs" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable NodeInterface where
hashWithSalt :: Int -> NodeInterface -> Int
hashWithSalt Int
_salt NodeInterface' {[NodeOutputPort]
[NodeInputPort]
outputs :: [NodeOutputPort]
inputs :: [NodeInputPort]
$sel:outputs:NodeInterface' :: NodeInterface -> [NodeOutputPort]
$sel:inputs:NodeInterface' :: NodeInterface -> [NodeInputPort]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [NodeInputPort]
inputs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [NodeOutputPort]
outputs
instance Prelude.NFData NodeInterface where
rnf :: NodeInterface -> ()
rnf NodeInterface' {[NodeOutputPort]
[NodeInputPort]
outputs :: [NodeOutputPort]
inputs :: [NodeInputPort]
$sel:outputs:NodeInterface' :: NodeInterface -> [NodeOutputPort]
$sel:inputs:NodeInterface' :: NodeInterface -> [NodeInputPort]
..} =
forall a. NFData a => a -> ()
Prelude.rnf [NodeInputPort]
inputs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [NodeOutputPort]
outputs