module Stratosphere.ServiceCatalog.ServiceAction (
        module Exports, ServiceAction(..), mkServiceAction
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ServiceCatalog.ServiceAction.DefinitionParameterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ServiceAction
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-serviceaction.html>
    ServiceAction {ServiceAction -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-serviceaction.html#cfn-servicecatalog-serviceaction-acceptlanguage>
                   ServiceAction -> Maybe (Value Text)
acceptLanguage :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-serviceaction.html#cfn-servicecatalog-serviceaction-definition>
                   ServiceAction -> [DefinitionParameterProperty]
definition :: [DefinitionParameterProperty],
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-serviceaction.html#cfn-servicecatalog-serviceaction-definitiontype>
                   ServiceAction -> Value Text
definitionType :: (Value Prelude.Text),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-serviceaction.html#cfn-servicecatalog-serviceaction-description>
                   ServiceAction -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-serviceaction.html#cfn-servicecatalog-serviceaction-name>
                   ServiceAction -> Value Text
name :: (Value Prelude.Text)}
  deriving stock (ServiceAction -> ServiceAction -> Bool
(ServiceAction -> ServiceAction -> Bool)
-> (ServiceAction -> ServiceAction -> Bool) -> Eq ServiceAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServiceAction -> ServiceAction -> Bool
== :: ServiceAction -> ServiceAction -> Bool
$c/= :: ServiceAction -> ServiceAction -> Bool
/= :: ServiceAction -> ServiceAction -> Bool
Prelude.Eq, Int -> ServiceAction -> ShowS
[ServiceAction] -> ShowS
ServiceAction -> String
(Int -> ServiceAction -> ShowS)
-> (ServiceAction -> String)
-> ([ServiceAction] -> ShowS)
-> Show ServiceAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServiceAction -> ShowS
showsPrec :: Int -> ServiceAction -> ShowS
$cshow :: ServiceAction -> String
show :: ServiceAction -> String
$cshowList :: [ServiceAction] -> ShowS
showList :: [ServiceAction] -> ShowS
Prelude.Show)
mkServiceAction ::
  [DefinitionParameterProperty]
  -> Value Prelude.Text -> Value Prelude.Text -> ServiceAction
mkServiceAction :: [DefinitionParameterProperty]
-> Value Text -> Value Text -> ServiceAction
mkServiceAction [DefinitionParameterProperty]
definition Value Text
definitionType Value Text
name
  = ServiceAction
      {haddock_workaround_ :: ()
haddock_workaround_ = (), definition :: [DefinitionParameterProperty]
definition = [DefinitionParameterProperty]
definition,
       definitionType :: Value Text
definitionType = Value Text
definitionType, name :: Value Text
name = Value Text
name,
       acceptLanguage :: Maybe (Value Text)
acceptLanguage = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ServiceAction where
  toResourceProperties :: ServiceAction -> ResourceProperties
toResourceProperties ServiceAction {[DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceAction -> ()
acceptLanguage :: ServiceAction -> Maybe (Value Text)
definition :: ServiceAction -> [DefinitionParameterProperty]
definitionType :: ServiceAction -> Value Text
description :: ServiceAction -> Maybe (Value Text)
name :: ServiceAction -> Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ServiceCatalog::ServiceAction",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Definition" Key -> [DefinitionParameterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [DefinitionParameterProperty]
definition,
                            Key
"DefinitionType" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
definitionType, Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AcceptLanguage" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
acceptLanguage,
                               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description]))}
instance JSON.ToJSON ServiceAction where
  toJSON :: ServiceAction -> Value
toJSON ServiceAction {[DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceAction -> ()
acceptLanguage :: ServiceAction -> Maybe (Value Text)
definition :: ServiceAction -> [DefinitionParameterProperty]
definitionType :: ServiceAction -> Value Text
description :: ServiceAction -> Maybe (Value Text)
name :: ServiceAction -> Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Definition" Key -> [DefinitionParameterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [DefinitionParameterProperty]
definition,
               Key
"DefinitionType" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
definitionType, Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AcceptLanguage" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
acceptLanguage,
                  Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description])))
