{-# 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.ServiceCatalog.Types.LaunchPath 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 LaunchPath = LaunchPath'
{
LaunchPath -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
LaunchPath -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (LaunchPath -> LaunchPath -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchPath -> LaunchPath -> Bool
$c/= :: LaunchPath -> LaunchPath -> Bool
== :: LaunchPath -> LaunchPath -> Bool
$c== :: LaunchPath -> LaunchPath -> Bool
Prelude.Eq, ReadPrec [LaunchPath]
ReadPrec LaunchPath
Int -> ReadS LaunchPath
ReadS [LaunchPath]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LaunchPath]
$creadListPrec :: ReadPrec [LaunchPath]
readPrec :: ReadPrec LaunchPath
$creadPrec :: ReadPrec LaunchPath
readList :: ReadS [LaunchPath]
$creadList :: ReadS [LaunchPath]
readsPrec :: Int -> ReadS LaunchPath
$creadsPrec :: Int -> ReadS LaunchPath
Prelude.Read, Int -> LaunchPath -> ShowS
[LaunchPath] -> ShowS
LaunchPath -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchPath] -> ShowS
$cshowList :: [LaunchPath] -> ShowS
show :: LaunchPath -> String
$cshow :: LaunchPath -> String
showsPrec :: Int -> LaunchPath -> ShowS
$cshowsPrec :: Int -> LaunchPath -> ShowS
Prelude.Show, forall x. Rep LaunchPath x -> LaunchPath
forall x. LaunchPath -> Rep LaunchPath x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LaunchPath x -> LaunchPath
$cfrom :: forall x. LaunchPath -> Rep LaunchPath x
Prelude.Generic)
newLaunchPath ::
LaunchPath
newLaunchPath :: LaunchPath
newLaunchPath =
LaunchPath'
{ $sel:id:LaunchPath' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:LaunchPath' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
}
launchPath_id :: Lens.Lens' LaunchPath (Prelude.Maybe Prelude.Text)
launchPath_id :: Lens' LaunchPath (Maybe Text)
launchPath_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchPath' {Maybe Text
id :: Maybe Text
$sel:id:LaunchPath' :: LaunchPath -> Maybe Text
id} -> Maybe Text
id) (\s :: LaunchPath
s@LaunchPath' {} Maybe Text
a -> LaunchPath
s {$sel:id:LaunchPath' :: Maybe Text
id = Maybe Text
a} :: LaunchPath)
launchPath_name :: Lens.Lens' LaunchPath (Prelude.Maybe Prelude.Text)
launchPath_name :: Lens' LaunchPath (Maybe Text)
launchPath_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchPath' {Maybe Text
name :: Maybe Text
$sel:name:LaunchPath' :: LaunchPath -> Maybe Text
name} -> Maybe Text
name) (\s :: LaunchPath
s@LaunchPath' {} Maybe Text
a -> LaunchPath
s {$sel:name:LaunchPath' :: Maybe Text
name = Maybe Text
a} :: LaunchPath)
instance Data.FromJSON LaunchPath where
parseJSON :: Value -> Parser LaunchPath
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LaunchPath"
( \Object
x ->
Maybe Text -> Maybe Text -> LaunchPath
LaunchPath'
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
"Id")
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")
)
instance Prelude.Hashable LaunchPath where
hashWithSalt :: Int -> LaunchPath -> Int
hashWithSalt Int
_salt LaunchPath' {Maybe Text
name :: Maybe Text
id :: Maybe Text
$sel:name:LaunchPath' :: LaunchPath -> Maybe Text
$sel:id:LaunchPath' :: LaunchPath -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
instance Prelude.NFData LaunchPath where
rnf :: LaunchPath -> ()
rnf LaunchPath' {Maybe Text
name :: Maybe Text
id :: Maybe Text
$sel:name:LaunchPath' :: LaunchPath -> Maybe Text
$sel:id:LaunchPath' :: LaunchPath -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name