{-# 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.IotTwinMaker.Types.SceneSummary 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 SceneSummary = SceneSummary'
{
SceneSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
SceneSummary -> Text
sceneId :: Prelude.Text,
SceneSummary -> Text
contentLocation :: Prelude.Text,
SceneSummary -> Text
arn :: Prelude.Text,
SceneSummary -> POSIX
creationDateTime :: Data.POSIX,
SceneSummary -> POSIX
updateDateTime :: Data.POSIX
}
deriving (SceneSummary -> SceneSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SceneSummary -> SceneSummary -> Bool
$c/= :: SceneSummary -> SceneSummary -> Bool
== :: SceneSummary -> SceneSummary -> Bool
$c== :: SceneSummary -> SceneSummary -> Bool
Prelude.Eq, ReadPrec [SceneSummary]
ReadPrec SceneSummary
Int -> ReadS SceneSummary
ReadS [SceneSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SceneSummary]
$creadListPrec :: ReadPrec [SceneSummary]
readPrec :: ReadPrec SceneSummary
$creadPrec :: ReadPrec SceneSummary
readList :: ReadS [SceneSummary]
$creadList :: ReadS [SceneSummary]
readsPrec :: Int -> ReadS SceneSummary
$creadsPrec :: Int -> ReadS SceneSummary
Prelude.Read, Int -> SceneSummary -> ShowS
[SceneSummary] -> ShowS
SceneSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SceneSummary] -> ShowS
$cshowList :: [SceneSummary] -> ShowS
show :: SceneSummary -> String
$cshow :: SceneSummary -> String
showsPrec :: Int -> SceneSummary -> ShowS
$cshowsPrec :: Int -> SceneSummary -> ShowS
Prelude.Show, forall x. Rep SceneSummary x -> SceneSummary
forall x. SceneSummary -> Rep SceneSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SceneSummary x -> SceneSummary
$cfrom :: forall x. SceneSummary -> Rep SceneSummary x
Prelude.Generic)
newSceneSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
SceneSummary
newSceneSummary :: Text -> Text -> Text -> UTCTime -> UTCTime -> SceneSummary
newSceneSummary
Text
pSceneId_
Text
pContentLocation_
Text
pArn_
UTCTime
pCreationDateTime_
UTCTime
pUpdateDateTime_ =
SceneSummary'
{ $sel:description:SceneSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:sceneId:SceneSummary' :: Text
sceneId = Text
pSceneId_,
$sel:contentLocation:SceneSummary' :: Text
contentLocation = Text
pContentLocation_,
$sel:arn:SceneSummary' :: Text
arn = Text
pArn_,
$sel:creationDateTime:SceneSummary' :: POSIX
creationDateTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDateTime_,
$sel:updateDateTime:SceneSummary' :: POSIX
updateDateTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateDateTime_
}
sceneSummary_description :: Lens.Lens' SceneSummary (Prelude.Maybe Prelude.Text)
sceneSummary_description :: Lens' SceneSummary (Maybe Text)
sceneSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SceneSummary' {Maybe Text
description :: Maybe Text
$sel:description:SceneSummary' :: SceneSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: SceneSummary
s@SceneSummary' {} Maybe Text
a -> SceneSummary
s {$sel:description:SceneSummary' :: Maybe Text
description = Maybe Text
a} :: SceneSummary)
sceneSummary_sceneId :: Lens.Lens' SceneSummary Prelude.Text
sceneSummary_sceneId :: Lens' SceneSummary Text
sceneSummary_sceneId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SceneSummary' {Text
sceneId :: Text
$sel:sceneId:SceneSummary' :: SceneSummary -> Text
sceneId} -> Text
sceneId) (\s :: SceneSummary
s@SceneSummary' {} Text
a -> SceneSummary
s {$sel:sceneId:SceneSummary' :: Text
sceneId = Text
a} :: SceneSummary)
sceneSummary_contentLocation :: Lens.Lens' SceneSummary Prelude.Text
sceneSummary_contentLocation :: Lens' SceneSummary Text
sceneSummary_contentLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SceneSummary' {Text
contentLocation :: Text
$sel:contentLocation:SceneSummary' :: SceneSummary -> Text
contentLocation} -> Text
contentLocation) (\s :: SceneSummary
s@SceneSummary' {} Text
a -> SceneSummary
s {$sel:contentLocation:SceneSummary' :: Text
contentLocation = Text
a} :: SceneSummary)
sceneSummary_arn :: Lens.Lens' SceneSummary Prelude.Text
sceneSummary_arn :: Lens' SceneSummary Text
sceneSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SceneSummary' {Text
arn :: Text
$sel:arn:SceneSummary' :: SceneSummary -> Text
arn} -> Text
arn) (\s :: SceneSummary
s@SceneSummary' {} Text
a -> SceneSummary
s {$sel:arn:SceneSummary' :: Text
arn = Text
a} :: SceneSummary)
sceneSummary_creationDateTime :: Lens.Lens' SceneSummary Prelude.UTCTime
sceneSummary_creationDateTime :: Lens' SceneSummary UTCTime
sceneSummary_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SceneSummary' {POSIX
creationDateTime :: POSIX
$sel:creationDateTime:SceneSummary' :: SceneSummary -> POSIX
creationDateTime} -> POSIX
creationDateTime) (\s :: SceneSummary
s@SceneSummary' {} POSIX
a -> SceneSummary
s {$sel:creationDateTime:SceneSummary' :: POSIX
creationDateTime = POSIX
a} :: SceneSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
sceneSummary_updateDateTime :: Lens.Lens' SceneSummary Prelude.UTCTime
sceneSummary_updateDateTime :: Lens' SceneSummary UTCTime
sceneSummary_updateDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SceneSummary' {POSIX
updateDateTime :: POSIX
$sel:updateDateTime:SceneSummary' :: SceneSummary -> POSIX
updateDateTime} -> POSIX
updateDateTime) (\s :: SceneSummary
s@SceneSummary' {} POSIX
a -> SceneSummary
s {$sel:updateDateTime:SceneSummary' :: POSIX
updateDateTime = POSIX
a} :: SceneSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON SceneSummary where
parseJSON :: Value -> Parser SceneSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SceneSummary"
( \Object
x ->
Maybe Text
-> Text -> Text -> Text -> POSIX -> POSIX -> SceneSummary
SceneSummary'
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 a
Data..: Key
"sceneId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"contentLocation")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"creationDateTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"updateDateTime")
)
instance Prelude.Hashable SceneSummary where
hashWithSalt :: Int -> SceneSummary -> Int
hashWithSalt Int
_salt SceneSummary' {Maybe Text
Text
POSIX
updateDateTime :: POSIX
creationDateTime :: POSIX
arn :: Text
contentLocation :: Text
sceneId :: Text
description :: Maybe Text
$sel:updateDateTime:SceneSummary' :: SceneSummary -> POSIX
$sel:creationDateTime:SceneSummary' :: SceneSummary -> POSIX
$sel:arn:SceneSummary' :: SceneSummary -> Text
$sel:contentLocation:SceneSummary' :: SceneSummary -> Text
$sel:sceneId:SceneSummary' :: SceneSummary -> Text
$sel:description:SceneSummary' :: SceneSummary -> 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` Text
sceneId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
contentLocation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
updateDateTime
instance Prelude.NFData SceneSummary where
rnf :: SceneSummary -> ()
rnf SceneSummary' {Maybe Text
Text
POSIX
updateDateTime :: POSIX
creationDateTime :: POSIX
arn :: Text
contentLocation :: Text
sceneId :: Text
description :: Maybe Text
$sel:updateDateTime:SceneSummary' :: SceneSummary -> POSIX
$sel:creationDateTime:SceneSummary' :: SceneSummary -> POSIX
$sel:arn:SceneSummary' :: SceneSummary -> Text
$sel:contentLocation:SceneSummary' :: SceneSummary -> Text
$sel:sceneId:SceneSummary' :: SceneSummary -> Text
$sel:description:SceneSummary' :: SceneSummary -> 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 Text
sceneId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
contentLocation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
updateDateTime