{-# 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.GetBucketMetricsConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a metrics configuration (specified by the metrics configuration ID)
-- from the bucket. Note that this doesn\'t include the daily storage
-- metrics.
--
-- To use this operation, you must have permissions to perform the
-- @s3:GetMetricsConfiguration@ 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>.
--
-- For information about CloudWatch request metrics for Amazon S3, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html Monitoring Metrics with Amazon CloudWatch>.
--
-- The following operations are related to @GetBucketMetricsConfiguration@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html PutBucketMetricsConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html DeleteBucketMetricsConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html ListBucketMetricsConfigurations>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html Monitoring Metrics with Amazon CloudWatch>
module Amazonka.S3.GetBucketMetricsConfiguration
  ( -- * Creating a Request
    GetBucketMetricsConfiguration (..),
    newGetBucketMetricsConfiguration,

    -- * Request Lenses
    getBucketMetricsConfiguration_expectedBucketOwner,
    getBucketMetricsConfiguration_bucket,
    getBucketMetricsConfiguration_id,

    -- * Destructuring the Response
    GetBucketMetricsConfigurationResponse (..),
    newGetBucketMetricsConfigurationResponse,

    -- * Response Lenses
    getBucketMetricsConfigurationResponse_metricsConfiguration,
    getBucketMetricsConfigurationResponse_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:/ 'newGetBucketMetricsConfiguration' smart constructor.
data GetBucketMetricsConfiguration = GetBucketMetricsConfiguration'
  { -- | 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).
    GetBucketMetricsConfiguration -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket containing the metrics configuration to retrieve.
    GetBucketMetricsConfiguration -> BucketName
bucket :: BucketName,
    -- | The ID used to identify the metrics configuration.
    GetBucketMetricsConfiguration -> Text
id :: Prelude.Text
  }
  deriving (GetBucketMetricsConfiguration
-> GetBucketMetricsConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketMetricsConfiguration
-> GetBucketMetricsConfiguration -> Bool
$c/= :: GetBucketMetricsConfiguration
-> GetBucketMetricsConfiguration -> Bool
== :: GetBucketMetricsConfiguration
-> GetBucketMetricsConfiguration -> Bool
$c== :: GetBucketMetricsConfiguration
-> GetBucketMetricsConfiguration -> Bool
Prelude.Eq, ReadPrec [GetBucketMetricsConfiguration]
ReadPrec GetBucketMetricsConfiguration
Int -> ReadS GetBucketMetricsConfiguration
ReadS [GetBucketMetricsConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketMetricsConfiguration]
$creadListPrec :: ReadPrec [GetBucketMetricsConfiguration]
readPrec :: ReadPrec GetBucketMetricsConfiguration
$creadPrec :: ReadPrec GetBucketMetricsConfiguration
readList :: ReadS [GetBucketMetricsConfiguration]
$creadList :: ReadS [GetBucketMetricsConfiguration]
readsPrec :: Int -> ReadS GetBucketMetricsConfiguration
$creadsPrec :: Int -> ReadS GetBucketMetricsConfiguration
Prelude.Read, Int -> GetBucketMetricsConfiguration -> ShowS
[GetBucketMetricsConfiguration] -> ShowS
GetBucketMetricsConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketMetricsConfiguration] -> ShowS
$cshowList :: [GetBucketMetricsConfiguration] -> ShowS
show :: GetBucketMetricsConfiguration -> String
$cshow :: GetBucketMetricsConfiguration -> String
showsPrec :: Int -> GetBucketMetricsConfiguration -> ShowS
$cshowsPrec :: Int -> GetBucketMetricsConfiguration -> ShowS
Prelude.Show, forall x.
Rep GetBucketMetricsConfiguration x
-> GetBucketMetricsConfiguration
forall x.
GetBucketMetricsConfiguration
-> Rep GetBucketMetricsConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketMetricsConfiguration x
-> GetBucketMetricsConfiguration
$cfrom :: forall x.
GetBucketMetricsConfiguration
-> Rep GetBucketMetricsConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketMetricsConfiguration' 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', 'getBucketMetricsConfiguration_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', 'getBucketMetricsConfiguration_bucket' - The name of the bucket containing the metrics configuration to retrieve.
--
-- 'id', 'getBucketMetricsConfiguration_id' - The ID used to identify the metrics configuration.
newGetBucketMetricsConfiguration ::
  -- | 'bucket'
  BucketName ->
  -- | 'id'
  Prelude.Text ->
  GetBucketMetricsConfiguration
newGetBucketMetricsConfiguration :: BucketName -> Text -> GetBucketMetricsConfiguration
newGetBucketMetricsConfiguration BucketName
pBucket_ Text
pId_ =
  GetBucketMetricsConfiguration'
    { $sel:expectedBucketOwner:GetBucketMetricsConfiguration' :: Maybe Text
expectedBucketOwner =
        forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:GetBucketMetricsConfiguration' :: BucketName
bucket = BucketName
pBucket_,
      $sel:id:GetBucketMetricsConfiguration' :: 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).
getBucketMetricsConfiguration_expectedBucketOwner :: Lens.Lens' GetBucketMetricsConfiguration (Prelude.Maybe Prelude.Text)
getBucketMetricsConfiguration_expectedBucketOwner :: Lens' GetBucketMetricsConfiguration (Maybe Text)
getBucketMetricsConfiguration_expectedBucketOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricsConfiguration' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: GetBucketMetricsConfiguration
s@GetBucketMetricsConfiguration' {} Maybe Text
a -> GetBucketMetricsConfiguration
s {$sel:expectedBucketOwner:GetBucketMetricsConfiguration' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: GetBucketMetricsConfiguration)

-- | The name of the bucket containing the metrics configuration to retrieve.
getBucketMetricsConfiguration_bucket :: Lens.Lens' GetBucketMetricsConfiguration BucketName
getBucketMetricsConfiguration_bucket :: Lens' GetBucketMetricsConfiguration BucketName
getBucketMetricsConfiguration_bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricsConfiguration' {BucketName
bucket :: BucketName
$sel:bucket:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> BucketName
bucket} -> BucketName
bucket) (\s :: GetBucketMetricsConfiguration
s@GetBucketMetricsConfiguration' {} BucketName
a -> GetBucketMetricsConfiguration
s {$sel:bucket:GetBucketMetricsConfiguration' :: BucketName
bucket = BucketName
a} :: GetBucketMetricsConfiguration)

-- | The ID used to identify the metrics configuration.
getBucketMetricsConfiguration_id :: Lens.Lens' GetBucketMetricsConfiguration Prelude.Text
getBucketMetricsConfiguration_id :: Lens' GetBucketMetricsConfiguration Text
getBucketMetricsConfiguration_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricsConfiguration' {Text
id :: Text
$sel:id:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> Text
id} -> Text
id) (\s :: GetBucketMetricsConfiguration
s@GetBucketMetricsConfiguration' {} Text
a -> GetBucketMetricsConfiguration
s {$sel:id:GetBucketMetricsConfiguration' :: Text
id = Text
a} :: GetBucketMetricsConfiguration)

