{-# 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.EC2.Types.SnapshotTierStatus
-- 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.EC2.Types.SnapshotTierStatus where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.SnapshotState
import Amazonka.EC2.Types.StorageTier
import Amazonka.EC2.Types.Tag
import Amazonka.EC2.Types.TieringOperationStatus
import qualified Amazonka.Prelude as Prelude

-- | Provides information about a snapshot\'s storage tier.
--
-- /See:/ 'newSnapshotTierStatus' smart constructor.
data SnapshotTierStatus = SnapshotTierStatus'
  { -- | The date and time when the last archive process was completed.
    SnapshotTierStatus -> Maybe ISO8601
archivalCompleteTime :: Prelude.Maybe Data.ISO8601,
    -- | The status of the last archive or restore process.
    SnapshotTierStatus -> Maybe TieringOperationStatus
lastTieringOperationStatus :: Prelude.Maybe TieringOperationStatus,
    -- | A message describing the status of the last archive or restore process.
    SnapshotTierStatus -> Maybe Text
lastTieringOperationStatusDetail :: Prelude.Maybe Prelude.Text,
    -- | The progress of the last archive or restore process, as a percentage.
    SnapshotTierStatus -> Maybe Int
lastTieringProgress :: Prelude.Maybe Prelude.Int,
    -- | The date and time when the last archive or restore process was started.
    SnapshotTierStatus -> Maybe ISO8601
lastTieringStartTime :: Prelude.Maybe Data.ISO8601,
    -- | The ID of the Amazon Web Services account that owns the snapshot.
    SnapshotTierStatus -> Maybe Text
ownerId :: Prelude.Maybe Prelude.Text,
    -- | Only for archived snapshots that are temporarily restored. Indicates the
    -- date and time when a temporarily restored snapshot will be automatically
    -- re-archived.
    SnapshotTierStatus -> Maybe ISO8601
restoreExpiryTime :: Prelude.Maybe Data.ISO8601,
    -- | The ID of the snapshot.
    SnapshotTierStatus -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text,
    -- | The state of the snapshot.
    SnapshotTierStatus -> Maybe SnapshotState
status :: Prelude.Maybe SnapshotState,
    -- | The storage tier in which the snapshot is stored. @standard@ indicates
    -- that the snapshot is stored in the standard snapshot storage tier and
    -- that it is ready for use. @archive@ indicates that the snapshot is
    -- currently archived and that it must be restored before it can be used.
    SnapshotTierStatus -> Maybe StorageTier
storageTier :: Prelude.Maybe StorageTier,
    -- | The tags that are assigned to the snapshot.
    SnapshotTierStatus -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The ID of the volume from which the snapshot was created.
    SnapshotTierStatus -> Maybe Text
volumeId :: Prelude.Maybe Prelude.Text
  }
  deriving (SnapshotTierStatus -> SnapshotTierStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SnapshotTierStatus -> SnapshotTierStatus -> Bool
$c/= :: SnapshotTierStatus -> SnapshotTierStatus -> Bool
== :: SnapshotTierStatus -> SnapshotTierStatus -> Bool
$c== :: SnapshotTierStatus -> SnapshotTierStatus -> Bool
Prelude.Eq, ReadPrec [SnapshotTierStatus]
ReadPrec SnapshotTierStatus
Int -> ReadS SnapshotTierStatus
ReadS [SnapshotTierStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SnapshotTierStatus]
$creadListPrec :: ReadPrec [SnapshotTierStatus]
readPrec :: ReadPrec SnapshotTierStatus
$creadPrec :: ReadPrec SnapshotTierStatus
readList :: ReadS [SnapshotTierStatus]
$creadList :: ReadS [SnapshotTierStatus]
readsPrec :: Int -> ReadS SnapshotTierStatus
$creadsPrec :: Int -> ReadS SnapshotTierStatus
Prelude.Read, Int -> SnapshotTierStatus -> ShowS
[SnapshotTierStatus] -> ShowS
SnapshotTierStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SnapshotTierStatus] -> ShowS
$cshowList :: [SnapshotTierStatus] -> ShowS
show :: SnapshotTierStatus -> String
$cshow :: SnapshotTierStatus -> String
showsPrec :: Int -> SnapshotTierStatus -> ShowS
$cshowsPrec :: Int -> SnapshotTierStatus -> ShowS
Prelude.Show, forall x. Rep SnapshotTierStatus x -> SnapshotTierStatus
forall x. SnapshotTierStatus -> Rep SnapshotTierStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SnapshotTierStatus x -> SnapshotTierStatus
$cfrom :: forall x. SnapshotTierStatus -> Rep SnapshotTierStatus x
Prelude.Generic)

