{-# 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.SimSpaceWeaver.Types.SimulationAppPortMapping where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SimulationAppPortMapping = SimulationAppPortMapping'
{
SimulationAppPortMapping -> Maybe Natural
actual :: Prelude.Maybe Prelude.Natural,
SimulationAppPortMapping -> Maybe Natural
declared :: Prelude.Maybe Prelude.Natural
}
deriving (SimulationAppPortMapping -> SimulationAppPortMapping -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SimulationAppPortMapping -> SimulationAppPortMapping -> Bool
$c/= :: SimulationAppPortMapping -> SimulationAppPortMapping -> Bool
== :: SimulationAppPortMapping -> SimulationAppPortMapping -> Bool
$c== :: SimulationAppPortMapping -> SimulationAppPortMapping -> Bool
Prelude.Eq, ReadPrec [SimulationAppPortMapping]
ReadPrec SimulationAppPortMapping
Int -> ReadS SimulationAppPortMapping
ReadS [SimulationAppPortMapping]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SimulationAppPortMapping]
$creadListPrec :: ReadPrec [SimulationAppPortMapping]
readPrec :: ReadPrec SimulationAppPortMapping
$creadPrec :: ReadPrec SimulationAppPortMapping
readList :: ReadS [SimulationAppPortMapping]
$creadList :: ReadS [SimulationAppPortMapping]
readsPrec :: Int -> ReadS SimulationAppPortMapping
$creadsPrec :: Int -> ReadS SimulationAppPortMapping
Prelude.Read, Int -> SimulationAppPortMapping -> ShowS
[SimulationAppPortMapping] -> ShowS
SimulationAppPortMapping -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SimulationAppPortMapping] -> ShowS
$cshowList :: [SimulationAppPortMapping] -> ShowS
show :: SimulationAppPortMapping -> String
$cshow :: SimulationAppPortMapping -> String
showsPrec :: Int -> SimulationAppPortMapping -> ShowS
$cshowsPrec :: Int -> SimulationAppPortMapping -> ShowS
Prelude.Show, forall x.
Rep SimulationAppPortMapping x -> SimulationAppPortMapping
forall x.
SimulationAppPortMapping -> Rep SimulationAppPortMapping x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SimulationAppPortMapping x -> SimulationAppPortMapping
$cfrom :: forall x.
SimulationAppPortMapping -> Rep SimulationAppPortMapping x
Prelude.Generic)
newSimulationAppPortMapping ::
SimulationAppPortMapping
newSimulationAppPortMapping :: SimulationAppPortMapping
newSimulationAppPortMapping =
SimulationAppPortMapping'
{ $sel:actual:SimulationAppPortMapping' :: Maybe Natural
actual = forall a. Maybe a
Prelude.Nothing,
$sel:declared:SimulationAppPortMapping' :: Maybe Natural
declared = forall a. Maybe a
Prelude.Nothing
}
simulationAppPortMapping_actual :: Lens.Lens' SimulationAppPortMapping (Prelude.Maybe Prelude.Natural)
simulationAppPortMapping_actual :: Lens' SimulationAppPortMapping (Maybe Natural)
simulationAppPortMapping_actual = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationAppPortMapping' {Maybe Natural
actual :: Maybe Natural
$sel:actual:SimulationAppPortMapping' :: SimulationAppPortMapping -> Maybe Natural
actual} -> Maybe Natural
actual) (\s :: SimulationAppPortMapping
s@SimulationAppPortMapping' {} Maybe Natural
a -> SimulationAppPortMapping
s {$sel:actual:SimulationAppPortMapping' :: Maybe Natural
actual = Maybe Natural
a} :: SimulationAppPortMapping)
simulationAppPortMapping_declared :: Lens.Lens' SimulationAppPortMapping (Prelude.Maybe Prelude.Natural)
simulationAppPortMapping_declared :: Lens' SimulationAppPortMapping (Maybe Natural)
simulationAppPortMapping_declared = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationAppPortMapping' {Maybe Natural
declared :: Maybe Natural
$sel:declared:SimulationAppPortMapping' :: SimulationAppPortMapping -> Maybe Natural
declared} -> Maybe Natural
declared) (\s :: SimulationAppPortMapping
s@SimulationAppPortMapping' {} Maybe Natural
a -> SimulationAppPortMapping
s {$sel:declared:SimulationAppPortMapping' :: Maybe Natural
declared = Maybe Natural
a} :: SimulationAppPortMapping)
instance Data.FromJSON SimulationAppPortMapping where
parseJSON :: Value -> Parser SimulationAppPortMapping
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SimulationAppPortMapping"
( \Object
x ->
Maybe Natural -> Maybe Natural -> SimulationAppPortMapping
SimulationAppPortMapping'
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
"Actual")
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
"Declared")
)
instance Prelude.Hashable SimulationAppPortMapping where
hashWithSalt :: Int -> SimulationAppPortMapping -> Int
hashWithSalt Int
_salt SimulationAppPortMapping' {Maybe Natural
declared :: Maybe Natural
actual :: Maybe Natural
$sel:declared:SimulationAppPortMapping' :: SimulationAppPortMapping -> Maybe Natural
$sel:actual:SimulationAppPortMapping' :: SimulationAppPortMapping -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
actual
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
declared
instance Prelude.NFData SimulationAppPortMapping where
rnf :: SimulationAppPortMapping -> ()
rnf SimulationAppPortMapping' {Maybe Natural
declared :: Maybe Natural
actual :: Maybe Natural
$sel:declared:SimulationAppPortMapping' :: SimulationAppPortMapping -> Maybe Natural
$sel:actual:SimulationAppPortMapping' :: SimulationAppPortMapping -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
actual
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
declared