{-# 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.Style.Delete
(
StyleDeleteResource
, styleDelete
, StyleDelete
, sdStyleId
, sdTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type StyleDeleteResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"styles" :>
Capture "styleId" (Textual Int32) :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
-- | Deletes a style.
--
-- /See:/ 'styleDelete' smart constructor.
data StyleDelete = StyleDelete'
{ _sdStyleId :: !(Textual Int32)
, _sdTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'StyleDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sdStyleId'
--
-- * 'sdTableId'
styleDelete
:: Int32 -- ^ 'sdStyleId'
-> Text -- ^ 'sdTableId'
-> StyleDelete
styleDelete pSdStyleId_ pSdTableId_ =
StyleDelete'
{ _sdStyleId = _Coerce # pSdStyleId_
, _sdTableId = pSdTableId_
}
-- | Identifier (within a table) for the style being deleted
sdStyleId :: Lens' StyleDelete Int32
sdStyleId
= lens _sdStyleId (\ s a -> s{_sdStyleId = a}) .
_Coerce
-- | Table from which the style is being deleted
sdTableId :: Lens' StyleDelete Text
sdTableId
= lens _sdTableId (\ s a -> s{_sdTableId = a})
instance GoogleRequest StyleDelete where
type Rs StyleDelete = ()
type Scopes StyleDelete =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient StyleDelete'{..}
= go _sdTableId _sdStyleId (Just AltJSON)
fusionTablesService
where go
= buildClient (Proxy :: Proxy StyleDeleteResource)
mempty