instance
  Core.AWSRequest
    GetBucketMetricsConfiguration
  where
  type
    AWSResponse GetBucketMetricsConfiguration =
      GetBucketMetricsConfigurationResponse
  request :: (Service -> Service)
-> GetBucketMetricsConfiguration
-> Request GetBucketMetricsConfiguration
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 GetBucketMetricsConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBucketMetricsConfiguration)))
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 MetricsConfiguration
-> Int -> GetBucketMetricsConfigurationResponse
GetBucketMetricsConfigurationResponse'
            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
    GetBucketMetricsConfiguration
  where
  hashWithSalt :: Int -> GetBucketMetricsConfiguration -> Int
hashWithSalt Int
_salt GetBucketMetricsConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> Text
$sel:bucket:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> 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 GetBucketMetricsConfiguration where
  rnf :: GetBucketMetricsConfiguration -> ()
rnf GetBucketMetricsConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> Text
$sel:bucket:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> 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 GetBucketMetricsConfiguration where
  toHeaders :: GetBucketMetricsConfiguration -> ResponseHeaders
toHeaders GetBucketMetricsConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> Text
$sel:bucket:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> 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 GetBucketMetricsConfiguration where
  toPath :: GetBucketMetricsConfiguration -> ByteString
toPath GetBucketMetricsConfiguration' {Maybe Text
Text
BucketName
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:id:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> Text
$sel:bucket:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> BucketName
$sel:expectedBucketOwner:GetBucketMetricsConfiguration' :: GetBucketMetricsConfiguration -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/", forall a. ToByteString a => a -> ByteString
Data.toBS BucketName
bucket]

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

