{-# 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.GetBucketAnalyticsConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- This implementation of the GET action returns an analytics configuration
-- (identified by the analytics configuration ID) from the bucket.
--
-- To use this operation, you must have permissions to perform the
-- @s3:GetAnalyticsConfiguration@ action. The bucket owner has this
-- permission by default. The bucket owner can grant this permission to
-- others. For more information about permissions, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources Permissions Related to Bucket Subresource Operations>
-- and
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html Managing Access Permissions to Your Amazon S3 Resources>
-- in the /Amazon S3 User Guide/.
--
-- For information about Amazon S3 analytics feature, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html Amazon S3 Analytics – Storage Class Analysis>
-- in the /Amazon S3 User Guide/.
--
-- __Related Resources__
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html DeleteBucketAnalyticsConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html ListBucketAnalyticsConfigurations>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html PutBucketAnalyticsConfiguration>
module Amazonka.S3.GetBucketAnalyticsConfiguration
  ( -- * Creating a Request
    GetBucketAnalyticsConfiguration (..),
    newGetBucketAnalyticsConfiguration,

    -- * Request Lenses
    getBucketAnalyticsConfiguration_expectedBucketOwner,
    getBucketAnalyticsConfiguration_bucket,
    getBucketAnalyticsConfiguration_id,

    -- * Destructuring the Response
    GetBucketAnalyticsConfigurationResponse (..),
    newGetBucketAnalyticsConfigurationResponse,

    -- * Response Lenses
    getBucketAnalyticsConfigurationResponse_analyticsConfiguration,
    getBucketAnalyticsConfigurationResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetBucketAnalyticsConfiguration' smart constructor.
data GetBucketAnalyticsConfiguration = GetBucketAnalyticsConfiguration'
  { -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request fails with the HTTP status code
    -- @403 Forbidden@ (access denied).
    GetBucketAnalyticsConfiguration -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket from which an analytics configuration is
    -- retrieved.
    GetBucketAnalyticsConfiguration -> BucketName
bucket :: BucketName,
    -- | The ID that identifies the analytics configuration.
    GetBucketAnalyticsConfiguration -> Text
id :: Prelude.Text
  }
  deriving (GetBucketAnalyticsConfiguration
-> GetBucketAnalyticsConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketAnalyticsConfiguration
-> GetBucketAnalyticsConfiguration -> Bool
$c/= :: GetBucketAnalyticsConfiguration
-> GetBucketAnalyticsConfiguration -> Bool
== :: GetBucketAnalyticsConfiguration
-> GetBucketAnalyticsConfiguration -> Bool
$c== :: GetBucketAnalyticsConfiguration
-> GetBucketAnalyticsConfiguration -> Bool
Prelude.Eq, ReadPrec [GetBucketAnalyticsConfiguration]
ReadPrec GetBucketAnalyticsConfiguration
Int -> ReadS GetBucketAnalyticsConfiguration
ReadS [GetBucketAnalyticsConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketAnalyticsConfiguration]
$creadListPrec :: ReadPrec [GetBucketAnalyticsConfiguration]
readPrec :: ReadPrec GetBucketAnalyticsConfiguration
$creadPrec :: ReadPrec GetBucketAnalyticsConfiguration
readList :: ReadS [GetBucketAnalyticsConfiguration]
$creadList :: ReadS [GetBucketAnalyticsConfiguration]
readsPrec :: Int -> ReadS GetBucketAnalyticsConfiguration
$creadsPrec :: Int -> ReadS GetBucketAnalyticsConfiguration
Prelude.Read, Int -> GetBucketAnalyticsConfiguration -> ShowS
[GetBucketAnalyticsConfiguration] -> ShowS
GetBucketAnalyticsConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketAnalyticsConfiguration] -> ShowS
$cshowList :: [GetBucketAnalyticsConfiguration] -> ShowS
show :: GetBucketAnalyticsConfiguration -> String
$cshow :: GetBucketAnalyticsConfiguration -> String
showsPrec :: Int -> GetBucketAnalyticsConfiguration -> ShowS
$cshowsPrec :: Int -> GetBucketAnalyticsConfiguration -> ShowS
Prelude.Show, forall x.
Rep GetBucketAnalyticsConfiguration x
-> GetBucketAnalyticsConfiguration
forall x.
GetBucketAnalyticsConfiguration
-> Rep GetBucketAnalyticsConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketAnalyticsConfiguration x
-> GetBucketAnalyticsConfiguration
$cfrom :: forall x.
GetBucketAnalyticsConfiguration
-> Rep GetBucketAnalyticsConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketAnalyticsConfiguration' 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:
--
-- 'expectedBucketOwner', 'getBucketAnalyticsConfiguration_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request fails with the HTTP status code
-- @403 Forbidden@ (access denied).
--
-- 'bucket', 'getBucketAnalyticsConfiguration_bucket' - The name of the bucket from which an analytics configuration is
-- retrieved.
--
-- 'id', 'getBucketAnalyticsConfiguration_id' - The ID that identifies the analytics configuration.
newGetBucketAnalyticsConfiguration ::
  -- | 'bucket'
  BucketName ->
  -- | 'id'
  Prelude.Text ->
  GetBucketAnalyticsConfiguration
newGetBucketAnalyticsConfiguration :: BucketName -> Text -> GetBucketAnalyticsConfiguration
newGetBucketAnalyticsConfiguration BucketName
pBucket_ Text
pId_ =
  GetBucketAnalyticsConfiguration'
    { $sel:expectedBucketOwner:GetBucketAnalyticsConfiguration' :: Maybe Text
expectedBucketOwner =
        forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:GetBucketAnalyticsConfiguration' :: BucketName
bucket = BucketName
pBucket_,
      $sel:id:GetBucketAnalyticsConfiguration' :: Text
id = Text
pId_
    }

-- | The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request fails with the HTTP status code
-- @403 Forbidden@ (access denied).
getBucketAnalyticsConfiguration_expectedBucketOwner :: Lens.Lens' GetBucketAnalyticsConfiguration (Prelude.Maybe Prelude.Text)
getBucketAnalyticsConfiguration_expectedBucketOwner :: Lens' GetBucketAnalyticsConfiguration (Maybe Text)
getBucketAnalyticsConfiguration_expectedBucketOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketAnalyticsConfiguration' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: GetBucketAnalyticsConfiguration
s@GetBucketAnalyticsConfiguration' {} Maybe Text
a -> GetBucketAnalyticsConfiguration
s {$sel:expectedBucketOwner:GetBucketAnalyticsConfiguration' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: GetBucketAnalyticsConfiguration)

-- | The name of the bucket from which an analytics configuration is
-- retrieved.
getBucketAnalyticsConfiguration_bucket :: Lens.Lens' GetBucketAnalyticsConfiguration BucketName
getBucketAnalyticsConfiguration_bucket :: Lens' GetBucketAnalyticsConfiguration BucketName
getBucketAnalyticsConfiguration_bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketAnalyticsConfiguration' {BucketName
bucket :: BucketName
$sel:bucket:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> BucketName
bucket} -> BucketName
bucket) (\s :: GetBucketAnalyticsConfiguration
s@GetBucketAnalyticsConfiguration' {} BucketName
a -> GetBucketAnalyticsConfiguration
s {$sel:bucket:GetBucketAnalyticsConfiguration' :: BucketName
bucket = BucketName
a} :: GetBucketAnalyticsConfiguration)

-- | The ID that identifies the analytics configuration.
getBucketAnalyticsConfiguration_id :: Lens.Lens' GetBucketAnalyticsConfiguration Prelude.Text
getBucketAnalyticsConfiguration_id :: Lens' GetBucketAnalyticsConfiguration Text
getBucketAnalyticsConfiguration_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketAnalyticsConfiguration' {Text
id :: Text
$sel:id:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Text
id} -> Text
id) (\s :: GetBucketAnalyticsConfiguration
s@GetBucketAnalyticsConfiguration' {} Text
a -> GetBucketAnalyticsConfiguration
s {$sel:id:GetBucketAnalyticsConfiguration' :: Text
id = Text
a} :: GetBucketAnalyticsConfiguration)

instance
  Core.AWSRequest
    GetBucketAnalyticsConfiguration
  where
  type
    AWSResponse GetBucketAnalyticsConfiguration =
      GetBucketAnalyticsConfigurationResponse
  request :: (Service -> Service)
-> GetBucketAnalyticsConfiguration
-> Request GetBucketAnalyticsConfiguration
request Service -> Service
overrides =
    forall a. Request a -> Request a
Request.s3vhost
      forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetBucketAnalyticsConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetBucketAnalyticsConfiguration)))
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 AnalyticsConfiguration
-> Int -> GetBucketAnalyticsConfigurationResponse
GetBucketAnalyticsConfigurationResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall a. FromXML a => [Node] -> Either String a
Data.parseXML [Node]
x)
            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
    GetBucketAnalyticsConfiguration
  where
  hashWithSalt :: Int -> GetBucketAnalyticsConfiguration -> Int
hashWithSalt
    Int
_salt
    GetBucketAnalyticsConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Text
$sel:bucket:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedBucketOwner
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BucketName
bucket
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id

instance
  Prelude.NFData
    GetBucketAnalyticsConfiguration
  where
  rnf :: GetBucketAnalyticsConfiguration -> ()
rnf GetBucketAnalyticsConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Text
$sel:bucket:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expectedBucketOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BucketName
bucket
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id

