Method: projects.locations.adaptiveMtDatasets.importAdaptiveMtFile

Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

HTTP request

POST https://translate.googleapis.com/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}:importAdaptiveMtFile

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The resource name of the file, in form of projects/{project-number-or-id}/locations/{locationId}/adaptiveMtDatasets/{dataset}

Request body

The request body contains data with the following structure:

JSON representation
{

  // Union field source can be only one of the following:
  "fileInputSource": {
    object (FileInputSource)
  },
  "gcsInputSource": {
    object (GcsInputSource)
  }
  // End of list of possible types for union field source.
}
Fields
Union field source. The source for the document. source can be only one of the following:
fileInputSource

object (FileInputSource)

Inline file source.

gcsInputSource

object (GcsInputSource)

Google Cloud Storage file source.

Response body

The response for importing an AdaptiveMtFile

If successful, the response body contains data with the following structure:

JSON representation
{
  "adaptiveMtFile": {
    object (AdaptiveMtFile)
  }
}
Fields
adaptiveMtFile

object (AdaptiveMtFile)

Output only. The Adaptive MT file that was imported.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-translation
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

FileInputSource

An inlined file.

JSON representation
{
  "mimeType": string,
  "content": string,
  "displayName": string
}
Fields
mimeType

string

Required. The file's mime type.

content

string (bytes format)

Required. The file's byte contents.

A base64-encoded string.

displayName

string

Required. The file's display name.