-- | /See:/ 'newGetBucketMetricsConfigurationResponse' smart constructor.
data GetBucketMetricsConfigurationResponse = GetBucketMetricsConfigurationResponse'
  { -- | Specifies the metrics configuration.
    GetBucketMetricsConfigurationResponse -> Maybe MetricsConfiguration
metricsConfiguration :: Prelude.Maybe MetricsConfiguration,
    -- | The response's http status code.
    GetBucketMetricsConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBucketMetricsConfigurationResponse
-> GetBucketMetricsConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketMetricsConfigurationResponse
-> GetBucketMetricsConfigurationResponse -> Bool
$c/= :: GetBucketMetricsConfigurationResponse
-> GetBucketMetricsConfigurationResponse -> Bool
== :: GetBucketMetricsConfigurationResponse
-> GetBucketMetricsConfigurationResponse -> Bool
$c== :: GetBucketMetricsConfigurationResponse
-> GetBucketMetricsConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetBucketMetricsConfigurationResponse]
ReadPrec GetBucketMetricsConfigurationResponse
Int -> ReadS GetBucketMetricsConfigurationResponse
ReadS [GetBucketMetricsConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketMetricsConfigurationResponse]
$creadListPrec :: ReadPrec [GetBucketMetricsConfigurationResponse]
readPrec :: ReadPrec GetBucketMetricsConfigurationResponse
$creadPrec :: ReadPrec GetBucketMetricsConfigurationResponse
readList :: ReadS [GetBucketMetricsConfigurationResponse]
$creadList :: ReadS [GetBucketMetricsConfigurationResponse]
readsPrec :: Int -> ReadS GetBucketMetricsConfigurationResponse
$creadsPrec :: Int -> ReadS GetBucketMetricsConfigurationResponse
Prelude.Read, Int -> GetBucketMetricsConfigurationResponse -> ShowS
[GetBucketMetricsConfigurationResponse] -> ShowS
GetBucketMetricsConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketMetricsConfigurationResponse] -> ShowS
$cshowList :: [GetBucketMetricsConfigurationResponse] -> ShowS
show :: GetBucketMetricsConfigurationResponse -> String
$cshow :: GetBucketMetricsConfigurationResponse -> String
showsPrec :: Int -> GetBucketMetricsConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetBucketMetricsConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep GetBucketMetricsConfigurationResponse x
-> GetBucketMetricsConfigurationResponse
forall x.
GetBucketMetricsConfigurationResponse
-> Rep GetBucketMetricsConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketMetricsConfigurationResponse x
-> GetBucketMetricsConfigurationResponse
$cfrom :: forall x.
GetBucketMetricsConfigurationResponse
-> Rep GetBucketMetricsConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBucketMetricsConfigurationResponse' 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:
--
-- 'metricsConfiguration', 'getBucketMetricsConfigurationResponse_metricsConfiguration' - Specifies the metrics configuration.
--
-- 'httpStatus', 'getBucketMetricsConfigurationResponse_httpStatus' - The response's http status code.
newGetBucketMetricsConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBucketMetricsConfigurationResponse
newGetBucketMetricsConfigurationResponse :: Int -> GetBucketMetricsConfigurationResponse
newGetBucketMetricsConfigurationResponse Int
pHttpStatus_ =
  GetBucketMetricsConfigurationResponse'
    { $sel:metricsConfiguration:GetBucketMetricsConfigurationResponse' :: Maybe MetricsConfiguration
metricsConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBucketMetricsConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Specifies the metrics configuration.
getBucketMetricsConfigurationResponse_metricsConfiguration :: Lens.Lens' GetBucketMetricsConfigurationResponse (Prelude.Maybe MetricsConfiguration)
getBucketMetricsConfigurationResponse_metricsConfiguration :: Lens'
  GetBucketMetricsConfigurationResponse (Maybe MetricsConfiguration)
getBucketMetricsConfigurationResponse_metricsConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricsConfigurationResponse' {Maybe MetricsConfiguration
metricsConfiguration :: Maybe MetricsConfiguration
$sel:metricsConfiguration:GetBucketMetricsConfigurationResponse' :: GetBucketMetricsConfigurationResponse -> Maybe MetricsConfiguration
metricsConfiguration} -> Maybe MetricsConfiguration
metricsConfiguration) (\s :: GetBucketMetricsConfigurationResponse
s@GetBucketMetricsConfigurationResponse' {} Maybe MetricsConfiguration
a -> GetBucketMetricsConfigurationResponse
s {$sel:metricsConfiguration:GetBucketMetricsConfigurationResponse' :: Maybe MetricsConfiguration
metricsConfiguration = Maybe MetricsConfiguration
a} :: GetBucketMetricsConfigurationResponse)

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

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