{-# 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.NodeOutputPort 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.PortType
import qualified Amazonka.Prelude as Prelude
data NodeOutputPort = NodeOutputPort'
{
NodeOutputPort -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
NodeOutputPort -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
NodeOutputPort -> Maybe PortType
type' :: Prelude.Maybe PortType
}
deriving (NodeOutputPort -> NodeOutputPort -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeOutputPort -> NodeOutputPort -> Bool
$c/= :: NodeOutputPort -> NodeOutputPort -> Bool
== :: NodeOutputPort -> NodeOutputPort -> Bool
$c== :: NodeOutputPort -> NodeOutputPort -> Bool
Prelude.Eq, ReadPrec [NodeOutputPort]
ReadPrec NodeOutputPort
Int -> ReadS NodeOutputPort
ReadS [NodeOutputPort]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeOutputPort]
$creadListPrec :: ReadPrec [NodeOutputPort]
readPrec :: ReadPrec NodeOutputPort
$creadPrec :: ReadPrec NodeOutputPort
readList :: ReadS [NodeOutputPort]
$creadList :: ReadS [NodeOutputPort]
readsPrec :: Int -> ReadS NodeOutputPort
$creadsPrec :: Int -> ReadS NodeOutputPort
Prelude.Read, Int -> NodeOutputPort -> ShowS
[NodeOutputPort] -> ShowS
NodeOutputPort -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeOutputPort] -> ShowS
$cshowList :: [NodeOutputPort] -> ShowS
show :: NodeOutputPort -> String
$cshow :: NodeOutputPort -> String
showsPrec :: Int -> NodeOutputPort -> ShowS
$cshowsPrec :: Int -> NodeOutputPort -> ShowS
Prelude.Show, forall x. Rep NodeOutputPort x -> NodeOutputPort
forall x. NodeOutputPort -> Rep NodeOutputPort x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodeOutputPort x -> NodeOutputPort
$cfrom :: forall x. NodeOutputPort -> Rep NodeOutputPort x
Prelude.Generic)
newNodeOutputPort ::
NodeOutputPort
newNodeOutputPort :: NodeOutputPort
newNodeOutputPort =
NodeOutputPort'
{ $sel:description:NodeOutputPort' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:name:NodeOutputPort' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:type':NodeOutputPort' :: Maybe PortType
type' = forall a. Maybe a
Prelude.Nothing
}
nodeOutputPort_description :: Lens.Lens' NodeOutputPort (Prelude.Maybe Prelude.Text)
nodeOutputPort_description :: Lens' NodeOutputPort (Maybe Text)
nodeOutputPort_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeOutputPort' {Maybe Text
description :: Maybe Text
$sel:description:NodeOutputPort' :: NodeOutputPort -> Maybe Text
description} -> Maybe Text
description) (\s :: NodeOutputPort
s@NodeOutputPort' {} Maybe Text
a -> NodeOutputPort
s {$sel:description:NodeOutputPort' :: Maybe Text
description = Maybe Text
a} :: NodeOutputPort)
nodeOutputPort_name :: Lens.Lens' NodeOutputPort (Prelude.Maybe Prelude.Text)
nodeOutputPort_name :: Lens' NodeOutputPort (Maybe Text)
nodeOutputPort_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeOutputPort' {Maybe Text
name :: Maybe Text
$sel:name:NodeOutputPort' :: NodeOutputPort -> Maybe Text
name} -> Maybe Text
name) (\s :: NodeOutputPort
s@NodeOutputPort' {} Maybe Text
a -> NodeOutputPort
s {$sel:name:NodeOutputPort' :: Maybe Text
name = Maybe Text
a} :: NodeOutputPort)
nodeOutputPort_type :: Lens.Lens' NodeOutputPort (Prelude.Maybe PortType)
nodeOutputPort_type :: Lens' NodeOutputPort (Maybe PortType)
nodeOutputPort_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeOutputPort' {Maybe PortType
type' :: Maybe PortType
$sel:type':NodeOutputPort' :: NodeOutputPort -> Maybe PortType
type'} -> Maybe PortType
type') (\s :: NodeOutputPort
s@NodeOutputPort' {} Maybe PortType
a -> NodeOutputPort
s {$sel:type':NodeOutputPort' :: Maybe PortType
type' = Maybe PortType
a} :: NodeOutputPort)
instance Data.FromJSON NodeOutputPort where
parseJSON :: Value -> Parser NodeOutputPort
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"NodeOutputPort"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe PortType -> NodeOutputPort
NodeOutputPort'
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
"Description")
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
"Name")
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
"Type")
)
instance Prelude.Hashable NodeOutputPort where
hashWithSalt :: Int -> NodeOutputPort -> Int
hashWithSalt Int
_salt NodeOutputPort' {Maybe Text
Maybe PortType
type' :: Maybe PortType
name :: Maybe Text
description :: Maybe Text
$sel:type':NodeOutputPort' :: NodeOutputPort -> Maybe PortType
$sel:name:NodeOutputPort' :: NodeOutputPort -> Maybe Text
$sel:description:NodeOutputPort' :: NodeOutputPort -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PortType
type'
instance Prelude.NFData NodeOutputPort where
rnf :: NodeOutputPort -> ()
rnf NodeOutputPort' {Maybe Text
Maybe PortType
type' :: Maybe PortType
name :: Maybe Text
description :: Maybe Text
$sel:type':NodeOutputPort' :: NodeOutputPort -> Maybe PortType
$sel:name:NodeOutputPort' :: NodeOutputPort -> Maybe Text
$sel:description:NodeOutputPort' :: NodeOutputPort -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PortType
type'