{-# 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.LocationConfiguration 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 LocationConfiguration = LocationConfiguration'
{
LocationConfiguration -> Text
location :: Prelude.Text
}
deriving (LocationConfiguration -> LocationConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LocationConfiguration -> LocationConfiguration -> Bool
$c/= :: LocationConfiguration -> LocationConfiguration -> Bool
== :: LocationConfiguration -> LocationConfiguration -> Bool
$c== :: LocationConfiguration -> LocationConfiguration -> Bool
Prelude.Eq, ReadPrec [LocationConfiguration]
ReadPrec LocationConfiguration
Int -> ReadS LocationConfiguration
ReadS [LocationConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LocationConfiguration]
$creadListPrec :: ReadPrec [LocationConfiguration]
readPrec :: ReadPrec LocationConfiguration
$creadPrec :: ReadPrec LocationConfiguration
readList :: ReadS [LocationConfiguration]
$creadList :: ReadS [LocationConfiguration]
readsPrec :: Int -> ReadS LocationConfiguration
$creadsPrec :: Int -> ReadS LocationConfiguration
Prelude.Read, Int -> LocationConfiguration -> ShowS
[LocationConfiguration] -> ShowS
LocationConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LocationConfiguration] -> ShowS
$cshowList :: [LocationConfiguration] -> ShowS
show :: LocationConfiguration -> String
$cshow :: LocationConfiguration -> String
showsPrec :: Int -> LocationConfiguration -> ShowS
$cshowsPrec :: Int -> LocationConfiguration -> ShowS
Prelude.Show, forall x. Rep LocationConfiguration x -> LocationConfiguration
forall x. LocationConfiguration -> Rep LocationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LocationConfiguration x -> LocationConfiguration
$cfrom :: forall x. LocationConfiguration -> Rep LocationConfiguration x
Prelude.Generic)
newLocationConfiguration ::
Prelude.Text ->
LocationConfiguration
newLocationConfiguration :: Text -> LocationConfiguration
newLocationConfiguration Text
pLocation_ =
LocationConfiguration' {$sel:location:LocationConfiguration' :: Text
location = Text
pLocation_}
locationConfiguration_location :: Lens.Lens' LocationConfiguration Prelude.Text
locationConfiguration_location :: Lens' LocationConfiguration Text
locationConfiguration_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LocationConfiguration' {Text
location :: Text
$sel:location:LocationConfiguration' :: LocationConfiguration -> Text
location} -> Text
location) (\s :: LocationConfiguration
s@LocationConfiguration' {} Text
a -> LocationConfiguration
s {$sel:location:LocationConfiguration' :: Text
location = Text
a} :: LocationConfiguration)
instance Prelude.Hashable LocationConfiguration where
hashWithSalt :: Int -> LocationConfiguration -> Int
hashWithSalt Int
_salt LocationConfiguration' {Text
location :: Text
$sel:location:LocationConfiguration' :: LocationConfiguration -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
location
instance Prelude.NFData LocationConfiguration where
rnf :: LocationConfiguration -> ()
rnf LocationConfiguration' {Text
location :: Text
$sel:location:LocationConfiguration' :: LocationConfiguration -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
location
instance Data.ToJSON LocationConfiguration where
toJSON :: LocationConfiguration -> Value
toJSON LocationConfiguration' {Text
location :: Text
$sel:location:LocationConfiguration' :: LocationConfiguration -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"Location" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
location)]
)