{-# 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.Analytics.Provisioning.CreateAccountTree
(
ProvisioningCreateAccountTreeResource
, provisioningCreateAccountTree
, ProvisioningCreateAccountTree
, pcatPayload
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ProvisioningCreateAccountTreeResource =
"analytics" :>
"v3" :>
"provisioning" :>
"createAccountTree" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccountTreeRequest :>
Post '[JSON] AccountTreeResponse
newtype ProvisioningCreateAccountTree = ProvisioningCreateAccountTree'
{ _pcatPayload :: AccountTreeRequest
} deriving (Eq,Show,Data,Typeable,Generic)
provisioningCreateAccountTree
:: AccountTreeRequest
-> ProvisioningCreateAccountTree
provisioningCreateAccountTree pPcatPayload_ =
ProvisioningCreateAccountTree'
{ _pcatPayload = pPcatPayload_
}
pcatPayload :: Lens' ProvisioningCreateAccountTree AccountTreeRequest
pcatPayload
= lens _pcatPayload (\ s a -> s{_pcatPayload = a})
instance GoogleRequest ProvisioningCreateAccountTree
where
type Rs ProvisioningCreateAccountTree =
AccountTreeResponse
type Scopes ProvisioningCreateAccountTree =
'["https://www.googleapis.com/auth/analytics.provision"]
requestClient ProvisioningCreateAccountTree'{..}
= go (Just AltJSON) _pcatPayload analyticsService
where go
= buildClient
(Proxy ::
Proxy ProvisioningCreateAccountTreeResource)
mempty