{-# 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.S3.ListBucketIntelligentTieringConfigurations
-- 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)
--
-- Lists the S3 Intelligent-Tiering configuration from the specified
-- bucket.
--
-- The S3 Intelligent-Tiering storage class is designed to optimize storage
-- costs by automatically moving data to the most cost-effective storage
-- access tier, without performance impact or operational overhead. S3
-- Intelligent-Tiering delivers automatic cost savings in two low latency
-- and high throughput access tiers. For data that can be accessed
-- asynchronously, you can choose to activate automatic archiving
-- capabilities within the S3 Intelligent-Tiering storage class.
--
-- The S3 Intelligent-Tiering storage class is the ideal storage class for
-- data with unknown, changing, or unpredictable access patterns,
-- independent of object size or retention period. If the size of an object
-- is less than 128 KB, it is not eligible for auto-tiering. Smaller
-- objects can be stored, but they are always charged at the Frequent
-- Access tier rates in the S3 Intelligent-Tiering storage class.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access Storage class for automatically optimizing frequently and infrequently accessed objects>.
--
-- Operations related to @ListBucketIntelligentTieringConfigurations@
-- include:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html DeleteBucketIntelligentTieringConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html PutBucketIntelligentTieringConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html GetBucketIntelligentTieringConfiguration>
module Amazonka.S3.ListBucketIntelligentTieringConfigurations
  ( -- * Creating a Request
    ListBucketIntelligentTieringConfigurations (..),
    newListBucketIntelligentTieringConfigurations,

    -- * Request Lenses
    listBucketIntelligentTieringConfigurations_continuationToken,
    listBucketIntelligentTieringConfigurations_bucket,

    -- * Destructuring the Response
    ListBucketIntelligentTieringConfigurationsResponse (..),
    newListBucketIntelligentTieringConfigurationsResponse,

    -- * Response Lenses
    listBucketIntelligentTieringConfigurationsResponse_intelligentTieringConfigurationList,
    listBucketIntelligentTieringConfigurationsResponse_continuationToken,
    listBucketIntelligentTieringConfigurationsResponse_nextContinuationToken,
    listBucketIntelligentTieringConfigurationsResponse_isTruncated,
    listBucketIntelligentTieringConfigurationsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.S3.Types

-- | /See:/ 'newListBucketIntelligentTieringConfigurations' smart constructor.
data ListBucketIntelligentTieringConfigurations = ListBucketIntelligentTieringConfigurations'
  { -- | The ContinuationToken that represents a placeholder from where this
    -- request should begin.
    ListBucketIntelligentTieringConfigurations -> Maybe Text
continuationToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the Amazon S3 bucket whose configuration you want to modify
    -- or retrieve.
    ListBucketIntelligentTieringConfigurations -> BucketName
bucket :: BucketName
  }
  deriving (ListBucketIntelligentTieringConfigurations
-> ListBucketIntelligentTieringConfigurations -> Bool
(ListBucketIntelligentTieringConfigurations
 -> ListBucketIntelligentTieringConfigurations -> Bool)
-> (ListBucketIntelligentTieringConfigurations
    -> ListBucketIntelligentTieringConfigurations -> Bool)
-> Eq ListBucketIntelligentTieringConfigurations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBucketIntelligentTieringConfigurations
-> ListBucketIntelligentTieringConfigurations -> Bool
$c/= :: ListBucketIntelligentTieringConfigurations
-> ListBucketIntelligentTieringConfigurations -> Bool
== :: ListBucketIntelligentTieringConfigurations
-> ListBucketIntelligentTieringConfigurations -> Bool
$c== :: ListBucketIntelligentTieringConfigurations
-> ListBucketIntelligentTieringConfigurations -> Bool
Prelude.Eq, ReadPrec [ListBucketIntelligentTieringConfigurations]
ReadPrec ListBucketIntelligentTieringConfigurations
Int -> ReadS ListBucketIntelligentTieringConfigurations
ReadS [ListBucketIntelligentTieringConfigurations]
(Int -> ReadS ListBucketIntelligentTieringConfigurations)
-> ReadS [ListBucketIntelligentTieringConfigurations]
-> ReadPrec ListBucketIntelligentTieringConfigurations
-> ReadPrec [ListBucketIntelligentTieringConfigurations]
-> Read ListBucketIntelligentTieringConfigurations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBucketIntelligentTieringConfigurations]
$creadListPrec :: ReadPrec [ListBucketIntelligentTieringConfigurations]
readPrec :: ReadPrec ListBucketIntelligentTieringConfigurations
$creadPrec :: ReadPrec ListBucketIntelligentTieringConfigurations
readList :: ReadS [ListBucketIntelligentTieringConfigurations]
$creadList :: ReadS [ListBucketIntelligentTieringConfigurations]
readsPrec :: Int -> ReadS ListBucketIntelligentTieringConfigurations
$creadsPrec :: Int -> ReadS ListBucketIntelligentTieringConfigurations
Prelude.Read, Int -> ListBucketIntelligentTieringConfigurations -> ShowS
[ListBucketIntelligentTieringConfigurations] -> ShowS
ListBucketIntelligentTieringConfigurations -> String
(Int -> ListBucketIntelligentTieringConfigurations -> ShowS)
-> (ListBucketIntelligentTieringConfigurations -> String)
-> ([ListBucketIntelligentTieringConfigurations] -> ShowS)
-> Show ListBucketIntelligentTieringConfigurations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBucketIntelligentTieringConfigurations] -> ShowS
$cshowList :: [ListBucketIntelligentTieringConfigurations] -> ShowS
show :: ListBucketIntelligentTieringConfigurations -> String
$cshow :: ListBucketIntelligentTieringConfigurations -> String
showsPrec :: Int -> ListBucketIntelligentTieringConfigurations -> ShowS
$cshowsPrec :: Int -> ListBucketIntelligentTieringConfigurations -> ShowS
Prelude.Show, (forall x.
 ListBucketIntelligentTieringConfigurations
 -> Rep ListBucketIntelligentTieringConfigurations x)
