{-# 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.Buckets.Get
(
BucketsGetResource
, bucketsGet
, BucketsGet
, bgIfMetagenerationMatch
, bgBucket
, bgUserProject
, bgIfMetagenerationNotMatch
, bgProjection
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type BucketsGetResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
QueryParam "ifMetagenerationMatch" (Textual Int64) :>
QueryParam "userProject" Text :>
QueryParam "ifMetagenerationNotMatch" (Textual Int64)
:>
QueryParam "projection" BucketsGetProjection :>
QueryParam "alt" AltJSON :> Get '[JSON] Bucket
data BucketsGet = BucketsGet'
{ _bgIfMetagenerationMatch :: !(Maybe (Textual Int64))
, _bgBucket :: !Text
, _bgUserProject :: !(Maybe Text)
, _bgIfMetagenerationNotMatch :: !(Maybe (Textual Int64))
, _bgProjection :: !(Maybe BucketsGetProjection)
} deriving (Eq,Show,Data,Typeable,Generic)
bucketsGet
:: Text
-> BucketsGet
bucketsGet pBgBucket_ =
BucketsGet'
{ _bgIfMetagenerationMatch = Nothing
, _bgBucket = pBgBucket_
, _bgUserProject = Nothing
, _bgIfMetagenerationNotMatch = Nothing
, _bgProjection = Nothing
}
bgIfMetagenerationMatch :: Lens' BucketsGet (Maybe Int64)
bgIfMetagenerationMatch
= lens _bgIfMetagenerationMatch
(\ s a -> s{_bgIfMetagenerationMatch = a})
. mapping _Coerce
bgBucket :: Lens' BucketsGet Text
bgBucket = lens _bgBucket (\ s a -> s{_bgBucket = a})
bgUserProject :: Lens' BucketsGet (Maybe Text)
bgUserProject
= lens _bgUserProject
(\ s a -> s{_bgUserProject = a})
bgIfMetagenerationNotMatch :: Lens' BucketsGet (Maybe Int64)
bgIfMetagenerationNotMatch
= lens _bgIfMetagenerationNotMatch
(\ s a -> s{_bgIfMetagenerationNotMatch = a})
. mapping _Coerce
bgProjection :: Lens' BucketsGet (Maybe BucketsGetProjection)
bgProjection
= lens _bgProjection (\ s a -> s{_bgProjection = a})
instance GoogleRequest BucketsGet where
type Rs BucketsGet = Bucket
type Scopes BucketsGet =
'["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 BucketsGet'{..}
= go _bgBucket _bgIfMetagenerationMatch
_bgUserProject
_bgIfMetagenerationNotMatch
_bgProjection
(Just AltJSON)
storageService
where go
= buildClient (Proxy :: Proxy BucketsGetResource)
mempty