{-# 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.Languages.List
(
LanguagesListResource
, languagesList
, LanguagesList
, llXgafv
, llUploadProtocol
, llPp
, llAccessToken
, llUploadType
, llBearerToken
, llModel
, llTarget
, llCallback
) where
import Network.Google.Prelude
import Network.Google.Translate.Types
type LanguagesListResource =
"language" :>
"translate" :>
"v2" :>
"languages" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "pp" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "bearer_token" Text :>
QueryParam "model" Text :>
QueryParam "target" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] LanguagesListResponse
data LanguagesList = LanguagesList'
{ _llXgafv :: !(Maybe Xgafv)
, _llUploadProtocol :: !(Maybe Text)
, _llPp :: !Bool
, _llAccessToken :: !(Maybe Text)
, _llUploadType :: !(Maybe Text)
, _llBearerToken :: !(Maybe Text)
, _llModel :: !(Maybe Text)
, _llTarget :: !(Maybe Text)
, _llCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
languagesList
:: LanguagesList
languagesList =
LanguagesList'
{ _llXgafv = Nothing
, _llUploadProtocol = Nothing
, _llPp = True
, _llAccessToken = Nothing
, _llUploadType = Nothing
, _llBearerToken = Nothing
, _llModel = Nothing
, _llTarget = Nothing
, _llCallback = Nothing
}
llXgafv :: Lens' LanguagesList (Maybe Xgafv)
llXgafv = lens _llXgafv (\ s a -> s{_llXgafv = a})
llUploadProtocol :: Lens' LanguagesList (Maybe Text)
llUploadProtocol
= lens _llUploadProtocol
(\ s a -> s{_llUploadProtocol = a})
llPp :: Lens' LanguagesList Bool
llPp = lens _llPp (\ s a -> s{_llPp = a})
llAccessToken :: Lens' LanguagesList (Maybe Text)
llAccessToken
= lens _llAccessToken
(\ s a -> s{_llAccessToken = a})
llUploadType :: Lens' LanguagesList (Maybe Text)
llUploadType
= lens _llUploadType (\ s a -> s{_llUploadType = a})
llBearerToken :: Lens' LanguagesList (Maybe Text)
llBearerToken
= lens _llBearerToken
(\ s a -> s{_llBearerToken = a})
llModel :: Lens' LanguagesList (Maybe Text)
llModel = lens _llModel (\ s a -> s{_llModel = a})
llTarget :: Lens' LanguagesList (Maybe Text)
llTarget = lens _llTarget (\ s a -> s{_llTarget = a})
llCallback :: Lens' LanguagesList (Maybe Text)
llCallback
= lens _llCallback (\ s a -> s{_llCallback = a})
instance GoogleRequest LanguagesList where
type Rs LanguagesList = LanguagesListResponse
type Scopes LanguagesList =
'["https://www.googleapis.com/auth/cloud-translation",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient LanguagesList'{..}
= go _llXgafv _llUploadProtocol (Just _llPp)
_llAccessToken
_llUploadType
_llBearerToken
_llModel
_llTarget
_llCallback
(Just AltJSON)
translateService
where go
= buildClient (Proxy :: Proxy LanguagesListResource)
mempty