{-# 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.Books.MyLibrary.Annotations.Delete
(
MyLibraryAnnotationsDeleteResource
, myLibraryAnnotationsDelete
, MyLibraryAnnotationsDelete
, mladAnnotationId
, mladSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyLibraryAnnotationsDeleteResource =
"books" :>
"v1" :>
"mylibrary" :>
"annotations" :>
Capture "annotationId" Text :>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data MyLibraryAnnotationsDelete = MyLibraryAnnotationsDelete'
{ _mladAnnotationId :: !Text
, _mladSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
myLibraryAnnotationsDelete
:: Text
-> MyLibraryAnnotationsDelete
myLibraryAnnotationsDelete pMladAnnotationId_ =
MyLibraryAnnotationsDelete'
{ _mladAnnotationId = pMladAnnotationId_
, _mladSource = Nothing
}
mladAnnotationId :: Lens' MyLibraryAnnotationsDelete Text
mladAnnotationId
= lens _mladAnnotationId
(\ s a -> s{_mladAnnotationId = a})
mladSource :: Lens' MyLibraryAnnotationsDelete (Maybe Text)
mladSource
= lens _mladSource (\ s a -> s{_mladSource = a})
instance GoogleRequest MyLibraryAnnotationsDelete
where
type Rs MyLibraryAnnotationsDelete = ()
type Scopes MyLibraryAnnotationsDelete =
'["https://www.googleapis.com/auth/books"]
requestClient MyLibraryAnnotationsDelete'{..}
= go _mladAnnotationId _mladSource (Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy MyLibraryAnnotationsDeleteResource)
mempty