{-# 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.Intents.Patch
(
ProjectsAgentIntentsPatchResource
, projectsAgentIntentsPatch
, ProjectsAgentIntentsPatch
, paipXgafv
, paipLanguageCode
, paipUploadProtocol
, paipUpdateMask
, paipAccessToken
, paipUploadType
, paipPayload
, paipIntentView
, paipName
, paipCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentIntentsPatchResource =
"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 "intentView" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudDialogflowV2Intent :>
Patch '[JSON] GoogleCloudDialogflowV2Intent
data ProjectsAgentIntentsPatch = ProjectsAgentIntentsPatch'
{ _paipXgafv :: !(Maybe Xgafv)
, _paipLanguageCode :: !(Maybe Text)
, _paipUploadProtocol :: !(Maybe Text)
, _paipUpdateMask :: !(Maybe GFieldMask)
, _paipAccessToken :: !(Maybe Text)
, _paipUploadType :: !(Maybe Text)
, _paipPayload :: !GoogleCloudDialogflowV2Intent
, _paipIntentView :: !(Maybe Text)
, _paipName :: !Text
, _paipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentIntentsPatch
:: GoogleCloudDialogflowV2Intent
-> Text
-> ProjectsAgentIntentsPatch
projectsAgentIntentsPatch pPaipPayload_ pPaipName_ =
ProjectsAgentIntentsPatch'
{ _paipXgafv = Nothing
, _paipLanguageCode = Nothing
, _paipUploadProtocol = Nothing
, _paipUpdateMask = Nothing
, _paipAccessToken = Nothing
, _paipUploadType = Nothing
, _paipPayload = pPaipPayload_
, _paipIntentView = Nothing
, _paipName = pPaipName_
, _paipCallback = Nothing
}
paipXgafv :: Lens' ProjectsAgentIntentsPatch (Maybe Xgafv)
paipXgafv
= lens _paipXgafv (\ s a -> s{_paipXgafv = a})
paipLanguageCode :: Lens' ProjectsAgentIntentsPatch (Maybe Text)
paipLanguageCode
= lens _paipLanguageCode
(\ s a -> s{_paipLanguageCode = a})
paipUploadProtocol :: Lens' ProjectsAgentIntentsPatch (Maybe Text)
paipUploadProtocol
= lens _paipUploadProtocol
(\ s a -> s{_paipUploadProtocol = a})
paipUpdateMask :: Lens' ProjectsAgentIntentsPatch (Maybe GFieldMask)
paipUpdateMask
= lens _paipUpdateMask
(\ s a -> s{_paipUpdateMask = a})
paipAccessToken :: Lens' ProjectsAgentIntentsPatch (Maybe Text)
paipAccessToken
= lens _paipAccessToken
(\ s a -> s{_paipAccessToken = a})
paipUploadType :: Lens' ProjectsAgentIntentsPatch (Maybe Text)
paipUploadType
= lens _paipUploadType
(\ s a -> s{_paipUploadType = a})
paipPayload :: Lens' ProjectsAgentIntentsPatch GoogleCloudDialogflowV2Intent
paipPayload
= lens _paipPayload (\ s a -> s{_paipPayload = a})
paipIntentView :: Lens' ProjectsAgentIntentsPatch (Maybe Text)
paipIntentView
= lens _paipIntentView
(\ s a -> s{_paipIntentView = a})
paipName :: Lens' ProjectsAgentIntentsPatch Text
paipName = lens _paipName (\ s a -> s{_paipName = a})
paipCallback :: Lens' ProjectsAgentIntentsPatch (Maybe Text)
paipCallback
= lens _paipCallback (\ s a -> s{_paipCallback = a})
instance GoogleRequest ProjectsAgentIntentsPatch
where
type Rs ProjectsAgentIntentsPatch =
GoogleCloudDialogflowV2Intent
type Scopes ProjectsAgentIntentsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentIntentsPatch'{..}
= go _paipName _paipXgafv _paipLanguageCode
_paipUploadProtocol
_paipUpdateMask
_paipAccessToken
_paipUploadType
_paipIntentView
_paipCallback
(Just AltJSON)
_paipPayload
dialogFlowService
where go
= buildClient
(Proxy :: Proxy ProjectsAgentIntentsPatchResource)
mempty