-> (forall x.
    Rep ListBucketIntelligentTieringConfigurations x
    -> ListBucketIntelligentTieringConfigurations)
-> Generic ListBucketIntelligentTieringConfigurations
forall x.
Rep ListBucketIntelligentTieringConfigurations x
-> ListBucketIntelligentTieringConfigurations
forall x.
ListBucketIntelligentTieringConfigurations
-> Rep ListBucketIntelligentTieringConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBucketIntelligentTieringConfigurations x
-> ListBucketIntelligentTieringConfigurations
$cfrom :: forall x.
ListBucketIntelligentTieringConfigurations
-> Rep ListBucketIntelligentTieringConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'ListBucketIntelligentTieringConfigurations' 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:
--
-- 'continuationToken', 'listBucketIntelligentTieringConfigurations_continuationToken' - The ContinuationToken that represents a placeholder from where this
-- request should begin.
--
-- 'bucket', 'listBucketIntelligentTieringConfigurations_bucket' - The name of the Amazon S3 bucket whose configuration you want to modify
-- or retrieve.
newListBucketIntelligentTieringConfigurations ::
  -- | 'bucket'
  BucketName ->
  ListBucketIntelligentTieringConfigurations
newListBucketIntelligentTieringConfigurations :: BucketName -> ListBucketIntelligentTieringConfigurations
newListBucketIntelligentTieringConfigurations
  BucketName
pBucket_ =
    ListBucketIntelligentTieringConfigurations' :: Maybe Text
-> BucketName -> ListBucketIntelligentTieringConfigurations
ListBucketIntelligentTieringConfigurations'
      { $sel:continuationToken:ListBucketIntelligentTieringConfigurations' :: Maybe Text
continuationToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:bucket:ListBucketIntelligentTieringConfigurations' :: BucketName
bucket = BucketName
pBucket_
      }

-- | The ContinuationToken that represents a placeholder from where this
-- request should begin.
listBucketIntelligentTieringConfigurations_continuationToken :: Lens.Lens' ListBucketIntelligentTieringConfigurations (Prelude.Maybe Prelude.Text)
listBucketIntelligentTieringConfigurations_continuationToken :: (Maybe Text -> f (Maybe Text))
-> ListBucketIntelligentTieringConfigurations
-> f ListBucketIntelligentTieringConfigurations
listBucketIntelligentTieringConfigurations_continuationToken = (ListBucketIntelligentTieringConfigurations -> Maybe Text)
-> (ListBucketIntelligentTieringConfigurations
    -> Maybe Text -> ListBucketIntelligentTieringConfigurations)
