{-# 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.WorkSpaces.Types.Snapshot -- 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.WorkSpaces.Types.Snapshot 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 -- | Describes a snapshot. -- -- /See:/ 'newSnapshot' smart constructor. data Snapshot = Snapshot' { -- | The time when the snapshot was created. snapshotTime :: Prelude.Maybe Data.POSIX } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'Snapshot' 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: -- -- 'snapshotTime', 'snapshot_snapshotTime' - The time when the snapshot was created. newSnapshot :: Snapshot newSnapshot = Snapshot' {snapshotTime = Prelude.Nothing} -- | The time when the snapshot was created. snapshot_snapshotTime :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.UTCTime) snapshot_snapshotTime = Lens.lens (\Snapshot' {snapshotTime} -> snapshotTime) (\s@Snapshot' {} a -> s {snapshotTime = a} :: Snapshot) Prelude.. Lens.mapping Data._Time instance Data.FromJSON Snapshot where parseJSON = Data.withObject "Snapshot" ( \x -> Snapshot' Prelude.<$> (x Data..:? "SnapshotTime") ) instance Prelude.Hashable Snapshot where hashWithSalt _salt Snapshot' {..} = _salt `Prelude.hashWithSalt` snapshotTime instance Prelude.NFData Snapshot where rnf Snapshot' {..} = Prelude.rnf snapshotTime