{-# 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.ExecutionParameter where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExecutionParameter = ExecutionParameter'
{
ExecutionParameter -> Maybe [Text]
defaultValues :: Prelude.Maybe [Prelude.Text],
ExecutionParameter -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ExecutionParameter -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
}
deriving (ExecutionParameter -> ExecutionParameter -> Bool
(ExecutionParameter -> ExecutionParameter -> Bool)
-> (ExecutionParameter -> ExecutionParameter -> Bool)
-> Eq ExecutionParameter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecutionParameter -> ExecutionParameter -> Bool
$c/= :: ExecutionParameter -> ExecutionParameter -> Bool
== :: ExecutionParameter -> ExecutionParameter -> Bool
$c== :: ExecutionParameter -> ExecutionParameter -> Bool
Prelude.Eq, ReadPrec [ExecutionParameter]
ReadPrec ExecutionParameter
Int -> ReadS ExecutionParameter
ReadS [ExecutionParameter]
(Int -> ReadS ExecutionParameter)
-> ReadS [ExecutionParameter]
-> ReadPrec ExecutionParameter
-> ReadPrec [ExecutionParameter]
-> Read ExecutionParameter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecutionParameter]
$creadListPrec :: ReadPrec [ExecutionParameter]
readPrec :: ReadPrec ExecutionParameter
$creadPrec :: ReadPrec ExecutionParameter
readList :: ReadS [ExecutionParameter]
$creadList :: ReadS [ExecutionParameter]
readsPrec :: Int -> ReadS ExecutionParameter
$creadsPrec :: Int -> ReadS ExecutionParameter
Prelude.Read, Int -> ExecutionParameter -> ShowS
[ExecutionParameter] -> ShowS
ExecutionParameter -> String
(Int -> ExecutionParameter -> ShowS)
-> (ExecutionParameter -> String)
-> ([ExecutionParameter] -> ShowS)
-> Show ExecutionParameter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecutionParameter] -> ShowS
$cshowList :: [ExecutionParameter] -> ShowS
show :: ExecutionParameter -> String
$cshow :: ExecutionParameter -> String
showsPrec :: Int -> ExecutionParameter -> ShowS
$cshowsPrec :: Int -> ExecutionParameter -> ShowS
Prelude.Show, (forall x. ExecutionParameter -> Rep ExecutionParameter x)
-> (forall x. Rep ExecutionParameter x -> ExecutionParameter)
-> Generic ExecutionParameter
forall x. Rep ExecutionParameter x -> ExecutionParameter
forall x. ExecutionParameter -> Rep ExecutionParameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecutionParameter x -> ExecutionParameter
$cfrom :: forall x. ExecutionParameter -> Rep ExecutionParameter x
Prelude.Generic)
newExecutionParameter ::
ExecutionParameter
newExecutionParameter :: ExecutionParameter
newExecutionParameter =
ExecutionParameter' :: Maybe [Text] -> Maybe Text -> Maybe Text -> ExecutionParameter
ExecutionParameter'
{ $sel:defaultValues:ExecutionParameter' :: Maybe [Text]
defaultValues =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:name:ExecutionParameter' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':ExecutionParameter' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
executionParameter_defaultValues :: Lens.Lens' ExecutionParameter (Prelude.Maybe [Prelude.Text])
executionParameter_defaultValues :: (Maybe [Text] -> f (Maybe [Text]))
-> ExecutionParameter -> f ExecutionParameter
executionParameter_defaultValues = (ExecutionParameter -> Maybe [Text])
-> (ExecutionParameter -> Maybe [Text] -> ExecutionParameter)
-> Lens
ExecutionParameter ExecutionParameter (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionParameter' {Maybe [Text]
defaultValues :: Maybe [Text]
$sel:defaultValues:ExecutionParameter' :: ExecutionParameter -> Maybe [Text]
defaultValues} -> Maybe [Text]
defaultValues) (\s :: ExecutionParameter
s@ExecutionParameter' {} Maybe [Text]
a -> ExecutionParameter
s {$sel:defaultValues:ExecutionParameter' :: Maybe [Text]
defaultValues = Maybe [Text]
a} :: ExecutionParameter) ((Maybe [Text] -> f (Maybe [Text]))
-> ExecutionParameter -> f ExecutionParameter)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ExecutionParameter
-> f ExecutionParameter
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
executionParameter_name :: Lens.Lens' ExecutionParameter (Prelude.Maybe Prelude.Text)
executionParameter_name :: (Maybe Text -> f (Maybe Text))
-> ExecutionParameter -> f ExecutionParameter
executionParameter_name = (ExecutionParameter -> Maybe Text)
-> (ExecutionParameter -> Maybe Text -> ExecutionParameter)
-> Lens
ExecutionParameter ExecutionParameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionParameter' {Maybe Text
name :: Maybe Text
$sel:name:ExecutionParameter' :: ExecutionParameter -> Maybe Text
name} -> Maybe Text
name) (\s :: ExecutionParameter
s@ExecutionParameter' {} Maybe Text
a -> ExecutionParameter
s {$sel:name:ExecutionParameter' :: Maybe Text
name = Maybe Text
a} :: ExecutionParameter)
executionParameter_type :: Lens.Lens' ExecutionParameter (Prelude.Maybe Prelude.Text)
executionParameter_type :: (Maybe Text -> f (Maybe Text))
-> ExecutionParameter -> f ExecutionParameter
executionParameter_type = (ExecutionParameter -> Maybe Text)
-> (ExecutionParameter -> Maybe Text -> ExecutionParameter)
-> Lens
ExecutionParameter ExecutionParameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionParameter' {Maybe Text
type' :: Maybe Text
$sel:type':ExecutionParameter' :: ExecutionParameter -> Maybe Text
type'} -> Maybe Text
type') (\s :: ExecutionParameter
s@ExecutionParameter' {} Maybe Text
a -> ExecutionParameter
s {$sel:type':ExecutionParameter' :: Maybe Text
type' = Maybe Text
a} :: ExecutionParameter)
instance Core.FromJSON ExecutionParameter where
parseJSON :: Value -> Parser ExecutionParameter
parseJSON =
String
-> (Object -> Parser ExecutionParameter)
-> Value
-> Parser ExecutionParameter
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExecutionParameter"
( \Object
x ->
Maybe [Text] -> Maybe Text -> Maybe Text -> ExecutionParameter
ExecutionParameter'
(Maybe [Text] -> Maybe Text -> Maybe Text -> ExecutionParameter)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> Maybe Text -> ExecutionParameter)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultValues" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Text -> Maybe Text -> ExecutionParameter)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ExecutionParameter)
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 -> ExecutionParameter)
-> Parser (Maybe Text) -> Parser ExecutionParameter
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
"Type")
)
instance Prelude.Hashable ExecutionParameter
instance Prelude.NFData ExecutionParameter