{-# 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.TargetTrackingConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TargetTrackingConfiguration = TargetTrackingConfiguration'
{
TargetTrackingConfiguration -> Double
targetValue :: Prelude.Double
}
deriving (TargetTrackingConfiguration -> TargetTrackingConfiguration -> Bool
(TargetTrackingConfiguration
-> TargetTrackingConfiguration -> Bool)
-> (TargetTrackingConfiguration
-> TargetTrackingConfiguration -> Bool)
-> Eq TargetTrackingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TargetTrackingConfiguration -> TargetTrackingConfiguration -> Bool
$c/= :: TargetTrackingConfiguration -> TargetTrackingConfiguration -> Bool
== :: TargetTrackingConfiguration -> TargetTrackingConfiguration -> Bool
$c== :: TargetTrackingConfiguration -> TargetTrackingConfiguration -> Bool
Prelude.Eq, ReadPrec [TargetTrackingConfiguration]
ReadPrec TargetTrackingConfiguration
Int -> ReadS TargetTrackingConfiguration
ReadS [TargetTrackingConfiguration]
(Int -> ReadS TargetTrackingConfiguration)
-> ReadS [TargetTrackingConfiguration]
-> ReadPrec TargetTrackingConfiguration
-> ReadPrec [TargetTrackingConfiguration]
-> Read TargetTrackingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TargetTrackingConfiguration]
$creadListPrec :: ReadPrec [TargetTrackingConfiguration]
readPrec :: ReadPrec TargetTrackingConfiguration
$creadPrec :: ReadPrec TargetTrackingConfiguration
readList :: ReadS [TargetTrackingConfiguration]
$creadList :: ReadS [TargetTrackingConfiguration]
readsPrec :: Int -> ReadS TargetTrackingConfiguration
$creadsPrec :: Int -> ReadS TargetTrackingConfiguration
Prelude.Read, Int -> TargetTrackingConfiguration -> ShowS
[TargetTrackingConfiguration] -> ShowS
TargetTrackingConfiguration -> String
(Int -> TargetTrackingConfiguration -> ShowS)
-> (TargetTrackingConfiguration -> String)
-> ([TargetTrackingConfiguration] -> ShowS)
-> Show TargetTrackingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TargetTrackingConfiguration] -> ShowS
$cshowList :: [TargetTrackingConfiguration] -> ShowS
show :: TargetTrackingConfiguration -> String
$cshow :: TargetTrackingConfiguration -> String
showsPrec :: Int -> TargetTrackingConfiguration -> ShowS
$cshowsPrec :: Int -> TargetTrackingConfiguration -> ShowS
Prelude.Show, (forall x.
TargetTrackingConfiguration -> Rep TargetTrackingConfiguration x)
-> (forall x.
Rep TargetTrackingConfiguration x -> TargetTrackingConfiguration)
-> Generic TargetTrackingConfiguration
forall x.
Rep TargetTrackingConfiguration x -> TargetTrackingConfiguration
forall x.
TargetTrackingConfiguration -> Rep TargetTrackingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TargetTrackingConfiguration x -> TargetTrackingConfiguration
$cfrom :: forall x.
TargetTrackingConfiguration -> Rep TargetTrackingConfiguration x
Prelude.Generic)
newTargetTrackingConfiguration ::
Prelude.Double ->
TargetTrackingConfiguration
newTargetTrackingConfiguration :: Double -> TargetTrackingConfiguration
newTargetTrackingConfiguration Double
pTargetValue_ =
TargetTrackingConfiguration' :: Double -> TargetTrackingConfiguration
TargetTrackingConfiguration'
{ $sel:targetValue:TargetTrackingConfiguration' :: Double
targetValue =
Double
pTargetValue_
}
targetTrackingConfiguration_targetValue :: Lens.Lens' TargetTrackingConfiguration Prelude.Double
targetTrackingConfiguration_targetValue :: (Double -> f Double)
-> TargetTrackingConfiguration -> f TargetTrackingConfiguration
targetTrackingConfiguration_targetValue = (TargetTrackingConfiguration -> Double)
-> (TargetTrackingConfiguration
-> Double -> TargetTrackingConfiguration)
-> Lens
TargetTrackingConfiguration
TargetTrackingConfiguration
Double
Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TargetTrackingConfiguration' {Double
targetValue :: Double
$sel:targetValue:TargetTrackingConfiguration' :: TargetTrackingConfiguration -> Double
targetValue} -> Double
targetValue) (\s :: TargetTrackingConfiguration
s@TargetTrackingConfiguration' {} Double
a -> TargetTrackingConfiguration
s {$sel:targetValue:TargetTrackingConfiguration' :: Double
targetValue = Double
a} :: TargetTrackingConfiguration)
instance Prelude.Hashable TargetTrackingConfiguration
instance Prelude.NFData TargetTrackingConfiguration
instance Core.ToJSON TargetTrackingConfiguration where
toJSON :: TargetTrackingConfiguration -> Value
toJSON TargetTrackingConfiguration' {Double
targetValue :: Double
$sel:targetValue:TargetTrackingConfiguration' :: TargetTrackingConfiguration -> Double
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TargetValue" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Double
targetValue)]
)