module Stratosphere.NetworkManager.CoreNetwork.SegmentsProperty (
        SegmentsProperty(..), mkSegmentsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SegmentsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-corenetwork-segments.html>
    SegmentsProperty {SegmentsProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-corenetwork-segments.html#cfn-networkmanager-corenetwork-segments-sendto>
                      SegmentsProperty -> Maybe (ValueList Text)
sendTo :: (Prelude.Maybe (ValueList Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-corenetwork-segments.html#cfn-networkmanager-corenetwork-segments-sendvia>
                      SegmentsProperty -> Maybe (ValueList Text)
sendVia :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (SegmentsProperty -> SegmentsProperty -> Bool
(SegmentsProperty -> SegmentsProperty -> Bool)
-> (SegmentsProperty -> SegmentsProperty -> Bool)
-> Eq SegmentsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SegmentsProperty -> SegmentsProperty -> Bool
== :: SegmentsProperty -> SegmentsProperty -> Bool
$c/= :: SegmentsProperty -> SegmentsProperty -> Bool
/= :: SegmentsProperty -> SegmentsProperty -> Bool
Prelude.Eq, Int -> SegmentsProperty -> ShowS
[SegmentsProperty] -> ShowS
SegmentsProperty -> String
(Int -> SegmentsProperty -> ShowS)
-> (SegmentsProperty -> String)
-> ([SegmentsProperty] -> ShowS)
-> Show SegmentsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SegmentsProperty -> ShowS
showsPrec :: Int -> SegmentsProperty -> ShowS
$cshow :: SegmentsProperty -> String
show :: SegmentsProperty -> String
$cshowList :: [SegmentsProperty] -> ShowS
showList :: [SegmentsProperty] -> ShowS
Prelude.Show)
mkSegmentsProperty :: SegmentsProperty
mkSegmentsProperty :: SegmentsProperty
mkSegmentsProperty
  = SegmentsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), sendTo :: Maybe (ValueList Text)
sendTo = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       sendVia :: Maybe (ValueList Text)
sendVia = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SegmentsProperty where
  toResourceProperties :: SegmentsProperty -> ResourceProperties
toResourceProperties SegmentsProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: SegmentsProperty -> ()
sendTo :: SegmentsProperty -> Maybe (ValueList Text)
sendVia :: SegmentsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
sendTo :: Maybe (ValueList Text)
sendVia :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::NetworkManager::CoreNetwork.Segments",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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 -> 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..=) Key
"SendTo" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
sendTo,
                            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..=) Key
"SendVia" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
sendVia])}
instance JSON.ToJSON SegmentsProperty where
  toJSON :: SegmentsProperty -> Value
toJSON SegmentsProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: SegmentsProperty -> ()
sendTo :: SegmentsProperty -> Maybe (ValueList Text)
sendVia :: SegmentsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
sendTo :: Maybe (ValueList Text)
sendVia :: Maybe (ValueList Text)
..}
    = [(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 -> 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..=) Key
"SendTo" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
sendTo,
               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..=) Key
"SendVia" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
sendVia]))
instance Property "SendTo" SegmentsProperty where
  type PropertyType "SendTo" SegmentsProperty = ValueList Prelude.Text
  set :: PropertyType "SendTo" SegmentsProperty
-> SegmentsProperty -> SegmentsProperty
set PropertyType "SendTo" SegmentsProperty
newValue SegmentsProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: SegmentsProperty -> ()
sendTo :: SegmentsProperty -> Maybe (ValueList Text)
sendVia :: SegmentsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
sendTo :: Maybe (ValueList Text)
sendVia :: Maybe (ValueList Text)
..}
    = SegmentsProperty {sendTo :: Maybe (ValueList Text)
sendTo = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SendTo" SegmentsProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
sendVia :: Maybe (ValueList Text)
haddock_workaround_ :: ()
sendVia :: Maybe (ValueList Text)
..}
instance Property "SendVia" SegmentsProperty where
  type PropertyType "SendVia" SegmentsProperty = ValueList Prelude.Text
  set :: PropertyType "SendVia" SegmentsProperty
-> SegmentsProperty -> SegmentsProperty
set PropertyType "SendVia" SegmentsProperty
newValue SegmentsProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: SegmentsProperty -> ()
sendTo :: SegmentsProperty -> Maybe (ValueList Text)
sendVia :: SegmentsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
sendTo :: Maybe (ValueList Text)
sendVia :: Maybe (ValueList Text)
..}
    = SegmentsProperty {sendVia :: Maybe (ValueList Text)
sendVia = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SendVia" SegmentsProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
sendTo :: Maybe (ValueList Text)
haddock_workaround_ :: ()
sendTo :: Maybe (ValueList Text)
..}