{-# 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.UpdateProvisioningParameter 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 UpdateProvisioningParameter = UpdateProvisioningParameter'
{
UpdateProvisioningParameter -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
UpdateProvisioningParameter -> Maybe Bool
usePreviousValue :: Prelude.Maybe Prelude.Bool,
UpdateProvisioningParameter -> Maybe Text
value :: Prelude.Maybe Prelude.Text
}
deriving (UpdateProvisioningParameter -> UpdateProvisioningParameter -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProvisioningParameter -> UpdateProvisioningParameter -> Bool
$c/= :: UpdateProvisioningParameter -> UpdateProvisioningParameter -> Bool
== :: UpdateProvisioningParameter -> UpdateProvisioningParameter -> Bool
$c== :: UpdateProvisioningParameter -> UpdateProvisioningParameter -> Bool
Prelude.Eq, ReadPrec [UpdateProvisioningParameter]
ReadPrec UpdateProvisioningParameter
Int -> ReadS UpdateProvisioningParameter
ReadS [UpdateProvisioningParameter]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProvisioningParameter]
$creadListPrec :: ReadPrec [UpdateProvisioningParameter]
readPrec :: ReadPrec UpdateProvisioningParameter
$creadPrec :: ReadPrec UpdateProvisioningParameter
readList :: ReadS [UpdateProvisioningParameter]
$creadList :: ReadS [UpdateProvisioningParameter]
readsPrec :: Int -> ReadS UpdateProvisioningParameter
$creadsPrec :: Int -> ReadS UpdateProvisioningParameter
Prelude.Read, Int -> UpdateProvisioningParameter -> ShowS
[UpdateProvisioningParameter] -> ShowS
UpdateProvisioningParameter -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProvisioningParameter] -> ShowS
$cshowList :: [UpdateProvisioningParameter] -> ShowS
show :: UpdateProvisioningParameter -> String
$cshow :: UpdateProvisioningParameter -> String
showsPrec :: Int -> UpdateProvisioningParameter -> ShowS
$cshowsPrec :: Int -> UpdateProvisioningParameter -> ShowS
Prelude.Show, forall x.
Rep UpdateProvisioningParameter x -> UpdateProvisioningParameter
forall x.
UpdateProvisioningParameter -> Rep UpdateProvisioningParameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateProvisioningParameter x -> UpdateProvisioningParameter
$cfrom :: forall x.
UpdateProvisioningParameter -> Rep UpdateProvisioningParameter x
Prelude.Generic)
newUpdateProvisioningParameter ::
UpdateProvisioningParameter
newUpdateProvisioningParameter :: UpdateProvisioningParameter
newUpdateProvisioningParameter =
UpdateProvisioningParameter'
{ $sel:key:UpdateProvisioningParameter' :: Maybe Text
key = forall a. Maybe a
Prelude.Nothing,
$sel:usePreviousValue:UpdateProvisioningParameter' :: Maybe Bool
usePreviousValue = forall a. Maybe a
Prelude.Nothing,
$sel:value:UpdateProvisioningParameter' :: Maybe Text
value = forall a. Maybe a
Prelude.Nothing
}
updateProvisioningParameter_key :: Lens.Lens' UpdateProvisioningParameter (Prelude.Maybe Prelude.Text)
updateProvisioningParameter_key :: Lens' UpdateProvisioningParameter (Maybe Text)
updateProvisioningParameter_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningParameter' {Maybe Text
key :: Maybe Text
$sel:key:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Text
key} -> Maybe Text
key) (\s :: UpdateProvisioningParameter
s@UpdateProvisioningParameter' {} Maybe Text
a -> UpdateProvisioningParameter
s {$sel:key:UpdateProvisioningParameter' :: Maybe Text
key = Maybe Text
a} :: UpdateProvisioningParameter)
updateProvisioningParameter_usePreviousValue :: Lens.Lens' UpdateProvisioningParameter (Prelude.Maybe Prelude.Bool)
updateProvisioningParameter_usePreviousValue :: Lens' UpdateProvisioningParameter (Maybe Bool)
updateProvisioningParameter_usePreviousValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningParameter' {Maybe Bool
usePreviousValue :: Maybe Bool
$sel:usePreviousValue:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Bool
usePreviousValue} -> Maybe Bool
usePreviousValue) (\s :: UpdateProvisioningParameter
s@UpdateProvisioningParameter' {} Maybe Bool
a -> UpdateProvisioningParameter
s {$sel:usePreviousValue:UpdateProvisioningParameter' :: Maybe Bool
usePreviousValue = Maybe Bool
a} :: UpdateProvisioningParameter)
updateProvisioningParameter_value :: Lens.Lens' UpdateProvisioningParameter (Prelude.Maybe Prelude.Text)
updateProvisioningParameter_value :: Lens' UpdateProvisioningParameter (Maybe Text)
updateProvisioningParameter_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningParameter' {Maybe Text
value :: Maybe Text
$sel:value:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Text
value} -> Maybe Text
value) (\s :: UpdateProvisioningParameter
s@UpdateProvisioningParameter' {} Maybe Text
a -> UpdateProvisioningParameter
s {$sel:value:UpdateProvisioningParameter' :: Maybe Text
value = Maybe Text
a} :: UpdateProvisioningParameter)
instance Data.FromJSON UpdateProvisioningParameter where
parseJSON :: Value -> Parser UpdateProvisioningParameter
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"UpdateProvisioningParameter"
( \Object
x ->
Maybe Text
-> Maybe Bool -> Maybe Text -> UpdateProvisioningParameter
UpdateProvisioningParameter'
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
"Key")
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
"UsePreviousValue")
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
"Value")
)
instance Prelude.Hashable UpdateProvisioningParameter where
hashWithSalt :: Int -> UpdateProvisioningParameter -> Int
hashWithSalt Int
_salt UpdateProvisioningParameter' {Maybe Bool
Maybe Text
value :: Maybe Text
usePreviousValue :: Maybe Bool
key :: Maybe Text
$sel:value:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Text
$sel:usePreviousValue:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Bool
$sel:key:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
key
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
usePreviousValue
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
value
instance Prelude.NFData UpdateProvisioningParameter where
rnf :: UpdateProvisioningParameter -> ()
rnf UpdateProvisioningParameter' {Maybe Bool
Maybe Text
value :: Maybe Text
usePreviousValue :: Maybe Bool
key :: Maybe Text
$sel:value:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Text
$sel:usePreviousValue:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Bool
$sel:key:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
key
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
usePreviousValue
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
value
instance Data.ToJSON UpdateProvisioningParameter where
toJSON :: UpdateProvisioningParameter -> Value
toJSON UpdateProvisioningParameter' {Maybe Bool
Maybe Text
value :: Maybe Text
usePreviousValue :: Maybe Bool
key :: Maybe Text
$sel:value:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Text
$sel:usePreviousValue:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Bool
$sel:key:UpdateProvisioningParameter' :: UpdateProvisioningParameter -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Key" 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 Text
key,
(Key
"UsePreviousValue" 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 Bool
usePreviousValue,
(Key
"Value" 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 Text
value
]
)