{-# 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.EntityTypes.Create
(
ProjectsAgentSessionsEntityTypesCreateResource
, projectsAgentSessionsEntityTypesCreate
, ProjectsAgentSessionsEntityTypesCreate
, paSetcParent
, paSetcXgafv
, paSetcUploadProtocol
, paSetcAccessToken
, paSetcUploadType
, paSetcPayload
, paSetcCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentSessionsEntityTypesCreateResource =
"v2" :>
Capture "parent" Text :>
"entityTypes" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleCloudDialogflowV2SessionEntityType
:>
Post '[JSON] GoogleCloudDialogflowV2SessionEntityType
data ProjectsAgentSessionsEntityTypesCreate = ProjectsAgentSessionsEntityTypesCreate'
{ _paSetcParent :: !Text
, _paSetcXgafv :: !(Maybe Xgafv)
, _paSetcUploadProtocol :: !(Maybe Text)
, _paSetcAccessToken :: !(Maybe Text)
, _paSetcUploadType :: !(Maybe Text)
, _paSetcPayload :: !GoogleCloudDialogflowV2SessionEntityType
, _paSetcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentSessionsEntityTypesCreate
:: Text
-> GoogleCloudDialogflowV2SessionEntityType
-> ProjectsAgentSessionsEntityTypesCreate
projectsAgentSessionsEntityTypesCreate pPaSetcParent_ pPaSetcPayload_ =
ProjectsAgentSessionsEntityTypesCreate'
{ _paSetcParent = pPaSetcParent_
, _paSetcXgafv = Nothing
, _paSetcUploadProtocol = Nothing
, _paSetcAccessToken = Nothing
, _paSetcUploadType = Nothing
, _paSetcPayload = pPaSetcPayload_
, _paSetcCallback = Nothing
}
paSetcParent :: Lens' ProjectsAgentSessionsEntityTypesCreate Text
paSetcParent
= lens _paSetcParent (\ s a -> s{_paSetcParent = a})
paSetcXgafv :: Lens' ProjectsAgentSessionsEntityTypesCreate (Maybe Xgafv)
paSetcXgafv
= lens _paSetcXgafv (\ s a -> s{_paSetcXgafv = a})
paSetcUploadProtocol :: Lens' ProjectsAgentSessionsEntityTypesCreate (Maybe Text)
paSetcUploadProtocol
= lens _paSetcUploadProtocol
(\ s a -> s{_paSetcUploadProtocol = a})
paSetcAccessToken :: Lens' ProjectsAgentSessionsEntityTypesCreate (Maybe Text)
paSetcAccessToken
= lens _paSetcAccessToken
(\ s a -> s{_paSetcAccessToken = a})
paSetcUploadType :: Lens' ProjectsAgentSessionsEntityTypesCreate (Maybe Text)
paSetcUploadType
= lens _paSetcUploadType
(\ s a -> s{_paSetcUploadType = a})
paSetcPayload :: Lens' ProjectsAgentSessionsEntityTypesCreate GoogleCloudDialogflowV2SessionEntityType
paSetcPayload
= lens _paSetcPayload
(\ s a -> s{_paSetcPayload = a})
paSetcCallback :: Lens' ProjectsAgentSessionsEntityTypesCreate (Maybe Text)
paSetcCallback
= lens _paSetcCallback
(\ s a -> s{_paSetcCallback = a})
instance GoogleRequest
ProjectsAgentSessionsEntityTypesCreate where
type Rs ProjectsAgentSessionsEntityTypesCreate =
GoogleCloudDialogflowV2SessionEntityType
type Scopes ProjectsAgentSessionsEntityTypesCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient
ProjectsAgentSessionsEntityTypesCreate'{..}
= go _paSetcParent _paSetcXgafv _paSetcUploadProtocol
_paSetcAccessToken
_paSetcUploadType
_paSetcCallback
(Just AltJSON)
_paSetcPayload
dialogFlowService
where go
= buildClient
(Proxy ::
Proxy ProjectsAgentSessionsEntityTypesCreateResource)
mempty