module Stratosphere.ApiGateway.ApiKey.StageKeyProperty (
        StageKeyProperty(..), mkStageKeyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StageKeyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-apikey-stagekey.html>
    StageKeyProperty {StageKeyProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-apikey-stagekey.html#cfn-apigateway-apikey-stagekey-restapiid>
                      StageKeyProperty -> Maybe (Value Text)
restApiId :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-apikey-stagekey.html#cfn-apigateway-apikey-stagekey-stagename>
                      StageKeyProperty -> Maybe (Value Text)
stageName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (StageKeyProperty -> StageKeyProperty -> Bool
(StageKeyProperty -> StageKeyProperty -> Bool)
-> (StageKeyProperty -> StageKeyProperty -> Bool)
-> Eq StageKeyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StageKeyProperty -> StageKeyProperty -> Bool
== :: StageKeyProperty -> StageKeyProperty -> Bool
$c/= :: StageKeyProperty -> StageKeyProperty -> Bool
/= :: StageKeyProperty -> StageKeyProperty -> Bool
Prelude.Eq, Int -> StageKeyProperty -> ShowS
[StageKeyProperty] -> ShowS
StageKeyProperty -> String
(Int -> StageKeyProperty -> ShowS)
-> (StageKeyProperty -> String)
-> ([StageKeyProperty] -> ShowS)
-> Show StageKeyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StageKeyProperty -> ShowS
showsPrec :: Int -> StageKeyProperty -> ShowS
$cshow :: StageKeyProperty -> String
show :: StageKeyProperty -> String
$cshowList :: [StageKeyProperty] -> ShowS
showList :: [StageKeyProperty] -> ShowS
Prelude.Show)
mkStageKeyProperty :: StageKeyProperty
mkStageKeyProperty :: StageKeyProperty
mkStageKeyProperty
  = StageKeyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), restApiId :: Maybe (Value Text)
restApiId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       stageName :: Maybe (Value Text)
stageName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StageKeyProperty where
  toResourceProperties :: StageKeyProperty -> ResourceProperties
toResourceProperties StageKeyProperty {Maybe (Value Text)
()
haddock_workaround_ :: StageKeyProperty -> ()
restApiId :: StageKeyProperty -> Maybe (Value Text)
stageName :: StageKeyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
restApiId :: Maybe (Value Text)
stageName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApiGateway::ApiKey.StageKey",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([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
"RestApiId" (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)
restApiId,
                            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
"StageName" (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)
stageName])}
instance JSON.ToJSON StageKeyProperty where
  toJSON :: StageKeyProperty -> Value
toJSON StageKeyProperty {Maybe (Value Text)
()
haddock_workaround_ :: StageKeyProperty -> ()
restApiId :: StageKeyProperty -> Maybe (Value Text)
stageName :: StageKeyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
restApiId :: Maybe (Value Text)
stageName :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([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
"RestApiId" (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)
restApiId,
               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
"StageName" (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)
stageName]))
instance Property "RestApiId" StageKeyProperty where
  type PropertyType "RestApiId" StageKeyProperty = Value Prelude.Text
  set :: PropertyType "RestApiId" StageKeyProperty
-> StageKeyProperty -> StageKeyProperty
set PropertyType "RestApiId" StageKeyProperty
newValue StageKeyProperty {Maybe (Value Text)
()
haddock_workaround_ :: StageKeyProperty -> ()
restApiId :: StageKeyProperty -> Maybe (Value Text)
stageName :: StageKeyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
restApiId :: Maybe (Value Text)
stageName :: Maybe (Value Text)
..}
    = StageKeyProperty {restApiId :: Maybe (Value Text)
restApiId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RestApiId" StageKeyProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
stageName :: Maybe (Value Text)
haddock_workaround_ :: ()
stageName :: Maybe (Value Text)
..}
instance Property "StageName" StageKeyProperty where
  type PropertyType "StageName" StageKeyProperty = Value Prelude.Text
  set :: PropertyType "StageName" StageKeyProperty
-> StageKeyProperty -> StageKeyProperty
set PropertyType "StageName" StageKeyProperty
newValue StageKeyProperty {Maybe (Value Text)
()
haddock_workaround_ :: StageKeyProperty -> ()
restApiId :: StageKeyProperty -> Maybe (Value Text)
stageName :: StageKeyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
restApiId :: Maybe (Value Text)
stageName :: Maybe (Value Text)
..}
    = StageKeyProperty {stageName :: Maybe (Value Text)
stageName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StageName" StageKeyProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
restApiId :: Maybe (Value Text)
haddock_workaround_ :: ()
restApiId :: Maybe (Value Text)
..}