{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MacieV2.Types.BucketMetadata
-- 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)
module Amazonka.MacieV2.Types.BucketMetadata where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MacieV2.Types.AllowsUnencryptedObjectUploads
import Amazonka.MacieV2.Types.BucketMetadataErrorCode
import Amazonka.MacieV2.Types.BucketPublicAccess
import Amazonka.MacieV2.Types.BucketServerSideEncryption
import Amazonka.MacieV2.Types.JobDetails
import Amazonka.MacieV2.Types.KeyValuePair
import Amazonka.MacieV2.Types.ObjectCountByEncryptionType
import Amazonka.MacieV2.Types.ObjectLevelStatistics
import Amazonka.MacieV2.Types.ReplicationDetails
import Amazonka.MacieV2.Types.SharedAccess
import qualified Amazonka.Prelude as Prelude

-- | Provides statistical data and other information about an S3 bucket that
-- Amazon Macie monitors and analyzes for your account. If an error occurs
-- when Macie attempts to retrieve and process information about the bucket
-- or the bucket\'s objects, the value for most of these properties is
-- null. Exceptions are accountId, bucketArn, bucketCreatedAt, bucketName,
-- lastUpdated, and region. To identify the cause of the error, refer to
-- the errorCode and errorMessage values.
--
-- /See:/ 'newBucketMetadata' smart constructor.
data BucketMetadata = BucketMetadata'
  { -- | The total storage size, in bytes, of the objects that are compressed
    -- (.gz, .gzip, .zip) files in the bucket.
    --
    -- If versioning is enabled for the bucket, Amazon Macie calculates this
    -- value based on the size of the latest version of each applicable object
    -- in the bucket. This value doesn\'t reflect the storage size of all
    -- versions of each applicable object in the bucket.
    BucketMetadata -> Maybe Integer
sizeInBytesCompressed :: Prelude.Maybe Prelude.Integer,
    -- | The date and time, in UTC and extended ISO 8601 format, when Amazon
    -- Macie most recently retrieved both bucket and object metadata from
    -- Amazon S3 for the bucket.
    BucketMetadata -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
    -- | The total number of objects that are in the bucket, grouped by
    -- server-side encryption type. This includes a grouping that reports the
    -- total number of objects that aren\'t encrypted or use client-side
    -- encryption.
    BucketMetadata -> Maybe ObjectCountByEncryptionType
objectCountByEncryptionType :: Prelude.Maybe ObjectCountByEncryptionType,
    -- | Specifies whether the bucket is shared with another Amazon Web Services
    -- account. Possible values are:
    --
    -- -   EXTERNAL - The bucket is shared with an Amazon Web Services account
    --     that isn\'t part of the same Amazon Macie organization.
    --
    -- -   INTERNAL - The bucket is shared with an Amazon Web Services account
    --     that\'s part of the same Amazon Macie organization.
    --
    -- -   NOT_SHARED - The bucket isn\'t shared with other Amazon Web Services
    --     accounts.
    --
    -- -   UNKNOWN - Amazon Macie wasn\'t able to evaluate the shared access
    --     settings for the bucket.
    BucketMetadata -> Maybe SharedAccess
sharedAccess :: Prelude.Maybe SharedAccess,
    -- | The total storage size, in bytes, of the bucket.
    --
    -- If versioning is enabled for the bucket, Amazon Macie calculates this
    -- value based on the size of the latest version of each object in the
    -- bucket. This value doesn\'t reflect the storage size of all versions of
    -- each object in the bucket.
    BucketMetadata -> Maybe Integer
sizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The name of the bucket.
    BucketMetadata -> Maybe Text
bucketName :: Prelude.Maybe Prelude.Text,
    -- | The total number of objects that Amazon Macie can analyze in the bucket.
    -- These objects use a supported storage class and have a file name
    -- extension for a supported file or storage format.
    BucketMetadata -> Maybe Integer
classifiableObjectCount :: Prelude.Maybe Prelude.Integer,
    -- | The unique identifier for the Amazon Web Services account that owns the
    -- bucket.
    BucketMetadata -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | The total storage size, in bytes, of the objects that Amazon Macie
    -- can\'t analyze in the bucket. These objects don\'t use a supported
    -- storage class or don\'t have a file name extension for a supported file
    -- or storage format.
    BucketMetadata -> Maybe ObjectLevelStatistics
unclassifiableObjectSizeInBytes :: Prelude.Maybe ObjectLevelStatistics,
    -- | The total number of objects that Amazon Macie can\'t analyze in the
    -- bucket. These objects don\'t use a supported storage class or don\'t
    -- have a file name extension for a supported file or storage format.
    BucketMetadata -> Maybe ObjectLevelStatistics
unclassifiableObjectCount :: Prelude.Maybe ObjectLevelStatistics,
    -- | Specifies whether versioning is enabled for the bucket.
    BucketMetadata -> Maybe Bool
versioning :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the bucket policy for the bucket requires server-side
    -- encryption of objects when objects are uploaded to the bucket. Possible
    -- values are:
    --
    -- -   FALSE - The bucket policy requires server-side encryption of new
    --     objects. PutObject requests must include the
    --     x-amz-server-side-encryption header and the value for that header
    --     must be AES256 or aws:kms.
    --
    -- -   TRUE - The bucket doesn\'t have a bucket policy or it has a bucket
    --     policy that doesn\'t require server-side encryption of new objects.
    --     If a bucket policy exists, it doesn\'t require PutObject requests to
    --     include the x-amz-server-side-encryption header and it doesn\'t
    --     require the value for that header to be AES256 or aws:kms.
    --
    -- -   UNKNOWN - Amazon Macie can\'t determine whether the bucket policy
    --     requires server-side encryption of new objects.
    BucketMetadata -> Maybe AllowsUnencryptedObjectUploads
allowsUnencryptedObjectUploads :: Prelude.Maybe AllowsUnencryptedObjectUploads,
    -- | Specifies whether the bucket is publicly accessible due to the
    -- combination of permissions settings that apply to the bucket, and
    -- provides information about those settings.
    BucketMetadata -> Maybe BucketPublicAccess
publicAccess :: Prelude.Maybe BucketPublicAccess,
    -- | Specifies the error code for an error that prevented Amazon Macie from
    -- retrieving and processing information about the bucket and the bucket\'s
    -- objects. If this value is ACCESS_DENIED, Macie doesn\'t have permission
    -- to retrieve the information. For example, the bucket has a restrictive
    -- bucket policy and Amazon S3 denied the request. If this value is null,
    -- Macie was able to retrieve and process the information.
    BucketMetadata -> Maybe BucketMetadataErrorCode
errorCode :: Prelude.Maybe BucketMetadataErrorCode,
    -- | Specifies whether any one-time or recurring classification jobs are
    -- configured to analyze data in the bucket, and, if so, the details of the
    -- job that ran most recently.
    BucketMetadata -> Maybe JobDetails
jobDetails :: Prelude.Maybe JobDetails,
    -- | The Amazon Web Services Region that hosts the bucket.
    BucketMetadata -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | The date and time, in UTC and extended ISO 8601 format, when the bucket
    -- was created.
    BucketMetadata -> Maybe POSIX
bucketCreatedAt :: Prelude.Maybe Core.POSIX,
    -- | A brief description of the error (errorCode) that prevented Amazon Macie
    -- from retrieving and processing information about the bucket and the
    -- bucket\'s objects. This value is null if Macie was able to retrieve and
    -- process the information.
    BucketMetadata -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the bucket.
    BucketMetadata -> Maybe Text
bucketArn :: Prelude.Maybe Prelude.Text,
    -- | The total number of objects in the bucket.
    BucketMetadata -> Maybe Integer
objectCount :: Prelude.Maybe Prelude.Integer,
    -- | Specifies whether the bucket is configured to replicate one or more
    -- objects to buckets for other Amazon Web Services accounts and, if so,
    -- which accounts.
    BucketMetadata -> Maybe ReplicationDetails
replicationDetails :: Prelude.Maybe ReplicationDetails,
    -- | Specifies whether the bucket encrypts new objects by default and, if so,
    -- the type of server-side encryption that\'s used.
    BucketMetadata -> Maybe BucketServerSideEncryption
serverSideEncryption :: Prelude.Maybe BucketServerSideEncryption,
    -- | An array that specifies the tags (keys and values) that are associated
    -- with the bucket.
    BucketMetadata -> Maybe [KeyValuePair]
tags :: Prelude.Maybe [KeyValuePair],
    -- | The total storage size, in bytes, of the objects that Amazon Macie can
    -- analyze in the bucket. These objects use a supported storage class and
    -- have a file name extension for a supported file or storage format.
    --
    -- If versioning is enabled for the bucket, Macie calculates this value
    -- based on the size of the latest version of each applicable object in the
    -- bucket. This value doesn\'t reflect the storage size of all versions of
    -- each applicable object in the bucket.
    BucketMetadata -> Maybe Integer
classifiableSizeInBytes :: Prelude.Maybe Prelude.Integer
  }
  deriving (BucketMetadata -> BucketMetadata -> Bool
(BucketMetadata -> BucketMetadata -> Bool)
-> (BucketMetadata -> BucketMetadata -> Bool) -> Eq BucketMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BucketMetadata -> BucketMetadata -> Bool
$c/= :: BucketMetadata -> BucketMetadata -> Bool
== :: BucketMetadata -> BucketMetadata -> Bool
$c== :: BucketMetadata -> BucketMetadata -> Bool
Prelude.Eq, ReadPrec [BucketMetadata]
ReadPrec BucketMetadata
Int -> ReadS BucketMetadata
ReadS [BucketMetadata]
(Int -> ReadS BucketMetadata)
-> ReadS [BucketMetadata]
-> ReadPrec BucketMetadata
-> ReadPrec [BucketMetadata]
-> Read BucketMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BucketMetadata]
$creadListPrec :: ReadPrec [BucketMetadata]
readPrec :: ReadPrec BucketMetadata
$creadPrec :: ReadPrec BucketMetadata
readList :: ReadS [BucketMetadata]
$creadList :: ReadS [BucketMetadata]
readsPrec :: Int -> ReadS BucketMetadata
$creadsPrec :: Int -> ReadS BucketMetadata
Prelude.Read, Int -> BucketMetadata -> ShowS
[BucketMetadata] -> ShowS
BucketMetadata -> String
(Int -> BucketMetadata -> ShowS)
-> (BucketMetadata -> String)
-> ([BucketMetadata] -> ShowS)
-> Show BucketMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BucketMetadata] -> ShowS
$cshowList :: [BucketMetadata] -> ShowS
show :: BucketMetadata -> String
$cshow :: BucketMetadata -> String
showsPrec :: Int -> BucketMetadata -> ShowS
$cshowsPrec :: Int -> BucketMetadata -> ShowS
Prelude.Show, (forall x. BucketMetadata -> Rep BucketMetadata x)
-> (forall x. Rep BucketMetadata x -> BucketMetadata)
-> Generic BucketMetadata
forall x. Rep BucketMetadata x -> BucketMetadata
forall x. BucketMetadata -> Rep BucketMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BucketMetadata x -> BucketMetadata
$cfrom :: forall x. BucketMetadata -> Rep BucketMetadata x
Prelude.Generic)

