module Stratosphere.NetworkManager.TransitGatewayRouteTableAttachment.ProposedSegmentChangeProperty (
ProposedSegmentChangeProperty(..), mkProposedSegmentChangeProperty
) 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 ProposedSegmentChangeProperty
=
ProposedSegmentChangeProperty {ProposedSegmentChangeProperty -> ()
haddock_workaround_ :: (),
ProposedSegmentChangeProperty -> Maybe (Value Integer)
attachmentPolicyRuleNumber :: (Prelude.Maybe (Value Prelude.Integer)),
ProposedSegmentChangeProperty -> Maybe (Value Text)
segmentName :: (Prelude.Maybe (Value Prelude.Text)),
ProposedSegmentChangeProperty -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> Bool
(ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> Bool)
-> (ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> Bool)
-> Eq ProposedSegmentChangeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> Bool
== :: ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> Bool
$c/= :: ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> Bool
/= :: ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> Bool
Prelude.Eq, Int -> ProposedSegmentChangeProperty -> ShowS
[ProposedSegmentChangeProperty] -> ShowS
ProposedSegmentChangeProperty -> String
(Int -> ProposedSegmentChangeProperty -> ShowS)
-> (ProposedSegmentChangeProperty -> String)
-> ([ProposedSegmentChangeProperty] -> ShowS)
-> Show ProposedSegmentChangeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProposedSegmentChangeProperty -> ShowS
showsPrec :: Int -> ProposedSegmentChangeProperty -> ShowS
$cshow :: ProposedSegmentChangeProperty -> String
show :: ProposedSegmentChangeProperty -> String
$cshowList :: [ProposedSegmentChangeProperty] -> ShowS
showList :: [ProposedSegmentChangeProperty] -> ShowS
Prelude.Show)
mkProposedSegmentChangeProperty :: ProposedSegmentChangeProperty
mkProposedSegmentChangeProperty :: ProposedSegmentChangeProperty
mkProposedSegmentChangeProperty
= ProposedSegmentChangeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
attachmentPolicyRuleNumber :: Maybe (Value Integer)
attachmentPolicyRuleNumber = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
segmentName :: Maybe (Value Text)
segmentName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ProposedSegmentChangeProperty where
toResourceProperties :: ProposedSegmentChangeProperty -> ResourceProperties
toResourceProperties ProposedSegmentChangeProperty {Maybe [Tag]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ProposedSegmentChangeProperty -> ()
attachmentPolicyRuleNumber :: ProposedSegmentChangeProperty -> Maybe (Value Integer)
segmentName :: ProposedSegmentChangeProperty -> Maybe (Value Text)
tags :: ProposedSegmentChangeProperty -> Maybe [Tag]
haddock_workaround_ :: ()
attachmentPolicyRuleNumber :: Maybe (Value Integer)
segmentName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::NetworkManager::TransitGatewayRouteTableAttachment.ProposedSegmentChange",
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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AttachmentPolicyRuleNumber"
(Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
attachmentPolicyRuleNumber,
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
"SegmentName" (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)
segmentName,
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 ProposedSegmentChangeProperty where
toJSON :: ProposedSegmentChangeProperty -> Value
toJSON ProposedSegmentChangeProperty {Maybe [Tag]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ProposedSegmentChangeProperty -> ()
attachmentPolicyRuleNumber :: ProposedSegmentChangeProperty -> Maybe (Value Integer)
segmentName :: ProposedSegmentChangeProperty -> Maybe (Value Text)
tags :: ProposedSegmentChangeProperty -> Maybe [Tag]
haddock_workaround_ :: ()
attachmentPolicyRuleNumber :: Maybe (Value Integer)
segmentName :: 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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AttachmentPolicyRuleNumber"
(Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
attachmentPolicyRuleNumber,
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
"SegmentName" (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)
segmentName,
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 "AttachmentPolicyRuleNumber" ProposedSegmentChangeProperty where
type PropertyType "AttachmentPolicyRuleNumber" ProposedSegmentChangeProperty = Value Prelude.Integer
set :: PropertyType
"AttachmentPolicyRuleNumber" ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> ProposedSegmentChangeProperty
set PropertyType
"AttachmentPolicyRuleNumber" ProposedSegmentChangeProperty
newValue ProposedSegmentChangeProperty {Maybe [Tag]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ProposedSegmentChangeProperty -> ()
attachmentPolicyRuleNumber :: ProposedSegmentChangeProperty -> Maybe (Value Integer)
segmentName :: ProposedSegmentChangeProperty -> Maybe (Value Text)
tags :: ProposedSegmentChangeProperty -> Maybe [Tag]
haddock_workaround_ :: ()
attachmentPolicyRuleNumber :: Maybe (Value Integer)
segmentName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ProposedSegmentChangeProperty
{attachmentPolicyRuleNumber :: Maybe (Value Integer)
attachmentPolicyRuleNumber = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"AttachmentPolicyRuleNumber" ProposedSegmentChangeProperty
Value Integer
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
segmentName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
segmentName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "SegmentName" ProposedSegmentChangeProperty where
type PropertyType "SegmentName" ProposedSegmentChangeProperty = Value Prelude.Text
set :: PropertyType "SegmentName" ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> ProposedSegmentChangeProperty
set PropertyType "SegmentName" ProposedSegmentChangeProperty
newValue ProposedSegmentChangeProperty {Maybe [Tag]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ProposedSegmentChangeProperty -> ()
attachmentPolicyRuleNumber :: ProposedSegmentChangeProperty -> Maybe (Value Integer)
segmentName :: ProposedSegmentChangeProperty -> Maybe (Value Text)
tags :: ProposedSegmentChangeProperty -> Maybe [Tag]
haddock_workaround_ :: ()
attachmentPolicyRuleNumber :: Maybe (Value Integer)
segmentName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ProposedSegmentChangeProperty
{segmentName :: Maybe (Value Text)
segmentName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SegmentName" ProposedSegmentChangeProperty
Value Text
newValue, Maybe [Tag]
Maybe (Value Integer)
()
haddock_workaround_ :: ()
attachmentPolicyRuleNumber :: Maybe (Value Integer)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
attachmentPolicyRuleNumber :: Maybe (Value Integer)
tags :: Maybe [Tag]
..}
instance Property "Tags" ProposedSegmentChangeProperty where
type PropertyType "Tags" ProposedSegmentChangeProperty = [Tag]
set :: PropertyType "Tags" ProposedSegmentChangeProperty
-> ProposedSegmentChangeProperty -> ProposedSegmentChangeProperty
set PropertyType "Tags" ProposedSegmentChangeProperty
newValue ProposedSegmentChangeProperty {Maybe [Tag]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ProposedSegmentChangeProperty -> ()
attachmentPolicyRuleNumber :: ProposedSegmentChangeProperty -> Maybe (Value Integer)
segmentName :: ProposedSegmentChangeProperty -> Maybe (Value Text)
tags :: ProposedSegmentChangeProperty -> Maybe [Tag]
haddock_workaround_ :: ()
attachmentPolicyRuleNumber :: Maybe (Value Integer)
segmentName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ProposedSegmentChangeProperty {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" ProposedSegmentChangeProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
attachmentPolicyRuleNumber :: Maybe (Value Integer)
segmentName :: Maybe (Value Text)
haddock_workaround_ :: ()
attachmentPolicyRuleNumber :: Maybe (Value Integer)
segmentName :: Maybe (Value Text)
..}