Package cloud.google.com/go/translate/apiv3/translatepb (v1.12.6)

Variables

OperationState_name, OperationState_value

var (
	OperationState_name = map[int32]string{
		0: "OPERATION_STATE_UNSPECIFIED",
		1: "OPERATION_STATE_RUNNING",
		2: "OPERATION_STATE_SUCCEEDED",
		3: "OPERATION_STATE_FAILED",
		4: "OPERATION_STATE_CANCELLING",
		5: "OPERATION_STATE_CANCELLED",
	}
	OperationState_value = map[string]int32{
		"OPERATION_STATE_UNSPECIFIED": 0,
		"OPERATION_STATE_RUNNING":     1,
		"OPERATION_STATE_SUCCEEDED":   2,
		"OPERATION_STATE_FAILED":      3,
		"OPERATION_STATE_CANCELLING":  4,
		"OPERATION_STATE_CANCELLED":   5,
	}
)

Enum value maps for OperationState.

BatchTranslateMetadata_State_name, BatchTranslateMetadata_State_value

var (
	BatchTranslateMetadata_State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "RUNNING",
		2: "SUCCEEDED",
		3: "FAILED",
		4: "CANCELLING",
		5: "CANCELLED",
	}
	BatchTranslateMetadata_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"RUNNING":           1,
		"SUCCEEDED":         2,
		"FAILED":            3,
		"CANCELLING":        4,
		"CANCELLED":         5,
	}
)

Enum value maps for BatchTranslateMetadata_State.

CreateGlossaryMetadata_State_name, CreateGlossaryMetadata_State_value

var (
	CreateGlossaryMetadata_State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "RUNNING",
		2: "SUCCEEDED",
		3: "FAILED",
		4: "CANCELLING",
		5: "CANCELLED",
	}
	CreateGlossaryMetadata_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"RUNNING":           1,
		"SUCCEEDED":         2,
		"FAILED":            3,
		"CANCELLING":        4,
		"CANCELLED":         5,
	}
)

Enum value maps for CreateGlossaryMetadata_State.

UpdateGlossaryMetadata_State_name, UpdateGlossaryMetadata_State_value

var (
	UpdateGlossaryMetadata_State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "RUNNING",
		2: "SUCCEEDED",
		3: "FAILED",
		4: "CANCELLING",
		5: "CANCELLED",
	}
	UpdateGlossaryMetadata_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"RUNNING":           1,
		"SUCCEEDED":         2,
		"FAILED":            3,
		"CANCELLING":        4,
		"CANCELLED":         5,
	}
)

Enum value maps for UpdateGlossaryMetadata_State.

DeleteGlossaryMetadata_State_name, DeleteGlossaryMetadata_State_value

var (
	DeleteGlossaryMetadata_State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "RUNNING",
		2: "SUCCEEDED",
		3: "FAILED",
		4: "CANCELLING",
		5: "CANCELLED",
	}
	DeleteGlossaryMetadata_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"RUNNING":           1,
		"SUCCEEDED":         2,
		"FAILED":            3,
		"CANCELLING":        4,
		"CANCELLED":         5,
	}
)

Enum value maps for DeleteGlossaryMetadata_State.

BatchTranslateDocumentMetadata_State_name, BatchTranslateDocumentMetadata_State_value

var (
	BatchTranslateDocumentMetadata_State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "RUNNING",
		2: "SUCCEEDED",
		3: "FAILED",
		4: "CANCELLING",
		5: "CANCELLED",
	}
	BatchTranslateDocumentMetadata_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"RUNNING":           1,
		"SUCCEEDED":         2,
		"FAILED":            3,
		"CANCELLING":        4,
		"CANCELLED":         5,
	}
)

Enum value maps for BatchTranslateDocumentMetadata_State.

File_google_cloud_translate_v3_adaptive_mt_proto

var File_google_cloud_translate_v3_adaptive_mt_proto protoreflect.FileDescriptor

File_google_cloud_translate_v3_automl_translation_proto

var File_google_cloud_translate_v3_automl_translation_proto protoreflect.FileDescriptor

File_google_cloud_translate_v3_common_proto

var File_google_cloud_translate_v3_common_proto protoreflect.FileDescriptor

File_google_cloud_translate_v3_translation_service_proto

var File_google_cloud_translate_v3_translation_service_proto protoreflect.FileDescriptor

Functions

func RegisterTranslationServiceServer

func RegisterTranslationServiceServer(s *grpc.Server, srv TranslationServiceServer)

AdaptiveMtDataset

type AdaptiveMtDataset struct {

	// Required. The resource name of the dataset, in form of
	// `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// 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.
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// The BCP-47 language code of the source language.
	SourceLanguageCode string `protobuf:"bytes,3,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"`
	// The BCP-47 language code of the target language.
	TargetLanguageCode string `protobuf:"bytes,4,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"`
	// The number of examples in the dataset.
	ExampleCount int32 `protobuf:"varint,5,opt,name=example_count,json=exampleCount,proto3" json:"example_count,omitempty"`
	// Output only. Timestamp when this dataset was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. Timestamp when this dataset was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// contains filtered or unexported fields
}

An Adaptive MT Dataset.

func (*AdaptiveMtDataset) Descriptor

func (*AdaptiveMtDataset) Descriptor() ([]byte, []int)

Deprecated: Use AdaptiveMtDataset.ProtoReflect.Descriptor instead.

func (*AdaptiveMtDataset) GetCreateTime

func (x *AdaptiveMtDataset) GetCreateTime() *timestamppb.Timestamp

func (*AdaptiveMtDataset) GetDisplayName

func (x *AdaptiveMtDataset) GetDisplayName() string

func (*AdaptiveMtDataset) GetExampleCount

func (x *AdaptiveMtDataset) GetExampleCount() int32

func (*AdaptiveMtDataset) GetName

func (x *AdaptiveMtDataset) GetName() string

func (*AdaptiveMtDataset) GetSourceLanguageCode

func (x *AdaptiveMtDataset) GetSourceLanguageCode() string

func (*AdaptiveMtDataset) GetTargetLanguageCode

func (x *AdaptiveMtDataset) GetTargetLanguageCode() string

func (*AdaptiveMtDataset) GetUpdateTime

