Show / Hide Table of Contents

Class ProjectsResource.LocationsResource

The "locations" collection of methods.

Inheritance
System.Object
ProjectsResource.LocationsResource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.Translate.v3
Assembly: Google.Apis.Translate.v3.dll
Syntax
public class LocationsResource

Constructors

LocationsResource(IClientService)

Constructs a new resource.

Declaration
public LocationsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Properties

Glossaries

Gets the Glossaries resource.

Declaration
public virtual ProjectsResource.LocationsResource.GlossariesResource Glossaries { get; }
Property Value
Type Description
ProjectsResource.LocationsResource.GlossariesResource

Operations

Gets the Operations resource.

Declaration
public virtual ProjectsResource.LocationsResource.OperationsResource Operations { get; }
Property Value
Type Description
ProjectsResource.LocationsResource.OperationsResource

Methods

BatchTranslateDocument(BatchTranslateDocumentRequest, String)

Translates a large volume of document in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.

Declaration
public virtual ProjectsResource.LocationsResource.BatchTranslateDocumentRequest BatchTranslateDocument(BatchTranslateDocumentRequest body, string parent)
Parameters
Type Name Description
BatchTranslateDocumentRequest body

The body of the request.

System.String parent

Required. Location to make a regional call. Format: projects/{project-number-or-id}/locations/{location-id}. The global location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.

Returns
Type Description
ProjectsResource.LocationsResource.BatchTranslateDocumentRequest

BatchTranslateText(BatchTranslateTextRequest, String)

Translates a large volume of text in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.

Declaration
public virtual ProjectsResource.LocationsResource.BatchTranslateTextRequest BatchTranslateText(BatchTranslateTextRequest body, string parent)
Parameters
Type Name Description
BatchTranslateTextRequest body

The body of the request.

System.String parent

Required. Location to make a call. Must refer to a caller's project. Format: projects/{project-number-or-id}/locations/{location-id}. The global location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.

Returns
Type Description
ProjectsResource.LocationsResource.BatchTranslateTextRequest

DetectLanguage(DetectLanguageRequest, String)

Detects the language of text within a request.

Declaration
public virtual ProjectsResource.LocationsResource.DetectLanguageRequest DetectLanguage(DetectLanguageRequest body, string parent)
Parameters
Type Name Description
DetectLanguageRequest body

The body of the request.

System.String parent

Required. Project or location to make a call. Must refer to a caller's project. Format: projects/{project-number-or-id}/locations/{location-id} or projects/{project-number-or-id}. For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}. Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.

Returns
Type Description
ProjectsResource.LocationsResource.DetectLanguageRequest

Get(String)

Gets information about a location.

Declaration
public virtual ProjectsResource.LocationsResource.GetRequest Get(string name)
Parameters
Type Name Description
System.String name

Resource name for the location.

Returns
Type Description
ProjectsResource.LocationsResource.GetRequest

GetSupportedLanguages(String)

Returns a list of supported languages for translation.

Declaration
public virtual ProjectsResource.LocationsResource.GetSupportedLanguagesRequest GetSupportedLanguages(string parent)
Parameters
Type Name Description
System.String parent

Required. Project or location to make a call. Must refer to a caller's project. Format: projects/{project-number-or-id} or projects/{project-number-or-id}/locations/{location-id}. For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}. Non-global location is required for AutoML models. Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.

Returns
Type Description
ProjectsResource.LocationsResource.GetSupportedLanguagesRequest

List(String)

Lists information about the supported locations for this service.

Declaration
public virtual ProjectsResource.LocationsResource.ListRequest List(string name)
Parameters
Type Name Description
System.String name

The resource that owns the locations collection, if applicable.

Returns
Type Description
ProjectsResource.LocationsResource.ListRequest

TranslateDocument(TranslateDocumentRequest, String)

Translates documents in synchronous mode.

Declaration
public virtual ProjectsResource.LocationsResource.TranslateDocumentRequest TranslateDocument(TranslateDocumentRequest body, string parent)
Parameters
Type Name Description
TranslateDocumentRequest body

The body of the request.

System.String parent

Required. Location to make a regional call. Format: projects/{project-number-or-id}/locations/{location-id}. For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.

Returns
Type Description
ProjectsResource.LocationsResource.TranslateDocumentRequest

TranslateText(TranslateTextRequest, String)

Translates input text and returns translated text.

Declaration
public virtual ProjectsResource.LocationsResource.TranslateTextRequest TranslateText(TranslateTextRequest body, string parent)
Parameters
Type Name Description
TranslateTextRequest body

The body of the request.

System.String parent

Required. Project or location to make a call. Must refer to a caller's project. Format: projects/{project-number-or-id} or projects/{project-number-or-id}/locations/{location-id}. For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.

Returns
Type Description
ProjectsResource.LocationsResource.TranslateTextRequest
In This Article
Back to top