{-# 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.PutBucketMetricsConfiguration
-- 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)
--
-- Sets a metrics configuration (specified by the metrics configuration ID)
-- for the bucket. You can have up to 1,000 metrics configurations per
-- bucket. If you\'re updating an existing metrics configuration, note that
-- this is a full replacement of the existing metrics configuration. If you
-- don\'t include the elements you want to keep, they are erased.
--
-- To use this operation, you must have permissions to perform the
-- @s3:PutMetricsConfiguration@ 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 @PutBucketMetricsConfiguration@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html DeleteBucketMetricsConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html GetBucketMetricsConfiguration>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html ListBucketMetricsConfigurations>
--
-- @GetBucketLifecycle@ has the following special error:
--
-- -   Error code: @TooManyConfigurations@
--
--     -   Description: You are attempting to create a new configuration
--         but have already reached the 1,000-configuration limit.
--
--     -   HTTP Status Code: HTTP 400 Bad Request
module Amazonka.S3.PutBucketMetricsConfiguration
  ( -- * Creating a Request
    PutBucketMetricsConfiguration (..),
    newPutBucketMetricsConfiguration,

    -- * Request Lenses
    putBucketMetricsConfiguration_expectedBucketOwner,
    putBucketMetricsConfiguration_bucket,
    putBucketMetricsConfiguration_id,
    putBucketMetricsConfiguration_metricsConfiguration,

    -- * Destructuring the Response
    PutBucketMetricsConfigurationResponse (..),
    newPutBucketMetricsConfigurationResponse,
  )
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:/ 'newPutBucketMetricsConfiguration' smart constructor.
data PutBucketMetricsConfiguration = PutBucketMetricsConfiguration'
  { -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request will fail with an HTTP
    -- @403 (Access Denied)@ error.
    PutBucketMetricsConfiguration -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the bucket for which the metrics configuration is set.
    PutBucketMetricsConfiguration -> BucketName
bucket :: BucketName,
    -- | The ID used to identify the metrics configuration.
    PutBucketMetricsConfiguration -> Text
id :: Prelude.Text,
    -- | Specifies the metrics configuration.
    PutBucketMetricsConfiguration -> MetricsConfiguration
metricsConfiguration :: MetricsConfiguration
  }
  deriving (PutBucketMetricsConfiguration
-> PutBucketMetricsConfiguration -> Bool
(PutBucketMetricsConfiguration
 -> PutBucketMetricsConfiguration -> Bool)
-> (PutBucketMetricsConfiguration
    -> PutBucketMetricsConfiguration -> Bool)
-> Eq PutBucketMetricsConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBucketMetricsConfiguration
-> PutBucketMetricsConfiguration -> Bool
$c/= :: PutBucketMetricsConfiguration
-> PutBucketMetricsConfiguration -> Bool
== :: PutBucketMetricsConfiguration
-> PutBucketMetricsConfiguration -> Bool
$c== :: PutBucketMetricsConfiguration
-> PutBucketMetricsConfiguration -> Bool
Prelude.Eq, ReadPrec [PutBucketMetricsConfiguration]
ReadPrec PutBucketMetricsConfiguration
Int -> ReadS PutBucketMetricsConfiguration
ReadS [PutBucketMetricsConfiguration]
(Int -> ReadS PutBucketMetricsConfiguration)
-> ReadS [PutBucketMetricsConfiguration]
-> ReadPrec PutBucketMetricsConfiguration
-> ReadPrec [PutBucketMetricsConfiguration]
-> Read PutBucketMetricsConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBucketMetricsConfiguration]
$creadListPrec :: ReadPrec [PutBucketMetricsConfiguration]
readPrec :: ReadPrec PutBucketMetricsConfiguration
$creadPrec :: ReadPrec PutBucketMetricsConfiguration
readList :: ReadS [PutBucketMetricsConfiguration]
$creadList :: ReadS [PutBucketMetricsConfiguration]
readsPrec :: Int -> ReadS PutBucketMetricsConfiguration
$creadsPrec :: Int -> ReadS PutBucketMetricsConfiguration
Prelude.Read, Int -> PutBucketMetricsConfiguration -> ShowS
[PutBucketMetricsConfiguration] -> ShowS
PutBucketMetricsConfiguration -> String
(Int -> PutBucketMetricsConfiguration -> ShowS)
-> (PutBucketMetricsConfiguration -> String)
-> ([PutBucketMetricsConfiguration] -> ShowS)
-> Show PutBucketMetricsConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBucketMetricsConfiguration] -> ShowS
$cshowList :: [PutBucketMetricsConfiguration] -> ShowS
show :: PutBucketMetricsConfiguration -> String
$cshow :: PutBucketMetricsConfiguration -> String
showsPrec :: Int -> PutBucketMetricsConfiguration -> ShowS
$cshowsPrec :: Int -> PutBucketMetricsConfiguration -> ShowS
Prelude.Show, (forall x.
 PutBucketMetricsConfiguration
 -> Rep PutBucketMetricsConfiguration x)
-> (forall x.
    Rep PutBucketMetricsConfiguration x
    -> PutBucketMetricsConfiguration)
-> Generic PutBucketMetricsConfiguration
forall x.
Rep PutBucketMetricsConfiguration x
-> PutBucketMetricsConfiguration
forall x.
PutBucketMetricsConfiguration
-> Rep PutBucketMetricsConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutBucketMetricsConfiguration x
-> PutBucketMetricsConfiguration
$cfrom :: forall x.
PutBucketMetricsConfiguration
-> Rep PutBucketMetricsConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'PutBucketMetricsConfiguration' 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', 'putBucketMetricsConfiguration_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
--
-- 'bucket', 'putBucketMetricsConfiguration_bucket' - The name of the bucket for which the metrics configuration is set.
--
-- 'id', 'putBucketMetricsConfiguration_id' - The ID used to identify the metrics configuration.
--
-- 'metricsConfiguration', 'putBucketMetricsConfiguration_metricsConfiguration' - Specifies the metrics configuration.
newPutBucketMetricsConfiguration ::
  -- | 'bucket'
  BucketName ->
  -- | 'id'
  Prelude.Text ->
  -- | 'metricsConfiguration'
  MetricsConfiguration ->
  PutBucketMetricsConfiguration
newPutBucketMetricsConfiguration :: BucketName
-> Text -> MetricsConfiguration -> PutBucketMetricsConfiguration
newPutBucketMetricsConfiguration
  BucketName
pBucket_
  Text
pId_
  MetricsConfiguration
pMetricsConfiguration_ =
    PutBucketMetricsConfiguration' :: Maybe Text
-> BucketName
-> Text
-> MetricsConfiguration
-> PutBucketMetricsConfiguration
PutBucketMetricsConfiguration'
      { $sel:expectedBucketOwner:PutBucketMetricsConfiguration' :: Maybe Text
expectedBucketOwner =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:bucket:PutBucketMetricsConfiguration' :: BucketName
bucket = BucketName
pBucket_,
        $sel:id:PutBucketMetricsConfiguration' :: Text
id = Text
pId_,
        $sel:metricsConfiguration:PutBucketMetricsConfiguration' :: MetricsConfiguration
metricsConfiguration =
          MetricsConfiguration
pMetricsConfiguration_
      }

-- | The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
putBucketMetricsConfiguration_expectedBucketOwner :: Lens.Lens' PutBucketMetricsConfiguration (Prelude.Maybe Prelude.Text)
putBucketMetricsConfiguration_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> PutBucketMetricsConfiguration -> f PutBucketMetricsConfiguration
putBucketMetricsConfiguration_expectedBucketOwner = (PutBucketMetricsConfiguration -> Maybe Text)
-> (PutBucketMetricsConfiguration
    -> Maybe Text -> PutBucketMetricsConfiguration)
-> Lens
     PutBucketMetricsConfiguration
     PutBucketMetricsConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketMetricsConfiguration' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: PutBucketMetricsConfiguration
