{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data GameSessionQueueDestination = GameSessionQueueDestination'
{
GameSessionQueueDestination -> Maybe Text
destinationArn :: Prelude.Maybe Prelude.Text
}
deriving (GameSessionQueueDestination -> GameSessionQueueDestination -> Bool
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]
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
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.
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'
{ $sel:destinationArn:GameSessionQueueDestination' :: Maybe Text
destinationArn =
forall a. Maybe a
Prelude.Nothing
}
gameSessionQueueDestination_destinationArn :: Lens.Lens' GameSessionQueueDestination (Prelude.Maybe Prelude.Text)
gameSessionQueueDestination_destinationArn :: Lens' GameSessionQueueDestination (Maybe Text)
gameSessionQueueDestination_destinationArn = 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 Data.FromJSON GameSessionQueueDestination where
parseJSON :: Value -> Parser GameSessionQueueDestination
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"GameSessionQueueDestination"
( \Object
x ->
Maybe Text -> GameSessionQueueDestination
GameSessionQueueDestination'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DestinationArn")
)
instance Prelude.Hashable GameSessionQueueDestination where
hashWithSalt :: Int -> GameSessionQueueDestination -> Int
hashWithSalt Int
_salt GameSessionQueueDestination' {Maybe Text
destinationArn :: Maybe Text
$sel:destinationArn:GameSessionQueueDestination' :: GameSessionQueueDestination -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationArn
instance Prelude.NFData GameSessionQueueDestination where
rnf :: GameSessionQueueDestination -> ()
rnf GameSessionQueueDestination' {Maybe Text
destinationArn :: Maybe Text
$sel:destinationArn:GameSessionQueueDestination' :: GameSessionQueueDestination -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationArn
instance Data.ToJSON GameSessionQueueDestination where
toJSON :: GameSessionQueueDestination -> Value
toJSON GameSessionQueueDestination' {Maybe Text
destinationArn :: Maybe Text
$sel:destinationArn:GameSessionQueueDestination' :: GameSessionQueueDestination -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"DestinationArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
destinationArn
]
)