{-# 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.LaunchPathSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.ServiceCatalog.Types.ConstraintSummary
import Amazonka.ServiceCatalog.Types.Tag
data LaunchPathSummary = LaunchPathSummary'
{
LaunchPathSummary -> Maybe [ConstraintSummary]
constraintSummaries :: Prelude.Maybe [ConstraintSummary],
LaunchPathSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
LaunchPathSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
LaunchPathSummary -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (LaunchPathSummary -> LaunchPathSummary -> Bool
(LaunchPathSummary -> LaunchPathSummary -> Bool)
-> (LaunchPathSummary -> LaunchPathSummary -> Bool)
-> Eq LaunchPathSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchPathSummary -> LaunchPathSummary -> Bool
$c/= :: LaunchPathSummary -> LaunchPathSummary -> Bool
== :: LaunchPathSummary -> LaunchPathSummary -> Bool
$c== :: LaunchPathSummary -> LaunchPathSummary -> Bool
Prelude.Eq, ReadPrec [LaunchPathSummary]
ReadPrec LaunchPathSummary
Int -> ReadS LaunchPathSummary
ReadS [LaunchPathSummary]
(Int -> ReadS LaunchPathSummary)
-> ReadS [LaunchPathSummary]
-> ReadPrec LaunchPathSummary
-> ReadPrec [LaunchPathSummary]
-> Read LaunchPathSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LaunchPathSummary]
$creadListPrec :: ReadPrec [LaunchPathSummary]
readPrec :: ReadPrec LaunchPathSummary
$creadPrec :: ReadPrec LaunchPathSummary
readList :: ReadS [LaunchPathSummary]
$creadList :: ReadS [LaunchPathSummary]
readsPrec :: Int -> ReadS LaunchPathSummary
$creadsPrec :: Int -> ReadS LaunchPathSummary
Prelude.Read, Int -> LaunchPathSummary -> ShowS
[LaunchPathSummary] -> ShowS
LaunchPathSummary -> String
(Int -> LaunchPathSummary -> ShowS)
-> (LaunchPathSummary -> String)
-> ([LaunchPathSummary] -> ShowS)
-> Show LaunchPathSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchPathSummary] -> ShowS
$cshowList :: [LaunchPathSummary] -> ShowS
show :: LaunchPathSummary -> String
$cshow :: LaunchPathSummary -> String
showsPrec :: Int -> LaunchPathSummary -> ShowS
$cshowsPrec :: Int -> LaunchPathSummary -> ShowS
Prelude.Show, (forall x. LaunchPathSummary -> Rep LaunchPathSummary x)
-> (forall x. Rep LaunchPathSummary x -> LaunchPathSummary)
-> Generic LaunchPathSummary
forall x. Rep LaunchPathSummary x -> LaunchPathSummary
forall x. LaunchPathSummary -> Rep LaunchPathSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LaunchPathSummary x -> LaunchPathSummary
$cfrom :: forall x. LaunchPathSummary -> Rep LaunchPathSummary x
Prelude.Generic)
newLaunchPathSummary ::
LaunchPathSummary
newLaunchPathSummary :: LaunchPathSummary
newLaunchPathSummary =
LaunchPathSummary' :: Maybe [ConstraintSummary]
-> Maybe Text -> Maybe Text -> Maybe [Tag] -> LaunchPathSummary
LaunchPathSummary'
{ $sel:constraintSummaries:LaunchPathSummary' :: Maybe [ConstraintSummary]
constraintSummaries =
Maybe [ConstraintSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:name:LaunchPathSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:LaunchPathSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:LaunchPathSummary' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
launchPathSummary_constraintSummaries :: Lens.Lens' LaunchPathSummary (Prelude.Maybe [ConstraintSummary])
launchPathSummary_constraintSummaries :: (Maybe [ConstraintSummary] -> f (Maybe [ConstraintSummary]))
-> LaunchPathSummary -> f LaunchPathSummary
launchPathSummary_constraintSummaries = (LaunchPathSummary -> Maybe [ConstraintSummary])
-> (LaunchPathSummary
-> Maybe [ConstraintSummary] -> LaunchPathSummary)
-> Lens
LaunchPathSummary
LaunchPathSummary
(Maybe [ConstraintSummary])
(Maybe [ConstraintSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchPathSummary' {Maybe [ConstraintSummary]
constraintSummaries :: Maybe [ConstraintSummary]
$sel:constraintSummaries:LaunchPathSummary' :: LaunchPathSummary -> Maybe [ConstraintSummary]
constraintSummaries} -> Maybe [ConstraintSummary]
constraintSummaries) (\s :: LaunchPathSummary
s@LaunchPathSummary' {} Maybe [ConstraintSummary]
a -> LaunchPathSummary
s {$sel:constraintSummaries:LaunchPathSummary' :: Maybe [ConstraintSummary]
constraintSummaries = Maybe [ConstraintSummary]
a} :: LaunchPathSummary) ((Maybe [ConstraintSummary] -> f (Maybe [ConstraintSummary]))
-> LaunchPathSummary -> f LaunchPathSummary)
-> ((Maybe [ConstraintSummary] -> f (Maybe [ConstraintSummary]))
-> Maybe [ConstraintSummary] -> f (Maybe [ConstraintSummary]))
-> (Maybe [ConstraintSummary] -> f (Maybe [ConstraintSummary]))
-> LaunchPathSummary
-> f LaunchPathSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ConstraintSummary]
[ConstraintSummary]
[ConstraintSummary]
[ConstraintSummary]
-> Iso
(Maybe [ConstraintSummary])
(Maybe [ConstraintSummary])
(Maybe [ConstraintSummary])
(Maybe [ConstraintSummary])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[ConstraintSummary]
[ConstraintSummary]
[ConstraintSummary]
[ConstraintSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
launchPathSummary_name :: Lens.Lens' LaunchPathSummary (Prelude.Maybe Prelude.Text)
launchPathSummary_name :: (Maybe Text -> f (Maybe Text))
-> LaunchPathSummary -> f LaunchPathSummary
launchPathSummary_name = (LaunchPathSummary -> Maybe Text)
-> (LaunchPathSummary -> Maybe Text -> LaunchPathSummary)
-> Lens
LaunchPathSummary LaunchPathSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchPathSummary' {Maybe Text
name :: Maybe Text
$sel:name:LaunchPathSummary' :: LaunchPathSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: LaunchPathSummary
s@LaunchPathSummary' {} Maybe Text
a -> LaunchPathSummary
s {$sel:name:LaunchPathSummary' :: Maybe Text
name = Maybe Text
a} :: LaunchPathSummary)
launchPathSummary_id :: Lens.Lens' LaunchPathSummary (Prelude.Maybe Prelude.Text)
launchPathSummary_id :: (Maybe Text -> f (Maybe Text))
-> LaunchPathSummary -> f LaunchPathSummary
launchPathSummary_id = (LaunchPathSummary -> Maybe Text)
-> (LaunchPathSummary -> Maybe Text -> LaunchPathSummary)
-> Lens
LaunchPathSummary LaunchPathSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchPathSummary' {Maybe Text
id :: Maybe Text
$sel:id:LaunchPathSummary' :: LaunchPathSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: LaunchPathSummary
s@LaunchPathSummary' {} Maybe Text
a -> LaunchPathSummary
s {$sel:id:LaunchPathSummary' :: Maybe Text
id = Maybe Text
a} :: LaunchPathSummary)
launchPathSummary_tags :: Lens.Lens' LaunchPathSummary (Prelude.Maybe [Tag])
launchPathSummary_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> LaunchPathSummary -> f LaunchPathSummary
launchPathSummary_tags = (LaunchPathSummary -> Maybe [Tag])
-> (LaunchPathSummary -> Maybe [Tag] -> LaunchPathSummary)
-> Lens
LaunchPathSummary LaunchPathSummary (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchPathSummary' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:LaunchPathSummary' :: LaunchPathSummary -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: LaunchPathSummary
s@LaunchPathSummary' {} Maybe [Tag]
a -> LaunchPathSummary
s {$sel:tags:LaunchPathSummary' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: LaunchPathSummary) ((Maybe [Tag] -> f (Maybe [Tag]))
-> LaunchPathSummary -> f LaunchPathSummary)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> LaunchPathSummary
-> f LaunchPathSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON LaunchPathSummary where
parseJSON :: Value -> Parser LaunchPathSummary
parseJSON =
String
-> (Object -> Parser LaunchPathSummary)
-> Value
-> Parser LaunchPathSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LaunchPathSummary"
( \Object
x ->
Maybe [ConstraintSummary]
-> Maybe Text -> Maybe Text -> Maybe [Tag] -> LaunchPathSummary
LaunchPathSummary'
(Maybe [ConstraintSummary]
-> Maybe Text -> Maybe Text -> Maybe [Tag] -> LaunchPathSummary)
-> Parser (Maybe [ConstraintSummary])
-> Parser
(Maybe Text -> Maybe Text -> Maybe [Tag] -> LaunchPathSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ConstraintSummary]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConstraintSummaries"
Parser (Maybe (Maybe [ConstraintSummary]))
-> Maybe [ConstraintSummary] -> Parser (Maybe [ConstraintSummary])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ConstraintSummary]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text -> Maybe Text -> Maybe [Tag] -> LaunchPathSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Tag] -> LaunchPathSummary)
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
"Name")
Parser (Maybe Text -> Maybe [Tag] -> LaunchPathSummary)
-> Parser (Maybe Text) -> Parser (Maybe [Tag] -> LaunchPathSummary)
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
"Id")
Parser (Maybe [Tag] -> LaunchPathSummary)
-> Parser (Maybe [Tag]) -> Parser LaunchPathSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable LaunchPathSummary
instance Prelude.NFData LaunchPathSummary