{-# 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.S3Object
-- 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.S3Object where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MacieV2.Types.KeyValuePair
import Amazonka.MacieV2.Types.ServerSideEncryption
import Amazonka.MacieV2.Types.StorageClass
import qualified Amazonka.Prelude as Prelude

-- | Provides information about the S3 object that a finding applies to.
--
-- /See:/ 'newS3Object' smart constructor.
data S3Object = S3Object'
  { -- | The entity tag (ETag) that identifies the affected version of the
    -- object. If the object was overwritten or changed after Amazon Macie
    -- produced the finding, this value might be different from the current
    -- ETag for the object.
    S3Object -> Maybe Text
eTag :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the affected version of the object.
    S3Object -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
    -- | The path to the object, including the full key (name).
    S3Object -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
    -- | The total storage size, in bytes, of the object.
    S3Object -> Maybe Integer
size :: Prelude.Maybe Prelude.Integer,
    -- | The file name extension of the object. If the object doesn\'t have a
    -- file name extension, this value is \"\".
    S3Object -> Maybe Text
extension :: Prelude.Maybe Prelude.Text,
    -- | The full key (name) that\'s assigned to the object.
    S3Object -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
    -- | The storage class of the object.
    S3Object -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | Specifies whether the object is publicly accessible due to the
    -- combination of permissions settings that apply to the object.
    S3Object -> Maybe Bool
publicAccess :: Prelude.Maybe Prelude.Bool,
    -- | The date and time, in UTC and extended ISO 8601 format, when the object
    -- was last modified.
    S3Object -> Maybe POSIX
lastModified :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the bucket that contains the object.
    S3Object -> Maybe Text
bucketArn :: Prelude.Maybe Prelude.Text,
    -- | The type of server-side encryption that\'s used to encrypt the object.
    S3Object -> Maybe ServerSideEncryption
serverSideEncryption :: Prelude.Maybe ServerSideEncryption,
    -- | The tags that are associated with the object.
    S3Object -> Maybe [KeyValuePair]
tags :: Prelude.Maybe [KeyValuePair]
  }
  deriving (S3Object -> S3Object -> Bool
(S3Object -> S3Object -> Bool)
-> (S3Object -> S3Object -> Bool) -> Eq S3Object
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3Object -> S3Object -> Bool
$c/= :: S3Object -> S3Object -> Bool
== :: S3Object -> S3Object -> Bool
$c== :: S3Object -> S3Object -> Bool
Prelude.Eq, ReadPrec [S3Object]
ReadPrec S3Object
Int -> ReadS S3Object
ReadS [S3Object]
(Int -> ReadS S3Object)
-> ReadS [S3Object]
-> ReadPrec S3Object
-> ReadPrec [S3Object]
-> Read S3Object
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3Object]
$creadListPrec :: ReadPrec [S3Object]
readPrec :: ReadPrec S3Object
$creadPrec :: ReadPrec S3Object
readList :: ReadS [S3Object]
$creadList :: ReadS [S3Object]
readsPrec :: Int -> ReadS S3Object
$creadsPrec :: Int -> ReadS S3Object
Prelude.Read, Int -> S3Object -> ShowS
[S3Object] -> ShowS
S3Object -> String
(Int -> S3Object -> ShowS)
-> (S3Object -> String) -> ([S3Object] -> ShowS) -> Show S3Object
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3Object] -> ShowS
$cshowList :: [S3Object] -> ShowS
show :: S3Object -> String
$cshow :: S3Object -> String
showsPrec :: Int -> S3Object -> ShowS
$cshowsPrec :: Int -> S3Object -> ShowS
Prelude.Show, (forall x. S3Object -> Rep S3Object x)
-> (forall x. Rep S3Object x -> S3Object) -> Generic S3Object
forall x. Rep S3Object x -> S3Object
forall x. S3Object -> Rep S3Object x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3Object x -> S3Object
$cfrom :: forall x. S3Object -> Rep S3Object x
Prelude.Generic)

-- |
-- Create a value of 'S3Object' 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:
--
-- 'eTag', 's3Object_eTag' - The entity tag (ETag) that identifies the affected version of the
-- object. If the object was overwritten or changed after Amazon Macie
-- produced the finding, this value might be different from the current
-- ETag for the object.
--
-- 'versionId', 's3Object_versionId' - The identifier for the affected version of the object.
--
-- 'path', 's3Object_path' - The path to the object, including the full key (name).
--
-- 'size', 's3Object_size' - The total storage size, in bytes, of the object.
--
-- 'extension', 's3Object_extension' - The file name extension of the object. If the object doesn\'t have a
-- file name extension, this value is \"\".
--
-- 'key', 's3Object_key' - The full key (name) that\'s assigned to the object.
--
-- 'storageClass', 's3Object_storageClass' - The storage class of the object.
--
-- 'publicAccess', 's3Object_publicAccess' - Specifies whether the object is publicly accessible due to the
-- combination of permissions settings that apply to the object.
--
-- 'lastModified', 's3Object_lastModified' - The date and time, in UTC and extended ISO 8601 format, when the object
-- was last modified.
--
-- 'bucketArn', 's3Object_bucketArn' - The Amazon Resource Name (ARN) of the bucket that contains the object.
--
-- 'serverSideEncryption', 's3Object_serverSideEncryption' - The type of server-side encryption that\'s used to encrypt the object.
--
-- 'tags', 's3Object_tags' - The tags that are associated with the object.
newS3Object ::
  S3Object
newS3Object :: S3Object
newS3Object =
  S3Object' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe StorageClass
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe ServerSideEncryption
-> Maybe [KeyValuePair]
-> S3Object
S3Object'
    { $sel:eTag:S3Object' :: Maybe Text
eTag = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionId:S3Object' :: Maybe Text
versionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:path:S3Object' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:size:S3Object' :: Maybe Integer
size = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:extension:S3Object' :: Maybe Text
extension = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:key:S3Object' :: Maybe Text
key = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:S3Object' :: Maybe StorageClass
storageClass = Maybe StorageClass
forall a. Maybe a
Prelude.Nothing,
      $sel:publicAccess:S3Object' :: Maybe Bool
publicAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:S3Object' :: Maybe POSIX
lastModified = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:bucketArn:S3Object' :: Maybe Text
bucketArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serverSideEncryption:S3Object' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:S3Object' :: Maybe [KeyValuePair]
tags = Maybe [KeyValuePair]
forall a. Maybe a
Prelude.Nothing
    }

-- | The entity tag (ETag) that identifies the affected version of the
-- object. If the object was overwritten or changed after Amazon Macie
-- produced the finding, this value might be different from the current
-- ETag for the object.
s3Object_eTag :: Lens.Lens' S3Object (Prelude.Maybe Prelude.Text)
s3Object_eTag :: (Maybe Text -> f (Maybe Text)) -> S3Object -> f S3Object
s3Object_eTag = (S3Object -> Maybe Text)
-> (S3Object -> Maybe Text -> S3Object)
-> Lens S3Object S3Object (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe Text
eTag :: Maybe Text
$sel:eTag:S3Object' :: S3Object -> Maybe Text
eTag} -> Maybe Text
eTag) (\s :: S3Object
s@S3Object' {} Maybe Text
a -> S3Object
s {$sel:eTag:S3Object' :: Maybe Text
eTag = Maybe Text
a} :: S3Object)

-- | The identifier for the affected version of the object.
s3Object_versionId :: Lens.Lens' S3Object (Prelude.Maybe Prelude.Text)
s3Object_versionId :: (Maybe Text -> f (Maybe Text)) -> S3Object -> f S3Object
s3Object_versionId = (S3Object -> Maybe Text)
-> (S3Object -> Maybe Text -> S3Object)
-> Lens S3Object S3Object (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe Text
versionId :: Maybe Text
$sel:versionId:S3Object' :: S3Object -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: S3Object
s@S3Object' {} Maybe Text
a -> S3Object
s {$sel:versionId:S3Object' :: Maybe Text
versionId = Maybe Text
a} :: S3Object)

-- | The path to the object, including the full key (name).
s3Object_path :: Lens.Lens' S3Object (Prelude.Maybe Prelude.Text)
s3Object_path :: (Maybe Text -> f (Maybe Text)) -> S3Object -> f S3Object
s3Object_path = (S3Object -> Maybe Text)
-> (S3Object -> Maybe Text -> S3Object)
-> Lens S3Object S3Object (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe Text
path :: Maybe Text
$sel:path:S3Object' :: S3Object -> Maybe Text
path} -> Maybe Text
path) (\s :: S3Object
s@S3Object' {} Maybe Text
a -> S3Object
s {$sel:path:S3Object' :: Maybe Text
path = Maybe Text
a} :: S3Object)

-- | The total storage size, in bytes, of the object.
s3Object_size :: Lens.Lens' S3Object (Prelude.Maybe Prelude.Integer)
s3Object_size :: (Maybe Integer -> f (Maybe Integer)) -> S3Object -> f S3Object
s3Object_size = (S3Object -> Maybe Integer)
-> (S3Object -> Maybe Integer -> S3Object)
-> Lens S3Object S3Object (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe Integer
size :: Maybe Integer
$sel:size:S3Object' :: S3Object -> Maybe Integer
size} -> Maybe Integer
size) (\s :: S3Object
s@S3Object' {} Maybe Integer
a -> S3Object
s {$sel:size:S3Object' :: Maybe Integer
size = Maybe Integer
a} :: S3Object)

-- | The file name extension of the object. If the object doesn\'t have a
-- file name extension, this value is \"\".
s3Object_extension :: Lens.Lens' S3Object (Prelude.Maybe Prelude.Text)
s3Object_extension :: (Maybe Text -> f (Maybe Text)) -> S3Object -> f S3Object
s3Object_extension = (S3Object -> Maybe Text)
-> (S3Object -> Maybe Text -> S3Object)
-> Lens S3Object S3Object (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe Text
extension :: Maybe Text
$sel:extension:S3Object' :: S3Object -> Maybe Text
extension} -> Maybe Text
extension) (\s :: S3Object
s@S3Object' {} Maybe Text
a -> S3Object
s {$sel:extension:S3Object' :: Maybe Text
extension = Maybe Text
a} :: S3Object)

-- | The full key (name) that\'s assigned to the object.
s3Object_key :: Lens.Lens' S3Object (Prelude.Maybe Prelude.Text)
s3Object_key :: (Maybe Text -> f (Maybe Text)) -> S3Object -> f S3Object
s3Object_key = (S3Object -> Maybe Text)
-> (S3Object -> Maybe Text -> S3Object)
-> Lens S3Object S3Object (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe Text
key :: Maybe Text
$sel:key:S3Object' :: S3Object -> Maybe Text
key} -> Maybe Text
key) (\s :: S3Object
s@S3Object' {} Maybe Text
a -> S3Object
s {$sel:key:S3Object' :: Maybe Text
key = Maybe Text
a} :: S3Object)

-- | The storage class of the object.
s3Object_storageClass :: Lens.Lens' S3Object (Prelude.Maybe StorageClass)
s3Object_storageClass :: (Maybe StorageClass -> f (Maybe StorageClass))
-> S3Object -> f S3Object
s3Object_storageClass = (S3Object -> Maybe StorageClass)
-> (S3Object -> Maybe StorageClass -> S3Object)
-> Lens S3Object S3Object (Maybe StorageClass) (Maybe StorageClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe StorageClass
storageClass :: Maybe StorageClass
$sel:storageClass:S3Object' :: S3Object -> Maybe StorageClass
storageClass} -> Maybe StorageClass
storageClass) (\s :: S3Object
s@S3Object' {} Maybe StorageClass
a -> S3Object
s {$sel:storageClass:S3Object' :: Maybe StorageClass
storageClass = Maybe StorageClass
a} :: S3Object)

