{-# 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.WatchAll
(
ObjectsWatchAllResource
, objectsWatchAll
, ObjectsWatchAll
, owaPrefix
, owaBucket
, owaPayload
, owaVersions
, owaUserProject
, owaIncludeTrailingDelimiter
, owaProjection
, owaPageToken
, owaDelimiter
, owaMaxResults
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type ObjectsWatchAllResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"o" :>
"watch" :>
QueryParam "prefix" Text :>
QueryParam "versions" Bool :>
QueryParam "userProject" Text :>
QueryParam "includeTrailingDelimiter" Bool :>
QueryParam "projection" ObjectsWatchAllProjection :>
QueryParam "pageToken" Text :>
QueryParam "delimiter" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Channel :>
Post '[JSON] Channel
data ObjectsWatchAll = ObjectsWatchAll'
{ _owaPrefix :: !(Maybe Text)
, _owaBucket :: !Text
, _owaPayload :: !Channel
, _owaVersions :: !(Maybe Bool)
, _owaUserProject :: !(Maybe Text)
, _owaIncludeTrailingDelimiter :: !(Maybe Bool)
, _owaProjection :: !(Maybe ObjectsWatchAllProjection)
, _owaPageToken :: !(Maybe Text)
, _owaDelimiter :: !(Maybe Text)
, _owaMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
objectsWatchAll
:: Text
-> Channel
-> ObjectsWatchAll
objectsWatchAll pOwaBucket_ pOwaPayload_ =
ObjectsWatchAll'
{ _owaPrefix = Nothing
, _owaBucket = pOwaBucket_
, _owaPayload = pOwaPayload_
, _owaVersions = Nothing
, _owaUserProject = Nothing
, _owaIncludeTrailingDelimiter = Nothing
, _owaProjection = Nothing
, _owaPageToken = Nothing
, _owaDelimiter = Nothing
, _owaMaxResults = 1000
}
owaPrefix :: Lens' ObjectsWatchAll (Maybe Text)
owaPrefix
= lens _owaPrefix (\ s a -> s{_owaPrefix = a})
owaBucket :: Lens' ObjectsWatchAll Text
owaBucket
= lens _owaBucket (\ s a -> s{_owaBucket = a})
owaPayload :: Lens' ObjectsWatchAll Channel
owaPayload
= lens _owaPayload (\ s a -> s{_owaPayload = a})
owaVersions :: Lens' ObjectsWatchAll (Maybe Bool)
owaVersions
= lens _owaVersions (\ s a -> s{_owaVersions = a})
owaUserProject :: Lens' ObjectsWatchAll (Maybe Text)
owaUserProject
= lens _owaUserProject
(\ s a -> s{_owaUserProject = a})
owaIncludeTrailingDelimiter :: Lens' ObjectsWatchAll (Maybe Bool)
owaIncludeTrailingDelimiter
= lens _owaIncludeTrailingDelimiter
(\ s a -> s{_owaIncludeTrailingDelimiter = a})
owaProjection :: Lens' ObjectsWatchAll (Maybe ObjectsWatchAllProjection)
owaProjection
= lens _owaProjection
(\ s a -> s{_owaProjection = a})
owaPageToken :: Lens' ObjectsWatchAll (Maybe Text)
owaPageToken
= lens _owaPageToken (\ s a -> s{_owaPageToken = a})
owaDelimiter :: Lens' ObjectsWatchAll (Maybe Text)
owaDelimiter
= lens _owaDelimiter (\ s a -> s{_owaDelimiter = a})
owaMaxResults :: Lens' ObjectsWatchAll Word32
owaMaxResults
= lens _owaMaxResults
(\ s a -> s{_owaMaxResults = a})
. _Coerce
instance GoogleRequest ObjectsWatchAll where
type Rs ObjectsWatchAll = Channel
type Scopes ObjectsWatchAll =
'["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 ObjectsWatchAll'{..}
= go _owaBucket _owaPrefix _owaVersions
_owaUserProject
_owaIncludeTrailingDelimiter
_owaProjection
_owaPageToken
_owaDelimiter
(Just _owaMaxResults)
(Just AltJSON)
_owaPayload
storageService
where go
= buildClient
(Proxy :: Proxy ObjectsWatchAllResource)
mempty