translate
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package translate provides access to the Cloud Translation API.
This package is DEPRECATED. Use package cloud.google.com/go/translate instead.
For product documentation, see:https://cloud.google.com/translate/docs/quickstarts
Library status¶
These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.
When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.
Creating a client¶
Usage example:
import "google.golang.org/api/translate/v3"...ctx := context.Background()translateService, err := translate.NewService(ctx)
In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
By default, all available scopes (see "Constants") are used to authenticate.To restrict scopes, usegoogle.golang.org/api/option.WithScopes:
translateService, err := translate.NewService(ctx, option.WithScopes(translate.CloudTranslationScope))
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
translateService, err := translate.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)translateService, err := translate.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- Constants
- type AdaptiveMtDataset
- type AdaptiveMtFile
- type AdaptiveMtSentence
- type AdaptiveMtTranslateRequest
- type AdaptiveMtTranslateResponse
- type AdaptiveMtTranslation
- type BatchDocumentInputConfig
- type BatchDocumentOutputConfig
- type BatchTranslateDocumentRequest
- type BatchTranslateTextRequest
- type CancelOperationRequest
- type Dataset
- type DatasetInputConfig
- type DatasetOutputConfig
- type DetectLanguageRequest
- type DetectLanguageResponse
- type DetectedLanguage
- type DocumentInputConfig
- type DocumentOutputConfig
- type DocumentTranslation
- type Empty
- type Example
- type ExportDataRequest
- type FileInputSource
- type GcsDestination
- type GcsInputSource
- type GcsOutputDestination
- type GcsSource
- type Glossary
- type GlossaryConfig
- type GlossaryEntry
- type GlossaryInputConfig
- type GlossaryTerm
- type GlossaryTermsPair
- type GlossaryTermsSet
- type ImportAdaptiveMtFileRequest
- type ImportAdaptiveMtFileResponse
- type ImportDataRequest
- type InputConfig
- type InputFile
- type LanguageCodePair
- type LanguageCodesSet
- type ListAdaptiveMtDatasetsResponse
- type ListAdaptiveMtFilesResponse
- type ListAdaptiveMtSentencesResponse
- type ListDatasetsResponse
- type ListExamplesResponse
- type ListGlossariesResponse
- type ListGlossaryEntriesResponse
- type ListLocationsResponse
- type ListModelsResponse
- type ListOperationsResponse
- type Location
- type Model
- type Operation
- type OutputConfig
- type ProjectsDetectLanguageCall
- func (c *ProjectsDetectLanguageCall) Context(ctx context.Context) *ProjectsDetectLanguageCall
- func (c *ProjectsDetectLanguageCall) Do(opts ...googleapi.CallOption) (*DetectLanguageResponse, error)
- func (c *ProjectsDetectLanguageCall) Fields(s ...googleapi.Field) *ProjectsDetectLanguageCall
- func (c *ProjectsDetectLanguageCall) Header() http.Header
- type ProjectsGetSupportedLanguagesCall
- func (c *ProjectsGetSupportedLanguagesCall) Context(ctx context.Context) *ProjectsGetSupportedLanguagesCall
- func (c *ProjectsGetSupportedLanguagesCall) DisplayLanguageCode(displayLanguageCode string) *ProjectsGetSupportedLanguagesCall
- func (c *ProjectsGetSupportedLanguagesCall) Do(opts ...googleapi.CallOption) (*SupportedLanguages, error)
- func (c *ProjectsGetSupportedLanguagesCall) Fields(s ...googleapi.Field) *ProjectsGetSupportedLanguagesCall
- func (c *ProjectsGetSupportedLanguagesCall) Header() http.Header
- func (c *ProjectsGetSupportedLanguagesCall) IfNoneMatch(entityTag string) *ProjectsGetSupportedLanguagesCall
- func (c *ProjectsGetSupportedLanguagesCall) Model(model string) *ProjectsGetSupportedLanguagesCall
- type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtSentencesResponse, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Header() http.Header
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) PageSize(pageSize int64) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) PageToken(pageToken string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Pages(ctx context.Context, f func(*ListAdaptiveMtSentencesResponse) error) error
- type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService
- type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Header() http.Header
- type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtFile, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Header() http.Header
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall
- type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtFilesResponse, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Header() http.Header
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) PageSize(pageSize int64) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) PageToken(pageToken string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Pages(ctx context.Context, f func(*ListAdaptiveMtFilesResponse) error) error
- type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService
- func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService) Delete(name string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall
- func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService) Get(name string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall
- func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService) List(parent string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
- type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtSentencesResponse, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Header() http.Header
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) PageSize(pageSize int64) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) PageToken(pageToken string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Pages(ctx context.Context, f func(*ListAdaptiveMtSentencesResponse) error) error
- type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService
- type ProjectsLocationsAdaptiveMtDatasetsCreateCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsCreateCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtDataset, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsCreateCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Header() http.Header
- type ProjectsLocationsAdaptiveMtDatasetsDeleteCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsDeleteCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsDeleteCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Header() http.Header
- type ProjectsLocationsAdaptiveMtDatasetsGetCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsGetCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtDataset, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsGetCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) Header() http.Header
- func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsGetCall
- type ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Do(opts ...googleapi.CallOption) (*ImportAdaptiveMtFileResponse, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Header() http.Header
- type ProjectsLocationsAdaptiveMtDatasetsListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtDatasetsResponse, error)
- func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Filter(filter string) *ProjectsLocationsAdaptiveMtDatasetsListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Header() http.Header
- func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsAdaptiveMtDatasetsListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsAdaptiveMtDatasetsListCall
- func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Pages(ctx context.Context, f func(*ListAdaptiveMtDatasetsResponse) error) error
- type ProjectsLocationsAdaptiveMtDatasetsService
- func (r *ProjectsLocationsAdaptiveMtDatasetsService) Create(parent string, adaptivemtdataset *AdaptiveMtDataset) *ProjectsLocationsAdaptiveMtDatasetsCreateCall
- func (r *ProjectsLocationsAdaptiveMtDatasetsService) Delete(name string) *ProjectsLocationsAdaptiveMtDatasetsDeleteCall
- func (r *ProjectsLocationsAdaptiveMtDatasetsService) Get(name string) *ProjectsLocationsAdaptiveMtDatasetsGetCall
- func (r *ProjectsLocationsAdaptiveMtDatasetsService) ImportAdaptiveMtFile(parent string, importadaptivemtfilerequest *ImportAdaptiveMtFileRequest) *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall
- func (r *ProjectsLocationsAdaptiveMtDatasetsService) List(parent string) *ProjectsLocationsAdaptiveMtDatasetsListCall
- type ProjectsLocationsAdaptiveMtTranslateCall
- func (c *ProjectsLocationsAdaptiveMtTranslateCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtTranslateCall
- func (c *ProjectsLocationsAdaptiveMtTranslateCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtTranslateResponse, error)
- func (c *ProjectsLocationsAdaptiveMtTranslateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtTranslateCall
- func (c *ProjectsLocationsAdaptiveMtTranslateCall) Header() http.Header
- type ProjectsLocationsBatchTranslateDocumentCall
- func (c *ProjectsLocationsBatchTranslateDocumentCall) Context(ctx context.Context) *ProjectsLocationsBatchTranslateDocumentCall
- func (c *ProjectsLocationsBatchTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsBatchTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateDocumentCall
- func (c *ProjectsLocationsBatchTranslateDocumentCall) Header() http.Header
- type ProjectsLocationsBatchTranslateTextCall
- func (c *ProjectsLocationsBatchTranslateTextCall) Context(ctx context.Context) *ProjectsLocationsBatchTranslateTextCall
- func (c *ProjectsLocationsBatchTranslateTextCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsBatchTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateTextCall
- func (c *ProjectsLocationsBatchTranslateTextCall) Header() http.Header
- type ProjectsLocationsDatasetsCreateCall
- func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall
- func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall
- func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header
- type ProjectsLocationsDatasetsDeleteCall
- func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall
- func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall
- func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header
- type ProjectsLocationsDatasetsExamplesListCall
- func (c *ProjectsLocationsDatasetsExamplesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsExamplesListCall
- func (c *ProjectsLocationsDatasetsExamplesListCall) Do(opts ...googleapi.CallOption) (*ListExamplesResponse, error)
- func (c *ProjectsLocationsDatasetsExamplesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsExamplesListCall
- func (c *ProjectsLocationsDatasetsExamplesListCall) Filter(filter string) *ProjectsLocationsDatasetsExamplesListCall
- func (c *ProjectsLocationsDatasetsExamplesListCall) Header() http.Header
- func (c *ProjectsLocationsDatasetsExamplesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsExamplesListCall
- func (c *ProjectsLocationsDatasetsExamplesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsExamplesListCall
- func (c *ProjectsLocationsDatasetsExamplesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsExamplesListCall
- func (c *ProjectsLocationsDatasetsExamplesListCall) Pages(ctx context.Context, f func(*ListExamplesResponse) error) error
- type ProjectsLocationsDatasetsExamplesService
- type ProjectsLocationsDatasetsExportDataCall
- func (c *ProjectsLocationsDatasetsExportDataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsExportDataCall
- func (c *ProjectsLocationsDatasetsExportDataCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsDatasetsExportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsExportDataCall
- func (c *ProjectsLocationsDatasetsExportDataCall) Header() http.Header
- type ProjectsLocationsDatasetsGetCall
- func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall
- func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error)
- func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall
- func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header
- func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall
- type ProjectsLocationsDatasetsImportDataCall
- func (c *ProjectsLocationsDatasetsImportDataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsImportDataCall
- func (c *ProjectsLocationsDatasetsImportDataCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsDatasetsImportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsImportDataCall
- func (c *ProjectsLocationsDatasetsImportDataCall) Header() http.Header
- type ProjectsLocationsDatasetsListCall
- func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall
- func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error)
- func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall
- func (c *ProjectsLocationsDatasetsListCall) Header() http.Header
- func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall
- func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall
- func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall
- func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error
- type ProjectsLocationsDatasetsService
- func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Dataset) *ProjectsLocationsDatasetsCreateCall
- func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall
- func (r *ProjectsLocationsDatasetsService) ExportData(dataset string, exportdatarequest *ExportDataRequest) *ProjectsLocationsDatasetsExportDataCall
- func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall
- func (r *ProjectsLocationsDatasetsService) ImportData(dataset string, importdatarequest *ImportDataRequest) *ProjectsLocationsDatasetsImportDataCall
- func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall
- type ProjectsLocationsDetectLanguageCall
- func (c *ProjectsLocationsDetectLanguageCall) Context(ctx context.Context) *ProjectsLocationsDetectLanguageCall
- func (c *ProjectsLocationsDetectLanguageCall) Do(opts ...googleapi.CallOption) (*DetectLanguageResponse, error)
- func (c *ProjectsLocationsDetectLanguageCall) Fields(s ...googleapi.Field) *ProjectsLocationsDetectLanguageCall
- func (c *ProjectsLocationsDetectLanguageCall) Header() http.Header
- type ProjectsLocationsGetCall
- func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall
- func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error)
- func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall
- func (c *ProjectsLocationsGetCall) Header() http.Header
- func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall
- type ProjectsLocationsGetSupportedLanguagesCall
- func (c *ProjectsLocationsGetSupportedLanguagesCall) Context(ctx context.Context) *ProjectsLocationsGetSupportedLanguagesCall
- func (c *ProjectsLocationsGetSupportedLanguagesCall) DisplayLanguageCode(displayLanguageCode string) *ProjectsLocationsGetSupportedLanguagesCall
- func (c *ProjectsLocationsGetSupportedLanguagesCall) Do(opts ...googleapi.CallOption) (*SupportedLanguages, error)
- func (c *ProjectsLocationsGetSupportedLanguagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetSupportedLanguagesCall
- func (c *ProjectsLocationsGetSupportedLanguagesCall) Header() http.Header
- func (c *ProjectsLocationsGetSupportedLanguagesCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetSupportedLanguagesCall
- func (c *ProjectsLocationsGetSupportedLanguagesCall) Model(model string) *ProjectsLocationsGetSupportedLanguagesCall
- type ProjectsLocationsGlossariesCreateCall
- func (c *ProjectsLocationsGlossariesCreateCall) Context(ctx context.Context) *ProjectsLocationsGlossariesCreateCall
- func (c *ProjectsLocationsGlossariesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsGlossariesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesCreateCall
- func (c *ProjectsLocationsGlossariesCreateCall) Header() http.Header
- type ProjectsLocationsGlossariesDeleteCall
- func (c *ProjectsLocationsGlossariesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlossariesDeleteCall
- func (c *ProjectsLocationsGlossariesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsGlossariesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesDeleteCall
- func (c *ProjectsLocationsGlossariesDeleteCall) Header() http.Header
- type ProjectsLocationsGlossariesGetCall
- func (c *ProjectsLocationsGlossariesGetCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGetCall
- func (c *ProjectsLocationsGlossariesGetCall) Do(opts ...googleapi.CallOption) (*Glossary, error)
- func (c *ProjectsLocationsGlossariesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGetCall
- func (c *ProjectsLocationsGlossariesGetCall) Header() http.Header
- func (c *ProjectsLocationsGlossariesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesGetCall
- type ProjectsLocationsGlossariesGlossaryEntriesCreateCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesCreateCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGlossaryEntriesCreateCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GlossaryEntry, error)
- func (c *ProjectsLocationsGlossariesGlossaryEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesCreateCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesCreateCall) Header() http.Header
- type ProjectsLocationsGlossariesGlossaryEntriesDeleteCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall) Header() http.Header
- type ProjectsLocationsGlossariesGlossaryEntriesGetCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGlossaryEntriesGetCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) Do(opts ...googleapi.CallOption) (*GlossaryEntry, error)
- func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesGetCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) Header() http.Header
- func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesGlossaryEntriesGetCall
- type ProjectsLocationsGlossariesGlossaryEntriesListCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGlossaryEntriesListCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Do(opts ...googleapi.CallOption) (*ListGlossaryEntriesResponse, error)
- func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesListCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Header() http.Header
- func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesGlossaryEntriesListCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsGlossariesGlossaryEntriesListCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) PageToken(pageToken string) *ProjectsLocationsGlossariesGlossaryEntriesListCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Pages(ctx context.Context, f func(*ListGlossaryEntriesResponse) error) error
- type ProjectsLocationsGlossariesGlossaryEntriesPatchCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesPatchCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGlossaryEntriesPatchCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesPatchCall) Do(opts ...googleapi.CallOption) (*GlossaryEntry, error)
- func (c *ProjectsLocationsGlossariesGlossaryEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesPatchCall
- func (c *ProjectsLocationsGlossariesGlossaryEntriesPatchCall) Header() http.Header
- type ProjectsLocationsGlossariesGlossaryEntriesService
- func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Create(parent string, glossaryentry *GlossaryEntry) *ProjectsLocationsGlossariesGlossaryEntriesCreateCall
- func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Delete(name string) *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall
- func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Get(name string) *ProjectsLocationsGlossariesGlossaryEntriesGetCall
- func (r *ProjectsLocationsGlossariesGlossaryEntriesService) List(parent string) *ProjectsLocationsGlossariesGlossaryEntriesListCall
- func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Patch(name string, glossaryentry *GlossaryEntry) *ProjectsLocationsGlossariesGlossaryEntriesPatchCall
- type ProjectsLocationsGlossariesListCall
- func (c *ProjectsLocationsGlossariesListCall) Context(ctx context.Context) *ProjectsLocationsGlossariesListCall
- func (c *ProjectsLocationsGlossariesListCall) Do(opts ...googleapi.CallOption) (*ListGlossariesResponse, error)
- func (c *ProjectsLocationsGlossariesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesListCall
- func (c *ProjectsLocationsGlossariesListCall) Filter(filter string) *ProjectsLocationsGlossariesListCall
- func (c *ProjectsLocationsGlossariesListCall) Header() http.Header
- func (c *ProjectsLocationsGlossariesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesListCall
- func (c *ProjectsLocationsGlossariesListCall) PageSize(pageSize int64) *ProjectsLocationsGlossariesListCall
- func (c *ProjectsLocationsGlossariesListCall) PageToken(pageToken string) *ProjectsLocationsGlossariesListCall
- func (c *ProjectsLocationsGlossariesListCall) Pages(ctx context.Context, f func(*ListGlossariesResponse) error) error
- type ProjectsLocationsGlossariesPatchCall
- func (c *ProjectsLocationsGlossariesPatchCall) Context(ctx context.Context) *ProjectsLocationsGlossariesPatchCall
- func (c *ProjectsLocationsGlossariesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsGlossariesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesPatchCall
- func (c *ProjectsLocationsGlossariesPatchCall) Header() http.Header
- func (c *ProjectsLocationsGlossariesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlossariesPatchCall
- type ProjectsLocationsGlossariesService
- func (r *ProjectsLocationsGlossariesService) Create(parent string, glossary *Glossary) *ProjectsLocationsGlossariesCreateCall
- func (r *ProjectsLocationsGlossariesService) Delete(name string) *ProjectsLocationsGlossariesDeleteCall
- func (r *ProjectsLocationsGlossariesService) Get(name string) *ProjectsLocationsGlossariesGetCall
- func (r *ProjectsLocationsGlossariesService) List(parent string) *ProjectsLocationsGlossariesListCall
- func (r *ProjectsLocationsGlossariesService) Patch(name string, glossary *Glossary) *ProjectsLocationsGlossariesPatchCall
- type ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error)
- func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Header() http.Header
- func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error
- type ProjectsLocationsModelsCreateCall
- func (c *ProjectsLocationsModelsCreateCall) Context(ctx context.Context) *ProjectsLocationsModelsCreateCall
- func (c *ProjectsLocationsModelsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsModelsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsCreateCall
- func (c *ProjectsLocationsModelsCreateCall) Header() http.Header
- type ProjectsLocationsModelsDeleteCall
- func (c *ProjectsLocationsModelsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsDeleteCall
- func (c *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteCall
- func (c *ProjectsLocationsModelsDeleteCall) Header() http.Header
- type ProjectsLocationsModelsGetCall
- func (c *ProjectsLocationsModelsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsGetCall
- func (c *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*Model, error)
- func (c *ProjectsLocationsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetCall
- func (c *ProjectsLocationsModelsGetCall) Header() http.Header
- func (c *ProjectsLocationsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsGetCall
- type ProjectsLocationsModelsListCall
- func (c *ProjectsLocationsModelsListCall) Context(ctx context.Context) *ProjectsLocationsModelsListCall
- func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*ListModelsResponse, error)
- func (c *ProjectsLocationsModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListCall
- func (c *ProjectsLocationsModelsListCall) Filter(filter string) *ProjectsLocationsModelsListCall
- func (c *ProjectsLocationsModelsListCall) Header() http.Header
- func (c *ProjectsLocationsModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListCall
- func (c *ProjectsLocationsModelsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsListCall
- func (c *ProjectsLocationsModelsListCall) PageToken(pageToken string) *ProjectsLocationsModelsListCall
- func (c *ProjectsLocationsModelsListCall) Pages(ctx context.Context, f func(*ListModelsResponse) error) error
- type ProjectsLocationsModelsService
- func (r *ProjectsLocationsModelsService) Create(parent string, model *Model) *ProjectsLocationsModelsCreateCall
- func (r *ProjectsLocationsModelsService) Delete(name string) *ProjectsLocationsModelsDeleteCall
- func (r *ProjectsLocationsModelsService) Get(name string) *ProjectsLocationsModelsGetCall
- func (r *ProjectsLocationsModelsService) List(parent string) *ProjectsLocationsModelsListCall
- type ProjectsLocationsOperationsCancelCall
- func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall
- func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall
- func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header
- type ProjectsLocationsOperationsDeleteCall
- func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall
- func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall
- func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header
- type ProjectsLocationsOperationsGetCall
- func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall
- func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall
- func (c *ProjectsLocationsOperationsGetCall) Header() http.Header
- func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall
- type ProjectsLocationsOperationsListCall
- func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall
- func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error)
- func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall
- func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall
- func (c *ProjectsLocationsOperationsListCall) Header() http.Header
- func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall
- func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall
- func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall
- func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error
- type ProjectsLocationsOperationsService
- func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall
- func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall
- func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall
- func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall
- func (r *ProjectsLocationsOperationsService) Wait(name string, waitoperationrequest *WaitOperationRequest) *ProjectsLocationsOperationsWaitCall
- type ProjectsLocationsOperationsWaitCall
- func (c *ProjectsLocationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsOperationsWaitCall
- func (c *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *ProjectsLocationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsWaitCall
- func (c *ProjectsLocationsOperationsWaitCall) Header() http.Header
- type ProjectsLocationsRomanizeTextCall
- func (c *ProjectsLocationsRomanizeTextCall) Context(ctx context.Context) *ProjectsLocationsRomanizeTextCall
- func (c *ProjectsLocationsRomanizeTextCall) Do(opts ...googleapi.CallOption) (*RomanizeTextResponse, error)
- func (c *ProjectsLocationsRomanizeTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsRomanizeTextCall
- func (c *ProjectsLocationsRomanizeTextCall) Header() http.Header
- type ProjectsLocationsService
- func (r *ProjectsLocationsService) AdaptiveMtTranslate(parent string, adaptivemttranslaterequest *AdaptiveMtTranslateRequest) *ProjectsLocationsAdaptiveMtTranslateCall
- func (r *ProjectsLocationsService) BatchTranslateDocument(parent string, batchtranslatedocumentrequest *BatchTranslateDocumentRequest) *ProjectsLocationsBatchTranslateDocumentCall
- func (r *ProjectsLocationsService) BatchTranslateText(parent string, batchtranslatetextrequest *BatchTranslateTextRequest) *ProjectsLocationsBatchTranslateTextCall
- func (r *ProjectsLocationsService) DetectLanguage(parent string, detectlanguagerequest *DetectLanguageRequest) *ProjectsLocationsDetectLanguageCall
- func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall
- func (r *ProjectsLocationsService) GetSupportedLanguages(parent string) *ProjectsLocationsGetSupportedLanguagesCall
- func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall
- func (r *ProjectsLocationsService) RomanizeText(parent string, romanizetextrequest *RomanizeTextRequest) *ProjectsLocationsRomanizeTextCall
- func (r *ProjectsLocationsService) TranslateDocument(parent string, translatedocumentrequest *TranslateDocumentRequest) *ProjectsLocationsTranslateDocumentCall
- func (r *ProjectsLocationsService) TranslateText(parent string, translatetextrequest *TranslateTextRequest) *ProjectsLocationsTranslateTextCall
- type ProjectsLocationsTranslateDocumentCall
- func (c *ProjectsLocationsTranslateDocumentCall) Context(ctx context.Context) *ProjectsLocationsTranslateDocumentCall
- func (c *ProjectsLocationsTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*TranslateDocumentResponse, error)
- func (c *ProjectsLocationsTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateDocumentCall
- func (c *ProjectsLocationsTranslateDocumentCall) Header() http.Header
- type ProjectsLocationsTranslateTextCall
- func (c *ProjectsLocationsTranslateTextCall) Context(ctx context.Context) *ProjectsLocationsTranslateTextCall
- func (c *ProjectsLocationsTranslateTextCall) Do(opts ...googleapi.CallOption) (*TranslateTextResponse, error)
- func (c *ProjectsLocationsTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateTextCall
- func (c *ProjectsLocationsTranslateTextCall) Header() http.Header
- type ProjectsRomanizeTextCall
- func (c *ProjectsRomanizeTextCall) Context(ctx context.Context) *ProjectsRomanizeTextCall
- func (c *ProjectsRomanizeTextCall) Do(opts ...googleapi.CallOption) (*RomanizeTextResponse, error)
- func (c *ProjectsRomanizeTextCall) Fields(s ...googleapi.Field) *ProjectsRomanizeTextCall
- func (c *ProjectsRomanizeTextCall) Header() http.Header
- type ProjectsService
- func (r *ProjectsService) DetectLanguage(parent string, detectlanguagerequest *DetectLanguageRequest) *ProjectsDetectLanguageCall
- func (r *ProjectsService) GetSupportedLanguages(parent string) *ProjectsGetSupportedLanguagesCall
- func (r *ProjectsService) RomanizeText(parent string, romanizetextrequest *RomanizeTextRequest) *ProjectsRomanizeTextCall
- func (r *ProjectsService) TranslateText(parent string, translatetextrequest *TranslateTextRequest) *ProjectsTranslateTextCall
- type ProjectsTranslateTextCall
- func (c *ProjectsTranslateTextCall) Context(ctx context.Context) *ProjectsTranslateTextCall
- func (c *ProjectsTranslateTextCall) Do(opts ...googleapi.CallOption) (*TranslateTextResponse, error)
- func (c *ProjectsTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsTranslateTextCall
- func (c *ProjectsTranslateTextCall) Header() http.Header
- type ReferenceSentenceConfig
- type ReferenceSentencePair
- type ReferenceSentencePairList
- type Romanization
- type RomanizeTextRequest
- type RomanizeTextResponse
- type Service
- type Status
- type SupportedLanguage
- type SupportedLanguages
- type TranslateDocumentRequest
- type TranslateDocumentResponse
- type TranslateTextGlossaryConfig
- type TranslateTextRequest
- type TranslateTextResponse
- type Translation
- type TransliterationConfig
- type WaitOperationRequest
Constants¶
const (// See, edit, configure, and delete your Google Cloud data and see the email// address for your Google Account.CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"// Translate text from one language to another using Google TranslateCloudTranslationScope = "https://www.googleapis.com/auth/cloud-translation")
OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeAdaptiveMtDataset¶added inv0.153.0
type AdaptiveMtDataset struct {// CreateTime: Output only. Timestamp when this dataset was created.CreateTimestring `json:"createTime,omitempty"`// DisplayName: The name of the dataset to show in the interface. The name can// be up to 32 characters long and can consist only of ASCII Latin letters A-Z// and a-z, underscores (_), and ASCII digits 0-9.DisplayNamestring `json:"displayName,omitempty"`// ExampleCount: The number of examples in the dataset.ExampleCountint64 `json:"exampleCount,omitempty"`// Name: Required. The resource name of the dataset, in form of// `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{// dataset_id}`Namestring `json:"name,omitempty"`// SourceLanguageCode: The BCP-47 language code of the source language.SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// TargetLanguageCode: The BCP-47 language code of the target language.TargetLanguageCodestring `json:"targetLanguageCode,omitempty"`// UpdateTime: Output only. Timestamp when this dataset was last updated.UpdateTimestring `json:"updateTime,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AdaptiveMtDataset: An Adaptive MT Dataset.
func (AdaptiveMtDataset)MarshalJSON¶added inv0.153.0
func (sAdaptiveMtDataset) MarshalJSON() ([]byte,error)
typeAdaptiveMtFile¶added inv0.153.0
type AdaptiveMtFile struct {// CreateTime: Output only. Timestamp when this file was created.CreateTimestring `json:"createTime,omitempty"`// DisplayName: The file's display name.DisplayNamestring `json:"displayName,omitempty"`// EntryCount: The number of entries that the file contains.EntryCountint64 `json:"entryCount,omitempty"`// Name: Required. The resource name of the file, in form of// `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{// dataset}/adaptiveMtFiles/{file}`Namestring `json:"name,omitempty"`// UpdateTime: Output only. Timestamp when this file was last updated.UpdateTimestring `json:"updateTime,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AdaptiveMtFile: An AdaptiveMtFile.
func (AdaptiveMtFile)MarshalJSON¶added inv0.153.0
func (sAdaptiveMtFile) MarshalJSON() ([]byte,error)
typeAdaptiveMtSentence¶added inv0.153.0
type AdaptiveMtSentence struct {// CreateTime: Output only. Timestamp when this sentence was created.CreateTimestring `json:"createTime,omitempty"`// Name: Required. The resource name of the file, in form of// `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{// dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}`Namestring `json:"name,omitempty"`// SourceSentence: Required. The source sentence.SourceSentencestring `json:"sourceSentence,omitempty"`// TargetSentence: Required. The target sentence.TargetSentencestring `json:"targetSentence,omitempty"`// UpdateTime: Output only. Timestamp when this sentence was last updated.UpdateTimestring `json:"updateTime,omitempty"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AdaptiveMtSentence: An AdaptiveMt sentence entry.
func (AdaptiveMtSentence)MarshalJSON¶added inv0.153.0
func (sAdaptiveMtSentence) MarshalJSON() ([]byte,error)
typeAdaptiveMtTranslateRequest¶added inv0.153.0
type AdaptiveMtTranslateRequest struct {// Content: Required. The content of the input in string format.Content []string `json:"content,omitempty"`// Dataset: Required. The resource name for the dataset to use for adaptive MT.// `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`Datasetstring `json:"dataset,omitempty"`// 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.GlossaryConfig *GlossaryConfig `json:"glossaryConfig,omitempty"`// ReferenceSentenceConfig: Configuration for caller provided reference// sentences.ReferenceSentenceConfig *ReferenceSentenceConfig `json:"referenceSentenceConfig,omitempty"`// ForceSendFields is a list of field names (e.g. "Content") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Content") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AdaptiveMtTranslateRequest: The request for sending an AdaptiveMttranslation query.
func (AdaptiveMtTranslateRequest)MarshalJSON¶added inv0.153.0
func (sAdaptiveMtTranslateRequest) MarshalJSON() ([]byte,error)
typeAdaptiveMtTranslateResponse¶added inv0.153.0
type AdaptiveMtTranslateResponse struct {// GlossaryTranslations: Text translation response if a glossary is provided in// the request. This could be the same as 'translation' above if no terms// apply.GlossaryTranslations []*AdaptiveMtTranslation `json:"glossaryTranslations,omitempty"`// LanguageCode: Output only. The translation's language code.LanguageCodestring `json:"languageCode,omitempty"`// Translations: Output only. The translation.Translations []*AdaptiveMtTranslation `json:"translations,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "GlossaryTranslations") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GlossaryTranslations") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AdaptiveMtTranslateResponse: An AdaptiveMtTranslate response.
func (AdaptiveMtTranslateResponse)MarshalJSON¶added inv0.153.0
func (sAdaptiveMtTranslateResponse) MarshalJSON() ([]byte,error)
typeAdaptiveMtTranslation¶added inv0.153.0
type AdaptiveMtTranslation struct {// TranslatedText: Output only. The translated text.TranslatedTextstring `json:"translatedText,omitempty"`// ForceSendFields is a list of field names (e.g. "TranslatedText") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "TranslatedText") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}AdaptiveMtTranslation: An AdaptiveMt translation.
func (AdaptiveMtTranslation)MarshalJSON¶added inv0.153.0
func (sAdaptiveMtTranslation) MarshalJSON() ([]byte,error)
typeBatchDocumentInputConfig¶added inv0.61.0
type BatchDocumentInputConfig struct {// GcsSource: Google Cloud Storage location for the source input. This can be a// single file (for example, `gs://translation-test/input.docx`) or a wildcard// (for example, `gs://translation-test/*`). File mime type is determined based// on extension. Supported mime type includes: - `pdf`, application/pdf -// `docx`,// application/vnd.openxmlformats-officedocument.wordprocessingml.document -// `pptx`,// application/vnd.openxmlformats-officedocument.presentationml.presentation -// `xlsx`, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet// The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. The// max file size to support for `.pdf` is 1GB and the max page limit is 1000// pages. The max file size to support for all input documents is 1GB.GcsSource *GcsSource `json:"gcsSource,omitempty"`// ForceSendFields is a list of field names (e.g. "GcsSource") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GcsSource") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}BatchDocumentInputConfig: Input configuration for BatchTranslateDocumentrequest.
func (BatchDocumentInputConfig)MarshalJSON¶added inv0.61.0
func (sBatchDocumentInputConfig) MarshalJSON() ([]byte,error)
typeBatchDocumentOutputConfig¶added inv0.61.0
type BatchDocumentOutputConfig struct {// GcsDestination: Google Cloud Storage destination for output content. For// every single input document (for example, gs://a/b/c.[extension]), we// generate at most 2 * n output files. (n is the # of target_language_codes in// the BatchTranslateDocumentRequest). While the input documents are being// processed, we write/update an index file `index.csv` under// `gcs_destination.output_uri_prefix` (for example,// gs://translation_output/index.csv) The index file is generated/updated as// new files are being translated. The format is:// input_document,target_language_code,translation_output,error_output,// glossary_translation_output,glossary_error_output `input_document` is one// file we matched using gcs_source.input_uri. `target_language_code` is// provided in the request. `translation_output` contains the translations.// (details provided below) `error_output` contains the error message during// processing of the file. Both translations_file and errors_file could be// empty strings if we have no content to output. `glossary_translation_output`// and `glossary_error_output` are the translated output/error when we apply// glossaries. They could also be empty if we have no content to output. Once a// row is present in index.csv, the input/output matching never changes.// Callers should also expect all the content in input_file are processed and// ready to be consumed (that is, no partial output file is written). Since// index.csv will be keeping updated during the process, please make sure there// is no custom retention policy applied on the output bucket that may avoid// file updating.// (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The// naming format of translation output files follows (for target language code// [trg]): `translation_output`:// `gs://translation_output/a_b_c_[trg]_translation.[extension]`// `glossary_translation_output`:// `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The// output document will maintain the same file format as the input document.// The naming format of error output files follows (for target language code// [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt`// `glossary_error_output`:// `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error// output is a txt file containing error details.GcsDestination *GcsDestination `json:"gcsDestination,omitempty"`// ForceSendFields is a list of field names (e.g. "GcsDestination") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GcsDestination") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}BatchDocumentOutputConfig: Output configuration for BatchTranslateDocumentrequest.
func (BatchDocumentOutputConfig)MarshalJSON¶added inv0.61.0
func (sBatchDocumentOutputConfig) MarshalJSON() ([]byte,error)
typeBatchTranslateDocumentRequest¶added inv0.61.0
type BatchTranslateDocumentRequest struct {// CustomizedAttribution: Optional. This flag is to support user customized// attribution. If not provided, the default is `Machine Translated by Google`.// Customized attribution should follow rules in//https://cloud.google.com/translate/attribution#attribution_and_logosCustomizedAttributionstring `json:"customizedAttribution,omitempty"`// EnableRotationCorrection: Optional. If true, enable auto rotation correction// in DVS.EnableRotationCorrectionbool `json:"enableRotationCorrection,omitempty"`// EnableShadowRemovalNativePdf: Optional. If true, use the text removal server// to remove the shadow text on background image for native pdf translation.// Shadow removal feature can only be enabled when// is_translate_native_pdf_only: false && pdf_native_only: falseEnableShadowRemovalNativePdfbool `json:"enableShadowRemovalNativePdf,omitempty"`// FormatConversions: Optional. The file format conversion map that is applied// to all input files. The map key is the original mime_type. The map value is// the target mime_type of translated documents. Supported file format// conversion includes: - `application/pdf` to// `application/vnd.openxmlformats-officedocument.wordprocessingml.document` If// nothing specified, output files will be in the same format as the original// file.FormatConversions map[string]string `json:"formatConversions,omitempty"`// Glossaries: Optional. Glossaries to be applied. It's keyed by target// language code.Glossaries map[string]TranslateTextGlossaryConfig `json:"glossaries,omitempty"`// InputConfigs: Required. Input configurations. The total number of files// matched should be <= 100. The total content size to translate should be <=// 100M Unicode codepoints. The files must use UTF-8 encoding.InputConfigs []*BatchDocumentInputConfig `json:"inputConfigs,omitempty"`// Models: Optional. The models to use for translation. Map's key is target// language code. Map's value is the model name. Value can be a built-in// general model, or an AutoML Translation model. The value 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`,// If the map is empty or a specific model is not requested for a language// pair, then default google model (nmt) is used.Models map[string]string `json:"models,omitempty"`// OutputConfig: Required. Output configuration. If 2 input configs match to// the same file (that is, same input path), we don't generate output for// duplicate inputs.OutputConfig *BatchDocumentOutputConfig `json:"outputConfig,omitempty"`// SourceLanguageCode: Required. The ISO-639 language code of the input// document if known, for example, "en-US" or "sr-Latn". Supported language// codes are listed in Language Support// (https://cloud.google.com/translate/docs/languages).SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// TargetLanguageCodes: Required. The ISO-639 language code to use for// translation of the input document. Specify up to 10 language codes here.TargetLanguageCodes []string `json:"targetLanguageCodes,omitempty"`// ForceSendFields is a list of field names (e.g. "CustomizedAttribution") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CustomizedAttribution") to// include in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}BatchTranslateDocumentRequest: The BatchTranslateDocument request.
func (BatchTranslateDocumentRequest)MarshalJSON¶added inv0.61.0
func (sBatchTranslateDocumentRequest) MarshalJSON() ([]byte,error)
typeBatchTranslateTextRequest¶
type BatchTranslateTextRequest struct {// Glossaries: Optional. Glossaries to be applied for translation. It's keyed// by target language code.Glossaries map[string]TranslateTextGlossaryConfig `json:"glossaries,omitempty"`// InputConfigs: Required. Input configurations. The total number of files// matched should be <= 100. The total content size should be <= 100M Unicode// codepoints. The files must use UTF-8 encoding.InputConfigs []*InputConfig `json:"inputConfigs,omitempty"`// 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.Labels map[string]string `json:"labels,omitempty"`// Models: Optional. The models to use for translation. Map's key is target// language code. Map's value is model name. Value can be a built-in general// model, or an AutoML Translation model. The value 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`,// If the map is empty or a specific model is not requested for a language// pair, then default google model (nmt) is used.Models map[string]string `json:"models,omitempty"`// OutputConfig: Required. Output configuration. If 2 input configs match to// the same file (that is, same input path), we don't generate output for// duplicate inputs.OutputConfig *OutputConfig `json:"outputConfig,omitempty"`// SourceLanguageCode: Required. Source language code.SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// TargetLanguageCodes: Required. Specify up to 10 language codes here.TargetLanguageCodes []string `json:"targetLanguageCodes,omitempty"`// ForceSendFields is a list of field names (e.g. "Glossaries") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Glossaries") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}BatchTranslateTextRequest: The batch translation request.
func (BatchTranslateTextRequest)MarshalJSON¶
func (sBatchTranslateTextRequest) MarshalJSON() ([]byte,error)
typeCancelOperationRequest¶
type CancelOperationRequest struct {}CancelOperationRequest: The request message for Operations.CancelOperation.
typeDataset¶added inv0.107.0
type Dataset struct {// CreateTime: Output only. Timestamp when this dataset was created.CreateTimestring `json:"createTime,omitempty"`// DisplayName: The name of the dataset to show in the interface. The name can// be up to 32 characters long and can consist only of ASCII Latin letters A-Z// and a-z, underscores (_), and ASCII digits 0-9.DisplayNamestring `json:"displayName,omitempty"`// ExampleCount: Output only. The number of examples in the dataset.ExampleCountint64 `json:"exampleCount,omitempty"`// Name: The resource name of the dataset, in form of// `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id// }`Namestring `json:"name,omitempty"`// SourceLanguageCode: The BCP-47 language code of the source language.SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// TargetLanguageCode: The BCP-47 language code of the target language.TargetLanguageCodestring `json:"targetLanguageCode,omitempty"`// TestExampleCount: Output only. Number of test examples (sentence pairs).TestExampleCountint64 `json:"testExampleCount,omitempty"`// TrainExampleCount: Output only. Number of training examples (sentence// pairs).TrainExampleCountint64 `json:"trainExampleCount,omitempty"`// UpdateTime: Output only. Timestamp when this dataset was last updated.UpdateTimestring `json:"updateTime,omitempty"`// ValidateExampleCount: Output only. Number of validation examples (sentence// pairs).ValidateExampleCountint64 `json:"validateExampleCount,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Dataset: A dataset that hosts the examples (sentence pairs) used fortranslation models.
func (Dataset)MarshalJSON¶added inv0.107.0
typeDatasetInputConfig¶added inv0.107.0
type DatasetInputConfig struct {// InputFiles: Files containing the sentence pairs to be imported to the// dataset.InputFiles []*InputFile `json:"inputFiles,omitempty"`// ForceSendFields is a list of field names (e.g. "InputFiles") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "InputFiles") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DatasetInputConfig: Input configuration for datasets.
func (DatasetInputConfig)MarshalJSON¶added inv0.107.0
func (sDatasetInputConfig) MarshalJSON() ([]byte,error)
typeDatasetOutputConfig¶added inv0.107.0
type DatasetOutputConfig struct {// GcsDestination: Google Cloud Storage destination to write the output.GcsDestination *GcsOutputDestination `json:"gcsDestination,omitempty"`// ForceSendFields is a list of field names (e.g. "GcsDestination") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GcsDestination") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DatasetOutputConfig: Output configuration for datasets.
func (DatasetOutputConfig)MarshalJSON¶added inv0.107.0
func (sDatasetOutputConfig) MarshalJSON() ([]byte,error)
typeDetectLanguageRequest¶
type DetectLanguageRequest struct {// Content: The content of the input stored as a string.Contentstring `json:"content,omitempty"`// 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.Labels map[string]string `json:"labels,omitempty"`// MimeType: Optional. The format of the source text, for example, "text/html",// "text/plain". If left blank, the MIME type defaults to "text/html".MimeTypestring `json:"mimeType,omitempty"`// Model: Optional. The language detection model to be used. Format:// `projects/{project-number-or-id}/locations/{location-id}/models/language-dete// ction/{model-id}` Only one language detection model is currently supported:// `projects/{project-number-or-id}/locations/{location-id}/models/language-dete// ction/default`. If not specified, the default model is used.Modelstring `json:"model,omitempty"`// ForceSendFields is a list of field names (e.g. "Content") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Content") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DetectLanguageRequest: The request message for language detection.
func (DetectLanguageRequest)MarshalJSON¶
func (sDetectLanguageRequest) MarshalJSON() ([]byte,error)
typeDetectLanguageResponse¶
type DetectLanguageResponse struct {// Languages: The most probable language detected by the Translation API. For// each request, the Translation API will always return only one result.Languages []*DetectedLanguage `json:"languages,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Languages") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Languages") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DetectLanguageResponse: The response message for language detection.
func (DetectLanguageResponse)MarshalJSON¶
func (sDetectLanguageResponse) MarshalJSON() ([]byte,error)
typeDetectedLanguage¶
type DetectedLanguage struct {// Confidence: The confidence of the detection result for this language.Confidencefloat64 `json:"confidence,omitempty"`// LanguageCode: The ISO-639 language code of the source content in the// request, detected automatically.LanguageCodestring `json:"languageCode,omitempty"`// ForceSendFields is a list of field names (e.g. "Confidence") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Confidence") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DetectedLanguage: The response message for language detection.
func (DetectedLanguage)MarshalJSON¶
func (sDetectedLanguage) MarshalJSON() ([]byte,error)
func (*DetectedLanguage)UnmarshalJSON¶
func (s *DetectedLanguage) UnmarshalJSON(data []byte)error
typeDocumentInputConfig¶added inv0.61.0
type DocumentInputConfig struct {// Content: Document's content represented as a stream of bytes.Contentstring `json:"content,omitempty"`// GcsSource: Google Cloud Storage location. This must be a single file. For// example: gs://example_bucket/example_file.pdfGcsSource *GcsSource `json:"gcsSource,omitempty"`// MimeType: Specifies the input document's mime_type. If not specified it will// be determined using the file extension for gcs_source provided files. For a// file provided through bytes content the mime_type must be provided.// Currently supported mime types are: - application/pdf -// application/vnd.openxmlformats-officedocument.wordprocessingml.document -// application/vnd.openxmlformats-officedocument.presentationml.presentation -// application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMimeTypestring `json:"mimeType,omitempty"`// ForceSendFields is a list of field names (e.g. "Content") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Content") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DocumentInputConfig: A document translation request input config.
func (DocumentInputConfig)MarshalJSON¶added inv0.61.0
func (sDocumentInputConfig) MarshalJSON() ([]byte,error)
typeDocumentOutputConfig¶added inv0.61.0
type DocumentOutputConfig struct {// GcsDestination: Optional. Google Cloud Storage destination for the// translation output, e.g., `gs://my_bucket/my_directory/`. The destination// directory provided does not have to be empty, but the bucket must exist. If// a file with the same name as the output file already exists in the// destination an error will be returned. For a DocumentInputConfig.contents// provided document, the output file will have the name// "output_[trg]_translations.[ext]", where - [trg] corresponds to the// translated file's language code, - [ext] corresponds to the translated// file's extension according to its mime type. For a// DocumentInputConfig.gcs_uri provided document, the output file will have a// name according to its URI. For example: an input file with URI:// `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name// "my_bucket" will have an output URI:// `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - [trg] corresponds// to the translated file's language code, - [ext] corresponds to the// translated file's extension according to its mime type. If the document was// directly provided through the request, then the output document will have// the format: `gs://my_bucket/translated_document_[trg]_translations.[ext]`,// where - [trg] corresponds to the translated file's language code, - [ext]// corresponds to the translated file's extension according to its mime type.// If a glossary was provided, then the output URI for the glossary translation// will be equal to the default output URI but have `glossary_translations`// instead of `translations`. For the previous example, its glossary URI would// be: `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. Thus the max// number of output files will be 2 (Translated document, Glossary translated// document). Callers should expect no partial outputs. If there is any error// during document translation, no output will be stored in the Cloud Storage// bucket.GcsDestination *GcsDestination `json:"gcsDestination,omitempty"`// MimeType: Optional. Specifies the translated document's mime_type. If not// specified, the translated file's mime type will be the same as the input// file's mime type. Currently only support the output mime type to be the same// as input mime type. - application/pdf -// application/vnd.openxmlformats-officedocument.wordprocessingml.document -// application/vnd.openxmlformats-officedocument.presentationml.presentation -// application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMimeTypestring `json:"mimeType,omitempty"`// ForceSendFields is a list of field names (e.g. "GcsDestination") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GcsDestination") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DocumentOutputConfig: A document translation request output config.
func (DocumentOutputConfig)MarshalJSON¶added inv0.61.0
func (sDocumentOutputConfig) MarshalJSON() ([]byte,error)
typeDocumentTranslation¶added inv0.61.0
type DocumentTranslation struct {// ByteStreamOutputs: The array of translated documents. It is expected to be// size 1 for now. We may produce multiple translated documents in the future// for other type of file formats.ByteStreamOutputs []string `json:"byteStreamOutputs,omitempty"`// DetectedLanguageCode: The detected language for the input document. If the// user did not provide the source language for the input document, this field// will have the language code automatically detected. If the source language// was passed, auto-detection of the language does not occur and this field is// empty.DetectedLanguageCodestring `json:"detectedLanguageCode,omitempty"`// MimeType: The translated document's mime type.MimeTypestring `json:"mimeType,omitempty"`// ForceSendFields is a list of field names (e.g. "ByteStreamOutputs") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ByteStreamOutputs") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}DocumentTranslation: A translated document message.
func (DocumentTranslation)MarshalJSON¶added inv0.61.0
func (sDocumentTranslation) MarshalJSON() ([]byte,error)
typeEmpty¶
type Empty struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}Empty: A generic empty message that you can re-use to avoid definingduplicated empty messages in your APIs. A typical example is to use it asthe request or the response type of an API method. For instance: service Foo{ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
typeExample¶added inv0.107.0
type Example struct {// Name: Output only. The resource name of the example, in form of// `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id// }/examples/{example_id}`Namestring `json:"name,omitempty"`// SourceText: Sentence in source language.SourceTextstring `json:"sourceText,omitempty"`// TargetText: Sentence in target language.TargetTextstring `json:"targetText,omitempty"`// Usage: Output only. Usage of the sentence pair. Options are// TRAIN|VALIDATION|TEST.Usagestring `json:"usage,omitempty"`// ForceSendFields is a list of field names (e.g. "Name") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Name") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Example: A sentence pair.
func (Example)MarshalJSON¶added inv0.107.0
typeExportDataRequest¶added inv0.107.0
type ExportDataRequest struct {// OutputConfig: Required. The config for the output content.OutputConfig *DatasetOutputConfig `json:"outputConfig,omitempty"`// ForceSendFields is a list of field names (e.g. "OutputConfig") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "OutputConfig") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ExportDataRequest: Request message for ExportData.
func (ExportDataRequest)MarshalJSON¶added inv0.107.0
func (sExportDataRequest) MarshalJSON() ([]byte,error)
typeFileInputSource¶added inv0.153.0
type FileInputSource struct {// Content: Required. The file's byte contents.Contentstring `json:"content,omitempty"`// DisplayName: Required. The file's display name.DisplayNamestring `json:"displayName,omitempty"`// MimeType: Required. The file's mime type.MimeTypestring `json:"mimeType,omitempty"`// ForceSendFields is a list of field names (e.g. "Content") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Content") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}FileInputSource: An inlined file.
func (FileInputSource)MarshalJSON¶added inv0.153.0
func (sFileInputSource) MarshalJSON() ([]byte,error)
typeGcsDestination¶
type GcsDestination struct {// OutputUriPrefix: Required. The bucket used in 'output_uri_prefix' must exist// and there must be no files under 'output_uri_prefix'. 'output_uri_prefix'// must end with "/" and start with "gs://". One 'output_uri_prefix' can only// be used by one batch translation job at a time. Otherwise an// INVALID_ARGUMENT (400) error is returned.OutputUriPrefixstring `json:"outputUriPrefix,omitempty"`// ForceSendFields is a list of field names (e.g. "OutputUriPrefix") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "OutputUriPrefix") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GcsDestination: The Google Cloud Storage location for the output content.
func (GcsDestination)MarshalJSON¶
func (sGcsDestination) MarshalJSON() ([]byte,error)
typeGcsInputSource¶added inv0.107.0
type GcsInputSource struct {// InputUri: Required. Source data URI. For example,// `gs://my_bucket/my_object`.InputUristring `json:"inputUri,omitempty"`// ForceSendFields is a list of field names (e.g. "InputUri") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "InputUri") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GcsInputSource: The Google Cloud Storage location for the input content.
func (GcsInputSource)MarshalJSON¶added inv0.107.0
func (sGcsInputSource) MarshalJSON() ([]byte,error)
typeGcsOutputDestination¶added inv0.107.0
type GcsOutputDestination struct {// OutputUriPrefix: Required. Google Cloud Storage URI to output directory. For// example, `gs://bucket/directory`. The requesting user must have write// permission to the bucket. The directory will be created if it doesn't exist.OutputUriPrefixstring `json:"outputUriPrefix,omitempty"`// ForceSendFields is a list of field names (e.g. "OutputUriPrefix") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "OutputUriPrefix") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GcsOutputDestination: The Google Cloud Storage location for the outputcontent.
func (GcsOutputDestination)MarshalJSON¶added inv0.107.0
func (sGcsOutputDestination) MarshalJSON() ([]byte,error)
typeGcsSource¶
type GcsSource struct {// InputUri: Required. Source data URI. For example,// `gs://my_bucket/my_object`.InputUristring `json:"inputUri,omitempty"`// ForceSendFields is a list of field names (e.g. "InputUri") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "InputUri") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GcsSource: The Google Cloud Storage location for the input content.
func (GcsSource)MarshalJSON¶
typeGlossary¶
type Glossary struct {// DisplayName: Optional. The display name of the glossary.DisplayNamestring `json:"displayName,omitempty"`// EndTime: Output only. When the glossary creation was finished.EndTimestring `json:"endTime,omitempty"`// EntryCount: Output only. The number of entries defined in the glossary.EntryCountint64 `json:"entryCount,omitempty"`// InputConfig: Required. Provides examples to build the glossary from. Total// glossary must not exceed 10M Unicode codepoints.InputConfig *GlossaryInputConfig `json:"inputConfig,omitempty"`// LanguageCodesSet: Used with equivalent term set glossaries.LanguageCodesSet *LanguageCodesSet `json:"languageCodesSet,omitempty"`// LanguagePair: Used with unidirectional glossaries.LanguagePair *LanguageCodePair `json:"languagePair,omitempty"`// Name: Required. The resource name of the glossary. Glossary names have the// form// `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary// -id}`.Namestring `json:"name,omitempty"`// SubmitTime: Output only. When CreateGlossary was called.SubmitTimestring `json:"submitTime,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "DisplayName") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DisplayName") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Glossary: Represents a glossary built from user-provided data.
func (Glossary)MarshalJSON¶
typeGlossaryConfig¶added inv0.195.0
type GlossaryConfig struct {// ContextualTranslationEnabled: Optional. If set to true, the glossary will be// used for contextual translation.ContextualTranslationEnabledbool `json:"contextualTranslationEnabled,omitempty"`// Glossary: Required. The `glossary` to be applied for this translation. The// format depends on the glossary: - User-provided custom glossary:// `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary// -id}`Glossarystring `json:"glossary,omitempty"`// IgnoreCase: Optional. Indicates match is case insensitive. The default value// is `false` if missing.IgnoreCasebool `json:"ignoreCase,omitempty"`// ForceSendFields is a list of field names (e.g.// "ContextualTranslationEnabled") to unconditionally include in API requests.// By default, fields with empty or default values are omitted from API// requests. Seehttps://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields// for more details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ContextualTranslationEnabled") to// include in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GlossaryConfig: Configures which glossary is used for a specific targetlanguage and defines options for applying that glossary.
func (GlossaryConfig)MarshalJSON¶added inv0.195.0
func (sGlossaryConfig) MarshalJSON() ([]byte,error)
typeGlossaryEntry¶added inv0.93.0
type GlossaryEntry struct {// Description: Describes the glossary entry.Descriptionstring `json:"description,omitempty"`// Name: Identifier. The resource name of the entry. Format:// `projects/*/locations/*/glossaries/*/glossaryEntries/*`Namestring `json:"name,omitempty"`// TermsPair: Used for an unidirectional glossary.TermsPair *GlossaryTermsPair `json:"termsPair,omitempty"`// TermsSet: Used for an equivalent term sets glossary.TermsSet *GlossaryTermsSet `json:"termsSet,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Description") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Description") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GlossaryEntry: Represents a single entry in a glossary.
func (GlossaryEntry)MarshalJSON¶added inv0.93.0
func (sGlossaryEntry) MarshalJSON() ([]byte,error)
typeGlossaryInputConfig¶
type GlossaryInputConfig struct {// GcsSource: Required. Google Cloud Storage location of glossary data. File// format is determined based on the filename extension. API returns// [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file formats.// Wildcards are not allowed. This must be a single file in one of the// following formats: For unidirectional glossaries: - TSV/CSV (`.tsv`/`.csv`):// Two column file, tab- or comma-separated. The first column is source text.// The second column is target text. No headers in this file. The first row// contains data and not column names. - TMX (`.tmx`): TMX file with parallel// data defining source/target term pairs. For equivalent term sets glossaries:// - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms in// multiple languages. See documentation for more information - glossaries// (https://cloud.google.com/translate/docs/advanced/glossary).GcsSource *GcsSource `json:"gcsSource,omitempty"`// ForceSendFields is a list of field names (e.g. "GcsSource") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GcsSource") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GlossaryInputConfig: Input configuration for glossaries.
func (GlossaryInputConfig)MarshalJSON¶
func (sGlossaryInputConfig) MarshalJSON() ([]byte,error)
typeGlossaryTerm¶added inv0.93.0
type GlossaryTerm struct {// LanguageCode: The language for this glossary term.LanguageCodestring `json:"languageCode,omitempty"`// Text: The text for the glossary term.Textstring `json:"text,omitempty"`// ForceSendFields is a list of field names (e.g. "LanguageCode") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "LanguageCode") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GlossaryTerm: Represents a single glossary term
func (GlossaryTerm)MarshalJSON¶added inv0.93.0
func (sGlossaryTerm) MarshalJSON() ([]byte,error)
typeGlossaryTermsPair¶added inv0.93.0
type GlossaryTermsPair struct {// SourceTerm: The source term is the term that will get match in the text,SourceTerm *GlossaryTerm `json:"sourceTerm,omitempty"`// TargetTerm: The term that will replace the match source term.TargetTerm *GlossaryTerm `json:"targetTerm,omitempty"`// ForceSendFields is a list of field names (e.g. "SourceTerm") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "SourceTerm") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GlossaryTermsPair: Represents a single entry for an unidirectional glossary.
func (GlossaryTermsPair)MarshalJSON¶added inv0.93.0
func (sGlossaryTermsPair) MarshalJSON() ([]byte,error)
typeGlossaryTermsSet¶added inv0.93.0
type GlossaryTermsSet struct {// Terms: Each term in the set represents a term that can be replaced by the// other terms.Terms []*GlossaryTerm `json:"terms,omitempty"`// ForceSendFields is a list of field names (e.g. "Terms") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Terms") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GlossaryTermsSet: Represents a single entry for an equivalent term setglossary. This is used for equivalent term sets where each term can bereplaced by the other terms in the set.
func (GlossaryTermsSet)MarshalJSON¶added inv0.93.0
func (sGlossaryTermsSet) MarshalJSON() ([]byte,error)
typeImportAdaptiveMtFileRequest¶added inv0.153.0
type ImportAdaptiveMtFileRequest struct {// FileInputSource: Inline file source.FileInputSource *FileInputSource `json:"fileInputSource,omitempty"`// GcsInputSource: Google Cloud Storage file source.GcsInputSource *GcsInputSource `json:"gcsInputSource,omitempty"`// ForceSendFields is a list of field names (e.g. "FileInputSource") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "FileInputSource") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ImportAdaptiveMtFileRequest: The request for importing an AdaptiveMt filealong with its sentences.
func (ImportAdaptiveMtFileRequest)MarshalJSON¶added inv0.153.0
func (sImportAdaptiveMtFileRequest) MarshalJSON() ([]byte,error)
typeImportAdaptiveMtFileResponse¶added inv0.153.0
type ImportAdaptiveMtFileResponse struct {// AdaptiveMtFile: Output only. The Adaptive MT file that was imported.AdaptiveMtFile *AdaptiveMtFile `json:"adaptiveMtFile,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AdaptiveMtFile") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdaptiveMtFile") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ImportAdaptiveMtFileResponse: The response for importing an AdaptiveMtFile
func (ImportAdaptiveMtFileResponse)MarshalJSON¶added inv0.153.0
func (sImportAdaptiveMtFileResponse) MarshalJSON() ([]byte,error)
typeImportDataRequest¶added inv0.107.0
type ImportDataRequest struct {// InputConfig: Required. The config for the input content.InputConfig *DatasetInputConfig `json:"inputConfig,omitempty"`// ForceSendFields is a list of field names (e.g. "InputConfig") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "InputConfig") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ImportDataRequest: Request message for ImportData.
func (ImportDataRequest)MarshalJSON¶added inv0.107.0
func (sImportDataRequest) MarshalJSON() ([]byte,error)
typeInputConfig¶
type InputConfig struct {// GcsSource: Required. Google Cloud Storage location for the source input.// This can be a single file (for example, `gs://translation-test/input.tsv`)// or a wildcard (for example, `gs://translation-test/*`). If a file extension// is `.tsv`, it can contain either one or two columns. The first column// (optional) is the id of the text request. If the first column is missing, we// use the row number (0-based) from the input file as the ID in the output// file. The second column is the actual text to be translated. We recommend// each row be <= 10K Unicode codepoints, otherwise an error might be returned.// Note that the input tsv must beRFC 4180 compliant. You could use//https://github.com/Clever/csvlint to check potential formatting errors in// your tsv file. csvlint --delimiter='\t' your_input_file.tsv The other// supported file extensions are `.txt` or `.html`, which is treated as a// single large chunk of text.GcsSource *GcsSource `json:"gcsSource,omitempty"`// MimeType: Optional. Can be "text/plain" or "text/html". For `.tsv`,// "text/html" is used if mime_type is missing. For `.html`, this field must be// "text/html" or empty. For `.txt`, this field must be "text/plain" or empty.MimeTypestring `json:"mimeType,omitempty"`// ForceSendFields is a list of field names (e.g. "GcsSource") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GcsSource") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}InputConfig: Input configuration for BatchTranslateText request.
func (InputConfig)MarshalJSON¶
func (sInputConfig) MarshalJSON() ([]byte,error)
typeInputFile¶added inv0.107.0
type InputFile struct {// GcsSource: Google Cloud Storage file source.GcsSource *GcsInputSource `json:"gcsSource,omitempty"`// Usage: Optional. Usage of the file contents. Options are// TRAIN|VALIDATION|TEST, or UNASSIGNED (by default) for auto split.Usagestring `json:"usage,omitempty"`// ForceSendFields is a list of field names (e.g. "GcsSource") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GcsSource") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}InputFile: An input file.
func (InputFile)MarshalJSON¶added inv0.107.0
typeLanguageCodePair¶
type LanguageCodePair struct {// SourceLanguageCode: Required. The ISO-639 language code of the input text,// for example, "en-US". Expected to be an exact match for// GlossaryTerm.language_code.SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// TargetLanguageCode: Required. The ISO-639 language code for translation// output, for example, "zh-CN". Expected to be an exact match for// GlossaryTerm.language_code.TargetLanguageCodestring `json:"targetLanguageCode,omitempty"`// ForceSendFields is a list of field names (e.g. "SourceLanguageCode") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "SourceLanguageCode") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}LanguageCodePair: Used with unidirectional glossaries.
func (LanguageCodePair)MarshalJSON¶
func (sLanguageCodePair) MarshalJSON() ([]byte,error)
typeLanguageCodesSet¶
type LanguageCodesSet struct {// LanguageCodes: The ISO-639 language code(s) for terms defined in the// glossary. All entries are unique. The list contains at least two entries.// Expected to be an exact match for GlossaryTerm.language_code.LanguageCodes []string `json:"languageCodes,omitempty"`// ForceSendFields is a list of field names (e.g. "LanguageCodes") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "LanguageCodes") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}LanguageCodesSet: Used with equivalent term set glossaries.
func (LanguageCodesSet)MarshalJSON¶
func (sLanguageCodesSet) MarshalJSON() ([]byte,error)
typeListAdaptiveMtDatasetsResponse¶added inv0.153.0
type ListAdaptiveMtDatasetsResponse struct {// AdaptiveMtDatasets: Output only. A list of Adaptive MT datasets.AdaptiveMtDatasets []*AdaptiveMtDataset `json:"adaptiveMtDatasets,omitempty"`// NextPageToken: Optional. A token to retrieve a page of results. Pass this// value in the [ListAdaptiveMtDatasetsRequest.page_token] field in the// subsequent call to `ListAdaptiveMtDatasets` method to retrieve the next page// of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AdaptiveMtDatasets") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdaptiveMtDatasets") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListAdaptiveMtDatasetsResponse: A list of AdaptiveMtDatasets.
func (ListAdaptiveMtDatasetsResponse)MarshalJSON¶added inv0.153.0
func (sListAdaptiveMtDatasetsResponse) MarshalJSON() ([]byte,error)
typeListAdaptiveMtFilesResponse¶added inv0.153.0
type ListAdaptiveMtFilesResponse struct {// AdaptiveMtFiles: Output only. The Adaptive MT files.AdaptiveMtFiles []*AdaptiveMtFile `json:"adaptiveMtFiles,omitempty"`// NextPageToken: Optional. A token to retrieve a page of results. Pass this// value in the ListAdaptiveMtFilesRequest.page_token field in the subsequent// call to `ListAdaptiveMtFiles` method to retrieve the next page of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AdaptiveMtFiles") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdaptiveMtFiles") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListAdaptiveMtFilesResponse: The response for listing all AdaptiveMt filesunder a given dataset.
func (ListAdaptiveMtFilesResponse)MarshalJSON¶added inv0.153.0
func (sListAdaptiveMtFilesResponse) MarshalJSON() ([]byte,error)
typeListAdaptiveMtSentencesResponse¶added inv0.153.0
type ListAdaptiveMtSentencesResponse struct {// AdaptiveMtSentences: Output only. The list of AdaptiveMtSentences.AdaptiveMtSentences []*AdaptiveMtSentence `json:"adaptiveMtSentences,omitempty"`// NextPageToken: Optional.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AdaptiveMtSentences") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdaptiveMtSentences") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListAdaptiveMtSentencesResponse: List AdaptiveMt sentences response.
func (ListAdaptiveMtSentencesResponse)MarshalJSON¶added inv0.153.0
func (sListAdaptiveMtSentencesResponse) MarshalJSON() ([]byte,error)
typeListDatasetsResponse¶added inv0.107.0
type ListDatasetsResponse struct {// Datasets: The datasets read.Datasets []*Dataset `json:"datasets,omitempty"`// NextPageToken: A token to retrieve next page of results. Pass this token to// the page_token field in the ListDatasetsRequest to obtain the corresponding// page.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Datasets") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Datasets") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListDatasetsResponse: Response message for ListDatasets.
func (ListDatasetsResponse)MarshalJSON¶added inv0.107.0
func (sListDatasetsResponse) MarshalJSON() ([]byte,error)
typeListExamplesResponse¶added inv0.107.0
type ListExamplesResponse struct {// Examples: The sentence pairs.Examples []*Example `json:"examples,omitempty"`// NextPageToken: A token to retrieve next page of results. Pass this token to// the page_token field in the ListExamplesRequest to obtain the corresponding// page.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Examples") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Examples") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListExamplesResponse: Response message for ListExamples.
func (ListExamplesResponse)MarshalJSON¶added inv0.107.0
func (sListExamplesResponse) MarshalJSON() ([]byte,error)
typeListGlossariesResponse¶
type ListGlossariesResponse struct {// Glossaries: The list of glossaries for a project.Glossaries []*Glossary `json:"glossaries,omitempty"`// NextPageToken: A token to retrieve a page of results. Pass this value in the// [ListGlossariesRequest.page_token] field in the subsequent call to// `ListGlossaries` method to retrieve the next page of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Glossaries") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Glossaries") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListGlossariesResponse: Response message for ListGlossaries.
func (ListGlossariesResponse)MarshalJSON¶
func (sListGlossariesResponse) MarshalJSON() ([]byte,error)
typeListGlossaryEntriesResponse¶added inv0.93.0
type ListGlossaryEntriesResponse struct {// GlossaryEntries: Optional. The Glossary EntriesGlossaryEntries []*GlossaryEntry `json:"glossaryEntries,omitempty"`// NextPageToken: Optional. A token to retrieve a page of results. Pass this// value in the [ListGLossaryEntriesRequest.page_token] field in the subsequent// calls.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "GlossaryEntries") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GlossaryEntries") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListGlossaryEntriesResponse: Response message for ListGlossaryEntries
func (ListGlossaryEntriesResponse)MarshalJSON¶added inv0.93.0
func (sListGlossaryEntriesResponse) MarshalJSON() ([]byte,error)
typeListLocationsResponse¶
type ListLocationsResponse struct {// Locations: A list of locations that matches the specified filter in the// request.Locations []*Location `json:"locations,omitempty"`// NextPageToken: The standard List next-page token.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Locations") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Locations") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListLocationsResponse: The response message for Locations.ListLocations.
func (ListLocationsResponse)MarshalJSON¶
func (sListLocationsResponse) MarshalJSON() ([]byte,error)
typeListModelsResponse¶added inv0.107.0
type ListModelsResponse struct {// Models: The models read.Models []*Model `json:"models,omitempty"`// NextPageToken: A token to retrieve next page of results. Pass this token to// the page_token field in the ListModelsRequest to obtain the corresponding// page.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Models") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Models") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListModelsResponse: Response message for ListModels.
func (ListModelsResponse)MarshalJSON¶added inv0.107.0
func (sListModelsResponse) MarshalJSON() ([]byte,error)
typeListOperationsResponse¶
type ListOperationsResponse struct {// NextPageToken: The standard List next-page token.NextPageTokenstring `json:"nextPageToken,omitempty"`// Operations: A list of operations that matches the specified filter in the// request.Operations []*Operation `json:"operations,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListOperationsResponse: The response message for Operations.ListOperations.
func (ListOperationsResponse)MarshalJSON¶
func (sListOperationsResponse) MarshalJSON() ([]byte,error)
typeLocation¶
type Location struct {// DisplayName: The friendly name for this location, typically a nearby city// name. For example, "Tokyo".DisplayNamestring `json:"displayName,omitempty"`// Labels: Cross-service attributes for the location. For example// {"cloud.googleapis.com/region": "us-east1"}Labels map[string]string `json:"labels,omitempty"`// LocationId: The canonical id for this location. For example: "us-east1".LocationIdstring `json:"locationId,omitempty"`// Metadata: Service-specific metadata. For example the available capacity at// the given location.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Name: Resource name for the location, which may vary between// implementations. For example:// "projects/example-project/locations/us-east1"Namestring `json:"name,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "DisplayName") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DisplayName") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Location: A resource that represents a Google Cloud location.
func (Location)MarshalJSON¶
typeModel¶added inv0.107.0
type Model struct {// CreateTime: Output only. Timestamp when the model resource was created,// which is also when the training started.CreateTimestring `json:"createTime,omitempty"`// Dataset: The dataset from which the model is trained, in form of// `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id// }`Datasetstring `json:"dataset,omitempty"`// DisplayName: The name of the model to show in the interface. The name can be// up to 32 characters long and can consist only of ASCII Latin letters A-Z and// a-z, underscores (_), and ASCII digits 0-9.DisplayNamestring `json:"displayName,omitempty"`// Name: The resource name of the model, in form of// `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`Namestring `json:"name,omitempty"`// SourceLanguageCode: Output only. The BCP-47 language code of the source// language.SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// TargetLanguageCode: Output only. The BCP-47 language code of the target// language.TargetLanguageCodestring `json:"targetLanguageCode,omitempty"`// TestExampleCount: Output only. Number of examples (sentence pairs) used to// test the model.TestExampleCountint64 `json:"testExampleCount,omitempty"`// TrainExampleCount: Output only. Number of examples (sentence pairs) used to// train the model.TrainExampleCountint64 `json:"trainExampleCount,omitempty"`// UpdateTime: Output only. Timestamp when this model was last updated.UpdateTimestring `json:"updateTime,omitempty"`// ValidateExampleCount: Output only. Number of examples (sentence pairs) used// to validate the model.ValidateExampleCountint64 `json:"validateExampleCount,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Model: A trained translation model.
func (Model)MarshalJSON¶added inv0.107.0
typeOperation¶
type Operation struct {// Done: If the value is `false`, it means the operation is still in progress.// If `true`, the operation is completed, and either `error` or `response` is// available.Donebool `json:"done,omitempty"`// Error: The error result of the operation in case of failure or cancellation.Error *Status `json:"error,omitempty"`// Metadata: Service-specific metadata associated with the operation. It// typically contains progress information and common metadata such as create// time. Some services might not provide such metadata. Any method that returns// a long-running operation should document the metadata type, if any.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Name: The server-assigned name, which is only unique within the same service// that originally returns it. If you use the default HTTP mapping, the `name`// should be a resource name ending with `operations/{unique_id}`.Namestring `json:"name,omitempty"`// Response: The normal, successful response of the operation. If the original// method returns no data on success, such as `Delete`, the response is// `google.protobuf.Empty`. If the original method is standard// `Get`/`Create`/`Update`, the response should be the resource. For other// methods, the response should have the type `XxxResponse`, where `Xxx` is the// original method name. For example, if the original method name is// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.Responsegoogleapi.RawMessage `json:"response,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Done") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Done") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Operation: This resource represents a long-running operation that is theresult of a network API call.
func (Operation)MarshalJSON¶
typeOutputConfig¶
type OutputConfig struct {// GcsDestination: Google Cloud Storage destination for output content. For// every single input file (for example, gs://a/b/c.[extension]), we generate// at most 2 * n output files. (n is the # of target_language_codes in the// BatchTranslateTextRequest). Output files (tsv) generated are compliant with//RFC 4180 except that record delimiters are '\n' instead of '\r\n'. We don't// provide any way to change record delimiters. While the input files are being// processed, we write/update an index file 'index.csv' under// 'output_uri_prefix' (for example, gs://translation-test/index.csv) The index// file is generated/updated as new files are being translated. The format is:// input_file,target_language_code,translations_file,errors_file,// glossary_translations_file,glossary_errors_file input_file is one file we// matched using gcs_source.input_uri. target_language_code is provided in the// request. translations_file contains the translations. (details provided// below) errors_file contains the errors during processing of the file.// (details below). Both translations_file and errors_file could be empty// strings if we have no content to output. glossary_translations_file and// glossary_errors_file are always empty strings if the input_file is tsv. They// could also be empty if we have no content to output. Once a row is present// in index.csv, the input/output matching never changes. Callers should also// expect all the content in input_file are processed and ready to be consumed// (that is, no partial output file is written). Since index.csv will be// keeping updated during the process, please make sure there is no custom// retention policy applied on the output bucket that may avoid file updating.// (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The// format of translations_file (for target language code 'trg') is:// `gs://translation_test/a_b_c_'trg'_translations.[extension]` If the input// file extension is tsv, the output has the following columns: Column 1: ID of// the request provided in the input, if it's not provided in the input, then// the input row number is used (0-based). Column 2: source sentence. Column 3:// translation without applying a glossary. Empty string if there is an error.// Column 4 (only present if a glossary is provided in the request):// translation after applying the glossary. Empty string if there is an error// applying the glossary. Could be same string as column 3 if there is no// glossary applied. If input file extension is a txt or html, the translation// is directly written to the output file. If glossary is requested, a separate// glossary_translations_file has format of// `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` The// format of errors file (for target language code 'trg') is:// `gs://translation_test/a_b_c_'trg'_errors.[extension]` If the input file// extension is tsv, errors_file contains the following: Column 1: ID of the// request provided in the input, if it's not provided in the input, then the// input row number is used (0-based). Column 2: source sentence. Column 3:// Error detail for the translation. Could be empty. Column 4 (only present if// a glossary is provided in the request): Error when applying the glossary. If// the input file extension is txt or html, glossary_error_file will be// generated that contains error details. glossary_error_file has format of// `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`GcsDestination *GcsDestination `json:"gcsDestination,omitempty"`// ForceSendFields is a list of field names (e.g. "GcsDestination") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GcsDestination") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}OutputConfig: Output configuration for BatchTranslateText request.
func (OutputConfig)MarshalJSON¶
func (sOutputConfig) MarshalJSON() ([]byte,error)
typeProjectsDetectLanguageCall¶
type ProjectsDetectLanguageCall struct {// contains filtered or unexported fields}func (*ProjectsDetectLanguageCall)Context¶
func (c *ProjectsDetectLanguageCall) Context(ctxcontext.Context) *ProjectsDetectLanguageCall
Context sets the context to be used in this call's Do method.
func (*ProjectsDetectLanguageCall)Do¶
func (c *ProjectsDetectLanguageCall) Do(opts ...googleapi.CallOption) (*DetectLanguageResponse,error)
Do executes the "translate.projects.detectLanguage" call.Any non-2xx status code is an error. Response headers are in either*DetectLanguageResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsDetectLanguageCall)Fields¶
func (c *ProjectsDetectLanguageCall) Fields(s ...googleapi.Field) *ProjectsDetectLanguageCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsDetectLanguageCall)Header¶
func (c *ProjectsDetectLanguageCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsGetSupportedLanguagesCall¶
type ProjectsGetSupportedLanguagesCall struct {// contains filtered or unexported fields}func (*ProjectsGetSupportedLanguagesCall)Context¶
func (c *ProjectsGetSupportedLanguagesCall) Context(ctxcontext.Context) *ProjectsGetSupportedLanguagesCall
Context sets the context to be used in this call's Do method.
func (*ProjectsGetSupportedLanguagesCall)DisplayLanguageCode¶
func (c *ProjectsGetSupportedLanguagesCall) DisplayLanguageCode(displayLanguageCodestring) *ProjectsGetSupportedLanguagesCall
DisplayLanguageCode sets the optional parameter "displayLanguageCode": Thelanguage to use to return localized, human readable names of supportedlanguages. If missing, then display names are not returned in a response.
func (*ProjectsGetSupportedLanguagesCall)Do¶
func (c *ProjectsGetSupportedLanguagesCall) Do(opts ...googleapi.CallOption) (*SupportedLanguages,error)
Do executes the "translate.projects.getSupportedLanguages" call.Any non-2xx status code is an error. Response headers are in either*SupportedLanguages.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsGetSupportedLanguagesCall)Fields¶
func (c *ProjectsGetSupportedLanguagesCall) Fields(s ...googleapi.Field) *ProjectsGetSupportedLanguagesCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsGetSupportedLanguagesCall)Header¶
func (c *ProjectsGetSupportedLanguagesCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsGetSupportedLanguagesCall)IfNoneMatch¶
func (c *ProjectsGetSupportedLanguagesCall) IfNoneMatch(entityTagstring) *ProjectsGetSupportedLanguagesCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsGetSupportedLanguagesCall)Model¶
func (c *ProjectsGetSupportedLanguagesCall) Model(modelstring) *ProjectsGetSupportedLanguagesCall
Model sets the optional parameter "model": Get supported languages of thismodel. 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`,
Returns languages supported by the specified model. If missing, we get
supported languages of Google general NMT model.
typeProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtSentencesResponse,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.adaptiveMtSentences.list" call.Any non-2xx status code is an error. Response headers are in either*ListAdaptiveMtSentencesResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall)IfNoneMatch¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall)PageSize¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) PageSize(pageSizeint64) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
PageSize sets the optional parameter "pageSize":
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall)PageToken¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) PageToken(pageTokenstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Typically, this is the value ofListAdaptiveMtSentencesRequest.next_page_token returned from the previouscall to `ListTranslationMemories` method. The first page is returned if`page_token` is empty or missing.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall)Pages¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Pages(ctxcontext.Context, f func(*ListAdaptiveMtSentencesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService struct {// contains filtered or unexported fields}funcNewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService¶added inv0.153.0
func NewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService(s *Service) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService)List¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService) List(parentstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall
List: Lists all AdaptiveMtSentences under a given file/dataset.
- parent: The resource name of the project from which to list the AdaptiveMT 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 adataset.`projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`.
typeProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtFile,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.get" call.Any non-2xx status code is an error. Response headers are in either*AdaptiveMtFile.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall)IfNoneMatch¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtFilesResponse,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.list" call.Any non-2xx status code is an error. Response headers are in either*ListAdaptiveMtFilesResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall)IfNoneMatch¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall)PageSize¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) PageSize(pageSizeint64) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
PageSize sets the optional parameter "pageSize":
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall)PageToken¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) PageToken(pageTokenstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Typically, this is the value ofListAdaptiveMtFilesResponse.next_page_token returned from the previous callto `ListAdaptiveMtFiles` method. The first page is returned if`page_token`is empty or missing.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall)Pages¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Pages(ctxcontext.Context, f func(*ListAdaptiveMtFilesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService struct {AdaptiveMtSentences *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService// contains filtered or unexported fields}funcNewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService¶added inv0.153.0
func NewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService(s *Service) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService)Delete¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService) Delete(namestring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall
Delete: Deletes an AdaptiveMtFile along with its sentences.
- name: The resource name of the file to delete, in form of`projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}`.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService)Get¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService) Get(namestring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall
Get: Gets and AdaptiveMtFile
- name: The resource name of the file, in form of`projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}`.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService)List¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService) List(parentstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall
List: Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.
- parent: The resource name of the project from which to list the AdaptiveMT files.`projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`.
typeProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtSentencesResponse,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.adaptiveMtSentences.list" call.Any non-2xx status code is an error. Response headers are in either*ListAdaptiveMtSentencesResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall)IfNoneMatch¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall)PageSize¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) PageSize(pageSizeint64) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
PageSize sets the optional parameter "pageSize":
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall)PageToken¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) PageToken(pageTokenstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Typically, this is the value ofListAdaptiveMtSentencesRequest.next_page_token returned from the previouscall to `ListTranslationMemories` method. The first page is returned if`page_token` is empty or missing.
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall)Pages¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Pages(ctxcontext.Context, f func(*ListAdaptiveMtSentencesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService struct {// contains filtered or unexported fields}funcNewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService¶added inv0.153.0
func NewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService(s *Service) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService
func (*ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService)List¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService) List(parentstring) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall
List: Lists all AdaptiveMtSentences under a given file/dataset.
- parent: The resource name of the project from which to list the AdaptiveMT 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 adataset.`projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`.
typeProjectsLocationsAdaptiveMtDatasetsCreateCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsCreateCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsCreateCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsCreateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsCreateCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtDataset,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.create" call.Any non-2xx status code is an error. Response headers are in either*AdaptiveMtDataset.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsAdaptiveMtDatasetsCreateCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsCreateCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsAdaptiveMtDatasetsDeleteCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsDeleteCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsDeleteCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsDeleteCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsDeleteCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsAdaptiveMtDatasetsDeleteCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsDeleteCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsAdaptiveMtDatasetsGetCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsGetCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsGetCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtDataset,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.get" call.Any non-2xx status code is an error. Response headers are in either*AdaptiveMtDataset.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsAdaptiveMtDatasetsGetCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsGetCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsAdaptiveMtDatasetsGetCall)IfNoneMatch¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsAdaptiveMtDatasetsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Do(opts ...googleapi.CallOption) (*ImportAdaptiveMtFileResponse,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.importAdaptiveMtFile" call.Any non-2xx status code is an error. Response headers are in either*ImportAdaptiveMtFileResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsAdaptiveMtDatasetsListCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtDatasetsListCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtDatasetsListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtDatasetsListCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtDatasetsResponse,error)
Do executes the "translate.projects.locations.adaptiveMtDatasets.list" call.Any non-2xx status code is an error. Response headers are in either*ListAdaptiveMtDatasetsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsAdaptiveMtDatasetsListCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtDatasetsListCall)Filter¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Filter(filterstring) *ProjectsLocationsAdaptiveMtDatasetsListCall
Filter sets the optional parameter "filter": An expression for filtering theresults of the request. Filter is not supported yet.
func (*ProjectsLocationsAdaptiveMtDatasetsListCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsAdaptiveMtDatasetsListCall)IfNoneMatch¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsAdaptiveMtDatasetsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsAdaptiveMtDatasetsListCall)PageSize¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) PageSize(pageSizeint64) *ProjectsLocationsAdaptiveMtDatasetsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Theserver may return fewer results than requested. If unspecified, the serverpicks an appropriate default.
func (*ProjectsLocationsAdaptiveMtDatasetsListCall)PageToken¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) PageToken(pageTokenstring) *ProjectsLocationsAdaptiveMtDatasetsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Typically, this is the value ofListAdaptiveMtDatasetsResponse.next_page_token returned from the previouscall to `ListAdaptiveMtDatasets` method. The first page is returned if`page_token`is empty or missing.
func (*ProjectsLocationsAdaptiveMtDatasetsListCall)Pages¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Pages(ctxcontext.Context, f func(*ListAdaptiveMtDatasetsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsAdaptiveMtDatasetsService¶added inv0.153.0
type ProjectsLocationsAdaptiveMtDatasetsService struct {AdaptiveMtFiles *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesServiceAdaptiveMtSentences *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService// contains filtered or unexported fields}funcNewProjectsLocationsAdaptiveMtDatasetsService¶added inv0.153.0
func NewProjectsLocationsAdaptiveMtDatasetsService(s *Service) *ProjectsLocationsAdaptiveMtDatasetsService
func (*ProjectsLocationsAdaptiveMtDatasetsService)Create¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsService) Create(parentstring, adaptivemtdataset *AdaptiveMtDataset) *ProjectsLocationsAdaptiveMtDatasetsCreateCall
Create: Creates an Adaptive MT dataset.
- parent: Name of the parent project. In form of`projects/{project-number-or-id}/locations/{location-id}`.
func (*ProjectsLocationsAdaptiveMtDatasetsService)Delete¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsService) Delete(namestring) *ProjectsLocationsAdaptiveMtDatasetsDeleteCall
Delete: Deletes an Adaptive MT dataset, including all its entries andassociated metadata.
- name: Name of the dataset. In the form of`projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}`.
func (*ProjectsLocationsAdaptiveMtDatasetsService)Get¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsService) Get(namestring) *ProjectsLocationsAdaptiveMtDatasetsGetCall
Get: Gets the Adaptive MT dataset.
- name: Name of the dataset. In the form of`projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}`.
func (*ProjectsLocationsAdaptiveMtDatasetsService)ImportAdaptiveMtFile¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsService) ImportAdaptiveMtFile(parentstring, importadaptivemtfilerequest *ImportAdaptiveMtFileRequest) *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall
ImportAdaptiveMtFile: Imports an AdaptiveMtFile and adds all of itssentences into the AdaptiveMtDataset.
- parent: The resource name of the file, in form of`projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}`.
func (*ProjectsLocationsAdaptiveMtDatasetsService)List¶added inv0.153.0
func (r *ProjectsLocationsAdaptiveMtDatasetsService) List(parentstring) *ProjectsLocationsAdaptiveMtDatasetsListCall
List: Lists all Adaptive MT datasets for which the caller has readpermission.
- parent: The resource name of the project from which to list the AdaptiveMT datasets. `projects/{project-number-or-id}/locations/{location-id}`.
typeProjectsLocationsAdaptiveMtTranslateCall¶added inv0.153.0
type ProjectsLocationsAdaptiveMtTranslateCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsAdaptiveMtTranslateCall)Context¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtTranslateCall) Context(ctxcontext.Context) *ProjectsLocationsAdaptiveMtTranslateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsAdaptiveMtTranslateCall)Do¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtTranslateCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtTranslateResponse,error)
Do executes the "translate.projects.locations.adaptiveMtTranslate" call.Any non-2xx status code is an error. Response headers are in either*AdaptiveMtTranslateResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsAdaptiveMtTranslateCall)Fields¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtTranslateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtTranslateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsAdaptiveMtTranslateCall)Header¶added inv0.153.0
func (c *ProjectsLocationsAdaptiveMtTranslateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsBatchTranslateDocumentCall¶added inv0.61.0
type ProjectsLocationsBatchTranslateDocumentCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsBatchTranslateDocumentCall)Context¶added inv0.61.0
func (c *ProjectsLocationsBatchTranslateDocumentCall) Context(ctxcontext.Context) *ProjectsLocationsBatchTranslateDocumentCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsBatchTranslateDocumentCall)Do¶added inv0.61.0
func (c *ProjectsLocationsBatchTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.batchTranslateDocument" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsBatchTranslateDocumentCall)Fields¶added inv0.61.0
func (c *ProjectsLocationsBatchTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateDocumentCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsBatchTranslateDocumentCall)Header¶added inv0.61.0
func (c *ProjectsLocationsBatchTranslateDocumentCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsBatchTranslateTextCall¶
type ProjectsLocationsBatchTranslateTextCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsBatchTranslateTextCall)Context¶
func (c *ProjectsLocationsBatchTranslateTextCall) Context(ctxcontext.Context) *ProjectsLocationsBatchTranslateTextCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsBatchTranslateTextCall)Do¶
func (c *ProjectsLocationsBatchTranslateTextCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.batchTranslateText" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsBatchTranslateTextCall)Fields¶
func (c *ProjectsLocationsBatchTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateTextCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsBatchTranslateTextCall)Header¶
func (c *ProjectsLocationsBatchTranslateTextCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsDatasetsCreateCall¶added inv0.107.0
type ProjectsLocationsDatasetsCreateCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsDatasetsCreateCall)Context¶added inv0.107.0
func (c *ProjectsLocationsDatasetsCreateCall) Context(ctxcontext.Context) *ProjectsLocationsDatasetsCreateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsDatasetsCreateCall)Do¶added inv0.107.0
func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.datasets.create" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsDatasetsCreateCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsDatasetsCreateCall)Header¶added inv0.107.0
func (c *ProjectsLocationsDatasetsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsDatasetsDeleteCall¶added inv0.107.0
type ProjectsLocationsDatasetsDeleteCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsDatasetsDeleteCall)Context¶added inv0.107.0
func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctxcontext.Context) *ProjectsLocationsDatasetsDeleteCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsDatasetsDeleteCall)Do¶added inv0.107.0
func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.datasets.delete" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsDatasetsDeleteCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsDatasetsDeleteCall)Header¶added inv0.107.0
func (c *ProjectsLocationsDatasetsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsDatasetsExamplesListCall¶added inv0.107.0
type ProjectsLocationsDatasetsExamplesListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsDatasetsExamplesListCall)Context¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExamplesListCall) Context(ctxcontext.Context) *ProjectsLocationsDatasetsExamplesListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsDatasetsExamplesListCall)Do¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExamplesListCall) Do(opts ...googleapi.CallOption) (*ListExamplesResponse,error)
Do executes the "translate.projects.locations.datasets.examples.list" call.Any non-2xx status code is an error. Response headers are in either*ListExamplesResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsDatasetsExamplesListCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExamplesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsExamplesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsDatasetsExamplesListCall)Filter¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExamplesListCall) Filter(filterstring) *ProjectsLocationsDatasetsExamplesListCall
Filter sets the optional parameter "filter": An expression for filtering theexamples that will be returned. Example filter: * `usage=TRAIN`
func (*ProjectsLocationsDatasetsExamplesListCall)Header¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExamplesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsDatasetsExamplesListCall)IfNoneMatch¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExamplesListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsDatasetsExamplesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsDatasetsExamplesListCall)PageSize¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExamplesListCall) PageSize(pageSizeint64) *ProjectsLocationsDatasetsExamplesListCall
PageSize sets the optional parameter "pageSize": Requested page size. Theserver can return fewer results than requested.
func (*ProjectsLocationsDatasetsExamplesListCall)PageToken¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExamplesListCall) PageToken(pageTokenstring) *ProjectsLocationsDatasetsExamplesListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results for the server to return. Typically obtained fromnext_page_token field in the response of a ListExamples call.
func (*ProjectsLocationsDatasetsExamplesListCall)Pages¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExamplesListCall) Pages(ctxcontext.Context, f func(*ListExamplesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsDatasetsExamplesService¶added inv0.107.0
type ProjectsLocationsDatasetsExamplesService struct {// contains filtered or unexported fields}funcNewProjectsLocationsDatasetsExamplesService¶added inv0.107.0
func NewProjectsLocationsDatasetsExamplesService(s *Service) *ProjectsLocationsDatasetsExamplesService
func (*ProjectsLocationsDatasetsExamplesService)List¶added inv0.107.0
func (r *ProjectsLocationsDatasetsExamplesService) List(parentstring) *ProjectsLocationsDatasetsExamplesListCall
List: Lists sentence pairs in the dataset.
- parent: Name of the parent dataset. In form of`projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}`.
typeProjectsLocationsDatasetsExportDataCall¶added inv0.107.0
type ProjectsLocationsDatasetsExportDataCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsDatasetsExportDataCall)Context¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExportDataCall) Context(ctxcontext.Context) *ProjectsLocationsDatasetsExportDataCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsDatasetsExportDataCall)Do¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExportDataCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.datasets.exportData" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsDatasetsExportDataCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsExportDataCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsDatasetsExportDataCall)Header¶added inv0.107.0
func (c *ProjectsLocationsDatasetsExportDataCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsDatasetsGetCall¶added inv0.107.0
type ProjectsLocationsDatasetsGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsDatasetsGetCall)Context¶added inv0.107.0
func (c *ProjectsLocationsDatasetsGetCall) Context(ctxcontext.Context) *ProjectsLocationsDatasetsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsDatasetsGetCall)Do¶added inv0.107.0
func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset,error)
Do executes the "translate.projects.locations.datasets.get" call.Any non-2xx status code is an error. Response headers are in either*Dataset.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsDatasetsGetCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsDatasetsGetCall)Header¶added inv0.107.0
func (c *ProjectsLocationsDatasetsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsDatasetsGetCall)IfNoneMatch¶added inv0.107.0
func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsDatasetsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsDatasetsImportDataCall¶added inv0.107.0
type ProjectsLocationsDatasetsImportDataCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsDatasetsImportDataCall)Context¶added inv0.107.0
func (c *ProjectsLocationsDatasetsImportDataCall) Context(ctxcontext.Context) *ProjectsLocationsDatasetsImportDataCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsDatasetsImportDataCall)Do¶added inv0.107.0
func (c *ProjectsLocationsDatasetsImportDataCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.datasets.importData" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsDatasetsImportDataCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsDatasetsImportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsImportDataCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsDatasetsImportDataCall)Header¶added inv0.107.0
func (c *ProjectsLocationsDatasetsImportDataCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsDatasetsListCall¶added inv0.107.0
type ProjectsLocationsDatasetsListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsDatasetsListCall)Context¶added inv0.107.0
func (c *ProjectsLocationsDatasetsListCall) Context(ctxcontext.Context) *ProjectsLocationsDatasetsListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsDatasetsListCall)Do¶added inv0.107.0
func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse,error)
Do executes the "translate.projects.locations.datasets.list" call.Any non-2xx status code is an error. Response headers are in either*ListDatasetsResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsDatasetsListCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsDatasetsListCall)Header¶added inv0.107.0
func (c *ProjectsLocationsDatasetsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsDatasetsListCall)IfNoneMatch¶added inv0.107.0
func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsDatasetsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsDatasetsListCall)PageSize¶added inv0.107.0
func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSizeint64) *ProjectsLocationsDatasetsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Theserver can return fewer results than requested.
func (*ProjectsLocationsDatasetsListCall)PageToken¶added inv0.107.0
func (c *ProjectsLocationsDatasetsListCall) PageToken(pageTokenstring) *ProjectsLocationsDatasetsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results for the server to return. Typically obtained fromnext_page_token field in the response of a ListDatasets call.
func (*ProjectsLocationsDatasetsListCall)Pages¶added inv0.107.0
func (c *ProjectsLocationsDatasetsListCall) Pages(ctxcontext.Context, f func(*ListDatasetsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsDatasetsService¶added inv0.107.0
type ProjectsLocationsDatasetsService struct {Examples *ProjectsLocationsDatasetsExamplesService// contains filtered or unexported fields}funcNewProjectsLocationsDatasetsService¶added inv0.107.0
func NewProjectsLocationsDatasetsService(s *Service) *ProjectsLocationsDatasetsService
func (*ProjectsLocationsDatasetsService)Create¶added inv0.107.0
func (r *ProjectsLocationsDatasetsService) Create(parentstring, dataset *Dataset) *ProjectsLocationsDatasetsCreateCall
Create: Creates a Dataset.
- parent: The project name.
func (*ProjectsLocationsDatasetsService)Delete¶added inv0.107.0
func (r *ProjectsLocationsDatasetsService) Delete(namestring) *ProjectsLocationsDatasetsDeleteCall
Delete: Deletes a dataset and all of its contents.
- name: The name of the dataset to delete.
func (*ProjectsLocationsDatasetsService)ExportData¶added inv0.107.0
func (r *ProjectsLocationsDatasetsService) ExportData(datasetstring, exportdatarequest *ExportDataRequest) *ProjectsLocationsDatasetsExportDataCall
ExportData: Exports dataset's data to the provided output location.
- dataset: Name of the dataset. In form of`projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}`.
func (*ProjectsLocationsDatasetsService)Get¶added inv0.107.0
func (r *ProjectsLocationsDatasetsService) Get(namestring) *ProjectsLocationsDatasetsGetCall
Get: Gets a Dataset.
- name: The resource name of the dataset to retrieve.
func (*ProjectsLocationsDatasetsService)ImportData¶added inv0.107.0
func (r *ProjectsLocationsDatasetsService) ImportData(datasetstring, importdatarequest *ImportDataRequest) *ProjectsLocationsDatasetsImportDataCall
ImportData: Import sentence pairs into translation Dataset.
- dataset: Name of the dataset. In form of`projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}`.
func (*ProjectsLocationsDatasetsService)List¶added inv0.107.0
func (r *ProjectsLocationsDatasetsService) List(parentstring) *ProjectsLocationsDatasetsListCall
List: Lists datasets.
- parent: Name of the parent project. In form of`projects/{project-number-or-id}/locations/{location-id}`.
typeProjectsLocationsDetectLanguageCall¶
type ProjectsLocationsDetectLanguageCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsDetectLanguageCall)Context¶
func (c *ProjectsLocationsDetectLanguageCall) Context(ctxcontext.Context) *ProjectsLocationsDetectLanguageCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsDetectLanguageCall)Do¶
func (c *ProjectsLocationsDetectLanguageCall) Do(opts ...googleapi.CallOption) (*DetectLanguageResponse,error)
Do executes the "translate.projects.locations.detectLanguage" call.Any non-2xx status code is an error. Response headers are in either*DetectLanguageResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsDetectLanguageCall)Fields¶
func (c *ProjectsLocationsDetectLanguageCall) Fields(s ...googleapi.Field) *ProjectsLocationsDetectLanguageCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsDetectLanguageCall)Header¶
func (c *ProjectsLocationsDetectLanguageCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsGetCall¶
type ProjectsLocationsGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGetCall)Context¶
func (c *ProjectsLocationsGetCall) Context(ctxcontext.Context) *ProjectsLocationsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGetCall)Do¶
func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location,error)
Do executes the "translate.projects.locations.get" call.Any non-2xx status code is an error. Response headers are in either*Location.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGetCall)Fields¶
func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGetCall)Header¶
func (c *ProjectsLocationsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsGetCall)IfNoneMatch¶
func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsGetSupportedLanguagesCall¶
type ProjectsLocationsGetSupportedLanguagesCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGetSupportedLanguagesCall)Context¶
func (c *ProjectsLocationsGetSupportedLanguagesCall) Context(ctxcontext.Context) *ProjectsLocationsGetSupportedLanguagesCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGetSupportedLanguagesCall)DisplayLanguageCode¶
func (c *ProjectsLocationsGetSupportedLanguagesCall) DisplayLanguageCode(displayLanguageCodestring) *ProjectsLocationsGetSupportedLanguagesCall
DisplayLanguageCode sets the optional parameter "displayLanguageCode": Thelanguage to use to return localized, human readable names of supportedlanguages. If missing, then display names are not returned in a response.
func (*ProjectsLocationsGetSupportedLanguagesCall)Do¶
func (c *ProjectsLocationsGetSupportedLanguagesCall) Do(opts ...googleapi.CallOption) (*SupportedLanguages,error)
Do executes the "translate.projects.locations.getSupportedLanguages" call.Any non-2xx status code is an error. Response headers are in either*SupportedLanguages.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsGetSupportedLanguagesCall)Fields¶
func (c *ProjectsLocationsGetSupportedLanguagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetSupportedLanguagesCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGetSupportedLanguagesCall)Header¶
func (c *ProjectsLocationsGetSupportedLanguagesCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsGetSupportedLanguagesCall)IfNoneMatch¶
func (c *ProjectsLocationsGetSupportedLanguagesCall) IfNoneMatch(entityTagstring) *ProjectsLocationsGetSupportedLanguagesCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsGetSupportedLanguagesCall)Model¶
func (c *ProjectsLocationsGetSupportedLanguagesCall) Model(modelstring) *ProjectsLocationsGetSupportedLanguagesCall
Model sets the optional parameter "model": Get supported languages of thismodel. 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`,
Returns languages supported by the specified model. If missing, we get
supported languages of Google general NMT model.
typeProjectsLocationsGlossariesCreateCall¶
type ProjectsLocationsGlossariesCreateCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesCreateCall)Context¶
func (c *ProjectsLocationsGlossariesCreateCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesCreateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesCreateCall)Do¶
func (c *ProjectsLocationsGlossariesCreateCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.glossaries.create" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGlossariesCreateCall)Fields¶
func (c *ProjectsLocationsGlossariesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesCreateCall)Header¶
func (c *ProjectsLocationsGlossariesCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsGlossariesDeleteCall¶
type ProjectsLocationsGlossariesDeleteCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesDeleteCall)Context¶
func (c *ProjectsLocationsGlossariesDeleteCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesDeleteCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesDeleteCall)Do¶
func (c *ProjectsLocationsGlossariesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.glossaries.delete" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGlossariesDeleteCall)Fields¶
func (c *ProjectsLocationsGlossariesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesDeleteCall)Header¶
func (c *ProjectsLocationsGlossariesDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsGlossariesGetCall¶
type ProjectsLocationsGlossariesGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesGetCall)Context¶
func (c *ProjectsLocationsGlossariesGetCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesGetCall)Do¶
func (c *ProjectsLocationsGlossariesGetCall) Do(opts ...googleapi.CallOption) (*Glossary,error)
Do executes the "translate.projects.locations.glossaries.get" call.Any non-2xx status code is an error. Response headers are in either*Glossary.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGlossariesGetCall)Fields¶
func (c *ProjectsLocationsGlossariesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesGetCall)Header¶
func (c *ProjectsLocationsGlossariesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsGlossariesGetCall)IfNoneMatch¶
func (c *ProjectsLocationsGlossariesGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsGlossariesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsGlossariesGlossaryEntriesCreateCall¶added inv0.93.0
type ProjectsLocationsGlossariesGlossaryEntriesCreateCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesGlossaryEntriesCreateCall)Context¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesCreateCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesGlossaryEntriesCreateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesGlossaryEntriesCreateCall)Do¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GlossaryEntry,error)
Do executes the "translate.projects.locations.glossaries.glossaryEntries.create" call.Any non-2xx status code is an error. Response headers are in either*GlossaryEntry.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGlossariesGlossaryEntriesCreateCall)Fields¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesGlossaryEntriesCreateCall)Header¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsGlossariesGlossaryEntriesDeleteCall¶added inv0.93.0
type ProjectsLocationsGlossariesGlossaryEntriesDeleteCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesGlossaryEntriesDeleteCall)Context¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesGlossaryEntriesDeleteCall)Do¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "translate.projects.locations.glossaries.glossaryEntries.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGlossariesGlossaryEntriesDeleteCall)Fields¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesGlossaryEntriesDeleteCall)Header¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsGlossariesGlossaryEntriesGetCall¶added inv0.93.0
type ProjectsLocationsGlossariesGlossaryEntriesGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesGlossaryEntriesGetCall)Context¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesGlossaryEntriesGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesGlossaryEntriesGetCall)Do¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) Do(opts ...googleapi.CallOption) (*GlossaryEntry,error)
Do executes the "translate.projects.locations.glossaries.glossaryEntries.get" call.Any non-2xx status code is an error. Response headers are in either*GlossaryEntry.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGlossariesGlossaryEntriesGetCall)Fields¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesGlossaryEntriesGetCall)Header¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsGlossariesGlossaryEntriesGetCall)IfNoneMatch¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsGlossariesGlossaryEntriesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsGlossariesGlossaryEntriesListCall¶added inv0.93.0
type ProjectsLocationsGlossariesGlossaryEntriesListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesGlossaryEntriesListCall)Context¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesGlossaryEntriesListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesGlossaryEntriesListCall)Do¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Do(opts ...googleapi.CallOption) (*ListGlossaryEntriesResponse,error)
Do executes the "translate.projects.locations.glossaries.glossaryEntries.list" call.Any non-2xx status code is an error. Response headers are in either*ListGlossaryEntriesResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsGlossariesGlossaryEntriesListCall)Fields¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesGlossaryEntriesListCall)Header¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsGlossariesGlossaryEntriesListCall)IfNoneMatch¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsGlossariesGlossaryEntriesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsGlossariesGlossaryEntriesListCall)PageSize¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) PageSize(pageSizeint64) *ProjectsLocationsGlossariesGlossaryEntriesListCall
PageSize sets the optional parameter "pageSize": Requested page size. Theserver may return fewer glossary entries than requested. If unspecified, theserver picks an appropriate default.
func (*ProjectsLocationsGlossariesGlossaryEntriesListCall)PageToken¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) PageToken(pageTokenstring) *ProjectsLocationsGlossariesGlossaryEntriesListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Typically, this is the value of[ListGlossaryEntriesResponse.next_page_token] returned from the previouscall. The first page is returned if `page_token`is empty or missing.
func (*ProjectsLocationsGlossariesGlossaryEntriesListCall)Pages¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Pages(ctxcontext.Context, f func(*ListGlossaryEntriesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsGlossariesGlossaryEntriesPatchCall¶added inv0.93.0
type ProjectsLocationsGlossariesGlossaryEntriesPatchCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesGlossaryEntriesPatchCall)Context¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesPatchCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesGlossaryEntriesPatchCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesGlossaryEntriesPatchCall)Do¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesPatchCall) Do(opts ...googleapi.CallOption) (*GlossaryEntry,error)
Do executes the "translate.projects.locations.glossaries.glossaryEntries.patch" call.Any non-2xx status code is an error. Response headers are in either*GlossaryEntry.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGlossariesGlossaryEntriesPatchCall)Fields¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGlossaryEntriesPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesGlossaryEntriesPatchCall)Header¶added inv0.93.0
func (c *ProjectsLocationsGlossariesGlossaryEntriesPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsGlossariesGlossaryEntriesService¶added inv0.93.0
type ProjectsLocationsGlossariesGlossaryEntriesService struct {// contains filtered or unexported fields}funcNewProjectsLocationsGlossariesGlossaryEntriesService¶added inv0.93.0
func NewProjectsLocationsGlossariesGlossaryEntriesService(s *Service) *ProjectsLocationsGlossariesGlossaryEntriesService
func (*ProjectsLocationsGlossariesGlossaryEntriesService)Create¶added inv0.93.0
func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Create(parentstring, glossaryentry *GlossaryEntry) *ProjectsLocationsGlossariesGlossaryEntriesCreateCall
Create: Creates a glossary entry.
- parent: The resource name of the glossary to create the entry under.
func (*ProjectsLocationsGlossariesGlossaryEntriesService)Delete¶added inv0.93.0
func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Delete(namestring) *ProjectsLocationsGlossariesGlossaryEntriesDeleteCall
Delete: Deletes a single entry from the glossary
- name: The resource name of the glossary entry to delete.
func (*ProjectsLocationsGlossariesGlossaryEntriesService)Get¶added inv0.93.0
func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Get(namestring) *ProjectsLocationsGlossariesGlossaryEntriesGetCall
Get: Gets a single glossary entry by the given id.
- name: The resource name of the glossary entry to get.
func (*ProjectsLocationsGlossariesGlossaryEntriesService)List¶added inv0.93.0
func (r *ProjectsLocationsGlossariesGlossaryEntriesService) List(parentstring) *ProjectsLocationsGlossariesGlossaryEntriesListCall
List: List the entries for the glossary.
- parent: The parent glossary resource name for listing the glossary'sentries.
func (*ProjectsLocationsGlossariesGlossaryEntriesService)Patch¶added inv0.93.0
func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Patch(namestring, glossaryentry *GlossaryEntry) *ProjectsLocationsGlossariesGlossaryEntriesPatchCall
Patch: Updates a glossary entry.
- name: Identifier. The resource name of the entry. Format:`projects/*/locations/*/glossaries/*/glossaryEntries/*`.
typeProjectsLocationsGlossariesListCall¶
type ProjectsLocationsGlossariesListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesListCall)Context¶
func (c *ProjectsLocationsGlossariesListCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesListCall)Do¶
func (c *ProjectsLocationsGlossariesListCall) Do(opts ...googleapi.CallOption) (*ListGlossariesResponse,error)
Do executes the "translate.projects.locations.glossaries.list" call.Any non-2xx status code is an error. Response headers are in either*ListGlossariesResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsGlossariesListCall)Fields¶
func (c *ProjectsLocationsGlossariesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesListCall)Filter¶
func (c *ProjectsLocationsGlossariesListCall) Filter(filterstring) *ProjectsLocationsGlossariesListCall
Filter sets the optional parameter "filter": Filter specifying constraintsof a list operation. Specify the constraint by the format of "key=value",where key must be "src" or "tgt", and the value must be a valid languagecode. For multiple restrictions, concatenate them by "AND" (uppercase only),such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is usedhere, which means using 'en-US' and 'en' can lead to different results,which depends on the language code you used when you create the glossary.For the unidirectional glossaries, the "src" and "tgt" add restrictions onthe source and target language code separately. For the equivalent term setglossaries, the "src" and/or "tgt" add restrictions on the term set. Forexample: "src=en-US AND tgt=zh-CN" will only pick the unidirectionalglossaries which exactly match the source language code as "en-US" and thetarget language code "zh-CN", but all equivalent term set glossaries whichcontain "en-US" and "zh-CN" in their language set will be picked. Ifmissing, no filtering is performed.
func (*ProjectsLocationsGlossariesListCall)Header¶
func (c *ProjectsLocationsGlossariesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsGlossariesListCall)IfNoneMatch¶
func (c *ProjectsLocationsGlossariesListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsGlossariesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsGlossariesListCall)PageSize¶
func (c *ProjectsLocationsGlossariesListCall) PageSize(pageSizeint64) *ProjectsLocationsGlossariesListCall
PageSize sets the optional parameter "pageSize": Requested page size. Theserver may return fewer glossaries than requested. If unspecified, theserver picks an appropriate default.
func (*ProjectsLocationsGlossariesListCall)PageToken¶
func (c *ProjectsLocationsGlossariesListCall) PageToken(pageTokenstring) *ProjectsLocationsGlossariesListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Typically, this is the value of[ListGlossariesResponse.next_page_token] returned from the previous call to`ListGlossaries` method. The first page is returned if `page_token`is emptyor missing.
func (*ProjectsLocationsGlossariesListCall)Pages¶
func (c *ProjectsLocationsGlossariesListCall) Pages(ctxcontext.Context, f func(*ListGlossariesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsGlossariesPatchCall¶added inv0.93.0
type ProjectsLocationsGlossariesPatchCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGlossariesPatchCall)Context¶added inv0.93.0
func (c *ProjectsLocationsGlossariesPatchCall) Context(ctxcontext.Context) *ProjectsLocationsGlossariesPatchCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGlossariesPatchCall)Do¶added inv0.93.0
func (c *ProjectsLocationsGlossariesPatchCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.glossaries.patch" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGlossariesPatchCall)Fields¶added inv0.93.0
func (c *ProjectsLocationsGlossariesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGlossariesPatchCall)Header¶added inv0.93.0
func (c *ProjectsLocationsGlossariesPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsGlossariesPatchCall)UpdateMask¶added inv0.93.0
func (c *ProjectsLocationsGlossariesPatchCall) UpdateMask(updateMaskstring) *ProjectsLocationsGlossariesPatchCall
UpdateMask sets the optional parameter "updateMask": The list of fields tobe updated. Currently only `display_name` and 'input_config'
typeProjectsLocationsGlossariesService¶
type ProjectsLocationsGlossariesService struct {GlossaryEntries *ProjectsLocationsGlossariesGlossaryEntriesService// contains filtered or unexported fields}funcNewProjectsLocationsGlossariesService¶
func NewProjectsLocationsGlossariesService(s *Service) *ProjectsLocationsGlossariesService
func (*ProjectsLocationsGlossariesService)Create¶
func (r *ProjectsLocationsGlossariesService) Create(parentstring, glossary *Glossary) *ProjectsLocationsGlossariesCreateCall
Create: Creates a glossary and returns the long-running operation. ReturnsNOT_FOUND, if the project doesn't exist.
- parent: The project name.
func (*ProjectsLocationsGlossariesService)Delete¶
func (r *ProjectsLocationsGlossariesService) Delete(namestring) *ProjectsLocationsGlossariesDeleteCall
Delete: Deletes a glossary, or cancels glossary construction if the glossaryisn't created yet. Returns NOT_FOUND, if the glossary doesn't exist.
- name: The name of the glossary to delete.
func (*ProjectsLocationsGlossariesService)Get¶
func (r *ProjectsLocationsGlossariesService) Get(namestring) *ProjectsLocationsGlossariesGetCall
Get: Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
- name: The name of the glossary to retrieve.
func (*ProjectsLocationsGlossariesService)List¶
func (r *ProjectsLocationsGlossariesService) List(parentstring) *ProjectsLocationsGlossariesListCall
List: Lists glossaries in a project. Returns NOT_FOUND, if the projectdoesn't exist.
- parent: The name of the project from which to list all of the glossaries.
func (*ProjectsLocationsGlossariesService)Patch¶added inv0.93.0
func (r *ProjectsLocationsGlossariesService) Patch(namestring, glossary *Glossary) *ProjectsLocationsGlossariesPatchCall
Patch: Updates a glossary. A LRO is used since the update can be async ifthe glossary's entry file is updated.
- name: The resource name of the glossary. Glossary names have the form`projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
typeProjectsLocationsListCall¶
type ProjectsLocationsListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsListCall)Context¶
func (c *ProjectsLocationsListCall) Context(ctxcontext.Context) *ProjectsLocationsListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsListCall)Do¶
func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse,error)
Do executes the "translate.projects.locations.list" call.Any non-2xx status code is an error. Response headers are in either*ListLocationsResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsListCall)ExtraLocationTypes¶added inv0.231.0
func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall
ExtraLocationTypes sets the optional parameter "extraLocationTypes": A listof extra location types that should be used as conditions for controllingthe visibility of the locations.
func (*ProjectsLocationsListCall)Fields¶
func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsListCall)Filter¶
func (c *ProjectsLocationsListCall) Filter(filterstring) *ProjectsLocationsListCall
Filter sets the optional parameter "filter": A filter to narrow down resultsto a preferred subset. The filtering language accepts strings like"displayName=tokyo", and is documented in more detail in AIP-160(https://google.aip.dev/160).
func (*ProjectsLocationsListCall)Header¶
func (c *ProjectsLocationsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsListCall)IfNoneMatch¶
func (c *ProjectsLocationsListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsListCall)PageSize¶
func (c *ProjectsLocationsListCall) PageSize(pageSizeint64) *ProjectsLocationsListCall
PageSize sets the optional parameter "pageSize": The maximum number ofresults to return. If not set, the service selects a default.
func (*ProjectsLocationsListCall)PageToken¶
func (c *ProjectsLocationsListCall) PageToken(pageTokenstring) *ProjectsLocationsListCall
PageToken sets the optional parameter "pageToken": A page token receivedfrom the `next_page_token` field in the response. Send that page token toreceive the subsequent page.
func (*ProjectsLocationsListCall)Pages¶
func (c *ProjectsLocationsListCall) Pages(ctxcontext.Context, f func(*ListLocationsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsModelsCreateCall¶added inv0.107.0
type ProjectsLocationsModelsCreateCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsModelsCreateCall)Context¶added inv0.107.0
func (c *ProjectsLocationsModelsCreateCall) Context(ctxcontext.Context) *ProjectsLocationsModelsCreateCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsModelsCreateCall)Do¶added inv0.107.0
func (c *ProjectsLocationsModelsCreateCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.models.create" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsModelsCreateCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsModelsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsModelsCreateCall)Header¶added inv0.107.0
func (c *ProjectsLocationsModelsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsModelsDeleteCall¶added inv0.107.0
type ProjectsLocationsModelsDeleteCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsModelsDeleteCall)Context¶added inv0.107.0
func (c *ProjectsLocationsModelsDeleteCall) Context(ctxcontext.Context) *ProjectsLocationsModelsDeleteCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsModelsDeleteCall)Do¶added inv0.107.0
func (c *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.models.delete" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsModelsDeleteCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsModelsDeleteCall)Header¶added inv0.107.0
func (c *ProjectsLocationsModelsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsModelsGetCall¶added inv0.107.0
type ProjectsLocationsModelsGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsModelsGetCall)Context¶added inv0.107.0
func (c *ProjectsLocationsModelsGetCall) Context(ctxcontext.Context) *ProjectsLocationsModelsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsModelsGetCall)Do¶added inv0.107.0
func (c *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*Model,error)
Do executes the "translate.projects.locations.models.get" call.Any non-2xx status code is an error. Response headers are in either*Model.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsModelsGetCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsModelsGetCall)Header¶added inv0.107.0
func (c *ProjectsLocationsModelsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsModelsGetCall)IfNoneMatch¶added inv0.107.0
func (c *ProjectsLocationsModelsGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsModelsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsModelsListCall¶added inv0.107.0
type ProjectsLocationsModelsListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsModelsListCall)Context¶added inv0.107.0
func (c *ProjectsLocationsModelsListCall) Context(ctxcontext.Context) *ProjectsLocationsModelsListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsModelsListCall)Do¶added inv0.107.0
func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*ListModelsResponse,error)
Do executes the "translate.projects.locations.models.list" call.Any non-2xx status code is an error. Response headers are in either*ListModelsResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsModelsListCall)Fields¶added inv0.107.0
func (c *ProjectsLocationsModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsModelsListCall)Filter¶added inv0.107.0
func (c *ProjectsLocationsModelsListCall) Filter(filterstring) *ProjectsLocationsModelsListCall
Filter sets the optional parameter "filter": An expression for filtering themodels that will be returned. Supported filter: `dataset_id=${dataset_id}`
func (*ProjectsLocationsModelsListCall)Header¶added inv0.107.0
func (c *ProjectsLocationsModelsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsModelsListCall)IfNoneMatch¶added inv0.107.0
func (c *ProjectsLocationsModelsListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsModelsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsModelsListCall)PageSize¶added inv0.107.0
func (c *ProjectsLocationsModelsListCall) PageSize(pageSizeint64) *ProjectsLocationsModelsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Theserver can return fewer results than requested.
func (*ProjectsLocationsModelsListCall)PageToken¶added inv0.107.0
func (c *ProjectsLocationsModelsListCall) PageToken(pageTokenstring) *ProjectsLocationsModelsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results for the server to return. Typically obtained fromnext_page_token field in the response of a ListModels call.
func (*ProjectsLocationsModelsListCall)Pages¶added inv0.107.0
func (c *ProjectsLocationsModelsListCall) Pages(ctxcontext.Context, f func(*ListModelsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsModelsService¶added inv0.107.0
type ProjectsLocationsModelsService struct {// contains filtered or unexported fields}funcNewProjectsLocationsModelsService¶added inv0.107.0
func NewProjectsLocationsModelsService(s *Service) *ProjectsLocationsModelsService
func (*ProjectsLocationsModelsService)Create¶added inv0.107.0
func (r *ProjectsLocationsModelsService) Create(parentstring, model *Model) *ProjectsLocationsModelsCreateCall
Create: Creates a Model.
- parent: The project name, in form of`projects/{project}/locations/{location}`.
func (*ProjectsLocationsModelsService)Delete¶added inv0.107.0
func (r *ProjectsLocationsModelsService) Delete(namestring) *ProjectsLocationsModelsDeleteCall
Delete: Deletes a model.
- name: The name of the model to delete.
func (*ProjectsLocationsModelsService)Get¶added inv0.107.0
func (r *ProjectsLocationsModelsService) Get(namestring) *ProjectsLocationsModelsGetCall
Get: Gets a model.
- name: The resource name of the model to retrieve.
func (*ProjectsLocationsModelsService)List¶added inv0.107.0
func (r *ProjectsLocationsModelsService) List(parentstring) *ProjectsLocationsModelsListCall
List: Lists models.
- parent: Name of the parent project. In form of`projects/{project-number-or-id}/locations/{location-id}`.
typeProjectsLocationsOperationsCancelCall¶
type ProjectsLocationsOperationsCancelCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsOperationsCancelCall)Context¶
func (c *ProjectsLocationsOperationsCancelCall) Context(ctxcontext.Context) *ProjectsLocationsOperationsCancelCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsOperationsCancelCall)Do¶
func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "translate.projects.locations.operations.cancel" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsOperationsCancelCall)Fields¶
func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsOperationsCancelCall)Header¶
func (c *ProjectsLocationsOperationsCancelCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsOperationsDeleteCall¶
type ProjectsLocationsOperationsDeleteCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsOperationsDeleteCall)Context¶
func (c *ProjectsLocationsOperationsDeleteCall) Context(ctxcontext.Context) *ProjectsLocationsOperationsDeleteCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsOperationsDeleteCall)Do¶
func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "translate.projects.locations.operations.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsOperationsDeleteCall)Fields¶
func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsOperationsDeleteCall)Header¶
func (c *ProjectsLocationsOperationsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsOperationsGetCall¶
type ProjectsLocationsOperationsGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsOperationsGetCall)Context¶
func (c *ProjectsLocationsOperationsGetCall) Context(ctxcontext.Context) *ProjectsLocationsOperationsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsOperationsGetCall)Do¶
func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.operations.get" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsOperationsGetCall)Fields¶
func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsOperationsGetCall)Header¶
func (c *ProjectsLocationsOperationsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsOperationsGetCall)IfNoneMatch¶
func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsOperationsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsOperationsListCall¶
type ProjectsLocationsOperationsListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsOperationsListCall)Context¶
func (c *ProjectsLocationsOperationsListCall) Context(ctxcontext.Context) *ProjectsLocationsOperationsListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsOperationsListCall)Do¶
func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse,error)
Do executes the "translate.projects.locations.operations.list" call.Any non-2xx status code is an error. Response headers are in either*ListOperationsResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsOperationsListCall)Fields¶
func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsOperationsListCall)Filter¶
func (c *ProjectsLocationsOperationsListCall) Filter(filterstring) *ProjectsLocationsOperationsListCall
Filter sets the optional parameter "filter": The standard list filter.
func (*ProjectsLocationsOperationsListCall)Header¶
func (c *ProjectsLocationsOperationsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsOperationsListCall)IfNoneMatch¶
func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsOperationsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsOperationsListCall)PageSize¶
func (c *ProjectsLocationsOperationsListCall) PageSize(pageSizeint64) *ProjectsLocationsOperationsListCall
PageSize sets the optional parameter "pageSize": The standard list pagesize.
func (*ProjectsLocationsOperationsListCall)PageToken¶
func (c *ProjectsLocationsOperationsListCall) PageToken(pageTokenstring) *ProjectsLocationsOperationsListCall
PageToken sets the optional parameter "pageToken": The standard list pagetoken.
func (*ProjectsLocationsOperationsListCall)Pages¶
func (c *ProjectsLocationsOperationsListCall) Pages(ctxcontext.Context, f func(*ListOperationsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsOperationsService¶
type ProjectsLocationsOperationsService struct {// contains filtered or unexported fields}funcNewProjectsLocationsOperationsService¶
func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService
func (*ProjectsLocationsOperationsService)Cancel¶
func (r *ProjectsLocationsOperationsService) Cancel(namestring, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall
Cancel: Starts asynchronous cancellation on a long-running operation. Theserver makes a best effort to cancel the operation, but success is notguaranteed. If the server doesn't support this method, it returns`google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation orother methods to check whether the cancellation succeeded or whether theoperation completed despite cancellation. On successful cancellation, theoperation is not deleted; instead, it becomes an operation with anOperation.error value with a google.rpc.Status.code of `1`, corresponding to`Code.CANCELLED`.
- name: The name of the operation resource to be cancelled.
func (*ProjectsLocationsOperationsService)Delete¶
func (r *ProjectsLocationsOperationsService) Delete(namestring) *ProjectsLocationsOperationsDeleteCall
Delete: Deletes a long-running operation. This method indicates that theclient is no longer interested in the operation result. It does not cancelthe operation. If the server doesn't support this method, it returns`google.rpc.Code.UNIMPLEMENTED`.
- name: The name of the operation resource to be deleted.
func (*ProjectsLocationsOperationsService)Get¶
func (r *ProjectsLocationsOperationsService) Get(namestring) *ProjectsLocationsOperationsGetCall
Get: Gets the latest state of a long-running operation. Clients can use thismethod to poll the operation result at intervals as recommended by the APIservice.
- name: The name of the operation resource.
func (*ProjectsLocationsOperationsService)List¶
func (r *ProjectsLocationsOperationsService) List(namestring) *ProjectsLocationsOperationsListCall
List: Lists operations that match the specified filter in the request. Ifthe server doesn't support this method, it returns `UNIMPLEMENTED`.
- name: The name of the operation's parent resource.
func (*ProjectsLocationsOperationsService)Wait¶
func (r *ProjectsLocationsOperationsService) Wait(namestring, waitoperationrequest *WaitOperationRequest) *ProjectsLocationsOperationsWaitCall
Wait: Waits until the specified long-running operation is done or reaches atmost a specified timeout, returning the latest state. If the operation isalready done, the latest state is immediately returned. If the timeoutspecified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeoutis used. If the server does not support this method, it returns`google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effortbasis. It may return the latest state before the specified timeout(including immediately), meaning even an immediate response is no guaranteethat the operation is done.
- name: The name of the operation resource to wait on.
typeProjectsLocationsOperationsWaitCall¶
type ProjectsLocationsOperationsWaitCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsOperationsWaitCall)Context¶
func (c *ProjectsLocationsOperationsWaitCall) Context(ctxcontext.Context) *ProjectsLocationsOperationsWaitCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsOperationsWaitCall)Do¶
func (c *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "translate.projects.locations.operations.wait" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsOperationsWaitCall)Fields¶
func (c *ProjectsLocationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsWaitCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsOperationsWaitCall)Header¶
func (c *ProjectsLocationsOperationsWaitCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsRomanizeTextCall¶added inv0.125.0
type ProjectsLocationsRomanizeTextCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsRomanizeTextCall)Context¶added inv0.125.0
func (c *ProjectsLocationsRomanizeTextCall) Context(ctxcontext.Context) *ProjectsLocationsRomanizeTextCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsRomanizeTextCall)Do¶added inv0.125.0
func (c *ProjectsLocationsRomanizeTextCall) Do(opts ...googleapi.CallOption) (*RomanizeTextResponse,error)
Do executes the "translate.projects.locations.romanizeText" call.Any non-2xx status code is an error. Response headers are in either*RomanizeTextResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsRomanizeTextCall)Fields¶added inv0.125.0
func (c *ProjectsLocationsRomanizeTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsRomanizeTextCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsRomanizeTextCall)Header¶added inv0.125.0
func (c *ProjectsLocationsRomanizeTextCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsService¶
type ProjectsLocationsService struct {AdaptiveMtDatasets *ProjectsLocationsAdaptiveMtDatasetsServiceDatasets *ProjectsLocationsDatasetsServiceGlossaries *ProjectsLocationsGlossariesServiceModels *ProjectsLocationsModelsServiceOperations *ProjectsLocationsOperationsService// contains filtered or unexported fields}funcNewProjectsLocationsService¶
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService
func (*ProjectsLocationsService)AdaptiveMtTranslate¶added inv0.153.0
func (r *ProjectsLocationsService) AdaptiveMtTranslate(parentstring, adaptivemttranslaterequest *AdaptiveMtTranslateRequest) *ProjectsLocationsAdaptiveMtTranslateCall
AdaptiveMtTranslate: Translate text using Adaptive MT.
- parent: Location to make a regional call. Format:`projects/{project-number-or-id}/locations/{location-id}`.
func (*ProjectsLocationsService)BatchTranslateDocument¶added inv0.61.0
func (r *ProjectsLocationsService) BatchTranslateDocument(parentstring, batchtranslatedocumentrequest *BatchTranslateDocumentRequest) *ProjectsLocationsBatchTranslateDocumentCall
BatchTranslateDocument: Translates a large volume of document inasynchronous batch mode. This function provides real-time output as theinputs 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 thespecified output location. This call returns immediately and you can usegoogle.longrunning.Operation.name to poll the status of the call.
- parent: 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 Translationmodels or glossaries within the same region (have the same location-id)can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
func (*ProjectsLocationsService)BatchTranslateText¶
func (r *ProjectsLocationsService) BatchTranslateText(parentstring, batchtranslatetextrequest *BatchTranslateTextRequest) *ProjectsLocationsBatchTranslateTextCall
BatchTranslateText: Translates a large volume of text in asynchronous batchmode. This function provides real-time output as the inputs are beingprocessed. If caller cancels a request, the partial results (for an inputfile, it's all or nothing) may still be available on the specified outputlocation. This call returns immediately and you can usegoogle.longrunning.Operation.name to poll the status of the call.
- parent: 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 Translationmodels or glossaries within the same region (have the same location-id)can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
func (*ProjectsLocationsService)DetectLanguage¶
func (r *ProjectsLocationsService) DetectLanguage(parentstring, detectlanguagerequest *DetectLanguageRequest) *ProjectsLocationsDetectLanguageCall
DetectLanguage: Detects the language of text within a request.
- parent: Project or location to make a call. Must refer to a caller'sproject. 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 (hassame location-id) can be used. Otherwise an INVALID_ARGUMENT (400) erroris returned.
func (*ProjectsLocationsService)Get¶
func (r *ProjectsLocationsService) Get(namestring) *ProjectsLocationsGetCall
Get: Gets information about a location.
- name: Resource name for the location.
func (*ProjectsLocationsService)GetSupportedLanguages¶
func (r *ProjectsLocationsService) GetSupportedLanguages(parentstring) *ProjectsLocationsGetSupportedLanguagesCall
GetSupportedLanguages: Returns a list of supported languages fortranslation.
- parent: Project or location to make a call. Must refer to a caller'sproject. Format: `projects/{project-number-or-id}` or`projects/{project-number-or-id}/locations/{location-id}`. For globalcalls, use `projects/{project-number-or-id}/locations/global` or`projects/{project-number-or-id}`. Non-global location is required forAutoML models. Only models within the same region (have same location-id)can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
func (*ProjectsLocationsService)List¶
func (r *ProjectsLocationsService) List(namestring) *ProjectsLocationsListCall
List: Lists information about the supported locations for this service.
- name: The resource that owns the locations collection, if applicable.
func (*ProjectsLocationsService)RomanizeText¶added inv0.125.0
func (r *ProjectsLocationsService) RomanizeText(parentstring, romanizetextrequest *RomanizeTextRequest) *ProjectsLocationsRomanizeTextCall
RomanizeText: Romanize input text written in non-Latin scripts to Latintext.
- parent: Project or location to make a call. Must refer to a caller'sproject. 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}`.
func (*ProjectsLocationsService)TranslateDocument¶added inv0.61.0
func (r *ProjectsLocationsService) TranslateDocument(parentstring, translatedocumentrequest *TranslateDocumentRequest) *ProjectsLocationsTranslateDocumentCall
TranslateDocument: Translates documents in synchronous mode.
- parent: Location to make a regional call. Format:`projects/{project-number-or-id}/locations/{location-id}`. For globalcalls, use `projects/{project-number-or-id}/locations/global` or`projects/{project-number-or-id}`. Non-global location is required forrequests using AutoML models or custom glossaries. Models and glossariesmust be within the same region (have the same location-id), otherwise anINVALID_ARGUMENT (400) error is returned.
func (*ProjectsLocationsService)TranslateText¶
func (r *ProjectsLocationsService) TranslateText(parentstring, translatetextrequest *TranslateTextRequest) *ProjectsLocationsTranslateTextCall
TranslateText: Translates input text and returns translated text.
- parent: Project or location to make a call. Must refer to a caller'sproject. Format: `projects/{project-number-or-id}` or`projects/{project-number-or-id}/locations/{location-id}`. For globalcalls, use `projects/{project-number-or-id}/locations/global` or`projects/{project-number-or-id}`. Non-global location is required forrequests using AutoML models or custom glossaries. Models and glossariesmust be within the same region (have same location-id), otherwise anINVALID_ARGUMENT (400) error is returned.
typeProjectsLocationsTranslateDocumentCall¶added inv0.61.0
type ProjectsLocationsTranslateDocumentCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsTranslateDocumentCall)Context¶added inv0.61.0
func (c *ProjectsLocationsTranslateDocumentCall) Context(ctxcontext.Context) *ProjectsLocationsTranslateDocumentCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsTranslateDocumentCall)Do¶added inv0.61.0
func (c *ProjectsLocationsTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*TranslateDocumentResponse,error)
Do executes the "translate.projects.locations.translateDocument" call.Any non-2xx status code is an error. Response headers are in either*TranslateDocumentResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsTranslateDocumentCall)Fields¶added inv0.61.0
func (c *ProjectsLocationsTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateDocumentCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsTranslateDocumentCall)Header¶added inv0.61.0
func (c *ProjectsLocationsTranslateDocumentCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsLocationsTranslateTextCall¶
type ProjectsLocationsTranslateTextCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsTranslateTextCall)Context¶
func (c *ProjectsLocationsTranslateTextCall) Context(ctxcontext.Context) *ProjectsLocationsTranslateTextCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsTranslateTextCall)Do¶
func (c *ProjectsLocationsTranslateTextCall) Do(opts ...googleapi.CallOption) (*TranslateTextResponse,error)
Do executes the "translate.projects.locations.translateText" call.Any non-2xx status code is an error. Response headers are in either*TranslateTextResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsTranslateTextCall)Fields¶
func (c *ProjectsLocationsTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateTextCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsTranslateTextCall)Header¶
func (c *ProjectsLocationsTranslateTextCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsRomanizeTextCall¶added inv0.125.0
type ProjectsRomanizeTextCall struct {// contains filtered or unexported fields}func (*ProjectsRomanizeTextCall)Context¶added inv0.125.0
func (c *ProjectsRomanizeTextCall) Context(ctxcontext.Context) *ProjectsRomanizeTextCall
Context sets the context to be used in this call's Do method.
func (*ProjectsRomanizeTextCall)Do¶added inv0.125.0
func (c *ProjectsRomanizeTextCall) Do(opts ...googleapi.CallOption) (*RomanizeTextResponse,error)
Do executes the "translate.projects.romanizeText" call.Any non-2xx status code is an error. Response headers are in either*RomanizeTextResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsRomanizeTextCall)Fields¶added inv0.125.0
func (c *ProjectsRomanizeTextCall) Fields(s ...googleapi.Field) *ProjectsRomanizeTextCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsRomanizeTextCall)Header¶added inv0.125.0
func (c *ProjectsRomanizeTextCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeProjectsService¶
type ProjectsService struct {Locations *ProjectsLocationsService// contains filtered or unexported fields}funcNewProjectsService¶
func NewProjectsService(s *Service) *ProjectsService
func (*ProjectsService)DetectLanguage¶
func (r *ProjectsService) DetectLanguage(parentstring, detectlanguagerequest *DetectLanguageRequest) *ProjectsDetectLanguageCall
DetectLanguage: Detects the language of text within a request.
- parent: Project or location to make a call. Must refer to a caller'sproject. 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 (hassame location-id) can be used. Otherwise an INVALID_ARGUMENT (400) erroris returned.
func (*ProjectsService)GetSupportedLanguages¶
func (r *ProjectsService) GetSupportedLanguages(parentstring) *ProjectsGetSupportedLanguagesCall
GetSupportedLanguages: Returns a list of supported languages fortranslation.
- parent: Project or location to make a call. Must refer to a caller'sproject. Format: `projects/{project-number-or-id}` or`projects/{project-number-or-id}/locations/{location-id}`. For globalcalls, use `projects/{project-number-or-id}/locations/global` or`projects/{project-number-or-id}`. Non-global location is required forAutoML models. Only models within the same region (have same location-id)can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
func (*ProjectsService)RomanizeText¶added inv0.125.0
func (r *ProjectsService) RomanizeText(parentstring, romanizetextrequest *RomanizeTextRequest) *ProjectsRomanizeTextCall
RomanizeText: Romanize input text written in non-Latin scripts to Latintext.
- parent: Project or location to make a call. Must refer to a caller'sproject. 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}`.
func (*ProjectsService)TranslateText¶
func (r *ProjectsService) TranslateText(parentstring, translatetextrequest *TranslateTextRequest) *ProjectsTranslateTextCall
TranslateText: Translates input text and returns translated text.
- parent: Project or location to make a call. Must refer to a caller'sproject. Format: `projects/{project-number-or-id}` or`projects/{project-number-or-id}/locations/{location-id}`. For globalcalls, use `projects/{project-number-or-id}/locations/global` or`projects/{project-number-or-id}`. Non-global location is required forrequests using AutoML models or custom glossaries. Models and glossariesmust be within the same region (have same location-id), otherwise anINVALID_ARGUMENT (400) error is returned.
typeProjectsTranslateTextCall¶
type ProjectsTranslateTextCall struct {// contains filtered or unexported fields}func (*ProjectsTranslateTextCall)Context¶
func (c *ProjectsTranslateTextCall) Context(ctxcontext.Context) *ProjectsTranslateTextCall
Context sets the context to be used in this call's Do method.
func (*ProjectsTranslateTextCall)Do¶
func (c *ProjectsTranslateTextCall) Do(opts ...googleapi.CallOption) (*TranslateTextResponse,error)
Do executes the "translate.projects.translateText" call.Any non-2xx status code is an error. Response headers are in either*TranslateTextResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsTranslateTextCall)Fields¶
func (c *ProjectsTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsTranslateTextCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsTranslateTextCall)Header¶
func (c *ProjectsTranslateTextCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeReferenceSentenceConfig¶added inv0.190.0
type ReferenceSentenceConfig struct {// ReferenceSentencePairLists: Reference sentences pair lists. Each list will// be used as the references to translate the sentence under "content" field at// the corresponding index. Length of the list is required to be equal to the// length of "content" field.ReferenceSentencePairLists []*ReferenceSentencePairList `json:"referenceSentencePairLists,omitempty"`// SourceLanguageCode: Source language code.SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// TargetLanguageCode: Target language code.TargetLanguageCodestring `json:"targetLanguageCode,omitempty"`// ForceSendFields is a list of field names (e.g. "ReferenceSentencePairLists")// to unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ReferenceSentencePairLists") to// include in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ReferenceSentenceConfig: Message of caller-provided reference configuration.
func (ReferenceSentenceConfig)MarshalJSON¶added inv0.190.0
func (sReferenceSentenceConfig) MarshalJSON() ([]byte,error)
typeReferenceSentencePair¶added inv0.190.0
type ReferenceSentencePair struct {// SourceSentence: Source sentence in the sentence pair.SourceSentencestring `json:"sourceSentence,omitempty"`// TargetSentence: Target sentence in the sentence pair.TargetSentencestring `json:"targetSentence,omitempty"`// ForceSendFields is a list of field names (e.g. "SourceSentence") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "SourceSentence") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ReferenceSentencePair: A pair of sentences used as reference in source andtarget languages.
func (ReferenceSentencePair)MarshalJSON¶added inv0.190.0
func (sReferenceSentencePair) MarshalJSON() ([]byte,error)
typeReferenceSentencePairList¶added inv0.190.0
type ReferenceSentencePairList struct {// ReferenceSentencePairs: Reference sentence pairs.ReferenceSentencePairs []*ReferenceSentencePair `json:"referenceSentencePairs,omitempty"`// ForceSendFields is a list of field names (e.g. "ReferenceSentencePairs") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ReferenceSentencePairs") to// include in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ReferenceSentencePairList: A list of reference sentence pairs.
func (ReferenceSentencePairList)MarshalJSON¶added inv0.190.0
func (sReferenceSentencePairList) MarshalJSON() ([]byte,error)
typeRomanization¶added inv0.125.0
type Romanization struct {// DetectedLanguageCode: The ISO-639 language code of source text in the// initial request, detected automatically, if no source language was passed// within the initial request. If the source language was passed,// auto-detection of the language does not occur and this field is empty.DetectedLanguageCodestring `json:"detectedLanguageCode,omitempty"`// RomanizedText: Romanized text. If an error occurs during romanization, this// field might be excluded from the response.RomanizedTextstring `json:"romanizedText,omitempty"`// ForceSendFields is a list of field names (e.g. "DetectedLanguageCode") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DetectedLanguageCode") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Romanization: A single romanization response.
func (Romanization)MarshalJSON¶added inv0.125.0
func (sRomanization) MarshalJSON() ([]byte,error)
typeRomanizeTextRequest¶added inv0.125.0
type RomanizeTextRequest struct {// Contents: Required. The content of the input in string format.Contents []string `json:"contents,omitempty"`// SourceLanguageCode: Optional. The ISO-639 language code of the input text if// known, for example, "hi" or "zh". If the source language isn't specified,// the API attempts to identify the source language automatically and returns// the source language for each content in the response.SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// ForceSendFields is a list of field names (e.g. "Contents") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Contents") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}RomanizeTextRequest: The request message for synchronous romanization.
func (RomanizeTextRequest)MarshalJSON¶added inv0.125.0
func (sRomanizeTextRequest) MarshalJSON() ([]byte,error)
typeRomanizeTextResponse¶added inv0.125.0
type RomanizeTextResponse struct {// Romanizations: Text romanization responses. This field has the same length// as `contents`.Romanizations []*Romanization `json:"romanizations,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Romanizations") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Romanizations") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}RomanizeTextResponse: The response message for synchronous romanization.
func (RomanizeTextResponse)MarshalJSON¶added inv0.125.0
func (sRomanizeTextResponse) MarshalJSON() ([]byte,error)
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentProjects *ProjectsService// contains filtered or unexported fields} funcNewdeprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶
NewService creates a new Service.
typeStatus¶
type Status struct {// Code: The status code, which should be an enum value of google.rpc.Code.Codeint64 `json:"code,omitempty"`// Details: A list of messages that carry the error details. There is a common// set of message types for APIs to use.Details []googleapi.RawMessage `json:"details,omitempty"`// Message: A developer-facing error message, which should be in English. Any// user-facing error message should be localized and sent in the// google.rpc.Status.details field, or localized by the client.Messagestring `json:"message,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Code") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Status: The `Status` type defines a logical error model that is suitable fordifferent programming environments, including REST APIs and RPC APIs. It isused by gRPC (https://github.com/grpc). Each `Status` message contains threepieces of data: error code, error message, and error details. You can findout more about this error model and how to work with it in the API DesignGuide (https://cloud.google.com/apis/design/errors).
func (Status)MarshalJSON¶
typeSupportedLanguage¶
type SupportedLanguage struct {// DisplayName: Human-readable name of the language localized in the display// language specified in the request.DisplayNamestring `json:"displayName,omitempty"`// LanguageCode: Supported language code, generally consisting of its ISO 639-1// identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes// including language and region identifiers are returned (for example, 'zh-TW'// and 'zh-CN').LanguageCodestring `json:"languageCode,omitempty"`// SupportSource: Can be used as a source language.SupportSourcebool `json:"supportSource,omitempty"`// SupportTarget: Can be used as a target language.SupportTargetbool `json:"supportTarget,omitempty"`// ForceSendFields is a list of field names (e.g. "DisplayName") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DisplayName") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}SupportedLanguage: A single supported language response corresponds toinformation related to one supported language.
func (SupportedLanguage)MarshalJSON¶
func (sSupportedLanguage) MarshalJSON() ([]byte,error)
typeSupportedLanguages¶
type SupportedLanguages struct {// Languages: A list of supported language responses. This list contains an// entry for each language the Translation API supports.Languages []*SupportedLanguage `json:"languages,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Languages") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Languages") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}SupportedLanguages: The response message for discovering supportedlanguages.
func (SupportedLanguages)MarshalJSON¶
func (sSupportedLanguages) MarshalJSON() ([]byte,error)
typeTranslateDocumentRequest¶added inv0.61.0
type TranslateDocumentRequest struct {// CustomizedAttribution: Optional. This flag is to support user customized// attribution. If not provided, the default is `Machine Translated by Google`.// Customized attribution should follow rules in//https://cloud.google.com/translate/attribution#attribution_and_logosCustomizedAttributionstring `json:"customizedAttribution,omitempty"`// DocumentInputConfig: Required. Input configurations.DocumentInputConfig *DocumentInputConfig `json:"documentInputConfig,omitempty"`// DocumentOutputConfig: Optional. Output configurations. Defines if the output// file should be stored within Cloud Storage as well as the desired output// format. If not provided the translated file will only be returned through a// byte-stream and its output mime type will be the same as the input file's// mime type.DocumentOutputConfig *DocumentOutputConfig `json:"documentOutputConfig,omitempty"`// EnableRotationCorrection: Optional. If true, enable auto rotation correction// in DVS.EnableRotationCorrectionbool `json:"enableRotationCorrection,omitempty"`// EnableShadowRemovalNativePdf: Optional. If true, use the text removal server// to remove the shadow text on background image for native pdf translation.// Shadow removal feature can only be enabled when// is_translate_native_pdf_only: false && pdf_native_only: falseEnableShadowRemovalNativePdfbool `json:"enableShadowRemovalNativePdf,omitempty"`// 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.GlossaryConfig *TranslateTextGlossaryConfig `json:"glossaryConfig,omitempty"`// IsTranslateNativePdfOnly: Optional. is_translate_native_pdf_only field for// external customers. If true, the page limit of online native pdf translation// is 300 and only native pdf pages will be translated.IsTranslateNativePdfOnlybool `json:"isTranslateNativePdfOnly,omitempty"`// 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.Labels map[string]string `json:"labels,omitempty"`// 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`,// If not provided, the default Google model (NMT) will be used for// translation.Modelstring `json:"model,omitempty"`// SourceLanguageCode: Optional. The ISO-639 language code of the input// document 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. Source language must be// specified if the request contains a glossary or a custom model.SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// TargetLanguageCode: Required. The ISO-639 language code to use for// translation of the input document, set to one of the language codes listed// in Language Support.TargetLanguageCodestring `json:"targetLanguageCode,omitempty"`// ForceSendFields is a list of field names (e.g. "CustomizedAttribution") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CustomizedAttribution") to// include in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TranslateDocumentRequest: A document translation request.
func (TranslateDocumentRequest)MarshalJSON¶added inv0.61.0
func (sTranslateDocumentRequest) MarshalJSON() ([]byte,error)
typeTranslateDocumentResponse¶added inv0.61.0
type TranslateDocumentResponse struct {// DocumentTranslation: Translated document.DocumentTranslation *DocumentTranslation `json:"documentTranslation,omitempty"`// GlossaryConfig: The `glossary_config` used for this translation.GlossaryConfig *TranslateTextGlossaryConfig `json:"glossaryConfig,omitempty"`// GlossaryDocumentTranslation: The document's translation output if a glossary// is provided in the request. This can be the same as// [TranslateDocumentResponse.document_translation] if no glossary terms apply.GlossaryDocumentTranslation *DocumentTranslation `json:"glossaryDocumentTranslation,omitempty"`// Model: Only present when 'model' is present in the request. 'model' is// normalized to have a project number. For example: If the 'model' field in// TranslateDocumentRequest is:// `projects/{project-id}/locations/{location-id}/models/general/nmt` then// `model` here would be normalized to// `projects/{project-number}/locations/{location-id}/models/general/nmt`.Modelstring `json:"model,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "DocumentTranslation") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DocumentTranslation") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TranslateDocumentResponse: A translated document response message.
func (TranslateDocumentResponse)MarshalJSON¶added inv0.61.0
func (sTranslateDocumentResponse) MarshalJSON() ([]byte,error)
typeTranslateTextGlossaryConfig¶
type TranslateTextGlossaryConfig struct {// ContextualTranslationEnabled: Optional. If set to true, the glossary will be// used for contextual translation.ContextualTranslationEnabledbool `json:"contextualTranslationEnabled,omitempty"`// Glossary: Required. The `glossary` to be applied for this translation. The// format depends on the glossary: - User-provided custom glossary:// `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary// -id}`Glossarystring `json:"glossary,omitempty"`// IgnoreCase: Optional. Indicates match is case insensitive. The default value// is `false` if missing.IgnoreCasebool `json:"ignoreCase,omitempty"`// ForceSendFields is a list of field names (e.g.// "ContextualTranslationEnabled") to unconditionally include in API requests.// By default, fields with empty or default values are omitted from API// requests. Seehttps://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields// for more details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ContextualTranslationEnabled") to// include in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TranslateTextGlossaryConfig: Configures which glossary is used for aspecific target language and defines options for applying that glossary.
func (TranslateTextGlossaryConfig)MarshalJSON¶
func (sTranslateTextGlossaryConfig) MarshalJSON() ([]byte,error)
typeTranslateTextRequest¶
type TranslateTextRequest struct {// 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.Contents []string `json:"contents,omitempty"`// 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.GlossaryConfig *TranslateTextGlossaryConfig `json:"glossaryConfig,omitempty"`// 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.Labels map[string]string `json:"labels,omitempty"`// MimeType: Optional. The format of the source text, for example, "text/html",// "text/plain". If left blank, the MIME type defaults to "text/html".MimeTypestring `json:"mimeType,omitempty"`// 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/trans// lation-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 usedModelstring `json:"model,omitempty"`// 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.SourceLanguageCodestring `json:"sourceLanguageCode,omitempty"`// 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.TargetLanguageCodestring `json:"targetLanguageCode,omitempty"`// TransliterationConfig: Optional. Transliteration to be applied.TransliterationConfig *TransliterationConfig `json:"transliterationConfig,omitempty"`// ForceSendFields is a list of field names (e.g. "Contents") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Contents") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TranslateTextRequest: The request message for synchronous translation.
func (TranslateTextRequest)MarshalJSON¶
func (sTranslateTextRequest) MarshalJSON() ([]byte,error)
typeTranslateTextResponse¶
type TranslateTextResponse struct {// GlossaryTranslations: Text translation responses if a glossary is provided// in the request. This can be the same as `translations` if no terms apply.// This field has the same length as `contents`.GlossaryTranslations []*Translation `json:"glossaryTranslations,omitempty"`// Translations: Text translation responses with no glossary applied. This// field has the same length as `contents`.Translations []*Translation `json:"translations,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "GlossaryTranslations") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "GlossaryTranslations") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (TranslateTextResponse)MarshalJSON¶
func (sTranslateTextResponse) MarshalJSON() ([]byte,error)
typeTranslation¶
type Translation struct {// DetectedLanguageCode: The ISO-639 language code of source text in the// initial request, detected automatically, if no source language was passed// within the initial request. If the source language was passed,// auto-detection of the language does not occur and this field is empty.DetectedLanguageCodestring `json:"detectedLanguageCode,omitempty"`// GlossaryConfig: The `glossary_config` used for this translation.GlossaryConfig *TranslateTextGlossaryConfig `json:"glossaryConfig,omitempty"`// Model: Only present when `model` is present in the request. `model` here is// normalized to have project number. For example: If the `model` requested in// TranslationTextRequest is// `projects/{project-id}/locations/{location-id}/models/general/nmt` then// `model` here would be normalized to// `projects/{project-number}/locations/{location-id}/models/general/nmt`.Modelstring `json:"model,omitempty"`// TranslatedText: Text translated into the target language. If an error occurs// during translation, this field might be excluded from the response.TranslatedTextstring `json:"translatedText,omitempty"`// ForceSendFields is a list of field names (e.g. "DetectedLanguageCode") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DetectedLanguageCode") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Translation: A single translation response.
func (Translation)MarshalJSON¶
func (sTranslation) MarshalJSON() ([]byte,error)
typeTransliterationConfig¶added inv0.125.0
type TransliterationConfig struct {// EnableTransliteration: If true, source text in romanized form can be// translated to the target language.EnableTransliterationbool `json:"enableTransliteration,omitempty"`// ForceSendFields is a list of field names (e.g. "EnableTransliteration") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "EnableTransliteration") to// include in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}TransliterationConfig: Configures transliteration feature on top oftranslation.
func (TransliterationConfig)MarshalJSON¶added inv0.125.0
func (sTransliterationConfig) MarshalJSON() ([]byte,error)
typeWaitOperationRequest¶
type WaitOperationRequest struct {// Timeout: The maximum duration to wait before timing out. If left blank, the// wait will be at most the time permitted by the underlying HTTP/RPC protocol.// If RPC context deadline is also specified, the shorter one will be used.Timeoutstring `json:"timeout,omitempty"`// ForceSendFields is a list of field names (e.g. "Timeout") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Timeout") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}WaitOperationRequest: The request message for Operations.WaitOperation.
func (WaitOperationRequest)MarshalJSON¶
func (sWaitOperationRequest) MarshalJSON() ([]byte,error)