-- | Specifies whether the object is publicly accessible due to the
-- combination of permissions settings that apply to the object.
s3Object_publicAccess :: Lens.Lens' S3Object (Prelude.Maybe Prelude.Bool)
s3Object_publicAccess :: (Maybe Bool -> f (Maybe Bool)) -> S3Object -> f S3Object
s3Object_publicAccess = (S3Object -> Maybe Bool)
-> (S3Object -> Maybe Bool -> S3Object)
-> Lens S3Object S3Object (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe Bool
publicAccess :: Maybe Bool
$sel:publicAccess:S3Object' :: S3Object -> Maybe Bool
publicAccess} -> Maybe Bool
publicAccess) (\s :: S3Object
s@S3Object' {} Maybe Bool
a -> S3Object
s {$sel:publicAccess:S3Object' :: Maybe Bool
publicAccess = Maybe Bool
a} :: S3Object)

-- | The date and time, in UTC and extended ISO 8601 format, when the object
-- was last modified.
s3Object_lastModified :: Lens.Lens' S3Object (Prelude.Maybe Prelude.UTCTime)
s3Object_lastModified :: (Maybe UTCTime -> f (Maybe UTCTime)) -> S3Object -> f S3Object
s3Object_lastModified = (S3Object -> Maybe POSIX)
-> (S3Object -> Maybe POSIX -> S3Object)
-> Lens S3Object S3Object (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe POSIX
lastModified :: Maybe POSIX
$sel:lastModified:S3Object' :: S3Object -> Maybe POSIX
lastModified} -> Maybe POSIX
lastModified) (\s :: S3Object
s@S3Object' {} Maybe POSIX
a -> S3Object
s {$sel:lastModified:S3Object' :: Maybe POSIX
lastModified = Maybe POSIX
a} :: S3Object) ((Maybe POSIX -> f (Maybe POSIX)) -> S3Object -> f S3Object)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> S3Object
-> f S3Object
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 Amazon Resource Name (ARN) of the bucket that contains the object.
s3Object_bucketArn :: Lens.Lens' S3Object (Prelude.Maybe Prelude.Text)
s3Object_bucketArn :: (Maybe Text -> f (Maybe Text)) -> S3Object -> f S3Object
s3Object_bucketArn = (S3Object -> Maybe Text)
-> (S3Object -> Maybe Text -> S3Object)
-> Lens S3Object S3Object (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe Text
bucketArn :: Maybe Text
$sel:bucketArn:S3Object' :: S3Object -> Maybe Text
bucketArn} -> Maybe Text
bucketArn) (\s :: S3Object
s@S3Object' {} Maybe Text
a -> S3Object
s {$sel:bucketArn:S3Object' :: Maybe Text
bucketArn = Maybe Text
a} :: S3Object)

-- | The type of server-side encryption that\'s used to encrypt the object.
s3Object_serverSideEncryption :: Lens.Lens' S3Object (Prelude.Maybe ServerSideEncryption)
s3Object_serverSideEncryption :: (Maybe ServerSideEncryption -> f (Maybe ServerSideEncryption))
-> S3Object -> f S3Object
s3Object_serverSideEncryption = (S3Object -> Maybe ServerSideEncryption)
-> (S3Object -> Maybe ServerSideEncryption -> S3Object)
-> Lens
     S3Object
     S3Object
     (Maybe ServerSideEncryption)
     (Maybe ServerSideEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe ServerSideEncryption
serverSideEncryption :: Maybe ServerSideEncryption
$sel:serverSideEncryption:S3Object' :: S3Object -> Maybe ServerSideEncryption
serverSideEncryption} -> Maybe ServerSideEncryption
serverSideEncryption) (\s :: S3Object
s@S3Object' {} Maybe ServerSideEncryption
a -> S3Object
s {$sel:serverSideEncryption:S3Object' :: Maybe ServerSideEncryption
serverSideEncryption = Maybe ServerSideEncryption
a} :: S3Object)

