{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribeSnapshotTierStatus
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the storage tier status of one or more Amazon EBS snapshots.
--
-- This operation returns paginated results.
module Amazonka.EC2.DescribeSnapshotTierStatus
  ( -- * Creating a Request
    DescribeSnapshotTierStatus (..),
    newDescribeSnapshotTierStatus,

    -- * Request Lenses
    describeSnapshotTierStatus_dryRun,
    describeSnapshotTierStatus_filters,
    describeSnapshotTierStatus_maxResults,
    describeSnapshotTierStatus_nextToken,

    -- * Destructuring the Response
    DescribeSnapshotTierStatusResponse (..),
    newDescribeSnapshotTierStatusResponse,

    -- * Response Lenses
    describeSnapshotTierStatusResponse_nextToken,
    describeSnapshotTierStatusResponse_snapshotTierStatuses,
    describeSnapshotTierStatusResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeSnapshotTierStatus' smart constructor.
data DescribeSnapshotTierStatus = DescribeSnapshotTierStatus'
  { -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    DescribeSnapshotTierStatus -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The filters.
    --
    -- -   @snapshot-id@ - The snapshot ID.
    --
    -- -   @volume-id@ - The ID of the volume the snapshot is for.
    --
    -- -   @last-tiering-operation@ - The state of the last archive or restore
    --     action. (@archival-in-progress@ | @archival-completed@ |
    --     @archival-failed@ | @permanent-restore-in-progress@ |
    --     @permanent-restore-completed@ | @permanent-restore-failed@ |
    --     @temporary-restore-in-progress@ | @temporary-restore-completed@ |
    --     @temporary-restore-failed@)
    DescribeSnapshotTierStatus -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The maximum number of results to return with a single call. To retrieve
    -- the remaining results, make another call with the returned @nextToken@
    -- value.
    DescribeSnapshotTierStatus -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The token for the next page of results.
    DescribeSnapshotTierStatus -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeSnapshotTierStatus -> DescribeSnapshotTierStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSnapshotTierStatus -> DescribeSnapshotTierStatus -> Bool
$c/= :: DescribeSnapshotTierStatus -> DescribeSnapshotTierStatus -> Bool
== :: DescribeSnapshotTierStatus -> DescribeSnapshotTierStatus -> Bool
$c== :: DescribeSnapshotTierStatus -> DescribeSnapshotTierStatus -> Bool
Prelude.Eq, ReadPrec [DescribeSnapshotTierStatus]
ReadPrec DescribeSnapshotTierStatus
Int -> ReadS DescribeSnapshotTierStatus
ReadS [DescribeSnapshotTierStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSnapshotTierStatus]
$creadListPrec :: ReadPrec [DescribeSnapshotTierStatus]
readPrec :: ReadPrec DescribeSnapshotTierStatus
$creadPrec :: ReadPrec DescribeSnapshotTierStatus
readList :: ReadS [DescribeSnapshotTierStatus]
$creadList :: ReadS [DescribeSnapshotTierStatus]
readsPrec :: Int -> ReadS DescribeSnapshotTierStatus
$creadsPrec :: Int -> ReadS DescribeSnapshotTierStatus
Prelude.Read, Int -> DescribeSnapshotTierStatus -> ShowS
[DescribeSnapshotTierStatus] -> ShowS
DescribeSnapshotTierStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSnapshotTierStatus] -> ShowS
$cshowList :: [DescribeSnapshotTierStatus] -> ShowS
show :: DescribeSnapshotTierStatus -> String
$cshow :: DescribeSnapshotTierStatus -> String
showsPrec :: Int -> DescribeSnapshotTierStatus -> ShowS
$cshowsPrec :: Int -> DescribeSnapshotTierStatus -> ShowS
Prelude.Show, forall x.
Rep DescribeSnapshotTierStatus x -> DescribeSnapshotTierStatus
forall x.
DescribeSnapshotTierStatus -> Rep DescribeSnapshotTierStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSnapshotTierStatus x -> DescribeSnapshotTierStatus
$cfrom :: forall x.
DescribeSnapshotTierStatus -> Rep DescribeSnapshotTierStatus x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSnapshotTierStatus' 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:
--
-- 'dryRun', 'describeSnapshotTierStatus_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'filters', 'describeSnapshotTierStatus_filters' - The filters.
--
-- -   @snapshot-id@ - The snapshot ID.
--
-- -   @volume-id@ - The ID of the volume the snapshot is for.
--
-- -   @last-tiering-operation@ - The state of the last archive or restore
--     action. (@archival-in-progress@ | @archival-completed@ |
--     @archival-failed@ | @permanent-restore-in-progress@ |
--     @permanent-restore-completed@ | @permanent-restore-failed@ |
--     @temporary-restore-in-progress@ | @temporary-restore-completed@ |
--     @temporary-restore-failed@)
--
-- 'maxResults', 'describeSnapshotTierStatus_maxResults' - The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
--
-- 'nextToken', 'describeSnapshotTierStatus_nextToken' - The token for the next page of results.
newDescribeSnapshotTierStatus ::
  DescribeSnapshotTierStatus
newDescribeSnapshotTierStatus :: DescribeSnapshotTierStatus
newDescribeSnapshotTierStatus =
  DescribeSnapshotTierStatus'
    { $sel:dryRun:DescribeSnapshotTierStatus' :: Maybe Bool
dryRun =
        forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeSnapshotTierStatus' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeSnapshotTierStatus' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeSnapshotTierStatus' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
describeSnapshotTierStatus_dryRun :: Lens.Lens' DescribeSnapshotTierStatus (Prelude.Maybe Prelude.Bool)
describeSnapshotTierStatus_dryRun :: Lens' DescribeSnapshotTierStatus (Maybe Bool)
describeSnapshotTierStatus_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotTierStatus' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeSnapshotTierStatus
s@DescribeSnapshotTierStatus' {} Maybe Bool
a -> DescribeSnapshotTierStatus
s {$sel:dryRun:DescribeSnapshotTierStatus' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeSnapshotTierStatus)

-- | The filters.
--
-- -   @snapshot-id@ - The snapshot ID.
--
-- -   @volume-id@ - The ID of the volume the snapshot is for.
--
-- -   @last-tiering-operation@ - The state of the last archive or restore
--     action. (@archival-in-progress@ | @archival-completed@ |
--     @archival-failed@ | @permanent-restore-in-progress@ |
--     @permanent-restore-completed@ | @permanent-restore-failed@ |
--     @temporary-restore-in-progress@ | @temporary-restore-completed@ |
--     @temporary-restore-failed@)
describeSnapshotTierStatus_filters :: Lens.Lens' DescribeSnapshotTierStatus (Prelude.Maybe [Filter])
describeSnapshotTierStatus_filters :: Lens' DescribeSnapshotTierStatus (Maybe [Filter])
describeSnapshotTierStatus_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotTierStatus' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeSnapshotTierStatus
s@DescribeSnapshotTierStatus' {} Maybe [Filter]
a -> DescribeSnapshotTierStatus
s {$sel:filters:DescribeSnapshotTierStatus' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeSnapshotTierStatus) 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 maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
describeSnapshotTierStatus_maxResults :: Lens.Lens' DescribeSnapshotTierStatus (Prelude.Maybe Prelude.Int)
describeSnapshotTierStatus_maxResults :: Lens' DescribeSnapshotTierStatus (Maybe Int)
describeSnapshotTierStatus_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotTierStatus' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeSnapshotTierStatus
s@DescribeSnapshotTierStatus' {} Maybe Int
a -> DescribeSnapshotTierStatus
s {$sel:maxResults:DescribeSnapshotTierStatus' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeSnapshotTierStatus)

-- | The token for the next page of results.
describeSnapshotTierStatus_nextToken :: Lens.Lens' DescribeSnapshotTierStatus (Prelude.Maybe Prelude.Text)
describeSnapshotTierStatus_nextToken :: Lens' DescribeSnapshotTierStatus (Maybe Text)
describeSnapshotTierStatus_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotTierStatus' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeSnapshotTierStatus
s@DescribeSnapshotTierStatus' {} Maybe Text
a -> DescribeSnapshotTierStatus
s {$sel:nextToken:DescribeSnapshotTierStatus' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeSnapshotTierStatus)

instance Core.AWSPager DescribeSnapshotTierStatus where
  page :: DescribeSnapshotTierStatus
-> AWSResponse DescribeSnapshotTierStatus
-> Maybe DescribeSnapshotTierStatus
page DescribeSnapshotTierStatus
rq AWSResponse DescribeSnapshotTierStatus
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeSnapshotTierStatus
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSnapshotTierStatusResponse (Maybe Text)
describeSnapshotTierStatusResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeSnapshotTierStatus
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeSnapshotTierStatusResponse (Maybe [SnapshotTierStatus])
describeSnapshotTierStatusResponse_snapshotTierStatuses
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeSnapshotTierStatus
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeSnapshotTierStatus (Maybe Text)
describeSnapshotTierStatus_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeSnapshotTierStatus
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSnapshotTierStatusResponse (Maybe Text)
describeSnapshotTierStatusResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeSnapshotTierStatus where
  type
    AWSResponse DescribeSnapshotTierStatus =
      DescribeSnapshotTierStatusResponse
  request :: (Service -> Service)
-> DescribeSnapshotTierStatus -> Request DescribeSnapshotTierStatus
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeSnapshotTierStatus
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSnapshotTierStatus)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [SnapshotTierStatus]
-> Int
-> DescribeSnapshotTierStatusResponse
DescribeSnapshotTierStatusResponse'
            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
"nextToken")
            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
"snapshotTierStatusSet"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeSnapshotTierStatus where
  hashWithSalt :: Int -> DescribeSnapshotTierStatus -> Int
hashWithSalt Int
_salt DescribeSnapshotTierStatus' {Maybe Bool
Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Text
$sel:maxResults:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Int
$sel:filters:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe [Filter]
$sel:dryRun:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData DescribeSnapshotTierStatus where
  rnf :: DescribeSnapshotTierStatus -> ()
rnf DescribeSnapshotTierStatus' {Maybe Bool
Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Text
$sel:maxResults:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Int
$sel:filters:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe [Filter]
$sel:dryRun:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders DescribeSnapshotTierStatus where
  toHeaders :: DescribeSnapshotTierStatus -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath DescribeSnapshotTierStatus where
  toPath :: DescribeSnapshotTierStatus -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery DescribeSnapshotTierStatus where
  toQuery :: DescribeSnapshotTierStatus -> QueryString
toQuery DescribeSnapshotTierStatus' {Maybe Bool
Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Text
$sel:maxResults:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Int
$sel:filters:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe [Filter]
$sel:dryRun:DescribeSnapshotTierStatus' :: DescribeSnapshotTierStatus -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeSnapshotTierStatus" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Filter" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newDescribeSnapshotTierStatusResponse' smart constructor.
data DescribeSnapshotTierStatusResponse = DescribeSnapshotTierStatusResponse'
  { -- | The token to use to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    DescribeSnapshotTierStatusResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the snapshot\'s storage tier.
    DescribeSnapshotTierStatusResponse -> Maybe [SnapshotTierStatus]
snapshotTierStatuses :: Prelude.Maybe [SnapshotTierStatus],
    -- | The response's http status code.
    DescribeSnapshotTierStatusResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSnapshotTierStatusResponse
-> DescribeSnapshotTierStatusResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSnapshotTierStatusResponse
-> DescribeSnapshotTierStatusResponse -> Bool
$c/= :: DescribeSnapshotTierStatusResponse
-> DescribeSnapshotTierStatusResponse -> Bool
== :: DescribeSnapshotTierStatusResponse
-> DescribeSnapshotTierStatusResponse -> Bool
$c== :: DescribeSnapshotTierStatusResponse
-> DescribeSnapshotTierStatusResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSnapshotTierStatusResponse]
ReadPrec DescribeSnapshotTierStatusResponse
Int -> ReadS DescribeSnapshotTierStatusResponse
ReadS [DescribeSnapshotTierStatusResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSnapshotTierStatusResponse]
$creadListPrec :: ReadPrec [DescribeSnapshotTierStatusResponse]
readPrec :: ReadPrec DescribeSnapshotTierStatusResponse
$creadPrec :: ReadPrec DescribeSnapshotTierStatusResponse
readList :: ReadS [DescribeSnapshotTierStatusResponse]
$creadList :: ReadS [DescribeSnapshotTierStatusResponse]
readsPrec :: Int -> ReadS DescribeSnapshotTierStatusResponse
$creadsPrec :: Int -> ReadS DescribeSnapshotTierStatusResponse
Prelude.Read, Int -> DescribeSnapshotTierStatusResponse -> ShowS
[DescribeSnapshotTierStatusResponse] -> ShowS
DescribeSnapshotTierStatusResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSnapshotTierStatusResponse] -> ShowS
$cshowList :: [DescribeSnapshotTierStatusResponse] -> ShowS
show :: DescribeSnapshotTierStatusResponse -> String
$cshow :: DescribeSnapshotTierStatusResponse -> String
showsPrec :: Int -> DescribeSnapshotTierStatusResponse -> ShowS
$cshowsPrec :: Int -> DescribeSnapshotTierStatusResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeSnapshotTierStatusResponse x
-> DescribeSnapshotTierStatusResponse
forall x.
DescribeSnapshotTierStatusResponse
-> Rep DescribeSnapshotTierStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSnapshotTierStatusResponse x
-> DescribeSnapshotTierStatusResponse
$cfrom :: forall x.
DescribeSnapshotTierStatusResponse
-> Rep DescribeSnapshotTierStatusResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSnapshotTierStatusResponse' 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:
--
-- 'nextToken', 'describeSnapshotTierStatusResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'snapshotTierStatuses', 'describeSnapshotTierStatusResponse_snapshotTierStatuses' - Information about the snapshot\'s storage tier.
--
-- 'httpStatus', 'describeSnapshotTierStatusResponse_httpStatus' - The response's http status code.
newDescribeSnapshotTierStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSnapshotTierStatusResponse
newDescribeSnapshotTierStatusResponse :: Int -> DescribeSnapshotTierStatusResponse
newDescribeSnapshotTierStatusResponse Int
pHttpStatus_ =
  DescribeSnapshotTierStatusResponse'
    { $sel:nextToken:DescribeSnapshotTierStatusResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotTierStatuses:DescribeSnapshotTierStatusResponse' :: Maybe [SnapshotTierStatus]
snapshotTierStatuses = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSnapshotTierStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
describeSnapshotTierStatusResponse_nextToken :: Lens.Lens' DescribeSnapshotTierStatusResponse (Prelude.Maybe Prelude.Text)
describeSnapshotTierStatusResponse_nextToken :: Lens' DescribeSnapshotTierStatusResponse (Maybe Text)
describeSnapshotTierStatusResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotTierStatusResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeSnapshotTierStatusResponse' :: DescribeSnapshotTierStatusResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeSnapshotTierStatusResponse
s@DescribeSnapshotTierStatusResponse' {} Maybe Text
a -> DescribeSnapshotTierStatusResponse
s {$sel:nextToken:DescribeSnapshotTierStatusResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeSnapshotTierStatusResponse)

-- | Information about the snapshot\'s storage tier.
describeSnapshotTierStatusResponse_snapshotTierStatuses :: Lens.Lens' DescribeSnapshotTierStatusResponse (Prelude.Maybe [SnapshotTierStatus])
describeSnapshotTierStatusResponse_snapshotTierStatuses :: Lens'
  DescribeSnapshotTierStatusResponse (Maybe [SnapshotTierStatus])
describeSnapshotTierStatusResponse_snapshotTierStatuses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotTierStatusResponse' {Maybe [SnapshotTierStatus]
snapshotTierStatuses :: Maybe [SnapshotTierStatus]
$sel:snapshotTierStatuses:DescribeSnapshotTierStatusResponse' :: DescribeSnapshotTierStatusResponse -> Maybe [SnapshotTierStatus]
snapshotTierStatuses} -> Maybe [SnapshotTierStatus]
snapshotTierStatuses) (\s :: DescribeSnapshotTierStatusResponse
s@DescribeSnapshotTierStatusResponse' {} Maybe [SnapshotTierStatus]
a -> DescribeSnapshotTierStatusResponse
s {$sel:snapshotTierStatuses:DescribeSnapshotTierStatusResponse' :: Maybe [SnapshotTierStatus]
snapshotTierStatuses = Maybe [SnapshotTierStatus]
a} :: DescribeSnapshotTierStatusResponse) 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 response's http status code.
describeSnapshotTierStatusResponse_httpStatus :: Lens.Lens' DescribeSnapshotTierStatusResponse Prelude.Int
describeSnapshotTierStatusResponse_httpStatus :: Lens' DescribeSnapshotTierStatusResponse Int
describeSnapshotTierStatusResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotTierStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeSnapshotTierStatusResponse' :: DescribeSnapshotTierStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeSnapshotTierStatusResponse
s@DescribeSnapshotTierStatusResponse' {} Int
a -> DescribeSnapshotTierStatusResponse
s {$sel:httpStatus:DescribeSnapshotTierStatusResponse' :: Int
httpStatus = Int
a} :: DescribeSnapshotTierStatusResponse)

instance
  Prelude.NFData
    DescribeSnapshotTierStatusResponse
  where
  rnf :: DescribeSnapshotTierStatusResponse -> ()
rnf DescribeSnapshotTierStatusResponse' {Int
Maybe [SnapshotTierStatus]
Maybe Text
httpStatus :: Int
snapshotTierStatuses :: Maybe [SnapshotTierStatus]
nextToken :: Maybe Text
$sel:httpStatus:DescribeSnapshotTierStatusResponse' :: DescribeSnapshotTierStatusResponse -> Int
$sel:snapshotTierStatuses:DescribeSnapshotTierStatusResponse' :: DescribeSnapshotTierStatusResponse -> Maybe [SnapshotTierStatus]
$sel:nextToken:DescribeSnapshotTierStatusResponse' :: DescribeSnapshotTierStatusResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SnapshotTierStatus]
snapshotTierStatuses
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus