module Stratosphere.Events.ApiDestination (
        ApiDestination(..), mkApiDestination
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ApiDestination
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html>
    ApiDestination {ApiDestination -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-connectionarn>
                    ApiDestination -> Value Text
connectionArn :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-description>
                    ApiDestination -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-httpmethod>
                    ApiDestination -> Value Text
httpMethod :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-invocationendpoint>
                    ApiDestination -> Value Text
invocationEndpoint :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-invocationratelimitpersecond>
                    ApiDestination -> Maybe (Value Integer)
invocationRateLimitPerSecond :: (Prelude.Maybe (Value Prelude.Integer)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-name>
                    ApiDestination -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ApiDestination -> ApiDestination -> Bool
(ApiDestination -> ApiDestination -> Bool)
-> (ApiDestination -> ApiDestination -> Bool) -> Eq ApiDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ApiDestination -> ApiDestination -> Bool
== :: ApiDestination -> ApiDestination -> Bool
$c/= :: ApiDestination -> ApiDestination -> Bool
/= :: ApiDestination -> ApiDestination -> Bool
Prelude.Eq, Int -> ApiDestination -> ShowS
[ApiDestination] -> ShowS
ApiDestination -> String
(Int -> ApiDestination -> ShowS)
-> (ApiDestination -> String)
-> ([ApiDestination] -> ShowS)
-> Show ApiDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ApiDestination -> ShowS
showsPrec :: Int -> ApiDestination -> ShowS
$cshow :: ApiDestination -> String
show :: ApiDestination -> String
$cshowList :: [ApiDestination] -> ShowS
showList :: [ApiDestination] -> ShowS
Prelude.Show)
mkApiDestination ::
  Value Prelude.Text
  -> Value Prelude.Text -> Value Prelude.Text -> ApiDestination
mkApiDestination :: Value Text -> Value Text -> Value Text -> ApiDestination
mkApiDestination Value Text
connectionArn Value Text
httpMethod Value Text
invocationEndpoint
  = ApiDestination
      {haddock_workaround_ :: ()
haddock_workaround_ = (), connectionArn :: Value Text
connectionArn = Value Text
connectionArn,
       httpMethod :: Value Text
httpMethod = Value Text
httpMethod, invocationEndpoint :: Value Text
invocationEndpoint = Value Text
invocationEndpoint,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       invocationRateLimitPerSecond :: Maybe (Value Integer)
invocationRateLimitPerSecond = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ApiDestination where
  toResourceProperties :: ApiDestination -> ResourceProperties
toResourceProperties ApiDestination {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiDestination -> ()
connectionArn :: ApiDestination -> Value Text
description :: ApiDestination -> Maybe (Value Text)
httpMethod :: ApiDestination -> Value Text
invocationEndpoint :: ApiDestination -> Value Text
invocationRateLimitPerSecond :: ApiDestination -> Maybe (Value Integer)
name :: ApiDestination -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Events::ApiDestination",
         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
"ConnectionArn" 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
connectionArn,
                            Key
"HttpMethod" 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
httpMethod,
                            Key
"InvocationEndpoint" 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
invocationEndpoint]
                           ([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
"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,
                               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InvocationRateLimitPerSecond"
                                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
invocationRateLimitPerSecond,
                               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
"Name" (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)
name]))}
instance JSON.ToJSON ApiDestination where
  toJSON :: ApiDestination -> Value
toJSON ApiDestination {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiDestination -> ()
connectionArn :: ApiDestination -> Value Text
description :: ApiDestination -> Maybe (Value Text)
httpMethod :: ApiDestination -> Value Text
invocationEndpoint :: ApiDestination -> Value Text
invocationRateLimitPerSecond :: ApiDestination -> Maybe (Value Integer)
name :: ApiDestination -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (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
"ConnectionArn" 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
connectionArn,
               Key
"HttpMethod" 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
httpMethod,
               Key
"InvocationEndpoint" 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
invocationEndpoint]
              ([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
"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,
                  Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InvocationRateLimitPerSecond"
                    (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
invocationRateLimitPerSecond,
                  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
"Name" (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)
name])))
instance Property "ConnectionArn" ApiDestination where
  type PropertyType "ConnectionArn" ApiDestination = Value Prelude.Text
  set :: PropertyType "ConnectionArn" ApiDestination
-> ApiDestination -> ApiDestination
set PropertyType "ConnectionArn" ApiDestination
newValue ApiDestination {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiDestination -> ()
connectionArn :: ApiDestination -> Value Text
description :: ApiDestination -> Maybe (Value Text)
httpMethod :: ApiDestination -> Value Text
invocationEndpoint :: ApiDestination -> Value Text
invocationRateLimitPerSecond :: ApiDestination -> Maybe (Value Integer)
name :: ApiDestination -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = ApiDestination {connectionArn :: Value Text
connectionArn = PropertyType "ConnectionArn" ApiDestination
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
instance Property "Description" ApiDestination where
  type PropertyType "Description" ApiDestination = Value Prelude.Text
  set :: PropertyType "Description" ApiDestination
-> ApiDestination -> ApiDestination
set PropertyType "Description" ApiDestination
newValue ApiDestination {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiDestination -> ()
connectionArn :: ApiDestination -> Value Text
description :: ApiDestination -> Maybe (Value Text)
httpMethod :: ApiDestination -> Value Text
invocationEndpoint :: ApiDestination -> Value Text
invocationRateLimitPerSecond :: ApiDestination -> Maybe (Value Integer)
name :: ApiDestination -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = ApiDestination {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" ApiDestination
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
instance Property "HttpMethod" ApiDestination where
  type PropertyType "HttpMethod" ApiDestination = Value Prelude.Text
  set :: PropertyType "HttpMethod" ApiDestination
-> ApiDestination -> ApiDestination
set PropertyType "HttpMethod" ApiDestination
newValue ApiDestination {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiDestination -> ()
connectionArn :: ApiDestination -> Value Text
description :: ApiDestination -> Maybe (Value Text)
httpMethod :: ApiDestination -> Value Text
invocationEndpoint :: ApiDestination -> Value Text
invocationRateLimitPerSecond :: ApiDestination -> Maybe (Value Integer)
name :: ApiDestination -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = ApiDestination {httpMethod :: Value Text
httpMethod = PropertyType "HttpMethod" ApiDestination
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
instance Property "InvocationEndpoint" ApiDestination where
  type PropertyType "InvocationEndpoint" ApiDestination = Value Prelude.Text
  set :: PropertyType "InvocationEndpoint" ApiDestination
-> ApiDestination -> ApiDestination
set PropertyType "InvocationEndpoint" ApiDestination
newValue ApiDestination {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiDestination -> ()
connectionArn :: ApiDestination -> Value Text
description :: ApiDestination -> Maybe (Value Text)
httpMethod :: ApiDestination -> Value Text
invocationEndpoint :: ApiDestination -> Value Text
invocationRateLimitPerSecond :: ApiDestination -> Maybe (Value Integer)
name :: ApiDestination -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = ApiDestination {invocationEndpoint :: Value Text
invocationEndpoint = PropertyType "InvocationEndpoint" ApiDestination
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
instance Property "InvocationRateLimitPerSecond" ApiDestination where
  type PropertyType "InvocationRateLimitPerSecond" ApiDestination = Value Prelude.Integer
  set :: PropertyType "InvocationRateLimitPerSecond" ApiDestination
-> ApiDestination -> ApiDestination
set PropertyType "InvocationRateLimitPerSecond" ApiDestination
newValue ApiDestination {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiDestination -> ()
connectionArn :: ApiDestination -> Value Text
description :: ApiDestination -> Maybe (Value Text)
httpMethod :: ApiDestination -> Value Text
invocationEndpoint :: ApiDestination -> Value Text
invocationRateLimitPerSecond :: ApiDestination -> Maybe (Value Integer)
name :: ApiDestination -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = ApiDestination
        {invocationRateLimitPerSecond :: Maybe (Value Integer)
invocationRateLimitPerSecond = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InvocationRateLimitPerSecond" ApiDestination
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
name :: Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
name :: Maybe (Value Text)
..}
instance Property "Name" ApiDestination where
  type PropertyType "Name" ApiDestination = Value Prelude.Text
  set :: PropertyType "Name" ApiDestination
-> ApiDestination -> ApiDestination
set PropertyType "Name" ApiDestination
newValue ApiDestination {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiDestination -> ()
connectionArn :: ApiDestination -> Value Text
description :: ApiDestination -> Maybe (Value Text)
httpMethod :: ApiDestination -> Value Text
invocationEndpoint :: ApiDestination -> Value Text
invocationRateLimitPerSecond :: ApiDestination -> Maybe (Value Integer)
name :: ApiDestination -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}
    = ApiDestination {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" ApiDestination
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
haddock_workaround_ :: ()
connectionArn :: Value Text
description :: Maybe (Value Text)
httpMethod :: Value Text
invocationEndpoint :: Value Text
invocationRateLimitPerSecond :: Maybe (Value Integer)
..}