{-# 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.FireStore.Projects.Databases.Documents.Get
(
ProjectsDatabasesDocumentsGetResource
, projectsDatabasesDocumentsGet
, ProjectsDatabasesDocumentsGet
, pddgXgafv
, pddgReadTime
, pddgUploadProtocol
, pddgAccessToken
, pddgUploadType
, pddgTransaction
, pddgName
, pddgMaskFieldPaths
, pddgCallback
) where
import Network.Google.FireStore.Types
import Network.Google.Prelude
type ProjectsDatabasesDocumentsGetResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "readTime" DateTime' :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "transaction" Bytes :>
QueryParams "mask.fieldPaths" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Document
data ProjectsDatabasesDocumentsGet = ProjectsDatabasesDocumentsGet'
{ _pddgXgafv :: !(Maybe Xgafv)
, _pddgReadTime :: !(Maybe DateTime')
, _pddgUploadProtocol :: !(Maybe Text)
, _pddgAccessToken :: !(Maybe Text)
, _pddgUploadType :: !(Maybe Text)
, _pddgTransaction :: !(Maybe Bytes)
, _pddgName :: !Text
, _pddgMaskFieldPaths :: !(Maybe [Text])
, _pddgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDatabasesDocumentsGet
:: Text
-> ProjectsDatabasesDocumentsGet
projectsDatabasesDocumentsGet pPddgName_ =
ProjectsDatabasesDocumentsGet'
{ _pddgXgafv = Nothing
, _pddgReadTime = Nothing
, _pddgUploadProtocol = Nothing
, _pddgAccessToken = Nothing
, _pddgUploadType = Nothing
, _pddgTransaction = Nothing
, _pddgName = pPddgName_
, _pddgMaskFieldPaths = Nothing
, _pddgCallback = Nothing
}
pddgXgafv :: Lens' ProjectsDatabasesDocumentsGet (Maybe Xgafv)
pddgXgafv
= lens _pddgXgafv (\ s a -> s{_pddgXgafv = a})
pddgReadTime :: Lens' ProjectsDatabasesDocumentsGet (Maybe UTCTime)
pddgReadTime
= lens _pddgReadTime (\ s a -> s{_pddgReadTime = a})
. mapping _DateTime
pddgUploadProtocol :: Lens' ProjectsDatabasesDocumentsGet (Maybe Text)
pddgUploadProtocol
= lens _pddgUploadProtocol
(\ s a -> s{_pddgUploadProtocol = a})
pddgAccessToken :: Lens' ProjectsDatabasesDocumentsGet (Maybe Text)
pddgAccessToken
= lens _pddgAccessToken
(\ s a -> s{_pddgAccessToken = a})
pddgUploadType :: Lens' ProjectsDatabasesDocumentsGet (Maybe Text)
pddgUploadType
= lens _pddgUploadType
(\ s a -> s{_pddgUploadType = a})
pddgTransaction :: Lens' ProjectsDatabasesDocumentsGet (Maybe ByteString)
pddgTransaction
= lens _pddgTransaction
(\ s a -> s{_pddgTransaction = a})
. mapping _Bytes
pddgName :: Lens' ProjectsDatabasesDocumentsGet Text
pddgName = lens _pddgName (\ s a -> s{_pddgName = a})
pddgMaskFieldPaths :: Lens' ProjectsDatabasesDocumentsGet [Text]
pddgMaskFieldPaths
= lens _pddgMaskFieldPaths
(\ s a -> s{_pddgMaskFieldPaths = a})
. _Default
. _Coerce
pddgCallback :: Lens' ProjectsDatabasesDocumentsGet (Maybe Text)
pddgCallback
= lens _pddgCallback (\ s a -> s{_pddgCallback = a})
instance GoogleRequest ProjectsDatabasesDocumentsGet
where
type Rs ProjectsDatabasesDocumentsGet = Document
type Scopes ProjectsDatabasesDocumentsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsDatabasesDocumentsGet'{..}
= go _pddgName _pddgXgafv _pddgReadTime
_pddgUploadProtocol
_pddgAccessToken
_pddgUploadType
_pddgTransaction
(_pddgMaskFieldPaths ^. _Default)
_pddgCallback
(Just AltJSON)
fireStoreService
where go
= buildClient
(Proxy ::
Proxy ProjectsDatabasesDocumentsGetResource)
mempty