module Stratosphere.ObservabilityAdmin.TelemetryRule.TelemetryDestinationConfigurationProperty (
        module Exports, TelemetryDestinationConfigurationProperty(..),
        mkTelemetryDestinationConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ObservabilityAdmin.TelemetryRule.VPCFlowLogParametersProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TelemetryDestinationConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-telemetryrule-telemetrydestinationconfiguration.html>
    TelemetryDestinationConfigurationProperty {TelemetryDestinationConfigurationProperty -> ()
haddock_workaround_ :: (),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-telemetryrule-telemetrydestinationconfiguration.html#cfn-observabilityadmin-telemetryrule-telemetrydestinationconfiguration-destinationpattern>
                                               TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
destinationPattern :: (Prelude.Maybe (Value Prelude.Text)),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-telemetryrule-telemetrydestinationconfiguration.html#cfn-observabilityadmin-telemetryrule-telemetrydestinationconfiguration-destinationtype>
                                               TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
destinationType :: (Prelude.Maybe (Value Prelude.Text)),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-telemetryrule-telemetrydestinationconfiguration.html#cfn-observabilityadmin-telemetryrule-telemetrydestinationconfiguration-retentionindays>
                                               TelemetryDestinationConfigurationProperty -> Maybe (Value Integer)
retentionInDays :: (Prelude.Maybe (Value Prelude.Integer)),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-telemetryrule-telemetrydestinationconfiguration.html#cfn-observabilityadmin-telemetryrule-telemetrydestinationconfiguration-vpcflowlogparameters>
                                               TelemetryDestinationConfigurationProperty
-> Maybe VPCFlowLogParametersProperty
vPCFlowLogParameters :: (Prelude.Maybe VPCFlowLogParametersProperty)}
  deriving stock (TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty -> Bool
(TelemetryDestinationConfigurationProperty
 -> TelemetryDestinationConfigurationProperty -> Bool)
-> (TelemetryDestinationConfigurationProperty
    -> TelemetryDestinationConfigurationProperty -> Bool)
-> Eq TelemetryDestinationConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty -> Bool
== :: TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty -> Bool
$c/= :: TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty -> Bool
/= :: TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty -> Bool
Prelude.Eq, Int -> TelemetryDestinationConfigurationProperty -> ShowS
[TelemetryDestinationConfigurationProperty] -> ShowS
TelemetryDestinationConfigurationProperty -> String
(Int -> TelemetryDestinationConfigurationProperty -> ShowS)
-> (TelemetryDestinationConfigurationProperty -> String)
-> ([TelemetryDestinationConfigurationProperty] -> ShowS)
-> Show TelemetryDestinationConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TelemetryDestinationConfigurationProperty -> ShowS
showsPrec :: Int -> TelemetryDestinationConfigurationProperty -> ShowS
$cshow :: TelemetryDestinationConfigurationProperty -> String
show :: TelemetryDestinationConfigurationProperty -> String
$cshowList :: [TelemetryDestinationConfigurationProperty] -> ShowS
showList :: [TelemetryDestinationConfigurationProperty] -> ShowS
Prelude.Show)
mkTelemetryDestinationConfigurationProperty ::
  TelemetryDestinationConfigurationProperty
mkTelemetryDestinationConfigurationProperty :: TelemetryDestinationConfigurationProperty
mkTelemetryDestinationConfigurationProperty
  = TelemetryDestinationConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), destinationPattern :: Maybe (Value Text)
destinationPattern = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       destinationType :: Maybe (Value Text)
destinationType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       retentionInDays :: Maybe (Value Integer)
retentionInDays = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
vPCFlowLogParameters = Maybe VPCFlowLogParametersProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TelemetryDestinationConfigurationProperty where
  toResourceProperties :: TelemetryDestinationConfigurationProperty -> ResourceProperties
toResourceProperties TelemetryDestinationConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe VPCFlowLogParametersProperty
()
haddock_workaround_ :: TelemetryDestinationConfigurationProperty -> ()
destinationPattern :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
destinationType :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
retentionInDays :: TelemetryDestinationConfigurationProperty -> Maybe (Value Integer)
vPCFlowLogParameters :: TelemetryDestinationConfigurationProperty
-> Maybe VPCFlowLogParametersProperty
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ObservabilityAdmin::TelemetryRule.TelemetryDestinationConfiguration",
         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 -> 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
"DestinationPattern" (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)
destinationPattern,
                            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
"DestinationType" (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)
destinationType,
                            Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RetentionInDays" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
retentionInDays,
                            Key -> VPCFlowLogParametersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VPCFlowLogParameters"
                              (VPCFlowLogParametersProperty -> (Key, Value))
-> Maybe VPCFlowLogParametersProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VPCFlowLogParametersProperty
vPCFlowLogParameters])}
instance JSON.ToJSON TelemetryDestinationConfigurationProperty where
  toJSON :: TelemetryDestinationConfigurationProperty -> Value