-- |
-- Create a value of 'SnapshotTierStatus' 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:
--
-- 'archivalCompleteTime', 'snapshotTierStatus_archivalCompleteTime' - The date and time when the last archive process was completed.
--
-- 'lastTieringOperationStatus', 'snapshotTierStatus_lastTieringOperationStatus' - The status of the last archive or restore process.
--
-- 'lastTieringOperationStatusDetail', 'snapshotTierStatus_lastTieringOperationStatusDetail' - A message describing the status of the last archive or restore process.
--
-- 'lastTieringProgress', 'snapshotTierStatus_lastTieringProgress' - The progress of the last archive or restore process, as a percentage.
--
-- 'lastTieringStartTime', 'snapshotTierStatus_lastTieringStartTime' - The date and time when the last archive or restore process was started.
--
-- 'ownerId', 'snapshotTierStatus_ownerId' - The ID of the Amazon Web Services account that owns the snapshot.
--
-- 'restoreExpiryTime', 'snapshotTierStatus_restoreExpiryTime' - Only for archived snapshots that are temporarily restored. Indicates the
-- date and time when a temporarily restored snapshot will be automatically
-- re-archived.
--
-- 'snapshotId', 'snapshotTierStatus_snapshotId' - The ID of the snapshot.
--
-- 'status', 'snapshotTierStatus_status' - The state of the snapshot.
--
-- 'storageTier', 'snapshotTierStatus_storageTier' - The storage tier in which the snapshot is stored. @standard@ indicates
-- that the snapshot is stored in the standard snapshot storage tier and
-- that it is ready for use. @archive@ indicates that the snapshot is
-- currently archived and that it must be restored before it can be used.
--
-- 'tags', 'snapshotTierStatus_tags' - The tags that are assigned to the snapshot.
--
-- 'volumeId', 'snapshotTierStatus_volumeId' - The ID of the volume from which the snapshot was created.
newSnapshotTierStatus ::
  SnapshotTierStatus