instance
  Data.ToHeaders
    GetBucketAnalyticsConfiguration
  where
  toHeaders :: GetBucketAnalyticsConfiguration -> ResponseHeaders
toHeaders GetBucketAnalyticsConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Text
$sel:bucket:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"x-amz-expected-bucket-owner"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
expectedBucketOwner
      ]

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

instance Data.ToQuery GetBucketAnalyticsConfiguration where
  toQuery :: GetBucketAnalyticsConfiguration -> QueryString
toQuery GetBucketAnalyticsConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Text
$sel:bucket:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketAnalyticsConfiguration' :: GetBucketAnalyticsConfiguration -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"id" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
id, QueryString
"analytics"]

-- | /See:/ 'newGetBucketAnalyticsConfigurationResponse' smart constructor.
data GetBucketAnalyticsConfigurationResponse = GetBucketAnalyticsConfigurationResponse'
  { -- | The configuration and any analyses for the analytics filter.
    GetBucketAnalyticsConfigurationResponse
-> Maybe AnalyticsConfiguration
analyticsConfiguration :: Prelude.Maybe AnalyticsConfiguration,
    -- | The response's http status code.
    GetBucketAnalyticsConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBucketAnalyticsConfigurationResponse
-> GetBucketAnalyticsConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketAnalyticsConfigurationResponse
-> GetBucketAnalyticsConfigurationResponse -> Bool
$c/= :: GetBucketAnalyticsConfigurationResponse
-> GetBucketAnalyticsConfigurationResponse -> Bool
== :: GetBucketAnalyticsConfigurationResponse
-> GetBucketAnalyticsConfigurationResponse -> Bool
$c== :: GetBucketAnalyticsConfigurationResponse
-> GetBucketAnalyticsConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetBucketAnalyticsConfigurationResponse]
ReadPrec GetBucketAnalyticsConfigurationResponse
Int -> ReadS GetBucketAnalyticsConfigurationResponse
ReadS [GetBucketAnalyticsConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketAnalyticsConfigurationResponse]
$creadListPrec :: ReadPrec [GetBucketAnalyticsConfigurationResponse]
readPrec :: ReadPrec GetBucketAnalyticsConfigurationResponse
$creadPrec :: ReadPrec GetBucketAnalyticsConfigurationResponse
readList :: ReadS [GetBucketAnalyticsConfigurationResponse]
$creadList :: ReadS [GetBucketAnalyticsConfigurationResponse]
readsPrec :: Int -> ReadS GetBucketAnalyticsConfigurationResponse
$creadsPrec :: Int -> ReadS GetBucketAnalyticsConfigurationResponse
Prelude.Read, Int -> GetBucketAnalyticsConfigurationResponse -> ShowS
[GetBucketAnalyticsConfigurationResponse] -> ShowS
GetBucketAnalyticsConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketAnalyticsConfigurationResponse] -> ShowS
$cshowList :: [GetBucketAnalyticsConfigurationResponse] -> ShowS
show :: GetBucketAnalyticsConfigurationResponse -> String
$cshow :: GetBucketAnalyticsConfigurationResponse -> String
showsPrec :: Int -> GetBucketAnalyticsConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetBucketAnalyticsConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep GetBucketAnalyticsConfigurationResponse x
-> GetBucketAnalyticsConfigurationResponse
forall x.
GetBucketAnalyticsConfigurationResponse
-> Rep GetBucketAnalyticsConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketAnalyticsConfigurationResponse x
-> GetBucketAnalyticsConfigurationResponse
$cfrom :: forall x.
GetBucketAnalyticsConfigurationResponse
-> Rep GetBucketAnalyticsConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketAnalyticsConfigurationResponse' 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:
--
-- 'analyticsConfiguration', 'getBucketAnalyticsConfigurationResponse_analyticsConfiguration' - The configuration and any analyses for the analytics filter.
--
-- 'httpStatus', 'getBucketAnalyticsConfigurationResponse_httpStatus' - The response's http status code.
newGetBucketAnalyticsConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBucketAnalyticsConfigurationResponse
newGetBucketAnalyticsConfigurationResponse :: Int -> GetBucketAnalyticsConfigurationResponse
newGetBucketAnalyticsConfigurationResponse
  Int