func (x *AdaptiveMtDataset) GetUpdateTime() *timestamppb.Timestamp

func (*AdaptiveMtDataset) ProtoMessage

func (*AdaptiveMtDataset) ProtoMessage()

func (*AdaptiveMtDataset) ProtoReflect

func (x *AdaptiveMtDataset) ProtoReflect() protoreflect.Message

func (*AdaptiveMtDataset) Reset

func (x *AdaptiveMtDataset) Reset()

func (*AdaptiveMtDataset) String

func (x *AdaptiveMtDataset) String() string

AdaptiveMtFile

type AdaptiveMtFile struct {

	// Required. The resource name of the file, in form of
	// `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The file's display name.
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// The number of entries that the file contains.
	EntryCount int32 `protobuf:"varint,3,opt,name=entry_count,json=entryCount,proto3" json:"entry_count,omitempty"`
	// Output only. Timestamp when this file was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. Timestamp when this file was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// contains filtered or unexported fields
}

An AdaptiveMtFile.

func (*AdaptiveMtFile) Descriptor

func (*AdaptiveMtFile) Descriptor() ([]byte, []int)

Deprecated: Use AdaptiveMtFile.ProtoReflect.Descriptor instead.

func (*AdaptiveMtFile) GetCreateTime

func (x *AdaptiveMtFile) GetCreateTime() *timestamppb.Timestamp

func (*AdaptiveMtFile) GetDisplayName

func (x *AdaptiveMtFile) GetDisplayName() string

func (*AdaptiveMtFile) GetEntryCount

func (x *AdaptiveMtFile) GetEntryCount() int32

func (*AdaptiveMtFile) GetName

func (x *AdaptiveMtFile) GetName() string

func (*AdaptiveMtFile) GetUpdateTime

func (x *AdaptiveMtFile) GetUpdateTime() *timestamppb.Timestamp

func (*AdaptiveMtFile) ProtoMessage

func (*AdaptiveMtFile) ProtoMessage()

func (*AdaptiveMtFile) ProtoReflect

func (x *AdaptiveMtFile) ProtoReflect() protoreflect.Message

func (*AdaptiveMtFile) Reset

func (x *AdaptiveMtFile) Reset()

func (*AdaptiveMtFile) String

func (x *AdaptiveMtFile) String() string

AdaptiveMtSentence

type AdaptiveMtSentence struct {

	// Required. The resource name of the file, in form of
	// `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. The source sentence.
	SourceSentence string `protobuf:"bytes,2,opt,name=source_sentence,json=sourceSentence,proto3" json:"source_sentence,omitempty"`
	// Required. The target sentence.
	TargetSentence string `protobuf:"bytes,3,opt,name=target_sentence,json=targetSentence,proto3" json:"target_sentence,omitempty"`
	// Output only. Timestamp when this sentence was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. Timestamp when this sentence was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// contains filtered or unexported fields
}

An AdaptiveMt sentence entry.

func (*AdaptiveMtSentence) Descriptor

func (*AdaptiveMtSentence) Descriptor() ([]byte, []int)

Deprecated: Use AdaptiveMtSentence.ProtoReflect.Descriptor instead.

func (*AdaptiveMtSentence) GetCreateTime

func (x *AdaptiveMtSentence) GetCreateTime() *timestamppb.Timestamp

func (*AdaptiveMtSentence) GetName

func (x *AdaptiveMtSentence) GetName() string

func (*AdaptiveMtSentence) GetSourceSentence

func (x *AdaptiveMtSentence) GetSourceSentence() string

func (*AdaptiveMtSentence) GetTargetSentence

func (x *AdaptiveMtSentence) GetTargetSentence() string

func (*AdaptiveMtSentence) GetUpdateTime

func (x *AdaptiveMtSentence) GetUpdateTime() *timestamppb.Timestamp

func (*AdaptiveMtSentence) ProtoMessage

func (*AdaptiveMtSentence) ProtoMessage()

func (*AdaptiveMtSentence) ProtoReflect

func (x *AdaptiveMtSentence) ProtoReflect() protoreflect.Message

func (*AdaptiveMtSentence) Reset

func (x *AdaptiveMtSentence) Reset()

func (*AdaptiveMtSentence) String

func (x *AdaptiveMtSentence) String() string

AdaptiveMtTranslateRequest

type AdaptiveMtTranslateRequest struct {

	// Required. Location to make a regional call.
	//
	// Format: `projects/{project-number-or-id}/locations/{location-id}`.
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The resource name for the dataset to use for adaptive MT.
	// `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
	Dataset string `protobuf:"bytes,2,opt,name=dataset,proto3" json:"dataset,omitempty"`
	// Required. The content of the input in string format.
	Content []string `protobuf:"bytes,3,rep,name=content,proto3" json:"content,omitempty"`
	// Configuration for caller provided reference sentences.
	ReferenceSentenceConfig *AdaptiveMtTranslateRequest_ReferenceSentenceConfig `protobuf:"bytes,6,opt,name=reference_sentence_config,json=referenceSentenceConfig,proto3,oneof" json:"reference_sentence_config,omitempty"`
	// 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 *AdaptiveMtTranslateRequest_GlossaryConfig `protobuf:"bytes,7,opt,name=glossary_config,json=glossaryConfig,proto3,oneof" json:"glossary_config,omitempty"`
	// contains filtered or unexported fields
}

The request for sending an AdaptiveMt translation query.

func (*AdaptiveMtTranslateRequest) Descriptor

func (*AdaptiveMtTranslateRequest) Descriptor() ([]byte, []int)

Deprecated: Use AdaptiveMtTranslateRequest.ProtoReflect.Descriptor instead.

func (*AdaptiveMtTranslateRequest) GetContent

func (x *AdaptiveMtTranslateRequest) GetContent() []string

func (*AdaptiveMtTranslateRequest) GetDataset

func (x *AdaptiveMtTranslateRequest) GetDataset() string

func (*AdaptiveMtTranslateRequest) GetGlossaryConfig

func (*AdaptiveMtTranslateRequest) GetParent

func (x *AdaptiveMtTranslateRequest) GetParent() string

func (*AdaptiveMtTranslateRequest) GetReferenceSentenceConfig

