module Stratosphere.Oam.Link.LinkConfigurationProperty (
        module Exports, LinkConfigurationProperty(..),
        mkLinkConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Oam.Link.LinkFilterProperty as Exports
import Stratosphere.ResourceProperties
data LinkConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-oam-link-linkconfiguration.html>
    LinkConfigurationProperty {LinkConfigurationProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-oam-link-linkconfiguration.html#cfn-oam-link-linkconfiguration-loggroupconfiguration>
                               LinkConfigurationProperty -> Maybe LinkFilterProperty
logGroupConfiguration :: (Prelude.Maybe LinkFilterProperty),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-oam-link-linkconfiguration.html#cfn-oam-link-linkconfiguration-metricconfiguration>
                               LinkConfigurationProperty -> Maybe LinkFilterProperty
metricConfiguration :: (Prelude.Maybe LinkFilterProperty)}
  deriving stock (LinkConfigurationProperty -> LinkConfigurationProperty -> Bool
(LinkConfigurationProperty -> LinkConfigurationProperty -> Bool)
-> (LinkConfigurationProperty -> LinkConfigurationProperty -> Bool)
-> Eq LinkConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LinkConfigurationProperty -> LinkConfigurationProperty -> Bool
== :: LinkConfigurationProperty -> LinkConfigurationProperty -> Bool
$c/= :: LinkConfigurationProperty -> LinkConfigurationProperty -> Bool
/= :: LinkConfigurationProperty -> LinkConfigurationProperty -> Bool
Prelude.Eq, Int -> LinkConfigurationProperty -> ShowS
[LinkConfigurationProperty] -> ShowS
LinkConfigurationProperty -> String
(Int -> LinkConfigurationProperty -> ShowS)
-> (LinkConfigurationProperty -> String)
-> ([LinkConfigurationProperty] -> ShowS)
-> Show LinkConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LinkConfigurationProperty -> ShowS
showsPrec :: Int -> LinkConfigurationProperty -> ShowS
$cshow :: LinkConfigurationProperty -> String
show :: LinkConfigurationProperty -> String
$cshowList :: [LinkConfigurationProperty] -> ShowS
showList :: [LinkConfigurationProperty] -> ShowS
Prelude.Show)
mkLinkConfigurationProperty :: LinkConfigurationProperty
mkLinkConfigurationProperty :: LinkConfigurationProperty
mkLinkConfigurationProperty
  = LinkConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), logGroupConfiguration :: Maybe LinkFilterProperty
logGroupConfiguration = Maybe LinkFilterProperty
forall a. Maybe a
Prelude.Nothing,
       metricConfiguration :: Maybe LinkFilterProperty
metricConfiguration = Maybe LinkFilterProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LinkConfigurationProperty where
  toResourceProperties :: LinkConfigurationProperty -> ResourceProperties
toResourceProperties LinkConfigurationProperty {Maybe LinkFilterProperty
()
haddock_workaround_ :: LinkConfigurationProperty -> ()
logGroupConfiguration :: LinkConfigurationProperty -> Maybe LinkFilterProperty
metricConfiguration :: LinkConfigurationProperty -> Maybe LinkFilterProperty
haddock_workaround_ :: ()
logGroupConfiguration :: Maybe LinkFilterProperty
metricConfiguration :: Maybe LinkFilterProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Oam::Link.LinkConfiguration",
         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 -> LinkFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LogGroupConfiguration"
                              (LinkFilterProperty -> (Key, Value))
-> Maybe LinkFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LinkFilterProperty
logGroupConfiguration,
                            Key -> LinkFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MetricConfiguration" (LinkFilterProperty -> (Key, Value))
-> Maybe LinkFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LinkFilterProperty
metricConfiguration])}
instance JSON.ToJSON LinkConfigurationProperty where
  toJSON :: LinkConfigurationProperty -> Value
toJSON LinkConfigurationProperty {Maybe LinkFilterProperty
()
haddock_workaround_ :: LinkConfigurationProperty -> ()
logGroupConfiguration :: LinkConfigurationProperty -> Maybe LinkFilterProperty
metricConfiguration :: LinkConfigurationProperty -> Maybe LinkFilterProperty
haddock_workaround_ :: ()
logGroupConfiguration :: Maybe LinkFilterProperty
metricConfiguration :: Maybe LinkFilterProperty
..}
    = [(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 -> LinkFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LogGroupConfiguration"
                 (LinkFilterProperty -> (Key, Value))
-> Maybe LinkFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LinkFilterProperty
logGroupConfiguration,
               Key -> LinkFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MetricConfiguration" (LinkFilterProperty -> (Key, Value))
-> Maybe LinkFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LinkFilterProperty
metricConfiguration]))
instance Property "LogGroupConfiguration" LinkConfigurationProperty where
  type PropertyType "LogGroupConfiguration" LinkConfigurationProperty = LinkFilterProperty
  set :: PropertyType "LogGroupConfiguration" LinkConfigurationProperty
-> LinkConfigurationProperty -> LinkConfigurationProperty
set PropertyType "LogGroupConfiguration" LinkConfigurationProperty
newValue LinkConfigurationProperty {Maybe LinkFilterProperty
()
haddock_workaround_ :: LinkConfigurationProperty -> ()
logGroupConfiguration :: LinkConfigurationProperty -> Maybe LinkFilterProperty
metricConfiguration :: LinkConfigurationProperty -> Maybe LinkFilterProperty
haddock_workaround_ :: ()
logGroupConfiguration :: Maybe LinkFilterProperty
metricConfiguration :: Maybe LinkFilterProperty
..}
    = LinkConfigurationProperty
        {logGroupConfiguration :: Maybe LinkFilterProperty
logGroupConfiguration = LinkFilterProperty -> Maybe LinkFilterProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LogGroupConfiguration" LinkConfigurationProperty
LinkFilterProperty
newValue, Maybe LinkFilterProperty
()
haddock_workaround_ :: ()
metricConfiguration :: Maybe LinkFilterProperty
haddock_workaround_ :: ()
metricConfiguration :: Maybe LinkFilterProperty
..}
instance Property "MetricConfiguration" LinkConfigurationProperty where
  type PropertyType "MetricConfiguration" LinkConfigurationProperty = LinkFilterProperty
  set :: PropertyType "MetricConfiguration" LinkConfigurationProperty
-> LinkConfigurationProperty -> LinkConfigurationProperty
set PropertyType "MetricConfiguration" LinkConfigurationProperty
newValue LinkConfigurationProperty {Maybe LinkFilterProperty
()
haddock_workaround_ :: LinkConfigurationProperty -> ()
logGroupConfiguration :: LinkConfigurationProperty -> Maybe LinkFilterProperty
metricConfiguration :: LinkConfigurationProperty -> Maybe LinkFilterProperty
haddock_workaround_ :: ()
logGroupConfiguration :: Maybe LinkFilterProperty
metricConfiguration :: Maybe LinkFilterProperty
..}
    = LinkConfigurationProperty
        {metricConfiguration :: Maybe LinkFilterProperty
metricConfiguration = LinkFilterProperty -> Maybe LinkFilterProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MetricConfiguration" LinkConfigurationProperty
LinkFilterProperty
newValue, Maybe LinkFilterProperty
()
haddock_workaround_ :: ()
logGroupConfiguration :: Maybe LinkFilterProperty
haddock_workaround_ :: ()
logGroupConfiguration :: Maybe LinkFilterProperty
..}