-- |
-- Create a value of 'BucketMetadata' 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:
--
-- 'sizeInBytesCompressed', 'bucketMetadata_sizeInBytesCompressed' - The total storage size, in bytes, of the objects that are compressed
-- (.gz, .gzip, .zip) files in the bucket.
--
-- If versioning is enabled for the bucket, Amazon Macie calculates this
-- value based on the size of the latest version of each applicable object
-- in the bucket. This value doesn\'t reflect the storage size of all
-- versions of each applicable object in the bucket.
--
-- 'lastUpdated', 'bucketMetadata_lastUpdated' - The date and time, in UTC and extended ISO 8601 format, when Amazon
-- Macie most recently retrieved both bucket and object metadata from
-- Amazon S3 for the bucket.
--
-- 'objectCountByEncryptionType', 'bucketMetadata_objectCountByEncryptionType' - The total number of objects that are in the bucket, grouped by
-- server-side encryption type. This includes a grouping that reports the
-- total number of objects that aren\'t encrypted or use client-side
-- encryption.
--
-- 'sharedAccess', 'bucketMetadata_sharedAccess' - Specifies whether the bucket is shared with another Amazon Web Services
-- account. Possible values are:
--
-- -   EXTERNAL - The bucket is shared with an Amazon Web Services account
--     that isn\'t part of the same Amazon Macie organization.
--
-- -   INTERNAL - The bucket is shared with an Amazon Web Services account
--     that\'s part of the same Amazon Macie organization.
--
-- -   NOT_SHARED - The bucket isn\'t shared with other Amazon Web Services
--     accounts.
--
-- -   UNKNOWN - Amazon Macie wasn\'t able to evaluate the shared access
--     settings for the bucket.
--
-- 'sizeInBytes', 'bucketMetadata_sizeInBytes' - The total storage size, in bytes, of the bucket.
--
-- If versioning is enabled for the bucket, Amazon Macie calculates this
-- value based on the size of the latest version of each object in the
-- bucket. This value doesn\'t reflect the storage size of all versions of
-- each object in the bucket.
--
-- 'bucketName', 'bucketMetadata_bucketName' - The name of the bucket.
--
-- 'classifiableObjectCount', 'bucketMetadata_classifiableObjectCount' - The total number of objects that Amazon Macie can analyze in the bucket.
-- These objects use a supported storage class and have a file name
-- extension for a supported file or storage format.
--
-- 'accountId', 'bucketMetadata_accountId' - The unique identifier for the Amazon Web Services account that owns the
-- bucket.
--
-- 'unclassifiableObjectSizeInBytes', 'bucketMetadata_unclassifiableObjectSizeInBytes' - The total storage size, in bytes, of the objects that Amazon Macie
-- can\'t analyze in the bucket. These objects don\'t use a supported
-- storage class or don\'t have a file name extension for a supported file
-- or storage format.
--
-- 'unclassifiableObjectCount', 'bucketMetadata_unclassifiableObjectCount' - The total number of objects that Amazon Macie can\'t analyze in the
-- bucket. These objects don\'t use a supported storage class or don\'t
-- have a file name extension for a supported file or storage format.
--
-- 'versioning', 'bucketMetadata_versioning' - Specifies whether versioning is enabled for the bucket.
--
-- 'allowsUnencryptedObjectUploads', 'bucketMetadata_allowsUnencryptedObjectUploads' - Specifies whether the bucket policy for the bucket requires server-side
-- encryption of objects when objects are uploaded to the bucket. Possible
-- values are:
--
-- -   FALSE - The bucket policy requires server-side encryption of new
--     objects. PutObject requests must include the
--     x-amz-server-side-encryption header and the value for that header
--     must be AES256 or aws:kms.
--
-- -   TRUE - The bucket doesn\'t have a bucket policy or it has a bucket
--     policy that doesn\'t require server-side encryption of new objects.
--     If a bucket policy exists, it doesn\'t require PutObject requests to
--     include the x-amz-server-side-encryption header and it doesn\'t
--     require the value for that header to be AES256 or aws:kms.
--
-- -   UNKNOWN - Amazon Macie can\'t determine whether the bucket policy
--     requires server-side encryption of new objects.
--
-- 'publicAccess', 'bucketMetadata_publicAccess' - Specifies whether the bucket is publicly accessible due to the
-- combination of permissions settings that apply to the bucket, and
-- provides information about those settings.
--
-- 'errorCode', 'bucketMetadata_errorCode' - Specifies the error code for an error that prevented Amazon Macie from
-- retrieving and processing information about the bucket and the bucket\'s
-- objects. If this value is ACCESS_DENIED, Macie doesn\'t have permission
-- to retrieve the information. For example, the bucket has a restrictive
-- bucket policy and Amazon S3 denied the request. If this value is null,
-- Macie was able to retrieve and process the information.
--
-- 'jobDetails', 'bucketMetadata_jobDetails' - Specifies whether any one-time or recurring classification jobs are
-- configured to analyze data in the bucket, and, if so, the details of the
-- job that ran most recently.
--
-- 'region', 'bucketMetadata_region' - The Amazon Web Services Region that hosts the bucket.
--
-- 'bucketCreatedAt', 'bucketMetadata_bucketCreatedAt' - The date and time, in UTC and extended ISO 8601 format, when the bucket
-- was created.
--
-- 'errorMessage', 'bucketMetadata_errorMessage' - A brief description of the error (errorCode) that prevented Amazon Macie
-- from retrieving and processing information about the bucket and the
-- bucket\'s objects. This value is null if Macie was able to retrieve and
-- process the information.
--
-- 'bucketArn', 'bucketMetadata_bucketArn' - The Amazon Resource Name (ARN) of the bucket.
--
-- 'objectCount', 'bucketMetadata_objectCount' - The total number of objects in the bucket.
--
-- 'replicationDetails', 'bucketMetadata_replicationDetails' - Specifies whether the bucket is configured to replicate one or more
-- objects to buckets for other Amazon Web Services accounts and, if so,
-- which accounts.
--
-- 'serverSideEncryption', 'bucketMetadata_serverSideEncryption' - Specifies whether the bucket encrypts new objects by default and, if so,
-- the type of server-side encryption that\'s used.
--
-- 'tags', 'bucketMetadata_tags' - An array that specifies the tags (keys and values) that are associated
-- with the bucket.
--
-- 'classifiableSizeInBytes', 'bucketMetadata_classifiableSizeInBytes' - The total storage size, in bytes, of the objects that Amazon Macie can
-- analyze in the bucket. These objects use a supported storage class and
-- have a file name extension for a supported file or storage format.
--
-- If versioning is enabled for the bucket, Macie calculates this value
-- based on the size of the latest version of each applicable object in the
-- bucket. This value doesn\'t reflect the storage size of all versions of
-- each applicable object in the bucket.
newBucketMetadata ::
  BucketMetadata