-> Lens
     ListBucketIntelligentTieringConfigurations
     ListBucketIntelligentTieringConfigurations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketIntelligentTieringConfigurations' {Maybe Text
continuationToken :: Maybe Text
$sel:continuationToken:ListBucketIntelligentTieringConfigurations' :: ListBucketIntelligentTieringConfigurations -> Maybe Text
continuationToken} -> Maybe Text
continuationToken) (\s :: ListBucketIntelligentTieringConfigurations
s@ListBucketIntelligentTieringConfigurations' {} Maybe Text
a -> ListBucketIntelligentTieringConfigurations
s {$sel:continuationToken:ListBucketIntelligentTieringConfigurations' :: Maybe Text
continuationToken = Maybe Text
a} :: ListBucketIntelligentTieringConfigurations)

-- | The name of the Amazon S3 bucket whose configuration you want to modify
-- or retrieve.
listBucketIntelligentTieringConfigurations_bucket :: Lens.Lens' ListBucketIntelligentTieringConfigurations BucketName
listBucketIntelligentTieringConfigurations_bucket :: (BucketName -> f BucketName)
-> ListBucketIntelligentTieringConfigurations
-> f ListBucketIntelligentTieringConfigurations
listBucketIntelligentTieringConfigurations_bucket = (ListBucketIntelligentTieringConfigurations -> BucketName)
-> (ListBucketIntelligentTieringConfigurations
    -> BucketName -> ListBucketIntelligentTieringConfigurations)
-> Lens
     ListBucketIntelligentTieringConfigurations
     ListBucketIntelligentTieringConfigurations
     BucketName
     BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketIntelligentTieringConfigurations' {BucketName
bucket :: BucketName
$sel:bucket:ListBucketIntelligentTieringConfigurations' :: ListBucketIntelligentTieringConfigurations -> BucketName
bucket} -> BucketName
bucket) (\s :: ListBucketIntelligentTieringConfigurations
s@ListBucketIntelligentTieringConfigurations' {} BucketName
a -> ListBucketIntelligentTieringConfigurations
s {$sel:bucket:ListBucketIntelligentTieringConfigurations' :: BucketName
bucket = BucketName
a} :: ListBucketIntelligentTieringConfigurations)

instance
  Core.AWSRequest
    ListBucketIntelligentTieringConfigurations
  where
  type
    AWSResponse
      ListBucketIntelligentTieringConfigurations =
      ListBucketIntelligentTieringConfigurationsResponse
  request :: ListBucketIntelligentTieringConfigurations
-> Request ListBucketIntelligentTieringConfigurations
request =
    Request ListBucketIntelligentTieringConfigurations
-> Request ListBucketIntelligentTieringConfigurations
forall a. Request a -> Request a
Request.s3vhost
      (Request ListBucketIntelligentTieringConfigurations
 -> Request ListBucketIntelligentTieringConfigurations)
-> (ListBucketIntelligentTieringConfigurations
    -> Request ListBucketIntelligentTieringConfigurations)
-> ListBucketIntelligentTieringConfigurations
-> Request ListBucketIntelligentTieringConfigurations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service
-> ListBucketIntelligentTieringConfigurations
-> Request ListBucketIntelligentTieringConfigurations
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListBucketIntelligentTieringConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListBucketIntelligentTieringConfigurations)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either
      String (AWSResponse ListBucketIntelligentTieringConfigurations))
-> Logger
-> Service
-> Proxy ListBucketIntelligentTieringConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListBucketIntelligentTieringConfigurations)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [IntelligentTieringConfiguration]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> ListBucketIntelligentTieringConfigurationsResponse
ListBucketIntelligentTieringConfigurationsResponse'
            (Maybe [IntelligentTieringConfiguration]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Int
 -> ListBucketIntelligentTieringConfigurationsResponse)
