module Stratosphere.Events.Endpoint (
module Exports, Endpoint(..), mkEndpoint
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Events.Endpoint.EndpointEventBusProperty as Exports
import {-# SOURCE #-} Stratosphere.Events.Endpoint.ReplicationConfigProperty as Exports
import {-# SOURCE #-} Stratosphere.Events.Endpoint.RoutingConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Endpoint
=
Endpoint {Endpoint -> ()
haddock_workaround_ :: (),
Endpoint -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
Endpoint -> [EndpointEventBusProperty]
eventBuses :: [EndpointEventBusProperty],
Endpoint -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
Endpoint -> Maybe ReplicationConfigProperty
replicationConfig :: (Prelude.Maybe ReplicationConfigProperty),
Endpoint -> Maybe (Value Text)
roleArn :: (Prelude.Maybe (Value Prelude.Text)),
Endpoint -> RoutingConfigProperty
routingConfig :: RoutingConfigProperty}
deriving stock (Endpoint -> Endpoint -> Bool
(Endpoint -> Endpoint -> Bool)
-> (Endpoint -> Endpoint -> Bool) -> Eq Endpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Endpoint -> Endpoint -> Bool
== :: Endpoint -> Endpoint -> Bool
$c/= :: Endpoint -> Endpoint -> Bool
/= :: Endpoint -> Endpoint -> Bool
Prelude.Eq, Int -> Endpoint -> ShowS
[Endpoint] -> ShowS
Endpoint -> String
(Int -> Endpoint -> ShowS)
-> (Endpoint -> String) -> ([Endpoint] -> ShowS) -> Show Endpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Endpoint -> ShowS
showsPrec :: Int -> Endpoint -> ShowS
$cshow :: Endpoint -> String
show :: Endpoint -> String
$cshowList :: [Endpoint] -> ShowS
showList :: [Endpoint] -> ShowS
Prelude.Show)
mkEndpoint ::
[EndpointEventBusProperty] -> RoutingConfigProperty -> Endpoint
mkEndpoint :: [EndpointEventBusProperty] -> RoutingConfigProperty -> Endpoint
mkEndpoint [EndpointEventBusProperty]
eventBuses RoutingConfigProperty
routingConfig
= Endpoint
{haddock_workaround_ :: ()
haddock_workaround_ = (), eventBuses :: [EndpointEventBusProperty]
eventBuses = [EndpointEventBusProperty]
eventBuses,
routingConfig :: RoutingConfigProperty
routingConfig = RoutingConfigProperty
routingConfig, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, replicationConfig :: Maybe ReplicationConfigProperty
replicationConfig = Maybe ReplicationConfigProperty
forall a. Maybe a
Prelude.Nothing,
roleArn :: Maybe (Value Text)
roleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Endpoint where
toResourceProperties :: Endpoint -> ResourceProperties
toResourceProperties Endpoint {[EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: Endpoint -> ()
description :: Endpoint -> Maybe (Value Text)
eventBuses :: Endpoint -> [EndpointEventBusProperty]
name :: Endpoint -> Maybe (Value Text)
replicationConfig :: Endpoint -> Maybe ReplicationConfigProperty
roleArn :: Endpoint -> Maybe (Value Text)
routingConfig :: Endpoint -> RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Events::Endpoint", 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
"EventBuses" Key -> [EndpointEventBusProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [EndpointEventBusProperty]
eventBuses,
Key
"RoutingConfig" Key -> RoutingConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RoutingConfigProperty
routingConfig]
([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 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,
Key -> ReplicationConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReplicationConfig" (ReplicationConfigProperty -> (Key, Value))
-> Maybe ReplicationConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReplicationConfigProperty
replicationConfig,
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
"RoleArn" (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)
roleArn]))}
instance JSON.ToJSON Endpoint where
toJSON :: Endpoint -> Value
toJSON Endpoint {[EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: Endpoint -> ()
description :: Endpoint -> Maybe (Value Text)
eventBuses :: Endpoint -> [EndpointEventBusProperty]
name :: Endpoint -> Maybe (Value Text)
replicationConfig :: Endpoint -> Maybe ReplicationConfigProperty
roleArn :: Endpoint -> Maybe (Value Text)
routingConfig :: Endpoint -> RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
= [(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
"EventBuses" Key -> [EndpointEventBusProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [EndpointEventBusProperty]
eventBuses,
Key
"RoutingConfig" Key -> RoutingConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RoutingConfigProperty
routingConfig]
([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 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,
Key -> ReplicationConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReplicationConfig" (ReplicationConfigProperty -> (Key, Value))
-> Maybe ReplicationConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReplicationConfigProperty
replicationConfig,
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
"RoleArn" (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)
roleArn])))
instance Property "Description" Endpoint where
type PropertyType "Description" Endpoint = Value Prelude.Text
set :: PropertyType "Description" Endpoint -> Endpoint -> Endpoint
set PropertyType "Description" Endpoint
newValue Endpoint {[EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: Endpoint -> ()
description :: Endpoint -> Maybe (Value Text)
eventBuses :: Endpoint -> [EndpointEventBusProperty]
name :: Endpoint -> Maybe (Value Text)
replicationConfig :: Endpoint -> Maybe ReplicationConfigProperty
roleArn :: Endpoint -> Maybe (Value Text)
routingConfig :: Endpoint -> RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
= Endpoint {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" Endpoint
Value Text
newValue, [EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: ()
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
haddock_workaround_ :: ()
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
instance Property "EventBuses" Endpoint where
type PropertyType "EventBuses" Endpoint = [EndpointEventBusProperty]
set :: PropertyType "EventBuses" Endpoint -> Endpoint -> Endpoint
set PropertyType "EventBuses" Endpoint
newValue Endpoint {[EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: Endpoint -> ()
description :: Endpoint -> Maybe (Value Text)
eventBuses :: Endpoint -> [EndpointEventBusProperty]
name :: Endpoint -> Maybe (Value Text)
replicationConfig :: Endpoint -> Maybe ReplicationConfigProperty
roleArn :: Endpoint -> Maybe (Value Text)
routingConfig :: Endpoint -> RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..} = Endpoint {eventBuses :: [EndpointEventBusProperty]
eventBuses = [EndpointEventBusProperty]
PropertyType "EventBuses" Endpoint
newValue, Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
instance Property "Name" Endpoint where
type PropertyType "Name" Endpoint = Value Prelude.Text
set :: PropertyType "Name" Endpoint -> Endpoint -> Endpoint
set PropertyType "Name" Endpoint
newValue Endpoint {[EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: Endpoint -> ()
description :: Endpoint -> Maybe (Value Text)
eventBuses :: Endpoint -> [EndpointEventBusProperty]
name :: Endpoint -> Maybe (Value Text)
replicationConfig :: Endpoint -> Maybe ReplicationConfigProperty
roleArn :: Endpoint -> Maybe (Value Text)
routingConfig :: Endpoint -> RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
= Endpoint {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" Endpoint
Value Text
newValue, [EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
instance Property "ReplicationConfig" Endpoint where
type PropertyType "ReplicationConfig" Endpoint = ReplicationConfigProperty
set :: PropertyType "ReplicationConfig" Endpoint -> Endpoint -> Endpoint
set PropertyType "ReplicationConfig" Endpoint
newValue Endpoint {[EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: Endpoint -> ()
description :: Endpoint -> Maybe (Value Text)
eventBuses :: Endpoint -> [EndpointEventBusProperty]
name :: Endpoint -> Maybe (Value Text)
replicationConfig :: Endpoint -> Maybe ReplicationConfigProperty
roleArn :: Endpoint -> Maybe (Value Text)
routingConfig :: Endpoint -> RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
= Endpoint {replicationConfig :: Maybe ReplicationConfigProperty
replicationConfig = ReplicationConfigProperty -> Maybe ReplicationConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReplicationConfig" Endpoint
ReplicationConfigProperty
newValue, [EndpointEventBusProperty]
Maybe (Value Text)
()
RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
instance Property "RoleArn" Endpoint where
type PropertyType "RoleArn" Endpoint = Value Prelude.Text
set :: PropertyType "RoleArn" Endpoint -> Endpoint -> Endpoint
set PropertyType "RoleArn" Endpoint
newValue Endpoint {[EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: Endpoint -> ()
description :: Endpoint -> Maybe (Value Text)
eventBuses :: Endpoint -> [EndpointEventBusProperty]
name :: Endpoint -> Maybe (Value Text)
replicationConfig :: Endpoint -> Maybe ReplicationConfigProperty
roleArn :: Endpoint -> Maybe (Value Text)
routingConfig :: Endpoint -> RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
= Endpoint {roleArn :: Maybe (Value Text)
roleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoleArn" Endpoint
Value Text
newValue, [EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
routingConfig :: RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
routingConfig :: RoutingConfigProperty
..}
instance Property "RoutingConfig" Endpoint where
type PropertyType "RoutingConfig" Endpoint = RoutingConfigProperty
set :: PropertyType "RoutingConfig" Endpoint -> Endpoint -> Endpoint
set PropertyType "RoutingConfig" Endpoint
newValue Endpoint {[EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
RoutingConfigProperty
haddock_workaround_ :: Endpoint -> ()
description :: Endpoint -> Maybe (Value Text)
eventBuses :: Endpoint -> [EndpointEventBusProperty]
name :: Endpoint -> Maybe (Value Text)
replicationConfig :: Endpoint -> Maybe ReplicationConfigProperty
roleArn :: Endpoint -> Maybe (Value Text)
routingConfig :: Endpoint -> RoutingConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
routingConfig :: RoutingConfigProperty
..}
= Endpoint {routingConfig :: RoutingConfigProperty
routingConfig = PropertyType "RoutingConfig" Endpoint
RoutingConfigProperty
newValue, [EndpointEventBusProperty]
Maybe (Value Text)
Maybe ReplicationConfigProperty
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBuses :: [EndpointEventBusProperty]
name :: Maybe (Value Text)
replicationConfig :: Maybe ReplicationConfigProperty
roleArn :: Maybe (Value Text)
..}