Show / Hide Table of Contents

Class TranslateTextRequest

The request message for synchronous translation.

Inheritance
object
TranslateTextRequest
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Translate.v3.Data
Assembly: Google.Apis.Translate.v3.dll
Syntax
public class TranslateTextRequest : IDirectResponseSchema

Properties

Contents

Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.

Declaration
[JsonProperty("contents")]
public virtual IList<string> Contents { get; set; }
Property Value
Type Description
IList<string>

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

GlossaryConfig

Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.

Declaration
[JsonProperty("glossaryConfig")]
public virtual TranslateTextGlossaryConfig GlossaryConfig { get; set; }
Property Value
Type Description
TranslateTextGlossaryConfig

Labels

Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.

Declaration
[JsonProperty("labels")]
public virtual IDictionary<string, string> Labels { get; set; }
Property Value
Type Description
IDictionary<string, string>

MimeType

Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".

Declaration
[JsonProperty("mimeType")]
public virtual string MimeType { get; set; }
Property Value
Type Description
string

Model

Optional. The model type requested for this translation. The format depends on model type: - AutoML Translation models: projects/{project-number-or-id}/locations/{location-id}/models/{model-id} - General (built-in) models: projects/{project-number-or-id}/locations/{location-id}/models/general/nmt, - Translation LLM models: projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm, For global (non-regionalized) requests, use location-id global. For example, projects/{project-number-or-id}/locations/global/models/general/nmt. If not provided, the default Google model (NMT) will be used

Declaration
[JsonProperty("model")]
public virtual string Model { get; set; }
Property Value
Type Description
string

SourceLanguageCode

Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.

Declaration
[JsonProperty("sourceLanguageCode")]
public virtual string SourceLanguageCode { get; set; }
Property Value
Type Description
string

TargetLanguageCode

Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support.

Declaration
[JsonProperty("targetLanguageCode")]
public virtual string TargetLanguageCode { get; set; }
Property Value
Type Description
string

TransliterationConfig

Optional. Transliteration to be applied.

Declaration
[JsonProperty("transliterationConfig")]
public virtual TransliterationConfig TransliterationConfig { get; set; }
Property Value
Type Description
TransliterationConfig

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX