{-# 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.SnapshotSummary 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 SnapshotSummary = SnapshotSummary'
{
SnapshotSummary -> Maybe ISO8601
created :: Prelude.Maybe Data.ISO8601,
SnapshotSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
SnapshotSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
SnapshotSummary -> Maybe ISO8601
lastUpdated :: Prelude.Maybe Data.ISO8601
}
deriving (SnapshotSummary -> SnapshotSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SnapshotSummary -> SnapshotSummary -> Bool
$c/= :: SnapshotSummary -> SnapshotSummary -> Bool
== :: SnapshotSummary -> SnapshotSummary -> Bool
$c== :: SnapshotSummary -> SnapshotSummary -> Bool
Prelude.Eq, ReadPrec [SnapshotSummary]
ReadPrec SnapshotSummary
Int -> ReadS SnapshotSummary
ReadS [SnapshotSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SnapshotSummary]
$creadListPrec :: ReadPrec [SnapshotSummary]
readPrec :: ReadPrec SnapshotSummary
$creadPrec :: ReadPrec SnapshotSummary
readList :: ReadS [SnapshotSummary]
$creadList :: ReadS [SnapshotSummary]
readsPrec :: Int -> ReadS SnapshotSummary
$creadsPrec :: Int -> ReadS SnapshotSummary
Prelude.Read, Int -> SnapshotSummary -> ShowS
[SnapshotSummary] -> ShowS
SnapshotSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SnapshotSummary] -> ShowS
$cshowList :: [SnapshotSummary] -> ShowS
show :: SnapshotSummary -> String
$cshow :: SnapshotSummary -> String
showsPrec :: Int -> SnapshotSummary -> ShowS
$cshowsPrec :: Int -> SnapshotSummary -> ShowS
Prelude.Show, forall x. Rep SnapshotSummary x -> SnapshotSummary
forall x. SnapshotSummary -> Rep SnapshotSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SnapshotSummary x -> SnapshotSummary
$cfrom :: forall x. SnapshotSummary -> Rep SnapshotSummary x
Prelude.Generic)
newSnapshotSummary ::
SnapshotSummary
newSnapshotSummary :: SnapshotSummary
newSnapshotSummary =
SnapshotSummary'
{ $sel:created:SnapshotSummary' :: Maybe ISO8601
created = forall a. Maybe a
Prelude.Nothing,
$sel:description:SnapshotSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:id:SnapshotSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdated:SnapshotSummary' :: Maybe ISO8601
lastUpdated = forall a. Maybe a
Prelude.Nothing
}
snapshotSummary_created :: Lens.Lens' SnapshotSummary (Prelude.Maybe Prelude.UTCTime)
snapshotSummary_created :: Lens' SnapshotSummary (Maybe UTCTime)
snapshotSummary_created = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotSummary' {Maybe ISO8601
created :: Maybe ISO8601
$sel:created:SnapshotSummary' :: SnapshotSummary -> Maybe ISO8601
created} -> Maybe ISO8601
created) (\s :: SnapshotSummary
s@SnapshotSummary' {} Maybe ISO8601
a -> SnapshotSummary
s {$sel:created:SnapshotSummary' :: Maybe ISO8601
created = Maybe ISO8601
a} :: SnapshotSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
snapshotSummary_description :: Lens.Lens' SnapshotSummary (Prelude.Maybe Prelude.Text)
snapshotSummary_description :: Lens' SnapshotSummary (Maybe Text)
snapshotSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotSummary' {Maybe Text
description :: Maybe Text
$sel:description:SnapshotSummary' :: SnapshotSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: SnapshotSummary
s@SnapshotSummary' {} Maybe Text
a -> SnapshotSummary
s {$sel:description:SnapshotSummary' :: Maybe Text
description = Maybe Text
a} :: SnapshotSummary)
snapshotSummary_id :: Lens.Lens' SnapshotSummary (Prelude.Maybe Prelude.Text)
snapshotSummary_id :: Lens' SnapshotSummary (Maybe Text)
snapshotSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotSummary' {Maybe Text
id :: Maybe Text
$sel:id:SnapshotSummary' :: SnapshotSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: SnapshotSummary
s@SnapshotSummary' {} Maybe Text
a -> SnapshotSummary
s {$sel:id:SnapshotSummary' :: Maybe Text
id = Maybe Text
a} :: SnapshotSummary)
snapshotSummary_lastUpdated :: Lens.Lens' SnapshotSummary (Prelude.Maybe Prelude.UTCTime)
snapshotSummary_lastUpdated :: Lens' SnapshotSummary (Maybe UTCTime)
snapshotSummary_lastUpdated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotSummary' {Maybe ISO8601
lastUpdated :: Maybe ISO8601
$sel:lastUpdated:SnapshotSummary' :: SnapshotSummary -> Maybe ISO8601
lastUpdated} -> Maybe ISO8601
lastUpdated) (\s :: SnapshotSummary
s@SnapshotSummary' {} Maybe ISO8601
a -> SnapshotSummary
s {$sel:lastUpdated:SnapshotSummary' :: Maybe ISO8601
lastUpdated = Maybe ISO8601
a} :: SnapshotSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON SnapshotSummary where
parseJSON :: Value -> Parser SnapshotSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SnapshotSummary"
( \Object
x ->
Maybe ISO8601
-> Maybe Text -> Maybe Text -> Maybe ISO8601 -> SnapshotSummary
SnapshotSummary'
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
"Created")
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
"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
"Id")
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
"LastUpdated")
)
instance Prelude.Hashable SnapshotSummary where
hashWithSalt :: Int -> SnapshotSummary -> Int
hashWithSalt Int
_salt SnapshotSummary' {Maybe Text
Maybe ISO8601
lastUpdated :: Maybe ISO8601
id :: Maybe Text
description :: Maybe Text
created :: Maybe ISO8601
$sel:lastUpdated:SnapshotSummary' :: SnapshotSummary -> Maybe ISO8601
$sel:id:SnapshotSummary' :: SnapshotSummary -> Maybe Text
$sel:description:SnapshotSummary' :: SnapshotSummary -> Maybe Text
$sel:created:SnapshotSummary' :: SnapshotSummary -> Maybe ISO8601
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
created
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
lastUpdated
instance Prelude.NFData SnapshotSummary where
rnf :: SnapshotSummary -> ()
rnf SnapshotSummary' {Maybe Text
Maybe ISO8601
lastUpdated :: Maybe ISO8601
id :: Maybe Text
description :: Maybe Text
created :: Maybe ISO8601
$sel:lastUpdated:SnapshotSummary' :: SnapshotSummary -> Maybe ISO8601
$sel:id:SnapshotSummary' :: SnapshotSummary -> Maybe Text
$sel:description:SnapshotSummary' :: SnapshotSummary -> Maybe Text
$sel:created:SnapshotSummary' :: SnapshotSummary -> Maybe ISO8601
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
created
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
lastUpdated