{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoTSiteWise.Types.AssociatedAssetsSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoTSiteWise.Types.AssociatedAssetsSummary where

import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.Types.AssetHierarchy
import Amazonka.IoTSiteWise.Types.AssetStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains a summary of an associated asset.
--
-- /See:/ 'newAssociatedAssetsSummary' smart constructor.
data AssociatedAssetsSummary = AssociatedAssetsSummary'
  { -- | The ID of the asset.
    AssociatedAssetsSummary -> Text
id :: Prelude.Text,
    -- | The
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
    -- of the asset, which has the following format.
    --
    -- @arn:${Partition}:iotsitewise:${Region}:${Account}:asset\/${AssetId}@
    AssociatedAssetsSummary -> Text
arn :: Prelude.Text,
    -- | The name of the asset.
    AssociatedAssetsSummary -> Text
name :: Prelude.Text,
    -- | The ID of the asset model used to create the asset.
    AssociatedAssetsSummary -> Text
assetModelId :: Prelude.Text,
    -- | The date the asset was created, in Unix epoch time.
    AssociatedAssetsSummary -> POSIX
creationDate :: Core.POSIX,
    -- | The date the asset was last updated, in Unix epoch time.
    AssociatedAssetsSummary -> POSIX
lastUpdateDate :: Core.POSIX,
    -- | The current status of the asset.
    AssociatedAssetsSummary -> AssetStatus
status :: AssetStatus,
    -- | A list of asset hierarchies that each contain a @hierarchyId@. A
    -- hierarchy specifies allowed parent\/child asset relationships.
    AssociatedAssetsSummary -> [AssetHierarchy]
hierarchies :: [AssetHierarchy]
  }
  deriving (AssociatedAssetsSummary -> AssociatedAssetsSummary -> Bool
(AssociatedAssetsSummary -> AssociatedAssetsSummary -> Bool)
-> (AssociatedAssetsSummary -> AssociatedAssetsSummary -> Bool)
-> Eq AssociatedAssetsSummary
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]
(Int -> ReadS AssociatedAssetsSummary)
-> ReadS [AssociatedAssetsSummary]
-> ReadPrec AssociatedAssetsSummary
-> ReadPrec [AssociatedAssetsSummary]
-> Read 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
(Int -> AssociatedAssetsSummary -> ShowS)
-> (AssociatedAssetsSummary -> String)
-> ([AssociatedAssetsSummary] -> ShowS)
-> Show AssociatedAssetsSummary
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.
 AssociatedAssetsSummary -> Rep AssociatedAssetsSummary x)
-> (forall x.
    Rep AssociatedAssetsSummary x -> AssociatedAssetsSummary)
-> Generic AssociatedAssetsSummary
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)

-- |
-- Create a value of 'AssociatedAssetsSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'id', 'associatedAssetsSummary_id' - The ID of the asset.
--
-- 'arn', 'associatedAssetsSummary_arn' - The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the asset, which has the following format.
--
-- @arn:${Partition}:iotsitewise:${Region}:${Account}:asset\/${AssetId}@
--
-- 'name', 'associatedAssetsSummary_name' - The name of the asset.
--
-- 'assetModelId', 'associatedAssetsSummary_assetModelId' - The ID of the asset model used to create the asset.
--
-- 'creationDate', 'associatedAssetsSummary_creationDate' - The date the asset was created, in Unix epoch time.
--
-- 'lastUpdateDate', 'associatedAssetsSummary_lastUpdateDate' - The date the asset was last updated, in Unix epoch time.
--
-- 'status', 'associatedAssetsSummary_status' - The current status of the asset.
--
-- 'hierarchies', 'associatedAssetsSummary_hierarchies' - A list of asset hierarchies that each contain a @hierarchyId@. A
-- hierarchy specifies allowed parent\/child asset relationships.
newAssociatedAssetsSummary ::
  -- | 'id'
  Prelude.Text ->
  -- | 'arn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'assetModelId'
  Prelude.Text ->
  -- | 'creationDate'
  Prelude.UTCTime ->
  -- | 'lastUpdateDate'
  Prelude.UTCTime ->
  -- | 'status'
  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' :: Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> AssetStatus