newSnapshotTierStatus :: SnapshotTierStatus
newSnapshotTierStatus =
  SnapshotTierStatus'
    { $sel:archivalCompleteTime:SnapshotTierStatus' :: Maybe ISO8601
archivalCompleteTime =
        forall a. Maybe a
Prelude.Nothing,
      $sel:lastTieringOperationStatus:SnapshotTierStatus' :: Maybe TieringOperationStatus
lastTieringOperationStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:lastTieringOperationStatusDetail:SnapshotTierStatus' :: Maybe Text
lastTieringOperationStatusDetail = forall a. Maybe a
Prelude.Nothing,
      $sel:lastTieringProgress:SnapshotTierStatus' :: Maybe Int
lastTieringProgress = forall a. Maybe a
Prelude.Nothing,
      $sel:lastTieringStartTime:SnapshotTierStatus' :: Maybe ISO8601
lastTieringStartTime = forall a. Maybe a
Prelude.Nothing,
      $sel:ownerId:SnapshotTierStatus' :: Maybe Text
ownerId = forall a. Maybe a
Prelude.Nothing,
      $sel:restoreExpiryTime:SnapshotTierStatus' :: Maybe ISO8601
restoreExpiryTime = forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotId:SnapshotTierStatus' :: Maybe Text
snapshotId = forall a. Maybe a
Prelude.Nothing,
      $sel:status:SnapshotTierStatus' :: Maybe SnapshotState
status = forall a. Maybe a
Prelude.Nothing,
      $sel:storageTier:SnapshotTierStatus' :: Maybe StorageTier
storageTier = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:SnapshotTierStatus' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:volumeId:SnapshotTierStatus' :: Maybe Text
volumeId = forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time when the last archive process was completed.
snapshotTierStatus_archivalCompleteTime :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe Prelude.UTCTime)
snapshotTierStatus_archivalCompleteTime :: Lens' SnapshotTierStatus (Maybe UTCTime)
snapshotTierStatus_archivalCompleteTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe ISO8601
archivalCompleteTime :: Maybe ISO8601
$sel:archivalCompleteTime:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe ISO8601
archivalCompleteTime} -> Maybe ISO8601
archivalCompleteTime) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe ISO8601
a -> SnapshotTierStatus
s {$sel:archivalCompleteTime:SnapshotTierStatus' :: Maybe ISO8601
archivalCompleteTime = Maybe ISO8601
a} :: SnapshotTierStatus) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The status of the last archive or restore process.
snapshotTierStatus_lastTieringOperationStatus :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe TieringOperationStatus)
snapshotTierStatus_lastTieringOperationStatus :: Lens' SnapshotTierStatus (Maybe TieringOperationStatus)
snapshotTierStatus_lastTieringOperationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe TieringOperationStatus
lastTieringOperationStatus :: Maybe TieringOperationStatus
$sel:lastTieringOperationStatus:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe TieringOperationStatus
lastTieringOperationStatus} -> Maybe TieringOperationStatus
lastTieringOperationStatus) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe TieringOperationStatus
a -> SnapshotTierStatus
s {$sel:lastTieringOperationStatus:SnapshotTierStatus' :: Maybe TieringOperationStatus
lastTieringOperationStatus = Maybe TieringOperationStatus
a} :: SnapshotTierStatus)

-- | A message describing the status of the last archive or restore process.
snapshotTierStatus_lastTieringOperationStatusDetail :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe Prelude.Text)
snapshotTierStatus_lastTieringOperationStatusDetail :: Lens' SnapshotTierStatus (Maybe Text)
snapshotTierStatus_lastTieringOperationStatusDetail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe Text
lastTieringOperationStatusDetail :: Maybe Text
$sel:lastTieringOperationStatusDetail:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
lastTieringOperationStatusDetail} -> Maybe Text
lastTieringOperationStatusDetail) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe Text
a -> SnapshotTierStatus
s {$sel:lastTieringOperationStatusDetail:SnapshotTierStatus' :: Maybe Text
lastTieringOperationStatusDetail = Maybe Text
a} :: SnapshotTierStatus)

-- | The progress of the last archive or restore process, as a percentage.
snapshotTierStatus_lastTieringProgress :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe Prelude.Int)
snapshotTierStatus_lastTieringProgress :: Lens' SnapshotTierStatus (Maybe Int)
snapshotTierStatus_lastTieringProgress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe Int
lastTieringProgress :: Maybe Int
$sel:lastTieringProgress:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Int
lastTieringProgress} -> Maybe Int
lastTieringProgress) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe Int
a -> SnapshotTierStatus
s {$sel:lastTieringProgress:SnapshotTierStatus' :: Maybe Int
lastTieringProgress = Maybe Int
a} :: SnapshotTierStatus)

-- | The date and time when the last archive or restore process was started.
snapshotTierStatus_lastTieringStartTime :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe Prelude.UTCTime)
snapshotTierStatus_lastTieringStartTime :: Lens' SnapshotTierStatus (Maybe UTCTime)
snapshotTierStatus_lastTieringStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe ISO8601
lastTieringStartTime :: Maybe ISO8601
$sel:lastTieringStartTime:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe ISO8601
lastTieringStartTime} -> Maybe ISO8601
lastTieringStartTime) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe ISO8601
a -> SnapshotTierStatus
s {$sel:lastTieringStartTime:SnapshotTierStatus' :: Maybe ISO8601
lastTieringStartTime = Maybe ISO8601
a} :: SnapshotTierStatus) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The ID of the Amazon Web Services account that owns the snapshot.
snapshotTierStatus_ownerId :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe Prelude.Text)
snapshotTierStatus_ownerId :: Lens' SnapshotTierStatus (Maybe Text)
snapshotTierStatus_ownerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe Text
ownerId :: Maybe Text
$sel:ownerId:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
ownerId} -> Maybe Text
ownerId) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe Text
a -> SnapshotTierStatus
s {$sel:ownerId:SnapshotTierStatus' :: Maybe Text
ownerId = Maybe Text
a} :: SnapshotTierStatus)

