module Stratosphere.NetworkManager.Link (
        module Exports, Link(..), mkLink
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.NetworkManager.Link.BandwidthProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Link
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-link.html>
    Link {Link -> ()
haddock_workaround_ :: (),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-link.html#cfn-networkmanager-link-bandwidth>
          Link -> BandwidthProperty
bandwidth :: BandwidthProperty,
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-link.html#cfn-networkmanager-link-description>
          Link -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-link.html#cfn-networkmanager-link-globalnetworkid>
          Link -> Value Text
globalNetworkId :: (Value Prelude.Text),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-link.html#cfn-networkmanager-link-provider>
          Link -> Maybe (Value Text)
provider :: (Prelude.Maybe (Value Prelude.Text)),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-link.html#cfn-networkmanager-link-siteid>
          Link -> Value Text
siteId :: (Value Prelude.Text),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-link.html#cfn-networkmanager-link-tags>
          Link -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-link.html#cfn-networkmanager-link-type>
          Link -> Maybe (Value Text)
type' :: (Prelude.Maybe (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 ::
  BandwidthProperty
  -> Value Prelude.Text -> Value Prelude.Text -> Link
mkLink :: BandwidthProperty -> Value Text -> Value Text -> Link
mkLink BandwidthProperty
bandwidth Value Text
globalNetworkId Value Text
siteId
  = Link
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bandwidth :: BandwidthProperty
bandwidth = BandwidthProperty
bandwidth,
       globalNetworkId :: Value Text
globalNetworkId = Value Text
globalNetworkId, siteId :: Value Text
siteId = Value Text
siteId,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, provider :: Maybe (Value Text)
provider = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing, type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Link where
  toResourceProperties :: Link -> ResourceProperties
toResourceProperties Link {Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: Link -> ()
bandwidth :: Link -> BandwidthProperty
description :: Link -> Maybe (Value Text)
globalNetworkId :: Link -> Value Text
provider :: Link -> Maybe (Value Text)
siteId :: Link -> Value Text
tags :: Link -> Maybe [Tag]
type' :: Link -> Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::NetworkManager::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
"Bandwidth" Key -> BandwidthProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= BandwidthProperty
bandwidth,
                            Key
"GlobalNetworkId" 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
globalNetworkId, Key
"SiteId" 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
siteId]
                           ([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
"Description" (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)
description,
                               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
"Provider" (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)
provider,
                               Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                               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
"Type" (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)
type']))}
instance JSON.ToJSON Link where
  toJSON :: Link -> Value
toJSON Link {Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: Link -> ()
bandwidth :: Link -> BandwidthProperty
description :: Link -> Maybe (Value Text)
globalNetworkId :: Link -> Value Text
provider :: Link -> Maybe (Value Text)
siteId :: Link -> Value Text
tags :: Link -> Maybe [Tag]
type' :: Link -> Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (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
"Bandwidth" Key -> BandwidthProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= BandwidthProperty
bandwidth,
               Key
"GlobalNetworkId" 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
globalNetworkId, Key
"SiteId" 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
siteId]
              ([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
"Description" (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)
description,
                  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
"Provider" (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)
provider,
                  Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                  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
"Type" (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)
type'])))
instance Property "Bandwidth" Link where
  type PropertyType "Bandwidth" Link = BandwidthProperty
  set :: PropertyType "Bandwidth" Link -> Link -> Link
set PropertyType "Bandwidth" Link
newValue Link {Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: Link -> ()
bandwidth :: Link -> BandwidthProperty
description :: Link -> Maybe (Value Text)
globalNetworkId :: Link -> Value Text
provider :: Link -> Maybe (Value Text)
siteId :: Link -> Value Text
tags :: Link -> Maybe [Tag]
type' :: Link -> Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..} = Link {bandwidth :: BandwidthProperty
bandwidth = PropertyType "Bandwidth" Link
BandwidthProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
instance Property "Description" Link where
  type PropertyType "Description" Link = Value Prelude.Text
  set :: PropertyType "Description" Link -> Link -> Link
set PropertyType "Description" Link
newValue Link {Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: Link -> ()
bandwidth :: Link -> BandwidthProperty
description :: Link -> Maybe (Value Text)
globalNetworkId :: Link -> Value Text
provider :: Link -> Maybe (Value Text)
siteId :: Link -> Value Text
tags :: Link -> Maybe [Tag]
type' :: Link -> Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
    = Link {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Link
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
instance Property "GlobalNetworkId" Link where
  type PropertyType "GlobalNetworkId" Link = Value Prelude.Text
  set :: PropertyType "GlobalNetworkId" Link -> Link -> Link
set PropertyType "GlobalNetworkId" Link
newValue Link {Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: Link -> ()
bandwidth :: Link -> BandwidthProperty
description :: Link -> Maybe (Value Text)
globalNetworkId :: Link -> Value Text
provider :: Link -> Maybe (Value Text)
siteId :: Link -> Value Text
tags :: Link -> Maybe [Tag]
type' :: Link -> Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..} = Link {globalNetworkId :: Value Text
globalNetworkId = PropertyType "GlobalNetworkId" Link
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
instance Property "Provider" Link where
  type PropertyType "Provider" Link = Value Prelude.Text
  set :: PropertyType "Provider" Link -> Link -> Link
set PropertyType "Provider" Link
newValue Link {Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: Link -> ()
bandwidth :: Link -> BandwidthProperty
description :: Link -> Maybe (Value Text)
globalNetworkId :: Link -> Value Text
provider :: Link -> Maybe (Value Text)
siteId :: Link -> Value Text
tags :: Link -> Maybe [Tag]
type' :: Link -> Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
    = Link {provider :: Maybe (Value Text)
provider = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Provider" Link
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
instance Property "SiteId" Link where
  type PropertyType "SiteId" Link = Value Prelude.Text
  set :: PropertyType "SiteId" Link -> Link -> Link
set PropertyType "SiteId" Link
newValue Link {Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: Link -> ()
bandwidth :: Link -> BandwidthProperty
description :: Link -> Maybe (Value Text)
globalNetworkId :: Link -> Value Text
provider :: Link -> Maybe (Value Text)
siteId :: Link -> Value Text
tags :: Link -> Maybe [Tag]
type' :: Link -> Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..} = Link {siteId :: Value Text
siteId = PropertyType "SiteId" Link
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
instance Property "Tags" Link where
  type PropertyType "Tags" Link = [Tag]
  set :: PropertyType "Tags" Link -> Link -> Link
set PropertyType "Tags" Link
newValue Link {Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: Link -> ()
bandwidth :: Link -> BandwidthProperty
description :: Link -> Maybe (Value Text)
globalNetworkId :: Link -> Value Text
provider :: Link -> Maybe (Value Text)
siteId :: Link -> Value Text
tags :: Link -> Maybe [Tag]
type' :: Link -> Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..} = Link {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Link
newValue, Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
type' :: Maybe (Value Text)
..}
instance Property "Type" Link where
  type PropertyType "Type" Link = Value Prelude.Text
  set :: PropertyType "Type" Link -> Link -> Link
set PropertyType "Type" Link
newValue Link {Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: Link -> ()
bandwidth :: Link -> BandwidthProperty
description :: Link -> Maybe (Value Text)
globalNetworkId :: Link -> Value Text
provider :: Link -> Maybe (Value Text)
siteId :: Link -> Value Text
tags :: Link -> Maybe [Tag]
type' :: Link -> Maybe (Value Text)
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..} = Link {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" Link
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
BandwidthProperty
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
bandwidth :: BandwidthProperty
description :: Maybe (Value Text)
globalNetworkId :: Value Text
provider :: Maybe (Value Text)
siteId :: Value Text
tags :: Maybe [Tag]
..}