-- | The tags that are associated with the object.
s3Object_tags :: Lens.Lens' S3Object (Prelude.Maybe [KeyValuePair])
s3Object_tags :: (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> S3Object -> f S3Object
s3Object_tags = (S3Object -> Maybe [KeyValuePair])
-> (S3Object -> Maybe [KeyValuePair] -> S3Object)
-> Lens
     S3Object S3Object (Maybe [KeyValuePair]) (Maybe [KeyValuePair])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3Object' {Maybe [KeyValuePair]
tags :: Maybe [KeyValuePair]
$sel:tags:S3Object' :: S3Object -> Maybe [KeyValuePair]
tags} -> Maybe [KeyValuePair]
tags) (\s :: S3Object
s@S3Object' {} Maybe [KeyValuePair]
a -> S3Object
s {$sel:tags:S3Object' :: Maybe [KeyValuePair]
tags = Maybe [KeyValuePair]
a} :: S3Object) ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
 -> S3Object -> f S3Object)
-> ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
    -> Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> S3Object
-> f S3Object
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

instance Core.FromJSON S3Object where
  parseJSON :: Value -> Parser S3Object
parseJSON =
    String -> (Object -> Parser S3Object) -> Value -> Parser S3Object
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"S3Object"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe StorageClass
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe ServerSideEncryption
-> Maybe [KeyValuePair]
-> S3Object
S3Object'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe StorageClass
 -> Maybe Bool
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe ServerSideEncryption
 -> Maybe [KeyValuePair]
 -> S3Object)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe [KeyValuePair]
      -> S3Object)
forall (f :: * -> *) a b. Functor 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
"eTag")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe [KeyValuePair]
   -> S3Object)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe [KeyValuePair]
      -> S3Object)
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
"versionId")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe [KeyValuePair]
   -> S3Object)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe [KeyValuePair]
      -> S3Object)
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
"path")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe [KeyValuePair]
   -> S3Object)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe [KeyValuePair]
      -> S3Object)
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
"size")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe [KeyValuePair]
   -> S3Object)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe StorageClass
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe [KeyValuePair]
      -> S3Object)
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
"extension")
            Parser
  (Maybe Text
   -> Maybe StorageClass
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe [KeyValuePair]
   -> S3Object)
-> Parser (Maybe Text)
-> Parser
     (Maybe StorageClass
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe [KeyValuePair]
      -> S3Object)
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
"key")
            Parser
  (Maybe StorageClass
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe [KeyValuePair]
   -> S3Object)
-> Parser (Maybe StorageClass)
-> Parser
     (Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe [KeyValuePair]
      -> S3Object)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StorageClass)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"storageClass")
            Parser
  (Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe [KeyValuePair]
   -> S3Object)
-> Parser (Maybe Bool)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe ServerSideEncryption
      -> Maybe [KeyValuePair]
      -> S3Object)
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
"publicAccess")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe ServerSideEncryption
   -> Maybe [KeyValuePair]
   -> S3Object)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe ServerSideEncryption -> Maybe [KeyValuePair] -> S3Object)
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
"lastModified")
            Parser
  (Maybe Text
   -> Maybe ServerSideEncryption -> Maybe [KeyValuePair] -> S3Object)
-> Parser (Maybe Text)
-> Parser
     (Maybe ServerSideEncryption -> Maybe [KeyValuePair] -> S3Object)
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 ServerSideEncryption -> Maybe [KeyValuePair] -> S3Object)
-> Parser (Maybe ServerSideEncryption)
-> Parser (Maybe [KeyValuePair] -> S3Object)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServerSideEncryption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serverSideEncryption")
            Parser (Maybe [KeyValuePair] -> S3Object)
-> Parser (Maybe [KeyValuePair]) -> Parser S3Object
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)
      )

instance Prelude.Hashable S3Object

instance Prelude.NFData S3Object