module Stratosphere.VpcLattice.ServiceNetwork (
        module Exports, ServiceNetwork(..), mkServiceNetwork
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.VpcLattice.ServiceNetwork.SharingConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ServiceNetwork
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetwork.html>
    ServiceNetwork {ServiceNetwork -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetwork.html#cfn-vpclattice-servicenetwork-authtype>
                    ServiceNetwork -> Maybe (Value Text)
authType :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetwork.html#cfn-vpclattice-servicenetwork-name>
                    ServiceNetwork -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetwork.html#cfn-vpclattice-servicenetwork-sharingconfig>
                    ServiceNetwork -> Maybe SharingConfigProperty
sharingConfig :: (Prelude.Maybe SharingConfigProperty),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetwork.html#cfn-vpclattice-servicenetwork-tags>
                    ServiceNetwork -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ServiceNetwork -> ServiceNetwork -> Bool
(ServiceNetwork -> ServiceNetwork -> Bool)
-> (ServiceNetwork -> ServiceNetwork -> Bool) -> Eq ServiceNetwork
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServiceNetwork -> ServiceNetwork -> Bool
== :: ServiceNetwork -> ServiceNetwork -> Bool
$c/= :: ServiceNetwork -> ServiceNetwork -> Bool
/= :: ServiceNetwork -> ServiceNetwork -> Bool
Prelude.Eq, Int -> ServiceNetwork -> ShowS
[ServiceNetwork] -> ShowS
ServiceNetwork -> String
(Int -> ServiceNetwork -> ShowS)
-> (ServiceNetwork -> String)
-> ([ServiceNetwork] -> ShowS)
-> Show ServiceNetwork
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServiceNetwork -> ShowS
showsPrec :: Int -> ServiceNetwork -> ShowS
$cshow :: ServiceNetwork -> String
show :: ServiceNetwork -> String
$cshowList :: [ServiceNetwork] -> ShowS
showList :: [ServiceNetwork] -> ShowS
Prelude.Show)
mkServiceNetwork :: ServiceNetwork
mkServiceNetwork :: ServiceNetwork
mkServiceNetwork
  = ServiceNetwork
      {haddock_workaround_ :: ()
haddock_workaround_ = (), authType :: Maybe (Value Text)
authType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, sharingConfig :: Maybe SharingConfigProperty
sharingConfig = Maybe SharingConfigProperty
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ServiceNetwork where
  toResourceProperties :: ServiceNetwork -> ResourceProperties
toResourceProperties ServiceNetwork {Maybe [Tag]
Maybe (Value Text)
Maybe SharingConfigProperty
()
haddock_workaround_ :: ServiceNetwork -> ()
authType :: ServiceNetwork -> Maybe (Value Text)
name :: ServiceNetwork -> Maybe (Value Text)
sharingConfig :: ServiceNetwork -> Maybe SharingConfigProperty
tags :: ServiceNetwork -> Maybe [Tag]
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VpcLattice::ServiceNetwork",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"AuthType" (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)
authType,
                            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
"Name" (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)
name,
                            Key -> SharingConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SharingConfig" (SharingConfigProperty -> (Key, Value))
-> Maybe SharingConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SharingConfigProperty
sharingConfig,
                            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])}
instance JSON.ToJSON ServiceNetwork where
  toJSON :: ServiceNetwork -> Value
toJSON ServiceNetwork {Maybe [Tag]
Maybe (Value Text)
Maybe SharingConfigProperty
()
haddock_workaround_ :: ServiceNetwork -> ()
authType :: ServiceNetwork -> Maybe (Value Text)
name :: ServiceNetwork -> Maybe (Value Text)
sharingConfig :: ServiceNetwork -> Maybe SharingConfigProperty
tags :: ServiceNetwork -> Maybe [Tag]
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
..}
    = [(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
"AuthType" (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)
authType,
               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
"Name" (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)
name,
               Key -> SharingConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SharingConfig" (SharingConfigProperty -> (Key, Value))
-> Maybe SharingConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SharingConfigProperty
sharingConfig,
               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]))