pHttpStatus_ =
    GetBucketAnalyticsConfigurationResponse'
      { $sel:analyticsConfiguration:GetBucketAnalyticsConfigurationResponse' :: Maybe AnalyticsConfiguration
analyticsConfiguration =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetBucketAnalyticsConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The configuration and any analyses for the analytics filter.
getBucketAnalyticsConfigurationResponse_analyticsConfiguration :: Lens.Lens' GetBucketAnalyticsConfigurationResponse (Prelude.Maybe AnalyticsConfiguration)
getBucketAnalyticsConfigurationResponse_analyticsConfiguration :: Lens'
  GetBucketAnalyticsConfigurationResponse
  (Maybe AnalyticsConfiguration)
getBucketAnalyticsConfigurationResponse_analyticsConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketAnalyticsConfigurationResponse' {Maybe AnalyticsConfiguration
analyticsConfiguration :: Maybe AnalyticsConfiguration
$sel:analyticsConfiguration:GetBucketAnalyticsConfigurationResponse' :: GetBucketAnalyticsConfigurationResponse
-> Maybe AnalyticsConfiguration
analyticsConfiguration} -> Maybe AnalyticsConfiguration
analyticsConfiguration) (\s :: GetBucketAnalyticsConfigurationResponse
s@GetBucketAnalyticsConfigurationResponse' {} Maybe AnalyticsConfiguration
a -> GetBucketAnalyticsConfigurationResponse
s {$sel:analyticsConfiguration:GetBucketAnalyticsConfigurationResponse' :: Maybe AnalyticsConfiguration
analyticsConfiguration = Maybe AnalyticsConfiguration
a} :: GetBucketAnalyticsConfigurationResponse)

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

instance
  Prelude.NFData
    GetBucketAnalyticsConfigurationResponse
  where
  rnf :: GetBucketAnalyticsConfigurationResponse -> ()
rnf GetBucketAnalyticsConfigurationResponse' {Int
Maybe AnalyticsConfiguration
httpStatus :: Int
analyticsConfiguration :: Maybe AnalyticsConfiguration
$sel:httpStatus:GetBucketAnalyticsConfigurationResponse' :: GetBucketAnalyticsConfigurationResponse -> Int
$sel:analyticsConfiguration:GetBucketAnalyticsConfigurationResponse' :: GetBucketAnalyticsConfigurationResponse
-> Maybe AnalyticsConfiguration
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AnalyticsConfiguration
analyticsConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus