2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-15 09:44:15 +00:00
restic/vendor/google.golang.org/api/translate/v2/translate-api.json

441 lines
15 KiB
JSON
Raw Normal View History

2017-08-05 18:17:15 +00:00
{
"basePath": "/language/translate/",
"documentationLink": "https://code.google.com/apis/language/translate/v2/getting_started.html",
"revision": "20170525",
"id": "translate:v2",
"discoveryVersion": "v1",
"schemas": {
"TranslationsListResponse": {
"description": "The main language translation response message.",
"type": "object",
"properties": {
"translations": {
"description": "Translations contains list of translation results of given text",
"items": {
"$ref": "TranslationsResource"
},
"type": "array"
}
},
"id": "TranslationsListResponse"
},
"TranslateTextRequest": {
"id": "TranslateTextRequest",
"description": "The main translation request message for the Cloud Translation API.",
"type": "object",
"properties": {
"target": {
"type": "string",
"description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support."
},
"format": {
"description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text.",
"type": "string"
},
"q": {
"description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs.",
"items": {
"type": "string"
},
"type": "array"
},
"source": {
"description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.",
"type": "string"
},
"model": {
"description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.",
"type": "string"
}
}
},
"DetectLanguageRequest": {
"properties": {
"q": {
"items": {
"type": "string"
},
"type": "array",
"description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs."
}
},
"id": "DetectLanguageRequest",
"description": "The request message for language detection.",
"type": "object"
},
"LanguagesResource": {
"type": "object",
"properties": {
"name": {
"description": "Human readable name of the language localized to the target language.",
"type": "string"
},
"language": {
"description": "Supported language code, generally consisting of its ISO 639-1\nidentifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including\nlanguage + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH')",
"type": "string"
}
},
"id": "LanguagesResource"
},
"DetectionsListResponse": {
"type": "object",
"properties": {
"detections": {
"description": "A detections contains detection results of several text",
"items": {
"$ref": "DetectionsResource"
},
"type": "array"
}
},
"id": "DetectionsListResponse"
},
"GetSupportedLanguagesRequest": {
"type": "object",
"properties": {
"target": {
"description": "The language to use to return localized, human readable names of supported\nlanguages.",
"type": "string"
}
},
"id": "GetSupportedLanguagesRequest",
"description": "The request message for discovering supported languages."
},
"LanguagesListResponse": {
"properties": {
"languages": {
"items": {
"$ref": "LanguagesResource"
},
"type": "array",
"description": "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."
}
},
"id": "LanguagesListResponse",
"type": "object"
},
"DetectionsResource": {
"description": "An array of languages which we detect for the given text The most likely language list first.",
"items": {
"type": "object",
"properties": {
"confidence": {
"format": "float",
"description": "The confidence of the detection result of this language.",
"type": "number"
},
"language": {
"description": "The language we detected.",
"type": "string"
},
"isReliable": {
"description": "A boolean to indicate is the language detection result reliable.",
"type": "boolean"
}
}
},
"type": "array",
"id": "DetectionsResource"
},
"TranslationsResource": {
"type": "object",
"properties": {
"detectedSourceLanguage": {
"type": "string",
"description": "The source language of the initial request, detected automatically, if\nno source language was passed within the initial request. If the\nsource language was passed, auto-detection of the language will not\noccur and this field will be empty."
},
"model": {
"description": "The `model` type used for this translation. Valid values are\nlisted in public documentation. Can be different from requested `model`.\nPresent only if specific model type was explicitly requested.",
"type": "string"
},
"translatedText": {
"description": "Text translated into the target language.",
"type": "string"
}
},
"id": "TranslationsResource"
}
},
"icons": {
"x16": "https://www.google.com/images/icons/product/translate-16.png",
"x32": "https://www.google.com/images/icons/product/translate-32.png"
},
"protocol": "rest",
"canonicalName": "Translate",
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/cloud-platform": {
"description": "View and manage your data across Google Cloud Platform services"
},
"https://www.googleapis.com/auth/cloud-translation": {
"description": "Translate text from one language to another using Google Translate"
}
}
}
},
2017-09-21 15:48:45 +00:00
"rootUrl": "https://translation.googleapis.com/",
"ownerDomain": "google.com",
"name": "translate",
"batchPath": "batch/translate",
2017-08-05 18:17:15 +00:00
"features": [
"dataWrapper"
],
2017-09-21 15:48:45 +00:00
"title": "Google Cloud Translation API",
2017-08-05 18:17:15 +00:00
"ownerName": "Google",
"resources": {
"detections": {
2017-08-05 18:17:15 +00:00
"methods": {
"detect": {
2017-08-05 18:17:15 +00:00
"response": {
"$ref": "DetectionsListResponse"
2017-08-05 18:17:15 +00:00
},
"parameterOrder": [],
"httpMethod": "POST",
"parameters": {},
2017-09-13 12:09:48 +00:00
"scopes": [
"https://www.googleapis.com/auth/cloud-translation",
"https://www.googleapis.com/auth/cloud-platform"
2017-09-21 15:48:45 +00:00
],
"id": "language.detections.detect",
"path": "v2/detect",
2017-09-21 15:48:45 +00:00
"request": {
"$ref": "DetectLanguageRequest"
},
"description": "Detects the language of text within a request."
2017-09-13 12:09:48 +00:00
},
"list": {
"path": "v2/detect",
"id": "language.detections.list",
"description": "Detects the language of text within a request.",
2017-08-05 18:17:15 +00:00
"httpMethod": "GET",
2017-09-13 12:09:48 +00:00
"response": {
"$ref": "DetectionsListResponse"
2017-09-13 12:09:48 +00:00
},
"parameterOrder": [
"q"
2017-09-13 12:09:48 +00:00
],
2017-08-05 18:17:15 +00:00
"scopes": [
"https://www.googleapis.com/auth/cloud-translation",
"https://www.googleapis.com/auth/cloud-platform"
],
"parameters": {
2017-09-21 15:48:45 +00:00
"q": {
"description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs.",
2017-09-21 15:48:45 +00:00
"required": true,
"type": "string",
"repeated": true,
"location": "query"
2017-08-05 18:17:15 +00:00
}
2017-09-21 15:48:45 +00:00
}
2017-08-05 18:17:15 +00:00
}
}
},
"languages": {
2017-08-05 18:17:15 +00:00
"methods": {
"list": {
"description": "Returns a list of supported languages for translation.",
2017-08-05 18:17:15 +00:00
"response": {
"$ref": "LanguagesListResponse"
2017-08-05 18:17:15 +00:00
},
2017-09-13 12:09:48 +00:00
"httpMethod": "GET",
2017-08-05 18:17:15 +00:00
"parameters": {
"target": {
2017-09-13 12:09:48 +00:00
"location": "query",
"description": "The language to use to return localized, human readable names of supported\nlanguages.",
"type": "string"
},
"model": {
"location": "query",
"description": "The model type for which supported languages should be returned.",
"type": "string"
2017-09-21 15:48:45 +00:00
}
},
"scopes": [
"https://www.googleapis.com/auth/cloud-translation",
"https://www.googleapis.com/auth/cloud-platform"
],
"id": "language.languages.list",
"path": "v2/languages"
2017-09-21 15:48:45 +00:00
}
}
},
"translations": {
2017-09-21 15:48:45 +00:00
"methods": {
"list": {
"description": "Translates input text, returning translated text.",
"parameterOrder": [
"q",
"target"
],
2017-09-21 15:48:45 +00:00
"response": {
"$ref": "TranslationsListResponse"
2017-09-21 15:48:45 +00:00
},
"httpMethod": "GET",
"scopes": [
"https://www.googleapis.com/auth/cloud-translation",
"https://www.googleapis.com/auth/cloud-platform"
],
2017-09-21 15:48:45 +00:00
"parameters": {
"target": {
2017-09-13 12:09:48 +00:00
"location": "query",
"description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support.",
"required": true,
"type": "string"
},
"format": {
"enumDescriptions": [
"Specifies the input is in HTML",
"Specifies the input is in plain textual format"
],
"location": "query",
"enum": [
"html",
"text"
],
"description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text.",
2017-09-21 15:48:45 +00:00
"type": "string"
2017-09-13 12:09:48 +00:00
},
"model": {
"description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.",
"type": "string",
"location": "query"
},
"q": {
"required": true,
"type": "string",
"repeated": true,
"location": "query",
"description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs."
},
"source": {
"description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.",
"type": "string",
"location": "query"
},
"cid": {
"description": "The customization id for translate",
2017-09-13 12:09:48 +00:00
"type": "string",
"repeated": true,
2017-09-13 12:09:48 +00:00
"location": "query"
2017-08-05 18:17:15 +00:00
}
2017-09-21 15:48:45 +00:00
},
"id": "language.translations.list",
"path": "v2"
},
"translate": {
"path": "v2",
"id": "language.translations.translate",
"description": "Translates input text, returning translated text.",
"request": {
"$ref": "TranslateTextRequest"
},
"httpMethod": "POST",
"parameterOrder": [],
"response": {
"$ref": "TranslationsListResponse"
},
2017-09-21 15:48:45 +00:00
"scopes": [
"https://www.googleapis.com/auth/cloud-translation",
"https://www.googleapis.com/auth/cloud-platform"
],
"parameters": {}
2017-08-05 18:17:15 +00:00
}
}
}
},
"parameters": {
"upload_protocol": {
2017-09-13 12:09:48 +00:00
"location": "query",
2017-08-05 18:17:15 +00:00
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
2017-09-13 12:09:48 +00:00
"type": "string"
2017-08-05 18:17:15 +00:00
},
"prettyPrint": {
"location": "query",
2017-08-05 18:17:15 +00:00
"description": "Returns response with indentations and line breaks.",
"default": "true",
"type": "boolean"
2017-08-05 18:17:15 +00:00
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"type": "string",
"location": "query"
},
2017-09-21 15:48:45 +00:00
"fields": {
2017-09-13 12:09:48 +00:00
"location": "query",
2017-09-21 15:48:45 +00:00
"description": "Selector specifying which fields to include in a partial response.",
2017-09-13 12:09:48 +00:00
"type": "string"
2017-08-05 18:17:15 +00:00
},
"callback": {
"location": "query",
"description": "JSONP",
"type": "string"
},
2017-08-05 18:17:15 +00:00
"$.xgafv": {
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"enum": [
"1",
"2"
2017-09-21 15:48:45 +00:00
],
"description": "V1 error format.",
"type": "string"
},
2017-08-05 18:17:15 +00:00
"alt": {
"type": "string",
2017-08-05 18:17:15 +00:00
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"description": "Data format for response.",
2017-09-13 12:09:48 +00:00
"default": "json",
"enum": [
"json",
"media",
"proto"
]
2017-09-13 12:09:48 +00:00
},
"access_token": {
"location": "query",
2017-09-13 12:09:48 +00:00
"description": "OAuth access token.",
"type": "string"
2017-09-13 12:09:48 +00:00
},
"key": {
2017-09-21 15:48:45 +00:00
"location": "query",
2017-09-13 12:09:48 +00:00
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
2017-09-21 15:48:45 +00:00
"type": "string"
2017-09-13 12:09:48 +00:00
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
"type": "string",
"location": "query"
},
"pp": {
"default": "true",
2017-09-21 15:48:45 +00:00
"type": "boolean",
"location": "query",
"description": "Pretty-print response."
2017-09-21 15:48:45 +00:00
},
"bearer_token": {
"type": "string",
"location": "query",
"description": "OAuth bearer token."
},
"oauth_token": {
"location": "query",
"description": "OAuth 2.0 token for the current user.",
"type": "string"
2017-08-05 18:17:15 +00:00
}
},
"version": "v2",
"baseUrl": "https://translation.googleapis.com/language/translate/",
2017-09-13 12:09:48 +00:00
"kind": "discovery#restDescription",
"description": "The Google Cloud Translation API lets websites and programs integrate with\n Google Translate programmatically.",
"servicePath": "language/translate/"
2017-08-05 18:17:15 +00:00
}