{-# 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.Series.Membership.Get
(
SeriesMembershipGetResource
, seriesMembershipGet
, SeriesMembershipGet
, smgPageToken
, smgPageSize
, smgSeriesId
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type SeriesMembershipGetResource =
"books" :>
"v1" :>
"series" :>
"membership" :>
"get" :>
QueryParam "series_id" Text :>
QueryParam "page_token" Text :>
QueryParam "page_size" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] Seriesmembership
data SeriesMembershipGet = SeriesMembershipGet'
{ _smgPageToken :: !(Maybe Text)
, _smgPageSize :: !(Maybe (Textual Word32))
, _smgSeriesId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
seriesMembershipGet
:: Text
-> SeriesMembershipGet
seriesMembershipGet pSmgSeriesId_ =
SeriesMembershipGet'
{ _smgPageToken = Nothing
, _smgPageSize = Nothing
, _smgSeriesId = pSmgSeriesId_
}
smgPageToken :: Lens' SeriesMembershipGet (Maybe Text)
smgPageToken
= lens _smgPageToken (\ s a -> s{_smgPageToken = a})
smgPageSize :: Lens' SeriesMembershipGet (Maybe Word32)
smgPageSize
= lens _smgPageSize (\ s a -> s{_smgPageSize = a}) .
mapping _Coerce
smgSeriesId :: Lens' SeriesMembershipGet Text
smgSeriesId
= lens _smgSeriesId (\ s a -> s{_smgSeriesId = a})
instance GoogleRequest SeriesMembershipGet where
type Rs SeriesMembershipGet = Seriesmembership
type Scopes SeriesMembershipGet =
'["https://www.googleapis.com/auth/books"]
requestClient SeriesMembershipGet'{..}
= go (Just _smgSeriesId) _smgPageToken _smgPageSize
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy SeriesMembershipGetResource)
mempty