instance Property "AcceptLanguage" ServiceAction where
  type PropertyType "AcceptLanguage" ServiceAction = Value Prelude.Text
  set :: PropertyType "AcceptLanguage" ServiceAction
-> ServiceAction -> ServiceAction
set PropertyType "AcceptLanguage" ServiceAction
newValue ServiceAction {[DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceAction -> ()
acceptLanguage :: ServiceAction -> Maybe (Value Text)
definition :: ServiceAction -> [DefinitionParameterProperty]
definitionType :: ServiceAction -> Value Text
description :: ServiceAction -> Maybe (Value Text)
name :: ServiceAction -> Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}
    = ServiceAction {acceptLanguage :: Maybe (Value Text)
acceptLanguage = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AcceptLanguage" ServiceAction
Value Text
newValue, [DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Definition" ServiceAction where
  type PropertyType "Definition" ServiceAction = [DefinitionParameterProperty]
  set :: PropertyType "Definition" ServiceAction
-> ServiceAction -> ServiceAction
set PropertyType "Definition" ServiceAction
newValue ServiceAction {[DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceAction -> ()
acceptLanguage :: ServiceAction -> Maybe (Value Text)
definition :: ServiceAction -> [DefinitionParameterProperty]
definitionType :: ServiceAction -> Value Text
description :: ServiceAction -> Maybe (Value Text)
name :: ServiceAction -> Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}
    = ServiceAction {definition :: [DefinitionParameterProperty]
definition = [DefinitionParameterProperty]
PropertyType "Definition" ServiceAction
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}
instance Property "DefinitionType" ServiceAction where
  type PropertyType "DefinitionType" ServiceAction = Value Prelude.Text
  set :: PropertyType "DefinitionType" ServiceAction
-> ServiceAction -> ServiceAction
set PropertyType "DefinitionType" ServiceAction
newValue ServiceAction {[DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceAction -> ()
acceptLanguage :: ServiceAction -> Maybe (Value Text)
definition :: ServiceAction -> [DefinitionParameterProperty]
definitionType :: ServiceAction -> Value Text
description :: ServiceAction -> Maybe (Value Text)
name :: ServiceAction -> Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}
    = ServiceAction {definitionType :: Value Text
definitionType = PropertyType "DefinitionType" ServiceAction
Value Text
newValue, [DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
description :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Description" ServiceAction where
  type PropertyType "Description" ServiceAction = Value Prelude.Text
  set :: PropertyType "Description" ServiceAction
-> ServiceAction -> ServiceAction
set PropertyType "Description" ServiceAction
newValue ServiceAction {[DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceAction -> ()
acceptLanguage :: ServiceAction -> Maybe (Value Text)
definition :: ServiceAction -> [DefinitionParameterProperty]
definitionType :: ServiceAction -> Value Text
description :: ServiceAction -> Maybe (Value Text)
name :: ServiceAction -> Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}
    = ServiceAction {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" ServiceAction
Value Text
newValue, [DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
name :: Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
name :: Value Text
..}
instance Property "Name" ServiceAction where
  type PropertyType "Name" ServiceAction = Value Prelude.Text
  set :: PropertyType "Name" ServiceAction -> ServiceAction -> ServiceAction
set PropertyType "Name" ServiceAction
newValue ServiceAction {[DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceAction -> ()
acceptLanguage :: ServiceAction -> Maybe (Value Text)
definition :: ServiceAction -> [DefinitionParameterProperty]
definitionType :: ServiceAction -> Value Text
description :: ServiceAction -> Maybe (Value Text)
name :: ServiceAction -> Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}
    = ServiceAction {name :: Value Text
name = PropertyType "Name" ServiceAction
Value Text
newValue, [DefinitionParameterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
definition :: [DefinitionParameterProperty]
definitionType :: Value Text
description :: Maybe (Value Text)
..}