module Stratosphere.ObservabilityAdmin.TelemetryRule.TelemetryRuleProperty (
module Exports, TelemetryRuleProperty(..), mkTelemetryRuleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ObservabilityAdmin.TelemetryRule.TelemetryDestinationConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TelemetryRuleProperty
=
TelemetryRuleProperty {TelemetryRuleProperty -> ()
haddock_workaround_ :: (),
TelemetryRuleProperty
-> Maybe TelemetryDestinationConfigurationProperty
destinationConfiguration :: (Prelude.Maybe TelemetryDestinationConfigurationProperty),
TelemetryRuleProperty -> Value Text
resourceType :: (Value Prelude.Text),
TelemetryRuleProperty -> Maybe (Value Text)
selectionCriteria :: (Prelude.Maybe (Value Prelude.Text)),
TelemetryRuleProperty -> Value Text
telemetryType :: (Value Prelude.Text)}
deriving stock (TelemetryRuleProperty -> TelemetryRuleProperty -> Bool
(TelemetryRuleProperty -> TelemetryRuleProperty -> Bool)
-> (TelemetryRuleProperty -> TelemetryRuleProperty -> Bool)
-> Eq TelemetryRuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TelemetryRuleProperty -> TelemetryRuleProperty -> Bool
== :: TelemetryRuleProperty -> TelemetryRuleProperty -> Bool
$c/= :: TelemetryRuleProperty -> TelemetryRuleProperty -> Bool
/= :: TelemetryRuleProperty -> TelemetryRuleProperty -> Bool
Prelude.Eq, Int -> TelemetryRuleProperty -> ShowS
[TelemetryRuleProperty] -> ShowS
TelemetryRuleProperty -> String
(Int -> TelemetryRuleProperty -> ShowS)
-> (TelemetryRuleProperty -> String)
-> ([TelemetryRuleProperty] -> ShowS)
-> Show TelemetryRuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TelemetryRuleProperty -> ShowS
showsPrec :: Int -> TelemetryRuleProperty -> ShowS
$cshow :: TelemetryRuleProperty -> String
show :: TelemetryRuleProperty -> String
$cshowList :: [TelemetryRuleProperty] -> ShowS
showList :: [TelemetryRuleProperty] -> ShowS
Prelude.Show)
mkTelemetryRuleProperty ::
Value Prelude.Text -> Value Prelude.Text -> TelemetryRuleProperty
mkTelemetryRuleProperty :: Value Text -> Value Text -> TelemetryRuleProperty
mkTelemetryRuleProperty Value Text
resourceType Value Text
telemetryType
= TelemetryRuleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), resourceType :: Value Text
resourceType = Value Text
resourceType,
telemetryType :: Value Text
telemetryType = Value Text
telemetryType,
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
destinationConfiguration = Maybe TelemetryDestinationConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
selectionCriteria :: Maybe (Value Text)
selectionCriteria = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TelemetryRuleProperty where
toResourceProperties :: TelemetryRuleProperty -> ResourceProperties
toResourceProperties TelemetryRuleProperty {Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: TelemetryRuleProperty -> ()
destinationConfiguration :: TelemetryRuleProperty
-> Maybe TelemetryDestinationConfigurationProperty
resourceType :: TelemetryRuleProperty -> Value Text
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ObservabilityAdmin::TelemetryRule.TelemetryRule",
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
"ResourceType" 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
resourceType,
Key
"TelemetryType" 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
telemetryType]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> TelemetryDestinationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DestinationConfiguration"
(TelemetryDestinationConfigurationProperty -> (Key, Value))
-> Maybe TelemetryDestinationConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TelemetryDestinationConfigurationProperty
destinationConfiguration,
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
"SelectionCriteria" (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)
selectionCriteria]))}
instance JSON.ToJSON TelemetryRuleProperty where
toJSON :: TelemetryRuleProperty -> Value
toJSON TelemetryRuleProperty {Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: TelemetryRuleProperty -> ()
destinationConfiguration :: TelemetryRuleProperty
-> Maybe TelemetryDestinationConfigurationProperty
resourceType :: TelemetryRuleProperty -> Value Text
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
telemetryType :: 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
"ResourceType" 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
resourceType,
Key
"TelemetryType" 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
telemetryType]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> TelemetryDestinationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DestinationConfiguration"
(TelemetryDestinationConfigurationProperty -> (Key, Value))
-> Maybe TelemetryDestinationConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TelemetryDestinationConfigurationProperty
destinationConfiguration,
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
"SelectionCriteria" (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)
selectionCriteria])))
instance Property "DestinationConfiguration" TelemetryRuleProperty where
type PropertyType "DestinationConfiguration" TelemetryRuleProperty = TelemetryDestinationConfigurationProperty
set :: PropertyType "DestinationConfiguration" TelemetryRuleProperty
-> TelemetryRuleProperty -> TelemetryRuleProperty
set PropertyType "DestinationConfiguration" TelemetryRuleProperty
newValue TelemetryRuleProperty {Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: TelemetryRuleProperty -> ()
destinationConfiguration :: TelemetryRuleProperty
-> Maybe TelemetryDestinationConfigurationProperty
resourceType :: TelemetryRuleProperty -> Value Text
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
= TelemetryRuleProperty
{destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
destinationConfiguration = TelemetryDestinationConfigurationProperty
-> Maybe TelemetryDestinationConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DestinationConfiguration" TelemetryRuleProperty
TelemetryDestinationConfigurationProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
haddock_workaround_ :: ()
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
instance Property "ResourceType" TelemetryRuleProperty where
type PropertyType "ResourceType" TelemetryRuleProperty = Value Prelude.Text
set :: PropertyType "ResourceType" TelemetryRuleProperty
-> TelemetryRuleProperty -> TelemetryRuleProperty
set PropertyType "ResourceType" TelemetryRuleProperty
newValue TelemetryRuleProperty {Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: TelemetryRuleProperty -> ()
destinationConfiguration :: TelemetryRuleProperty
-> Maybe TelemetryDestinationConfigurationProperty
resourceType :: TelemetryRuleProperty -> Value Text
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
= TelemetryRuleProperty {resourceType :: Value Text
resourceType = PropertyType "ResourceType" TelemetryRuleProperty
Value Text
newValue, Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
instance Property "SelectionCriteria" TelemetryRuleProperty where
type PropertyType "SelectionCriteria" TelemetryRuleProperty = Value Prelude.Text
set :: PropertyType "SelectionCriteria" TelemetryRuleProperty
-> TelemetryRuleProperty -> TelemetryRuleProperty
set PropertyType "SelectionCriteria" TelemetryRuleProperty
newValue TelemetryRuleProperty {Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: TelemetryRuleProperty -> ()
destinationConfiguration :: TelemetryRuleProperty
-> Maybe TelemetryDestinationConfigurationProperty
resourceType :: TelemetryRuleProperty -> Value Text
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
= TelemetryRuleProperty
{selectionCriteria :: Maybe (Value Text)
selectionCriteria = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SelectionCriteria" TelemetryRuleProperty
Value Text
newValue, Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
telemetryType :: Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
telemetryType :: Value Text
..}
instance Property "TelemetryType" TelemetryRuleProperty where
type PropertyType "TelemetryType" TelemetryRuleProperty = Value Prelude.Text
set :: PropertyType "TelemetryType" TelemetryRuleProperty
-> TelemetryRuleProperty -> TelemetryRuleProperty
set PropertyType "TelemetryType" TelemetryRuleProperty
newValue TelemetryRuleProperty {Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: TelemetryRuleProperty -> ()
destinationConfiguration :: TelemetryRuleProperty
-> Maybe TelemetryDestinationConfigurationProperty
resourceType :: TelemetryRuleProperty -> Value Text
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
= TelemetryRuleProperty {telemetryType :: Value Text
telemetryType = PropertyType "TelemetryType" TelemetryRuleProperty
Value Text
newValue, Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
..}