newBucketMetadata :: BucketMetadata
newBucketMetadata =
  BucketMetadata' :: Maybe Integer
-> Maybe POSIX
-> Maybe ObjectCountByEncryptionType
-> Maybe SharedAccess
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe ObjectLevelStatistics
-> Maybe ObjectLevelStatistics
-> Maybe Bool
-> Maybe AllowsUnencryptedObjectUploads
-> Maybe BucketPublicAccess
-> Maybe BucketMetadataErrorCode
-> Maybe JobDetails
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ReplicationDetails
-> Maybe BucketServerSideEncryption
-> Maybe [KeyValuePair]
-> Maybe Integer
-> BucketMetadata
BucketMetadata'
    { $sel:sizeInBytesCompressed:BucketMetadata' :: Maybe Integer
sizeInBytesCompressed =
        Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdated:BucketMetadata' :: Maybe POSIX
lastUpdated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:objectCountByEncryptionType:BucketMetadata' :: Maybe ObjectCountByEncryptionType
objectCountByEncryptionType = Maybe ObjectCountByEncryptionType
forall a. Maybe a
Prelude.Nothing,
      $sel:sharedAccess:BucketMetadata' :: Maybe SharedAccess
sharedAccess = Maybe SharedAccess
forall a. Maybe a
Prelude.Nothing,
      $sel:sizeInBytes:BucketMetadata' :: Maybe Integer
sizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:bucketName:BucketMetadata' :: Maybe Text
bucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:classifiableObjectCount:BucketMetadata' :: Maybe Integer
classifiableObjectCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:BucketMetadata' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:unclassifiableObjectSizeInBytes:BucketMetadata' :: Maybe ObjectLevelStatistics
unclassifiableObjectSizeInBytes = Maybe ObjectLevelStatistics
forall a. Maybe a
Prelude.Nothing,
      $sel:unclassifiableObjectCount:BucketMetadata' :: Maybe ObjectLevelStatistics
unclassifiableObjectCount = Maybe ObjectLevelStatistics
forall a. Maybe a
Prelude.Nothing,
      $sel:versioning:BucketMetadata' :: Maybe Bool
versioning = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:allowsUnencryptedObjectUploads:BucketMetadata' :: Maybe AllowsUnencryptedObjectUploads
allowsUnencryptedObjectUploads = Maybe AllowsUnencryptedObjectUploads
forall a. Maybe a
Prelude.Nothing,
      $sel:publicAccess:BucketMetadata' :: Maybe BucketPublicAccess
publicAccess = Maybe BucketPublicAccess
forall a. Maybe a
Prelude.Nothing,
      $sel:errorCode:BucketMetadata' :: Maybe BucketMetadataErrorCode
errorCode = Maybe BucketMetadataErrorCode
forall a. Maybe a
Prelude.Nothing,
      $sel:jobDetails:BucketMetadata' :: Maybe JobDetails
jobDetails = Maybe JobDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:region:BucketMetadata' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucketCreatedAt:BucketMetadata' :: Maybe POSIX
bucketCreatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:BucketMetadata' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucketArn:BucketMetadata' :: Maybe Text
bucketArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:objectCount:BucketMetadata' :: Maybe Integer
objectCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationDetails:BucketMetadata' :: Maybe ReplicationDetails
replicationDetails = Maybe ReplicationDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:BucketMetadata' :: Maybe BucketServerSideEncryption
serverSideEncryption = Maybe BucketServerSideEncryption
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:BucketMetadata' :: Maybe [KeyValuePair]
tags = Maybe [KeyValuePair]
forall a. Maybe a
Prelude.Nothing,
      $sel:classifiableSizeInBytes:BucketMetadata' :: Maybe Integer
classifiableSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing
    }

