{-# 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.PubSub.Projects.Snapshots.Patch
(
ProjectsSnapshotsPatchResource
, projectsSnapshotsPatch
, ProjectsSnapshotsPatch
, ppXgafv
, ppUploadProtocol
, ppAccessToken
, ppUploadType
, ppPayload
, ppName
, ppCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSnapshotsPatchResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UpdateSnapshotRequest :>
Patch '[JSON] Snapshot
data ProjectsSnapshotsPatch = ProjectsSnapshotsPatch'
{ _ppXgafv :: !(Maybe Xgafv)
, _ppUploadProtocol :: !(Maybe Text)
, _ppAccessToken :: !(Maybe Text)
, _ppUploadType :: !(Maybe Text)
, _ppPayload :: !UpdateSnapshotRequest
, _ppName :: !Text
, _ppCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSnapshotsPatch
:: UpdateSnapshotRequest
-> Text
-> ProjectsSnapshotsPatch
projectsSnapshotsPatch pPpPayload_ pPpName_ =
ProjectsSnapshotsPatch'
{ _ppXgafv = Nothing
, _ppUploadProtocol = Nothing
, _ppAccessToken = Nothing
, _ppUploadType = Nothing
, _ppPayload = pPpPayload_
, _ppName = pPpName_
, _ppCallback = Nothing
}
ppXgafv :: Lens' ProjectsSnapshotsPatch (Maybe Xgafv)
ppXgafv = lens _ppXgafv (\ s a -> s{_ppXgafv = a})
ppUploadProtocol :: Lens' ProjectsSnapshotsPatch (Maybe Text)
ppUploadProtocol
= lens _ppUploadProtocol
(\ s a -> s{_ppUploadProtocol = a})
ppAccessToken :: Lens' ProjectsSnapshotsPatch (Maybe Text)
ppAccessToken
= lens _ppAccessToken
(\ s a -> s{_ppAccessToken = a})
ppUploadType :: Lens' ProjectsSnapshotsPatch (Maybe Text)
ppUploadType
= lens _ppUploadType (\ s a -> s{_ppUploadType = a})
ppPayload :: Lens' ProjectsSnapshotsPatch UpdateSnapshotRequest
ppPayload
= lens _ppPayload (\ s a -> s{_ppPayload = a})
ppName :: Lens' ProjectsSnapshotsPatch Text
ppName = lens _ppName (\ s a -> s{_ppName = a})
ppCallback :: Lens' ProjectsSnapshotsPatch (Maybe Text)
ppCallback
= lens _ppCallback (\ s a -> s{_ppCallback = a})
instance GoogleRequest ProjectsSnapshotsPatch where
type Rs ProjectsSnapshotsPatch = Snapshot
type Scopes ProjectsSnapshotsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSnapshotsPatch'{..}
= go _ppName _ppXgafv _ppUploadProtocol
_ppAccessToken
_ppUploadType
_ppCallback
(Just AltJSON)
_ppPayload
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsSnapshotsPatchResource)
mempty