{-# 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.AssociatedAssetsSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTSiteWise.Types.AssetHierarchy
import Amazonka.IoTSiteWise.Types.AssetStatus
import qualified Amazonka.Prelude as Prelude
data AssociatedAssetsSummary = AssociatedAssetsSummary'
{
AssociatedAssetsSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
AssociatedAssetsSummary -> Text
id :: Prelude.Text,
AssociatedAssetsSummary -> Text
arn :: Prelude.Text,
AssociatedAssetsSummary -> Text
name :: Prelude.Text,
AssociatedAssetsSummary -> Text
assetModelId :: Prelude.Text,
AssociatedAssetsSummary -> POSIX
creationDate :: Data.POSIX,
AssociatedAssetsSummary -> POSIX
lastUpdateDate :: Data.POSIX,
AssociatedAssetsSummary -> AssetStatus
status :: AssetStatus,
AssociatedAssetsSummary -> [AssetHierarchy]
hierarchies :: [AssetHierarchy]
}
deriving (AssociatedAssetsSummary -> AssociatedAssetsSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociatedAssetsSummary -> AssociatedAssetsSummary -> Bool
$c/= :: AssociatedAssetsSummary -> AssociatedAssetsSummary -> Bool
== :: AssociatedAssetsSummary -> AssociatedAssetsSummary -> Bool
$c== :: AssociatedAssetsSummary -> AssociatedAssetsSummary -> Bool
Prelude.Eq, ReadPrec [AssociatedAssetsSummary]
ReadPrec AssociatedAssetsSummary
Int -> ReadS AssociatedAssetsSummary
ReadS [AssociatedAssetsSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociatedAssetsSummary]
$creadListPrec :: ReadPrec [AssociatedAssetsSummary]
readPrec :: ReadPrec AssociatedAssetsSummary
$creadPrec :: ReadPrec AssociatedAssetsSummary
readList :: ReadS [AssociatedAssetsSummary]
$creadList :: ReadS [AssociatedAssetsSummary]
readsPrec :: Int -> ReadS AssociatedAssetsSummary
$creadsPrec :: Int -> ReadS AssociatedAssetsSummary
Prelude.Read, Int -> AssociatedAssetsSummary -> ShowS
[AssociatedAssetsSummary] -> ShowS
AssociatedAssetsSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociatedAssetsSummary] -> ShowS
$cshowList :: [AssociatedAssetsSummary] -> ShowS
show :: AssociatedAssetsSummary -> String
$cshow :: AssociatedAssetsSummary -> String
showsPrec :: Int -> AssociatedAssetsSummary -> ShowS
$cshowsPrec :: Int -> AssociatedAssetsSummary -> ShowS
Prelude.Show, forall x. Rep AssociatedAssetsSummary x -> AssociatedAssetsSummary
forall x. AssociatedAssetsSummary -> Rep AssociatedAssetsSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssociatedAssetsSummary x -> AssociatedAssetsSummary
$cfrom :: forall x. AssociatedAssetsSummary -> Rep AssociatedAssetsSummary x
Prelude.Generic)
newAssociatedAssetsSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
AssetStatus ->
AssociatedAssetsSummary
newAssociatedAssetsSummary :: Text
-> Text
-> Text
-> Text
-> UTCTime
-> UTCTime
-> AssetStatus
-> AssociatedAssetsSummary
newAssociatedAssetsSummary
Text
pId_
Text
pArn_
Text
pName_
Text
pAssetModelId_
UTCTime
pCreationDate_
UTCTime
pLastUpdateDate_
AssetStatus
pStatus_ =
AssociatedAssetsSummary'
{ $sel:description:AssociatedAssetsSummary' :: Maybe Text
description =
forall a. Maybe a
Prelude.Nothing,
$sel:id:AssociatedAssetsSummary' :: Text
id = Text
pId_,
$sel:arn:AssociatedAssetsSummary' :: Text
arn = Text
pArn_,
$sel:name:AssociatedAssetsSummary' :: Text
name = Text
pName_,
$sel:assetModelId:AssociatedAssetsSummary' :: Text
assetModelId = Text
pAssetModelId_,
$sel:creationDate:AssociatedAssetsSummary' :: POSIX
creationDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDate_,
$sel:lastUpdateDate:AssociatedAssetsSummary' :: POSIX
lastUpdateDate =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdateDate_,
$sel:status:AssociatedAssetsSummary' :: AssetStatus
status = AssetStatus
pStatus_,
$sel:hierarchies:AssociatedAssetsSummary' :: [AssetHierarchy]
hierarchies = forall a. Monoid a => a
Prelude.mempty
}
associatedAssetsSummary_description :: Lens.Lens' AssociatedAssetsSummary (Prelude.Maybe Prelude.Text)
associatedAssetsSummary_description :: Lens' AssociatedAssetsSummary (Maybe Text)
associatedAssetsSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedAssetsSummary' {Maybe Text
description :: Maybe Text
$sel:description:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: AssociatedAssetsSummary
s@AssociatedAssetsSummary' {} Maybe Text
a -> AssociatedAssetsSummary
s {$sel:description:AssociatedAssetsSummary' :: Maybe Text
description = Maybe Text
a} :: AssociatedAssetsSummary)
associatedAssetsSummary_id :: Lens.Lens' AssociatedAssetsSummary Prelude.Text
associatedAssetsSummary_id :: Lens' AssociatedAssetsSummary Text
associatedAssetsSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedAssetsSummary' {Text
id :: Text
$sel:id:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
id} -> Text
id) (\s :: AssociatedAssetsSummary
s@AssociatedAssetsSummary' {} Text
a -> AssociatedAssetsSummary
s {$sel:id:AssociatedAssetsSummary' :: Text
id = Text
a} :: AssociatedAssetsSummary)
associatedAssetsSummary_arn :: Lens.Lens' AssociatedAssetsSummary Prelude.Text
associatedAssetsSummary_arn :: Lens' AssociatedAssetsSummary Text
associatedAssetsSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedAssetsSummary' {Text
arn :: Text
$sel:arn:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
arn} -> Text
arn) (\s :: AssociatedAssetsSummary
s@AssociatedAssetsSummary' {} Text
a -> AssociatedAssetsSummary
s {$sel:arn:AssociatedAssetsSummary' :: Text
arn = Text
a} :: AssociatedAssetsSummary)
associatedAssetsSummary_name :: Lens.Lens' AssociatedAssetsSummary Prelude.Text
associatedAssetsSummary_name :: Lens' AssociatedAssetsSummary Text
associatedAssetsSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedAssetsSummary' {Text
name :: Text
$sel:name:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
name} -> Text
name) (\s :: AssociatedAssetsSummary
s@AssociatedAssetsSummary' {} Text
a -> AssociatedAssetsSummary
s {$sel:name:AssociatedAssetsSummary' :: Text
name = Text
a} :: AssociatedAssetsSummary)
associatedAssetsSummary_assetModelId :: Lens.Lens' AssociatedAssetsSummary Prelude.Text
associatedAssetsSummary_assetModelId :: Lens' AssociatedAssetsSummary Text
associatedAssetsSummary_assetModelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedAssetsSummary' {Text
assetModelId :: Text
$sel:assetModelId:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
assetModelId} -> Text
assetModelId) (\s :: AssociatedAssetsSummary
s@AssociatedAssetsSummary' {} Text
a -> AssociatedAssetsSummary
s {$sel:assetModelId:AssociatedAssetsSummary' :: Text
assetModelId = Text
a} :: AssociatedAssetsSummary)
associatedAssetsSummary_creationDate :: Lens.Lens' AssociatedAssetsSummary Prelude.UTCTime
associatedAssetsSummary_creationDate :: Lens' AssociatedAssetsSummary UTCTime
associatedAssetsSummary_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedAssetsSummary' {POSIX
creationDate :: POSIX
$sel:creationDate:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> POSIX
creationDate} -> POSIX
creationDate) (\s :: AssociatedAssetsSummary
s@AssociatedAssetsSummary' {} POSIX
a -> AssociatedAssetsSummary
s {$sel:creationDate:AssociatedAssetsSummary' :: POSIX
creationDate = POSIX
a} :: AssociatedAssetsSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
associatedAssetsSummary_lastUpdateDate :: Lens.Lens' AssociatedAssetsSummary Prelude.UTCTime
associatedAssetsSummary_lastUpdateDate :: Lens' AssociatedAssetsSummary UTCTime
associatedAssetsSummary_lastUpdateDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedAssetsSummary' {POSIX
lastUpdateDate :: POSIX
$sel:lastUpdateDate:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> POSIX
lastUpdateDate} -> POSIX
lastUpdateDate) (\s :: AssociatedAssetsSummary
s@AssociatedAssetsSummary' {} POSIX
a -> AssociatedAssetsSummary
s {$sel:lastUpdateDate:AssociatedAssetsSummary' :: POSIX
lastUpdateDate = POSIX
a} :: AssociatedAssetsSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
associatedAssetsSummary_status :: Lens.Lens' AssociatedAssetsSummary AssetStatus
associatedAssetsSummary_status :: Lens' AssociatedAssetsSummary AssetStatus
associatedAssetsSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedAssetsSummary' {AssetStatus
status :: AssetStatus
$sel:status:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> AssetStatus
status} -> AssetStatus
status) (\s :: AssociatedAssetsSummary
s@AssociatedAssetsSummary' {} AssetStatus
a -> AssociatedAssetsSummary
s {$sel:status:AssociatedAssetsSummary' :: AssetStatus
status = AssetStatus
a} :: AssociatedAssetsSummary)
associatedAssetsSummary_hierarchies :: Lens.Lens' AssociatedAssetsSummary [AssetHierarchy]
associatedAssetsSummary_hierarchies :: Lens' AssociatedAssetsSummary [AssetHierarchy]
associatedAssetsSummary_hierarchies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedAssetsSummary' {[AssetHierarchy]
hierarchies :: [AssetHierarchy]
$sel:hierarchies:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> [AssetHierarchy]
hierarchies} -> [AssetHierarchy]
hierarchies) (\s :: AssociatedAssetsSummary
s@AssociatedAssetsSummary' {} [AssetHierarchy]
a -> AssociatedAssetsSummary
s {$sel:hierarchies:AssociatedAssetsSummary' :: [AssetHierarchy]
hierarchies = [AssetHierarchy]
a} :: AssociatedAssetsSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON AssociatedAssetsSummary where
parseJSON :: Value -> Parser AssociatedAssetsSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AssociatedAssetsSummary"
( \Object
x ->
Maybe Text
-> Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> AssetStatus
-> [AssetHierarchy]
-> AssociatedAssetsSummary
AssociatedAssetsSummary'
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
"id")
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
"name")
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
"assetModelId")
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
"creationDate")
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
"lastUpdateDate")
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
"status")
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
"hierarchies" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable AssociatedAssetsSummary where
hashWithSalt :: Int -> AssociatedAssetsSummary -> Int
hashWithSalt Int
_salt AssociatedAssetsSummary' {[AssetHierarchy]
Maybe Text
Text
POSIX
AssetStatus
hierarchies :: [AssetHierarchy]
status :: AssetStatus
lastUpdateDate :: POSIX
creationDate :: POSIX
assetModelId :: Text
name :: Text
arn :: Text
id :: Text
description :: Maybe Text
$sel:hierarchies:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> [AssetHierarchy]
$sel:status:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> AssetStatus
$sel:lastUpdateDate:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> POSIX
$sel:creationDate:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> POSIX
$sel:assetModelId:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
$sel:name:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
$sel:arn:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
$sel:id:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
$sel:description:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> 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
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
assetModelId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastUpdateDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AssetStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [AssetHierarchy]
hierarchies
instance Prelude.NFData AssociatedAssetsSummary where
rnf :: AssociatedAssetsSummary -> ()
rnf AssociatedAssetsSummary' {[AssetHierarchy]
Maybe Text
Text
POSIX
AssetStatus
hierarchies :: [AssetHierarchy]
status :: AssetStatus
lastUpdateDate :: POSIX
creationDate :: POSIX
assetModelId :: Text
name :: Text
arn :: Text
id :: Text
description :: Maybe Text
$sel:hierarchies:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> [AssetHierarchy]
$sel:status:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> AssetStatus
$sel:lastUpdateDate:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> POSIX
$sel:creationDate:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> POSIX
$sel:assetModelId:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
$sel:name:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
$sel:arn:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
$sel:id:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> Text
$sel:description:AssociatedAssetsSummary' :: AssociatedAssetsSummary -> 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
id
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 Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
assetModelId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastUpdateDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf AssetStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [AssetHierarchy]
hierarchies