toJSON TelemetryDestinationConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe VPCFlowLogParametersProperty
()
haddock_workaround_ :: TelemetryDestinationConfigurationProperty -> ()
destinationPattern :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
destinationType :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
retentionInDays :: TelemetryDestinationConfigurationProperty -> Maybe (Value Integer)
vPCFlowLogParameters :: TelemetryDestinationConfigurationProperty
-> Maybe VPCFlowLogParametersProperty
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
..}
    = [(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 -> 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
"DestinationPattern" (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)
destinationPattern,
               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
"DestinationType" (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)
destinationType,
               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RetentionInDays" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
retentionInDays,
               Key -> VPCFlowLogParametersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VPCFlowLogParameters"
                 (VPCFlowLogParametersProperty -> (Key, Value))
-> Maybe VPCFlowLogParametersProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VPCFlowLogParametersProperty
vPCFlowLogParameters]))
instance Property "DestinationPattern" TelemetryDestinationConfigurationProperty where
  type PropertyType "DestinationPattern" TelemetryDestinationConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "DestinationPattern" TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty
set PropertyType
  "DestinationPattern" TelemetryDestinationConfigurationProperty
newValue TelemetryDestinationConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe VPCFlowLogParametersProperty
()
haddock_workaround_ :: TelemetryDestinationConfigurationProperty -> ()
destinationPattern :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
destinationType :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
retentionInDays :: TelemetryDestinationConfigurationProperty -> Maybe (Value Integer)
vPCFlowLogParameters :: TelemetryDestinationConfigurationProperty
-> Maybe VPCFlowLogParametersProperty
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
..}
    = TelemetryDestinationConfigurationProperty
        {destinationPattern :: Maybe (Value Text)
destinationPattern = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "DestinationPattern" TelemetryDestinationConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe VPCFlowLogParametersProperty
()
haddock_workaround_ :: ()
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
haddock_workaround_ :: ()
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
..}
instance Property "DestinationType" TelemetryDestinationConfigurationProperty where
  type PropertyType "DestinationType" TelemetryDestinationConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "DestinationType" TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty
set PropertyType
  "DestinationType" TelemetryDestinationConfigurationProperty
newValue TelemetryDestinationConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe VPCFlowLogParametersProperty
()
haddock_workaround_ :: TelemetryDestinationConfigurationProperty -> ()
destinationPattern :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
destinationType :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
retentionInDays :: TelemetryDestinationConfigurationProperty -> Maybe (Value Integer)
vPCFlowLogParameters :: TelemetryDestinationConfigurationProperty
-> Maybe VPCFlowLogParametersProperty
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
..}
    = TelemetryDestinationConfigurationProperty
        {destinationType :: Maybe (Value Text)
destinationType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "DestinationType" TelemetryDestinationConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe VPCFlowLogParametersProperty
()
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
..}
instance Property "RetentionInDays" TelemetryDestinationConfigurationProperty where
  type PropertyType "RetentionInDays" TelemetryDestinationConfigurationProperty = Value Prelude.Integer
  set :: PropertyType
  "RetentionInDays" TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty
set PropertyType
  "RetentionInDays" TelemetryDestinationConfigurationProperty
newValue TelemetryDestinationConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe VPCFlowLogParametersProperty
()
haddock_workaround_ :: TelemetryDestinationConfigurationProperty -> ()
destinationPattern :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
destinationType :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
retentionInDays :: TelemetryDestinationConfigurationProperty -> Maybe (Value Integer)
vPCFlowLogParameters :: TelemetryDestinationConfigurationProperty
-> Maybe VPCFlowLogParametersProperty
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
..}
    = TelemetryDestinationConfigurationProperty
        {retentionInDays :: Maybe (Value Integer)
retentionInDays = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "RetentionInDays" TelemetryDestinationConfigurationProperty
Value Integer
newValue, Maybe (Value Text)
Maybe VPCFlowLogParametersProperty
()
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
..}
instance Property "VPCFlowLogParameters" TelemetryDestinationConfigurationProperty where
  type PropertyType "VPCFlowLogParameters" TelemetryDestinationConfigurationProperty = VPCFlowLogParametersProperty
  set :: PropertyType
  "VPCFlowLogParameters" TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty
-> TelemetryDestinationConfigurationProperty
set PropertyType
  "VPCFlowLogParameters" TelemetryDestinationConfigurationProperty
newValue TelemetryDestinationConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe VPCFlowLogParametersProperty
()
haddock_workaround_ :: TelemetryDestinationConfigurationProperty -> ()
destinationPattern :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
destinationType :: TelemetryDestinationConfigurationProperty -> Maybe (Value Text)
retentionInDays :: TelemetryDestinationConfigurationProperty -> Maybe (Value Integer)
vPCFlowLogParameters :: TelemetryDestinationConfigurationProperty
-> Maybe VPCFlowLogParametersProperty
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
..}
    = TelemetryDestinationConfigurationProperty
        {vPCFlowLogParameters :: Maybe VPCFlowLogParametersProperty
vPCFlowLogParameters = VPCFlowLogParametersProperty -> Maybe VPCFlowLogParametersProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "VPCFlowLogParameters" TelemetryDestinationConfigurationProperty
VPCFlowLogParametersProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
haddock_workaround_ :: ()
destinationPattern :: Maybe (Value Text)
destinationType :: Maybe (Value Text)
retentionInDays :: Maybe (Value Integer)
..}