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