s@PutBucketMetricsConfiguration' {} Maybe Text
a -> PutBucketMetricsConfiguration
s {$sel:expectedBucketOwner:PutBucketMetricsConfiguration' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: PutBucketMetricsConfiguration)

-- | The name of the bucket for which the metrics configuration is set.
putBucketMetricsConfiguration_bucket :: Lens.Lens' PutBucketMetricsConfiguration BucketName
putBucketMetricsConfiguration_bucket :: (BucketName -> f BucketName)
-> PutBucketMetricsConfiguration -> f PutBucketMetricsConfiguration
putBucketMetricsConfiguration_bucket = (PutBucketMetricsConfiguration -> BucketName)
-> (PutBucketMetricsConfiguration
    -> BucketName -> PutBucketMetricsConfiguration)
-> Lens
     PutBucketMetricsConfiguration
     PutBucketMetricsConfiguration
     BucketName
     BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketMetricsConfiguration' {BucketName
bucket :: BucketName
$sel:bucket:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> BucketName
bucket} -> BucketName
bucket) (\s :: PutBucketMetricsConfiguration
s@PutBucketMetricsConfiguration' {} BucketName
a -> PutBucketMetricsConfiguration
s {$sel:bucket:PutBucketMetricsConfiguration' :: BucketName
bucket = BucketName
a} :: PutBucketMetricsConfiguration)

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

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

instance
  Core.AWSRequest
    PutBucketMetricsConfiguration
  where
  type
    AWSResponse PutBucketMetricsConfiguration =
      PutBucketMetricsConfigurationResponse
  request :: PutBucketMetricsConfiguration
-> Request PutBucketMetricsConfiguration
request =
    Request PutBucketMetricsConfiguration
-> Request PutBucketMetricsConfiguration
forall a. Request a -> Request a
Request.s3vhost
      (Request PutBucketMetricsConfiguration
 -> Request PutBucketMetricsConfiguration)
-> (PutBucketMetricsConfiguration
    -> Request PutBucketMetricsConfiguration)
-> PutBucketMetricsConfiguration
-> Request PutBucketMetricsConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service
-> PutBucketMetricsConfiguration
-> Request PutBucketMetricsConfiguration
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.putXML Service
defaultService
  response :: Logger
-> Service
-> Proxy PutBucketMetricsConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutBucketMetricsConfiguration)))
response =
    AWSResponse PutBucketMetricsConfiguration
-> Logger
-> Service
-> Proxy PutBucketMetricsConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutBucketMetricsConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse PutBucketMetricsConfiguration
PutBucketMetricsConfigurationResponse
PutBucketMetricsConfigurationResponse'

instance
  Prelude.Hashable
    PutBucketMetricsConfiguration

instance Prelude.NFData PutBucketMetricsConfiguration

instance Core.ToElement PutBucketMetricsConfiguration where
  toElement :: PutBucketMetricsConfiguration -> Element
toElement PutBucketMetricsConfiguration' {Maybe Text
Text
BucketName
MetricsConfiguration
metricsConfiguration :: MetricsConfiguration
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:metricsConfiguration:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> MetricsConfiguration
$sel:id:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> Text
$sel:bucket:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> BucketName
$sel:expectedBucketOwner:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> Maybe Text
..} =
    Name -> MetricsConfiguration -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
      Name
"{http://s3.amazonaws.com/doc/2006-03-01/}MetricsConfiguration"
      MetricsConfiguration
metricsConfiguration

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

instance Core.ToPath PutBucketMetricsConfiguration where
  toPath :: PutBucketMetricsConfiguration -> ByteString
toPath PutBucketMetricsConfiguration' {Maybe Text
Text
BucketName
MetricsConfiguration
metricsConfiguration :: MetricsConfiguration
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:metricsConfiguration:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> MetricsConfiguration
$sel:id:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> Text
$sel:bucket:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> BucketName
$sel:expectedBucketOwner:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> 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 PutBucketMetricsConfiguration where
  toQuery :: PutBucketMetricsConfiguration -> QueryString
toQuery PutBucketMetricsConfiguration' {Maybe Text
Text
BucketName
MetricsConfiguration
metricsConfiguration :: MetricsConfiguration
id :: Text
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:metricsConfiguration:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> MetricsConfiguration
$sel:id:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> Text
$sel:bucket:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> BucketName
$sel:expectedBucketOwner:PutBucketMetricsConfiguration' :: PutBucketMetricsConfiguration -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"id" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
id, QueryString
"metrics"]

-- | /See:/ 'newPutBucketMetricsConfigurationResponse' smart constructor.
data PutBucketMetricsConfigurationResponse = PutBucketMetricsConfigurationResponse'
  {
  }
  deriving (PutBucketMetricsConfigurationResponse
-> PutBucketMetricsConfigurationResponse -> Bool
(PutBucketMetricsConfigurationResponse
 -> PutBucketMetricsConfigurationResponse -> Bool)
-> (PutBucketMetricsConfigurationResponse
    -> PutBucketMetricsConfigurationResponse -> Bool)
-> Eq PutBucketMetricsConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBucketMetricsConfigurationResponse
-> PutBucketMetricsConfigurationResponse -> Bool
$c/= :: PutBucketMetricsConfigurationResponse
-> PutBucketMetricsConfigurationResponse -> Bool
== :: PutBucketMetricsConfigurationResponse
-> PutBucketMetricsConfigurationResponse -> Bool
$c== :: PutBucketMetricsConfigurationResponse
-> PutBucketMetricsConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [PutBucketMetricsConfigurationResponse]
ReadPrec PutBucketMetricsConfigurationResponse
Int -> ReadS PutBucketMetricsConfigurationResponse
ReadS [PutBucketMetricsConfigurationResponse]
(Int -> ReadS PutBucketMetricsConfigurationResponse)
-> ReadS [PutBucketMetricsConfigurationResponse]
-> ReadPrec PutBucketMetricsConfigurationResponse
-> ReadPrec [PutBucketMetricsConfigurationResponse]
-> Read PutBucketMetricsConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBucketMetricsConfigurationResponse]
$creadListPrec :: ReadPrec [PutBucketMetricsConfigurationResponse]
readPrec :: ReadPrec PutBucketMetricsConfigurationResponse
$creadPrec :: ReadPrec PutBucketMetricsConfigurationResponse
readList :: ReadS [PutBucketMetricsConfigurationResponse]
$creadList :: ReadS [PutBucketMetricsConfigurationResponse]
readsPrec :: Int -> ReadS PutBucketMetricsConfigurationResponse
$creadsPrec :: Int -> ReadS PutBucketMetricsConfigurationResponse
Prelude.Read, Int -> PutBucketMetricsConfigurationResponse -> ShowS
[PutBucketMetricsConfigurationResponse] -> ShowS
PutBucketMetricsConfigurationResponse -> String
(Int -> PutBucketMetricsConfigurationResponse -> ShowS)
-> (PutBucketMetricsConfigurationResponse -> String)
-> ([PutBucketMetricsConfigurationResponse] -> ShowS)
-> Show PutBucketMetricsConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBucketMetricsConfigurationResponse] -> ShowS
$cshowList :: [PutBucketMetricsConfigurationResponse] -> ShowS
show :: PutBucketMetricsConfigurationResponse -> String
$cshow :: PutBucketMetricsConfigurationResponse -> String
showsPrec :: Int -> PutBucketMetricsConfigurationResponse -> ShowS
$cshowsPrec :: Int -> PutBucketMetricsConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 PutBucketMetricsConfigurationResponse
 -> Rep PutBucketMetricsConfigurationResponse x)
-> (forall x.
    Rep PutBucketMetricsConfigurationResponse x
    -> PutBucketMetricsConfigurationResponse)
-> Generic PutBucketMetricsConfigurationResponse
forall x.
Rep PutBucketMetricsConfigurationResponse x
-> PutBucketMetricsConfigurationResponse
forall x.
PutBucketMetricsConfigurationResponse
-> Rep PutBucketMetricsConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutBucketMetricsConfigurationResponse x
-> PutBucketMetricsConfigurationResponse
$cfrom :: forall x.
PutBucketMetricsConfigurationResponse
-> Rep PutBucketMetricsConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutBucketMetricsConfigurationResponse' 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.
newPutBucketMetricsConfigurationResponse ::
  PutBucketMetricsConfigurationResponse
newPutBucketMetricsConfigurationResponse :: PutBucketMetricsConfigurationResponse
newPutBucketMetricsConfigurationResponse =
  PutBucketMetricsConfigurationResponse
PutBucketMetricsConfigurationResponse'

instance
  Prelude.NFData
    PutBucketMetricsConfigurationResponse