module Network.Google.Resource.Language.Translations.List
(
TranslationsListResource
, translationsList
, TranslationsList
, tlFormat
, tlQ
, tlSource
, tlCid
, tlTarget
) where
import Network.Google.Prelude
import Network.Google.Translate.Types
type TranslationsListResource =
"language" :>
"translate" :>
"v2" :>
QueryParams "q" Text :>
QueryParam "target" Text :>
QueryParam "format" TranslationsListFormat :>
QueryParam "source" Text :>
QueryParams "cid" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] TranslationsListResponse
data TranslationsList = TranslationsList'
{ _tlFormat :: !(Maybe TranslationsListFormat)
, _tlQ :: ![Text]
, _tlSource :: !(Maybe Text)
, _tlCid :: !(Maybe [Text])
, _tlTarget :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
translationsList
:: [Text]
-> Text
-> TranslationsList
translationsList pTlQ_ pTlTarget_ =
TranslationsList'
{ _tlFormat = Nothing
, _tlQ = _Coerce # pTlQ_
, _tlSource = Nothing
, _tlCid = Nothing
, _tlTarget = pTlTarget_
}
tlFormat :: Lens' TranslationsList (Maybe TranslationsListFormat)
tlFormat = lens _tlFormat (\ s a -> s{_tlFormat = a})
tlQ :: Lens' TranslationsList [Text]
tlQ = lens _tlQ (\ s a -> s{_tlQ = a}) . _Coerce
tlSource :: Lens' TranslationsList (Maybe Text)
tlSource = lens _tlSource (\ s a -> s{_tlSource = a})
tlCid :: Lens' TranslationsList [Text]
tlCid
= lens _tlCid (\ s a -> s{_tlCid = a}) . _Default .
_Coerce
tlTarget :: Lens' TranslationsList Text
tlTarget = lens _tlTarget (\ s a -> s{_tlTarget = a})
instance GoogleRequest TranslationsList where
type Rs TranslationsList = TranslationsListResponse
type Scopes TranslationsList = '[]
requestClient TranslationsList'{..}
= go _tlQ (Just _tlTarget) _tlFormat _tlSource
(_tlCid ^. _Default)
(Just AltJSON)
translateService
where go
= buildClient
(Proxy :: Proxy TranslationsListResource)
mempty