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 |
Translates input text, returning translated text.
See: Google Cloud Translation API Reference for language.translations.translate
.
Synopsis
- type TranslationsTranslateResource = "language" :> ("translate" :> ("v2" :> (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 :> (ReqBody '[JSON] TranslateTextRequest :> Post '[JSON] TranslationsListResponse)))))))))))
- translationsTranslate :: TranslateTextRequest -> TranslationsTranslate
- data TranslationsTranslate
- ttXgafv :: Lens' TranslationsTranslate (Maybe Xgafv)
- ttUploadProtocol :: Lens' TranslationsTranslate (Maybe Text)
- ttPp :: Lens' TranslationsTranslate Bool
- ttAccessToken :: Lens' TranslationsTranslate (Maybe Text)
- ttUploadType :: Lens' TranslationsTranslate (Maybe Text)
- ttPayload :: Lens' TranslationsTranslate TranslateTextRequest
- ttBearerToken :: Lens' TranslationsTranslate (Maybe Text)
- ttCallback :: Lens' TranslationsTranslate (Maybe Text)
REST Resource
type TranslationsTranslateResource = "language" :> ("translate" :> ("v2" :> (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 :> (ReqBody '[JSON] TranslateTextRequest :> Post '[JSON] TranslationsListResponse))))))))))) Source #
A resource alias for language.translations.translate
method which the
TranslationsTranslate
request conforms to.
Creating a Request
translationsTranslate Source #
Creates a value of TranslationsTranslate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data TranslationsTranslate Source #
Translates input text, returning translated text.
See: translationsTranslate
smart constructor.
Instances
Request Lenses
ttUploadProtocol :: Lens' TranslationsTranslate (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
ttAccessToken :: Lens' TranslationsTranslate (Maybe Text) Source #
OAuth access token.
ttUploadType :: Lens' TranslationsTranslate (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
ttPayload :: Lens' TranslationsTranslate TranslateTextRequest Source #
Multipart request metadata.
ttBearerToken :: Lens' TranslationsTranslate (Maybe Text) Source #
OAuth bearer token.
ttCallback :: Lens' TranslationsTranslate (Maybe Text) Source #
JSONP