-> [AssetHierarchy]
-> AssociatedAssetsSummary
AssociatedAssetsSummary'
      { $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 = 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:AssociatedAssetsSummary' :: 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:AssociatedAssetsSummary' :: AssetStatus
status = AssetStatus
pStatus_,
        $sel:hierarchies:AssociatedAssetsSummary' :: [AssetHierarchy]
hierarchies = [AssetHierarchy]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The ID of the asset.
associatedAssetsSummary_id :: Lens.Lens' AssociatedAssetsSummary Prelude.Text
associatedAssetsSummary_id :: (Text -> f Text)
-> AssociatedAssetsSummary -> f AssociatedAssetsSummary
associatedAssetsSummary_id = (AssociatedAssetsSummary -> Text)
-> (AssociatedAssetsSummary -> Text -> AssociatedAssetsSummary)
-> Lens AssociatedAssetsSummary AssociatedAssetsSummary Text Text
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)

-- | The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the asset, which has the following format.
--
-- @arn:${Partition}:iotsitewise:${Region}:${Account}:asset\/${AssetId}@
associatedAssetsSummary_arn :: Lens.Lens' AssociatedAssetsSummary Prelude.Text
associatedAssetsSummary_arn :: (Text -> f Text)
-> AssociatedAssetsSummary -> f AssociatedAssetsSummary
associatedAssetsSummary_arn = (AssociatedAssetsSummary -> Text)
-> (AssociatedAssetsSummary -> Text -> AssociatedAssetsSummary)
-> Lens AssociatedAssetsSummary AssociatedAssetsSummary Text Text
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)

-- | The name of the asset.
associatedAssetsSummary_name :: Lens.Lens' AssociatedAssetsSummary Prelude.Text
associatedAssetsSummary_name :: (Text -> f Text)
-> AssociatedAssetsSummary -> f AssociatedAssetsSummary
associatedAssetsSummary_name = (AssociatedAssetsSummary -> Text)
-> (AssociatedAssetsSummary -> Text -> AssociatedAssetsSummary)
-> Lens AssociatedAssetsSummary AssociatedAssetsSummary Text Text
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)

-- | The ID of the asset model used to create the asset.
associatedAssetsSummary_assetModelId :: Lens.Lens' AssociatedAssetsSummary Prelude.Text
associatedAssetsSummary_assetModelId :: (Text -> f Text)
-> AssociatedAssetsSummary -> f AssociatedAssetsSummary
associatedAssetsSummary_assetModelId = (AssociatedAssetsSummary -> Text)
-> (AssociatedAssetsSummary -> Text -> AssociatedAssetsSummary)
-> Lens AssociatedAssetsSummary AssociatedAssetsSummary Text Text
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)

-- | The date the asset was created, in Unix epoch time.
associatedAssetsSummary_creationDate :: Lens.Lens' AssociatedAssetsSummary Prelude.UTCTime
associatedAssetsSummary_creationDate :: (UTCTime -> f UTCTime)
-> AssociatedAssetsSummary -> f AssociatedAssetsSummary
associatedAssetsSummary_creationDate = (AssociatedAssetsSummary -> POSIX)
-> (AssociatedAssetsSummary -> POSIX -> AssociatedAssetsSummary)
-> Lens AssociatedAssetsSummary AssociatedAssetsSummary POSIX POSIX
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) ((POSIX -> f POSIX)
 -> AssociatedAssetsSummary -> f AssociatedAssetsSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> AssociatedAssetsSummary
-> f AssociatedAssetsSummary
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

-- | The date the asset was last updated, in Unix epoch time.
associatedAssetsSummary_lastUpdateDate :: Lens.Lens' AssociatedAssetsSummary Prelude.UTCTime
associatedAssetsSummary_lastUpdateDate :: (UTCTime -> f UTCTime)
-> AssociatedAssetsSummary -> f AssociatedAssetsSummary
associatedAssetsSummary_lastUpdateDate = (AssociatedAssetsSummary -> POSIX)
-> (AssociatedAssetsSummary -> POSIX -> AssociatedAssetsSummary)
-> Lens AssociatedAssetsSummary AssociatedAssetsSummary POSIX POSIX
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) ((POSIX -> f POSIX)
 -> AssociatedAssetsSummary -> f AssociatedAssetsSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> AssociatedAssetsSummary
-> f AssociatedAssetsSummary
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

-- | The current status of the asset.
associatedAssetsSummary_status :: Lens.Lens' AssociatedAssetsSummary AssetStatus
associatedAssetsSummary_status :: (AssetStatus -> f AssetStatus)
-> AssociatedAssetsSummary -> f AssociatedAssetsSummary
associatedAssetsSummary_status = (AssociatedAssetsSummary -> AssetStatus)
-> (AssociatedAssetsSummary
    -> AssetStatus -> AssociatedAssetsSummary)
-> Lens
     AssociatedAssetsSummary
     AssociatedAssetsSummary
     AssetStatus
     AssetStatus
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)

