module Stratosphere.CodeGuruProfiler.ProfilingGroup.ChannelProperty (
ChannelProperty(..), mkChannelProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ChannelProperty
=
ChannelProperty {ChannelProperty -> ()
haddock_workaround_ :: (),
ChannelProperty -> Maybe (Value Text)
channelId :: (Prelude.Maybe (Value Prelude.Text)),
ChannelProperty -> Value Text
channelUri :: (Value Prelude.Text)}
deriving stock (ChannelProperty -> ChannelProperty -> Bool
(ChannelProperty -> ChannelProperty -> Bool)
-> (ChannelProperty -> ChannelProperty -> Bool)
-> Eq ChannelProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChannelProperty -> ChannelProperty -> Bool
== :: ChannelProperty -> ChannelProperty -> Bool
$c/= :: ChannelProperty -> ChannelProperty -> Bool
/= :: ChannelProperty -> ChannelProperty -> Bool
Prelude.Eq, Int -> ChannelProperty -> ShowS
[ChannelProperty] -> ShowS
ChannelProperty -> String
(Int -> ChannelProperty -> ShowS)
-> (ChannelProperty -> String)
-> ([ChannelProperty] -> ShowS)
-> Show ChannelProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChannelProperty -> ShowS
showsPrec :: Int -> ChannelProperty -> ShowS
$cshow :: ChannelProperty -> String
show :: ChannelProperty -> String
$cshowList :: [ChannelProperty] -> ShowS
showList :: [ChannelProperty] -> ShowS
Prelude.Show)
mkChannelProperty :: Value Prelude.Text -> ChannelProperty
mkChannelProperty :: Value Text -> ChannelProperty
mkChannelProperty Value Text
channelUri
= ChannelProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), channelUri :: Value Text
channelUri = Value Text
channelUri,
channelId :: Maybe (Value Text)
channelId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ChannelProperty where
toResourceProperties :: ChannelProperty -> ResourceProperties
toResourceProperties ChannelProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ChannelProperty -> ()
channelId :: ChannelProperty -> Maybe (Value Text)
channelUri :: ChannelProperty -> Value Text
haddock_workaround_ :: ()
channelId :: Maybe (Value Text)
channelUri :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodeGuruProfiler::ProfilingGroup.Channel",
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
"channelUri" 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
channelUri]
([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
"channelId" (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)
channelId]))}
instance JSON.ToJSON ChannelProperty where
toJSON :: ChannelProperty -> Value
toJSON ChannelProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ChannelProperty -> ()
channelId :: ChannelProperty -> Maybe (Value Text)
channelUri :: ChannelProperty -> Value Text
haddock_workaround_ :: ()
channelId :: Maybe (Value Text)
channelUri :: 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
"channelUri" 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
channelUri]
([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
"channelId" (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)
channelId])))
instance Property "channelId" ChannelProperty where
type PropertyType "channelId" ChannelProperty = Value Prelude.Text
set :: PropertyType "channelId" ChannelProperty
-> ChannelProperty -> ChannelProperty
set PropertyType "channelId" ChannelProperty
newValue ChannelProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ChannelProperty -> ()
channelId :: ChannelProperty -> Maybe (Value Text)
channelUri :: ChannelProperty -> Value Text
haddock_workaround_ :: ()
channelId :: Maybe (Value Text)
channelUri :: Value Text
..}
= ChannelProperty {channelId :: Maybe (Value Text)
channelId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "channelId" ChannelProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
channelUri :: Value Text
haddock_workaround_ :: ()
channelUri :: Value Text
..}
instance Property "channelUri" ChannelProperty where
type PropertyType "channelUri" ChannelProperty = Value Prelude.Text
set :: PropertyType "channelUri" ChannelProperty
-> ChannelProperty -> ChannelProperty
set PropertyType "channelUri" ChannelProperty
newValue ChannelProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ChannelProperty -> ()
channelId :: ChannelProperty -> Maybe (Value Text)
channelUri :: ChannelProperty -> Value Text
haddock_workaround_ :: ()
channelId :: Maybe (Value Text)
channelUri :: Value Text
..}
= ChannelProperty {channelUri :: Value Text
channelUri = PropertyType "channelUri" ChannelProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
channelId :: Maybe (Value Text)
haddock_workaround_ :: ()
channelId :: Maybe (Value Text)
..}