{-# 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.Onboarding.ListCategoryVolumes
(
OnboardingListCategoryVolumesResource
, onboardingListCategoryVolumes
, OnboardingListCategoryVolumes
, olcvLocale
, olcvMaxAllowedMaturityRating
, olcvCategoryId
, olcvPageToken
, olcvPageSize
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type OnboardingListCategoryVolumesResource =
"books" :>
"v1" :>
"onboarding" :>
"listCategoryVolumes" :>
QueryParam "locale" Text :>
QueryParam "maxAllowedMaturityRating"
OnboardingListCategoryVolumesMaxAllowedMaturityRating
:>
QueryParams "categoryId" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Volume2
data OnboardingListCategoryVolumes = OnboardingListCategoryVolumes'
{ _olcvLocale :: !(Maybe Text)
, _olcvMaxAllowedMaturityRating :: !(Maybe OnboardingListCategoryVolumesMaxAllowedMaturityRating)
, _olcvCategoryId :: !(Maybe [Text])
, _olcvPageToken :: !(Maybe Text)
, _olcvPageSize :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
onboardingListCategoryVolumes
:: OnboardingListCategoryVolumes
onboardingListCategoryVolumes =
OnboardingListCategoryVolumes'
{ _olcvLocale = Nothing
, _olcvMaxAllowedMaturityRating = Nothing
, _olcvCategoryId = Nothing
, _olcvPageToken = Nothing
, _olcvPageSize = Nothing
}
olcvLocale :: Lens' OnboardingListCategoryVolumes (Maybe Text)
olcvLocale
= lens _olcvLocale (\ s a -> s{_olcvLocale = a})
olcvMaxAllowedMaturityRating :: Lens' OnboardingListCategoryVolumes (Maybe OnboardingListCategoryVolumesMaxAllowedMaturityRating)
olcvMaxAllowedMaturityRating
= lens _olcvMaxAllowedMaturityRating
(\ s a -> s{_olcvMaxAllowedMaturityRating = a})
olcvCategoryId :: Lens' OnboardingListCategoryVolumes [Text]
olcvCategoryId
= lens _olcvCategoryId
(\ s a -> s{_olcvCategoryId = a})
. _Default
. _Coerce
olcvPageToken :: Lens' OnboardingListCategoryVolumes (Maybe Text)
olcvPageToken
= lens _olcvPageToken
(\ s a -> s{_olcvPageToken = a})
olcvPageSize :: Lens' OnboardingListCategoryVolumes (Maybe Word32)
olcvPageSize
= lens _olcvPageSize (\ s a -> s{_olcvPageSize = a})
. mapping _Coerce
instance GoogleRequest OnboardingListCategoryVolumes
where
type Rs OnboardingListCategoryVolumes = Volume2
type Scopes OnboardingListCategoryVolumes =
'["https://www.googleapis.com/auth/books"]
requestClient OnboardingListCategoryVolumes'{..}
= go _olcvLocale _olcvMaxAllowedMaturityRating
(_olcvCategoryId ^. _Default)
_olcvPageToken
_olcvPageSize
(Just AltJSON)
booksService
where go
= buildClient
(Proxy ::
Proxy OnboardingListCategoryVolumesResource)
mempty