func (*AdaptiveMtTranslateRequest) ProtoMessage

func (*AdaptiveMtTranslateRequest) ProtoMessage()

func (*AdaptiveMtTranslateRequest) ProtoReflect

func (*AdaptiveMtTranslateRequest) Reset

func (x *AdaptiveMtTranslateRequest) Reset()

func (*AdaptiveMtTranslateRequest) String

func (x *AdaptiveMtTranslateRequest) String() string

AdaptiveMtTranslateRequest_GlossaryConfig

type AdaptiveMtTranslateRequest_GlossaryConfig struct {

	// 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}`
	Glossary string `protobuf:"bytes,1,opt,name=glossary,proto3" json:"glossary,omitempty"`
	// Optional. Indicates match is case insensitive. The default value is
	// `false` if missing.
	IgnoreCase bool `protobuf:"varint,2,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"`
	// Optional. If set to true, the glossary will be used for contextual
	// translation.
	ContextualTranslationEnabled bool `protobuf:"varint,4,opt,name=contextual_translation_enabled,json=contextualTranslationEnabled,proto3" json:"contextual_translation_enabled,omitempty"`
	// contains filtered or unexported fields
}

Configures which glossary is used for a specific target language and defines options for applying that glossary.

func (*AdaptiveMtTranslateRequest_GlossaryConfig) Descriptor

func (*AdaptiveMtTranslateRequest_GlossaryConfig) Descriptor() ([]byte, []int)

Deprecated: Use AdaptiveMtTranslateRequest_GlossaryConfig.ProtoReflect.Descriptor instead.

func (*AdaptiveMtTranslateRequest_GlossaryConfig) GetContextualTranslationEnabled

func (x *AdaptiveMtTranslateRequest_GlossaryConfig) GetContextualTranslationEnabled() bool

func (*AdaptiveMtTranslateRequest_GlossaryConfig) GetGlossary

func (*AdaptiveMtTranslateRequest_GlossaryConfig) GetIgnoreCase

func (*AdaptiveMtTranslateRequest_GlossaryConfig) ProtoMessage

func (*AdaptiveMtTranslateRequest_GlossaryConfig) ProtoReflect

func (*AdaptiveMtTranslateRequest_GlossaryConfig) Reset

func (*AdaptiveMtTranslateRequest_GlossaryConfig) String

AdaptiveMtTranslateRequest_ReferenceSentenceConfig

type AdaptiveMtTranslateRequest_ReferenceSentenceConfig struct {

	// 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 []*AdaptiveMtTranslateRequest_ReferenceSentencePairList `protobuf:"bytes,1,rep,name=reference_sentence_pair_lists,json=referenceSentencePairLists,proto3" json:"reference_sentence_pair_lists,omitempty"`
	// Source language code.
	SourceLanguageCode string `protobuf:"bytes,2,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"`
	// Target language code.
	TargetLanguageCode string `protobuf:"bytes,3,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"`
	// contains filtered or unexported fields
}

Message of caller-provided reference configuration.

func (*AdaptiveMtTranslateRequest_ReferenceSentenceConfig) Descriptor

Deprecated: Use AdaptiveMtTranslateRequest_ReferenceSentenceConfig.ProtoReflect.Descriptor instead.

func (*AdaptiveMtTranslateRequest_ReferenceSentenceConfig) GetReferenceSentencePairLists

func (*AdaptiveMtTranslateRequest_ReferenceSentenceConfig) GetSourceLanguageCode

func (*AdaptiveMtTranslateRequest_ReferenceSentenceConfig) GetTargetLanguageCode

func (*AdaptiveMtTranslateRequest_ReferenceSentenceConfig) ProtoMessage

func (*AdaptiveMtTranslateRequest_ReferenceSentenceConfig) ProtoReflect

func (*AdaptiveMtTranslateRequest_ReferenceSentenceConfig) Reset

func (*AdaptiveMtTranslateRequest_ReferenceSentenceConfig) String

AdaptiveMtTranslateRequest_ReferenceSentencePair

type AdaptiveMtTranslateRequest_ReferenceSentencePair struct {

	// Source sentence in the sentence pair.
	SourceSentence string `protobuf:"bytes,1,opt,name=source_sentence,json=sourceSentence,proto3" json:"source_sentence,omitempty"`
	// Target sentence in the sentence pair.
	TargetSentence string `protobuf:"bytes,2,opt,name=target_sentence,json=targetSentence,proto3" json:"target_sentence,omitempty"`
	// contains filtered or unexported fields
}

A pair of sentences used as reference in source and target languages.

func (*AdaptiveMtTranslateRequest_ReferenceSentencePair) Descriptor

Deprecated: Use AdaptiveMtTranslateRequest_ReferenceSentencePair.ProtoReflect.Descriptor instead.

func (*AdaptiveMtTranslateRequest_ReferenceSentencePair) GetSourceSentence

func (*AdaptiveMtTranslateRequest_ReferenceSentencePair) GetTargetSentence

func (*AdaptiveMtTranslateRequest_ReferenceSentencePair) ProtoMessage

func (*AdaptiveMtTranslateRequest_ReferenceSentencePair) ProtoReflect

func (*AdaptiveMtTranslateRequest_ReferenceSentencePair) Reset

func (*AdaptiveMtTranslateRequest_ReferenceSentencePair) String

AdaptiveMtTranslateRequest_ReferenceSentencePairList

type AdaptiveMtTranslateRequest_ReferenceSentencePairList struct {

	// Reference sentence pairs.
	ReferenceSentencePairs []*AdaptiveMtTranslateRequest_ReferenceSentencePair `protobuf:"bytes,1,rep,name=reference_sentence_pairs,json=referenceSentencePairs,proto3" json:"reference_sentence_pairs,omitempty"`
	// contains filtered or unexported fields
}

A list of reference sentence pairs.

func (*AdaptiveMtTranslateRequest_ReferenceSentencePairList) Descriptor

Deprecated: Use AdaptiveMtTranslateRequest_ReferenceSentencePairList.ProtoReflect.Descriptor instead.

func (*AdaptiveMtTranslateRequest_ReferenceSentencePairList) GetReferenceSentencePairs

