{-# 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.CloudBilling.Projects.GetBillingInfo
(
ProjectsGetBillingInfoResource
, projectsGetBillingInfo
, ProjectsGetBillingInfo
, pgbiXgafv
, pgbiUploadProtocol
, pgbiAccessToken
, pgbiUploadType
, pgbiName
, pgbiCallback
) where
import Network.Google.Billing.Types
import Network.Google.Prelude
type ProjectsGetBillingInfoResource =
"v1" :>
Capture "name" Text :>
"billingInfo" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ProjectBillingInfo
data ProjectsGetBillingInfo = ProjectsGetBillingInfo'
{ _pgbiXgafv :: !(Maybe Xgafv)
, _pgbiUploadProtocol :: !(Maybe Text)
, _pgbiAccessToken :: !(Maybe Text)
, _pgbiUploadType :: !(Maybe Text)
, _pgbiName :: !Text
, _pgbiCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGetBillingInfo
:: Text
-> ProjectsGetBillingInfo
projectsGetBillingInfo pPgbiName_ =
ProjectsGetBillingInfo'
{ _pgbiXgafv = Nothing
, _pgbiUploadProtocol = Nothing
, _pgbiAccessToken = Nothing
, _pgbiUploadType = Nothing
, _pgbiName = pPgbiName_
, _pgbiCallback = Nothing
}
pgbiXgafv :: Lens' ProjectsGetBillingInfo (Maybe Xgafv)
pgbiXgafv
= lens _pgbiXgafv (\ s a -> s{_pgbiXgafv = a})
pgbiUploadProtocol :: Lens' ProjectsGetBillingInfo (Maybe Text)
pgbiUploadProtocol
= lens _pgbiUploadProtocol
(\ s a -> s{_pgbiUploadProtocol = a})
pgbiAccessToken :: Lens' ProjectsGetBillingInfo (Maybe Text)
pgbiAccessToken
= lens _pgbiAccessToken
(\ s a -> s{_pgbiAccessToken = a})
pgbiUploadType :: Lens' ProjectsGetBillingInfo (Maybe Text)
pgbiUploadType
= lens _pgbiUploadType
(\ s a -> s{_pgbiUploadType = a})
pgbiName :: Lens' ProjectsGetBillingInfo Text
pgbiName = lens _pgbiName (\ s a -> s{_pgbiName = a})
pgbiCallback :: Lens' ProjectsGetBillingInfo (Maybe Text)
pgbiCallback
= lens _pgbiCallback (\ s a -> s{_pgbiCallback = a})
instance GoogleRequest ProjectsGetBillingInfo where
type Rs ProjectsGetBillingInfo = ProjectBillingInfo
type Scopes ProjectsGetBillingInfo =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsGetBillingInfo'{..}
= go _pgbiName _pgbiXgafv _pgbiUploadProtocol
_pgbiAccessToken
_pgbiUploadType
_pgbiCallback
(Just AltJSON)
billingService
where go
= buildClient
(Proxy :: Proxy ProjectsGetBillingInfoResource)
mempty