-- | The total storage size, in bytes, of the objects that are compressed
-- (.gz, .gzip, .zip) files in the bucket.
--
-- If versioning is enabled for the bucket, Amazon Macie calculates this
-- value based on the size of the latest version of each applicable object
-- in the bucket. This value doesn\'t reflect the storage size of all
-- versions of each applicable object in the bucket.
bucketMetadata_sizeInBytesCompressed :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Integer)
bucketMetadata_sizeInBytesCompressed :: (Maybe Integer -> f (Maybe Integer))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_sizeInBytesCompressed = (BucketMetadata -> Maybe Integer)
-> (BucketMetadata -> Maybe Integer -> BucketMetadata)
-> Lens
     BucketMetadata BucketMetadata (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Integer
sizeInBytesCompressed :: Maybe Integer
$sel:sizeInBytesCompressed:BucketMetadata' :: BucketMetadata -> Maybe Integer
sizeInBytesCompressed} -> Maybe Integer
sizeInBytesCompressed) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Integer
a -> BucketMetadata
s {$sel:sizeInBytesCompressed:BucketMetadata' :: Maybe Integer
sizeInBytesCompressed = Maybe Integer
a} :: BucketMetadata)

-- | The date and time, in UTC and extended ISO 8601 format, when Amazon
-- Macie most recently retrieved both bucket and object metadata from
-- Amazon S3 for the bucket.
bucketMetadata_lastUpdated :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.UTCTime)
bucketMetadata_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_lastUpdated = (BucketMetadata -> Maybe POSIX)
-> (BucketMetadata -> Maybe POSIX -> BucketMetadata)
-> Lens BucketMetadata BucketMetadata (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:BucketMetadata' :: BucketMetadata -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe POSIX
a -> BucketMetadata
s {$sel:lastUpdated:BucketMetadata' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: BucketMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> BucketMetadata -> f BucketMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BucketMetadata
-> f BucketMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The total number of objects that are in the bucket, grouped by
-- server-side encryption type. This includes a grouping that reports the
-- total number of objects that aren\'t encrypted or use client-side
-- encryption.
bucketMetadata_objectCountByEncryptionType :: Lens.Lens' BucketMetadata (Prelude.Maybe ObjectCountByEncryptionType)
bucketMetadata_objectCountByEncryptionType :: (Maybe ObjectCountByEncryptionType
 -> f (Maybe ObjectCountByEncryptionType))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_objectCountByEncryptionType = (BucketMetadata -> Maybe ObjectCountByEncryptionType)
-> (BucketMetadata
    -> Maybe ObjectCountByEncryptionType -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe ObjectCountByEncryptionType)
     (Maybe ObjectCountByEncryptionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe ObjectCountByEncryptionType
objectCountByEncryptionType :: Maybe ObjectCountByEncryptionType
$sel:objectCountByEncryptionType:BucketMetadata' :: BucketMetadata -> Maybe ObjectCountByEncryptionType
objectCountByEncryptionType} -> Maybe ObjectCountByEncryptionType
objectCountByEncryptionType) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe ObjectCountByEncryptionType
a -> BucketMetadata
s {$sel:objectCountByEncryptionType:BucketMetadata' :: Maybe ObjectCountByEncryptionType
objectCountByEncryptionType = Maybe ObjectCountByEncryptionType
a} :: BucketMetadata)

-- | Specifies whether the bucket is shared with another Amazon Web Services
-- account. Possible values are:
--
-- -   EXTERNAL - The bucket is shared with an Amazon Web Services account
--     that isn\'t part of the same Amazon Macie organization.
--
-- -   INTERNAL - The bucket is shared with an Amazon Web Services account
--     that\'s part of the same Amazon Macie organization.
--
-- -   NOT_SHARED - The bucket isn\'t shared with other Amazon Web Services
--     accounts.
--
-- -   UNKNOWN - Amazon Macie wasn\'t able to evaluate the shared access
--     settings for the bucket.
bucketMetadata_sharedAccess :: Lens.Lens' BucketMetadata (Prelude.Maybe SharedAccess)
bucketMetadata_sharedAccess :: (Maybe SharedAccess -> f (Maybe SharedAccess))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_sharedAccess = (BucketMetadata -> Maybe SharedAccess)
-> (BucketMetadata -> Maybe SharedAccess -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe SharedAccess)
     (Maybe SharedAccess)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe SharedAccess
sharedAccess :: Maybe SharedAccess
$sel:sharedAccess:BucketMetadata' :: BucketMetadata -> Maybe SharedAccess
sharedAccess} -> Maybe SharedAccess
sharedAccess) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe SharedAccess
a -> BucketMetadata
s {$sel:sharedAccess:BucketMetadata' :: Maybe SharedAccess
sharedAccess = Maybe SharedAccess
a} :: BucketMetadata)

-- | The total storage size, in bytes, of the bucket.
--
-- If versioning is enabled for the bucket, Amazon Macie calculates this
-- value based on the size of the latest version of each object in the
-- bucket. This value doesn\'t reflect the storage size of all versions of
-- each object in the bucket.
bucketMetadata_sizeInBytes :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Integer)
bucketMetadata_sizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_sizeInBytes = (BucketMetadata -> Maybe Integer)
-> (BucketMetadata -> Maybe Integer -> BucketMetadata)
-> Lens
     BucketMetadata BucketMetadata (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Integer
sizeInBytes :: Maybe Integer
$sel:sizeInBytes:BucketMetadata' :: BucketMetadata -> Maybe Integer
sizeInBytes} -> Maybe Integer
sizeInBytes) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Integer
a -> BucketMetadata
s {$sel:sizeInBytes:BucketMetadata' :: Maybe Integer
sizeInBytes = Maybe Integer
a} :: BucketMetadata)

