{-# 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.IotTwinMaker.Types.WorkspaceSummary -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.IotTwinMaker.Types.WorkspaceSummary 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 -- | An object that contains information about a workspace. -- -- /See:/ 'newWorkspaceSummary' smart constructor. data WorkspaceSummary = WorkspaceSummary' { -- | The description of the workspace. description :: Prelude.Maybe Prelude.Text, -- | The ID of the workspace. workspaceId :: Prelude.Text, -- | The ARN of the workspace. arn :: Prelude.Text, -- | The date and time when the workspace was created. creationDateTime :: Data.POSIX, -- | The date and time when the workspace was last updated. updateDateTime :: Data.POSIX } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'WorkspaceSummary' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'description', 'workspaceSummary_description' - The description of the workspace. -- -- 'workspaceId', 'workspaceSummary_workspaceId' - The ID of the workspace. -- -- 'arn', 'workspaceSummary_arn' - The ARN of the workspace. -- -- 'creationDateTime', 'workspaceSummary_creationDateTime' - The date and time when the workspace was created. -- -- 'updateDateTime', 'workspaceSummary_updateDateTime' - The date and time when the workspace was last updated. newWorkspaceSummary :: -- | 'workspaceId' Prelude.Text -> -- | 'arn' Prelude.Text -> -- | 'creationDateTime' Prelude.UTCTime -> -- | 'updateDateTime' Prelude.UTCTime -> WorkspaceSummary newWorkspaceSummary pWorkspaceId_ pArn_ pCreationDateTime_ pUpdateDateTime_ = WorkspaceSummary' { description = Prelude.Nothing, workspaceId = pWorkspaceId_, arn = pArn_, creationDateTime = Data._Time Lens.# pCreationDateTime_, updateDateTime = Data._Time Lens.# pUpdateDateTime_ } -- | The description of the workspace. workspaceSummary_description :: Lens.Lens' WorkspaceSummary (Prelude.Maybe Prelude.Text) workspaceSummary_description = Lens.lens (\WorkspaceSummary' {description} -> description) (\s@WorkspaceSummary' {} a -> s {description = a} :: WorkspaceSummary) -- | The ID of the workspace. workspaceSummary_workspaceId :: Lens.Lens' WorkspaceSummary Prelude.Text workspaceSummary_workspaceId = Lens.lens (\WorkspaceSummary' {workspaceId} -> workspaceId) (\s@WorkspaceSummary' {} a -> s {workspaceId = a} :: WorkspaceSummary) -- | The ARN of the workspace. workspaceSummary_arn :: Lens.Lens' WorkspaceSummary Prelude.Text workspaceSummary_arn = Lens.lens (\WorkspaceSummary' {arn} -> arn) (\s@WorkspaceSummary' {} a -> s {arn = a} :: WorkspaceSummary) -- | The date and time when the workspace was created. workspaceSummary_creationDateTime :: Lens.Lens' WorkspaceSummary Prelude.UTCTime workspaceSummary_creationDateTime = Lens.lens (\WorkspaceSummary' {creationDateTime} -> creationDateTime) (\s@WorkspaceSummary' {} a -> s {creationDateTime = a} :: WorkspaceSummary) Prelude.. Data._Time -- | The date and time when the workspace was last updated. workspaceSummary_updateDateTime :: Lens.Lens' WorkspaceSummary Prelude.UTCTime workspaceSummary_updateDateTime = Lens.lens (\WorkspaceSummary' {updateDateTime} -> updateDateTime) (\s@WorkspaceSummary' {} a -> s {updateDateTime = a} :: WorkspaceSummary) Prelude.. Data._Time instance Data.FromJSON WorkspaceSummary where parseJSON = Data.withObject "WorkspaceSummary" ( \x -> WorkspaceSummary' Prelude.<$> (x Data..:? "description") Prelude.<*> (x Data..: "workspaceId") Prelude.<*> (x Data..: "arn") Prelude.<*> (x Data..: "creationDateTime") Prelude.<*> (x Data..: "updateDateTime") ) instance Prelude.Hashable WorkspaceSummary where hashWithSalt _salt WorkspaceSummary' {..} = _salt `Prelude.hashWithSalt` description `Prelude.hashWithSalt` workspaceId `Prelude.hashWithSalt` arn `Prelude.hashWithSalt` creationDateTime `Prelude.hashWithSalt` updateDateTime instance Prelude.NFData WorkspaceSummary where rnf WorkspaceSummary' {..} = Prelude.rnf description `Prelude.seq` Prelude.rnf workspaceId `Prelude.seq` Prelude.rnf arn `Prelude.seq` Prelude.rnf creationDateTime `Prelude.seq` Prelude.rnf updateDateTime