{-# 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.Create
(
ProjectsAgentEntityTypesCreateResource
, projectsAgentEntityTypesCreate
, ProjectsAgentEntityTypesCreate
, paetcParent
, paetcXgafv
, paetcLanguageCode
, paetcUploadProtocol
, paetcAccessToken
, paetcUploadType
, paetcPayload
, paetcCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentEntityTypesCreateResource =
"v2" :>
Capture "parent" Text :>
"entityTypes" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "languageCode" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudDialogflowV2EntityType :>
Post '[JSON] GoogleCloudDialogflowV2EntityType
data ProjectsAgentEntityTypesCreate = ProjectsAgentEntityTypesCreate'
{ _paetcParent :: !Text
, _paetcXgafv :: !(Maybe Xgafv)
, _paetcLanguageCode :: !(Maybe Text)
, _paetcUploadProtocol :: !(Maybe Text)
, _paetcAccessToken :: !(Maybe Text)
, _paetcUploadType :: !(Maybe Text)
, _paetcPayload :: !GoogleCloudDialogflowV2EntityType
, _paetcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentEntityTypesCreate
:: Text
-> GoogleCloudDialogflowV2EntityType
-> ProjectsAgentEntityTypesCreate
projectsAgentEntityTypesCreate pPaetcParent_ pPaetcPayload_ =
ProjectsAgentEntityTypesCreate'
{ _paetcParent = pPaetcParent_
, _paetcXgafv = Nothing
, _paetcLanguageCode = Nothing
, _paetcUploadProtocol = Nothing
, _paetcAccessToken = Nothing
, _paetcUploadType = Nothing
, _paetcPayload = pPaetcPayload_
, _paetcCallback = Nothing
}
paetcParent :: Lens' ProjectsAgentEntityTypesCreate Text
paetcParent
= lens _paetcParent (\ s a -> s{_paetcParent = a})
paetcXgafv :: Lens' ProjectsAgentEntityTypesCreate (Maybe Xgafv)
paetcXgafv
= lens _paetcXgafv (\ s a -> s{_paetcXgafv = a})
paetcLanguageCode :: Lens' ProjectsAgentEntityTypesCreate (Maybe Text)
paetcLanguageCode
= lens _paetcLanguageCode
(\ s a -> s{_paetcLanguageCode = a})
paetcUploadProtocol :: Lens' ProjectsAgentEntityTypesCreate (Maybe Text)
paetcUploadProtocol
= lens _paetcUploadProtocol
(\ s a -> s{_paetcUploadProtocol = a})
paetcAccessToken :: Lens' ProjectsAgentEntityTypesCreate (Maybe Text)
paetcAccessToken
= lens _paetcAccessToken
(\ s a -> s{_paetcAccessToken = a})
paetcUploadType :: Lens' ProjectsAgentEntityTypesCreate (Maybe Text)
paetcUploadType
= lens _paetcUploadType
(\ s a -> s{_paetcUploadType = a})
paetcPayload :: Lens' ProjectsAgentEntityTypesCreate GoogleCloudDialogflowV2EntityType
paetcPayload
= lens _paetcPayload (\ s a -> s{_paetcPayload = a})
paetcCallback :: Lens' ProjectsAgentEntityTypesCreate (Maybe Text)
paetcCallback
= lens _paetcCallback
(\ s a -> s{_paetcCallback = a})
instance GoogleRequest ProjectsAgentEntityTypesCreate
where
type Rs ProjectsAgentEntityTypesCreate =
GoogleCloudDialogflowV2EntityType
type Scopes ProjectsAgentEntityTypesCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentEntityTypesCreate'{..}
= go _paetcParent _paetcXgafv _paetcLanguageCode
_paetcUploadProtocol
_paetcAccessToken
_paetcUploadType
_paetcCallback
(Just AltJSON)
_paetcPayload
dialogFlowService
where go
= buildClient
(Proxy ::
Proxy ProjectsAgentEntityTypesCreateResource)
mempty