{-# 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.Insert
(
TemplateInsertResource
, templateInsert
, TemplateInsert
, temPayload
, temTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type TemplateInsertResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"templates" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Template :> Post '[JSON] Template
data TemplateInsert = TemplateInsert'
{ _temPayload :: !Template
, _temTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
templateInsert
:: Template
-> Text
-> TemplateInsert
templateInsert pTemPayload_ pTemTableId_ =
TemplateInsert'
{ _temPayload = pTemPayload_
, _temTableId = pTemTableId_
}
temPayload :: Lens' TemplateInsert Template
temPayload
= lens _temPayload (\ s a -> s{_temPayload = a})
temTableId :: Lens' TemplateInsert Text
temTableId
= lens _temTableId (\ s a -> s{_temTableId = a})
instance GoogleRequest TemplateInsert where
type Rs TemplateInsert = Template
type Scopes TemplateInsert =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient TemplateInsert'{..}
= go _temTableId (Just AltJSON) _temPayload
fusionTablesService
where go
= buildClient (Proxy :: Proxy TemplateInsertResource)
mempty