{-# 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.Get
(
SubscriptionsGetResource
, subscriptionsGet
, SubscriptionsGet
, sgCustomerId
, sgSubscriptionId
) where
import Network.Google.AppsReseller.Types
import Network.Google.Prelude
type SubscriptionsGetResource =
"apps" :>
"reseller" :>
"v1" :>
"customers" :>
Capture "customerId" Text :>
"subscriptions" :>
Capture "subscriptionId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Subscription
data SubscriptionsGet = SubscriptionsGet'
{ _sgCustomerId :: !Text
, _sgSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionsGet
:: Text
-> Text
-> SubscriptionsGet
subscriptionsGet pSgCustomerId_ pSgSubscriptionId_ =
SubscriptionsGet'
{ _sgCustomerId = pSgCustomerId_
, _sgSubscriptionId = pSgSubscriptionId_
}
sgCustomerId :: Lens' SubscriptionsGet Text
sgCustomerId
= lens _sgCustomerId (\ s a -> s{_sgCustomerId = a})
sgSubscriptionId :: Lens' SubscriptionsGet Text
sgSubscriptionId
= lens _sgSubscriptionId
(\ s a -> s{_sgSubscriptionId = a})
instance GoogleRequest SubscriptionsGet where
type Rs SubscriptionsGet = Subscription
type Scopes SubscriptionsGet =
'["https://www.googleapis.com/auth/apps.order",
"https://www.googleapis.com/auth/apps.order.readonly"]
requestClient SubscriptionsGet'{..}
= go _sgCustomerId _sgSubscriptionId (Just AltJSON)
appsResellerService
where go
= buildClient
(Proxy :: Proxy SubscriptionsGetResource)
mempty