{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.GameLift.Types.GameSessionQueueDestination where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GameSessionQueueDestination = GameSessionQueueDestination'
{
GameSessionQueueDestination -> Maybe Text
destinationArn :: Prelude.Maybe Prelude.Text
}
deriving (GameSessionQueueDestination -> GameSessionQueueDestination -> Bool
(GameSessionQueueDestination
-> GameSessionQueueDestination -> Bool)
-> (GameSessionQueueDestination
-> GameSessionQueueDestination -> Bool)
-> Eq GameSessionQueueDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GameSessionQueueDestination -> GameSessionQueueDestination -> Bool
$c/= :: GameSessionQueueDestination -> GameSessionQueueDestination -> Bool
== :: GameSessionQueueDestination -> GameSessionQueueDestination -> Bool
$c== :: GameSessionQueueDestination -> GameSessionQueueDestination -> Bool
Prelude.Eq, ReadPrec [GameSessionQueueDestination]
ReadPrec GameSessionQueueDestination
Int -> ReadS GameSessionQueueDestination
ReadS [GameSessionQueueDestination]
(Int -> ReadS GameSessionQueueDestination)
-> ReadS [GameSessionQueueDestination]
-> ReadPrec GameSessionQueueDestination
-> ReadPrec [GameSessionQueueDestination]
-> Read GameSessionQueueDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GameSessionQueueDestination]
$creadListPrec :: ReadPrec [GameSessionQueueDestination]
readPrec :: ReadPrec GameSessionQueueDestination
$creadPrec :: ReadPrec GameSessionQueueDestination
readList :: ReadS [GameSessionQueueDestination]
$creadList :: ReadS [GameSessionQueueDestination]
readsPrec :: Int -> ReadS GameSessionQueueDestination
$creadsPrec :: Int -> ReadS GameSessionQueueDestination
Prelude.Read, Int -> GameSessionQueueDestination -> ShowS
[GameSessionQueueDestination] -> ShowS
GameSessionQueueDestination -> String
(Int -> GameSessionQueueDestination -> ShowS)
-> (GameSessionQueueDestination -> String)
-> ([GameSessionQueueDestination] -> ShowS)
-> Show GameSessionQueueDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GameSessionQueueDestination] -> ShowS
$cshowList :: [GameSessionQueueDestination] -> ShowS
show :: GameSessionQueueDestination -> String
$cshow :: GameSessionQueueDestination -> String
showsPrec :: Int -> GameSessionQueueDestination -> ShowS
$cshowsPrec :: Int -> GameSessionQueueDestination -> ShowS
Prelude.Show, (forall x.
GameSessionQueueDestination -> Rep GameSessionQueueDestination x)
-> (forall x.
Rep GameSessionQueueDestination x -> GameSessionQueueDestination)
-> Generic GameSessionQueueDestination
forall x.
Rep GameSessionQueueDestination x -> GameSessionQueueDestination
forall x.
GameSessionQueueDestination -> Rep GameSessionQueueDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GameSessionQueueDestination x -> GameSessionQueueDestination
$cfrom :: forall x.
GameSessionQueueDestination -> Rep GameSessionQueueDestination x
Prelude.Generic)
newGameSessionQueueDestination ::
GameSessionQueueDestination
newGameSessionQueueDestination :: GameSessionQueueDestination
newGameSessionQueueDestination =
GameSessionQueueDestination' :: Maybe Text -> GameSessionQueueDestination
GameSessionQueueDestination'
{ $sel:destinationArn:GameSessionQueueDestination' :: Maybe Text
destinationArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
gameSessionQueueDestination_destinationArn :: Lens.Lens' GameSessionQueueDestination (Prelude.Maybe Prelude.Text)
gameSessionQueueDestination_destinationArn :: (Maybe Text -> f (Maybe Text))
-> GameSessionQueueDestination -> f GameSessionQueueDestination
gameSessionQueueDestination_destinationArn = (GameSessionQueueDestination -> Maybe Text)
-> (GameSessionQueueDestination
-> Maybe Text -> GameSessionQueueDestination)
-> Lens
GameSessionQueueDestination
GameSessionQueueDestination
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GameSessionQueueDestination' {Maybe Text
destinationArn :: Maybe Text
$sel:destinationArn:GameSessionQueueDestination' :: GameSessionQueueDestination -> Maybe Text
destinationArn} -> Maybe Text
destinationArn) (\s :: GameSessionQueueDestination
s@GameSessionQueueDestination' {} Maybe Text
a -> GameSessionQueueDestination
s {$sel:destinationArn:GameSessionQueueDestination' :: Maybe Text
destinationArn = Maybe Text
a} :: GameSessionQueueDestination)
instance Core.FromJSON GameSessionQueueDestination where
parseJSON :: Value -> Parser GameSessionQueueDestination
parseJSON =
String
-> (Object -> Parser GameSessionQueueDestination)
-> Value
-> Parser GameSessionQueueDestination
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GameSessionQueueDestination"
( \Object
x ->
Maybe Text -> GameSessionQueueDestination
GameSessionQueueDestination'
(Maybe Text -> GameSessionQueueDestination)
-> Parser (Maybe Text) -> Parser GameSessionQueueDestination
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DestinationArn")
)
instance Prelude.Hashable GameSessionQueueDestination
instance Prelude.NFData GameSessionQueueDestination
instance Core.ToJSON GameSessionQueueDestination where
toJSON :: GameSessionQueueDestination -> Value
toJSON GameSessionQueueDestination' {Maybe Text
destinationArn :: Maybe Text
$sel:destinationArn:GameSessionQueueDestination' :: GameSessionQueueDestination -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DestinationArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
destinationArn
]
)