module Stratosphere.Oam.Link (
        module Exports, Link(..), mkLink
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Oam.Link.LinkConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Link
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-oam-link.html>
    Link {Link -> ()
haddock_workaround_ :: (),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-oam-link.html#cfn-oam-link-labeltemplate>
          Link -> Maybe (Value Text)
labelTemplate :: (Prelude.Maybe (Value Prelude.Text)),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-oam-link.html#cfn-oam-link-linkconfiguration>
          Link -> Maybe LinkConfigurationProperty
linkConfiguration :: (Prelude.Maybe LinkConfigurationProperty),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-oam-link.html#cfn-oam-link-resourcetypes>
          Link -> ValueList Text
resourceTypes :: (ValueList Prelude.Text),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-oam-link.html#cfn-oam-link-sinkidentifier>
          Link -> Value Text
sinkIdentifier :: (Value Prelude.Text),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-oam-link.html#cfn-oam-link-tags>
          Link -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
  deriving stock (Link -> Link -> Bool
(Link -> Link -> Bool) -> (Link -> Link -> Bool) -> Eq Link
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Link -> Link -> Bool
== :: Link -> Link -> Bool
$c/= :: Link -> Link -> Bool
/= :: Link -> Link -> Bool
Prelude.Eq, Int -> Link -> ShowS
[Link] -> ShowS
Link -> String
(Int -> Link -> ShowS)
-> (Link -> String) -> ([Link] -> ShowS) -> Show Link
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Link -> ShowS
showsPrec :: Int -> Link -> ShowS
$cshow :: Link -> String
show :: Link -> String
$cshowList :: [Link] -> ShowS
showList :: [Link] -> ShowS
Prelude.Show)
mkLink :: ValueList Prelude.Text -> Value Prelude.Text -> Link
mkLink :: ValueList Text -> Value Text -> Link
mkLink ValueList Text
resourceTypes Value Text
sinkIdentifier
  = Link
      {haddock_workaround_ :: ()
haddock_workaround_ = (), resourceTypes :: ValueList Text
resourceTypes = ValueList Text
resourceTypes,
       sinkIdentifier :: Value Text
sinkIdentifier = Value Text
sinkIdentifier, labelTemplate :: Maybe (Value Text)
labelTemplate = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       linkConfiguration :: Maybe LinkConfigurationProperty
linkConfiguration = Maybe LinkConfigurationProperty
forall a. Maybe a
Prelude.Nothing, tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Link where
  toResourceProperties :: Link -> ResourceProperties
toResourceProperties Link {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe LinkConfigurationProperty
()
ValueList Text
Value Text
haddock_workaround_ :: Link -> ()
labelTemplate :: Link -> Maybe (Value Text)
linkConfiguration :: Link -> Maybe LinkConfigurationProperty
resourceTypes :: Link -> ValueList Text
sinkIdentifier :: Link -> Value Text
tags :: Link -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Oam::Link", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"ResourceTypes" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
resourceTypes,
                            Key
"SinkIdentifier" 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
sinkIdentifier]
                           ([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
"LabelTemplate" (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)
labelTemplate,
                               Key -> LinkConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LinkConfiguration" (LinkConfigurationProperty -> (Key, Value))
-> Maybe LinkConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LinkConfigurationProperty
linkConfiguration,
                               Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags]))}
instance JSON.ToJSON Link where
  toJSON :: Link -> Value
toJSON Link {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe LinkConfigurationProperty
()
ValueList Text
Value Text
haddock_workaround_ :: Link -> ()
labelTemplate :: Link -> Maybe (Value Text)
linkConfiguration :: Link -> Maybe LinkConfigurationProperty
resourceTypes :: Link -> ValueList Text
sinkIdentifier :: Link -> Value Text
tags :: Link -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (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
"ResourceTypes" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
resourceTypes,
               Key
"SinkIdentifier" 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
sinkIdentifier]
              ([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
"LabelTemplate" (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)
labelTemplate,
                  Key -> LinkConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LinkConfiguration" (LinkConfigurationProperty -> (Key, Value))
-> Maybe LinkConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LinkConfigurationProperty
linkConfiguration,
                  Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags])))