-> Either String (Maybe [IntelligentTieringConfiguration])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> ListBucketIntelligentTieringConfigurationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( ([Node] -> Either String [IntelligentTieringConfiguration])
-> [Node]
-> Either String (Maybe [IntelligentTieringConfiguration])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
                            (Text -> [Node] -> Either String [IntelligentTieringConfiguration]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"IntelligentTieringConfiguration")
                            [Node]
x
                        )
              Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> ListBucketIntelligentTieringConfigurationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Int
      -> ListBucketIntelligentTieringConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ContinuationToken")
              Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Int
   -> ListBucketIntelligentTieringConfigurationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Int -> ListBucketIntelligentTieringConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextContinuationToken")
              Either
  String
  (Maybe Bool
   -> Int -> ListBucketIntelligentTieringConfigurationsResponse)
-> Either String (Maybe Bool)
-> Either
     String (Int -> ListBucketIntelligentTieringConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsTruncated")
              Either
  String (Int -> ListBucketIntelligentTieringConfigurationsResponse)
-> Either String Int
-> Either String ListBucketIntelligentTieringConfigurationsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListBucketIntelligentTieringConfigurations

instance
  Prelude.NFData
    ListBucketIntelligentTieringConfigurations

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

instance
  Core.ToPath
    ListBucketIntelligentTieringConfigurations
  where
  toPath :: ListBucketIntelligentTieringConfigurations -> ByteString
toPath
    ListBucketIntelligentTieringConfigurations' {Maybe Text
BucketName
bucket :: BucketName
continuationToken :: Maybe Text
$sel:bucket:ListBucketIntelligentTieringConfigurations' :: ListBucketIntelligentTieringConfigurations -> BucketName
$sel:continuationToken:ListBucketIntelligentTieringConfigurations' :: ListBucketIntelligentTieringConfigurations -> Maybe Text
..} =
      [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/", BucketName -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS BucketName
bucket]

instance
  Core.ToQuery
    ListBucketIntelligentTieringConfigurations
  where
  toQuery :: ListBucketIntelligentTieringConfigurations -> QueryString
toQuery
    ListBucketIntelligentTieringConfigurations' {Maybe Text
