{-# 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.Create
(
ProjectsAgentSessionsContextsCreateResource
, projectsAgentSessionsContextsCreate
, ProjectsAgentSessionsContextsCreate
, pasccParent
, pasccXgafv
, pasccUploadProtocol
, pasccAccessToken
, pasccUploadType
, pasccPayload
, pasccCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentSessionsContextsCreateResource =
"v2" :>
Capture "parent" Text :>
"contexts" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudDialogflowV2Context :>
Post '[JSON] GoogleCloudDialogflowV2Context
data ProjectsAgentSessionsContextsCreate = ProjectsAgentSessionsContextsCreate'
{ _pasccParent :: !Text
, _pasccXgafv :: !(Maybe Xgafv)
, _pasccUploadProtocol :: !(Maybe Text)
, _pasccAccessToken :: !(Maybe Text)
, _pasccUploadType :: !(Maybe Text)
, _pasccPayload :: !GoogleCloudDialogflowV2Context
, _pasccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentSessionsContextsCreate
:: Text
-> GoogleCloudDialogflowV2Context
-> ProjectsAgentSessionsContextsCreate
projectsAgentSessionsContextsCreate pPasccParent_ pPasccPayload_ =
ProjectsAgentSessionsContextsCreate'
{ _pasccParent = pPasccParent_
, _pasccXgafv = Nothing
, _pasccUploadProtocol = Nothing
, _pasccAccessToken = Nothing
, _pasccUploadType = Nothing
, _pasccPayload = pPasccPayload_
, _pasccCallback = Nothing
}
pasccParent :: Lens' ProjectsAgentSessionsContextsCreate Text
pasccParent
= lens _pasccParent (\ s a -> s{_pasccParent = a})
pasccXgafv :: Lens' ProjectsAgentSessionsContextsCreate (Maybe Xgafv)
pasccXgafv
= lens _pasccXgafv (\ s a -> s{_pasccXgafv = a})
pasccUploadProtocol :: Lens' ProjectsAgentSessionsContextsCreate (Maybe Text)
pasccUploadProtocol
= lens _pasccUploadProtocol
(\ s a -> s{_pasccUploadProtocol = a})
pasccAccessToken :: Lens' ProjectsAgentSessionsContextsCreate (Maybe Text)
pasccAccessToken
= lens _pasccAccessToken
(\ s a -> s{_pasccAccessToken = a})
pasccUploadType :: Lens' ProjectsAgentSessionsContextsCreate (Maybe Text)
pasccUploadType
= lens _pasccUploadType
(\ s a -> s{_pasccUploadType = a})
pasccPayload :: Lens' ProjectsAgentSessionsContextsCreate GoogleCloudDialogflowV2Context
pasccPayload
= lens _pasccPayload (\ s a -> s{_pasccPayload = a})
pasccCallback :: Lens' ProjectsAgentSessionsContextsCreate (Maybe Text)
pasccCallback
= lens _pasccCallback
(\ s a -> s{_pasccCallback = a})
instance GoogleRequest
ProjectsAgentSessionsContextsCreate where
type Rs ProjectsAgentSessionsContextsCreate =
GoogleCloudDialogflowV2Context
type Scopes ProjectsAgentSessionsContextsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient
ProjectsAgentSessionsContextsCreate'{..}
= go _pasccParent _pasccXgafv _pasccUploadProtocol
_pasccAccessToken
_pasccUploadType
_pasccCallback
(Just AltJSON)
_pasccPayload
dialogFlowService
where go
= buildClient
(Proxy ::
Proxy ProjectsAgentSessionsContextsCreateResource)
mempty