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