{-# 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.Approve
(
ProductsApproveResource
, productsApprove
, ProductsApprove
, paEnterpriseId
, paPayload
, paProductId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type ProductsApproveResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"products" :>
Capture "productId" Text :>
"approve" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ProductsApproveRequest :>
Post '[JSON] ()
data ProductsApprove = ProductsApprove'
{ _paEnterpriseId :: !Text
, _paPayload :: !ProductsApproveRequest
, _paProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
productsApprove
:: Text
-> ProductsApproveRequest
-> Text
-> ProductsApprove
productsApprove pPaEnterpriseId_ pPaPayload_ pPaProductId_ =
ProductsApprove'
{ _paEnterpriseId = pPaEnterpriseId_
, _paPayload = pPaPayload_
, _paProductId = pPaProductId_
}
paEnterpriseId :: Lens' ProductsApprove Text
paEnterpriseId
= lens _paEnterpriseId
(\ s a -> s{_paEnterpriseId = a})
paPayload :: Lens' ProductsApprove ProductsApproveRequest
paPayload
= lens _paPayload (\ s a -> s{_paPayload = a})
paProductId :: Lens' ProductsApprove Text
paProductId
= lens _paProductId (\ s a -> s{_paProductId = a})
instance GoogleRequest ProductsApprove where
type Rs ProductsApprove = ()
type Scopes ProductsApprove =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient ProductsApprove'{..}
= go _paEnterpriseId _paProductId (Just AltJSON)
_paPayload
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy ProductsApproveResource)
mempty