{-# 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.GamesParks.Types.StageSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GamesParks.Types.StageState
import qualified Amazonka.Prelude as Prelude
data StageSummary = StageSummary'
{
StageSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
StageSummary -> Maybe Text
gameKey :: Prelude.Maybe Prelude.Text,
StageSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
StageSummary -> Maybe StageState
state :: Prelude.Maybe StageState,
StageSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (StageSummary -> StageSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StageSummary -> StageSummary -> Bool
$c/= :: StageSummary -> StageSummary -> Bool
== :: StageSummary -> StageSummary -> Bool
$c== :: StageSummary -> StageSummary -> Bool
Prelude.Eq, ReadPrec [StageSummary]
ReadPrec StageSummary
Int -> ReadS StageSummary
ReadS [StageSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StageSummary]
$creadListPrec :: ReadPrec [StageSummary]
readPrec :: ReadPrec StageSummary
$creadPrec :: ReadPrec StageSummary
readList :: ReadS [StageSummary]
$creadList :: ReadS [StageSummary]
readsPrec :: Int -> ReadS StageSummary
$creadsPrec :: Int -> ReadS StageSummary
Prelude.Read, Int -> StageSummary -> ShowS
[StageSummary] -> ShowS
StageSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StageSummary] -> ShowS
$cshowList :: [StageSummary] -> ShowS
show :: StageSummary -> String
$cshow :: StageSummary -> String
showsPrec :: Int -> StageSummary -> ShowS
$cshowsPrec :: Int -> StageSummary -> ShowS
Prelude.Show, forall x. Rep StageSummary x -> StageSummary
forall x. StageSummary -> Rep StageSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StageSummary x -> StageSummary
$cfrom :: forall x. StageSummary -> Rep StageSummary x
Prelude.Generic)
newStageSummary ::
StageSummary
newStageSummary :: StageSummary
newStageSummary =
StageSummary'
{ $sel:description:StageSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:gameKey:StageSummary' :: Maybe Text
gameKey = forall a. Maybe a
Prelude.Nothing,
$sel:name:StageSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:state:StageSummary' :: Maybe StageState
state = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StageSummary' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
stageSummary_description :: Lens.Lens' StageSummary (Prelude.Maybe Prelude.Text)
stageSummary_description :: Lens' StageSummary (Maybe Text)
stageSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StageSummary' {Maybe Text
description :: Maybe Text
$sel:description:StageSummary' :: StageSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: StageSummary
s@StageSummary' {} Maybe Text
a -> StageSummary
s {$sel:description:StageSummary' :: Maybe Text
description = Maybe Text
a} :: StageSummary)
stageSummary_gameKey :: Lens.Lens' StageSummary (Prelude.Maybe Prelude.Text)
stageSummary_gameKey :: Lens' StageSummary (Maybe Text)
stageSummary_gameKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StageSummary' {Maybe Text
gameKey :: Maybe Text
$sel:gameKey:StageSummary' :: StageSummary -> Maybe Text
gameKey} -> Maybe Text
gameKey) (\s :: StageSummary
s@StageSummary' {} Maybe Text
a -> StageSummary
s {$sel:gameKey:StageSummary' :: Maybe Text
gameKey = Maybe Text
a} :: StageSummary)
stageSummary_name :: Lens.Lens' StageSummary (Prelude.Maybe Prelude.Text)
stageSummary_name :: Lens' StageSummary (Maybe Text)
stageSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StageSummary' {Maybe Text
name :: Maybe Text
$sel:name:StageSummary' :: StageSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: StageSummary
s@StageSummary' {} Maybe Text
a -> StageSummary
s {$sel:name:StageSummary' :: Maybe Text
name = Maybe Text
a} :: StageSummary)
stageSummary_state :: Lens.Lens' StageSummary (Prelude.Maybe StageState)
stageSummary_state :: Lens' StageSummary (Maybe StageState)
stageSummary_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StageSummary' {Maybe StageState
state :: Maybe StageState
$sel:state:StageSummary' :: StageSummary -> Maybe StageState
state} -> Maybe StageState
state) (\s :: StageSummary
s@StageSummary' {} Maybe StageState
a -> StageSummary
s {$sel:state:StageSummary' :: Maybe StageState
state = Maybe StageState
a} :: StageSummary)
stageSummary_tags :: Lens.Lens' StageSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
stageSummary_tags :: Lens' StageSummary (Maybe (HashMap Text Text))
stageSummary_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StageSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StageSummary' :: StageSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StageSummary
s@StageSummary' {} Maybe (HashMap Text Text)
a -> StageSummary
s {$sel:tags:StageSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StageSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON StageSummary where
parseJSON :: Value -> Parser StageSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"StageSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StageState
-> Maybe (HashMap Text Text)
-> StageSummary
StageSummary'
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
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GameKey")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"State")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable StageSummary where
hashWithSalt :: Int -> StageSummary -> Int
hashWithSalt Int
_salt StageSummary' {Maybe Text
Maybe (HashMap Text Text)
Maybe StageState
tags :: Maybe (HashMap Text Text)
state :: Maybe StageState
name :: Maybe Text
gameKey :: Maybe Text
description :: Maybe Text
$sel:tags:StageSummary' :: StageSummary -> Maybe (HashMap Text Text)
$sel:state:StageSummary' :: StageSummary -> Maybe StageState
$sel:name:StageSummary' :: StageSummary -> Maybe Text
$sel:gameKey:StageSummary' :: StageSummary -> Maybe Text
$sel:description:StageSummary' :: StageSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gameKey
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StageState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData StageSummary where
rnf :: StageSummary -> ()
rnf StageSummary' {Maybe Text
Maybe (HashMap Text Text)
Maybe StageState
tags :: Maybe (HashMap Text Text)
state :: Maybe StageState
name :: Maybe Text
gameKey :: Maybe Text
description :: Maybe Text
$sel:tags:StageSummary' :: StageSummary -> Maybe (HashMap Text Text)
$sel:state:StageSummary' :: StageSummary -> Maybe StageState
$sel:name:StageSummary' :: StageSummary -> Maybe Text
$sel:gameKey:StageSummary' :: StageSummary -> Maybe Text
$sel:description:StageSummary' :: StageSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gameKey
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StageState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags