{-# 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.IoTSiteWise.Types.AssetModelSummary where
import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.Types.AssetModelStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AssetModelSummary = AssetModelSummary'
{
AssetModelSummary -> Text
id :: Prelude.Text,
AssetModelSummary -> Text
arn :: Prelude.Text,
AssetModelSummary -> Text
name :: Prelude.Text,
AssetModelSummary -> Text
description :: Prelude.Text,
AssetModelSummary -> POSIX
creationDate :: Core.POSIX,
AssetModelSummary -> POSIX
lastUpdateDate :: Core.POSIX,
AssetModelSummary -> AssetModelStatus
status :: AssetModelStatus
}
deriving (AssetModelSummary -> AssetModelSummary -> Bool
(AssetModelSummary -> AssetModelSummary -> Bool)
-> (AssetModelSummary -> AssetModelSummary -> Bool)
-> Eq AssetModelSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssetModelSummary -> AssetModelSummary -> Bool
$c/= :: AssetModelSummary -> AssetModelSummary -> Bool
== :: AssetModelSummary -> AssetModelSummary -> Bool
$c== :: AssetModelSummary -> AssetModelSummary -> Bool
Prelude.Eq, ReadPrec [AssetModelSummary]
ReadPrec AssetModelSummary
Int -> ReadS AssetModelSummary
ReadS [AssetModelSummary]
(Int -> ReadS AssetModelSummary)
-> ReadS [AssetModelSummary]
-> ReadPrec AssetModelSummary
-> ReadPrec [AssetModelSummary]
-> Read AssetModelSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssetModelSummary]
$creadListPrec :: ReadPrec [AssetModelSummary]
readPrec :: ReadPrec AssetModelSummary
$creadPrec :: ReadPrec AssetModelSummary
readList :: ReadS [AssetModelSummary]
$creadList :: ReadS [AssetModelSummary]
readsPrec :: Int -> ReadS AssetModelSummary
$creadsPrec :: Int -> ReadS AssetModelSummary
Prelude.Read, Int -> AssetModelSummary -> ShowS
[AssetModelSummary] -> ShowS
AssetModelSummary -> String
(Int -> AssetModelSummary -> ShowS)
-> (AssetModelSummary -> String)
-> ([AssetModelSummary] -> ShowS)
-> Show AssetModelSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssetModelSummary] -> ShowS
$cshowList :: [AssetModelSummary] -> ShowS
show :: AssetModelSummary -> String
$cshow :: AssetModelSummary -> String
showsPrec :: Int -> AssetModelSummary -> ShowS
$cshowsPrec :: Int -> AssetModelSummary -> ShowS
Prelude.Show, (forall x. AssetModelSummary -> Rep AssetModelSummary x)
-> (forall x. Rep AssetModelSummary x -> AssetModelSummary)
-> Generic AssetModelSummary
forall x. Rep AssetModelSummary x -> AssetModelSummary
forall x. AssetModelSummary -> Rep AssetModelSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssetModelSummary x -> AssetModelSummary
$cfrom :: forall x. AssetModelSummary -> Rep AssetModelSummary x
Prelude.Generic)
newAssetModelSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
AssetModelStatus ->
AssetModelSummary
newAssetModelSummary :: Text
-> Text
-> Text
-> Text
-> UTCTime
-> UTCTime
-> AssetModelStatus
-> AssetModelSummary
newAssetModelSummary
Text
pId_
Text
pArn_
Text
pName_
Text
pDescription_
UTCTime
pCreationDate_
UTCTime
pLastUpdateDate_
AssetModelStatus
pStatus_ =
AssetModelSummary' :: Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> AssetModelStatus
-> AssetModelSummary
AssetModelSummary'
{ $sel:id:AssetModelSummary' :: Text
id = Text
pId_,
$sel:arn:AssetModelSummary' :: Text
arn = Text
pArn_,
$sel:name:AssetModelSummary' :: Text
name = Text
pName_,
$sel:description:AssetModelSummary' :: Text
description = Text
pDescription_,
$sel:creationDate:AssetModelSummary' :: POSIX
creationDate = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDate_,
$sel:lastUpdateDate:AssetModelSummary' :: POSIX
lastUpdateDate = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdateDate_,
$sel:status:AssetModelSummary' :: AssetModelStatus
status = AssetModelStatus
pStatus_
}
assetModelSummary_id :: Lens.Lens' AssetModelSummary Prelude.Text
assetModelSummary_id :: (Text -> f Text) -> AssetModelSummary -> f AssetModelSummary
assetModelSummary_id = (AssetModelSummary -> Text)
-> (AssetModelSummary -> Text -> AssetModelSummary)
-> Lens AssetModelSummary AssetModelSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetModelSummary' {Text
id :: Text
$sel:id:AssetModelSummary' :: AssetModelSummary -> Text
id} -> Text
id) (\s :: AssetModelSummary
s@AssetModelSummary' {} Text
a -> AssetModelSummary
s {$sel:id:AssetModelSummary' :: Text
id = Text
a} :: AssetModelSummary)
assetModelSummary_arn :: Lens.Lens' AssetModelSummary Prelude.Text
assetModelSummary_arn :: (Text -> f Text) -> AssetModelSummary -> f AssetModelSummary
assetModelSummary_arn = (AssetModelSummary -> Text)
-> (AssetModelSummary -> Text -> AssetModelSummary)
-> Lens AssetModelSummary AssetModelSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetModelSummary' {Text
arn :: Text
$sel:arn:AssetModelSummary' :: AssetModelSummary -> Text
arn} -> Text
arn) (\s :: AssetModelSummary
s@AssetModelSummary' {} Text
a -> AssetModelSummary
s {$sel:arn:AssetModelSummary' :: Text
arn = Text
a} :: AssetModelSummary)
assetModelSummary_name :: Lens.Lens' AssetModelSummary Prelude.Text
assetModelSummary_name :: (Text -> f Text) -> AssetModelSummary -> f AssetModelSummary
assetModelSummary_name = (AssetModelSummary -> Text)
-> (AssetModelSummary -> Text -> AssetModelSummary)
-> Lens AssetModelSummary AssetModelSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetModelSummary' {Text
name :: Text
$sel:name:AssetModelSummary' :: AssetModelSummary -> Text
name} -> Text
name) (\s :: AssetModelSummary
s@AssetModelSummary' {} Text
a -> AssetModelSummary
s {$sel:name:AssetModelSummary' :: Text
name = Text
a} :: AssetModelSummary)
assetModelSummary_description :: Lens.Lens' AssetModelSummary Prelude.Text
assetModelSummary_description :: (Text -> f Text) -> AssetModelSummary -> f AssetModelSummary
assetModelSummary_description = (AssetModelSummary -> Text)
-> (AssetModelSummary -> Text -> AssetModelSummary)
-> Lens AssetModelSummary AssetModelSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetModelSummary' {Text
description :: Text
$sel:description:AssetModelSummary' :: AssetModelSummary -> Text
description} -> Text
description) (\s :: AssetModelSummary
s@AssetModelSummary' {} Text
a -> AssetModelSummary
s {$sel:description:AssetModelSummary' :: Text
description = Text
a} :: AssetModelSummary)
assetModelSummary_creationDate :: Lens.Lens' AssetModelSummary Prelude.UTCTime
assetModelSummary_creationDate :: (UTCTime -> f UTCTime) -> AssetModelSummary -> f AssetModelSummary
assetModelSummary_creationDate = (AssetModelSummary -> POSIX)
-> (AssetModelSummary -> POSIX -> AssetModelSummary)
-> Lens AssetModelSummary AssetModelSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetModelSummary' {POSIX
creationDate :: POSIX
$sel:creationDate:AssetModelSummary' :: AssetModelSummary -> POSIX
creationDate} -> POSIX
creationDate) (\s :: AssetModelSummary
s@AssetModelSummary' {} POSIX
a -> AssetModelSummary
s {$sel:creationDate:AssetModelSummary' :: POSIX
creationDate = POSIX
a} :: AssetModelSummary) ((POSIX -> f POSIX) -> AssetModelSummary -> f AssetModelSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> AssetModelSummary
-> f AssetModelSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
assetModelSummary_lastUpdateDate :: Lens.Lens' AssetModelSummary Prelude.UTCTime
assetModelSummary_lastUpdateDate :: (UTCTime -> f UTCTime) -> AssetModelSummary -> f AssetModelSummary
assetModelSummary_lastUpdateDate = (AssetModelSummary -> POSIX)
-> (AssetModelSummary -> POSIX -> AssetModelSummary)
-> Lens AssetModelSummary AssetModelSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetModelSummary' {POSIX
lastUpdateDate :: POSIX
$sel:lastUpdateDate:AssetModelSummary' :: AssetModelSummary -> POSIX
lastUpdateDate} -> POSIX
lastUpdateDate) (\s :: AssetModelSummary
s@AssetModelSummary' {} POSIX
a -> AssetModelSummary
s {$sel:lastUpdateDate:AssetModelSummary' :: POSIX
lastUpdateDate = POSIX
a} :: AssetModelSummary) ((POSIX -> f POSIX) -> AssetModelSummary -> f AssetModelSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> AssetModelSummary
-> f AssetModelSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
assetModelSummary_status :: Lens.Lens' AssetModelSummary AssetModelStatus
assetModelSummary_status :: (AssetModelStatus -> f AssetModelStatus)
-> AssetModelSummary -> f AssetModelSummary
assetModelSummary_status = (AssetModelSummary -> AssetModelStatus)
-> (AssetModelSummary -> AssetModelStatus -> AssetModelSummary)
-> Lens
AssetModelSummary
AssetModelSummary
AssetModelStatus
AssetModelStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetModelSummary' {AssetModelStatus
status :: AssetModelStatus
$sel:status:AssetModelSummary' :: AssetModelSummary -> AssetModelStatus
status} -> AssetModelStatus
status) (\s :: AssetModelSummary
s@AssetModelSummary' {} AssetModelStatus
a -> AssetModelSummary
s {$sel:status:AssetModelSummary' :: AssetModelStatus
status = AssetModelStatus
a} :: AssetModelSummary)
instance Core.FromJSON AssetModelSummary where
parseJSON :: Value -> Parser AssetModelSummary
parseJSON =
String
-> (Object -> Parser AssetModelSummary)
-> Value
-> Parser AssetModelSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AssetModelSummary"
( \Object
x ->
Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> AssetModelStatus
-> AssetModelSummary
AssetModelSummary'
(Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> AssetModelStatus
-> AssetModelSummary)
-> Parser Text
-> Parser
(Text
-> Text
-> Text
-> POSIX
-> POSIX
-> AssetModelStatus
-> AssetModelSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"id")
Parser
(Text
-> Text
-> Text
-> POSIX
-> POSIX
-> AssetModelStatus
-> AssetModelSummary)
-> Parser Text
-> Parser
(Text
-> Text -> POSIX -> POSIX -> AssetModelStatus -> AssetModelSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"arn")
Parser
(Text
-> Text -> POSIX -> POSIX -> AssetModelStatus -> AssetModelSummary)
-> Parser Text
-> Parser
(Text -> POSIX -> POSIX -> AssetModelStatus -> AssetModelSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser
(Text -> POSIX -> POSIX -> AssetModelStatus -> AssetModelSummary)
-> Parser Text
-> Parser (POSIX -> POSIX -> AssetModelStatus -> AssetModelSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"description")
Parser (POSIX -> POSIX -> AssetModelStatus -> AssetModelSummary)
-> Parser POSIX
-> Parser (POSIX -> AssetModelStatus -> AssetModelSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"creationDate")
Parser (POSIX -> AssetModelStatus -> AssetModelSummary)
-> Parser POSIX -> Parser (AssetModelStatus -> AssetModelSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"lastUpdateDate")
Parser (AssetModelStatus -> AssetModelSummary)
-> Parser AssetModelStatus -> Parser AssetModelSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AssetModelStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
)
instance Prelude.Hashable AssetModelSummary
instance Prelude.NFData AssetModelSummary