func (*AdaptiveMtTranslateRequest_ReferenceSentencePairList) ProtoMessage

func (*AdaptiveMtTranslateRequest_ReferenceSentencePairList) ProtoReflect

func (*AdaptiveMtTranslateRequest_ReferenceSentencePairList) Reset

func (*AdaptiveMtTranslateRequest_ReferenceSentencePairList) String

AdaptiveMtTranslateResponse

type AdaptiveMtTranslateResponse struct {

	// Output only. The translation.
	Translations []*AdaptiveMtTranslation `protobuf:"bytes,1,rep,name=translations,proto3" json:"translations,omitempty"`
	// Output only. The translation's language code.
	LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
	// 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 `protobuf:"bytes,4,rep,name=glossary_translations,json=glossaryTranslations,proto3" json:"glossary_translations,omitempty"`
	// contains filtered or unexported fields
}

An AdaptiveMtTranslate response.

func (*AdaptiveMtTranslateResponse) Descriptor

func (*AdaptiveMtTranslateResponse) Descriptor() ([]byte, []int)

Deprecated: Use AdaptiveMtTranslateResponse.ProtoReflect.Descriptor instead.

func (*AdaptiveMtTranslateResponse) GetGlossaryTranslations

func (x *AdaptiveMtTranslateResponse) GetGlossaryTranslations() []*AdaptiveMtTranslation

func (*AdaptiveMtTranslateResponse) GetLanguageCode

func (x *AdaptiveMtTranslateResponse) GetLanguageCode() string

func (*AdaptiveMtTranslateResponse) GetTranslations

func (x *AdaptiveMtTranslateResponse) GetTranslations() []*AdaptiveMtTranslation

func (*AdaptiveMtTranslateResponse) ProtoMessage

func (*AdaptiveMtTranslateResponse) ProtoMessage()

func (*AdaptiveMtTranslateResponse) ProtoReflect

func (*AdaptiveMtTranslateResponse) Reset

func (x *AdaptiveMtTranslateResponse) Reset()

func (*AdaptiveMtTranslateResponse) String

func (x *AdaptiveMtTranslateResponse) String() string

AdaptiveMtTranslation

type AdaptiveMtTranslation struct {

	// Output only. The translated text.
	TranslatedText string `protobuf:"bytes,1,opt,name=translated_text,json=translatedText,proto3" json:"translated_text,omitempty"`
	// contains filtered or unexported fields
}

An AdaptiveMt translation.

func (*AdaptiveMtTranslation) Descriptor

func (*AdaptiveMtTranslation) Descriptor() ([]byte, []int)

Deprecated: Use AdaptiveMtTranslation.ProtoReflect.Descriptor instead.

func (*AdaptiveMtTranslation) GetTranslatedText

func (x *AdaptiveMtTranslation) GetTranslatedText() string

func (*AdaptiveMtTranslation) ProtoMessage

func (*AdaptiveMtTranslation) ProtoMessage()

func (*AdaptiveMtTranslation) ProtoReflect

func (x *AdaptiveMtTranslation) ProtoReflect() protoreflect.Message

func (*AdaptiveMtTranslation) Reset

func (x *AdaptiveMtTranslation) Reset()

func (*AdaptiveMtTranslation) String

func (x *AdaptiveMtTranslation) String() string

BatchDocumentInputConfig

type BatchDocumentInputConfig struct {

	// Specify the input.
	//
	// Types that are assignable to Source:
	//
	//	*BatchDocumentInputConfig_GcsSource
	Source isBatchDocumentInputConfig_Source `protobuf_oneof:"source"`
	// contains filtered or unexported fields
}

Input configuration for BatchTranslateDocument request.

func (*BatchDocumentInputConfig) Descriptor

func (*BatchDocumentInputConfig) Descriptor() ([]byte, []int)

Deprecated: Use BatchDocumentInputConfig.ProtoReflect.Descriptor instead.

func (*BatchDocumentInputConfig) GetGcsSource

func (x *BatchDocumentInputConfig) GetGcsSource() *GcsSource

func (*BatchDocumentInputConfig) GetSource

func (m *BatchDocumentInputConfig) GetSource() isBatchDocumentInputConfig_Source

func (*BatchDocumentInputConfig) ProtoMessage

func (*BatchDocumentInputConfig) ProtoMessage()

func (*BatchDocumentInputConfig) ProtoReflect

func (x *BatchDocumentInputConfig) ProtoReflect() protoreflect.Message

func (*BatchDocumentInputConfig) Reset

func (x *BatchDocumentInputConfig) Reset()

func (*BatchDocumentInputConfig) String

func (x *BatchDocumentInputConfig) String() string

BatchDocumentInputConfig_GcsSource

type BatchDocumentInputConfig_GcsSource struct {
	// 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 `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3,oneof"`
}

BatchDocumentOutputConfig

type BatchDocumentOutputConfig struct {

	// The destination of output. The destination directory provided must exist
	// and be empty.
	//
	// Types that are assignable to Destination:
	//
	//	*BatchDocumentOutputConfig_GcsDestination
	Destination isBatchDocumentOutputConfig_Destination `protobuf_oneof:"destination"`
	// contains filtered or unexported fields
}

Output configuration for BatchTranslateDocument request.

func (*BatchDocumentOutputConfig) Descriptor

func (*BatchDocumentOutputConfig) Descriptor() ([]byte, []int)

Deprecated: Use BatchDocumentOutputConfig.ProtoReflect.Descriptor instead.

func (*BatchDocumentOutputConfig) GetDestination

func (m *BatchDocumentOutputConfig) GetDestination() isBatchDocumentOutputConfig_Destination

func (*BatchDocumentOutputConfig) GetGcsDestination

func (x *BatchDocumentOutputConfig) GetGcsDestination() *GcsDestination

func (*BatchDocumentOutputConfig) ProtoMessage

func (*BatchDocumentOutputConfig) ProtoMessage()

func (*BatchDocumentOutputConfig) ProtoReflect

func (*BatchDocumentOutputConfig) Reset

func (x *BatchDocumentOutputConfig) Reset()

func (*BatchDocumentOutputConfig) String

func (x *BatchDocumentOutputConfig) String() string