-- | A list of asset hierarchies that each contain a @hierarchyId@. A
-- hierarchy specifies allowed parent\/child asset relationships.
associatedAssetsSummary_hierarchies :: Lens.Lens' AssociatedAssetsSummary [AssetHierarchy]
associatedAssetsSummary_hierarchies :: ([AssetHierarchy] -> f [AssetHierarchy])
-> AssociatedAssetsSummary -> f AssociatedAssetsSummary
associatedAssetsSummary_hierarchies = (AssociatedAssetsSummary -> [AssetHierarchy])
-> (AssociatedAssetsSummary
    -> [AssetHierarchy] -> AssociatedAssetsSummary)
-> Lens
     AssociatedAssetsSummary
     AssociatedAssetsSummary
     [AssetHierarchy]
     [AssetHierarchy]
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) (([AssetHierarchy] -> f [AssetHierarchy])
 -> AssociatedAssetsSummary -> f AssociatedAssetsSummary)
-> (([AssetHierarchy] -> f [AssetHierarchy])
    -> [AssetHierarchy] -> f [AssetHierarchy])
-> ([AssetHierarchy] -> f [AssetHierarchy])
-> AssociatedAssetsSummary
-> f AssociatedAssetsSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AssetHierarchy] -> f [AssetHierarchy])
-> [AssetHierarchy] -> f [AssetHierarchy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON AssociatedAssetsSummary where
  parseJSON :: Value -> Parser AssociatedAssetsSummary
parseJSON =
    String
-> (Object -> Parser AssociatedAssetsSummary)
-> Value
-> Parser AssociatedAssetsSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AssociatedAssetsSummary"
      ( \Object
x ->
          Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> AssetStatus
-> [AssetHierarchy]
-> AssociatedAssetsSummary
AssociatedAssetsSummary'
            (Text
 -> Text
 -> Text
 -> Text
 -> POSIX
 -> POSIX
 -> AssetStatus
 -> [AssetHierarchy]
 -> AssociatedAssetsSummary)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> AssetStatus
      -> [AssetHierarchy]
      -> AssociatedAssetsSummary)
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
   -> AssetStatus
   -> [AssetHierarchy]
   -> AssociatedAssetsSummary)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> POSIX
      -> POSIX
      -> AssetStatus
      -> [AssetHierarchy]
      -> AssociatedAssetsSummary)
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
   -> AssetStatus
   -> [AssetHierarchy]
   -> AssociatedAssetsSummary)
-> Parser Text
-> Parser
     (Text
      -> POSIX
      -> POSIX
      -> AssetStatus
      -> [AssetHierarchy]
      -> AssociatedAssetsSummary)
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
   -> AssetStatus
   -> [AssetHierarchy]
   -> AssociatedAssetsSummary)
-> Parser Text
-> Parser
     (POSIX
      -> POSIX
      -> AssetStatus
      -> [AssetHierarchy]
      -> AssociatedAssetsSummary)
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
"assetModelId")
            Parser
  (POSIX
   -> POSIX
   -> AssetStatus
   -> [AssetHierarchy]
   -> AssociatedAssetsSummary)
-> Parser POSIX
-> Parser
     (POSIX
      -> AssetStatus -> [AssetHierarchy] -> AssociatedAssetsSummary)
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
   -> AssetStatus -> [AssetHierarchy] -> AssociatedAssetsSummary)
-> Parser POSIX
-> Parser
     (AssetStatus -> [AssetHierarchy] -> AssociatedAssetsSummary)
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 (AssetStatus -> [AssetHierarchy] -> AssociatedAssetsSummary)
-> Parser AssetStatus
-> Parser ([AssetHierarchy] -> AssociatedAssetsSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AssetStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
            Parser ([AssetHierarchy] -> AssociatedAssetsSummary)
-> Parser [AssetHierarchy] -> Parser AssociatedAssetsSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [AssetHierarchy])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hierarchies" Parser (Maybe [AssetHierarchy])
-> [AssetHierarchy] -> Parser [AssetHierarchy]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [AssetHierarchy]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable AssociatedAssetsSummary

instance Prelude.NFData AssociatedAssetsSummary