{-# 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.DialogFlow.Projects.Agent.EntityTypes.Patch
(
ProjectsAgentEntityTypesPatchResource
, projectsAgentEntityTypesPatch
, ProjectsAgentEntityTypesPatch
, paetpXgafv
, paetpLanguageCode
, paetpUploadProtocol
, paetpUpdateMask
, paetpAccessToken
, paetpUploadType
, paetpPayload
, paetpName
, paetpCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentEntityTypesPatchResource =
"v2" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "languageCode" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudDialogflowV2EntityType :>
Patch '[JSON] GoogleCloudDialogflowV2EntityType
data ProjectsAgentEntityTypesPatch = ProjectsAgentEntityTypesPatch'
{ _paetpXgafv :: !(Maybe Xgafv)
, _paetpLanguageCode :: !(Maybe Text)
, _paetpUploadProtocol :: !(Maybe Text)
, _paetpUpdateMask :: !(Maybe GFieldMask)
, _paetpAccessToken :: !(Maybe Text)
, _paetpUploadType :: !(Maybe Text)
, _paetpPayload :: !GoogleCloudDialogflowV2EntityType
, _paetpName :: !Text
, _paetpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentEntityTypesPatch
:: GoogleCloudDialogflowV2EntityType
-> Text
-> ProjectsAgentEntityTypesPatch
projectsAgentEntityTypesPatch pPaetpPayload_ pPaetpName_ =
ProjectsAgentEntityTypesPatch'
{ _paetpXgafv = Nothing
, _paetpLanguageCode = Nothing
, _paetpUploadProtocol = Nothing
, _paetpUpdateMask = Nothing
, _paetpAccessToken = Nothing
, _paetpUploadType = Nothing
, _paetpPayload = pPaetpPayload_
, _paetpName = pPaetpName_
, _paetpCallback = Nothing
}
paetpXgafv :: Lens' ProjectsAgentEntityTypesPatch (Maybe Xgafv)
paetpXgafv
= lens _paetpXgafv (\ s a -> s{_paetpXgafv = a})
paetpLanguageCode :: Lens' ProjectsAgentEntityTypesPatch (Maybe Text)
paetpLanguageCode
= lens _paetpLanguageCode
(\ s a -> s{_paetpLanguageCode = a})
paetpUploadProtocol :: Lens' ProjectsAgentEntityTypesPatch (Maybe Text)
paetpUploadProtocol
= lens _paetpUploadProtocol
(\ s a -> s{_paetpUploadProtocol = a})
paetpUpdateMask :: Lens' ProjectsAgentEntityTypesPatch (Maybe GFieldMask)
paetpUpdateMask
= lens _paetpUpdateMask
(\ s a -> s{_paetpUpdateMask = a})
paetpAccessToken :: Lens' ProjectsAgentEntityTypesPatch (Maybe Text)
paetpAccessToken
= lens _paetpAccessToken
(\ s a -> s{_paetpAccessToken = a})
paetpUploadType :: Lens' ProjectsAgentEntityTypesPatch (Maybe Text)
paetpUploadType
= lens _paetpUploadType
(\ s a -> s{_paetpUploadType = a})
paetpPayload :: Lens' ProjectsAgentEntityTypesPatch GoogleCloudDialogflowV2EntityType
paetpPayload
= lens _paetpPayload (\ s a -> s{_paetpPayload = a})
paetpName :: Lens' ProjectsAgentEntityTypesPatch Text
paetpName
= lens _paetpName (\ s a -> s{_paetpName = a})
paetpCallback :: Lens' ProjectsAgentEntityTypesPatch (Maybe Text)
paetpCallback
= lens _paetpCallback
(\ s a -> s{_paetpCallback = a})
instance GoogleRequest ProjectsAgentEntityTypesPatch
where
type Rs ProjectsAgentEntityTypesPatch =
GoogleCloudDialogflowV2EntityType
type Scopes ProjectsAgentEntityTypesPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentEntityTypesPatch'{..}
= go _paetpName _paetpXgafv _paetpLanguageCode
_paetpUploadProtocol
_paetpUpdateMask
_paetpAccessToken
_paetpUploadType
_paetpCallback
(Just AltJSON)
_paetpPayload
dialogFlowService
where go
= buildClient
(Proxy ::
Proxy ProjectsAgentEntityTypesPatchResource)
mempty