Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- translateService :: ServiceConfig
- cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
- cloudTranslationScope :: Proxy '["https://www.googleapis.com/auth/cloud-translation"]
- data DetectLanguageRequest
- detectLanguageRequest :: DetectLanguageRequest
- dlrQ :: Lens' DetectLanguageRequest [Text]
- data TranslationsResource
- translationsResource :: TranslationsResource
- trDetectedSourceLanguage :: Lens' TranslationsResource (Maybe Text)
- trModel :: Lens' TranslationsResource (Maybe Text)
- trTranslatedText :: Lens' TranslationsResource (Maybe Text)
- data TranslateTextRequest
- translateTextRequest :: TranslateTextRequest
- ttrFormat :: Lens' TranslateTextRequest (Maybe Text)
- ttrQ :: Lens' TranslateTextRequest [Text]
- ttrModel :: Lens' TranslateTextRequest (Maybe Text)
- ttrSource :: Lens' TranslateTextRequest (Maybe Text)
- ttrTarget :: Lens' TranslateTextRequest (Maybe Text)
- data DetectionsListResponse
- detectionsListResponse :: DetectionsListResponse
- dlrDetections :: Lens' DetectionsListResponse [[DetectionsResourceItem]]
- data GetSupportedLanguagesRequest
- getSupportedLanguagesRequest :: GetSupportedLanguagesRequest
- gslrTarget :: Lens' GetSupportedLanguagesRequest (Maybe Text)
- data LanguagesListResponse
- languagesListResponse :: LanguagesListResponse
- llrLanguages :: Lens' LanguagesListResponse [LanguagesResource]
- data DetectionsResourceItem
- detectionsResourceItem :: DetectionsResourceItem
- driConfidence :: Lens' DetectionsResourceItem (Maybe Double)
- driIsReliable :: Lens' DetectionsResourceItem (Maybe Bool)
- driLanguage :: Lens' DetectionsResourceItem (Maybe Text)
- data Xgafv
- data LanguagesResource
- languagesResource :: LanguagesResource
- lrName :: Lens' LanguagesResource (Maybe Text)
- lrLanguage :: Lens' LanguagesResource (Maybe Text)
- data TranslationsListFormat
- data TranslationsListResponse
- translationsListResponse :: TranslationsListResponse
- tlrTranslations :: Lens' TranslationsListResponse [TranslationsResource]
Service Configuration
translateService :: ServiceConfig Source #
Default request referring to version v2
of the Google Cloud Translation API. This contains the host and root path used as a starting point for constructing service requests.
OAuth Scopes
cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"] Source #
View and manage your data across Google Cloud Platform services
cloudTranslationScope :: Proxy '["https://www.googleapis.com/auth/cloud-translation"] Source #
Translate text from one language to another using Google Translate
DetectLanguageRequest
data DetectLanguageRequest Source #
The request message for language detection.
See: detectLanguageRequest
smart constructor.
Instances
detectLanguageRequest :: DetectLanguageRequest Source #
Creates a value of DetectLanguageRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dlrQ :: Lens' DetectLanguageRequest [Text] Source #
The input text upon which to perform language detection. Repeat this parameter to perform language detection on multiple text inputs.
TranslationsResource
data TranslationsResource Source #
Instances
translationsResource :: TranslationsResource Source #
Creates a value of TranslationsResource
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
trDetectedSourceLanguage :: Lens' TranslationsResource (Maybe Text) Source #
The source language of the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language will not occur and this field will be empty.
trModel :: Lens' TranslationsResource (Maybe Text) Source #
The `model` type used for this translation. Valid values are listed in public documentation. Can be different from requested `model`. Present only if specific model type was explicitly requested.
trTranslatedText :: Lens' TranslationsResource (Maybe Text) Source #
Text translated into the target language.
TranslateTextRequest
data TranslateTextRequest Source #
The main translation request message for the Cloud Translation API.
See: translateTextRequest
smart constructor.
Instances
ttrFormat :: Lens' TranslateTextRequest (Maybe Text) Source #
The format of the source text, in either HTML (default) or plain-text. A value of "html" indicates HTML and a value of "text" indicates plain-text.
ttrQ :: Lens' TranslateTextRequest [Text] Source #
The input text to translate. Repeat this parameter to perform translation operations on multiple text inputs.
ttrModel :: Lens' TranslateTextRequest (Maybe Text) Source #
The `model` type requested for this translation. Valid values are listed in public documentation.
ttrSource :: Lens' TranslateTextRequest (Maybe Text) Source #
The language of the source text, set to one of the language codes listed in Language Support. If the source language is not specified, the API will attempt to identify the source language automatically and return it within the response.
ttrTarget :: Lens' TranslateTextRequest (Maybe Text) Source #
The language to use for translation of the input text, set to one of the language codes listed in Language Support.
DetectionsListResponse
data DetectionsListResponse Source #
Instances
detectionsListResponse :: DetectionsListResponse Source #
Creates a value of DetectionsListResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dlrDetections :: Lens' DetectionsListResponse [[DetectionsResourceItem]] Source #
A detections contains detection results of several text
GetSupportedLanguagesRequest
data GetSupportedLanguagesRequest Source #
The request message for discovering supported languages.
See: getSupportedLanguagesRequest
smart constructor.
Instances
getSupportedLanguagesRequest :: GetSupportedLanguagesRequest Source #
Creates a value of GetSupportedLanguagesRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gslrTarget :: Lens' GetSupportedLanguagesRequest (Maybe Text) Source #
The language to use to return localized, human readable names of supported languages.
LanguagesListResponse
data LanguagesListResponse Source #
Instances
languagesListResponse :: LanguagesListResponse Source #
Creates a value of LanguagesListResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
llrLanguages :: Lens' LanguagesListResponse [LanguagesResource] Source #
List of source/target languages supported by the translation API. If target parameter is unspecified, the list is sorted by the ASCII code point order of the language code. If target parameter is specified, the list is sorted by the collation order of the language name in the target language.
DetectionsResourceItem
data DetectionsResourceItem Source #
Instances
detectionsResourceItem :: DetectionsResourceItem Source #
Creates a value of DetectionsResourceItem
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
driConfidence :: Lens' DetectionsResourceItem (Maybe Double) Source #
The confidence of the detection result of this language.
driIsReliable :: Lens' DetectionsResourceItem (Maybe Bool) Source #
A boolean to indicate is the language detection result reliable.
driLanguage :: Lens' DetectionsResourceItem (Maybe Text) Source #
The language we detected.
Xgafv
V1 error format.
Instances
LanguagesResource
data LanguagesResource Source #
Instances
languagesResource :: LanguagesResource Source #
Creates a value of LanguagesResource
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lrName :: Lens' LanguagesResource (Maybe Text) Source #
Human readable name of the language localized to the target language.
lrLanguage :: Lens' LanguagesResource (Maybe Text) Source #
Supported language code, generally consisting of its ISO 639-1 identifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including language + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH')
TranslationsListFormat
data TranslationsListFormat Source #
The format of the source text, in either HTML (default) or plain-text. A value of "html" indicates HTML and a value of "text" indicates plain-text.
Instances
TranslationsListResponse
data TranslationsListResponse Source #
The main language translation response message.
See: translationsListResponse
smart constructor.
Instances
translationsListResponse :: TranslationsListResponse Source #
Creates a value of TranslationsListResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
tlrTranslations :: Lens' TranslationsListResponse [TranslationsResource] Source #
Translations contains list of translation results of given text