-- | Only for archived snapshots that are temporarily restored. Indicates the
-- date and time when a temporarily restored snapshot will be automatically
-- re-archived.
snapshotTierStatus_restoreExpiryTime :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe Prelude.UTCTime)
snapshotTierStatus_restoreExpiryTime :: Lens' SnapshotTierStatus (Maybe UTCTime)
snapshotTierStatus_restoreExpiryTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe ISO8601
restoreExpiryTime :: Maybe ISO8601
$sel:restoreExpiryTime:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe ISO8601
restoreExpiryTime} -> Maybe ISO8601
restoreExpiryTime) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe ISO8601
a -> SnapshotTierStatus
s {$sel:restoreExpiryTime:SnapshotTierStatus' :: Maybe ISO8601
restoreExpiryTime = Maybe ISO8601
a} :: SnapshotTierStatus) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The ID of the snapshot.
snapshotTierStatus_snapshotId :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe Prelude.Text)
snapshotTierStatus_snapshotId :: Lens' SnapshotTierStatus (Maybe Text)
snapshotTierStatus_snapshotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe Text
snapshotId :: Maybe Text
$sel:snapshotId:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
snapshotId} -> Maybe Text
snapshotId) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe Text
a -> SnapshotTierStatus
s {$sel:snapshotId:SnapshotTierStatus' :: Maybe Text
snapshotId = Maybe Text
a} :: SnapshotTierStatus)

-- | The state of the snapshot.
snapshotTierStatus_status :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe SnapshotState)
snapshotTierStatus_status :: Lens' SnapshotTierStatus (Maybe SnapshotState)
snapshotTierStatus_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe SnapshotState
status :: Maybe SnapshotState
$sel:status:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe SnapshotState
status} -> Maybe SnapshotState
status) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe SnapshotState
a -> SnapshotTierStatus
s {$sel:status:SnapshotTierStatus' :: Maybe SnapshotState
status = Maybe SnapshotState
a} :: SnapshotTierStatus)

-- | The storage tier in which the snapshot is stored. @standard@ indicates
-- that the snapshot is stored in the standard snapshot storage tier and
-- that it is ready for use. @archive@ indicates that the snapshot is
-- currently archived and that it must be restored before it can be used.
snapshotTierStatus_storageTier :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe StorageTier)
snapshotTierStatus_storageTier :: Lens' SnapshotTierStatus (Maybe StorageTier)
snapshotTierStatus_storageTier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe StorageTier
storageTier :: Maybe StorageTier
$sel:storageTier:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe StorageTier
storageTier} -> Maybe StorageTier
storageTier) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe StorageTier
a -> SnapshotTierStatus
s {$sel:storageTier:SnapshotTierStatus' :: Maybe StorageTier
storageTier = Maybe StorageTier
a} :: SnapshotTierStatus)

-- | The tags that are assigned to the snapshot.
snapshotTierStatus_tags :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe [Tag])
snapshotTierStatus_tags :: Lens' SnapshotTierStatus (Maybe [Tag])
snapshotTierStatus_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe [Tag]
a -> SnapshotTierStatus
s {$sel:tags:SnapshotTierStatus' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: SnapshotTierStatus) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the volume from which the snapshot was created.
snapshotTierStatus_volumeId :: Lens.Lens' SnapshotTierStatus (Prelude.Maybe Prelude.Text)
snapshotTierStatus_volumeId :: Lens' SnapshotTierStatus (Maybe Text)
snapshotTierStatus_volumeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotTierStatus' {Maybe Text
volumeId :: Maybe Text
$sel:volumeId:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
volumeId} -> Maybe Text
volumeId) (\s :: SnapshotTierStatus
s@SnapshotTierStatus' {} Maybe Text
a -> SnapshotTierStatus
s {$sel:volumeId:SnapshotTierStatus' :: Maybe Text
volumeId = Maybe Text
a} :: SnapshotTierStatus)