instance Property "LabelTemplate" Link where
  type PropertyType "LabelTemplate" Link = Value Prelude.Text
  set :: PropertyType "LabelTemplate" Link -> Link -> Link
set PropertyType "LabelTemplate" Link
newValue Link {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe LinkConfigurationProperty
()
ValueList Text
Value Text
haddock_workaround_ :: Link -> ()
labelTemplate :: Link -> Maybe (Value Text)
linkConfiguration :: Link -> Maybe LinkConfigurationProperty
resourceTypes :: Link -> ValueList Text
sinkIdentifier :: Link -> Value Text
tags :: Link -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = Link {labelTemplate :: Maybe (Value Text)
labelTemplate = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LabelTemplate" Link
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe LinkConfigurationProperty
()
ValueList Text
Value Text
haddock_workaround_ :: ()
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "LinkConfiguration" Link where
  type PropertyType "LinkConfiguration" Link = LinkConfigurationProperty
  set :: PropertyType "LinkConfiguration" Link -> Link -> Link
set PropertyType "LinkConfiguration" Link
newValue Link {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe LinkConfigurationProperty
()
ValueList Text
Value Text
haddock_workaround_ :: Link -> ()
labelTemplate :: Link -> Maybe (Value Text)
linkConfiguration :: Link -> Maybe LinkConfigurationProperty
resourceTypes :: Link -> ValueList Text
sinkIdentifier :: Link -> Value Text
tags :: Link -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = Link {linkConfiguration :: Maybe LinkConfigurationProperty
linkConfiguration = LinkConfigurationProperty -> Maybe LinkConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LinkConfiguration" Link
LinkConfigurationProperty
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "ResourceTypes" Link where
  type PropertyType "ResourceTypes" Link = ValueList Prelude.Text
  set :: PropertyType "ResourceTypes" Link -> Link -> Link
set PropertyType "ResourceTypes" Link
newValue Link {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe LinkConfigurationProperty
()
ValueList Text
Value Text
haddock_workaround_ :: Link -> ()
labelTemplate :: Link -> Maybe (Value Text)
linkConfiguration :: Link -> Maybe LinkConfigurationProperty
resourceTypes :: Link -> ValueList Text
sinkIdentifier :: Link -> Value Text
tags :: Link -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
..} = Link {resourceTypes :: ValueList Text
resourceTypes = PropertyType "ResourceTypes" Link
ValueList Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe LinkConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "SinkIdentifier" Link where
  type PropertyType "SinkIdentifier" Link = Value Prelude.Text
  set :: PropertyType "SinkIdentifier" Link -> Link -> Link
set PropertyType "SinkIdentifier" Link
newValue Link {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe LinkConfigurationProperty
()
ValueList Text
Value Text
haddock_workaround_ :: Link -> ()
labelTemplate :: Link -> Maybe (Value Text)
linkConfiguration :: Link -> Maybe LinkConfigurationProperty
resourceTypes :: Link -> ValueList Text
sinkIdentifier :: Link -> Value Text
tags :: Link -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
..} = Link {sinkIdentifier :: Value Text
sinkIdentifier = PropertyType "SinkIdentifier" Link
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe LinkConfigurationProperty
()
ValueList Text
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Tags" Link where
  type PropertyType "Tags" Link = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Tags" Link -> Link -> Link
set PropertyType "Tags" Link
newValue Link {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe LinkConfigurationProperty
()
ValueList Text
Value Text
haddock_workaround_ :: Link -> ()
labelTemplate :: Link -> Maybe (Value Text)
linkConfiguration :: Link -> Maybe LinkConfigurationProperty
resourceTypes :: Link -> ValueList Text
sinkIdentifier :: Link -> Value Text
tags :: Link -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
tags :: Maybe (Map Text (Value Text))
..} = Link {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" Link
newValue, Maybe (Value Text)
Maybe LinkConfigurationProperty
()
ValueList Text
Value Text
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
haddock_workaround_ :: ()
labelTemplate :: Maybe (Value Text)
linkConfiguration :: Maybe LinkConfigurationProperty
resourceTypes :: ValueList Text
sinkIdentifier :: Value Text
..}