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