module Stratosphere.GameLift.GameSessionQueue.GameSessionQueueDestinationProperty (
        GameSessionQueueDestinationProperty(..),
        mkGameSessionQueueDestinationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GameSessionQueueDestinationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gamesessionqueue-gamesessionqueuedestination.html>
    GameSessionQueueDestinationProperty {GameSessionQueueDestinationProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gamesessionqueue-gamesessionqueuedestination.html#cfn-gamelift-gamesessionqueue-gamesessionqueuedestination-destinationarn>
                                         GameSessionQueueDestinationProperty -> Maybe (Value Text)
destinationArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (GameSessionQueueDestinationProperty
-> GameSessionQueueDestinationProperty -> Bool
(GameSessionQueueDestinationProperty
 -> GameSessionQueueDestinationProperty -> Bool)
-> (GameSessionQueueDestinationProperty
    -> GameSessionQueueDestinationProperty -> Bool)
-> Eq GameSessionQueueDestinationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GameSessionQueueDestinationProperty
-> GameSessionQueueDestinationProperty -> Bool
== :: GameSessionQueueDestinationProperty
-> GameSessionQueueDestinationProperty -> Bool
$c/= :: GameSessionQueueDestinationProperty
-> GameSessionQueueDestinationProperty -> Bool
/= :: GameSessionQueueDestinationProperty
-> GameSessionQueueDestinationProperty -> Bool
Prelude.Eq, Int -> GameSessionQueueDestinationProperty -> ShowS
[GameSessionQueueDestinationProperty] -> ShowS
GameSessionQueueDestinationProperty -> String
(Int -> GameSessionQueueDestinationProperty -> ShowS)
-> (GameSessionQueueDestinationProperty -> String)
-> ([GameSessionQueueDestinationProperty] -> ShowS)
-> Show GameSessionQueueDestinationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GameSessionQueueDestinationProperty -> ShowS
showsPrec :: Int -> GameSessionQueueDestinationProperty -> ShowS
$cshow :: GameSessionQueueDestinationProperty -> String
show :: GameSessionQueueDestinationProperty -> String
$cshowList :: [GameSessionQueueDestinationProperty] -> ShowS
showList :: [GameSessionQueueDestinationProperty] -> ShowS
Prelude.Show)
mkGameSessionQueueDestinationProperty ::
  GameSessionQueueDestinationProperty
mkGameSessionQueueDestinationProperty :: GameSessionQueueDestinationProperty
mkGameSessionQueueDestinationProperty
  = GameSessionQueueDestinationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), destinationArn :: Maybe (Value Text)
destinationArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GameSessionQueueDestinationProperty where
  toResourceProperties :: GameSessionQueueDestinationProperty -> ResourceProperties
toResourceProperties GameSessionQueueDestinationProperty {Maybe (Value Text)
()
haddock_workaround_ :: GameSessionQueueDestinationProperty -> ()
destinationArn :: GameSessionQueueDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GameLift::GameSessionQueue.GameSessionQueueDestination",
         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 -> 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
"DestinationArn" (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)
destinationArn])}
instance JSON.ToJSON GameSessionQueueDestinationProperty where
  toJSON :: GameSessionQueueDestinationProperty -> Value
toJSON GameSessionQueueDestinationProperty {Maybe (Value Text)
()
haddock_workaround_ :: GameSessionQueueDestinationProperty -> ()
destinationArn :: GameSessionQueueDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value 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 -> 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
"DestinationArn" (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)
destinationArn]))
instance Property "DestinationArn" GameSessionQueueDestinationProperty where
  type PropertyType "DestinationArn" GameSessionQueueDestinationProperty = Value Prelude.Text
  set :: PropertyType "DestinationArn" GameSessionQueueDestinationProperty
-> GameSessionQueueDestinationProperty
-> GameSessionQueueDestinationProperty
set PropertyType "DestinationArn" GameSessionQueueDestinationProperty
newValue GameSessionQueueDestinationProperty {Maybe (Value Text)
()
haddock_workaround_ :: GameSessionQueueDestinationProperty -> ()
destinationArn :: GameSessionQueueDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
..}
    = GameSessionQueueDestinationProperty
        {destinationArn :: Maybe (Value Text)
destinationArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DestinationArn" GameSessionQueueDestinationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}