{-# 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.Sessions.Contexts.Patch
(
ProjectsAgentSessionsContextsPatchResource
, projectsAgentSessionsContextsPatch
, ProjectsAgentSessionsContextsPatch
, pascpXgafv
, pascpUploadProtocol
, pascpUpdateMask
, pascpAccessToken
, pascpUploadType
, pascpPayload
, pascpName
, pascpCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentSessionsContextsPatchResource =
"v2" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudDialogflowV2Context :>
Patch '[JSON] GoogleCloudDialogflowV2Context
data ProjectsAgentSessionsContextsPatch = ProjectsAgentSessionsContextsPatch'
{ _pascpXgafv :: !(Maybe Xgafv)
, _pascpUploadProtocol :: !(Maybe Text)
, _pascpUpdateMask :: !(Maybe GFieldMask)
, _pascpAccessToken :: !(Maybe Text)
, _pascpUploadType :: !(Maybe Text)
, _pascpPayload :: !GoogleCloudDialogflowV2Context
, _pascpName :: !Text
, _pascpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentSessionsContextsPatch
:: GoogleCloudDialogflowV2Context
-> Text
-> ProjectsAgentSessionsContextsPatch
projectsAgentSessionsContextsPatch pPascpPayload_ pPascpName_ =
ProjectsAgentSessionsContextsPatch'
{ _pascpXgafv = Nothing
, _pascpUploadProtocol = Nothing
, _pascpUpdateMask = Nothing
, _pascpAccessToken = Nothing
, _pascpUploadType = Nothing
, _pascpPayload = pPascpPayload_
, _pascpName = pPascpName_
, _pascpCallback = Nothing
}
pascpXgafv :: Lens' ProjectsAgentSessionsContextsPatch (Maybe Xgafv)
pascpXgafv
= lens _pascpXgafv (\ s a -> s{_pascpXgafv = a})
pascpUploadProtocol :: Lens' ProjectsAgentSessionsContextsPatch (Maybe Text)
pascpUploadProtocol
= lens _pascpUploadProtocol
(\ s a -> s{_pascpUploadProtocol = a})
pascpUpdateMask :: Lens' ProjectsAgentSessionsContextsPatch (Maybe GFieldMask)
pascpUpdateMask
= lens _pascpUpdateMask
(\ s a -> s{_pascpUpdateMask = a})
pascpAccessToken :: Lens' ProjectsAgentSessionsContextsPatch (Maybe Text)
pascpAccessToken
= lens _pascpAccessToken
(\ s a -> s{_pascpAccessToken = a})
pascpUploadType :: Lens' ProjectsAgentSessionsContextsPatch (Maybe Text)
pascpUploadType
= lens _pascpUploadType
(\ s a -> s{_pascpUploadType = a})
pascpPayload :: Lens' ProjectsAgentSessionsContextsPatch GoogleCloudDialogflowV2Context
pascpPayload
= lens _pascpPayload (\ s a -> s{_pascpPayload = a})
pascpName :: Lens' ProjectsAgentSessionsContextsPatch Text
pascpName
= lens _pascpName (\ s a -> s{_pascpName = a})
pascpCallback :: Lens' ProjectsAgentSessionsContextsPatch (Maybe Text)
pascpCallback
= lens _pascpCallback
(\ s a -> s{_pascpCallback = a})
instance GoogleRequest
ProjectsAgentSessionsContextsPatch where
type Rs ProjectsAgentSessionsContextsPatch =
GoogleCloudDialogflowV2Context
type Scopes ProjectsAgentSessionsContextsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentSessionsContextsPatch'{..}
= go _pascpName _pascpXgafv _pascpUploadProtocol
_pascpUpdateMask
_pascpAccessToken
_pascpUploadType
_pascpCallback
(Just AltJSON)
_pascpPayload
dialogFlowService
where go
= buildClient
(Proxy ::
Proxy ProjectsAgentSessionsContextsPatchResource)
mempty