Show / Hide Table of Contents

Class ProjectsResource

The "projects" collection of methods.

Inheritance
System.Object
ProjectsResource
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 ProjectsResource

Constructors

ProjectsResource(IClientService)

Constructs a new resource.

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

Properties

Locations

Gets the Locations resource.

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

Methods

DetectLanguage(DetectLanguageRequest, String)

Detects the language of text within a request.

Declaration
public virtual ProjectsResource.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.DetectLanguageRequest

GetSupportedLanguages(String)

Returns a list of supported languages for translation.

Declaration
public virtual ProjectsResource.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.GetSupportedLanguagesRequest

TranslateText(TranslateTextRequest, String)

Translates input text and returns translated text.

Declaration
public virtual ProjectsResource.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.TranslateTextRequest
In This Article
Back to top