module Stratosphere.Lambda.EventSourceMapping.EndpointsProperty (
EndpointsProperty(..), mkEndpointsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EndpointsProperty
=
EndpointsProperty {EndpointsProperty -> ()
haddock_workaround_ :: (),
EndpointsProperty -> Maybe (ValueList Text)
kafkaBootstrapServers :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (EndpointsProperty -> EndpointsProperty -> Bool
(EndpointsProperty -> EndpointsProperty -> Bool)
-> (EndpointsProperty -> EndpointsProperty -> Bool)
-> Eq EndpointsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EndpointsProperty -> EndpointsProperty -> Bool
== :: EndpointsProperty -> EndpointsProperty -> Bool
$c/= :: EndpointsProperty -> EndpointsProperty -> Bool
/= :: EndpointsProperty -> EndpointsProperty -> Bool
Prelude.Eq, Int -> EndpointsProperty -> ShowS
[EndpointsProperty] -> ShowS
EndpointsProperty -> String
(Int -> EndpointsProperty -> ShowS)
-> (EndpointsProperty -> String)
-> ([EndpointsProperty] -> ShowS)
-> Show EndpointsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EndpointsProperty -> ShowS
showsPrec :: Int -> EndpointsProperty -> ShowS
$cshow :: EndpointsProperty -> String
show :: EndpointsProperty -> String
$cshowList :: [EndpointsProperty] -> ShowS
showList :: [EndpointsProperty] -> ShowS
Prelude.Show)
mkEndpointsProperty :: EndpointsProperty
mkEndpointsProperty :: EndpointsProperty
mkEndpointsProperty
= EndpointsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), kafkaBootstrapServers :: Maybe (ValueList Text)
kafkaBootstrapServers = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EndpointsProperty where
toResourceProperties :: EndpointsProperty -> ResourceProperties
toResourceProperties EndpointsProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: EndpointsProperty -> ()
kafkaBootstrapServers :: EndpointsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
kafkaBootstrapServers :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lambda::EventSourceMapping.Endpoints",
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 -> ValueList 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
"KafkaBootstrapServers"
(ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
kafkaBootstrapServers])}
instance JSON.ToJSON EndpointsProperty where
toJSON :: EndpointsProperty -> Value
toJSON EndpointsProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: EndpointsProperty -> ()
kafkaBootstrapServers :: EndpointsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
kafkaBootstrapServers :: Maybe (ValueList 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 -> ValueList 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
"KafkaBootstrapServers"
(ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
kafkaBootstrapServers]))
instance Property "KafkaBootstrapServers" EndpointsProperty where
type PropertyType "KafkaBootstrapServers" EndpointsProperty = ValueList Prelude.Text
set :: PropertyType "KafkaBootstrapServers" EndpointsProperty
-> EndpointsProperty -> EndpointsProperty
set PropertyType "KafkaBootstrapServers" EndpointsProperty
newValue EndpointsProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: EndpointsProperty -> ()
kafkaBootstrapServers :: EndpointsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
kafkaBootstrapServers :: Maybe (ValueList Text)
..}
= EndpointsProperty
{kafkaBootstrapServers :: Maybe (ValueList Text)
kafkaBootstrapServers = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KafkaBootstrapServers" EndpointsProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}