module Stratosphere.VpcLattice.ServiceNetworkResourceAssociation (
ServiceNetworkResourceAssociation(..),
mkServiceNetworkResourceAssociation
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ServiceNetworkResourceAssociation
=
ServiceNetworkResourceAssociation {ServiceNetworkResourceAssociation -> ()
haddock_workaround_ :: (),
ServiceNetworkResourceAssociation -> Maybe (Value Text)
resourceConfigurationId :: (Prelude.Maybe (Value Prelude.Text)),
ServiceNetworkResourceAssociation -> Maybe (Value Text)
serviceNetworkId :: (Prelude.Maybe (Value Prelude.Text)),
ServiceNetworkResourceAssociation -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation -> Bool
(ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation -> Bool)
-> (ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation -> Bool)
-> Eq ServiceNetworkResourceAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation -> Bool
== :: ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation -> Bool
$c/= :: ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation -> Bool
/= :: ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation -> Bool
Prelude.Eq, Int -> ServiceNetworkResourceAssociation -> ShowS
[ServiceNetworkResourceAssociation] -> ShowS
ServiceNetworkResourceAssociation -> String
(Int -> ServiceNetworkResourceAssociation -> ShowS)
-> (ServiceNetworkResourceAssociation -> String)
-> ([ServiceNetworkResourceAssociation] -> ShowS)
-> Show ServiceNetworkResourceAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServiceNetworkResourceAssociation -> ShowS
showsPrec :: Int -> ServiceNetworkResourceAssociation -> ShowS
$cshow :: ServiceNetworkResourceAssociation -> String
show :: ServiceNetworkResourceAssociation -> String
$cshowList :: [ServiceNetworkResourceAssociation] -> ShowS
showList :: [ServiceNetworkResourceAssociation] -> ShowS
Prelude.Show)
mkServiceNetworkResourceAssociation ::
ServiceNetworkResourceAssociation
mkServiceNetworkResourceAssociation :: ServiceNetworkResourceAssociation
mkServiceNetworkResourceAssociation
= ServiceNetworkResourceAssociation
{haddock_workaround_ :: ()
haddock_workaround_ = (),
resourceConfigurationId :: Maybe (Value Text)
resourceConfigurationId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
serviceNetworkId :: Maybe (Value Text)
serviceNetworkId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ServiceNetworkResourceAssociation where
toResourceProperties :: ServiceNetworkResourceAssociation -> ResourceProperties
toResourceProperties ServiceNetworkResourceAssociation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ServiceNetworkResourceAssociation -> ()
resourceConfigurationId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
serviceNetworkId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkResourceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
resourceConfigurationId :: Maybe (Value Text)
serviceNetworkId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::VpcLattice::ServiceNetworkResourceAssociation",
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
"ResourceConfigurationId"
(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)
resourceConfigurationId,
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
"ServiceNetworkId" (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)
serviceNetworkId,
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 ServiceNetworkResourceAssociation where
toJSON :: ServiceNetworkResourceAssociation -> Value
toJSON ServiceNetworkResourceAssociation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ServiceNetworkResourceAssociation -> ()
resourceConfigurationId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
serviceNetworkId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkResourceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
resourceConfigurationId :: Maybe (Value Text)
serviceNetworkId :: Maybe (Value Text)
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
"ResourceConfigurationId"
(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)
resourceConfigurationId,
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
"ServiceNetworkId" (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)
serviceNetworkId,
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 "ResourceConfigurationId" ServiceNetworkResourceAssociation where
type PropertyType "ResourceConfigurationId" ServiceNetworkResourceAssociation = Value Prelude.Text
set :: PropertyType
"ResourceConfigurationId" ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation
set PropertyType
"ResourceConfigurationId" ServiceNetworkResourceAssociation
newValue ServiceNetworkResourceAssociation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ServiceNetworkResourceAssociation -> ()
resourceConfigurationId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
serviceNetworkId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkResourceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
resourceConfigurationId :: Maybe (Value Text)
serviceNetworkId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ServiceNetworkResourceAssociation
{resourceConfigurationId :: Maybe (Value Text)
resourceConfigurationId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"ResourceConfigurationId" ServiceNetworkResourceAssociation
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
serviceNetworkId :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
serviceNetworkId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ServiceNetworkId" ServiceNetworkResourceAssociation where
type PropertyType "ServiceNetworkId" ServiceNetworkResourceAssociation = Value Prelude.Text
set :: PropertyType "ServiceNetworkId" ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation
set PropertyType "ServiceNetworkId" ServiceNetworkResourceAssociation
newValue ServiceNetworkResourceAssociation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ServiceNetworkResourceAssociation -> ()
resourceConfigurationId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
serviceNetworkId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkResourceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
resourceConfigurationId :: Maybe (Value Text)
serviceNetworkId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ServiceNetworkResourceAssociation
{serviceNetworkId :: Maybe (Value Text)
serviceNetworkId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ServiceNetworkId" ServiceNetworkResourceAssociation
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
resourceConfigurationId :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
resourceConfigurationId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" ServiceNetworkResourceAssociation where
type PropertyType "Tags" ServiceNetworkResourceAssociation = [Tag]
set :: PropertyType "Tags" ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation
-> ServiceNetworkResourceAssociation
set PropertyType "Tags" ServiceNetworkResourceAssociation
newValue ServiceNetworkResourceAssociation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ServiceNetworkResourceAssociation -> ()
resourceConfigurationId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
serviceNetworkId :: ServiceNetworkResourceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkResourceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
resourceConfigurationId :: Maybe (Value Text)
serviceNetworkId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ServiceNetworkResourceAssociation
{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" ServiceNetworkResourceAssociation
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
resourceConfigurationId :: Maybe (Value Text)
serviceNetworkId :: Maybe (Value Text)
haddock_workaround_ :: ()
resourceConfigurationId :: Maybe (Value Text)
serviceNetworkId :: Maybe (Value Text)
..}