{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.S3.ListObjects
(
ListObjects (..),
newListObjects,
listObjects_prefix,
listObjects_encodingType,
listObjects_requestPayer,
listObjects_marker,
listObjects_maxKeys,
listObjects_delimiter,
listObjects_expectedBucketOwner,
listObjects_bucket,
ListObjectsResponse (..),
newListObjectsResponse,
listObjectsResponse_contents,
listObjectsResponse_prefix,
listObjectsResponse_commonPrefixes,
listObjectsResponse_encodingType,
listObjectsResponse_name,
listObjectsResponse_marker,
listObjectsResponse_nextMarker,
listObjectsResponse_maxKeys,
listObjectsResponse_isTruncated,
listObjectsResponse_delimiter,
listObjectsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.S3.Types
data ListObjects = ListObjects'
{
ListObjects -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
ListObjects -> Maybe EncodingType
encodingType :: Prelude.Maybe EncodingType,
ListObjects -> Maybe RequestPayer
requestPayer :: Prelude.Maybe RequestPayer,
ListObjects -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListObjects -> Maybe Int
maxKeys :: Prelude.Maybe Prelude.Int,
ListObjects -> Maybe Delimiter
delimiter :: Prelude.Maybe Delimiter,
ListObjects -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
ListObjects -> BucketName
bucket :: BucketName
}
deriving (ListObjects -> ListObjects -> Bool
(ListObjects -> ListObjects -> Bool)
-> (ListObjects -> ListObjects -> Bool) -> Eq ListObjects
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListObjects -> ListObjects -> Bool
$c/= :: ListObjects -> ListObjects -> Bool
== :: ListObjects -> ListObjects -> Bool
$c== :: ListObjects -> ListObjects -> Bool
Prelude.Eq, ReadPrec [ListObjects]
ReadPrec ListObjects
Int -> ReadS ListObjects
ReadS [ListObjects]
(Int -> ReadS ListObjects)
-> ReadS [ListObjects]
-> ReadPrec ListObjects
-> ReadPrec [ListObjects]
-> Read ListObjects
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListObjects]
$creadListPrec :: ReadPrec [ListObjects]
readPrec :: ReadPrec ListObjects
$creadPrec :: ReadPrec ListObjects
readList :: ReadS [ListObjects]
$creadList :: ReadS [ListObjects]
readsPrec :: Int -> ReadS ListObjects
$creadsPrec :: Int -> ReadS ListObjects
Prelude.Read, Int -> ListObjects -> ShowS
[ListObjects] -> ShowS
ListObjects -> String
(Int -> ListObjects -> ShowS)
-> (ListObjects -> String)
-> ([ListObjects] -> ShowS)
-> Show ListObjects
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListObjects] -> ShowS
$cshowList :: [ListObjects] -> ShowS
show :: ListObjects -> String
$cshow :: ListObjects -> String
showsPrec :: Int -> ListObjects -> ShowS
$cshowsPrec :: Int -> ListObjects -> ShowS
Prelude.Show, (forall x. ListObjects -> Rep ListObjects x)
-> (forall x. Rep ListObjects x -> ListObjects)
-> Generic ListObjects
forall x. Rep ListObjects x -> ListObjects
forall x. ListObjects -> Rep ListObjects x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListObjects x -> ListObjects
$cfrom :: forall x. ListObjects -> Rep ListObjects x
Prelude.Generic)
newListObjects ::
BucketName ->
ListObjects
newListObjects :: BucketName -> ListObjects
newListObjects BucketName
pBucket_ =
ListObjects' :: Maybe Text
-> Maybe EncodingType
-> Maybe RequestPayer
-> Maybe Text
-> Maybe Int
-> Maybe Delimiter
-> Maybe Text
-> BucketName
-> ListObjects
ListObjects'
{ $sel:prefix:ListObjects' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:encodingType:ListObjects' :: Maybe EncodingType
encodingType = Maybe EncodingType
forall a. Maybe a
Prelude.Nothing,
$sel:requestPayer:ListObjects' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
forall a. Maybe a
Prelude.Nothing,
$sel:marker:ListObjects' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxKeys:ListObjects' :: Maybe Int
maxKeys = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:delimiter:ListObjects' :: Maybe Delimiter
delimiter = Maybe Delimiter
forall a. Maybe a
Prelude.Nothing,
$sel:expectedBucketOwner:ListObjects' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucket:ListObjects' :: BucketName
bucket = BucketName
pBucket_
}
listObjects_prefix :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.Text)
listObjects_prefix :: (Maybe Text -> f (Maybe Text)) -> ListObjects -> f ListObjects
listObjects_prefix = (ListObjects -> Maybe Text)
-> (ListObjects -> Maybe Text -> ListObjects)
-> Lens ListObjects ListObjects (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {Maybe Text
prefix :: Maybe Text
$sel:prefix:ListObjects' :: ListObjects -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: ListObjects
s@ListObjects' {} Maybe Text
a -> ListObjects
s {$sel:prefix:ListObjects' :: Maybe Text
prefix = Maybe Text
a} :: ListObjects)
listObjects_encodingType :: Lens.Lens' ListObjects (Prelude.Maybe EncodingType)
listObjects_encodingType :: (Maybe EncodingType -> f (Maybe EncodingType))
-> ListObjects -> f ListObjects
listObjects_encodingType = (ListObjects -> Maybe EncodingType)
-> (ListObjects -> Maybe EncodingType -> ListObjects)
-> Lens
ListObjects ListObjects (Maybe EncodingType) (Maybe EncodingType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {Maybe EncodingType
encodingType :: Maybe EncodingType
$sel:encodingType:ListObjects' :: ListObjects -> Maybe EncodingType
encodingType} -> Maybe EncodingType
encodingType) (\s :: ListObjects
s@ListObjects' {} Maybe EncodingType
a -> ListObjects
s {$sel:encodingType:ListObjects' :: Maybe EncodingType
encodingType = Maybe EncodingType
a} :: ListObjects)
listObjects_requestPayer :: Lens.Lens' ListObjects (Prelude.Maybe RequestPayer)
listObjects_requestPayer :: (Maybe RequestPayer -> f (Maybe RequestPayer))
-> ListObjects -> f ListObjects
listObjects_requestPayer = (ListObjects -> Maybe RequestPayer)
-> (ListObjects -> Maybe RequestPayer -> ListObjects)
-> Lens
ListObjects ListObjects (Maybe RequestPayer) (Maybe RequestPayer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {Maybe RequestPayer
requestPayer :: Maybe RequestPayer
$sel:requestPayer:ListObjects' :: ListObjects -> Maybe RequestPayer
requestPayer} -> Maybe RequestPayer
requestPayer) (\s :: ListObjects
s@ListObjects' {} Maybe RequestPayer
a -> ListObjects
s {$sel:requestPayer:ListObjects' :: Maybe RequestPayer
requestPayer = Maybe RequestPayer
a} :: ListObjects)
listObjects_marker :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.Text)
listObjects_marker :: (Maybe Text -> f (Maybe Text)) -> ListObjects -> f ListObjects
listObjects_marker = (ListObjects -> Maybe Text)
-> (ListObjects -> Maybe Text -> ListObjects)
-> Lens ListObjects ListObjects (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {Maybe Text
marker :: Maybe Text
$sel:marker:ListObjects' :: ListObjects -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListObjects
s@ListObjects' {} Maybe Text
a -> ListObjects
s {$sel:marker:ListObjects' :: Maybe Text
marker = Maybe Text
a} :: ListObjects)
listObjects_maxKeys :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.Int)
listObjects_maxKeys :: (Maybe Int -> f (Maybe Int)) -> ListObjects -> f ListObjects
listObjects_maxKeys = (ListObjects -> Maybe Int)
-> (ListObjects -> Maybe Int -> ListObjects)
-> Lens ListObjects ListObjects (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {Maybe Int
maxKeys :: Maybe Int
$sel:maxKeys:ListObjects' :: ListObjects -> Maybe Int
maxKeys} -> Maybe Int
maxKeys) (\s :: ListObjects
s@ListObjects' {} Maybe Int
a -> ListObjects
s {$sel:maxKeys:ListObjects' :: Maybe Int
maxKeys = Maybe Int
a} :: ListObjects)
listObjects_delimiter :: Lens.Lens' ListObjects (Prelude.Maybe Delimiter)
listObjects_delimiter :: (Maybe Delimiter -> f (Maybe Delimiter))
-> ListObjects -> f ListObjects
listObjects_delimiter = (ListObjects -> Maybe Delimiter)
-> (ListObjects -> Maybe Delimiter -> ListObjects)
-> Lens ListObjects ListObjects (Maybe Delimiter) (Maybe Delimiter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {Maybe Delimiter
delimiter :: Maybe Delimiter
$sel:delimiter:ListObjects' :: ListObjects -> Maybe Delimiter
delimiter} -> Maybe Delimiter
delimiter) (\s :: ListObjects
s@ListObjects' {} Maybe Delimiter
a -> ListObjects
s {$sel:delimiter:ListObjects' :: Maybe Delimiter
delimiter = Maybe Delimiter
a} :: ListObjects)
listObjects_expectedBucketOwner :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.Text)
listObjects_expectedBucketOwner :: (Maybe Text -> f (Maybe Text)) -> ListObjects -> f ListObjects
listObjects_expectedBucketOwner = (ListObjects -> Maybe Text)
-> (ListObjects -> Maybe Text -> ListObjects)
-> Lens ListObjects ListObjects (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:ListObjects' :: ListObjects -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: ListObjects
s@ListObjects' {} Maybe Text
a -> ListObjects
s {$sel:expectedBucketOwner:ListObjects' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: ListObjects)
listObjects_bucket :: Lens.Lens' ListObjects BucketName
listObjects_bucket :: (BucketName -> f BucketName) -> ListObjects -> f ListObjects
listObjects_bucket = (ListObjects -> BucketName)
-> (ListObjects -> BucketName -> ListObjects)
-> Lens ListObjects ListObjects BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjects' {BucketName
bucket :: BucketName
$sel:bucket:ListObjects' :: ListObjects -> BucketName
bucket} -> BucketName
bucket) (\s :: ListObjects
s@ListObjects' {} BucketName
a -> ListObjects
s {$sel:bucket:ListObjects' :: BucketName
bucket = BucketName
a} :: ListObjects)
instance Core.AWSPager ListObjects where
page :: ListObjects -> AWSResponse ListObjects -> Maybe ListObjects
page ListObjects
rq AWSResponse ListObjects
rs
| Maybe Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListObjects
ListObjectsResponse
rs
ListObjectsResponse
-> Getting (First Bool) ListObjectsResponse Bool -> Maybe Bool
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListObjectsResponse -> Const (First Bool) ListObjectsResponse
Lens' ListObjectsResponse (Maybe Bool)
listObjectsResponse_isTruncated ((Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListObjectsResponse -> Const (First Bool) ListObjectsResponse)
-> ((Bool -> Const (First Bool) Bool)
-> Maybe Bool -> Const (First Bool) (Maybe Bool))
-> Getting (First Bool) ListObjectsResponse Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Bool -> Const (First Bool) Bool)
-> Maybe Bool -> Const (First Bool) (Maybe Bool)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListObjects
forall a. Maybe a
Prelude.Nothing
| Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
( AWSResponse ListObjects
ListObjectsResponse
rs
ListObjectsResponse
-> Getting (Maybe Text) ListObjectsResponse (Maybe Text)
-> Maybe Text
forall s a. s -> Getting a s a -> a
Lens.^. (ListObjectsResponse -> Maybe Text)
-> (ListObjectsResponse -> Maybe ObjectKey)
-> Getter ListObjectsResponse (Maybe Text)
forall (f :: * -> *) a b s.
(Alternative f, ToText a, ToText b) =>
(s -> f a) -> (s -> f b) -> Getter s (f Text)
Core.choice
( ListObjectsResponse
-> Getting (First Text) ListObjectsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^?
( (Maybe Text -> Const (First Text) (Maybe Text))
-> ListObjectsResponse -> Const (First Text) ListObjectsResponse
Lens' ListObjectsResponse (Maybe Text)
listObjectsResponse_nextMarker
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListObjectsResponse -> Const (First Text) ListObjectsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListObjectsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
)
)
( ListObjectsResponse
-> Getting (First ObjectKey) ListObjectsResponse ObjectKey
-> Maybe ObjectKey
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^?
( (Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ListObjectsResponse
-> Const (First ObjectKey) ListObjectsResponse
Lens' ListObjectsResponse (Maybe [Object])
listObjectsResponse_contents ((Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ListObjectsResponse
-> Const (First ObjectKey) ListObjectsResponse)
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> Getting (First ObjectKey) ListObjectsResponse ObjectKey
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Object] -> Const (First ObjectKey) [Object])
-> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
(([Object] -> Const (First ObjectKey) [Object])
-> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
-> [Object] -> Const (First ObjectKey) [Object])
-> (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Maybe [Object]
-> Const (First ObjectKey) (Maybe [Object])
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Object -> Const (First ObjectKey) Object)
-> [Object] -> Const (First ObjectKey) [Object]
forall s a. Snoc s s a a => Traversal' s a
Lens._last
((Object -> Const (First ObjectKey) Object)
-> [Object] -> Const (First ObjectKey) [Object])
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Object -> Const (First ObjectKey) Object)
-> (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> [Object]
-> Const (First ObjectKey) [Object]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Object -> Const (First ObjectKey) Object
Lens' Object ObjectKey
object_key
)
)
) =
Maybe ListObjects
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListObjects -> Maybe ListObjects
forall a. a -> Maybe a
Prelude.Just (ListObjects -> Maybe ListObjects)
-> ListObjects -> Maybe ListObjects
forall a b. (a -> b) -> a -> b
Prelude.$
ListObjects
rq
ListObjects -> (ListObjects -> ListObjects) -> ListObjects
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListObjects -> Identity ListObjects
Lens ListObjects ListObjects (Maybe Text) (Maybe Text)
listObjects_marker
((Maybe Text -> Identity (Maybe Text))
-> ListObjects -> Identity ListObjects)
-> Maybe Text -> ListObjects -> ListObjects
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListObjects
ListObjectsResponse
rs
ListObjectsResponse
-> Getting (Maybe Text) ListObjectsResponse (Maybe Text)
-> Maybe Text
forall s a. s -> Getting a s a -> a
Lens.^. (ListObjectsResponse -> Maybe Text)
-> (ListObjectsResponse -> Maybe ObjectKey)
-> Getter ListObjectsResponse (Maybe Text)
forall (f :: * -> *) a b s.
(Alternative f, ToText a, ToText b) =>
(s -> f a) -> (s -> f b) -> Getter s (f Text)
Core.choice
( ListObjectsResponse
-> Getting (First Text) ListObjectsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^?
( (Maybe Text -> Const (First Text) (Maybe Text))
-> ListObjectsResponse -> Const (First Text) ListObjectsResponse
Lens' ListObjectsResponse (Maybe Text)
listObjectsResponse_nextMarker
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListObjectsResponse -> Const (First Text) ListObjectsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListObjectsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
)
)
( ListObjectsResponse
-> Getting (First ObjectKey) ListObjectsResponse ObjectKey
-> Maybe ObjectKey
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^?
( (Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ListObjectsResponse
-> Const (First ObjectKey) ListObjectsResponse
Lens' ListObjectsResponse (Maybe [Object])
listObjectsResponse_contents ((Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ListObjectsResponse
-> Const (First ObjectKey) ListObjectsResponse)
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> Getting (First ObjectKey) ListObjectsResponse ObjectKey
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Object] -> Const (First ObjectKey) [Object])
-> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
(([Object] -> Const (First ObjectKey) [Object])
-> Maybe [Object] -> Const (First ObjectKey) (Maybe [Object]))
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
-> [Object] -> Const (First ObjectKey) [Object])
-> (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Maybe [Object]
-> Const (First ObjectKey) (Maybe [Object])
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Object -> Const (First ObjectKey) Object)
-> [Object] -> Const (First ObjectKey) [Object]
forall s a. Snoc s s a a => Traversal' s a
Lens._last
((Object -> Const (First ObjectKey) Object)
-> [Object] -> Const (First ObjectKey) [Object])
-> ((ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Object -> Const (First ObjectKey) Object)
-> (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> [Object]
-> Const (First ObjectKey) [Object]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ObjectKey -> Const (First ObjectKey) ObjectKey)
-> Object -> Const (First ObjectKey) Object
Lens' Object ObjectKey
object_key
)
)
instance Core.AWSRequest ListObjects where
type AWSResponse ListObjects = ListObjectsResponse
request :: ListObjects -> Request ListObjects
request =
Request ListObjects -> Request ListObjects
forall a. Request a -> Request a
Request.s3vhost
(Request ListObjects -> Request ListObjects)
-> (ListObjects -> Request ListObjects)
-> ListObjects
-> Request ListObjects
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> ListObjects -> Request ListObjects
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListObjects
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListObjects)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListObjects))
-> Logger
-> Service
-> Proxy ListObjects
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListObjects)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [Object]
-> Maybe Text
-> Maybe [CommonPrefix]
-> Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse
ListObjectsResponse'
(Maybe [Object]
-> Maybe Text
-> Maybe [CommonPrefix]
-> Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
-> Either String (Maybe [Object])
-> Either
String
(Maybe Text
-> Maybe [CommonPrefix]
-> Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (([Node] -> Either String [Object])
-> [Node] -> Either String (Maybe [Object])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Object]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Contents") [Node]
x)
Either
String
(Maybe Text
-> Maybe [CommonPrefix]
-> Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [CommonPrefix]
-> Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Prefix")
Either
String
(Maybe [CommonPrefix]
-> Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
-> Either String (Maybe [CommonPrefix])
-> Either
String
(Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (([Node] -> Either String [CommonPrefix])
-> [Node] -> Either String (Maybe [CommonPrefix])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [CommonPrefix]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"CommonPrefixes") [Node]
x)
Either
String
(Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
-> Either String (Maybe EncodingType)
-> Either
String
(Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe EncodingType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EncodingType")
Either
String
(Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
-> Either String (Maybe BucketName)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe BucketName)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Name")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
Either
String
(Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Int
-> Maybe Bool -> Maybe Delimiter -> Int -> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextMarker")
Either
String
(Maybe Int
-> Maybe Bool -> Maybe Delimiter -> Int -> ListObjectsResponse)
-> Either String (Maybe Int)
-> Either
String
(Maybe Bool -> Maybe Delimiter -> Int -> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MaxKeys")
Either
String
(Maybe Bool -> Maybe Delimiter -> Int -> ListObjectsResponse)
-> Either String (Maybe Bool)
-> Either String (Maybe Delimiter -> Int -> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsTruncated")
Either String (Maybe Delimiter -> Int -> ListObjectsResponse)
-> Either String (Maybe Delimiter)
-> Either String (Int -> ListObjectsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Delimiter)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Delimiter")
Either String (Int -> ListObjectsResponse)
-> Either String Int -> Either String ListObjectsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListObjects
instance Prelude.NFData ListObjects
instance Core.ToHeaders ListObjects where
toHeaders :: ListObjects -> ResponseHeaders
toHeaders ListObjects' {Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
delimiter :: Maybe Delimiter
maxKeys :: Maybe Int
marker :: Maybe Text
requestPayer :: Maybe RequestPayer
encodingType :: Maybe EncodingType
prefix :: Maybe Text
$sel:bucket:ListObjects' :: ListObjects -> BucketName
$sel:expectedBucketOwner:ListObjects' :: ListObjects -> Maybe Text
$sel:delimiter:ListObjects' :: ListObjects -> Maybe Delimiter
$sel:maxKeys:ListObjects' :: ListObjects -> Maybe Int
$sel:marker:ListObjects' :: ListObjects -> Maybe Text
$sel:requestPayer:ListObjects' :: ListObjects -> Maybe RequestPayer
$sel:encodingType:ListObjects' :: ListObjects -> Maybe EncodingType
$sel:prefix:ListObjects' :: ListObjects -> Maybe Text
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"x-amz-request-payer" HeaderName -> Maybe RequestPayer -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe RequestPayer
requestPayer,
HeaderName
"x-amz-expected-bucket-owner"
HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
expectedBucketOwner
]
instance Core.ToPath ListObjects where
toPath :: ListObjects -> ByteString
toPath ListObjects' {Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
delimiter :: Maybe Delimiter
maxKeys :: Maybe Int
marker :: Maybe Text
requestPayer :: Maybe RequestPayer
encodingType :: Maybe EncodingType
prefix :: Maybe Text
$sel:bucket:ListObjects' :: ListObjects -> BucketName
$sel:expectedBucketOwner:ListObjects' :: ListObjects -> Maybe Text
$sel:delimiter:ListObjects' :: ListObjects -> Maybe Delimiter
$sel:maxKeys:ListObjects' :: ListObjects -> Maybe Int
$sel:marker:ListObjects' :: ListObjects -> Maybe Text
$sel:requestPayer:ListObjects' :: ListObjects -> Maybe RequestPayer
$sel:encodingType:ListObjects' :: ListObjects -> Maybe EncodingType
$sel:prefix:ListObjects' :: ListObjects -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/", BucketName -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS BucketName
bucket]
instance Core.ToQuery ListObjects where
toQuery :: ListObjects -> QueryString
toQuery ListObjects' {Maybe Delimiter
Maybe Int
Maybe Text
Maybe EncodingType
Maybe RequestPayer
BucketName
bucket :: BucketName
expectedBucketOwner :: Maybe Text
delimiter :: Maybe Delimiter
maxKeys :: Maybe Int
marker :: Maybe Text
requestPayer :: Maybe RequestPayer
encodingType :: Maybe EncodingType
prefix :: Maybe Text
$sel:bucket:ListObjects' :: ListObjects -> BucketName
$sel:expectedBucketOwner:ListObjects' :: ListObjects -> Maybe Text
$sel:delimiter:ListObjects' :: ListObjects -> Maybe Delimiter
$sel:maxKeys:ListObjects' :: ListObjects -> Maybe Int
$sel:marker:ListObjects' :: ListObjects -> Maybe Text
$sel:requestPayer:ListObjects' :: ListObjects -> Maybe RequestPayer
$sel:encodingType:ListObjects' :: ListObjects -> Maybe EncodingType
$sel:prefix:ListObjects' :: ListObjects -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"prefix" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
prefix,
ByteString
"encoding-type" ByteString -> Maybe EncodingType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe EncodingType
encodingType,
ByteString
"marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"max-keys" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxKeys,
ByteString
"delimiter" ByteString -> Maybe Delimiter -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Delimiter
delimiter
]
data ListObjectsResponse = ListObjectsResponse'
{
ListObjectsResponse -> Maybe [Object]
contents :: Prelude.Maybe [Object],
ListObjectsResponse -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
ListObjectsResponse -> Maybe [CommonPrefix]
commonPrefixes :: Prelude.Maybe [CommonPrefix],
ListObjectsResponse -> Maybe EncodingType
encodingType :: Prelude.Maybe EncodingType,
ListObjectsResponse -> Maybe BucketName
name :: Prelude.Maybe BucketName,
ListObjectsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListObjectsResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
ListObjectsResponse -> Maybe Int
maxKeys :: Prelude.Maybe Prelude.Int,
ListObjectsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
ListObjectsResponse -> Maybe Delimiter
delimiter :: Prelude.Maybe Delimiter,
ListObjectsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListObjectsResponse -> ListObjectsResponse -> Bool
(ListObjectsResponse -> ListObjectsResponse -> Bool)
-> (ListObjectsResponse -> ListObjectsResponse -> Bool)
-> Eq ListObjectsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListObjectsResponse -> ListObjectsResponse -> Bool
$c/= :: ListObjectsResponse -> ListObjectsResponse -> Bool
== :: ListObjectsResponse -> ListObjectsResponse -> Bool
$c== :: ListObjectsResponse -> ListObjectsResponse -> Bool
Prelude.Eq, ReadPrec [ListObjectsResponse]
ReadPrec ListObjectsResponse
Int -> ReadS ListObjectsResponse
ReadS [ListObjectsResponse]
(Int -> ReadS ListObjectsResponse)
-> ReadS [ListObjectsResponse]
-> ReadPrec ListObjectsResponse
-> ReadPrec [ListObjectsResponse]
-> Read ListObjectsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListObjectsResponse]
$creadListPrec :: ReadPrec [ListObjectsResponse]
readPrec :: ReadPrec ListObjectsResponse
$creadPrec :: ReadPrec ListObjectsResponse
readList :: ReadS [ListObjectsResponse]
$creadList :: ReadS [ListObjectsResponse]
readsPrec :: Int -> ReadS ListObjectsResponse
$creadsPrec :: Int -> ReadS ListObjectsResponse
Prelude.Read, Int -> ListObjectsResponse -> ShowS
[ListObjectsResponse] -> ShowS
ListObjectsResponse -> String
(Int -> ListObjectsResponse -> ShowS)
-> (ListObjectsResponse -> String)
-> ([ListObjectsResponse] -> ShowS)
-> Show ListObjectsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListObjectsResponse] -> ShowS
$cshowList :: [ListObjectsResponse] -> ShowS
show :: ListObjectsResponse -> String
$cshow :: ListObjectsResponse -> String
showsPrec :: Int -> ListObjectsResponse -> ShowS
$cshowsPrec :: Int -> ListObjectsResponse -> ShowS
Prelude.Show, (forall x. ListObjectsResponse -> Rep ListObjectsResponse x)
-> (forall x. Rep ListObjectsResponse x -> ListObjectsResponse)
-> Generic ListObjectsResponse
forall x. Rep ListObjectsResponse x -> ListObjectsResponse
forall x. ListObjectsResponse -> Rep ListObjectsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListObjectsResponse x -> ListObjectsResponse
$cfrom :: forall x. ListObjectsResponse -> Rep ListObjectsResponse x
Prelude.Generic)
newListObjectsResponse ::
Prelude.Int ->
ListObjectsResponse
newListObjectsResponse :: Int -> ListObjectsResponse
newListObjectsResponse Int
pHttpStatus_ =
ListObjectsResponse' :: Maybe [Object]
-> Maybe Text
-> Maybe [CommonPrefix]
-> Maybe EncodingType
-> Maybe BucketName
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Delimiter
-> Int
-> ListObjectsResponse
ListObjectsResponse'
{ $sel:contents:ListObjectsResponse' :: Maybe [Object]
contents = Maybe [Object]
forall a. Maybe a
Prelude.Nothing,
$sel:prefix:ListObjectsResponse' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:commonPrefixes:ListObjectsResponse' :: Maybe [CommonPrefix]
commonPrefixes = Maybe [CommonPrefix]
forall a. Maybe a
Prelude.Nothing,
$sel:encodingType:ListObjectsResponse' :: Maybe EncodingType
encodingType = Maybe EncodingType
forall a. Maybe a
Prelude.Nothing,
$sel:name:ListObjectsResponse' :: Maybe BucketName
name = Maybe BucketName
forall a. Maybe a
Prelude.Nothing,
$sel:marker:ListObjectsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextMarker:ListObjectsResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxKeys:ListObjectsResponse' :: Maybe Int
maxKeys = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:isTruncated:ListObjectsResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:delimiter:ListObjectsResponse' :: Maybe Delimiter
delimiter = Maybe Delimiter
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListObjectsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listObjectsResponse_contents :: Lens.Lens' ListObjectsResponse (Prelude.Maybe [Object])
listObjectsResponse_contents :: (Maybe [Object] -> f (Maybe [Object]))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_contents = (ListObjectsResponse -> Maybe [Object])
-> (ListObjectsResponse -> Maybe [Object] -> ListObjectsResponse)
-> Lens' ListObjectsResponse (Maybe [Object])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe [Object]
contents :: Maybe [Object]
$sel:contents:ListObjectsResponse' :: ListObjectsResponse -> Maybe [Object]
contents} -> Maybe [Object]
contents) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe [Object]
a -> ListObjectsResponse
s {$sel:contents:ListObjectsResponse' :: Maybe [Object]
contents = Maybe [Object]
a} :: ListObjectsResponse) ((Maybe [Object] -> f (Maybe [Object]))
-> ListObjectsResponse -> f ListObjectsResponse)
-> ((Maybe [Object] -> f (Maybe [Object]))
-> Maybe [Object] -> f (Maybe [Object]))
-> (Maybe [Object] -> f (Maybe [Object]))
-> ListObjectsResponse
-> f ListObjectsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Object] [Object] [Object] [Object]
-> Iso
(Maybe [Object]) (Maybe [Object]) (Maybe [Object]) (Maybe [Object])
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 [Object] [Object] [Object] [Object]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listObjectsResponse_prefix :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Text)
listObjectsResponse_prefix :: (Maybe Text -> f (Maybe Text))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_prefix = (ListObjectsResponse -> Maybe Text)
-> (ListObjectsResponse -> Maybe Text -> ListObjectsResponse)
-> Lens' ListObjectsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Text
prefix :: Maybe Text
$sel:prefix:ListObjectsResponse' :: ListObjectsResponse -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Text
a -> ListObjectsResponse
s {$sel:prefix:ListObjectsResponse' :: Maybe Text
prefix = Maybe Text
a} :: ListObjectsResponse)
listObjectsResponse_commonPrefixes :: Lens.Lens' ListObjectsResponse (Prelude.Maybe [CommonPrefix])
listObjectsResponse_commonPrefixes :: (Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_commonPrefixes = (ListObjectsResponse -> Maybe [CommonPrefix])
-> (ListObjectsResponse
-> Maybe [CommonPrefix] -> ListObjectsResponse)
-> Lens
ListObjectsResponse
ListObjectsResponse
(Maybe [CommonPrefix])
(Maybe [CommonPrefix])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe [CommonPrefix]
commonPrefixes :: Maybe [CommonPrefix]
$sel:commonPrefixes:ListObjectsResponse' :: ListObjectsResponse -> Maybe [CommonPrefix]
commonPrefixes} -> Maybe [CommonPrefix]
commonPrefixes) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe [CommonPrefix]
a -> ListObjectsResponse
s {$sel:commonPrefixes:ListObjectsResponse' :: Maybe [CommonPrefix]
commonPrefixes = Maybe [CommonPrefix]
a} :: ListObjectsResponse) ((Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
-> ListObjectsResponse -> f ListObjectsResponse)
-> ((Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
-> Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
-> (Maybe [CommonPrefix] -> f (Maybe [CommonPrefix]))
-> ListObjectsResponse
-> f ListObjectsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [CommonPrefix] [CommonPrefix] [CommonPrefix] [CommonPrefix]
-> Iso
(Maybe [CommonPrefix])
(Maybe [CommonPrefix])
(Maybe [CommonPrefix])
(Maybe [CommonPrefix])
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 [CommonPrefix] [CommonPrefix] [CommonPrefix] [CommonPrefix]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listObjectsResponse_encodingType :: Lens.Lens' ListObjectsResponse (Prelude.Maybe EncodingType)
listObjectsResponse_encodingType :: (Maybe EncodingType -> f (Maybe EncodingType))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_encodingType = (ListObjectsResponse -> Maybe EncodingType)
-> (ListObjectsResponse
-> Maybe EncodingType -> ListObjectsResponse)
-> Lens
ListObjectsResponse
ListObjectsResponse
(Maybe EncodingType)
(Maybe EncodingType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe EncodingType
encodingType :: Maybe EncodingType
$sel:encodingType:ListObjectsResponse' :: ListObjectsResponse -> Maybe EncodingType
encodingType} -> Maybe EncodingType
encodingType) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe EncodingType
a -> ListObjectsResponse
s {$sel:encodingType:ListObjectsResponse' :: Maybe EncodingType
encodingType = Maybe EncodingType
a} :: ListObjectsResponse)
listObjectsResponse_name :: Lens.Lens' ListObjectsResponse (Prelude.Maybe BucketName)
listObjectsResponse_name :: (Maybe BucketName -> f (Maybe BucketName))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_name = (ListObjectsResponse -> Maybe BucketName)
-> (ListObjectsResponse -> Maybe BucketName -> ListObjectsResponse)
-> Lens
ListObjectsResponse
ListObjectsResponse
(Maybe BucketName)
(Maybe BucketName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe BucketName
name :: Maybe BucketName
$sel:name:ListObjectsResponse' :: ListObjectsResponse -> Maybe BucketName
name} -> Maybe BucketName
name) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe BucketName
a -> ListObjectsResponse
s {$sel:name:ListObjectsResponse' :: Maybe BucketName
name = Maybe BucketName
a} :: ListObjectsResponse)
listObjectsResponse_marker :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Text)
listObjectsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_marker = (ListObjectsResponse -> Maybe Text)
-> (ListObjectsResponse -> Maybe Text -> ListObjectsResponse)
-> Lens' ListObjectsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListObjectsResponse' :: ListObjectsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Text
a -> ListObjectsResponse
s {$sel:marker:ListObjectsResponse' :: Maybe Text
marker = Maybe Text
a} :: ListObjectsResponse)
listObjectsResponse_nextMarker :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Text)
listObjectsResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_nextMarker = (ListObjectsResponse -> Maybe Text)
-> (ListObjectsResponse -> Maybe Text -> ListObjectsResponse)
-> Lens' ListObjectsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListObjectsResponse' :: ListObjectsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Text
a -> ListObjectsResponse
s {$sel:nextMarker:ListObjectsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListObjectsResponse)
listObjectsResponse_maxKeys :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Int)
listObjectsResponse_maxKeys :: (Maybe Int -> f (Maybe Int))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_maxKeys = (ListObjectsResponse -> Maybe Int)
-> (ListObjectsResponse -> Maybe Int -> ListObjectsResponse)
-> Lens
ListObjectsResponse ListObjectsResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Int
maxKeys :: Maybe Int
$sel:maxKeys:ListObjectsResponse' :: ListObjectsResponse -> Maybe Int
maxKeys} -> Maybe Int
maxKeys) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Int
a -> ListObjectsResponse
s {$sel:maxKeys:ListObjectsResponse' :: Maybe Int
maxKeys = Maybe Int
a} :: ListObjectsResponse)
listObjectsResponse_isTruncated :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Bool)
listObjectsResponse_isTruncated :: (Maybe Bool -> f (Maybe Bool))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_isTruncated = (ListObjectsResponse -> Maybe Bool)
-> (ListObjectsResponse -> Maybe Bool -> ListObjectsResponse)
-> Lens' ListObjectsResponse (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListObjectsResponse' :: ListObjectsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Bool
a -> ListObjectsResponse
s {$sel:isTruncated:ListObjectsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListObjectsResponse)
listObjectsResponse_delimiter :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Delimiter)
listObjectsResponse_delimiter :: (Maybe Delimiter -> f (Maybe Delimiter))
-> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_delimiter = (ListObjectsResponse -> Maybe Delimiter)
-> (ListObjectsResponse -> Maybe Delimiter -> ListObjectsResponse)
-> Lens
ListObjectsResponse
ListObjectsResponse
(Maybe Delimiter)
(Maybe Delimiter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Maybe Delimiter
delimiter :: Maybe Delimiter
$sel:delimiter:ListObjectsResponse' :: ListObjectsResponse -> Maybe Delimiter
delimiter} -> Maybe Delimiter
delimiter) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Maybe Delimiter
a -> ListObjectsResponse
s {$sel:delimiter:ListObjectsResponse' :: Maybe Delimiter
delimiter = Maybe Delimiter
a} :: ListObjectsResponse)
listObjectsResponse_httpStatus :: Lens.Lens' ListObjectsResponse Prelude.Int
listObjectsResponse_httpStatus :: (Int -> f Int) -> ListObjectsResponse -> f ListObjectsResponse
listObjectsResponse_httpStatus = (ListObjectsResponse -> Int)
-> (ListObjectsResponse -> Int -> ListObjectsResponse)
-> Lens ListObjectsResponse ListObjectsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListObjectsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListObjectsResponse' :: ListObjectsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListObjectsResponse
s@ListObjectsResponse' {} Int
a -> ListObjectsResponse
s {$sel:httpStatus:ListObjectsResponse' :: Int
httpStatus = Int
a} :: ListObjectsResponse)
instance Prelude.NFData ListObjectsResponse