{-# 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.UpdateBook
(
CloudLoadingUpdateBookResource
, cloudLoadingUpdateBook
, CloudLoadingUpdateBook
, clubPayload
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type CloudLoadingUpdateBookResource =
"books" :>
"v1" :>
"cloudloading" :>
"updateBook" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BooksCloudLoadingResource :>
Post '[JSON] BooksCloudLoadingResource
newtype CloudLoadingUpdateBook = CloudLoadingUpdateBook'
{ _clubPayload :: BooksCloudLoadingResource
} deriving (Eq,Show,Data,Typeable,Generic)
cloudLoadingUpdateBook
:: BooksCloudLoadingResource
-> CloudLoadingUpdateBook
cloudLoadingUpdateBook pClubPayload_ =
CloudLoadingUpdateBook'
{ _clubPayload = pClubPayload_
}
clubPayload :: Lens' CloudLoadingUpdateBook BooksCloudLoadingResource
clubPayload
= lens _clubPayload (\ s a -> s{_clubPayload = a})
instance GoogleRequest CloudLoadingUpdateBook where
type Rs CloudLoadingUpdateBook =
BooksCloudLoadingResource
type Scopes CloudLoadingUpdateBook =
'["https://www.googleapis.com/auth/books"]
requestClient CloudLoadingUpdateBook'{..}
= go (Just AltJSON) _clubPayload booksService
where go
= buildClient
(Proxy :: Proxy CloudLoadingUpdateBookResource)
mempty