{-# 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.FusionTables.Template.Patch
(
TemplatePatchResource
, templatePatch
, TemplatePatch
, tppTemplateId
, tppPayload
, tppTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type TemplatePatchResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"templates" :>
Capture "templateId" (Textual Int32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Template :> Patch '[JSON] Template
data TemplatePatch = TemplatePatch'
{ _tppTemplateId :: !(Textual Int32)
, _tppPayload :: !Template
, _tppTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
templatePatch
:: Int32
-> Template
-> Text
-> TemplatePatch
templatePatch pTppTemplateId_ pTppPayload_ pTppTableId_ =
TemplatePatch'
{ _tppTemplateId = _Coerce # pTppTemplateId_
, _tppPayload = pTppPayload_
, _tppTableId = pTppTableId_
}
tppTemplateId :: Lens' TemplatePatch Int32
tppTemplateId
= lens _tppTemplateId
(\ s a -> s{_tppTemplateId = a})
. _Coerce
tppPayload :: Lens' TemplatePatch Template
tppPayload
= lens _tppPayload (\ s a -> s{_tppPayload = a})
tppTableId :: Lens' TemplatePatch Text
tppTableId
= lens _tppTableId (\ s a -> s{_tppTableId = a})
instance GoogleRequest TemplatePatch where
type Rs TemplatePatch = Template
type Scopes TemplatePatch =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient TemplatePatch'{..}
= go _tppTableId _tppTemplateId (Just AltJSON)
_tppPayload
fusionTablesService
where go
= buildClient (Proxy :: Proxy TemplatePatchResource)
mempty