{-# 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.TagManager.Accounts.Containers.Create
(
AccountsContainersCreateResource
, accountsContainersCreate
, AccountsContainersCreate
, accParent
, accPayload
) where
import Network.Google.Prelude
import Network.Google.TagManager.Types
type AccountsContainersCreateResource =
"tagmanager" :>
"v2" :>
Capture "parent" Text :>
"containers" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Container :> Post '[JSON] Container
data AccountsContainersCreate = AccountsContainersCreate'
{ _accParent :: !Text
, _accPayload :: !Container
} deriving (Eq,Show,Data,Typeable,Generic)
accountsContainersCreate
:: Text
-> Container
-> AccountsContainersCreate
accountsContainersCreate pAccParent_ pAccPayload_ =
AccountsContainersCreate'
{ _accParent = pAccParent_
, _accPayload = pAccPayload_
}
accParent :: Lens' AccountsContainersCreate Text
accParent
= lens _accParent (\ s a -> s{_accParent = a})
accPayload :: Lens' AccountsContainersCreate Container
accPayload
= lens _accPayload (\ s a -> s{_accPayload = a})
instance GoogleRequest AccountsContainersCreate where
type Rs AccountsContainersCreate = Container
type Scopes AccountsContainersCreate =
'["https://www.googleapis.com/auth/tagmanager.edit.containers"]
requestClient AccountsContainersCreate'{..}
= go _accParent (Just AltJSON) _accPayload
tagManagerService
where go
= buildClient
(Proxy :: Proxy AccountsContainersCreateResource)
mempty