-- | The name of the bucket.
bucketMetadata_bucketName :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Text)
bucketMetadata_bucketName :: (Maybe Text -> f (Maybe Text))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_bucketName = (BucketMetadata -> Maybe Text)
-> (BucketMetadata -> Maybe Text -> BucketMetadata)
-> Lens BucketMetadata BucketMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Text
bucketName :: Maybe Text
$sel:bucketName:BucketMetadata' :: BucketMetadata -> Maybe Text
bucketName} -> Maybe Text
bucketName) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Text
a -> BucketMetadata
s {$sel:bucketName:BucketMetadata' :: Maybe Text
bucketName = Maybe Text
a} :: BucketMetadata)

-- | The total number of objects that Amazon Macie can analyze in the bucket.
-- These objects use a supported storage class and have a file name
-- extension for a supported file or storage format.
bucketMetadata_classifiableObjectCount :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Integer)
bucketMetadata_classifiableObjectCount :: (Maybe Integer -> f (Maybe Integer))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_classifiableObjectCount = (BucketMetadata -> Maybe Integer)
-> (BucketMetadata -> Maybe Integer -> BucketMetadata)
-> Lens
     BucketMetadata BucketMetadata (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Integer
classifiableObjectCount :: Maybe Integer
$sel:classifiableObjectCount:BucketMetadata' :: BucketMetadata -> Maybe Integer
classifiableObjectCount} -> Maybe Integer
classifiableObjectCount) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Integer
a -> BucketMetadata
s {$sel:classifiableObjectCount:BucketMetadata' :: Maybe Integer
classifiableObjectCount = Maybe Integer
a} :: BucketMetadata)

-- | The unique identifier for the Amazon Web Services account that owns the
-- bucket.
bucketMetadata_accountId :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Text)
bucketMetadata_accountId :: (Maybe Text -> f (Maybe Text))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_accountId = (BucketMetadata -> Maybe Text)
-> (BucketMetadata -> Maybe Text -> BucketMetadata)
-> Lens BucketMetadata BucketMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Text
accountId :: Maybe Text
$sel:accountId:BucketMetadata' :: BucketMetadata -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Text
a -> BucketMetadata
s {$sel:accountId:BucketMetadata' :: Maybe Text
accountId = Maybe Text
a} :: BucketMetadata)

-- | The total storage size, in bytes, of the objects that Amazon Macie
-- can\'t analyze in the bucket. These objects don\'t use a supported
-- storage class or don\'t have a file name extension for a supported file
-- or storage format.
bucketMetadata_unclassifiableObjectSizeInBytes :: Lens.Lens' BucketMetadata (Prelude.Maybe ObjectLevelStatistics)
bucketMetadata_unclassifiableObjectSizeInBytes :: (Maybe ObjectLevelStatistics -> f (Maybe ObjectLevelStatistics))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_unclassifiableObjectSizeInBytes = (BucketMetadata -> Maybe ObjectLevelStatistics)
-> (BucketMetadata
    -> Maybe ObjectLevelStatistics -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe ObjectLevelStatistics)
     (Maybe ObjectLevelStatistics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe ObjectLevelStatistics
unclassifiableObjectSizeInBytes :: Maybe ObjectLevelStatistics
$sel:unclassifiableObjectSizeInBytes:BucketMetadata' :: BucketMetadata -> Maybe ObjectLevelStatistics
unclassifiableObjectSizeInBytes} -> Maybe ObjectLevelStatistics
unclassifiableObjectSizeInBytes) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe ObjectLevelStatistics
a -> BucketMetadata
s {$sel:unclassifiableObjectSizeInBytes:BucketMetadata' :: Maybe ObjectLevelStatistics
unclassifiableObjectSizeInBytes = Maybe ObjectLevelStatistics
a} :: BucketMetadata)

-- | The total number of objects that Amazon Macie can\'t analyze in the
-- bucket. These objects don\'t use a supported storage class or don\'t
-- have a file name extension for a supported file or storage format.
bucketMetadata_unclassifiableObjectCount :: Lens.Lens' BucketMetadata (Prelude.Maybe ObjectLevelStatistics)
bucketMetadata_unclassifiableObjectCount :: (Maybe ObjectLevelStatistics -> f (Maybe ObjectLevelStatistics))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_unclassifiableObjectCount = (BucketMetadata -> Maybe ObjectLevelStatistics)
-> (BucketMetadata
    -> Maybe ObjectLevelStatistics -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe ObjectLevelStatistics)
     (Maybe ObjectLevelStatistics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe ObjectLevelStatistics
unclassifiableObjectCount :: Maybe ObjectLevelStatistics
$sel:unclassifiableObjectCount:BucketMetadata' :: BucketMetadata -> Maybe ObjectLevelStatistics
unclassifiableObjectCount} -> Maybe ObjectLevelStatistics
unclassifiableObjectCount) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe ObjectLevelStatistics
a -> BucketMetadata
s {$sel:unclassifiableObjectCount:BucketMetadata' :: Maybe ObjectLevelStatistics
unclassifiableObjectCount = Maybe ObjectLevelStatistics
a} :: BucketMetadata)

-- | Specifies whether versioning is enabled for the bucket.
bucketMetadata_versioning :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Bool)
bucketMetadata_versioning :: (Maybe Bool -> f (Maybe Bool))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_versioning = (BucketMetadata -> Maybe Bool)
-> (BucketMetadata -> Maybe Bool -> BucketMetadata)
-> Lens BucketMetadata BucketMetadata (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Bool
versioning :: Maybe Bool
$sel:versioning:BucketMetadata' :: BucketMetadata -> Maybe Bool
versioning} -> Maybe Bool
versioning) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Bool
a -> BucketMetadata
s {$sel:versioning:BucketMetadata' :: Maybe Bool
versioning = Maybe Bool
a} :: BucketMetadata)

-- | Specifies whether the bucket policy for the bucket requires server-side
-- encryption of objects when objects are uploaded to the bucket. Possible
-- values are:
--
-- -   FALSE - The bucket policy requires server-side encryption of new
--     objects. PutObject requests must include the
--     x-amz-server-side-encryption header and the value for that header
--     must be AES256 or aws:kms.
--
-- -   TRUE - The bucket doesn\'t have a bucket policy or it has a bucket
--     policy that doesn\'t require server-side encryption of new objects.
--     If a bucket policy exists, it doesn\'t require PutObject requests to
--     include the x-amz-server-side-encryption header and it doesn\'t
--     require the value for that header to be AES256 or aws:kms.
--
-- -   UNKNOWN - Amazon Macie can\'t determine whether the bucket policy
--     requires server-side encryption of new objects.
bucketMetadata_allowsUnencryptedObjectUploads :: Lens.Lens' BucketMetadata (Prelude.Maybe AllowsUnencryptedObjectUploads)
bucketMetadata_allowsUnencryptedObjectUploads :: (Maybe AllowsUnencryptedObjectUploads
 -> f (Maybe AllowsUnencryptedObjectUploads))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_allowsUnencryptedObjectUploads = (BucketMetadata -> Maybe AllowsUnencryptedObjectUploads)