BucketName
bucket :: BucketName
continuationToken :: Maybe Text
$sel:bucket:ListBucketIntelligentTieringConfigurations' :: ListBucketIntelligentTieringConfigurations -> BucketName
$sel:continuationToken:ListBucketIntelligentTieringConfigurations' :: ListBucketIntelligentTieringConfigurations -> Maybe Text
..} =
      [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
        [ ByteString
"continuation-token" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
continuationToken,
          QueryString
"intelligent-tiering"
        ]

-- | /See:/ 'newListBucketIntelligentTieringConfigurationsResponse' smart constructor.
data ListBucketIntelligentTieringConfigurationsResponse = ListBucketIntelligentTieringConfigurationsResponse'
  { -- | The list of S3 Intelligent-Tiering configurations for a bucket.
    ListBucketIntelligentTieringConfigurationsResponse
-> Maybe [IntelligentTieringConfiguration]
intelligentTieringConfigurationList :: Prelude.Maybe [IntelligentTieringConfiguration],
    -- | The ContinuationToken that represents a placeholder from where this
    -- request should begin.
    ListBucketIntelligentTieringConfigurationsResponse -> Maybe Text
continuationToken :: Prelude.Maybe Prelude.Text,
    -- | The marker used to continue this inventory configuration listing. Use
    -- the @NextContinuationToken@ from this response to continue the listing
    -- in a subsequent request. The continuation token is an opaque value that
    -- Amazon S3 understands.
    ListBucketIntelligentTieringConfigurationsResponse -> Maybe Text
nextContinuationToken :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the returned list of analytics configurations is
    -- complete. A value of true indicates that the list is not complete and
    -- the NextContinuationToken will be provided for a subsequent request.
    ListBucketIntelligentTieringConfigurationsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    ListBucketIntelligentTieringConfigurationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBucketIntelligentTieringConfigurationsResponse
-> ListBucketIntelligentTieringConfigurationsResponse -> Bool
(ListBucketIntelligentTieringConfigurationsResponse
 -> ListBucketIntelligentTieringConfigurationsResponse -> Bool)
-> (ListBucketIntelligentTieringConfigurationsResponse
    -> ListBucketIntelligentTieringConfigurationsResponse -> Bool)
-> Eq ListBucketIntelligentTieringConfigurationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBucketIntelligentTieringConfigurationsResponse
-> ListBucketIntelligentTieringConfigurationsResponse -> Bool
$c/= :: ListBucketIntelligentTieringConfigurationsResponse
-> ListBucketIntelligentTieringConfigurationsResponse -> Bool
== :: ListBucketIntelligentTieringConfigurationsResponse
-> ListBucketIntelligentTieringConfigurationsResponse -> Bool
$c== :: ListBucketIntelligentTieringConfigurationsResponse
-> ListBucketIntelligentTieringConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [ListBucketIntelligentTieringConfigurationsResponse]
ReadPrec ListBucketIntelligentTieringConfigurationsResponse
Int -> ReadS ListBucketIntelligentTieringConfigurationsResponse
ReadS [ListBucketIntelligentTieringConfigurationsResponse]
(Int -> ReadS ListBucketIntelligentTieringConfigurationsResponse)
-> ReadS [ListBucketIntelligentTieringConfigurationsResponse]
-> ReadPrec ListBucketIntelligentTieringConfigurationsResponse
-> ReadPrec [ListBucketIntelligentTieringConfigurationsResponse]
-> Read ListBucketIntelligentTieringConfigurationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBucketIntelligentTieringConfigurationsResponse]
$creadListPrec :: ReadPrec [ListBucketIntelligentTieringConfigurationsResponse]
readPrec :: ReadPrec ListBucketIntelligentTieringConfigurationsResponse
$creadPrec :: ReadPrec ListBucketIntelligentTieringConfigurationsResponse
readList :: ReadS [ListBucketIntelligentTieringConfigurationsResponse]
$creadList :: ReadS [ListBucketIntelligentTieringConfigurationsResponse]
readsPrec :: Int -> ReadS ListBucketIntelligentTieringConfigurationsResponse
$creadsPrec :: Int -> ReadS ListBucketIntelligentTieringConfigurationsResponse
Prelude.Read, Int -> ListBucketIntelligentTieringConfigurationsResponse -> ShowS
[ListBucketIntelligentTieringConfigurationsResponse] -> ShowS
ListBucketIntelligentTieringConfigurationsResponse -> String
(Int
 -> ListBucketIntelligentTieringConfigurationsResponse -> ShowS)
-> (ListBucketIntelligentTieringConfigurationsResponse -> String)
-> ([ListBucketIntelligentTieringConfigurationsResponse] -> ShowS)
-> Show ListBucketIntelligentTieringConfigurationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBucketIntelligentTieringConfigurationsResponse] -> ShowS
$cshowList :: [ListBucketIntelligentTieringConfigurationsResponse] -> ShowS
show :: ListBucketIntelligentTieringConfigurationsResponse -> String
$cshow :: ListBucketIntelligentTieringConfigurationsResponse -> String
showsPrec :: Int -> ListBucketIntelligentTieringConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> ListBucketIntelligentTieringConfigurationsResponse -> ShowS
Prelude.Show, (forall x.
 ListBucketIntelligentTieringConfigurationsResponse
 -> Rep ListBucketIntelligentTieringConfigurationsResponse x)
-> (forall x.
    Rep ListBucketIntelligentTieringConfigurationsResponse x
    -> ListBucketIntelligentTieringConfigurationsResponse)