instance Property "AuthType" ServiceNetwork where
  type PropertyType "AuthType" ServiceNetwork = Value Prelude.Text
  set :: PropertyType "AuthType" ServiceNetwork
-> ServiceNetwork -> ServiceNetwork
set PropertyType "AuthType" ServiceNetwork
newValue ServiceNetwork {Maybe [Tag]
Maybe (Value Text)
Maybe SharingConfigProperty
()
haddock_workaround_ :: ServiceNetwork -> ()
authType :: ServiceNetwork -> Maybe (Value Text)
name :: ServiceNetwork -> Maybe (Value Text)
sharingConfig :: ServiceNetwork -> Maybe SharingConfigProperty
tags :: ServiceNetwork -> Maybe [Tag]
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
..}
    = ServiceNetwork {authType :: Maybe (Value Text)
authType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AuthType" ServiceNetwork
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe SharingConfigProperty
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
..}
instance Property "Name" ServiceNetwork where
  type PropertyType "Name" ServiceNetwork = Value Prelude.Text
  set :: PropertyType "Name" ServiceNetwork
-> ServiceNetwork -> ServiceNetwork
set PropertyType "Name" ServiceNetwork
newValue ServiceNetwork {Maybe [Tag]
Maybe (Value Text)
Maybe SharingConfigProperty
()
haddock_workaround_ :: ServiceNetwork -> ()
authType :: ServiceNetwork -> Maybe (Value Text)
name :: ServiceNetwork -> Maybe (Value Text)
sharingConfig :: ServiceNetwork -> Maybe SharingConfigProperty
tags :: ServiceNetwork -> Maybe [Tag]
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
..}
    = ServiceNetwork {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" ServiceNetwork
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe SharingConfigProperty
()
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
..}
instance Property "SharingConfig" ServiceNetwork where
  type PropertyType "SharingConfig" ServiceNetwork = SharingConfigProperty
  set :: PropertyType "SharingConfig" ServiceNetwork
-> ServiceNetwork -> ServiceNetwork
set PropertyType "SharingConfig" ServiceNetwork
newValue ServiceNetwork {Maybe [Tag]
Maybe (Value Text)
Maybe SharingConfigProperty
()
haddock_workaround_ :: ServiceNetwork -> ()
authType :: ServiceNetwork -> Maybe (Value Text)
name :: ServiceNetwork -> Maybe (Value Text)
sharingConfig :: ServiceNetwork -> Maybe SharingConfigProperty
tags :: ServiceNetwork -> Maybe [Tag]
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
..}
    = ServiceNetwork {sharingConfig :: Maybe SharingConfigProperty
sharingConfig = SharingConfigProperty -> Maybe SharingConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SharingConfig" ServiceNetwork
SharingConfigProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" ServiceNetwork where
  type PropertyType "Tags" ServiceNetwork = [Tag]
  set :: PropertyType "Tags" ServiceNetwork
-> ServiceNetwork -> ServiceNetwork
set PropertyType "Tags" ServiceNetwork
newValue ServiceNetwork {Maybe [Tag]
Maybe (Value Text)
Maybe SharingConfigProperty
()
haddock_workaround_ :: ServiceNetwork -> ()
authType :: ServiceNetwork -> Maybe (Value Text)
name :: ServiceNetwork -> Maybe (Value Text)
sharingConfig :: ServiceNetwork -> Maybe SharingConfigProperty
tags :: ServiceNetwork -> Maybe [Tag]
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
tags :: Maybe [Tag]
..}
    = ServiceNetwork {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" ServiceNetwork
newValue, Maybe (Value Text)
Maybe SharingConfigProperty
()
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
haddock_workaround_ :: ()
authType :: Maybe (Value Text)
name :: Maybe (Value Text)
sharingConfig :: Maybe SharingConfigProperty
..}