-> (BucketMetadata
    -> Maybe AllowsUnencryptedObjectUploads -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe AllowsUnencryptedObjectUploads)
     (Maybe AllowsUnencryptedObjectUploads)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe AllowsUnencryptedObjectUploads
allowsUnencryptedObjectUploads :: Maybe AllowsUnencryptedObjectUploads
$sel:allowsUnencryptedObjectUploads:BucketMetadata' :: BucketMetadata -> Maybe AllowsUnencryptedObjectUploads
allowsUnencryptedObjectUploads} -> Maybe AllowsUnencryptedObjectUploads
allowsUnencryptedObjectUploads) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe AllowsUnencryptedObjectUploads
a -> BucketMetadata
s {$sel:allowsUnencryptedObjectUploads:BucketMetadata' :: Maybe AllowsUnencryptedObjectUploads
allowsUnencryptedObjectUploads = Maybe AllowsUnencryptedObjectUploads
a} :: BucketMetadata)

-- | Specifies whether the bucket is publicly accessible due to the
-- combination of permissions settings that apply to the bucket, and
-- provides information about those settings.
bucketMetadata_publicAccess :: Lens.Lens' BucketMetadata (Prelude.Maybe BucketPublicAccess)
bucketMetadata_publicAccess :: (Maybe BucketPublicAccess -> f (Maybe BucketPublicAccess))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_publicAccess = (BucketMetadata -> Maybe BucketPublicAccess)
-> (BucketMetadata -> Maybe BucketPublicAccess -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe BucketPublicAccess)
     (Maybe BucketPublicAccess)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe BucketPublicAccess
publicAccess :: Maybe BucketPublicAccess
$sel:publicAccess:BucketMetadata' :: BucketMetadata -> Maybe BucketPublicAccess
publicAccess} -> Maybe BucketPublicAccess
publicAccess) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe BucketPublicAccess
a -> BucketMetadata
s {$sel:publicAccess:BucketMetadata' :: Maybe BucketPublicAccess
publicAccess = Maybe BucketPublicAccess
a} :: BucketMetadata)

-- | Specifies the error code for an error that prevented Amazon Macie from
-- retrieving and processing information about the bucket and the bucket\'s
-- objects. If this value is ACCESS_DENIED, Macie doesn\'t have permission
-- to retrieve the information. For example, the bucket has a restrictive
-- bucket policy and Amazon S3 denied the request. If this value is null,
-- Macie was able to retrieve and process the information.
bucketMetadata_errorCode :: Lens.Lens' BucketMetadata (Prelude.Maybe BucketMetadataErrorCode)
bucketMetadata_errorCode :: (Maybe BucketMetadataErrorCode
 -> f (Maybe BucketMetadataErrorCode))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_errorCode = (BucketMetadata -> Maybe BucketMetadataErrorCode)
-> (BucketMetadata
    -> Maybe BucketMetadataErrorCode -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe BucketMetadataErrorCode)
     (Maybe BucketMetadataErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe BucketMetadataErrorCode
errorCode :: Maybe BucketMetadataErrorCode
$sel:errorCode:BucketMetadata' :: BucketMetadata -> Maybe BucketMetadataErrorCode
errorCode} -> Maybe BucketMetadataErrorCode
errorCode) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe BucketMetadataErrorCode
a -> BucketMetadata
s {$sel:errorCode:BucketMetadata' :: Maybe BucketMetadataErrorCode
errorCode = Maybe BucketMetadataErrorCode
a} :: BucketMetadata)

-- | Specifies whether any one-time or recurring classification jobs are
-- configured to analyze data in the bucket, and, if so, the details of the
-- job that ran most recently.
bucketMetadata_jobDetails :: Lens.Lens' BucketMetadata (Prelude.Maybe JobDetails)
bucketMetadata_jobDetails :: (Maybe JobDetails -> f (Maybe JobDetails))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_jobDetails = (BucketMetadata -> Maybe JobDetails)
-> (BucketMetadata -> Maybe JobDetails -> BucketMetadata)
-> Lens
     BucketMetadata BucketMetadata (Maybe JobDetails) (Maybe JobDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe JobDetails
jobDetails :: Maybe JobDetails
$sel:jobDetails:BucketMetadata' :: BucketMetadata -> Maybe JobDetails
jobDetails} -> Maybe JobDetails
jobDetails) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe JobDetails
a -> BucketMetadata
s {$sel:jobDetails:BucketMetadata' :: Maybe JobDetails
jobDetails = Maybe JobDetails
a} :: BucketMetadata)

-- | The Amazon Web Services Region that hosts the bucket.
bucketMetadata_region :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Text)
bucketMetadata_region :: (Maybe Text -> f (Maybe Text))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_region = (BucketMetadata -> Maybe Text)
-> (BucketMetadata -> Maybe Text -> BucketMetadata)
-> Lens BucketMetadata BucketMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Text
region :: Maybe Text
$sel:region:BucketMetadata' :: BucketMetadata -> Maybe Text
region} -> Maybe Text
region) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Text
a -> BucketMetadata
s {$sel:region:BucketMetadata' :: Maybe Text
region = Maybe Text
a} :: BucketMetadata)

-- | The date and time, in UTC and extended ISO 8601 format, when the bucket
-- was created.
bucketMetadata_bucketCreatedAt :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.UTCTime)
bucketMetadata_bucketCreatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_bucketCreatedAt = (BucketMetadata -> Maybe POSIX)
-> (BucketMetadata -> Maybe POSIX -> BucketMetadata)
-> Lens BucketMetadata BucketMetadata (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe POSIX
bucketCreatedAt :: Maybe POSIX
$sel:bucketCreatedAt:BucketMetadata' :: BucketMetadata -> Maybe POSIX
bucketCreatedAt} -> Maybe POSIX
bucketCreatedAt) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe POSIX
a -> BucketMetadata
s {$sel:bucketCreatedAt:BucketMetadata' :: Maybe POSIX
bucketCreatedAt = Maybe POSIX
a} :: BucketMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> BucketMetadata -> f BucketMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BucketMetadata
-> f BucketMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A brief description of the error (errorCode) that prevented Amazon Macie
-- from retrieving and processing information about the bucket and the
-- bucket\'s objects. This value is null if Macie was able to retrieve and
-- process the information.
bucketMetadata_errorMessage :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Text)
bucketMetadata_errorMessage :: (Maybe Text -> f (Maybe Text))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_errorMessage = (BucketMetadata -> Maybe Text)
-> (BucketMetadata -> Maybe Text -> BucketMetadata)
-> Lens BucketMetadata BucketMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:BucketMetadata' :: BucketMetadata -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Text
a -> BucketMetadata
s {$sel:errorMessage:BucketMetadata' :: Maybe Text
errorMessage = Maybe Text
a} :: BucketMetadata)

