{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Storage.Objects.List
(
ObjectsListResource
, objectsList
, ObjectsList
, olPrefix
, olBucket
, olVersions
, olUserProject
, olIncludeTrailingDelimiter
, olProjection
, olPageToken
, olDelimiter
, olMaxResults
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type ObjectsListResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"o" :>
QueryParam "prefix" Text :>
QueryParam "versions" Bool :>
QueryParam "userProject" Text :>
QueryParam "includeTrailingDelimiter" Bool :>
QueryParam "projection" ObjectsListProjection :>
QueryParam "pageToken" Text :>
QueryParam "delimiter" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Objects
data ObjectsList = ObjectsList'
{ _olPrefix :: !(Maybe Text)
, _olBucket :: !Text
, _olVersions :: !(Maybe Bool)
, _olUserProject :: !(Maybe Text)
, _olIncludeTrailingDelimiter :: !(Maybe Bool)
, _olProjection :: !(Maybe ObjectsListProjection)
, _olPageToken :: !(Maybe Text)
, _olDelimiter :: !(Maybe Text)
, _olMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
objectsList
:: Text
-> ObjectsList
objectsList pOlBucket_ =
ObjectsList'
{ _olPrefix = Nothing
, _olBucket = pOlBucket_
, _olVersions = Nothing
, _olUserProject = Nothing
, _olIncludeTrailingDelimiter = Nothing
, _olProjection = Nothing
, _olPageToken = Nothing
, _olDelimiter = Nothing
, _olMaxResults = 1000
}
olPrefix :: Lens' ObjectsList (Maybe Text)
olPrefix = lens _olPrefix (\ s a -> s{_olPrefix = a})
olBucket :: Lens' ObjectsList Text
olBucket = lens _olBucket (\ s a -> s{_olBucket = a})
olVersions :: Lens' ObjectsList (Maybe Bool)
olVersions
= lens _olVersions (\ s a -> s{_olVersions = a})
olUserProject :: Lens' ObjectsList (Maybe Text)
olUserProject
= lens _olUserProject
(\ s a -> s{_olUserProject = a})
olIncludeTrailingDelimiter :: Lens' ObjectsList (Maybe Bool)
olIncludeTrailingDelimiter
= lens _olIncludeTrailingDelimiter
(\ s a -> s{_olIncludeTrailingDelimiter = a})
olProjection :: Lens' ObjectsList (Maybe ObjectsListProjection)
olProjection
= lens _olProjection (\ s a -> s{_olProjection = a})
olPageToken :: Lens' ObjectsList (Maybe Text)
olPageToken
= lens _olPageToken (\ s a -> s{_olPageToken = a})
olDelimiter :: Lens' ObjectsList (Maybe Text)
olDelimiter
= lens _olDelimiter (\ s a -> s{_olDelimiter = a})
olMaxResults :: Lens' ObjectsList Word32
olMaxResults
= lens _olMaxResults (\ s a -> s{_olMaxResults = a})
. _Coerce
instance GoogleRequest ObjectsList where
type Rs ObjectsList = Objects
type Scopes ObjectsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/devstorage.read_write"]
requestClient ObjectsList'{..}
= go _olBucket _olPrefix _olVersions _olUserProject
_olIncludeTrailingDelimiter
_olProjection
_olPageToken
_olDelimiter
(Just _olMaxResults)
(Just AltJSON)
storageService
where go
= buildClient (Proxy :: Proxy ObjectsListResource)
mempty