module Stratosphere.ObservabilityAdmin.OrganizationTelemetryRule.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.OrganizationTelemetryRule.TelemetryDestinationConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TelemetryRuleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationtelemetryrule-telemetryrule.html>
    TelemetryRuleProperty {TelemetryRuleProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationtelemetryrule-telemetryrule.html#cfn-observabilityadmin-organizationtelemetryrule-telemetryrule-destinationconfiguration>
                           TelemetryRuleProperty
-> Maybe TelemetryDestinationConfigurationProperty
destinationConfiguration :: (Prelude.Maybe TelemetryDestinationConfigurationProperty),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationtelemetryrule-telemetryrule.html#cfn-observabilityadmin-organizationtelemetryrule-telemetryrule-resourcetype>
                           TelemetryRuleProperty -> Value Text
resourceType :: (Value Prelude.Text),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationtelemetryrule-telemetryrule.html#cfn-observabilityadmin-organizationtelemetryrule-telemetryrule-scope>
                           TelemetryRuleProperty -> Maybe (Value Text)
scope :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationtelemetryrule-telemetryrule.html#cfn-observabilityadmin-organizationtelemetryrule-telemetryrule-selectioncriteria>
                           TelemetryRuleProperty -> Maybe (Value Text)
selectionCriteria :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationtelemetryrule-telemetryrule.html#cfn-observabilityadmin-organizationtelemetryrule-telemetryrule-telemetrytype>
                           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,
       scope :: Maybe (Value Text)
scope = Maybe (Value Text)
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
scope :: TelemetryRuleProperty -> Maybe (Value Text)
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ObservabilityAdmin::OrganizationTelemetryRule.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
"Scope" (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)
scope,
                               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
scope :: TelemetryRuleProperty -> Maybe (Value Text)
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (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
"Scope" (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)
scope,
                  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
scope :: TelemetryRuleProperty -> Maybe (Value Text)
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (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
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
haddock_workaround_ :: ()
resourceType :: Value Text
scope :: Maybe (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
scope :: TelemetryRuleProperty -> Maybe (Value Text)
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (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
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
instance Property "Scope" TelemetryRuleProperty where
  type PropertyType "Scope" TelemetryRuleProperty = Value Prelude.Text
  set :: PropertyType "Scope" TelemetryRuleProperty
-> TelemetryRuleProperty -> TelemetryRuleProperty
set PropertyType "Scope" TelemetryRuleProperty
newValue TelemetryRuleProperty {Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: TelemetryRuleProperty -> ()
destinationConfiguration :: TelemetryRuleProperty
-> Maybe TelemetryDestinationConfigurationProperty
resourceType :: TelemetryRuleProperty -> Value Text
scope :: TelemetryRuleProperty -> Maybe (Value Text)
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
..}
    = TelemetryRuleProperty {scope :: Maybe (Value Text)
scope = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Scope" TelemetryRuleProperty
Value Text
newValue, Maybe (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
selectionCriteria :: Maybe (Value Text)
telemetryType :: Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
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
scope :: TelemetryRuleProperty -> Maybe (Value Text)
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (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 (Value Text)
Maybe TelemetryDestinationConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (Value Text)
telemetryType :: Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (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
scope :: TelemetryRuleProperty -> Maybe (Value Text)
selectionCriteria :: TelemetryRuleProperty -> Maybe (Value Text)
telemetryType :: TelemetryRuleProperty -> Value Text
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (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
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
haddock_workaround_ :: ()
destinationConfiguration :: Maybe TelemetryDestinationConfigurationProperty
resourceType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}