{-# 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.AndroidEnterprise.Products.GenerateApprovalURL
(
ProductsGenerateApprovalURLResource
, productsGenerateApprovalURL
, ProductsGenerateApprovalURL
, pgauLanguageCode
, pgauEnterpriseId
, pgauProductId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type ProductsGenerateApprovalURLResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"products" :>
Capture "productId" Text :>
"generateApprovalUrl" :>
QueryParam "languageCode" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] ProductsGenerateApprovalURLResponse
data ProductsGenerateApprovalURL = ProductsGenerateApprovalURL'
{ _pgauLanguageCode :: !(Maybe Text)
, _pgauEnterpriseId :: !Text
, _pgauProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
productsGenerateApprovalURL
:: Text
-> Text
-> ProductsGenerateApprovalURL
productsGenerateApprovalURL pPgauEnterpriseId_ pPgauProductId_ =
ProductsGenerateApprovalURL'
{ _pgauLanguageCode = Nothing
, _pgauEnterpriseId = pPgauEnterpriseId_
, _pgauProductId = pPgauProductId_
}
pgauLanguageCode :: Lens' ProductsGenerateApprovalURL (Maybe Text)
pgauLanguageCode
= lens _pgauLanguageCode
(\ s a -> s{_pgauLanguageCode = a})
pgauEnterpriseId :: Lens' ProductsGenerateApprovalURL Text
pgauEnterpriseId
= lens _pgauEnterpriseId
(\ s a -> s{_pgauEnterpriseId = a})
pgauProductId :: Lens' ProductsGenerateApprovalURL Text
pgauProductId
= lens _pgauProductId
(\ s a -> s{_pgauProductId = a})
instance GoogleRequest ProductsGenerateApprovalURL
where
type Rs ProductsGenerateApprovalURL =
ProductsGenerateApprovalURLResponse
type Scopes ProductsGenerateApprovalURL =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient ProductsGenerateApprovalURL'{..}
= go _pgauEnterpriseId _pgauProductId
_pgauLanguageCode
(Just AltJSON)
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy ProductsGenerateApprovalURLResource)
mempty