-- | The Amazon Resource Name (ARN) of the bucket.
bucketMetadata_bucketArn :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Text)
bucketMetadata_bucketArn :: (Maybe Text -> f (Maybe Text))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_bucketArn = (BucketMetadata -> Maybe Text)
-> (BucketMetadata -> Maybe Text -> BucketMetadata)
-> Lens BucketMetadata BucketMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Text
bucketArn :: Maybe Text
$sel:bucketArn:BucketMetadata' :: BucketMetadata -> Maybe Text
bucketArn} -> Maybe Text
bucketArn) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Text
a -> BucketMetadata
s {$sel:bucketArn:BucketMetadata' :: Maybe Text
bucketArn = Maybe Text
a} :: BucketMetadata)

-- | The total number of objects in the bucket.
bucketMetadata_objectCount :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Integer)
bucketMetadata_objectCount :: (Maybe Integer -> f (Maybe Integer))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_objectCount = (BucketMetadata -> Maybe Integer)
-> (BucketMetadata -> Maybe Integer -> BucketMetadata)
-> Lens
     BucketMetadata BucketMetadata (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Integer
objectCount :: Maybe Integer
$sel:objectCount:BucketMetadata' :: BucketMetadata -> Maybe Integer
objectCount} -> Maybe Integer
objectCount) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Integer
a -> BucketMetadata
s {$sel:objectCount:BucketMetadata' :: Maybe Integer
objectCount = Maybe Integer
a} :: BucketMetadata)

-- | Specifies whether the bucket is configured to replicate one or more
-- objects to buckets for other Amazon Web Services accounts and, if so,
-- which accounts.
bucketMetadata_replicationDetails :: Lens.Lens' BucketMetadata (Prelude.Maybe ReplicationDetails)
bucketMetadata_replicationDetails :: (Maybe ReplicationDetails -> f (Maybe ReplicationDetails))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_replicationDetails = (BucketMetadata -> Maybe ReplicationDetails)
-> (BucketMetadata -> Maybe ReplicationDetails -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe ReplicationDetails)
     (Maybe ReplicationDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe ReplicationDetails
replicationDetails :: Maybe ReplicationDetails
$sel:replicationDetails:BucketMetadata' :: BucketMetadata -> Maybe ReplicationDetails
replicationDetails} -> Maybe ReplicationDetails
replicationDetails) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe ReplicationDetails
a -> BucketMetadata
s {$sel:replicationDetails:BucketMetadata' :: Maybe ReplicationDetails
replicationDetails = Maybe ReplicationDetails
a} :: BucketMetadata)

-- | Specifies whether the bucket encrypts new objects by default and, if so,
-- the type of server-side encryption that\'s used.
bucketMetadata_serverSideEncryption :: Lens.Lens' BucketMetadata (Prelude.Maybe BucketServerSideEncryption)
bucketMetadata_serverSideEncryption :: (Maybe BucketServerSideEncryption
 -> f (Maybe BucketServerSideEncryption))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_serverSideEncryption = (BucketMetadata -> Maybe BucketServerSideEncryption)
-> (BucketMetadata
    -> Maybe BucketServerSideEncryption -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe BucketServerSideEncryption)
     (Maybe BucketServerSideEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe BucketServerSideEncryption
serverSideEncryption :: Maybe BucketServerSideEncryption
$sel:serverSideEncryption:BucketMetadata' :: BucketMetadata -> Maybe BucketServerSideEncryption
serverSideEncryption} -> Maybe BucketServerSideEncryption
serverSideEncryption) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe BucketServerSideEncryption
a -> BucketMetadata
s {$sel:serverSideEncryption:BucketMetadata' :: Maybe BucketServerSideEncryption
serverSideEncryption = Maybe BucketServerSideEncryption
a} :: BucketMetadata)

-- | An array that specifies the tags (keys and values) that are associated
-- with the bucket.
bucketMetadata_tags :: Lens.Lens' BucketMetadata (Prelude.Maybe [KeyValuePair])
bucketMetadata_tags :: (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_tags = (BucketMetadata -> Maybe [KeyValuePair])
-> (BucketMetadata -> Maybe [KeyValuePair] -> BucketMetadata)
-> Lens
     BucketMetadata
     BucketMetadata
     (Maybe [KeyValuePair])
     (Maybe [KeyValuePair])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe [KeyValuePair]
tags :: Maybe [KeyValuePair]
$sel:tags:BucketMetadata' :: BucketMetadata -> Maybe [KeyValuePair]
tags} -> Maybe [KeyValuePair]
tags) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe [KeyValuePair]
a -> BucketMetadata
s {$sel:tags:BucketMetadata' :: Maybe [KeyValuePair]
tags = Maybe [KeyValuePair]
a} :: BucketMetadata) ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
 -> BucketMetadata -> f BucketMetadata)
-> ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
    -> Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> BucketMetadata
-> f BucketMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [KeyValuePair] [KeyValuePair] [KeyValuePair] [KeyValuePair]
-> Iso
     (Maybe [KeyValuePair])
     (Maybe [KeyValuePair])
     (Maybe [KeyValuePair])
     (Maybe [KeyValuePair])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [KeyValuePair] [KeyValuePair] [KeyValuePair] [KeyValuePair]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The total storage size, in bytes, of the objects that Amazon Macie can
-- analyze in the bucket. These objects use a supported storage class and
-- have a file name extension for a supported file or storage format.
--
-- If versioning is enabled for the bucket, Macie calculates this value
-- based on the size of the latest version of each applicable object in the
-- bucket. This value doesn\'t reflect the storage size of all versions of
-- each applicable object in the bucket.
bucketMetadata_classifiableSizeInBytes :: Lens.Lens' BucketMetadata (Prelude.Maybe Prelude.Integer)
bucketMetadata_classifiableSizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> BucketMetadata -> f BucketMetadata
bucketMetadata_classifiableSizeInBytes = (BucketMetadata -> Maybe Integer)
-> (BucketMetadata -> Maybe Integer -> BucketMetadata)
-> Lens
     BucketMetadata BucketMetadata (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BucketMetadata' {Maybe Integer
classifiableSizeInBytes :: Maybe Integer
$sel:classifiableSizeInBytes:BucketMetadata' :: BucketMetadata -> Maybe Integer
classifiableSizeInBytes} -> Maybe Integer
classifiableSizeInBytes) (\s :: BucketMetadata
s@BucketMetadata' {} Maybe Integer
a -> BucketMetadata
s {$sel:classifiableSizeInBytes:BucketMetadata' :: Maybe Integer
classifiableSizeInBytes = Maybe Integer
a} :: BucketMetadata)

