{-# 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.Language.Detections.List
(
DetectionsListResource
, detectionsList
, DetectionsList
, dlXgafv
, dlUploadProtocol
, dlPp
, dlAccessToken
, dlUploadType
, dlQ
, dlBearerToken
, dlCallback
) where
import Network.Google.Prelude
import Network.Google.Translate.Types
type DetectionsListResource =
"language" :>
"translate" :>
"v2" :>
"detect" :>
QueryParams "q" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "pp" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "bearer_token" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] DetectionsListResponse
data DetectionsList = DetectionsList'
{ _dlXgafv :: !(Maybe Xgafv)
, _dlUploadProtocol :: !(Maybe Text)
, _dlPp :: !Bool
, _dlAccessToken :: !(Maybe Text)
, _dlUploadType :: !(Maybe Text)
, _dlQ :: ![Text]
, _dlBearerToken :: !(Maybe Text)
, _dlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
detectionsList
:: [Text]
-> DetectionsList
detectionsList pDlQ_ =
DetectionsList'
{ _dlXgafv = Nothing
, _dlUploadProtocol = Nothing
, _dlPp = True
, _dlAccessToken = Nothing
, _dlUploadType = Nothing
, _dlQ = _Coerce # pDlQ_
, _dlBearerToken = Nothing
, _dlCallback = Nothing
}
dlXgafv :: Lens' DetectionsList (Maybe Xgafv)
dlXgafv = lens _dlXgafv (\ s a -> s{_dlXgafv = a})
dlUploadProtocol :: Lens' DetectionsList (Maybe Text)
dlUploadProtocol
= lens _dlUploadProtocol
(\ s a -> s{_dlUploadProtocol = a})
dlPp :: Lens' DetectionsList Bool
dlPp = lens _dlPp (\ s a -> s{_dlPp = a})
dlAccessToken :: Lens' DetectionsList (Maybe Text)
dlAccessToken
= lens _dlAccessToken
(\ s a -> s{_dlAccessToken = a})
dlUploadType :: Lens' DetectionsList (Maybe Text)
dlUploadType
= lens _dlUploadType (\ s a -> s{_dlUploadType = a})
dlQ :: Lens' DetectionsList [Text]
dlQ = lens _dlQ (\ s a -> s{_dlQ = a}) . _Coerce
dlBearerToken :: Lens' DetectionsList (Maybe Text)
dlBearerToken
= lens _dlBearerToken
(\ s a -> s{_dlBearerToken = a})
dlCallback :: Lens' DetectionsList (Maybe Text)
dlCallback
= lens _dlCallback (\ s a -> s{_dlCallback = a})
instance GoogleRequest DetectionsList where
type Rs DetectionsList = DetectionsListResponse
type Scopes DetectionsList =
'["https://www.googleapis.com/auth/cloud-translation",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient DetectionsList'{..}
= go _dlQ _dlXgafv _dlUploadProtocol (Just _dlPp)
_dlAccessToken
_dlUploadType
_dlBearerToken
_dlCallback
(Just AltJSON)
translateService
where go
= buildClient (Proxy :: Proxy DetectionsListResource)
mempty