-> Generic ListBucketIntelligentTieringConfigurationsResponse
forall x.
Rep ListBucketIntelligentTieringConfigurationsResponse x
-> ListBucketIntelligentTieringConfigurationsResponse
forall x.
ListBucketIntelligentTieringConfigurationsResponse
-> Rep ListBucketIntelligentTieringConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBucketIntelligentTieringConfigurationsResponse x
-> ListBucketIntelligentTieringConfigurationsResponse
$cfrom :: forall x.
ListBucketIntelligentTieringConfigurationsResponse
-> Rep ListBucketIntelligentTieringConfigurationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBucketIntelligentTieringConfigurationsResponse' 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:
--
-- 'intelligentTieringConfigurationList', 'listBucketIntelligentTieringConfigurationsResponse_intelligentTieringConfigurationList' - The list of S3 Intelligent-Tiering configurations for a bucket.
--
-- 'continuationToken', 'listBucketIntelligentTieringConfigurationsResponse_continuationToken' - The ContinuationToken that represents a placeholder from where this
-- request should begin.
--
-- 'nextContinuationToken', 'listBucketIntelligentTieringConfigurationsResponse_nextContinuationToken' - The marker used to continue this inventory configuration listing. Use
-- the @NextContinuationToken@ from this response to continue the listing
-- in a subsequent request. The continuation token is an opaque value that
-- Amazon S3 understands.
--
-- 'isTruncated', 'listBucketIntelligentTieringConfigurationsResponse_isTruncated' - Indicates whether the returned list of analytics configurations is
-- complete. A value of true indicates that the list is not complete and
-- the NextContinuationToken will be provided for a subsequent request.
--
-- 'httpStatus', 'listBucketIntelligentTieringConfigurationsResponse_httpStatus' - The response's http status code.
newListBucketIntelligentTieringConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBucketIntelligentTieringConfigurationsResponse
newListBucketIntelligentTieringConfigurationsResponse :: Int -> ListBucketIntelligentTieringConfigurationsResponse
newListBucketIntelligentTieringConfigurationsResponse
  Int
pHttpStatus_ =
    ListBucketIntelligentTieringConfigurationsResponse' :: Maybe [IntelligentTieringConfiguration]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> ListBucketIntelligentTieringConfigurationsResponse