instance Core.FromJSON BucketMetadata where
  parseJSON :: Value -> Parser BucketMetadata
parseJSON =
    String
-> (Object -> Parser BucketMetadata)
-> Value
-> Parser BucketMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BucketMetadata"
      ( \Object
x ->
          Maybe Integer
-> Maybe POSIX
-> Maybe ObjectCountByEncryptionType
-> Maybe SharedAccess
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe ObjectLevelStatistics
-> Maybe ObjectLevelStatistics
-> Maybe Bool
-> Maybe AllowsUnencryptedObjectUploads
-> Maybe BucketPublicAccess
-> Maybe BucketMetadataErrorCode
-> Maybe JobDetails
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ReplicationDetails
-> Maybe BucketServerSideEncryption
-> Maybe [KeyValuePair]
-> Maybe Integer
-> BucketMetadata
BucketMetadata'
            (Maybe Integer
 -> Maybe POSIX
 -> Maybe ObjectCountByEncryptionType
 -> Maybe SharedAccess
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Text
 -> Maybe ObjectLevelStatistics
 -> Maybe ObjectLevelStatistics
 -> Maybe Bool
 -> Maybe AllowsUnencryptedObjectUploads
 -> Maybe BucketPublicAccess
 -> Maybe BucketMetadataErrorCode
 -> Maybe JobDetails
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe ReplicationDetails
 -> Maybe BucketServerSideEncryption
 -> Maybe [KeyValuePair]
 -> Maybe Integer
 -> BucketMetadata)
-> Parser (Maybe Integer)
-> Parser
     (Maybe POSIX
      -> Maybe ObjectCountByEncryptionType
      -> Maybe SharedAccess
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe ObjectLevelStatistics
      -> Maybe ObjectLevelStatistics
      -> Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sizeInBytesCompressed")
            Parser
  (Maybe POSIX
   -> Maybe ObjectCountByEncryptionType
   -> Maybe SharedAccess
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe ObjectLevelStatistics
   -> Maybe ObjectLevelStatistics
   -> Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ObjectCountByEncryptionType
      -> Maybe SharedAccess
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe ObjectLevelStatistics
      -> Maybe ObjectLevelStatistics
      -> Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdated")
            Parser
  (Maybe ObjectCountByEncryptionType
   -> Maybe SharedAccess
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe ObjectLevelStatistics
   -> Maybe ObjectLevelStatistics
   -> Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe ObjectCountByEncryptionType)
-> Parser
     (Maybe SharedAccess
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe ObjectLevelStatistics
      -> Maybe ObjectLevelStatistics
      -> Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ObjectCountByEncryptionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"objectCountByEncryptionType")
            Parser
  (Maybe SharedAccess
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe ObjectLevelStatistics
   -> Maybe ObjectLevelStatistics
   -> Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe SharedAccess)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe ObjectLevelStatistics
      -> Maybe ObjectLevelStatistics
      -> Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SharedAccess)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sharedAccess")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe ObjectLevelStatistics
   -> Maybe ObjectLevelStatistics
   -> Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe ObjectLevelStatistics
      -> Maybe ObjectLevelStatistics
      -> Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sizeInBytes")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe ObjectLevelStatistics
   -> Maybe ObjectLevelStatistics
   -> Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe ObjectLevelStatistics
      -> Maybe ObjectLevelStatistics
      -> Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bucketName")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe ObjectLevelStatistics
   -> Maybe ObjectLevelStatistics
   -> Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe ObjectLevelStatistics
      -> Maybe ObjectLevelStatistics
      -> Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"classifiableObjectCount")
            Parser
  (Maybe Text
   -> Maybe ObjectLevelStatistics
   -> Maybe ObjectLevelStatistics
   -> Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe ObjectLevelStatistics
      -> Maybe ObjectLevelStatistics
      -> Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"accountId")
            Parser
  (Maybe ObjectLevelStatistics
   -> Maybe ObjectLevelStatistics
   -> Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe ObjectLevelStatistics)
-> Parser
     (Maybe ObjectLevelStatistics
      -> Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ObjectLevelStatistics)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"unclassifiableObjectSizeInBytes")
            Parser
  (Maybe ObjectLevelStatistics
   -> Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe ObjectLevelStatistics)
-> Parser
     (Maybe Bool
      -> Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ObjectLevelStatistics)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"unclassifiableObjectCount")
            Parser
  (Maybe Bool
   -> Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe Bool)
-> Parser
     (Maybe AllowsUnencryptedObjectUploads
      -> Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"versioning")
            Parser
  (Maybe AllowsUnencryptedObjectUploads
   -> Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe AllowsUnencryptedObjectUploads)
-> Parser
     (Maybe BucketPublicAccess
      -> Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AllowsUnencryptedObjectUploads)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"allowsUnencryptedObjectUploads")
            Parser
  (Maybe BucketPublicAccess
   -> Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe BucketPublicAccess)
-> Parser
     (Maybe BucketMetadataErrorCode
      -> Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BucketPublicAccess)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"publicAccess")
            Parser
  (Maybe BucketMetadataErrorCode
   -> Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe BucketMetadataErrorCode)
-> Parser
     (Maybe JobDetails
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BucketMetadataErrorCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"errorCode")
            Parser
  (Maybe JobDetails
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe JobDetails)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobDetails")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"region")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bucketCreatedAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"errorMessage")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bucketArn")
            Parser
  (Maybe Integer
   -> Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe Integer)
-> Parser
     (Maybe ReplicationDetails
      -> Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair]
      -> Maybe Integer
      -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"objectCount")
            Parser
  (Maybe ReplicationDetails
   -> Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair]
   -> Maybe Integer
   -> BucketMetadata)
-> Parser (Maybe ReplicationDetails)
-> Parser
     (Maybe BucketServerSideEncryption
      -> Maybe [KeyValuePair] -> Maybe Integer -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReplicationDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"replicationDetails")
            Parser
  (Maybe BucketServerSideEncryption
   -> Maybe [KeyValuePair] -> Maybe Integer -> BucketMetadata)
-> Parser (Maybe BucketServerSideEncryption)
-> Parser (Maybe [KeyValuePair] -> Maybe Integer -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BucketServerSideEncryption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serverSideEncryption")
            Parser (Maybe [KeyValuePair] -> Maybe Integer -> BucketMetadata)
-> Parser (Maybe [KeyValuePair])
-> Parser (Maybe Integer -> BucketMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [KeyValuePair]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [KeyValuePair]))
-> Maybe [KeyValuePair] -> Parser (Maybe [KeyValuePair])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [KeyValuePair]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Integer -> BucketMetadata)
-> Parser (Maybe Integer) -> Parser BucketMetadata
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"classifiableSizeInBytes")
      )

instance Prelude.Hashable BucketMetadata

instance Prelude.NFData BucketMetadata