{-# 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.CloudLoading.AddBook
(
CloudLoadingAddBookResource
, cloudLoadingAddBook
, CloudLoadingAddBook
, clabMimeType
, clabUploadClientToken
, clabName
, clabDriveDocumentId
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type CloudLoadingAddBookResource =
"books" :>
"v1" :>
"cloudloading" :>
"addBook" :>
QueryParam "mime_type" Text :>
QueryParam "upload_client_token" Text :>
QueryParam "name" Text :>
QueryParam "drive_document_id" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] BooksCloudLoadingResource
data CloudLoadingAddBook = CloudLoadingAddBook'
{ _clabMimeType :: !(Maybe Text)
, _clabUploadClientToken :: !(Maybe Text)
, _clabName :: !(Maybe Text)
, _clabDriveDocumentId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
cloudLoadingAddBook
:: CloudLoadingAddBook
cloudLoadingAddBook =
CloudLoadingAddBook'
{ _clabMimeType = Nothing
, _clabUploadClientToken = Nothing
, _clabName = Nothing
, _clabDriveDocumentId = Nothing
}
clabMimeType :: Lens' CloudLoadingAddBook (Maybe Text)
clabMimeType
= lens _clabMimeType (\ s a -> s{_clabMimeType = a})
clabUploadClientToken :: Lens' CloudLoadingAddBook (Maybe Text)
clabUploadClientToken
= lens _clabUploadClientToken
(\ s a -> s{_clabUploadClientToken = a})
clabName :: Lens' CloudLoadingAddBook (Maybe Text)
clabName = lens _clabName (\ s a -> s{_clabName = a})
clabDriveDocumentId :: Lens' CloudLoadingAddBook (Maybe Text)
clabDriveDocumentId
= lens _clabDriveDocumentId
(\ s a -> s{_clabDriveDocumentId = a})
instance GoogleRequest CloudLoadingAddBook where
type Rs CloudLoadingAddBook =
BooksCloudLoadingResource
type Scopes CloudLoadingAddBook =
'["https://www.googleapis.com/auth/books"]
requestClient CloudLoadingAddBook'{..}
= go _clabMimeType _clabUploadClientToken _clabName
_clabDriveDocumentId
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy CloudLoadingAddBookResource)
mempty