instance Data.FromXML SnapshotTierStatus where
  parseXML :: [Node] -> Either String SnapshotTierStatus
parseXML [Node]
x =
    Maybe ISO8601
-> Maybe TieringOperationStatus
-> Maybe Text
-> Maybe Int
-> Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe SnapshotState
-> Maybe StorageTier
-> Maybe [Tag]
-> Maybe Text
-> SnapshotTierStatus
SnapshotTierStatus'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"archivalCompleteTime")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"lastTieringOperationStatus")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"lastTieringOperationStatusDetail")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"lastTieringProgress")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"lastTieringStartTime")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ownerId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"restoreExpiryTime")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"snapshotId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"status")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"storageTier")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"tagSet"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"volumeId")

instance Prelude.Hashable SnapshotTierStatus where
  hashWithSalt :: Int -> SnapshotTierStatus -> Int
hashWithSalt Int
_salt SnapshotTierStatus' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe ISO8601
Maybe SnapshotState
Maybe StorageTier
Maybe TieringOperationStatus
volumeId :: Maybe Text
tags :: Maybe [Tag]
storageTier :: Maybe StorageTier
status :: Maybe SnapshotState
snapshotId :: Maybe Text
restoreExpiryTime :: Maybe ISO8601
ownerId :: Maybe Text
lastTieringStartTime :: Maybe ISO8601
lastTieringProgress :: Maybe Int
lastTieringOperationStatusDetail :: Maybe Text
lastTieringOperationStatus :: Maybe TieringOperationStatus
archivalCompleteTime :: Maybe ISO8601
$sel:volumeId:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
$sel:tags:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe [Tag]
$sel:storageTier:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe StorageTier
$sel:status:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe SnapshotState
$sel:snapshotId:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
$sel:restoreExpiryTime:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe ISO8601
$sel:ownerId:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
$sel:lastTieringStartTime:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe ISO8601
$sel:lastTieringProgress:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Int
$sel:lastTieringOperationStatusDetail:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
$sel:lastTieringOperationStatus:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe TieringOperationStatus
$sel:archivalCompleteTime:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe ISO8601
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
archivalCompleteTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TieringOperationStatus
lastTieringOperationStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastTieringOperationStatusDetail
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
lastTieringProgress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
lastTieringStartTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownerId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
restoreExpiryTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SnapshotState
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StorageTier
storageTier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeId

instance Prelude.NFData SnapshotTierStatus where
  rnf :: SnapshotTierStatus -> ()
rnf SnapshotTierStatus' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe ISO8601
Maybe SnapshotState
Maybe StorageTier
Maybe TieringOperationStatus
volumeId :: Maybe Text
tags :: Maybe [Tag]
storageTier :: Maybe StorageTier
status :: Maybe SnapshotState
snapshotId :: Maybe Text
restoreExpiryTime :: Maybe ISO8601
ownerId :: Maybe Text
lastTieringStartTime :: Maybe ISO8601
lastTieringProgress :: Maybe Int
lastTieringOperationStatusDetail :: Maybe Text
lastTieringOperationStatus :: Maybe TieringOperationStatus
archivalCompleteTime :: Maybe ISO8601
$sel:volumeId:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
$sel:tags:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe [Tag]
$sel:storageTier:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe StorageTier
$sel:status:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe SnapshotState
$sel:snapshotId:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
$sel:restoreExpiryTime:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe ISO8601
$sel:ownerId:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
$sel:lastTieringStartTime:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe ISO8601
$sel:lastTieringProgress:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Int
$sel:lastTieringOperationStatusDetail:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe Text
$sel:lastTieringOperationStatus:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe TieringOperationStatus
$sel:archivalCompleteTime:SnapshotTierStatus' :: SnapshotTierStatus -> Maybe ISO8601
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
archivalCompleteTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TieringOperationStatus
lastTieringOperationStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastTieringOperationStatusDetail
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
lastTieringProgress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
lastTieringStartTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
restoreExpiryTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snapshotId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SnapshotState
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StorageTier
storageTier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeId