{-# 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-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)
--
-- 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.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:/ '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 will fail with an HTTP
    -- @403 (Access Denied)@ error.
    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
(GetBucketAnalyticsConfiguration
 -> GetBucketAnalyticsConfiguration -> Bool)
-> (GetBucketAnalyticsConfiguration
    -> GetBucketAnalyticsConfiguration -> Bool)
-> Eq GetBucketAnalyticsConfiguration
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]
(Int -> ReadS GetBucketAnalyticsConfiguration)
-> ReadS [GetBucketAnalyticsConfiguration]
-> ReadPrec GetBucketAnalyticsConfiguration
-> ReadPrec [GetBucketAnalyticsConfiguration]
-> Read 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
(Int -> GetBucketAnalyticsConfiguration -> ShowS)
-> (GetBucketAnalyticsConfiguration -> String)
-> ([GetBucketAnalyticsConfiguration] -> ShowS)
-> Show GetBucketAnalyticsConfiguration
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.
 GetBucketAnalyticsConfiguration
 -> Rep GetBucketAnalyticsConfiguration x)
-> (forall x.
    Rep GetBucketAnalyticsConfiguration x
    -> GetBucketAnalyticsConfiguration)
-> Generic GetBucketAnalyticsConfiguration
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 will fail with an HTTP
-- @403 (Access Denied)@ error.
--
-- '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' :: Maybe Text -> BucketName -> Text -> GetBucketAnalyticsConfiguration
GetBucketAnalyticsConfiguration'
    { $sel:expectedBucketOwner:GetBucketAnalyticsConfiguration' :: Maybe Text
expectedBucketOwner =
        Maybe Text
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 will fail with an HTTP
-- @403 (Access Denied)@ error.
getBucketAnalyticsConfiguration_expectedBucketOwner :: Lens.Lens' GetBucketAnalyticsConfiguration (Prelude.Maybe Prelude.Text)
getBucketAnalyticsConfiguration_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> GetBucketAnalyticsConfiguration
-> f GetBucketAnalyticsConfiguration
getBucketAnalyticsConfiguration_expectedBucketOwner = (GetBucketAnalyticsConfiguration -> Maybe Text)
-> (GetBucketAnalyticsConfiguration
    -> Maybe Text -> GetBucketAnalyticsConfiguration)
-> Lens
     GetBucketAnalyticsConfiguration
     GetBucketAnalyticsConfiguration
     (Maybe Text)
     (Maybe Text)
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 :: (BucketName -> f BucketName)
-> GetBucketAnalyticsConfiguration
-> f GetBucketAnalyticsConfiguration
getBucketAnalyticsConfiguration_bucket = (GetBucketAnalyticsConfiguration -> BucketName)
-> (GetBucketAnalyticsConfiguration
    -> BucketName -> GetBucketAnalyticsConfiguration)
-> Lens
     GetBucketAnalyticsConfiguration
     GetBucketAnalyticsConfiguration
     BucketName
     BucketName
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 :: (Text -> f Text)
-> GetBucketAnalyticsConfiguration
-> f GetBucketAnalyticsConfiguration
getBucketAnalyticsConfiguration_id = (GetBucketAnalyticsConfiguration -> Text)
-> (GetBucketAnalyticsConfiguration
    -> Text -> GetBucketAnalyticsConfiguration)
-> Lens
     GetBucketAnalyticsConfiguration
     GetBucketAnalyticsConfiguration
     Text
     Text
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 :: GetBucketAnalyticsConfiguration
-> Request GetBucketAnalyticsConfiguration
request =
    Request GetBucketAnalyticsConfiguration
-> Request GetBucketAnalyticsConfiguration
forall a. Request a -> Request a
Request.s3vhost
      (Request GetBucketAnalyticsConfiguration
 -> Request GetBucketAnalyticsConfiguration)
-> (GetBucketAnalyticsConfiguration
    -> Request GetBucketAnalyticsConfiguration)
-> GetBucketAnalyticsConfiguration
-> Request GetBucketAnalyticsConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service
-> GetBucketAnalyticsConfiguration
-> Request GetBucketAnalyticsConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetBucketAnalyticsConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetBucketAnalyticsConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse GetBucketAnalyticsConfiguration))
-> Logger
-> Service
-> Proxy GetBucketAnalyticsConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetBucketAnalyticsConfiguration)))
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 AnalyticsConfiguration
-> Int -> GetBucketAnalyticsConfigurationResponse
GetBucketAnalyticsConfigurationResponse'
            (Maybe AnalyticsConfiguration
 -> Int -> GetBucketAnalyticsConfigurationResponse)
-> Either String (Maybe AnalyticsConfiguration)
-> Either String (Int -> GetBucketAnalyticsConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node] -> Either String (Maybe AnalyticsConfiguration)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
            Either String (Int -> GetBucketAnalyticsConfigurationResponse)
-> Either String Int
-> Either String GetBucketAnalyticsConfigurationResponse
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
    GetBucketAnalyticsConfiguration

instance
  Prelude.NFData
    GetBucketAnalyticsConfiguration

instance
  Core.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
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"x-amz-expected-bucket-owner"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
expectedBucketOwner
      ]

instance Core.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
..} =
    [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 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
..} =
    [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
"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
(GetBucketAnalyticsConfigurationResponse
 -> GetBucketAnalyticsConfigurationResponse -> Bool)
-> (GetBucketAnalyticsConfigurationResponse
    -> GetBucketAnalyticsConfigurationResponse -> Bool)
-> Eq GetBucketAnalyticsConfigurationResponse
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]
(Int -> ReadS GetBucketAnalyticsConfigurationResponse)
-> ReadS [GetBucketAnalyticsConfigurationResponse]
-> ReadPrec GetBucketAnalyticsConfigurationResponse
-> ReadPrec [GetBucketAnalyticsConfigurationResponse]
-> Read 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
(Int -> GetBucketAnalyticsConfigurationResponse -> ShowS)
-> (GetBucketAnalyticsConfigurationResponse -> String)
-> ([GetBucketAnalyticsConfigurationResponse] -> ShowS)
-> Show GetBucketAnalyticsConfigurationResponse
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.
 GetBucketAnalyticsConfigurationResponse
 -> Rep GetBucketAnalyticsConfigurationResponse x)
-> (forall x.
    Rep GetBucketAnalyticsConfigurationResponse x
    -> GetBucketAnalyticsConfigurationResponse)
-> Generic GetBucketAnalyticsConfigurationResponse
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' :: Maybe AnalyticsConfiguration
-> Int -> GetBucketAnalyticsConfigurationResponse
GetBucketAnalyticsConfigurationResponse'
      { $sel:analyticsConfiguration:GetBucketAnalyticsConfigurationResponse' :: Maybe AnalyticsConfiguration
analyticsConfiguration =
          Maybe 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 :: (Maybe AnalyticsConfiguration -> f (Maybe AnalyticsConfiguration))
-> GetBucketAnalyticsConfigurationResponse
-> f GetBucketAnalyticsConfigurationResponse
getBucketAnalyticsConfigurationResponse_analyticsConfiguration = (GetBucketAnalyticsConfigurationResponse
 -> Maybe AnalyticsConfiguration)
-> (GetBucketAnalyticsConfigurationResponse
    -> Maybe AnalyticsConfiguration
    -> GetBucketAnalyticsConfigurationResponse)
-> Lens
     GetBucketAnalyticsConfigurationResponse
     GetBucketAnalyticsConfigurationResponse
     (Maybe AnalyticsConfiguration)
     (Maybe 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 :: (Int -> f Int)
-> GetBucketAnalyticsConfigurationResponse
-> f GetBucketAnalyticsConfigurationResponse
getBucketAnalyticsConfigurationResponse_httpStatus = (GetBucketAnalyticsConfigurationResponse -> Int)
-> (GetBucketAnalyticsConfigurationResponse
    -> Int -> GetBucketAnalyticsConfigurationResponse)
-> Lens
     GetBucketAnalyticsConfigurationResponse
     GetBucketAnalyticsConfigurationResponse
     Int
     Int
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