{-# 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.Workspaces.Triggers.Create
(
AccountsContainersWorkspacesTriggersCreateResource
, accountsContainersWorkspacesTriggersCreate
, AccountsContainersWorkspacesTriggersCreate
, acwtcParent
, acwtcPayload
) where
import Network.Google.Prelude
import Network.Google.TagManager.Types
type AccountsContainersWorkspacesTriggersCreateResource
=
"tagmanager" :>
"v2" :>
Capture "parent" Text :>
"triggers" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Trigger :> Post '[JSON] Trigger
data AccountsContainersWorkspacesTriggersCreate = AccountsContainersWorkspacesTriggersCreate'
{ _acwtcParent :: !Text
, _acwtcPayload :: !Trigger
} deriving (Eq,Show,Data,Typeable,Generic)
accountsContainersWorkspacesTriggersCreate
:: Text
-> Trigger
-> AccountsContainersWorkspacesTriggersCreate
accountsContainersWorkspacesTriggersCreate pAcwtcParent_ pAcwtcPayload_ =
AccountsContainersWorkspacesTriggersCreate'
{ _acwtcParent = pAcwtcParent_
, _acwtcPayload = pAcwtcPayload_
}
acwtcParent :: Lens' AccountsContainersWorkspacesTriggersCreate Text
acwtcParent
= lens _acwtcParent (\ s a -> s{_acwtcParent = a})
acwtcPayload :: Lens' AccountsContainersWorkspacesTriggersCreate Trigger
acwtcPayload
= lens _acwtcPayload (\ s a -> s{_acwtcPayload = a})
instance GoogleRequest
AccountsContainersWorkspacesTriggersCreate where
type Rs AccountsContainersWorkspacesTriggersCreate =
Trigger
type Scopes
AccountsContainersWorkspacesTriggersCreate
=
'["https://www.googleapis.com/auth/tagmanager.edit.containers"]
requestClient
AccountsContainersWorkspacesTriggersCreate'{..}
= go _acwtcParent (Just AltJSON) _acwtcPayload
tagManagerService
where go
= buildClient
(Proxy ::
Proxy
AccountsContainersWorkspacesTriggersCreateResource)
mempty