{-# 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.Personalizedstream.Get
(
PersonalizedstreamGetResource
, personalizedstreamGet
, PersonalizedstreamGet
, pgLocale
, pgMaxAllowedMaturityRating
, pgSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type PersonalizedstreamGetResource =
"books" :>
"v1" :>
"personalizedstream" :>
"get" :>
QueryParam "locale" Text :>
QueryParam "maxAllowedMaturityRating"
PersonalizedstreamGetMaxAllowedMaturityRating
:>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] Discoveryclusters
data PersonalizedstreamGet = PersonalizedstreamGet'
{ _pgLocale :: !(Maybe Text)
, _pgMaxAllowedMaturityRating :: !(Maybe PersonalizedstreamGetMaxAllowedMaturityRating)
, _pgSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
personalizedstreamGet
:: PersonalizedstreamGet
personalizedstreamGet =
PersonalizedstreamGet'
{ _pgLocale = Nothing
, _pgMaxAllowedMaturityRating = Nothing
, _pgSource = Nothing
}
pgLocale :: Lens' PersonalizedstreamGet (Maybe Text)
pgLocale = lens _pgLocale (\ s a -> s{_pgLocale = a})
pgMaxAllowedMaturityRating :: Lens' PersonalizedstreamGet (Maybe PersonalizedstreamGetMaxAllowedMaturityRating)
pgMaxAllowedMaturityRating
= lens _pgMaxAllowedMaturityRating
(\ s a -> s{_pgMaxAllowedMaturityRating = a})
pgSource :: Lens' PersonalizedstreamGet (Maybe Text)
pgSource = lens _pgSource (\ s a -> s{_pgSource = a})
instance GoogleRequest PersonalizedstreamGet where
type Rs PersonalizedstreamGet = Discoveryclusters
type Scopes PersonalizedstreamGet =
'["https://www.googleapis.com/auth/books"]
requestClient PersonalizedstreamGet'{..}
= go _pgLocale _pgMaxAllowedMaturityRating _pgSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy PersonalizedstreamGetResource)
mempty