BatchDocumentOutputConfig_GcsDestination

type BatchDocumentOutputConfig_GcsDestination struct {
	// 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 `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"`
}

BatchTransferResourcesResponse

type BatchTransferResourcesResponse struct {

	// Responses of the transfer for individual resources.
	Responses []*BatchTransferResourcesResponse_TransferResourceResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

Response message for BatchTransferResources.

func (*BatchTransferResourcesResponse) Descriptor

func (*BatchTransferResourcesResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchTransferResourcesResponse.ProtoReflect.Descriptor instead.

func (*BatchTransferResourcesResponse) GetResponses

func (*BatchTransferResourcesResponse) ProtoMessage

func (*BatchTransferResourcesResponse) ProtoMessage()

func (*BatchTransferResourcesResponse) ProtoReflect

func (*BatchTransferResourcesResponse) Reset

func (x *BatchTransferResourcesResponse) Reset()

func (*BatchTransferResourcesResponse) String

BatchTransferResourcesResponse_TransferResourceResponse

type BatchTransferResourcesResponse_TransferResourceResponse struct {

	// Full name of the resource to transfer as specified in the request.
	Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// Full name of the new resource successfully transferred from the source
	// hosted by Translation API. Target will be empty if the transfer failed.
	Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
	// The error result in case of failure.
	Error *status.Status `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

Transfer response for a single resource.

func (*BatchTransferResourcesResponse_TransferResourceResponse) Descriptor

Deprecated: Use BatchTransferResourcesResponse_TransferResourceResponse.ProtoReflect.Descriptor instead.

func (*BatchTransferResourcesResponse_TransferResourceResponse) GetError

func (*BatchTransferResourcesResponse_TransferResourceResponse) GetSource

func (*BatchTransferResourcesResponse_TransferResourceResponse) GetTarget

func (*BatchTransferResourcesResponse_TransferResourceResponse) ProtoMessage

func (*BatchTransferResourcesResponse_TransferResourceResponse) ProtoReflect

func (*BatchTransferResourcesResponse_TransferResourceResponse) Reset

func (*BatchTransferResourcesResponse_TransferResourceResponse) String

BatchTranslateDocumentMetadata

type BatchTranslateDocumentMetadata struct {

	// The state of the operation.
	State BatchTranslateDocumentMetadata_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.translation.v3.BatchTranslateDocumentMetadata_State" json:"state,omitempty"`
	// Total number of pages to translate in all documents so far. Documents
	// without clear page definition (such as XLSX) are not counted.
	TotalPages int64 `protobuf:"varint,2,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	// Number of successfully translated pages in all documents so far. Documents
	// without clear page definition (such as XLSX) are not counted.
	TranslatedPages int64 `protobuf:"varint,3,opt,name=translated_pages,json=translatedPages,proto3" json:"translated_pages,omitempty"`
	// Number of pages that failed to process in all documents so far. Documents
	// without clear page definition (such as XLSX) are not counted.
	FailedPages int64 `protobuf:"varint,4,opt,name=failed_pages,json=failedPages,proto3" json:"failed_pages,omitempty"`
	// Number of billable pages in documents with clear page definition (such as
	// PDF, DOCX, PPTX) so far.
	TotalBillablePages int64 `protobuf:"varint,5,opt,name=total_billable_pages,json=totalBillablePages,proto3" json:"total_billable_pages,omitempty"`
	// Total number of characters (Unicode codepoints) in all documents so far.
	TotalCharacters int64 `protobuf:"varint,6,opt,name=total_characters,json=totalCharacters,proto3" json:"total_characters,omitempty"`
	// Number of successfully translated characters (Unicode codepoints) in all
	// documents so far.
	TranslatedCharacters int64 `protobuf:"varint,7,opt,name=translated_characters,json=translatedCharacters,proto3" json:"translated_characters,omitempty"`
	// Number of characters that have failed to process (Unicode codepoints) in
	// all documents so far.
	FailedCharacters int64 `protobuf:"varint,8,opt,name=failed_characters,json=failedCharacters,proto3" json:"failed_characters,omitempty"`
	// Number of billable characters (Unicode codepoints) in documents without
	// clear page definition (such as XLSX) so far.
	TotalBillableCharacters int64 `protobuf:"varint,9,opt,name=total_billable_characters,json=totalBillableCharacters,proto3" json:"total_billable_characters,omitempty"`
	// Time when the operation was submitted.
	SubmitTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
	// contains filtered or unexported fields
}

State metadata for the batch translation operation.

func (*BatchTranslateDocumentMetadata) Descriptor

func (*BatchTranslateDocumentMetadata) Descriptor() ([]byte, []int)

Deprecated: Use BatchTranslateDocumentMetadata.ProtoReflect.Descriptor instead.

func (*BatchTranslateDocumentMetadata) GetFailedCharacters

func (x *BatchTranslateDocumentMetadata) GetFailedCharacters() int64

func (*BatchTranslateDocumentMetadata) GetFailedPages

func (x *BatchTranslateDocumentMetadata) GetFailedPages() int64

func (*BatchTranslateDocumentMetadata) GetState

func (*BatchTranslateDocumentMetadata) GetSubmitTime

func (*BatchTranslateDocumentMetadata) GetTotalBillableCharacters

func (x *BatchTranslateDocumentMetadata) GetTotalBillableCharacters() int64

func (*BatchTranslateDocumentMetadata) GetTotalBillablePages

func (x *BatchTranslateDocumentMetadata) GetTotalBillablePages() int64

func (*BatchTranslateDocumentMetadata) GetTotalCharacters

func (x *BatchTranslateDocumentMetadata) GetTotalCharacters() int64

func (*BatchTranslateDocumentMetadata) GetTotalPages

func (x *BatchTranslateDocumentMetadata) GetTotalPages() int64

func (*BatchTranslateDocumentMetadata) GetTranslatedCharacters

func (x *BatchTranslateDocumentMetadata) GetTranslatedCharacters() int64

func (*BatchTranslateDocumentMetadata) GetTranslatedPages

func (x *BatchTranslateDocumentMetadata) GetTranslatedPages() int64

func (*BatchTranslateDocumentMetadata) ProtoMessage

func (*BatchTranslateDocumentMetadata) ProtoMessage()

func (*BatchTranslateDocumentMetadata) ProtoReflect

func (*BatchTranslateDocumentMetadata) Reset

func (x *BatchTranslateDocumentMetadata) Reset()

func (*BatchTranslateDocumentMetadata) String

BatchTranslateDocumentMetadata_State

type BatchTranslateDocumentMetadata_State int32

State of the job.

BatchTranslateDocumentMetadata_STATE_UNSPECIFIED, BatchTranslateDocumentMetadata_RUNNING, BatchTranslateDocumentMetadata_SUCCEEDED, BatchTranslateDocumentMetadata_FAILED, BatchTranslateDocumentMetadata_CANCELLING, BatchTranslateDocumentMetadata_CANCELLED

const (
	// Invalid.
	BatchTranslateDocumentMetadata_STATE_UNSPECIFIED BatchTranslateDocumentMetadata_State = 0
	// Request is being processed.
	BatchTranslateDocumentMetadata_RUNNING BatchTranslateDocumentMetadata_State = 1
	// The batch is processed, and at least one item was successfully processed.
	BatchTranslateDocumentMetadata_SUCCEEDED BatchTranslateDocumentMetadata_State = 2
	// The batch is done and no item was successfully processed.
	BatchTranslateDocumentMetadata_FAILED BatchTranslateDocumentMetadata_State = 3
	// Request is in the process of being canceled after caller invoked
	// longrunning.Operations.CancelOperation on the request id.
	BatchTranslateDocumentMetadata_CANCELLING BatchTranslateDocumentMetadata_State = 4
	// The batch is done after the user has called the
	// longrunning.Operations.CancelOperation. Any records processed before the
	// cancel command are output as specified in the request.
	BatchTranslateDocumentMetadata_CANCELLED BatchTranslateDocumentMetadata_State = 5
)

func (BatchTranslateDocumentMetadata_State) Descriptor

func (BatchTranslateDocumentMetadata_State) Enum

func (BatchTranslateDocumentMetadata_State) EnumDescriptor

func (BatchTranslateDocumentMetadata_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use BatchTranslateDocumentMetadata_State.Descriptor instead.

func (BatchTranslateDocumentMetadata_State) Number

func (BatchTranslateDocumentMetadata_State) String

func (BatchTranslateDocumentMetadata_State) Type

BatchTranslateDocumentRequest

type BatchTranslateDocumentRequest struct {

	// Required. Location to make a regional call.
	//
	// Format: `projects/{project-number-or-id}/locations/{location-id}`.
	//
	// The `global` location is not supported for batch translation.
	//
	// Only AutoML Translation models or glossaries within the same region (have
	// the same location-id) can be used, otherwise an INVALID_ARGUMENT (400)
	// error is returned.
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// 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).
	SourceLanguageCode string `protobuf:"bytes,2,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"`
	// Required. The ISO-639 language code to use for translation of the input
	// document. Specify up to 10 language codes here. Supported language codes
	// are listed in [Language
	// Support](https://cloud.google.com/translate/docs/languages).
	TargetLanguageCodes []string `protobuf:"bytes,3,rep,name=target_language_codes,json=targetLanguageCodes,proto3" json:"target_language_codes,omitempty"`
	// 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 `protobuf:"bytes,4,rep,name=input_configs,json=inputConfigs,proto3" json:"input_configs,omitempty"`
	// 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 `protobuf:"bytes,5,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
	// 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 `protobuf:"bytes,6,rep,name=models,proto3" json:"models,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	// Optional. Glossaries to be applied. It's keyed by target language code.
	Glossaries map[string]*TranslateTextGlossaryConfig `protobuf:"bytes,7,rep,name=glossaries,proto3" json:"glossaries,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	// 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 `protobuf:"bytes,8,rep,name=format_conversions,json=formatConversions,proto3" json:"format_conversions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	// 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_logos
	CustomizedAttribution string `protobuf:"bytes,10,opt,name=customized_attribution,json=customizedAttribution,proto3" json:"customized_attribution,omitempty"`
	// 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: false
	EnableShadowRemovalNativePdf bool `protobuf:"varint,11,opt,name=enable_shadow_removal_native_pdf,json=enableShadowRemovalNativePdf,proto3" json:"enable_shadow_removal_native_pdf,omitempty"`
	// Optional. If true, enable auto rotation correction in DVS.
	EnableRotationCorrection bool `protobuf:"varint,12,opt,name=enable_rotation_correction,json=enableRotationCorrection,proto3" json:"enable_rotation_correction,omitempty"`
	// contains filtered or unexported fields
}

The BatchTranslateDocument request.

func (*BatchTranslateDocumentRequest) Descriptor

func (*BatchTranslateDocumentRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchTranslateDocumentRequest.ProtoReflect.Descriptor instead.

func (*BatchTranslateDocumentRequest) GetCustomizedAttribution

func (x *BatchTranslateDocumentRequest) GetCustomizedAttribution() string

func (*BatchTranslateDocumentRequest) GetEnableRotationCorrection

func (x *BatchTranslateDocumentRequest) GetEnableRotationCorrection() bool

func (*BatchTranslateDocumentRequest) GetEnableShadowRemovalNativePdf

func (x *BatchTranslateDocumentRequest) GetEnableShadowRemovalNativePdf() bool

func (*BatchTranslateDocumentRequest) GetFormatConversions

func (x *BatchTranslateDocumentRequest) GetFormatConversions() map[string]string

func (*BatchTranslateDocumentRequest) GetGlossaries

func (*BatchTranslateDocumentRequest) GetInputConfigs

func (*BatchTranslateDocumentRequest) GetModels

func (x *BatchTranslateDocumentRequest) GetModels() map[string]string

func (*BatchTranslateDocumentRequest) GetOutputConfig

func (*BatchTranslateDocumentRequest) GetParent

func (x *BatchTranslateDocumentRequest) GetParent() string

func (*BatchTranslateDocumentRequest) GetSourceLanguageCode

func (x *BatchTranslateDocumentRequest) GetSourceLanguageCode() string

func (*BatchTranslateDocumentRequest) GetTargetLanguageCodes

func (x *BatchTranslateDocumentRequest) GetTargetLanguageCodes() []string

func (*BatchTranslateDocumentRequest) ProtoMessage

func (*BatchTranslateDocumentRequest) ProtoMessage()

func (*BatchTranslateDocumentRequest) ProtoReflect

func (*BatchTranslateDocumentRequest) Reset

func (x *BatchTranslateDocumentRequest) Reset()

func (*BatchTranslateDocumentRequest) String

BatchTranslateDocumentResponse

type BatchTranslateDocumentResponse struct {

	// Total number of pages to translate in all documents. Documents without
	// clear page definition (such as XLSX) are not counted.
	TotalPages int64 `protobuf:"varint,1,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	// Number of successfully translated pages in all documents. Documents without
	// clear page definition (such as XLSX) are not counted.
	TranslatedPages int64 `protobuf:"varint,2,opt,name=translated_pages,json=translatedPages,proto3" json:"translated_pages,omitempty"`
	// Number of pages that failed to process in all documents. Documents without
	// clear page definition (such as XLSX) are not counted.
	FailedPages int64 `protobuf:"varint,3,opt,name=failed_pages,json=failedPages,proto3" json:"failed_pages,omitempty"`
	// Number of billable pages in documents with clear page definition (such as
	// PDF, DOCX, PPTX)
	TotalBillablePages int64 `protobuf:"varint,4,opt,name=total_billable_pages,json=totalBillablePages,proto3" json:"total_billable_pages,omitempty"`
	// Total number of characters (Unicode codepoints) in all documents.
	TotalCharacters int64 `protobuf:"varint,5,opt,name=total_characters,json=totalCharacters,proto3" json:"total_characters,omitempty"`
	// Number of successfully translated characters (Unicode codepoints) in all
	// documents.
	TranslatedCharacters int64 `protobuf:"varint,6,opt,name=translated_characters,json=translatedCharacters,proto3" json:"translated_characters,omitempty"`
	// Number of characters that have failed to process (Unicode codepoints) in
	// all documents.
	FailedCharacters int64 `protobuf:"varint,7,opt,name=failed_characters,json=failedCharacters,proto3" json:"failed_characters,omitempty"`
	// Number of billable characters (Unicode codepoints) in documents without
	// clear page definition, such as XLSX.
	TotalBillableCharacters int64 `protobuf:"varint,8,opt,name=total_billable_characters,json=totalBillableCharacters,proto3" json:"total_billable_characters,omitempty"`
	// Time when the operation was submitted.
	SubmitTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
	// The time when the operation is finished and
	// [google.longrunning.Operation.done][google.longrunning.Operation.done] is
	// set to true.
	EndTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// contains filtered or unexported fields
}

Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by BatchTranslateDocument if at least one document is translated successfully.

func (*BatchTranslateDocumentResponse) Descriptor

func (*BatchTranslateDocumentResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchTranslateDocumentResponse.ProtoReflect.Descriptor instead.

func (*BatchTranslateDocumentResponse) GetEndTime

func (*BatchTranslateDocumentResponse) GetFailedCharacters

func (x *BatchTranslateDocumentResponse) GetFailedCharacters() int64

func (*BatchTranslateDocumentResponse) GetFailedPages

func (x *BatchTranslateDocumentResponse) GetFailedPages() int64

func (*BatchTranslateDocumentResponse) GetSubmitTime

func (*BatchTranslateDocumentResponse) GetTotalBillableCharacters

func (x *BatchTranslateDocumentResponse) GetTotalBillableCharacters() int64

func (*BatchTranslateDocumentResponse) GetTotalBillablePages

func (x *BatchTranslateDocumentResponse) GetTotalBillablePages() int64

func (*BatchTranslateDocumentResponse) GetTotalCharacters

func (x *BatchTranslateDocumentResponse) GetTotalCharacters() int64

func (*BatchTranslateDocumentResponse) GetTotalPages

func (x *BatchTranslateDocumentResponse) GetTotalPages() int64

func (*BatchTranslateDocumentResponse) GetTranslatedCharacters

func (x *BatchTranslateDocumentResponse) GetTranslatedCharacters() int64

func (*BatchTranslateDocumentResponse) GetTranslatedPages

func (x *BatchTranslateDocumentResponse) GetTranslatedPages() int64

func (*BatchTranslateDocumentResponse) ProtoMessage

func (*BatchTranslateDocumentResponse) ProtoMessage()

func (*BatchTranslateDocumentResponse) ProtoReflect

func (*BatchTranslateDocumentResponse) Reset

func (x *BatchTranslateDocumentResponse) Reset()

func (*BatchTranslateDocumentResponse) String

BatchTranslateMetadata

type BatchTranslateMetadata struct {

	// The state of the operation.
	State BatchTranslateMetadata_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.translation.v3.BatchTranslateMetadata_State" json:"state,omitempty"`
	// Number of successfully translated characters so far (Unicode codepoints).
	TranslatedCharacters int64 `protobuf:"varint,2,opt,name=translated_characters,json=translatedCharacters,proto3" json:"translated_characters,omitempty"`
	// Number of characters that have failed to process so far (Unicode
	// codepoints).
	FailedCharacters int64 `protobuf:"varint,3,opt,name=failed_characters,json=failedCharacters,proto3" json:"failed_characters,omitempty"`
	// Total number of characters (Unicode codepoints).
	// This is the total number of codepoints from input files times the number of
	// target languages and appears here shortly after the call is submitted.
	TotalCharacters int64 `protobuf:"varint,4,opt,name=total_characters,json=totalCharacters,proto3" json:"total_characters,omitempty"`
	// Time when the operation was submitted.
	SubmitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
	// contains filtered or unexported fields
}

State metadata for the batch translation operation.

func (*BatchTranslateMetadata) Descriptor

func (*BatchTranslateMetadata) Descriptor() ([]byte, []int)

Deprecated: Use BatchTranslateMetadata.ProtoReflect.Descriptor instead.

func (*BatchTranslateMetadata) GetFailedCharacters

func (x *BatchTranslateMetadata) GetFailedCharacters() int64

func (*BatchTranslateMetadata) GetState

func (*BatchTranslateMetadata) GetSubmitTime

func (x *BatchTranslateMetadata) GetSubmitTime() *timestamppb.Timestamp

func (*BatchTranslateMetadata) GetTotalCharacters

func (x *BatchTranslateMetadata) GetTotalCharacters() int64

func (*BatchTranslateMetadata) GetTranslatedCharacters

func (x *BatchTranslateMetadata) GetTranslatedCharacters() int64

func (*BatchTranslateMetadata) ProtoMessage

func (*BatchTranslateMetadata) ProtoMessage()

func (*BatchTranslateMetadata) ProtoReflect

func (x *BatchTranslateMetadata) ProtoReflect() protoreflect.Message

func (*BatchTranslateMetadata) Reset

func (x *BatchTranslateMetadata) Reset()

func (*BatchTranslateMetadata) String

func (x *BatchTranslateMetadata) String() string

BatchTranslateMetadata_State

type BatchTranslateMetadata_State int32

State of the job.

BatchTranslateMetadata_STATE_UNSPECIFIED, BatchTranslateMetadata_RUNNING, BatchTranslateMetadata_SUCCEEDED, BatchTranslateMetadata_FAILED, BatchTranslateMetadata_CANCELLING, BatchTranslateMetadata_CANCELLED

const (
	// Invalid.
	BatchTranslateMetadata_STATE_UNSPECIFIED BatchTranslateMetadata_State = 0
	// Request is being processed.
	BatchTranslateMetadata_RUNNING BatchTranslateMetadata_State = 1
	// The batch is processed, and at least one item was successfully
	// processed.
	BatchTranslateMetadata_SUCCEEDED BatchTranslateMetadata_State = 2
	// The batch is done and no item was successfully processed.
	BatchTranslateMetadata_FAILED BatchTranslateMetadata_State = 3
	// Request is in the process of being canceled after caller invoked
	// longrunning.Operations.CancelOperation on the request id.
	BatchTranslateMetadata_CANCELLING BatchTranslateMetadata_State = 4
	// The batch is done after the user has called the
	// longrunning.Operations.CancelOperation. Any records processed before the
	// cancel command are output as specified in the request.
	BatchTranslateMetadata_CANCELLED BatchTranslateMetadata_State = 5
)

func (BatchTranslateMetadata_State) Descriptor

func (BatchTranslateMetadata_State) Enum

func (BatchTranslateMetadata_State) EnumDescriptor

func (BatchTranslateMetadata_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use BatchTranslateMetadata_State.Descriptor instead.

func (BatchTranslateMetadata_State) Number

func (BatchTranslateMetadata_State) String

func (BatchTranslateMetadata_State) Type

BatchTranslateResponse

type BatchTranslateResponse struct {

	// Total number of characters (Unicode codepoints).
	TotalCharacters int64 `protobuf:"varint,1,opt,name=total_characters,json=totalCharacters,proto3" json:"total_characters,omitempty"`
	// Number of successfully translated characters (Unicode codepoints).
	TranslatedCharacters int64 `protobuf:"varint,2,opt,name=translated_characters,json=translatedCharacters,proto3" json:"translated_characters,omitempty"`
	// Number of characters that have failed to process (Unicode codepoints).
	FailedCharacters int64 `protobuf:"varint,3,opt,name=failed_characters,json=failedCharacters,proto3" json:"failed_characters,omitempty"`
	// Time when the operation was submitted.
	SubmitTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
	// The time when the operation is finished and
	// [google.longrunning.Operation.done][google.longrunning.Operation.done] is
	// set to true.
	EndTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// contains filtered or unexported fields
}

Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by BatchTranslateText if at least one sentence is translated successfully.

func (*BatchTranslateResponse) Descriptor

func (*BatchTranslateResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchTranslateResponse.ProtoReflect.Descriptor instead.

func (*BatchTranslateResponse) GetEndTime

func (x *BatchTranslateResponse) GetEndTime() *timestamppb.Timestamp

func (*BatchTranslateResponse) GetFailedCharacters

func (x *BatchTranslateResponse) GetFailedCharacters() int64

func (*BatchTranslateResponse) GetSubmitTime

func (x *BatchTranslateResponse) GetSubmitTime() *timestamppb.Timestamp

func (*BatchTranslateResponse) GetTotalCharacters

func (x *BatchTranslateResponse) GetTotalCharacters() int64

func (*BatchTranslateResponse) GetTranslatedCharacters

func (x *BatchTranslateResponse) GetTranslatedCharacters() int64

func (*BatchTranslateResponse) ProtoMessage

func (*BatchTranslateResponse) ProtoMessage()

func (*BatchTranslateResponse) ProtoReflect

func (x *BatchTranslateResponse) ProtoReflect() protoreflect.Message

func (*BatchTranslateResponse) Reset

func (x *BatchTranslateResponse) Reset()

func (*BatchTranslateResponse) String

func (x *BatchTranslateResponse) String() string

BatchTranslateTextRequest

type BatchTranslateTextRequest struct {

	// Required. Location to make a call. Must refer to a caller's project.
	//
	// Format: `projects/{project-number-or-id}/locations/{location-id}`.
	//
	// The `global` location is not supported for batch translation.
	//
	// Only AutoML Translation models or glossaries within the same region (have
	// the same location-id) can be used, otherwise an INVALID_ARGUMENT (400)
	// error is returned.
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. Source language code. Supported language codes are listed in
	// [Language
	// Support](https://cloud.google.com/translate/docs/languages).
	SourceLanguageCode string `protobuf:"bytes,2,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"`
	// Required. Specify up to 10 language codes here. Supported language codes
	// are listed in [Language
	// Support](https://cloud.google.com/translate/docs/languages).
	TargetLanguageCodes []string `protobuf:"bytes,3,rep,name=target_language_codes,json=targetLanguageCodes,proto3" json:"target_language_codes,omitempty"`
	// 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 `protobuf:"bytes,4,rep,name=models,proto3" json:"models,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	// 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 `protobuf:"bytes,5,rep,name=input_configs,json=inputConfigs,proto3" json:"input_configs,omitempty"`
	// 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 `protobuf:"bytes,6,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
	// Optional. Glossaries to be applied for translation.
	// It's keyed by target language code.
	Glossaries map[string]*