{-# 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.Reseller.Subscriptions.List
(
SubscriptionsListResource
, subscriptionsList
, SubscriptionsList
, slCustomerNamePrefix
, slCustomerId
, slCustomerAuthToken
, slPageToken
, slMaxResults
) where
import Network.Google.AppsReseller.Types
import Network.Google.Prelude
type SubscriptionsListResource =
"apps" :>
"reseller" :>
"v1" :>
"subscriptions" :>
QueryParam "customerNamePrefix" Text :>
QueryParam "customerId" Text :>
QueryParam "customerAuthToken" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Subscriptions
data SubscriptionsList = SubscriptionsList'
{ _slCustomerNamePrefix :: !(Maybe Text)
, _slCustomerId :: !(Maybe Text)
, _slCustomerAuthToken :: !(Maybe Text)
, _slPageToken :: !(Maybe Text)
, _slMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionsList
:: SubscriptionsList
subscriptionsList =
SubscriptionsList'
{ _slCustomerNamePrefix = Nothing
, _slCustomerId = Nothing
, _slCustomerAuthToken = Nothing
, _slPageToken = Nothing
, _slMaxResults = Nothing
}
slCustomerNamePrefix :: Lens' SubscriptionsList (Maybe Text)
slCustomerNamePrefix
= lens _slCustomerNamePrefix
(\ s a -> s{_slCustomerNamePrefix = a})
slCustomerId :: Lens' SubscriptionsList (Maybe Text)
slCustomerId
= lens _slCustomerId (\ s a -> s{_slCustomerId = a})
slCustomerAuthToken :: Lens' SubscriptionsList (Maybe Text)
slCustomerAuthToken
= lens _slCustomerAuthToken
(\ s a -> s{_slCustomerAuthToken = a})
slPageToken :: Lens' SubscriptionsList (Maybe Text)
slPageToken
= lens _slPageToken (\ s a -> s{_slPageToken = a})
slMaxResults :: Lens' SubscriptionsList (Maybe Word32)
slMaxResults
= lens _slMaxResults (\ s a -> s{_slMaxResults = a})
. mapping _Coerce
instance GoogleRequest SubscriptionsList where
type Rs SubscriptionsList = Subscriptions
type Scopes SubscriptionsList =
'["https://www.googleapis.com/auth/apps.order",
"https://www.googleapis.com/auth/apps.order.readonly"]
requestClient SubscriptionsList'{..}
= go _slCustomerNamePrefix _slCustomerId
_slCustomerAuthToken
_slPageToken
_slMaxResults
(Just AltJSON)
appsResellerService
where go
= buildClient
(Proxy :: Proxy SubscriptionsListResource)
mempty