pub struct ProjectMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on project resources.
It is not used directly, but through the Translate hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_translate3 as translate3;
use translate3::{Translate, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = Translate::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `detect_language(...)`, `get_supported_languages(...)`, `locations_adaptive_mt_datasets_adaptive_mt_files_adaptive_mt_sentences_list(...)`, `locations_adaptive_mt_datasets_adaptive_mt_files_delete(...)`, `locations_adaptive_mt_datasets_adaptive_mt_files_get(...)`, `locations_adaptive_mt_datasets_adaptive_mt_files_list(...)`, `locations_adaptive_mt_datasets_adaptive_mt_sentences_list(...)`, `locations_adaptive_mt_datasets_create(...)`, `locations_adaptive_mt_datasets_delete(...)`, `locations_adaptive_mt_datasets_get(...)`, `locations_adaptive_mt_datasets_import_adaptive_mt_file(...)`, `locations_adaptive_mt_datasets_list(...)`, `locations_adaptive_mt_translate(...)`, `locations_batch_translate_document(...)`, `locations_batch_translate_text(...)`, `locations_datasets_create(...)`, `locations_datasets_delete(...)`, `locations_datasets_examples_list(...)`, `locations_datasets_export_data(...)`, `locations_datasets_get(...)`, `locations_datasets_import_data(...)`, `locations_datasets_list(...)`, `locations_detect_language(...)`, `locations_get(...)`, `locations_get_supported_languages(...)`, `locations_glossaries_create(...)`, `locations_glossaries_delete(...)`, `locations_glossaries_get(...)`, `locations_glossaries_glossary_entries_create(...)`, `locations_glossaries_glossary_entries_delete(...)`, `locations_glossaries_glossary_entries_get(...)`, `locations_glossaries_glossary_entries_list(...)`, `locations_glossaries_glossary_entries_patch(...)`, `locations_glossaries_list(...)`, `locations_glossaries_patch(...)`, `locations_list(...)`, `locations_models_create(...)`, `locations_models_delete(...)`, `locations_models_get(...)`, `locations_models_list(...)`, `locations_operations_cancel(...)`, `locations_operations_delete(...)`, `locations_operations_get(...)`, `locations_operations_list(...)`, `locations_operations_wait(...)`, `locations_romanize_text(...)`, `locations_translate_document(...)`, `locations_translate_text(...)`, `romanize_text(...)` and `translate_text(...)`
// to build up your call.
let rb = hub.projects();Implementations§
Source§impl<'a, C> ProjectMethods<'a, C>
impl<'a, C> ProjectMethods<'a, C>
Sourcepub fn locations_adaptive_mt_datasets_adaptive_mt_files_adaptive_mt_sentences_list(
&self,
parent: &str,
) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtFileAdaptiveMtSentenceListCall<'a, C>
pub fn locations_adaptive_mt_datasets_adaptive_mt_files_adaptive_mt_sentences_list( &self, parent: &str, ) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtFileAdaptiveMtSentenceListCall<'a, C>
Create a builder to help you perform the following task:
Lists all AdaptiveMtSentences under a given file/dataset.
§Arguments
parent- Required. The resource name of the project from which to list the Adaptive MT files. The following format lists all sentences under a file.projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}The following format lists all sentences within a dataset.projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}
Sourcepub fn locations_adaptive_mt_datasets_adaptive_mt_files_delete(
&self,
name: &str,
) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtFileDeleteCall<'a, C>
pub fn locations_adaptive_mt_datasets_adaptive_mt_files_delete( &self, name: &str, ) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtFileDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes an AdaptiveMtFile along with its sentences.
§Arguments
name- Required. The resource name of the file to delete, in form ofprojects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}
Sourcepub fn locations_adaptive_mt_datasets_adaptive_mt_files_get(
&self,
name: &str,
) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtFileGetCall<'a, C>
pub fn locations_adaptive_mt_datasets_adaptive_mt_files_get( &self, name: &str, ) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtFileGetCall<'a, C>
Create a builder to help you perform the following task:
Gets and AdaptiveMtFile
§Arguments
name- Required. The resource name of the file, in form ofprojects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}
Sourcepub fn locations_adaptive_mt_datasets_adaptive_mt_files_list(
&self,
parent: &str,
) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtFileListCall<'a, C>
pub fn locations_adaptive_mt_datasets_adaptive_mt_files_list( &self, parent: &str, ) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtFileListCall<'a, C>
Create a builder to help you perform the following task:
Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.
§Arguments
parent- Required. The resource name of the project from which to list the Adaptive MT files.projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}
Sourcepub fn locations_adaptive_mt_datasets_adaptive_mt_sentences_list(
&self,
parent: &str,
) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtSentenceListCall<'a, C>
pub fn locations_adaptive_mt_datasets_adaptive_mt_sentences_list( &self, parent: &str, ) -> ProjectLocationAdaptiveMtDatasetAdaptiveMtSentenceListCall<'a, C>
Create a builder to help you perform the following task:
Lists all AdaptiveMtSentences under a given file/dataset.
§Arguments
parent- Required. The resource name of the project from which to list the Adaptive MT files. The following format lists all sentences under a file.projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}The following format lists all sentences within a dataset.projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}
Sourcepub fn locations_adaptive_mt_datasets_create(
&self,
request: AdaptiveMtDataset,
parent: &str,
) -> ProjectLocationAdaptiveMtDatasetCreateCall<'a, C>
pub fn locations_adaptive_mt_datasets_create( &self, request: AdaptiveMtDataset, parent: &str, ) -> ProjectLocationAdaptiveMtDatasetCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates an Adaptive MT dataset.
§Arguments
request- No description provided.parent- Required. Name of the parent project. In form ofprojects/{project-number-or-id}/locations/{location-id}
Sourcepub fn locations_adaptive_mt_datasets_delete(
&self,
name: &str,
) -> ProjectLocationAdaptiveMtDatasetDeleteCall<'a, C>
pub fn locations_adaptive_mt_datasets_delete( &self, name: &str, ) -> ProjectLocationAdaptiveMtDatasetDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes an Adaptive MT dataset, including all its entries and associated metadata.
§Arguments
name- Required. Name of the dataset. In the form ofprojects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}
Sourcepub fn locations_adaptive_mt_datasets_get(
&self,
name: &str,
) -> ProjectLocationAdaptiveMtDatasetGetCall<'a, C>
pub fn locations_adaptive_mt_datasets_get( &self, name: &str, ) -> ProjectLocationAdaptiveMtDatasetGetCall<'a, C>
Create a builder to help you perform the following task:
Gets the Adaptive MT dataset.
§Arguments
name- Required. Name of the dataset. In the form ofprojects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}
Sourcepub fn locations_adaptive_mt_datasets_import_adaptive_mt_file(
&self,
request: ImportAdaptiveMtFileRequest,
parent: &str,
) -> ProjectLocationAdaptiveMtDatasetImportAdaptiveMtFileCall<'a, C>
pub fn locations_adaptive_mt_datasets_import_adaptive_mt_file( &self, request: ImportAdaptiveMtFileRequest, parent: &str, ) -> ProjectLocationAdaptiveMtDatasetImportAdaptiveMtFileCall<'a, C>
Create a builder to help you perform the following task:
Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.
§Arguments
request- No description provided.parent- Required. The resource name of the file, in form ofprojects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}
Sourcepub fn locations_adaptive_mt_datasets_list(
&self,
parent: &str,
) -> ProjectLocationAdaptiveMtDatasetListCall<'a, C>
pub fn locations_adaptive_mt_datasets_list( &self, parent: &str, ) -> ProjectLocationAdaptiveMtDatasetListCall<'a, C>
Create a builder to help you perform the following task:
Lists all Adaptive MT datasets for which the caller has read permission.
§Arguments
parent- Required. The resource name of the project from which to list the Adaptive MT datasets.projects/{project-number-or-id}/locations/{location-id}
Sourcepub fn locations_datasets_examples_list(
&self,
parent: &str,
) -> ProjectLocationDatasetExampleListCall<'a, C>
pub fn locations_datasets_examples_list( &self, parent: &str, ) -> ProjectLocationDatasetExampleListCall<'a, C>
Create a builder to help you perform the following task:
Lists sentence pairs in the dataset.
§Arguments
parent- Required. Name of the parent dataset. In form ofprojects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}
Sourcepub fn locations_datasets_create(
&self,
request: Dataset,
parent: &str,
) -> ProjectLocationDatasetCreateCall<'a, C>
pub fn locations_datasets_create( &self, request: Dataset, parent: &str, ) -> ProjectLocationDatasetCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a Dataset.
§Arguments
request- No description provided.parent- Required. The project name.
Sourcepub fn locations_datasets_delete(
&self,
name: &str,
) -> ProjectLocationDatasetDeleteCall<'a, C>
pub fn locations_datasets_delete( &self, name: &str, ) -> ProjectLocationDatasetDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a dataset and all of its contents.
§Arguments
name- Required. The name of the dataset to delete.
Sourcepub fn locations_datasets_export_data(
&self,
request: ExportDataRequest,
dataset: &str,
) -> ProjectLocationDatasetExportDataCall<'a, C>
pub fn locations_datasets_export_data( &self, request: ExportDataRequest, dataset: &str, ) -> ProjectLocationDatasetExportDataCall<'a, C>
Create a builder to help you perform the following task:
Exports dataset’s data to the provided output location.
§Arguments
request- No description provided.dataset- Required. Name of the dataset. In form ofprojects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}
Sourcepub fn locations_datasets_get(
&self,
name: &str,
) -> ProjectLocationDatasetGetCall<'a, C>
pub fn locations_datasets_get( &self, name: &str, ) -> ProjectLocationDatasetGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a Dataset.
§Arguments
name- Required. The resource name of the dataset to retrieve.
Sourcepub fn locations_datasets_import_data(
&self,
request: ImportDataRequest,
dataset: &str,
) -> ProjectLocationDatasetImportDataCall<'a, C>
pub fn locations_datasets_import_data( &self, request: ImportDataRequest, dataset: &str, ) -> ProjectLocationDatasetImportDataCall<'a, C>
Create a builder to help you perform the following task:
Import sentence pairs into translation Dataset.
§Arguments
request- No description provided.dataset- Required. Name of the dataset. In form ofprojects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}
Sourcepub fn locations_datasets_list(
&self,
parent: &str,
) -> ProjectLocationDatasetListCall<'a, C>
pub fn locations_datasets_list( &self, parent: &str, ) -> ProjectLocationDatasetListCall<'a, C>
Create a builder to help you perform the following task:
Lists datasets.
§Arguments
parent- Required. Name of the parent project. In form ofprojects/{project-number-or-id}/locations/{location-id}
Sourcepub fn locations_glossaries_glossary_entries_create(
&self,
request: GlossaryEntry,
parent: &str,
) -> ProjectLocationGlossaryGlossaryEntryCreateCall<'a, C>
pub fn locations_glossaries_glossary_entries_create( &self, request: GlossaryEntry, parent: &str, ) -> ProjectLocationGlossaryGlossaryEntryCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a glossary entry.
§Arguments
request- No description provided.parent- Required. The resource name of the glossary to create the entry under.
Sourcepub fn locations_glossaries_glossary_entries_delete(
&self,
name: &str,
) -> ProjectLocationGlossaryGlossaryEntryDeleteCall<'a, C>
pub fn locations_glossaries_glossary_entries_delete( &self, name: &str, ) -> ProjectLocationGlossaryGlossaryEntryDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a single entry from the glossary
§Arguments
name- Required. The resource name of the glossary entry to delete
Sourcepub fn locations_glossaries_glossary_entries_get(
&self,
name: &str,
) -> ProjectLocationGlossaryGlossaryEntryGetCall<'a, C>
pub fn locations_glossaries_glossary_entries_get( &self, name: &str, ) -> ProjectLocationGlossaryGlossaryEntryGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a single glossary entry by the given id.
§Arguments
name- Required. The resource name of the glossary entry to get
Sourcepub fn locations_glossaries_glossary_entries_list(
&self,
parent: &str,
) -> ProjectLocationGlossaryGlossaryEntryListCall<'a, C>
pub fn locations_glossaries_glossary_entries_list( &self, parent: &str, ) -> ProjectLocationGlossaryGlossaryEntryListCall<'a, C>
Create a builder to help you perform the following task:
List the entries for the glossary.
§Arguments
parent- Required. The parent glossary resource name for listing the glossary’s entries.
Sourcepub fn locations_glossaries_glossary_entries_patch(
&self,
request: GlossaryEntry,
name: &str,
) -> ProjectLocationGlossaryGlossaryEntryPatchCall<'a, C>
pub fn locations_glossaries_glossary_entries_patch( &self, request: GlossaryEntry, name: &str, ) -> ProjectLocationGlossaryGlossaryEntryPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates a glossary entry.
§Arguments
request- No description provided.name- Identifier. The resource name of the entry. Format:projects/*/locations/*/glossaries/*/glossaryEntries/*
Sourcepub fn locations_glossaries_create(
&self,
request: Glossary,
parent: &str,
) -> ProjectLocationGlossaryCreateCall<'a, C>
pub fn locations_glossaries_create( &self, request: Glossary, parent: &str, ) -> ProjectLocationGlossaryCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn’t exist.
§Arguments
request- No description provided.parent- Required. The project name.
Sourcepub fn locations_glossaries_delete(
&self,
name: &str,
) -> ProjectLocationGlossaryDeleteCall<'a, C>
pub fn locations_glossaries_delete( &self, name: &str, ) -> ProjectLocationGlossaryDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a glossary, or cancels glossary construction if the glossary isn’t created yet. Returns NOT_FOUND, if the glossary doesn’t exist.
§Arguments
name- Required. The name of the glossary to delete.
Sourcepub fn locations_glossaries_get(
&self,
name: &str,
) -> ProjectLocationGlossaryGetCall<'a, C>
pub fn locations_glossaries_get( &self, name: &str, ) -> ProjectLocationGlossaryGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a glossary. Returns NOT_FOUND, if the glossary doesn’t exist.
§Arguments
name- Required. The name of the glossary to retrieve.
Sourcepub fn locations_glossaries_list(
&self,
parent: &str,
) -> ProjectLocationGlossaryListCall<'a, C>
pub fn locations_glossaries_list( &self, parent: &str, ) -> ProjectLocationGlossaryListCall<'a, C>
Create a builder to help you perform the following task:
Lists glossaries in a project. Returns NOT_FOUND, if the project doesn’t exist.
§Arguments
parent- Required. The name of the project from which to list all of the glossaries.
Sourcepub fn locations_glossaries_patch(
&self,
request: Glossary,
name: &str,
) -> ProjectLocationGlossaryPatchCall<'a, C>
pub fn locations_glossaries_patch( &self, request: Glossary, name: &str, ) -> ProjectLocationGlossaryPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates a glossary. A LRO is used since the update can be async if the glossary’s entry file is updated.
§Arguments
request- No description provided.name- Required. The resource name of the glossary. Glossary names have the formprojects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}.
Sourcepub fn locations_models_create(
&self,
request: Model,
parent: &str,
) -> ProjectLocationModelCreateCall<'a, C>
pub fn locations_models_create( &self, request: Model, parent: &str, ) -> ProjectLocationModelCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a Model.
§Arguments
request- No description provided.parent- Required. The project name, in form ofprojects/{project}/locations/{location}
Sourcepub fn locations_models_delete(
&self,
name: &str,
) -> ProjectLocationModelDeleteCall<'a, C>
pub fn locations_models_delete( &self, name: &str, ) -> ProjectLocationModelDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a model.
§Arguments
name- Required. The name of the model to delete.
Sourcepub fn locations_models_get(
&self,
name: &str,
) -> ProjectLocationModelGetCall<'a, C>
pub fn locations_models_get( &self, name: &str, ) -> ProjectLocationModelGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a model.
§Arguments
name- Required. The resource name of the model to retrieve.
Sourcepub fn locations_models_list(
&self,
parent: &str,
) -> ProjectLocationModelListCall<'a, C>
pub fn locations_models_list( &self, parent: &str, ) -> ProjectLocationModelListCall<'a, C>
Create a builder to help you perform the following task:
Lists models.
§Arguments
parent- Required. Name of the parent project. In form ofprojects/{project-number-or-id}/locations/{location-id}
Sourcepub fn locations_operations_cancel(
&self,
request: CancelOperationRequest,
name: &str,
) -> ProjectLocationOperationCancelCall<'a, C>
pub fn locations_operations_cancel( &self, request: CancelOperationRequest, name: &str, ) -> ProjectLocationOperationCancelCall<'a, C>
Create a builder to help you perform the following task:
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
§Arguments
request- No description provided.name- The name of the operation resource to be cancelled.
Sourcepub fn locations_operations_delete(
&self,
name: &str,
) -> ProjectLocationOperationDeleteCall<'a, C>
pub fn locations_operations_delete( &self, name: &str, ) -> ProjectLocationOperationDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
§Arguments
name- The name of the operation resource to be deleted.
Sourcepub fn locations_operations_get(
&self,
name: &str,
) -> ProjectLocationOperationGetCall<'a, C>
pub fn locations_operations_get( &self, name: &str, ) -> ProjectLocationOperationGetCall<'a, C>
Create a builder to help you perform the following task:
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
§Arguments
name- The name of the operation resource.
Sourcepub fn locations_operations_list(
&self,
name: &str,
) -> ProjectLocationOperationListCall<'a, C>
pub fn locations_operations_list( &self, name: &str, ) -> ProjectLocationOperationListCall<'a, C>
Create a builder to help you perform the following task:
Lists operations that match the specified filter in the request. If the server doesn’t support this method, it returns UNIMPLEMENTED.
§Arguments
name- The name of the operation’s parent resource.
Sourcepub fn locations_operations_wait(
&self,
request: WaitOperationRequest,
name: &str,
) -> ProjectLocationOperationWaitCall<'a, C>
pub fn locations_operations_wait( &self, request: WaitOperationRequest, name: &str, ) -> ProjectLocationOperationWaitCall<'a, C>
Create a builder to help you perform the following task:
Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns google.rpc.Code.UNIMPLEMENTED. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.
§Arguments
request- No description provided.name- The name of the operation resource to wait on.
Sourcepub fn locations_adaptive_mt_translate(
&self,
request: AdaptiveMtTranslateRequest,
parent: &str,
) -> ProjectLocationAdaptiveMtTranslateCall<'a, C>
pub fn locations_adaptive_mt_translate( &self, request: AdaptiveMtTranslateRequest, parent: &str, ) -> ProjectLocationAdaptiveMtTranslateCall<'a, C>
Create a builder to help you perform the following task:
Translate text using Adaptive MT.
§Arguments
request- No description provided.parent- Required. Location to make a regional call. Format:projects/{project-number-or-id}/locations/{location-id}.
Sourcepub fn locations_batch_translate_document(
&self,
request: BatchTranslateDocumentRequest,
parent: &str,
) -> ProjectLocationBatchTranslateDocumentCall<'a, C>
pub fn locations_batch_translate_document( &self, request: BatchTranslateDocumentRequest, parent: &str, ) -> ProjectLocationBatchTranslateDocumentCall<'a, C>
Create a builder to help you perform the following task:
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.
§Arguments
request- No description provided.parent- Required. Location to make a regional call. Format:projects/{project-number-or-id}/locations/{location-id}. Thegloballocation 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.
Sourcepub fn locations_batch_translate_text(
&self,
request: BatchTranslateTextRequest,
parent: &str,
) -> ProjectLocationBatchTranslateTextCall<'a, C>
pub fn locations_batch_translate_text( &self, request: BatchTranslateTextRequest, parent: &str, ) -> ProjectLocationBatchTranslateTextCall<'a, C>
Create a builder to help you perform the following task:
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.
§Arguments
request- No description provided.parent- Required. Location to make a call. Must refer to a caller’s project. Format:projects/{project-number-or-id}/locations/{location-id}. Thegloballocation 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.
Sourcepub fn locations_detect_language(
&self,
request: DetectLanguageRequest,
parent: &str,
) -> ProjectLocationDetectLanguageCall<'a, C>
pub fn locations_detect_language( &self, request: DetectLanguageRequest, parent: &str, ) -> ProjectLocationDetectLanguageCall<'a, C>
Create a builder to help you perform the following task:
Detects the language of text within a request.
§Arguments
request- No description provided.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}orprojects/{project-number-or-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{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.
Sourcepub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C>
pub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C>
Create a builder to help you perform the following task:
Gets information about a location.
§Arguments
name- Resource name for the location.
Sourcepub fn locations_get_supported_languages(
&self,
parent: &str,
) -> ProjectLocationGetSupportedLanguageCall<'a, C>
pub fn locations_get_supported_languages( &self, parent: &str, ) -> ProjectLocationGetSupportedLanguageCall<'a, C>
Create a builder to help you perform the following task:
Returns a list of supported languages for translation.
§Arguments
parent- Required. Project or location to make a call. Must refer to a caller’s project. Format:projects/{project-number-or-id}orprojects/{project-number-or-id}/locations/{location-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{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.
Sourcepub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>
pub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>
Create a builder to help you perform the following task:
Lists information about the supported locations for this service.
§Arguments
name- The resource that owns the locations collection, if applicable.
Sourcepub fn locations_romanize_text(
&self,
request: RomanizeTextRequest,
parent: &str,
) -> ProjectLocationRomanizeTextCall<'a, C>
pub fn locations_romanize_text( &self, request: RomanizeTextRequest, parent: &str, ) -> ProjectLocationRomanizeTextCall<'a, C>
Create a builder to help you perform the following task:
Romanize input text written in non-Latin scripts to Latin text.
§Arguments
request- No description provided.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}orprojects/{project-number-or-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{project-number-or-id}.
Sourcepub fn locations_translate_document(
&self,
request: TranslateDocumentRequest,
parent: &str,
) -> ProjectLocationTranslateDocumentCall<'a, C>
pub fn locations_translate_document( &self, request: TranslateDocumentRequest, parent: &str, ) -> ProjectLocationTranslateDocumentCall<'a, C>
Create a builder to help you perform the following task:
Translates documents in synchronous mode.
§Arguments
request- No description provided.parent- Required. Location to make a regional call. Format:projects/{project-number-or-id}/locations/{location-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{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.
Sourcepub fn locations_translate_text(
&self,
request: TranslateTextRequest,
parent: &str,
) -> ProjectLocationTranslateTextCall<'a, C>
pub fn locations_translate_text( &self, request: TranslateTextRequest, parent: &str, ) -> ProjectLocationTranslateTextCall<'a, C>
Create a builder to help you perform the following task:
Translates input text and returns translated text.
§Arguments
request- No description provided.parent- Required. Project or location to make a call. Must refer to a caller’s project. Format:projects/{project-number-or-id}orprojects/{project-number-or-id}/locations/{location-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{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.
Sourcepub fn detect_language(
&self,
request: DetectLanguageRequest,
parent: &str,
) -> ProjectDetectLanguageCall<'a, C>
pub fn detect_language( &self, request: DetectLanguageRequest, parent: &str, ) -> ProjectDetectLanguageCall<'a, C>
Create a builder to help you perform the following task:
Detects the language of text within a request.
§Arguments
request- No description provided.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}orprojects/{project-number-or-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{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.
Sourcepub fn get_supported_languages(
&self,
parent: &str,
) -> ProjectGetSupportedLanguageCall<'a, C>
pub fn get_supported_languages( &self, parent: &str, ) -> ProjectGetSupportedLanguageCall<'a, C>
Create a builder to help you perform the following task:
Returns a list of supported languages for translation.
§Arguments
parent- Required. Project or location to make a call. Must refer to a caller’s project. Format:projects/{project-number-or-id}orprojects/{project-number-or-id}/locations/{location-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{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.
Sourcepub fn romanize_text(
&self,
request: RomanizeTextRequest,
parent: &str,
) -> ProjectRomanizeTextCall<'a, C>
pub fn romanize_text( &self, request: RomanizeTextRequest, parent: &str, ) -> ProjectRomanizeTextCall<'a, C>
Create a builder to help you perform the following task:
Romanize input text written in non-Latin scripts to Latin text.
§Arguments
request- No description provided.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}orprojects/{project-number-or-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{project-number-or-id}.
Sourcepub fn translate_text(
&self,
request: TranslateTextRequest,
parent: &str,
) -> ProjectTranslateTextCall<'a, C>
pub fn translate_text( &self, request: TranslateTextRequest, parent: &str, ) -> ProjectTranslateTextCall<'a, C>
Create a builder to help you perform the following task:
Translates input text and returns translated text.
§Arguments
request- No description provided.parent- Required. Project or location to make a call. Must refer to a caller’s project. Format:projects/{project-number-or-id}orprojects/{project-number-or-id}/locations/{location-id}. For global calls, useprojects/{project-number-or-id}/locations/globalorprojects/{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.