ListBucketIntelligentTieringConfigurationsResponse'
      { $sel:intelligentTieringConfigurationList:ListBucketIntelligentTieringConfigurationsResponse' :: Maybe [IntelligentTieringConfiguration]
intelligentTieringConfigurationList =
          Maybe [IntelligentTieringConfiguration]
forall a. Maybe a
Prelude.Nothing,
        $sel:continuationToken:ListBucketIntelligentTieringConfigurationsResponse' :: Maybe Text
continuationToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:nextContinuationToken:ListBucketIntelligentTieringConfigurationsResponse' :: Maybe Text
nextContinuationToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:isTruncated:ListBucketIntelligentTieringConfigurationsResponse' :: Maybe Bool
isTruncated =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListBucketIntelligentTieringConfigurationsResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The list of S3 Intelligent-Tiering configurations for a bucket.
listBucketIntelligentTieringConfigurationsResponse_intelligentTieringConfigurationList :: Lens.Lens' ListBucketIntelligentTieringConfigurationsResponse (Prelude.Maybe [IntelligentTieringConfiguration])
listBucketIntelligentTieringConfigurationsResponse_intelligentTieringConfigurationList :: (Maybe [IntelligentTieringConfiguration]
 -> f (Maybe [IntelligentTieringConfiguration]))
-> ListBucketIntelligentTieringConfigurationsResponse
-> f ListBucketIntelligentTieringConfigurationsResponse
listBucketIntelligentTieringConfigurationsResponse_intelligentTieringConfigurationList = (ListBucketIntelligentTieringConfigurationsResponse
 -> Maybe [IntelligentTieringConfiguration])
-> (ListBucketIntelligentTieringConfigurationsResponse
    -> Maybe [IntelligentTieringConfiguration]
    -> ListBucketIntelligentTieringConfigurationsResponse)
-> Lens
     ListBucketIntelligentTieringConfigurationsResponse
     ListBucketIntelligentTieringConfigurationsResponse
     (Maybe [IntelligentTieringConfiguration])
     (Maybe [IntelligentTieringConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketIntelligentTieringConfigurationsResponse' {Maybe [IntelligentTieringConfiguration]
intelligentTieringConfigurationList :: Maybe [IntelligentTieringConfiguration]
$sel:intelligentTieringConfigurationList:ListBucketIntelligentTieringConfigurationsResponse' :: ListBucketIntelligentTieringConfigurationsResponse
-> Maybe [IntelligentTieringConfiguration]
intelligentTieringConfigurationList} -> Maybe [IntelligentTieringConfiguration]
intelligentTieringConfigurationList) (\s :: ListBucketIntelligentTieringConfigurationsResponse
s@ListBucketIntelligentTieringConfigurationsResponse' {} Maybe [IntelligentTieringConfiguration]
a -> ListBucketIntelligentTieringConfigurationsResponse
s {$sel:intelligentTieringConfigurationList:ListBucketIntelligentTieringConfigurationsResponse' :: Maybe [IntelligentTieringConfiguration]
intelligentTieringConfigurationList = Maybe [IntelligentTieringConfiguration]
a} :: ListBucketIntelligentTieringConfigurationsResponse) ((Maybe [IntelligentTieringConfiguration]
  -> f (Maybe [IntelligentTieringConfiguration]))
 -> ListBucketIntelligentTieringConfigurationsResponse
 -> f ListBucketIntelligentTieringConfigurationsResponse)
-> ((Maybe [IntelligentTieringConfiguration]
     -> f (Maybe [IntelligentTieringConfiguration]))
    -> Maybe [IntelligentTieringConfiguration]
    -> f (Maybe [IntelligentTieringConfiguration]))
-> (Maybe [IntelligentTieringConfiguration]
    -> f (Maybe [IntelligentTieringConfiguration]))
-> ListBucketIntelligentTieringConfigurationsResponse
-> f ListBucketIntelligentTieringConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [IntelligentTieringConfiguration]
  [IntelligentTieringConfiguration]
  [IntelligentTieringConfiguration]
  [IntelligentTieringConfiguration]
-> Iso
     (Maybe [IntelligentTieringConfiguration])
     (Maybe [IntelligentTieringConfiguration])
     (Maybe [IntelligentTieringConfiguration])
     (Maybe [IntelligentTieringConfiguration])
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 AnIso
  [IntelligentTieringConfiguration]
  [IntelligentTieringConfiguration]
  [IntelligentTieringConfiguration]
  [IntelligentTieringConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ContinuationToken that represents a placeholder from where this
-- request should begin.
listBucketIntelligentTieringConfigurationsResponse_continuationToken :: Lens.Lens' ListBucketIntelligentTieringConfigurationsResponse (Prelude.Maybe Prelude.Text)
listBucketIntelligentTieringConfigurationsResponse_continuationToken :: (Maybe Text -> f (Maybe Text))
-> ListBucketIntelligentTieringConfigurationsResponse
-> f ListBucketIntelligentTieringConfigurationsResponse
listBucketIntelligentTieringConfigurationsResponse_continuationToken = (ListBucketIntelligentTieringConfigurationsResponse -> Maybe Text)
-> (ListBucketIntelligentTieringConfigurationsResponse
    -> Maybe Text
    -> ListBucketIntelligentTieringConfigurationsResponse)
-> Lens
     ListBucketIntelligentTieringConfigurationsResponse
     ListBucketIntelligentTieringConfigurationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketIntelligentTieringConfigurationsResponse' {Maybe Text
continuationToken :: Maybe Text
$sel:continuationToken:ListBucketIntelligentTieringConfigurationsResponse' :: ListBucketIntelligentTieringConfigurationsResponse -> Maybe Text
continuationToken} -> Maybe Text
continuationToken) (\s :: ListBucketIntelligentTieringConfigurationsResponse
s@ListBucketIntelligentTieringConfigurationsResponse' {} Maybe Text
a -> ListBucketIntelligentTieringConfigurationsResponse
s {$sel:continuationToken:ListBucketIntelligentTieringConfigurationsResponse' :: Maybe Text
continuationToken = Maybe Text
a} :: ListBucketIntelligentTieringConfigurationsResponse)

-- | The marker used to continue this inventory configuration listing. Use
-- the @NextContinuationToken@ from this response to continue the listing
-- in a subsequent request. The continuation token is an opaque value that
-- Amazon S3 understands.
listBucketIntelligentTieringConfigurationsResponse_nextContinuationToken :: Lens.Lens' ListBucketIntelligentTieringConfigurationsResponse (Prelude.Maybe Prelude.Text)
listBucketIntelligentTieringConfigurationsResponse_nextContinuationToken :: (Maybe Text -> f (Maybe Text))
-> ListBucketIntelligentTieringConfigurationsResponse
-> f ListBucketIntelligentTieringConfigurationsResponse
listBucketIntelligentTieringConfigurationsResponse_nextContinuationToken = (ListBucketIntelligentTieringConfigurationsResponse -> Maybe Text)
-> (ListBucketIntelligentTieringConfigurationsResponse
    -> Maybe Text
    -> ListBucketIntelligentTieringConfigurationsResponse)
-> Lens
     ListBucketIntelligentTieringConfigurationsResponse
     ListBucketIntelligentTieringConfigurationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketIntelligentTieringConfigurationsResponse' {Maybe Text
nextContinuationToken :: Maybe Text
$sel:nextContinuationToken:ListBucketIntelligentTieringConfigurationsResponse' :: ListBucketIntelligentTieringConfigurationsResponse -> Maybe Text
nextContinuationToken} -> Maybe Text
nextContinuationToken) (\s :: ListBucketIntelligentTieringConfigurationsResponse
s@ListBucketIntelligentTieringConfigurationsResponse' {} Maybe Text
a -> ListBucketIntelligentTieringConfigurationsResponse
s {$sel:nextContinuationToken:ListBucketIntelligentTieringConfigurationsResponse' :: Maybe Text
nextContinuationToken = Maybe Text
a} :: ListBucketIntelligentTieringConfigurationsResponse)

-- | Indicates whether the returned list of analytics configurations is
-- complete. A value of true indicates that the list is not complete and
-- the NextContinuationToken will be provided for a subsequent request.
listBucketIntelligentTieringConfigurationsResponse_isTruncated :: Lens.Lens' ListBucketIntelligentTieringConfigurationsResponse (Prelude.Maybe Prelude.Bool)
listBucketIntelligentTieringConfigurationsResponse_isTruncated :: (Maybe Bool -> f (Maybe Bool))
-> ListBucketIntelligentTieringConfigurationsResponse
-> f ListBucketIntelligentTieringConfigurationsResponse
listBucketIntelligentTieringConfigurationsResponse_isTruncated = (ListBucketIntelligentTieringConfigurationsResponse -> Maybe Bool)
-> (ListBucketIntelligentTieringConfigurationsResponse
    -> Maybe Bool
    -> ListBucketIntelligentTieringConfigurationsResponse)
-> Lens
     ListBucketIntelligentTieringConfigurationsResponse
     ListBucketIntelligentTieringConfigurationsResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketIntelligentTieringConfigurationsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListBucketIntelligentTieringConfigurationsResponse' :: ListBucketIntelligentTieringConfigurationsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListBucketIntelligentTieringConfigurationsResponse
s@ListBucketIntelligentTieringConfigurationsResponse' {} Maybe Bool
a -> ListBucketIntelligentTieringConfigurationsResponse
s {$sel:isTruncated:ListBucketIntelligentTieringConfigurationsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListBucketIntelligentTieringConfigurationsResponse)

-- | The response's http status code.
listBucketIntelligentTieringConfigurationsResponse_httpStatus :: Lens.Lens' ListBucketIntelligentTieringConfigurationsResponse Prelude.Int
listBucketIntelligentTieringConfigurationsResponse_httpStatus :: (Int -> f Int)
-> ListBucketIntelligentTieringConfigurationsResponse
-> f ListBucketIntelligentTieringConfigurationsResponse
listBucketIntelligentTieringConfigurationsResponse_httpStatus = (ListBucketIntelligentTieringConfigurationsResponse -> Int)
-> (ListBucketIntelligentTieringConfigurationsResponse
    -> Int -> ListBucketIntelligentTieringConfigurationsResponse)
-> Lens
     ListBucketIntelligentTieringConfigurationsResponse
     ListBucketIntelligentTieringConfigurationsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBucketIntelligentTieringConfigurationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListBucketIntelligentTieringConfigurationsResponse' :: ListBucketIntelligentTieringConfigurationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListBucketIntelligentTieringConfigurationsResponse
s@ListBucketIntelligentTieringConfigurationsResponse' {} Int
a -> ListBucketIntelligentTieringConfigurationsResponse
s {$sel:httpStatus:ListBucketIntelligentTieringConfigurationsResponse' :: Int
httpStatus = Int
a} :: ListBucketIntelligentTieringConfigurationsResponse)

instance
  Prelude.NFData
    ListBucketIntelligentTieringConfigurationsResponse