Documentation ¶
Index ¶
- Variables
- func RegisterTranslationServiceServer(s *grpc.Server, srv TranslationServiceServer)
- type BatchTranslateMetadata
- func (*BatchTranslateMetadata) Descriptor() ([]byte, []int)
- func (m *BatchTranslateMetadata) GetFailedCharacters() int64
- func (m *BatchTranslateMetadata) GetState() BatchTranslateMetadata_State
- func (m *BatchTranslateMetadata) GetSubmitTime() *timestamp.Timestamp
- func (m *BatchTranslateMetadata) GetTotalCharacters() int64
- func (m *BatchTranslateMetadata) GetTranslatedCharacters() int64
- func (*BatchTranslateMetadata) ProtoMessage()
- func (m *BatchTranslateMetadata) Reset()
- func (m *BatchTranslateMetadata) String() string
- func (m *BatchTranslateMetadata) XXX_DiscardUnknown()
- func (m *BatchTranslateMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BatchTranslateMetadata) XXX_Merge(src proto.Message)
- func (m *BatchTranslateMetadata) XXX_Size() int
- func (m *BatchTranslateMetadata) XXX_Unmarshal(b []byte) error
- type BatchTranslateMetadata_State
- type BatchTranslateResponse
- func (*BatchTranslateResponse) Descriptor() ([]byte, []int)
- func (m *BatchTranslateResponse) GetEndTime() *timestamp.Timestamp
- func (m *BatchTranslateResponse) GetFailedCharacters() int64
- func (m *BatchTranslateResponse) GetSubmitTime() *timestamp.Timestamp
- func (m *BatchTranslateResponse) GetTotalCharacters() int64
- func (m *BatchTranslateResponse) GetTranslatedCharacters() int64
- func (*BatchTranslateResponse) ProtoMessage()
- func (m *BatchTranslateResponse) Reset()
- func (m *BatchTranslateResponse) String() string
- func (m *BatchTranslateResponse) XXX_DiscardUnknown()
- func (m *BatchTranslateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BatchTranslateResponse) XXX_Merge(src proto.Message)
- func (m *BatchTranslateResponse) XXX_Size() int
- func (m *BatchTranslateResponse) XXX_Unmarshal(b []byte) error
- type BatchTranslateTextRequest
- func (*BatchTranslateTextRequest) Descriptor() ([]byte, []int)
- func (m *BatchTranslateTextRequest) GetGlossaries() map[string]*TranslateTextGlossaryConfig
- func (m *BatchTranslateTextRequest) GetInputConfigs() []*InputConfig
- func (m *BatchTranslateTextRequest) GetLabels() map[string]string
- func (m *BatchTranslateTextRequest) GetModels() map[string]string
- func (m *BatchTranslateTextRequest) GetOutputConfig() *OutputConfig
- func (m *BatchTranslateTextRequest) GetParent() string
- func (m *BatchTranslateTextRequest) GetSourceLanguageCode() string
- func (m *BatchTranslateTextRequest) GetTargetLanguageCodes() []string
- func (*BatchTranslateTextRequest) ProtoMessage()
- func (m *BatchTranslateTextRequest) Reset()
- func (m *BatchTranslateTextRequest) String() string
- func (m *BatchTranslateTextRequest) XXX_DiscardUnknown()
- func (m *BatchTranslateTextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BatchTranslateTextRequest) XXX_Merge(src proto.Message)
- func (m *BatchTranslateTextRequest) XXX_Size() int
- func (m *BatchTranslateTextRequest) XXX_Unmarshal(b []byte) error
- type CreateGlossaryMetadata
- func (*CreateGlossaryMetadata) Descriptor() ([]byte, []int)
- func (m *CreateGlossaryMetadata) GetName() string
- func (m *CreateGlossaryMetadata) GetState() CreateGlossaryMetadata_State
- func (m *CreateGlossaryMetadata) GetSubmitTime() *timestamp.Timestamp
- func (*CreateGlossaryMetadata) ProtoMessage()
- func (m *CreateGlossaryMetadata) Reset()
- func (m *CreateGlossaryMetadata) String() string
- func (m *CreateGlossaryMetadata) XXX_DiscardUnknown()
- func (m *CreateGlossaryMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateGlossaryMetadata) XXX_Merge(src proto.Message)
- func (m *CreateGlossaryMetadata) XXX_Size() int
- func (m *CreateGlossaryMetadata) XXX_Unmarshal(b []byte) error
- type CreateGlossaryMetadata_State
- type CreateGlossaryRequest
- func (*CreateGlossaryRequest) Descriptor() ([]byte, []int)
- func (m *CreateGlossaryRequest) GetGlossary() *Glossary
- func (m *CreateGlossaryRequest) GetParent() string
- func (*CreateGlossaryRequest) ProtoMessage()
- func (m *CreateGlossaryRequest) Reset()
- func (m *CreateGlossaryRequest) String() string
- func (m *CreateGlossaryRequest) XXX_DiscardUnknown()
- func (m *CreateGlossaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateGlossaryRequest) XXX_Merge(src proto.Message)
- func (m *CreateGlossaryRequest) XXX_Size() int
- func (m *CreateGlossaryRequest) XXX_Unmarshal(b []byte) error
- type DeleteGlossaryMetadata
- func (*DeleteGlossaryMetadata) Descriptor() ([]byte, []int)
- func (m *DeleteGlossaryMetadata) GetName() string
- func (m *DeleteGlossaryMetadata) GetState() DeleteGlossaryMetadata_State
- func (m *DeleteGlossaryMetadata) GetSubmitTime() *timestamp.Timestamp
- func (*DeleteGlossaryMetadata) ProtoMessage()
- func (m *DeleteGlossaryMetadata) Reset()
- func (m *DeleteGlossaryMetadata) String() string
- func (m *DeleteGlossaryMetadata) XXX_DiscardUnknown()
- func (m *DeleteGlossaryMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteGlossaryMetadata) XXX_Merge(src proto.Message)
- func (m *DeleteGlossaryMetadata) XXX_Size() int
- func (m *DeleteGlossaryMetadata) XXX_Unmarshal(b []byte) error
- type DeleteGlossaryMetadata_State
- type DeleteGlossaryRequest
- func (*DeleteGlossaryRequest) Descriptor() ([]byte, []int)
- func (m *DeleteGlossaryRequest) GetName() string
- func (*DeleteGlossaryRequest) ProtoMessage()
- func (m *DeleteGlossaryRequest) Reset()
- func (m *DeleteGlossaryRequest) String() string
- func (m *DeleteGlossaryRequest) XXX_DiscardUnknown()
- func (m *DeleteGlossaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteGlossaryRequest) XXX_Merge(src proto.Message)
- func (m *DeleteGlossaryRequest) XXX_Size() int
- func (m *DeleteGlossaryRequest) XXX_Unmarshal(b []byte) error
- type DeleteGlossaryResponse
- func (*DeleteGlossaryResponse) Descriptor() ([]byte, []int)
- func (m *DeleteGlossaryResponse) GetEndTime() *timestamp.Timestamp
- func (m *DeleteGlossaryResponse) GetName() string
- func (m *DeleteGlossaryResponse) GetSubmitTime() *timestamp.Timestamp
- func (*DeleteGlossaryResponse) ProtoMessage()
- func (m *DeleteGlossaryResponse) Reset()
- func (m *DeleteGlossaryResponse) String() string
- func (m *DeleteGlossaryResponse) XXX_DiscardUnknown()
- func (m *DeleteGlossaryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteGlossaryResponse) XXX_Merge(src proto.Message)
- func (m *DeleteGlossaryResponse) XXX_Size() int
- func (m *DeleteGlossaryResponse) XXX_Unmarshal(b []byte) error
- type DetectLanguageRequest
- func (*DetectLanguageRequest) Descriptor() ([]byte, []int)
- func (m *DetectLanguageRequest) GetContent() string
- func (m *DetectLanguageRequest) GetLabels() map[string]string
- func (m *DetectLanguageRequest) GetMimeType() string
- func (m *DetectLanguageRequest) GetModel() string
- func (m *DetectLanguageRequest) GetParent() string
- func (m *DetectLanguageRequest) GetSource() isDetectLanguageRequest_Source
- func (*DetectLanguageRequest) ProtoMessage()
- func (m *DetectLanguageRequest) Reset()
- func (m *DetectLanguageRequest) String() string
- func (m *DetectLanguageRequest) XXX_DiscardUnknown()
- func (m *DetectLanguageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DetectLanguageRequest) XXX_Merge(src proto.Message)
- func (*DetectLanguageRequest) XXX_OneofWrappers() []interface{}
- func (m *DetectLanguageRequest) XXX_Size() int
- func (m *DetectLanguageRequest) XXX_Unmarshal(b []byte) error
- type DetectLanguageRequest_Content
- type DetectLanguageResponse
- func (*DetectLanguageResponse) Descriptor() ([]byte, []int)
- func (m *DetectLanguageResponse) GetLanguages() []*DetectedLanguage
- func (*DetectLanguageResponse) ProtoMessage()
- func (m *DetectLanguageResponse) Reset()
- func (m *DetectLanguageResponse) String() string
- func (m *DetectLanguageResponse) XXX_DiscardUnknown()
- func (m *DetectLanguageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DetectLanguageResponse) XXX_Merge(src proto.Message)
- func (m *DetectLanguageResponse) XXX_Size() int
- func (m *DetectLanguageResponse) XXX_Unmarshal(b []byte) error
- type DetectedLanguage
- func (*DetectedLanguage) Descriptor() ([]byte, []int)
- func (m *DetectedLanguage) GetConfidence() float32
- func (m *DetectedLanguage) GetLanguageCode() string
- func (*DetectedLanguage) ProtoMessage()
- func (m *DetectedLanguage) Reset()
- func (m *DetectedLanguage) String() string
- func (m *DetectedLanguage) XXX_DiscardUnknown()
- func (m *DetectedLanguage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DetectedLanguage) XXX_Merge(src proto.Message)
- func (m *DetectedLanguage) XXX_Size() int
- func (m *DetectedLanguage) XXX_Unmarshal(b []byte) error
- type GcsDestination
- func (*GcsDestination) Descriptor() ([]byte, []int)
- func (m *GcsDestination) GetOutputUriPrefix() string
- func (*GcsDestination) ProtoMessage()
- func (m *GcsDestination) Reset()
- func (m *GcsDestination) String() string
- func (m *GcsDestination) XXX_DiscardUnknown()
- func (m *GcsDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GcsDestination) XXX_Merge(src proto.Message)
- func (m *GcsDestination) XXX_Size() int
- func (m *GcsDestination) XXX_Unmarshal(b []byte) error
- type GcsSource
- func (*GcsSource) Descriptor() ([]byte, []int)
- func (m *GcsSource) GetInputUri() string
- func (*GcsSource) ProtoMessage()
- func (m *GcsSource) Reset()
- func (m *GcsSource) String() string
- func (m *GcsSource) XXX_DiscardUnknown()
- func (m *GcsSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GcsSource) XXX_Merge(src proto.Message)
- func (m *GcsSource) XXX_Size() int
- func (m *GcsSource) XXX_Unmarshal(b []byte) error
- type GetGlossaryRequest
- func (*GetGlossaryRequest) Descriptor() ([]byte, []int)
- func (m *GetGlossaryRequest) GetName() string
- func (*GetGlossaryRequest) ProtoMessage()
- func (m *GetGlossaryRequest) Reset()
- func (m *GetGlossaryRequest) String() string
- func (m *GetGlossaryRequest) XXX_DiscardUnknown()
- func (m *GetGlossaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetGlossaryRequest) XXX_Merge(src proto.Message)
- func (m *GetGlossaryRequest) XXX_Size() int
- func (m *GetGlossaryRequest) XXX_Unmarshal(b []byte) error
- type GetSupportedLanguagesRequest
- func (*GetSupportedLanguagesRequest) Descriptor() ([]byte, []int)
- func (m *GetSupportedLanguagesRequest) GetDisplayLanguageCode() string
- func (m *GetSupportedLanguagesRequest) GetModel() string
- func (m *GetSupportedLanguagesRequest) GetParent() string
- func (*GetSupportedLanguagesRequest) ProtoMessage()
- func (m *GetSupportedLanguagesRequest) Reset()
- func (m *GetSupportedLanguagesRequest) String() string
- func (m *GetSupportedLanguagesRequest) XXX_DiscardUnknown()
- func (m *GetSupportedLanguagesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetSupportedLanguagesRequest) XXX_Merge(src proto.Message)
- func (m *GetSupportedLanguagesRequest) XXX_Size() int
- func (m *GetSupportedLanguagesRequest) XXX_Unmarshal(b []byte) error
- type Glossary
- func (*Glossary) Descriptor() ([]byte, []int)
- func (m *Glossary) GetEndTime() *timestamp.Timestamp
- func (m *Glossary) GetEntryCount() int32
- func (m *Glossary) GetInputConfig() *GlossaryInputConfig
- func (m *Glossary) GetLanguageCodesSet() *Glossary_LanguageCodesSet
- func (m *Glossary) GetLanguagePair() *Glossary_LanguageCodePair
- func (m *Glossary) GetLanguages() isGlossary_Languages
- func (m *Glossary) GetName() string
- func (m *Glossary) GetSubmitTime() *timestamp.Timestamp
- func (*Glossary) ProtoMessage()
- func (m *Glossary) Reset()
- func (m *Glossary) String() string
- func (m *Glossary) XXX_DiscardUnknown()
- func (m *Glossary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Glossary) XXX_Merge(src proto.Message)
- func (*Glossary) XXX_OneofWrappers() []interface{}
- func (m *Glossary) XXX_Size() int
- func (m *Glossary) XXX_Unmarshal(b []byte) error
- type GlossaryInputConfig
- func (*GlossaryInputConfig) Descriptor() ([]byte, []int)
- func (m *GlossaryInputConfig) GetGcsSource() *GcsSource
- func (m *GlossaryInputConfig) GetSource() isGlossaryInputConfig_Source
- func (*GlossaryInputConfig) ProtoMessage()
- func (m *GlossaryInputConfig) Reset()
- func (m *GlossaryInputConfig) String() string
- func (m *GlossaryInputConfig) XXX_DiscardUnknown()
- func (m *GlossaryInputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GlossaryInputConfig) XXX_Merge(src proto.Message)
- func (*GlossaryInputConfig) XXX_OneofWrappers() []interface{}
- func (m *GlossaryInputConfig) XXX_Size() int
- func (m *GlossaryInputConfig) XXX_Unmarshal(b []byte) error
- type GlossaryInputConfig_GcsSource
- type Glossary_LanguageCodePair
- func (*Glossary_LanguageCodePair) Descriptor() ([]byte, []int)
- func (m *Glossary_LanguageCodePair) GetSourceLanguageCode() string
- func (m *Glossary_LanguageCodePair) GetTargetLanguageCode() string
- func (*Glossary_LanguageCodePair) ProtoMessage()
- func (m *Glossary_LanguageCodePair) Reset()
- func (m *Glossary_LanguageCodePair) String() string
- func (m *Glossary_LanguageCodePair) XXX_DiscardUnknown()
- func (m *Glossary_LanguageCodePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Glossary_LanguageCodePair) XXX_Merge(src proto.Message)
- func (m *Glossary_LanguageCodePair) XXX_Size() int
- func (m *Glossary_LanguageCodePair) XXX_Unmarshal(b []byte) error
- type Glossary_LanguageCodesSet
- func (*Glossary_LanguageCodesSet) Descriptor() ([]byte, []int)
- func (m *Glossary_LanguageCodesSet) GetLanguageCodes() []string
- func (*Glossary_LanguageCodesSet) ProtoMessage()
- func (m *Glossary_LanguageCodesSet) Reset()
- func (m *Glossary_LanguageCodesSet) String() string
- func (m *Glossary_LanguageCodesSet) XXX_DiscardUnknown()
- func (m *Glossary_LanguageCodesSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Glossary_LanguageCodesSet) XXX_Merge(src proto.Message)
- func (m *Glossary_LanguageCodesSet) XXX_Size() int
- func (m *Glossary_LanguageCodesSet) XXX_Unmarshal(b []byte) error
- type Glossary_LanguageCodesSet_
- type Glossary_LanguagePair
- type InputConfig
- func (*InputConfig) Descriptor() ([]byte, []int)
- func (m *InputConfig) GetGcsSource() *GcsSource
- func (m *InputConfig) GetMimeType() string
- func (m *InputConfig) GetSource() isInputConfig_Source
- func (*InputConfig) ProtoMessage()
- func (m *InputConfig) Reset()
- func (m *InputConfig) String() string
- func (m *InputConfig) XXX_DiscardUnknown()
- func (m *InputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InputConfig) XXX_Merge(src proto.Message)
- func (*InputConfig) XXX_OneofWrappers() []interface{}
- func (m *InputConfig) XXX_Size() int
- func (m *InputConfig) XXX_Unmarshal(b []byte) error
- type InputConfig_GcsSource
- type ListGlossariesRequest
- func (*ListGlossariesRequest) Descriptor() ([]byte, []int)
- func (m *ListGlossariesRequest) GetFilter() string
- func (m *ListGlossariesRequest) GetPageSize() int32
- func (m *ListGlossariesRequest) GetPageToken() string
- func (m *ListGlossariesRequest) GetParent() string
- func (*ListGlossariesRequest) ProtoMessage()
- func (m *ListGlossariesRequest) Reset()
- func (m *ListGlossariesRequest) String() string
- func (m *ListGlossariesRequest) XXX_DiscardUnknown()
- func (m *ListGlossariesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListGlossariesRequest) XXX_Merge(src proto.Message)
- func (m *ListGlossariesRequest) XXX_Size() int
- func (m *ListGlossariesRequest) XXX_Unmarshal(b []byte) error
- type ListGlossariesResponse
- func (*ListGlossariesResponse) Descriptor() ([]byte, []int)
- func (m *ListGlossariesResponse) GetGlossaries() []*Glossary
- func (m *ListGlossariesResponse) GetNextPageToken() string
- func (*ListGlossariesResponse) ProtoMessage()
- func (m *ListGlossariesResponse) Reset()
- func (m *ListGlossariesResponse) String() string
- func (m *ListGlossariesResponse) XXX_DiscardUnknown()
- func (m *ListGlossariesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListGlossariesResponse) XXX_Merge(src proto.Message)
- func (m *ListGlossariesResponse) XXX_Size() int
- func (m *ListGlossariesResponse) XXX_Unmarshal(b []byte) error
- type OutputConfig
- func (*OutputConfig) Descriptor() ([]byte, []int)
- func (m *OutputConfig) GetDestination() isOutputConfig_Destination
- func (m *OutputConfig) GetGcsDestination() *GcsDestination
- func (*OutputConfig) ProtoMessage()
- func (m *OutputConfig) Reset()
- func (m *OutputConfig) String() string
- func (m *OutputConfig) XXX_DiscardUnknown()
- func (m *OutputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OutputConfig) XXX_Merge(src proto.Message)
- func (*OutputConfig) XXX_OneofWrappers() []interface{}
- func (m *OutputConfig) XXX_Size() int
- func (m *OutputConfig) XXX_Unmarshal(b []byte) error
- type OutputConfig_GcsDestination
- type SupportedLanguage
- func (*SupportedLanguage) Descriptor() ([]byte, []int)
- func (m *SupportedLanguage) GetDisplayName() string
- func (m *SupportedLanguage) GetLanguageCode() string
- func (m *SupportedLanguage) GetSupportSource() bool
- func (m *SupportedLanguage) GetSupportTarget() bool
- func (*SupportedLanguage) ProtoMessage()
- func (m *SupportedLanguage) Reset()
- func (m *SupportedLanguage) String() string
- func (m *SupportedLanguage) XXX_DiscardUnknown()
- func (m *SupportedLanguage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SupportedLanguage) XXX_Merge(src proto.Message)
- func (m *SupportedLanguage) XXX_Size() int
- func (m *SupportedLanguage) XXX_Unmarshal(b []byte) error
- type SupportedLanguages
- func (*SupportedLanguages) Descriptor() ([]byte, []int)
- func (m *SupportedLanguages) GetLanguages() []*SupportedLanguage
- func (*SupportedLanguages) ProtoMessage()
- func (m *SupportedLanguages) Reset()
- func (m *SupportedLanguages) String() string
- func (m *SupportedLanguages) XXX_DiscardUnknown()
- func (m *SupportedLanguages) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SupportedLanguages) XXX_Merge(src proto.Message)
- func (m *SupportedLanguages) XXX_Size() int
- func (m *SupportedLanguages) XXX_Unmarshal(b []byte) error
- type TranslateTextGlossaryConfig
- func (*TranslateTextGlossaryConfig) Descriptor() ([]byte, []int)
- func (m *TranslateTextGlossaryConfig) GetGlossary() string
- func (m *TranslateTextGlossaryConfig) GetIgnoreCase() bool
- func (*TranslateTextGlossaryConfig) ProtoMessage()
- func (m *TranslateTextGlossaryConfig) Reset()
- func (m *TranslateTextGlossaryConfig) String() string
- func (m *TranslateTextGlossaryConfig) XXX_DiscardUnknown()
- func (m *TranslateTextGlossaryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TranslateTextGlossaryConfig) XXX_Merge(src proto.Message)
- func (m *TranslateTextGlossaryConfig) XXX_Size() int
- func (m *TranslateTextGlossaryConfig) XXX_Unmarshal(b []byte) error
- type TranslateTextRequest
- func (*TranslateTextRequest) Descriptor() ([]byte, []int)
- func (m *TranslateTextRequest) GetContents() []string
- func (m *TranslateTextRequest) GetGlossaryConfig() *TranslateTextGlossaryConfig
- func (m *TranslateTextRequest) GetLabels() map[string]string
- func (m *TranslateTextRequest) GetMimeType() string
- func (m *TranslateTextRequest) GetModel() string
- func (m *TranslateTextRequest) GetParent() string
- func (m *TranslateTextRequest) GetSourceLanguageCode() string
- func (m *TranslateTextRequest) GetTargetLanguageCode() string
- func (*TranslateTextRequest) ProtoMessage()
- func (m *TranslateTextRequest) Reset()
- func (m *TranslateTextRequest) String() string
- func (m *TranslateTextRequest) XXX_DiscardUnknown()
- func (m *TranslateTextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TranslateTextRequest) XXX_Merge(src proto.Message)
- func (m *TranslateTextRequest) XXX_Size() int
- func (m *TranslateTextRequest) XXX_Unmarshal(b []byte) error
- type TranslateTextResponse
- func (*TranslateTextResponse) Descriptor() ([]byte, []int)
- func (m *TranslateTextResponse) GetGlossaryTranslations() []*Translation
- func (m *TranslateTextResponse) GetTranslations() []*Translation
- func (*TranslateTextResponse) ProtoMessage()
- func (m *TranslateTextResponse) Reset()
- func (m *TranslateTextResponse) String() string
- func (m *TranslateTextResponse) XXX_DiscardUnknown()
- func (m *TranslateTextResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TranslateTextResponse) XXX_Merge(src proto.Message)
- func (m *TranslateTextResponse) XXX_Size() int
- func (m *TranslateTextResponse) XXX_Unmarshal(b []byte) error
- type Translation
- func (*Translation) Descriptor() ([]byte, []int)
- func (m *Translation) GetDetectedLanguageCode() string
- func (m *Translation) GetGlossaryConfig() *TranslateTextGlossaryConfig
- func (m *Translation) GetModel() string
- func (m *Translation) GetTranslatedText() string
- func (*Translation) ProtoMessage()
- func (m *Translation) Reset()
- func (m *Translation) String() string
- func (m *Translation) XXX_DiscardUnknown()
- func (m *Translation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Translation) XXX_Merge(src proto.Message)
- func (m *Translation) XXX_Size() int
- func (m *Translation) XXX_Unmarshal(b []byte) error
- type TranslationServiceClient
- type TranslationServiceServer
- type UnimplementedTranslationServiceServer
- func (*UnimplementedTranslationServiceServer) BatchTranslateText(ctx context.Context, req *BatchTranslateTextRequest) (*longrunning.Operation, error)
- func (*UnimplementedTranslationServiceServer) CreateGlossary(ctx context.Context, req *CreateGlossaryRequest) (*longrunning.Operation, error)
- func (*UnimplementedTranslationServiceServer) DeleteGlossary(ctx context.Context, req *DeleteGlossaryRequest) (*longrunning.Operation, error)
- func (*UnimplementedTranslationServiceServer) DetectLanguage(ctx context.Context, req *DetectLanguageRequest) (*DetectLanguageResponse, error)
- func (*UnimplementedTranslationServiceServer) GetGlossary(ctx context.Context, req *GetGlossaryRequest) (*Glossary, error)
- func (*UnimplementedTranslationServiceServer) GetSupportedLanguages(ctx context.Context, req *GetSupportedLanguagesRequest) (*SupportedLanguages, error)
- func (*UnimplementedTranslationServiceServer) ListGlossaries(ctx context.Context, req *ListGlossariesRequest) (*ListGlossariesResponse, error)
- func (*UnimplementedTranslationServiceServer) TranslateText(ctx context.Context, req *TranslateTextRequest) (*TranslateTextResponse, error)
Constants ¶
This section is empty.
Variables ¶
var BatchTranslateMetadata_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "RUNNING",
2: "SUCCEEDED",
3: "FAILED",
4: "CANCELLING",
5: "CANCELLED",
}
var BatchTranslateMetadata_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"RUNNING": 1,
"SUCCEEDED": 2,
"FAILED": 3,
"CANCELLING": 4,
"CANCELLED": 5,
}
var CreateGlossaryMetadata_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "RUNNING",
2: "SUCCEEDED",
3: "FAILED",
4: "CANCELLING",
5: "CANCELLED",
}
var CreateGlossaryMetadata_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"RUNNING": 1,
"SUCCEEDED": 2,
"FAILED": 3,
"CANCELLING": 4,
"CANCELLED": 5,
}
var DeleteGlossaryMetadata_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "RUNNING",
2: "SUCCEEDED",
3: "FAILED",
4: "CANCELLING",
5: "CANCELLED",
}
var DeleteGlossaryMetadata_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"RUNNING": 1,
"SUCCEEDED": 2,
"FAILED": 3,
"CANCELLING": 4,
"CANCELLED": 5,
}
Functions ¶
func RegisterTranslationServiceServer ¶
func RegisterTranslationServiceServer(s *grpc.Server, srv TranslationServiceServer)
Types ¶
type BatchTranslateMetadata ¶
type BatchTranslateMetadata struct { // The state of the operation. State BatchTranslateMetadata_State `` /* 126-byte string literal not displayed */ // 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 *timestamp.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
State metadata for the batch translation operation.
func (*BatchTranslateMetadata) Descriptor ¶
func (*BatchTranslateMetadata) Descriptor() ([]byte, []int)
func (*BatchTranslateMetadata) GetFailedCharacters ¶
func (m *BatchTranslateMetadata) GetFailedCharacters() int64
func (*BatchTranslateMetadata) GetState ¶
func (m *BatchTranslateMetadata) GetState() BatchTranslateMetadata_State
func (*BatchTranslateMetadata) GetSubmitTime ¶
func (m *BatchTranslateMetadata) GetSubmitTime() *timestamp.Timestamp
func (*BatchTranslateMetadata) GetTotalCharacters ¶
func (m *BatchTranslateMetadata) GetTotalCharacters() int64
func (*BatchTranslateMetadata) GetTranslatedCharacters ¶
func (m *BatchTranslateMetadata) GetTranslatedCharacters() int64
func (*BatchTranslateMetadata) ProtoMessage ¶
func (*BatchTranslateMetadata) ProtoMessage()
func (*BatchTranslateMetadata) Reset ¶
func (m *BatchTranslateMetadata) Reset()
func (*BatchTranslateMetadata) String ¶
func (m *BatchTranslateMetadata) String() string
func (*BatchTranslateMetadata) XXX_DiscardUnknown ¶
func (m *BatchTranslateMetadata) XXX_DiscardUnknown()
func (*BatchTranslateMetadata) XXX_Marshal ¶
func (m *BatchTranslateMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BatchTranslateMetadata) XXX_Merge ¶
func (m *BatchTranslateMetadata) XXX_Merge(src proto.Message)
func (*BatchTranslateMetadata) XXX_Size ¶
func (m *BatchTranslateMetadata) XXX_Size() int
func (*BatchTranslateMetadata) XXX_Unmarshal ¶
func (m *BatchTranslateMetadata) XXX_Unmarshal(b []byte) error
type BatchTranslateMetadata_State ¶
type BatchTranslateMetadata_State int32
State of the job.
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) EnumDescriptor ¶
func (BatchTranslateMetadata_State) EnumDescriptor() ([]byte, []int)
func (BatchTranslateMetadata_State) String ¶
func (x BatchTranslateMetadata_State) String() string
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 *timestamp.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 *timestamp.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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)
func (*BatchTranslateResponse) GetEndTime ¶
func (m *BatchTranslateResponse) GetEndTime() *timestamp.Timestamp
func (*BatchTranslateResponse) GetFailedCharacters ¶
func (m *BatchTranslateResponse) GetFailedCharacters() int64
func (*BatchTranslateResponse) GetSubmitTime ¶
func (m *BatchTranslateResponse) GetSubmitTime() *timestamp.Timestamp
func (*BatchTranslateResponse) GetTotalCharacters ¶
func (m *BatchTranslateResponse) GetTotalCharacters() int64
func (*BatchTranslateResponse) GetTranslatedCharacters ¶
func (m *BatchTranslateResponse) GetTranslatedCharacters() int64
func (*BatchTranslateResponse) ProtoMessage ¶
func (*BatchTranslateResponse) ProtoMessage()
func (*BatchTranslateResponse) Reset ¶
func (m *BatchTranslateResponse) Reset()
func (*BatchTranslateResponse) String ¶
func (m *BatchTranslateResponse) String() string
func (*BatchTranslateResponse) XXX_DiscardUnknown ¶
func (m *BatchTranslateResponse) XXX_DiscardUnknown()
func (*BatchTranslateResponse) XXX_Marshal ¶
func (m *BatchTranslateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BatchTranslateResponse) XXX_Merge ¶
func (m *BatchTranslateResponse) XXX_Merge(src proto.Message)
func (*BatchTranslateResponse) XXX_Size ¶
func (m *BatchTranslateResponse) XXX_Size() int
func (*BatchTranslateResponse) XXX_Unmarshal ¶
func (m *BatchTranslateResponse) XXX_Unmarshal(b []byte) error
type 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. 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. 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`, // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` // // // 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 `` /* 153-byte string literal not displayed */ // Required. Input configurations. // The total number of files matched should be <= 1000. // 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]*TranslateTextGlossaryConfig `` /* 161-byte string literal not displayed */ // 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/labels for more information. Labels map[string]string `` /* 153-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The batch translation request.
func (*BatchTranslateTextRequest) Descriptor ¶
func (*BatchTranslateTextRequest) Descriptor() ([]byte, []int)
func (*BatchTranslateTextRequest) GetGlossaries ¶
func (m *BatchTranslateTextRequest) GetGlossaries() map[string]*TranslateTextGlossaryConfig
func (*BatchTranslateTextRequest) GetInputConfigs ¶
func (m *BatchTranslateTextRequest) GetInputConfigs() []*InputConfig
func (*BatchTranslateTextRequest) GetLabels ¶
func (m *BatchTranslateTextRequest) GetLabels() map[string]string
func (*BatchTranslateTextRequest) GetModels ¶
func (m *BatchTranslateTextRequest) GetModels() map[string]string
func (*BatchTranslateTextRequest) GetOutputConfig ¶
func (m *BatchTranslateTextRequest) GetOutputConfig() *OutputConfig
func (*BatchTranslateTextRequest) GetParent ¶
func (m *BatchTranslateTextRequest) GetParent() string
func (*BatchTranslateTextRequest) GetSourceLanguageCode ¶
func (m *BatchTranslateTextRequest) GetSourceLanguageCode() string
func (*BatchTranslateTextRequest) GetTargetLanguageCodes ¶
func (m *BatchTranslateTextRequest) GetTargetLanguageCodes() []string
func (*BatchTranslateTextRequest) ProtoMessage ¶
func (*BatchTranslateTextRequest) ProtoMessage()
func (*BatchTranslateTextRequest) Reset ¶
func (m *BatchTranslateTextRequest) Reset()
func (*BatchTranslateTextRequest) String ¶
func (m *BatchTranslateTextRequest) String() string
func (*BatchTranslateTextRequest) XXX_DiscardUnknown ¶
func (m *BatchTranslateTextRequest) XXX_DiscardUnknown()
func (*BatchTranslateTextRequest) XXX_Marshal ¶
func (m *BatchTranslateTextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BatchTranslateTextRequest) XXX_Merge ¶
func (m *BatchTranslateTextRequest) XXX_Merge(src proto.Message)
func (*BatchTranslateTextRequest) XXX_Size ¶
func (m *BatchTranslateTextRequest) XXX_Size() int
func (*BatchTranslateTextRequest) XXX_Unmarshal ¶
func (m *BatchTranslateTextRequest) XXX_Unmarshal(b []byte) error
type CreateGlossaryMetadata ¶
type CreateGlossaryMetadata struct { // The name of the glossary that is being created. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The current state of the glossary creation operation. State CreateGlossaryMetadata_State `` /* 126-byte string literal not displayed */ // The time when the operation was submitted to the server. SubmitTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by CreateGlossary.
func (*CreateGlossaryMetadata) Descriptor ¶
func (*CreateGlossaryMetadata) Descriptor() ([]byte, []int)
func (*CreateGlossaryMetadata) GetName ¶
func (m *CreateGlossaryMetadata) GetName() string
func (*CreateGlossaryMetadata) GetState ¶
func (m *CreateGlossaryMetadata) GetState() CreateGlossaryMetadata_State
func (*CreateGlossaryMetadata) GetSubmitTime ¶
func (m *CreateGlossaryMetadata) GetSubmitTime() *timestamp.Timestamp
func (*CreateGlossaryMetadata) ProtoMessage ¶
func (*CreateGlossaryMetadata) ProtoMessage()
func (*CreateGlossaryMetadata) Reset ¶
func (m *CreateGlossaryMetadata) Reset()
func (*CreateGlossaryMetadata) String ¶
func (m *CreateGlossaryMetadata) String() string
func (*CreateGlossaryMetadata) XXX_DiscardUnknown ¶
func (m *CreateGlossaryMetadata) XXX_DiscardUnknown()
func (*CreateGlossaryMetadata) XXX_Marshal ¶
func (m *CreateGlossaryMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateGlossaryMetadata) XXX_Merge ¶
func (m *CreateGlossaryMetadata) XXX_Merge(src proto.Message)
func (*CreateGlossaryMetadata) XXX_Size ¶
func (m *CreateGlossaryMetadata) XXX_Size() int
func (*CreateGlossaryMetadata) XXX_Unmarshal ¶
func (m *CreateGlossaryMetadata) XXX_Unmarshal(b []byte) error
type CreateGlossaryMetadata_State ¶
type CreateGlossaryMetadata_State int32
Enumerates the possible states that the creation request can be in.
const ( // Invalid. CreateGlossaryMetadata_STATE_UNSPECIFIED CreateGlossaryMetadata_State = 0 // Request is being processed. CreateGlossaryMetadata_RUNNING CreateGlossaryMetadata_State = 1 // The glossary was successfully created. CreateGlossaryMetadata_SUCCEEDED CreateGlossaryMetadata_State = 2 // Failed to create the glossary. CreateGlossaryMetadata_FAILED CreateGlossaryMetadata_State = 3 // Request is in the process of being canceled after caller invoked // longrunning.Operations.CancelOperation on the request id. CreateGlossaryMetadata_CANCELLING CreateGlossaryMetadata_State = 4 // The glossary creation request was successfully canceled. CreateGlossaryMetadata_CANCELLED CreateGlossaryMetadata_State = 5 )
func (CreateGlossaryMetadata_State) EnumDescriptor ¶
func (CreateGlossaryMetadata_State) EnumDescriptor() ([]byte, []int)
func (CreateGlossaryMetadata_State) String ¶
func (x CreateGlossaryMetadata_State) String() string
type CreateGlossaryRequest ¶
type CreateGlossaryRequest struct { // Required. The project name. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Required. The glossary to create. Glossary *Glossary `protobuf:"bytes,2,opt,name=glossary,proto3" json:"glossary,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request message for CreateGlossary.
func (*CreateGlossaryRequest) Descriptor ¶
func (*CreateGlossaryRequest) Descriptor() ([]byte, []int)
func (*CreateGlossaryRequest) GetGlossary ¶
func (m *CreateGlossaryRequest) GetGlossary() *Glossary
func (*CreateGlossaryRequest) GetParent ¶
func (m *CreateGlossaryRequest) GetParent() string
func (*CreateGlossaryRequest) ProtoMessage ¶
func (*CreateGlossaryRequest) ProtoMessage()
func (*CreateGlossaryRequest) Reset ¶
func (m *CreateGlossaryRequest) Reset()
func (*CreateGlossaryRequest) String ¶
func (m *CreateGlossaryRequest) String() string
func (*CreateGlossaryRequest) XXX_DiscardUnknown ¶
func (m *CreateGlossaryRequest) XXX_DiscardUnknown()
func (*CreateGlossaryRequest) XXX_Marshal ¶
func (m *CreateGlossaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateGlossaryRequest) XXX_Merge ¶
func (m *CreateGlossaryRequest) XXX_Merge(src proto.Message)
func (*CreateGlossaryRequest) XXX_Size ¶
func (m *CreateGlossaryRequest) XXX_Size() int
func (*CreateGlossaryRequest) XXX_Unmarshal ¶
func (m *CreateGlossaryRequest) XXX_Unmarshal(b []byte) error
type DeleteGlossaryMetadata ¶
type DeleteGlossaryMetadata struct { // The name of the glossary that is being deleted. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The current state of the glossary deletion operation. State DeleteGlossaryMetadata_State `` /* 126-byte string literal not displayed */ // The time when the operation was submitted to the server. SubmitTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by DeleteGlossary.
func (*DeleteGlossaryMetadata) Descriptor ¶
func (*DeleteGlossaryMetadata) Descriptor() ([]byte, []int)
func (*DeleteGlossaryMetadata) GetName ¶
func (m *DeleteGlossaryMetadata) GetName() string
func (*DeleteGlossaryMetadata) GetState ¶
func (m *DeleteGlossaryMetadata) GetState() DeleteGlossaryMetadata_State
func (*DeleteGlossaryMetadata) GetSubmitTime ¶
func (m *DeleteGlossaryMetadata) GetSubmitTime() *timestamp.Timestamp
func (*DeleteGlossaryMetadata) ProtoMessage ¶
func (*DeleteGlossaryMetadata) ProtoMessage()
func (*DeleteGlossaryMetadata) Reset ¶
func (m *DeleteGlossaryMetadata) Reset()
func (*DeleteGlossaryMetadata) String ¶
func (m *DeleteGlossaryMetadata) String() string
func (*DeleteGlossaryMetadata) XXX_DiscardUnknown ¶
func (m *DeleteGlossaryMetadata) XXX_DiscardUnknown()
func (*DeleteGlossaryMetadata) XXX_Marshal ¶
func (m *DeleteGlossaryMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteGlossaryMetadata) XXX_Merge ¶
func (m *DeleteGlossaryMetadata) XXX_Merge(src proto.Message)
func (*DeleteGlossaryMetadata) XXX_Size ¶
func (m *DeleteGlossaryMetadata) XXX_Size() int
func (*DeleteGlossaryMetadata) XXX_Unmarshal ¶
func (m *DeleteGlossaryMetadata) XXX_Unmarshal(b []byte) error
type DeleteGlossaryMetadata_State ¶
type DeleteGlossaryMetadata_State int32
Enumerates the possible states that the creation request can be in.
const ( // Invalid. DeleteGlossaryMetadata_STATE_UNSPECIFIED DeleteGlossaryMetadata_State = 0 // Request is being processed. DeleteGlossaryMetadata_RUNNING DeleteGlossaryMetadata_State = 1 // The glossary was successfully deleted. DeleteGlossaryMetadata_SUCCEEDED DeleteGlossaryMetadata_State = 2 // Failed to delete the glossary. DeleteGlossaryMetadata_FAILED DeleteGlossaryMetadata_State = 3 // Request is in the process of being canceled after caller invoked // longrunning.Operations.CancelOperation on the request id. DeleteGlossaryMetadata_CANCELLING DeleteGlossaryMetadata_State = 4 // The glossary deletion request was successfully canceled. DeleteGlossaryMetadata_CANCELLED DeleteGlossaryMetadata_State = 5 )
func (DeleteGlossaryMetadata_State) EnumDescriptor ¶
func (DeleteGlossaryMetadata_State) EnumDescriptor() ([]byte, []int)
func (DeleteGlossaryMetadata_State) String ¶
func (x DeleteGlossaryMetadata_State) String() string
type DeleteGlossaryRequest ¶
type DeleteGlossaryRequest struct { // Required. The name of the glossary to delete. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request message for DeleteGlossary.
func (*DeleteGlossaryRequest) Descriptor ¶
func (*DeleteGlossaryRequest) Descriptor() ([]byte, []int)
func (*DeleteGlossaryRequest) GetName ¶
func (m *DeleteGlossaryRequest) GetName() string
func (*DeleteGlossaryRequest) ProtoMessage ¶
func (*DeleteGlossaryRequest) ProtoMessage()
func (*DeleteGlossaryRequest) Reset ¶
func (m *DeleteGlossaryRequest) Reset()
func (*DeleteGlossaryRequest) String ¶
func (m *DeleteGlossaryRequest) String() string
func (*DeleteGlossaryRequest) XXX_DiscardUnknown ¶
func (m *DeleteGlossaryRequest) XXX_DiscardUnknown()
func (*DeleteGlossaryRequest) XXX_Marshal ¶
func (m *DeleteGlossaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteGlossaryRequest) XXX_Merge ¶
func (m *DeleteGlossaryRequest) XXX_Merge(src proto.Message)
func (*DeleteGlossaryRequest) XXX_Size ¶
func (m *DeleteGlossaryRequest) XXX_Size() int
func (*DeleteGlossaryRequest) XXX_Unmarshal ¶
func (m *DeleteGlossaryRequest) XXX_Unmarshal(b []byte) error
type DeleteGlossaryResponse ¶
type DeleteGlossaryResponse struct { // The name of the deleted glossary. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The time when the operation was submitted to the server. SubmitTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` // The time when the glossary deletion is finished and // [google.longrunning.Operation.done][google.longrunning.Operation.done] is // set to true. EndTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by DeleteGlossary.
func (*DeleteGlossaryResponse) Descriptor ¶
func (*DeleteGlossaryResponse) Descriptor() ([]byte, []int)
func (*DeleteGlossaryResponse) GetEndTime ¶
func (m *DeleteGlossaryResponse) GetEndTime() *timestamp.Timestamp
func (*DeleteGlossaryResponse) GetName ¶
func (m *DeleteGlossaryResponse) GetName() string
func (*DeleteGlossaryResponse) GetSubmitTime ¶
func (m *DeleteGlossaryResponse) GetSubmitTime() *timestamp.Timestamp
func (*DeleteGlossaryResponse) ProtoMessage ¶
func (*DeleteGlossaryResponse) ProtoMessage()
func (*DeleteGlossaryResponse) Reset ¶
func (m *DeleteGlossaryResponse) Reset()
func (*DeleteGlossaryResponse) String ¶
func (m *DeleteGlossaryResponse) String() string
func (*DeleteGlossaryResponse) XXX_DiscardUnknown ¶
func (m *DeleteGlossaryResponse) XXX_DiscardUnknown()
func (*DeleteGlossaryResponse) XXX_Marshal ¶
func (m *DeleteGlossaryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteGlossaryResponse) XXX_Merge ¶
func (m *DeleteGlossaryResponse) XXX_Merge(src proto.Message)
func (*DeleteGlossaryResponse) XXX_Size ¶
func (m *DeleteGlossaryResponse) XXX_Size() int
func (*DeleteGlossaryResponse) XXX_Unmarshal ¶
func (m *DeleteGlossaryResponse) XXX_Unmarshal(b []byte) error
type DetectLanguageRequest ¶
type DetectLanguageRequest struct { // Required. Project or location to make a call. Must refer to a caller's // project. // // Format: `projects/{project-number-or-id}/locations/{location-id}` or // `projects/{project-number-or-id}`. // // For global calls, use `projects/{project-number-or-id}/locations/global` or // `projects/{project-number-or-id}`. // // Only models within the same region (has same location-id) can be used. // Otherwise an INVALID_ARGUMENT (400) error is returned. Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"` // Optional. The language detection model to be used. // // Format: // `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` // // Only one language detection model is currently supported: // `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. // // If not specified, the default model is used. Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` // Required. The source of the document from which to detect the language. // // Types that are valid to be assigned to Source: // *DetectLanguageRequest_Content Source isDetectLanguageRequest_Source `protobuf_oneof:"source"` // Optional. The format of the source text, for example, "text/html", // "text/plain". If left blank, the MIME type defaults to "text/html". MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` // 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/labels for more information. Labels map[string]string `` /* 153-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message for language detection.
func (*DetectLanguageRequest) Descriptor ¶
func (*DetectLanguageRequest) Descriptor() ([]byte, []int)
func (*DetectLanguageRequest) GetContent ¶
func (m *DetectLanguageRequest) GetContent() string
func (*DetectLanguageRequest) GetLabels ¶
func (m *DetectLanguageRequest) GetLabels() map[string]string
func (*DetectLanguageRequest) GetMimeType ¶
func (m *DetectLanguageRequest) GetMimeType() string
func (*DetectLanguageRequest) GetModel ¶
func (m *DetectLanguageRequest) GetModel() string
func (*DetectLanguageRequest) GetParent ¶
func (m *DetectLanguageRequest) GetParent() string
func (*DetectLanguageRequest) GetSource ¶
func (m *DetectLanguageRequest) GetSource() isDetectLanguageRequest_Source
func (*DetectLanguageRequest) ProtoMessage ¶
func (*DetectLanguageRequest) ProtoMessage()
func (*DetectLanguageRequest) Reset ¶
func (m *DetectLanguageRequest) Reset()
func (*DetectLanguageRequest) String ¶
func (m *DetectLanguageRequest) String() string
func (*DetectLanguageRequest) XXX_DiscardUnknown ¶
func (m *DetectLanguageRequest) XXX_DiscardUnknown()
func (*DetectLanguageRequest) XXX_Marshal ¶
func (m *DetectLanguageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DetectLanguageRequest) XXX_Merge ¶
func (m *DetectLanguageRequest) XXX_Merge(src proto.Message)
func (*DetectLanguageRequest) XXX_OneofWrappers ¶
func (*DetectLanguageRequest) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*DetectLanguageRequest) XXX_Size ¶
func (m *DetectLanguageRequest) XXX_Size() int
func (*DetectLanguageRequest) XXX_Unmarshal ¶
func (m *DetectLanguageRequest) XXX_Unmarshal(b []byte) error
type DetectLanguageRequest_Content ¶
type DetectLanguageRequest_Content struct {
Content string `protobuf:"bytes,1,opt,name=content,proto3,oneof"`
}
type DetectLanguageResponse ¶
type DetectLanguageResponse struct { // A list of detected languages sorted by detection confidence in descending // order. The most probable language first. Languages []*DetectedLanguage `protobuf:"bytes,1,rep,name=languages,proto3" json:"languages,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message for language detection.
func (*DetectLanguageResponse) Descriptor ¶
func (*DetectLanguageResponse) Descriptor() ([]byte, []int)
func (*DetectLanguageResponse) GetLanguages ¶
func (m *DetectLanguageResponse) GetLanguages() []*DetectedLanguage
func (*DetectLanguageResponse) ProtoMessage ¶
func (*DetectLanguageResponse) ProtoMessage()
func (*DetectLanguageResponse) Reset ¶
func (m *DetectLanguageResponse) Reset()
func (*DetectLanguageResponse) String ¶
func (m *DetectLanguageResponse) String() string
func (*DetectLanguageResponse) XXX_DiscardUnknown ¶
func (m *DetectLanguageResponse) XXX_DiscardUnknown()
func (*DetectLanguageResponse) XXX_Marshal ¶
func (m *DetectLanguageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DetectLanguageResponse) XXX_Merge ¶
func (m *DetectLanguageResponse) XXX_Merge(src proto.Message)
func (*DetectLanguageResponse) XXX_Size ¶
func (m *DetectLanguageResponse) XXX_Size() int
func (*DetectLanguageResponse) XXX_Unmarshal ¶
func (m *DetectLanguageResponse) XXX_Unmarshal(b []byte) error
type DetectedLanguage ¶
type DetectedLanguage struct { // The BCP-47 language code of source content in the request, detected // automatically. LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` // The confidence of the detection result for this language. Confidence float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message for language detection.
func (*DetectedLanguage) Descriptor ¶
func (*DetectedLanguage) Descriptor() ([]byte, []int)
func (*DetectedLanguage) GetConfidence ¶
func (m *DetectedLanguage) GetConfidence() float32
func (*DetectedLanguage) GetLanguageCode ¶
func (m *DetectedLanguage) GetLanguageCode() string
func (*DetectedLanguage) ProtoMessage ¶
func (*DetectedLanguage) ProtoMessage()
func (*DetectedLanguage) Reset ¶
func (m *DetectedLanguage) Reset()
func (*DetectedLanguage) String ¶
func (m *DetectedLanguage) String() string
func (*DetectedLanguage) XXX_DiscardUnknown ¶
func (m *DetectedLanguage) XXX_DiscardUnknown()
func (*DetectedLanguage) XXX_Marshal ¶
func (m *DetectedLanguage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DetectedLanguage) XXX_Merge ¶
func (m *DetectedLanguage) XXX_Merge(src proto.Message)
func (*DetectedLanguage) XXX_Size ¶
func (m *DetectedLanguage) XXX_Size() int
func (*DetectedLanguage) XXX_Unmarshal ¶
func (m *DetectedLanguage) XXX_Unmarshal(b []byte) error
type GcsDestination ¶
type GcsDestination struct { // Required. There must be no files under 'output_uri_prefix'. // 'output_uri_prefix' must end with "/" and start with "gs://", otherwise an // INVALID_ARGUMENT (400) error is returned. OutputUriPrefix string `protobuf:"bytes,1,opt,name=output_uri_prefix,json=outputUriPrefix,proto3" json:"output_uri_prefix,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The Google Cloud Storage location for the output content.
func (*GcsDestination) Descriptor ¶
func (*GcsDestination) Descriptor() ([]byte, []int)
func (*GcsDestination) GetOutputUriPrefix ¶
func (m *GcsDestination) GetOutputUriPrefix() string
func (*GcsDestination) ProtoMessage ¶
func (*GcsDestination) ProtoMessage()
func (*GcsDestination) Reset ¶
func (m *GcsDestination) Reset()
func (*GcsDestination) String ¶
func (m *GcsDestination) String() string
func (*GcsDestination) XXX_DiscardUnknown ¶
func (m *GcsDestination) XXX_DiscardUnknown()
func (*GcsDestination) XXX_Marshal ¶
func (m *GcsDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GcsDestination) XXX_Merge ¶
func (m *GcsDestination) XXX_Merge(src proto.Message)
func (*GcsDestination) XXX_Size ¶
func (m *GcsDestination) XXX_Size() int
func (*GcsDestination) XXX_Unmarshal ¶
func (m *GcsDestination) XXX_Unmarshal(b []byte) error
type GcsSource ¶
type GcsSource struct { // Required. Source data URI. For example, `gs://my_bucket/my_object`. InputUri string `protobuf:"bytes,1,opt,name=input_uri,json=inputUri,proto3" json:"input_uri,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The Google Cloud Storage location for the input content.
func (*GcsSource) Descriptor ¶
func (*GcsSource) GetInputUri ¶
func (*GcsSource) ProtoMessage ¶
func (*GcsSource) ProtoMessage()
func (*GcsSource) XXX_DiscardUnknown ¶
func (m *GcsSource) XXX_DiscardUnknown()
func (*GcsSource) XXX_Marshal ¶
func (*GcsSource) XXX_Unmarshal ¶
type GetGlossaryRequest ¶
type GetGlossaryRequest struct { // Required. The name of the glossary to retrieve. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request message for GetGlossary.
func (*GetGlossaryRequest) Descriptor ¶
func (*GetGlossaryRequest) Descriptor() ([]byte, []int)
func (*GetGlossaryRequest) GetName ¶
func (m *GetGlossaryRequest) GetName() string
func (*GetGlossaryRequest) ProtoMessage ¶
func (*GetGlossaryRequest) ProtoMessage()
func (*GetGlossaryRequest) Reset ¶
func (m *GetGlossaryRequest) Reset()
func (*GetGlossaryRequest) String ¶
func (m *GetGlossaryRequest) String() string
func (*GetGlossaryRequest) XXX_DiscardUnknown ¶
func (m *GetGlossaryRequest) XXX_DiscardUnknown()
func (*GetGlossaryRequest) XXX_Marshal ¶
func (m *GetGlossaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetGlossaryRequest) XXX_Merge ¶
func (m *GetGlossaryRequest) XXX_Merge(src proto.Message)
func (*GetGlossaryRequest) XXX_Size ¶
func (m *GetGlossaryRequest) XXX_Size() int
func (*GetGlossaryRequest) XXX_Unmarshal ¶
func (m *GetGlossaryRequest) XXX_Unmarshal(b []byte) error
type GetSupportedLanguagesRequest ¶
type GetSupportedLanguagesRequest struct { // Required. Project or location to make a call. Must refer to a caller's // project. // // Format: `projects/{project-number-or-id}` or // `projects/{project-number-or-id}/locations/{location-id}`. // // For global calls, use `projects/{project-number-or-id}/locations/global` or // `projects/{project-number-or-id}`. // // Non-global location is required for AutoML models. // // Only models within the same region (have same location-id) can be used, // otherwise an INVALID_ARGUMENT (400) error is returned. Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` // Optional. The language to use to return localized, human readable names // of supported languages. If missing, then display names are not returned // in a response. DisplayLanguageCode string `protobuf:"bytes,1,opt,name=display_language_code,json=displayLanguageCode,proto3" json:"display_language_code,omitempty"` // Optional. Get supported languages of this model. // // 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`, // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` // // // Returns languages supported by the specified model. // If missing, we get supported languages of Google general base (PBMT) model. Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message for discovering supported languages.
func (*GetSupportedLanguagesRequest) Descriptor ¶
func (*GetSupportedLanguagesRequest) Descriptor() ([]byte, []int)
func (*GetSupportedLanguagesRequest) GetDisplayLanguageCode ¶
func (m *GetSupportedLanguagesRequest) GetDisplayLanguageCode() string
func (*GetSupportedLanguagesRequest) GetModel ¶
func (m *GetSupportedLanguagesRequest) GetModel() string
func (*GetSupportedLanguagesRequest) GetParent ¶
func (m *GetSupportedLanguagesRequest) GetParent() string
func (*GetSupportedLanguagesRequest) ProtoMessage ¶
func (*GetSupportedLanguagesRequest) ProtoMessage()
func (*GetSupportedLanguagesRequest) Reset ¶
func (m *GetSupportedLanguagesRequest) Reset()
func (*GetSupportedLanguagesRequest) String ¶
func (m *GetSupportedLanguagesRequest) String() string
func (*GetSupportedLanguagesRequest) XXX_DiscardUnknown ¶
func (m *GetSupportedLanguagesRequest) XXX_DiscardUnknown()
func (*GetSupportedLanguagesRequest) XXX_Marshal ¶
func (m *GetSupportedLanguagesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetSupportedLanguagesRequest) XXX_Merge ¶
func (m *GetSupportedLanguagesRequest) XXX_Merge(src proto.Message)
func (*GetSupportedLanguagesRequest) XXX_Size ¶
func (m *GetSupportedLanguagesRequest) XXX_Size() int
func (*GetSupportedLanguagesRequest) XXX_Unmarshal ¶
func (m *GetSupportedLanguagesRequest) XXX_Unmarshal(b []byte) error
type Glossary ¶
type Glossary struct { // Required. The resource name of the glossary. Glossary names have the form // `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Languages supported by the glossary. // // Types that are valid to be assigned to Languages: // *Glossary_LanguagePair // *Glossary_LanguageCodesSet_ Languages isGlossary_Languages `protobuf_oneof:"languages"` // Required. Provides examples to build the glossary from. // Total glossary must not exceed 10M Unicode codepoints. InputConfig *GlossaryInputConfig `protobuf:"bytes,5,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"` // Output only. The number of entries defined in the glossary. EntryCount int32 `protobuf:"varint,6,opt,name=entry_count,json=entryCount,proto3" json:"entry_count,omitempty"` // Output only. When CreateGlossary was called. SubmitTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` // Output only. When the glossary creation was finished. EndTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Represents a glossary built from user provided data.
func (*Glossary) Descriptor ¶
func (*Glossary) GetEndTime ¶
func (*Glossary) GetEntryCount ¶
func (*Glossary) GetInputConfig ¶
func (m *Glossary) GetInputConfig() *GlossaryInputConfig
func (*Glossary) GetLanguageCodesSet ¶
func (m *Glossary) GetLanguageCodesSet() *Glossary_LanguageCodesSet
func (*Glossary) GetLanguagePair ¶
func (m *Glossary) GetLanguagePair() *Glossary_LanguageCodePair
func (*Glossary) GetLanguages ¶
func (m *Glossary) GetLanguages() isGlossary_Languages
func (*Glossary) GetSubmitTime ¶
func (*Glossary) ProtoMessage ¶
func (*Glossary) ProtoMessage()
func (*Glossary) XXX_DiscardUnknown ¶
func (m *Glossary) XXX_DiscardUnknown()
func (*Glossary) XXX_Marshal ¶
func (*Glossary) XXX_OneofWrappers ¶
func (*Glossary) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Glossary) XXX_Unmarshal ¶
type GlossaryInputConfig ¶
type GlossaryInputConfig struct { // Required. Specify the input. // // Types that are valid to be assigned to Source: // *GlossaryInputConfig_GcsSource Source isGlossaryInputConfig_Source `protobuf_oneof:"source"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Input configuration for glossaries.
func (*GlossaryInputConfig) Descriptor ¶
func (*GlossaryInputConfig) Descriptor() ([]byte, []int)
func (*GlossaryInputConfig) GetGcsSource ¶
func (m *GlossaryInputConfig) GetGcsSource() *GcsSource
func (*GlossaryInputConfig) GetSource ¶
func (m *GlossaryInputConfig) GetSource() isGlossaryInputConfig_Source
func (*GlossaryInputConfig) ProtoMessage ¶
func (*GlossaryInputConfig) ProtoMessage()
func (*GlossaryInputConfig) Reset ¶
func (m *GlossaryInputConfig) Reset()
func (*GlossaryInputConfig) String ¶
func (m *GlossaryInputConfig) String() string
func (*GlossaryInputConfig) XXX_DiscardUnknown ¶
func (m *GlossaryInputConfig) XXX_DiscardUnknown()
func (*GlossaryInputConfig) XXX_Marshal ¶
func (m *GlossaryInputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GlossaryInputConfig) XXX_Merge ¶
func (m *GlossaryInputConfig) XXX_Merge(src proto.Message)
func (*GlossaryInputConfig) XXX_OneofWrappers ¶
func (*GlossaryInputConfig) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*GlossaryInputConfig) XXX_Size ¶
func (m *GlossaryInputConfig) XXX_Size() int
func (*GlossaryInputConfig) XXX_Unmarshal ¶
func (m *GlossaryInputConfig) XXX_Unmarshal(b []byte) error
type GlossaryInputConfig_GcsSource ¶
type GlossaryInputConfig_GcsSource struct {
GcsSource *GcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3,oneof"`
}
type Glossary_LanguageCodePair ¶
type Glossary_LanguageCodePair struct { // Required. The BCP-47 language code of the input text, for example, // "en-US". Expected to be an exact match for GlossaryTerm.language_code. SourceLanguageCode string `protobuf:"bytes,1,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"` // Required. The BCP-47 language code for translation output, for example, // "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. TargetLanguageCode string `protobuf:"bytes,2,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Used with unidirectional glossaries.
func (*Glossary_LanguageCodePair) Descriptor ¶
func (*Glossary_LanguageCodePair) Descriptor() ([]byte, []int)
func (*Glossary_LanguageCodePair) GetSourceLanguageCode ¶
func (m *Glossary_LanguageCodePair) GetSourceLanguageCode() string
func (*Glossary_LanguageCodePair) GetTargetLanguageCode ¶
func (m *Glossary_LanguageCodePair) GetTargetLanguageCode() string
func (*Glossary_LanguageCodePair) ProtoMessage ¶
func (*Glossary_LanguageCodePair) ProtoMessage()
func (*Glossary_LanguageCodePair) Reset ¶
func (m *Glossary_LanguageCodePair) Reset()
func (*Glossary_LanguageCodePair) String ¶
func (m *Glossary_LanguageCodePair) String() string
func (*Glossary_LanguageCodePair) XXX_DiscardUnknown ¶
func (m *Glossary_LanguageCodePair) XXX_DiscardUnknown()
func (*Glossary_LanguageCodePair) XXX_Marshal ¶
func (m *Glossary_LanguageCodePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Glossary_LanguageCodePair) XXX_Merge ¶
func (m *Glossary_LanguageCodePair) XXX_Merge(src proto.Message)
func (*Glossary_LanguageCodePair) XXX_Size ¶
func (m *Glossary_LanguageCodePair) XXX_Size() int
func (*Glossary_LanguageCodePair) XXX_Unmarshal ¶
func (m *Glossary_LanguageCodePair) XXX_Unmarshal(b []byte) error
type Glossary_LanguageCodesSet ¶
type Glossary_LanguageCodesSet struct { // The BCP-47 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 `protobuf:"bytes,1,rep,name=language_codes,json=languageCodes,proto3" json:"language_codes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Used with equivalent term set glossaries.
func (*Glossary_LanguageCodesSet) Descriptor ¶
func (*Glossary_LanguageCodesSet) Descriptor() ([]byte, []int)
func (*Glossary_LanguageCodesSet) GetLanguageCodes ¶
func (m *Glossary_LanguageCodesSet) GetLanguageCodes() []string
func (*Glossary_LanguageCodesSet) ProtoMessage ¶
func (*Glossary_LanguageCodesSet) ProtoMessage()
func (*Glossary_LanguageCodesSet) Reset ¶
func (m *Glossary_LanguageCodesSet) Reset()
func (*Glossary_LanguageCodesSet) String ¶
func (m *Glossary_LanguageCodesSet) String() string
func (*Glossary_LanguageCodesSet) XXX_DiscardUnknown ¶
func (m *Glossary_LanguageCodesSet) XXX_DiscardUnknown()
func (*Glossary_LanguageCodesSet) XXX_Marshal ¶
func (m *Glossary_LanguageCodesSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Glossary_LanguageCodesSet) XXX_Merge ¶
func (m *Glossary_LanguageCodesSet) XXX_Merge(src proto.Message)
func (*Glossary_LanguageCodesSet) XXX_Size ¶
func (m *Glossary_LanguageCodesSet) XXX_Size() int
func (*Glossary_LanguageCodesSet) XXX_Unmarshal ¶
func (m *Glossary_LanguageCodesSet) XXX_Unmarshal(b []byte) error
type Glossary_LanguageCodesSet_ ¶
type Glossary_LanguageCodesSet_ struct {
LanguageCodesSet *Glossary_LanguageCodesSet `protobuf:"bytes,4,opt,name=language_codes_set,json=languageCodesSet,proto3,oneof"`
}
type Glossary_LanguagePair ¶
type Glossary_LanguagePair struct {
LanguagePair *Glossary_LanguageCodePair `protobuf:"bytes,3,opt,name=language_pair,json=languagePair,proto3,oneof"`
}
type InputConfig ¶
type InputConfig struct { // 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. MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` // Required. Specify the input. // // Types that are valid to be assigned to Source: // *InputConfig_GcsSource Source isInputConfig_Source `protobuf_oneof:"source"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Input configuration for BatchTranslateText request.
func (*InputConfig) Descriptor ¶
func (*InputConfig) Descriptor() ([]byte, []int)
func (*InputConfig) GetGcsSource ¶
func (m *InputConfig) GetGcsSource() *GcsSource
func (*InputConfig) GetMimeType ¶
func (m *InputConfig) GetMimeType() string
func (*InputConfig) GetSource ¶
func (m *InputConfig) GetSource() isInputConfig_Source
func (*InputConfig) ProtoMessage ¶
func (*InputConfig) ProtoMessage()
func (*InputConfig) Reset ¶
func (m *InputConfig) Reset()
func (*InputConfig) String ¶
func (m *InputConfig) String() string
func (*InputConfig) XXX_DiscardUnknown ¶
func (m *InputConfig) XXX_DiscardUnknown()
func (*InputConfig) XXX_Marshal ¶
func (m *InputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InputConfig) XXX_Merge ¶
func (m *InputConfig) XXX_Merge(src proto.Message)
func (*InputConfig) XXX_OneofWrappers ¶
func (*InputConfig) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*InputConfig) XXX_Size ¶
func (m *InputConfig) XXX_Size() int
func (*InputConfig) XXX_Unmarshal ¶
func (m *InputConfig) XXX_Unmarshal(b []byte) error
type InputConfig_GcsSource ¶
type InputConfig_GcsSource struct {
GcsSource *GcsSource `protobuf:"bytes,2,opt,name=gcs_source,json=gcsSource,proto3,oneof"`
}
type ListGlossariesRequest ¶
type ListGlossariesRequest struct { // Required. The name of the project from which to list all of the glossaries. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Optional. Requested page size. The server may return fewer glossaries than // requested. If unspecified, the server picks an appropriate default. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Optional. A token identifying a page 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 empty or missing. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // Optional. Filter specifying constraints of a list operation. // Filtering is not supported yet, and the parameter currently has no effect. // If missing, no filtering is performed. Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request message for ListGlossaries.
func (*ListGlossariesRequest) Descriptor ¶
func (*ListGlossariesRequest) Descriptor() ([]byte, []int)
func (*ListGlossariesRequest) GetFilter ¶
func (m *ListGlossariesRequest) GetFilter() string
func (*ListGlossariesRequest) GetPageSize ¶
func (m *ListGlossariesRequest) GetPageSize() int32
func (*ListGlossariesRequest) GetPageToken ¶
func (m *ListGlossariesRequest) GetPageToken() string
func (*ListGlossariesRequest) GetParent ¶
func (m *ListGlossariesRequest) GetParent() string
func (*ListGlossariesRequest) ProtoMessage ¶
func (*ListGlossariesRequest) ProtoMessage()
func (*ListGlossariesRequest) Reset ¶
func (m *ListGlossariesRequest) Reset()
func (*ListGlossariesRequest) String ¶
func (m *ListGlossariesRequest) String() string
func (*ListGlossariesRequest) XXX_DiscardUnknown ¶
func (m *ListGlossariesRequest) XXX_DiscardUnknown()
func (*ListGlossariesRequest) XXX_Marshal ¶
func (m *ListGlossariesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListGlossariesRequest) XXX_Merge ¶
func (m *ListGlossariesRequest) XXX_Merge(src proto.Message)
func (*ListGlossariesRequest) XXX_Size ¶
func (m *ListGlossariesRequest) XXX_Size() int
func (*ListGlossariesRequest) XXX_Unmarshal ¶
func (m *ListGlossariesRequest) XXX_Unmarshal(b []byte) error
type ListGlossariesResponse ¶
type ListGlossariesResponse struct { // The list of glossaries for a project. Glossaries []*Glossary `protobuf:"bytes,1,rep,name=glossaries,proto3" json:"glossaries,omitempty"` // 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. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Response message for ListGlossaries.
func (*ListGlossariesResponse) Descriptor ¶
func (*ListGlossariesResponse) Descriptor() ([]byte, []int)
func (*ListGlossariesResponse) GetGlossaries ¶
func (m *ListGlossariesResponse) GetGlossaries() []*Glossary
func (*ListGlossariesResponse) GetNextPageToken ¶
func (m *ListGlossariesResponse) GetNextPageToken() string
func (*ListGlossariesResponse) ProtoMessage ¶
func (*ListGlossariesResponse) ProtoMessage()
func (*ListGlossariesResponse) Reset ¶
func (m *ListGlossariesResponse) Reset()
func (*ListGlossariesResponse) String ¶
func (m *ListGlossariesResponse) String() string
func (*ListGlossariesResponse) XXX_DiscardUnknown ¶
func (m *ListGlossariesResponse) XXX_DiscardUnknown()
func (*ListGlossariesResponse) XXX_Marshal ¶
func (m *ListGlossariesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListGlossariesResponse) XXX_Merge ¶
func (m *ListGlossariesResponse) XXX_Merge(src proto.Message)
func (*ListGlossariesResponse) XXX_Size ¶
func (m *ListGlossariesResponse) XXX_Size() int
func (*ListGlossariesResponse) XXX_Unmarshal ¶
func (m *ListGlossariesResponse) XXX_Unmarshal(b []byte) error
type OutputConfig ¶
type OutputConfig struct { // Required. The destination of output. // // Types that are valid to be assigned to Destination: // *OutputConfig_GcsDestination Destination isOutputConfig_Destination `protobuf_oneof:"destination"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Output configuration for BatchTranslateText request.
func (*OutputConfig) Descriptor ¶
func (*OutputConfig) Descriptor() ([]byte, []int)
func (*OutputConfig) GetDestination ¶
func (m *OutputConfig) GetDestination() isOutputConfig_Destination
func (*OutputConfig) GetGcsDestination ¶
func (m *OutputConfig) GetGcsDestination() *GcsDestination
func (*OutputConfig) ProtoMessage ¶
func (*OutputConfig) ProtoMessage()
func (*OutputConfig) Reset ¶
func (m *OutputConfig) Reset()
func (*OutputConfig) String ¶
func (m *OutputConfig) String() string
func (*OutputConfig) XXX_DiscardUnknown ¶
func (m *OutputConfig) XXX_DiscardUnknown()
func (*OutputConfig) XXX_Marshal ¶
func (m *OutputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OutputConfig) XXX_Merge ¶
func (m *OutputConfig) XXX_Merge(src proto.Message)
func (*OutputConfig) XXX_OneofWrappers ¶
func (*OutputConfig) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*OutputConfig) XXX_Size ¶
func (m *OutputConfig) XXX_Size() int
func (*OutputConfig) XXX_Unmarshal ¶
func (m *OutputConfig) XXX_Unmarshal(b []byte) error
type OutputConfig_GcsDestination ¶
type OutputConfig_GcsDestination struct {
GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"`
}
type SupportedLanguage ¶
type SupportedLanguage struct { // Supported language code, generally consisting of its ISO 639-1 // identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes // including language and region identifiers are returned (for example, // 'zh-TW' and 'zh-CN') LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` // Human readable name of the language localized in the display language // specified in the request. DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // Can be used as source language. SupportSource bool `protobuf:"varint,3,opt,name=support_source,json=supportSource,proto3" json:"support_source,omitempty"` // Can be used as target language. SupportTarget bool `protobuf:"varint,4,opt,name=support_target,json=supportTarget,proto3" json:"support_target,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A single supported language response corresponds to information related to one supported language.
func (*SupportedLanguage) Descriptor ¶
func (*SupportedLanguage) Descriptor() ([]byte, []int)
func (*SupportedLanguage) GetDisplayName ¶
func (m *SupportedLanguage) GetDisplayName() string
func (*SupportedLanguage) GetLanguageCode ¶
func (m *SupportedLanguage) GetLanguageCode() string
func (*SupportedLanguage) GetSupportSource ¶
func (m *SupportedLanguage) GetSupportSource() bool
func (*SupportedLanguage) GetSupportTarget ¶
func (m *SupportedLanguage) GetSupportTarget() bool
func (*SupportedLanguage) ProtoMessage ¶
func (*SupportedLanguage) ProtoMessage()
func (*SupportedLanguage) Reset ¶
func (m *SupportedLanguage) Reset()
func (*SupportedLanguage) String ¶
func (m *SupportedLanguage) String() string
func (*SupportedLanguage) XXX_DiscardUnknown ¶
func (m *SupportedLanguage) XXX_DiscardUnknown()
func (*SupportedLanguage) XXX_Marshal ¶
func (m *SupportedLanguage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SupportedLanguage) XXX_Merge ¶
func (m *SupportedLanguage) XXX_Merge(src proto.Message)
func (*SupportedLanguage) XXX_Size ¶
func (m *SupportedLanguage) XXX_Size() int
func (*SupportedLanguage) XXX_Unmarshal ¶
func (m *SupportedLanguage) XXX_Unmarshal(b []byte) error
type SupportedLanguages ¶
type SupportedLanguages struct { // A list of supported language responses. This list contains an entry // for each language the Translation API supports. Languages []*SupportedLanguage `protobuf:"bytes,1,rep,name=languages,proto3" json:"languages,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message for discovering supported languages.
func (*SupportedLanguages) Descriptor ¶
func (*SupportedLanguages) Descriptor() ([]byte, []int)
func (*SupportedLanguages) GetLanguages ¶
func (m *SupportedLanguages) GetLanguages() []*SupportedLanguage
func (*SupportedLanguages) ProtoMessage ¶
func (*SupportedLanguages) ProtoMessage()
func (*SupportedLanguages) Reset ¶
func (m *SupportedLanguages) Reset()
func (*SupportedLanguages) String ¶
func (m *SupportedLanguages) String() string
func (*SupportedLanguages) XXX_DiscardUnknown ¶
func (m *SupportedLanguages) XXX_DiscardUnknown()
func (*SupportedLanguages) XXX_Marshal ¶
func (m *SupportedLanguages) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SupportedLanguages) XXX_Merge ¶
func (m *SupportedLanguages) XXX_Merge(src proto.Message)
func (*SupportedLanguages) XXX_Size ¶
func (m *SupportedLanguages) XXX_Size() int
func (*SupportedLanguages) XXX_Unmarshal ¶
func (m *SupportedLanguages) XXX_Unmarshal(b []byte) error
type TranslateTextGlossaryConfig ¶
type TranslateTextGlossaryConfig struct { // Required. Specifies the glossary used for this translation. Use // this format: projects/*/locations/*/glossaries/* Glossary string `protobuf:"bytes,1,opt,name=glossary,proto3" json:"glossary,omitempty"` // Optional. Indicates match is case-insensitive. // Default value is false if missing. IgnoreCase bool `protobuf:"varint,2,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Configures which glossary should be used for a specific target language, and defines options for applying that glossary.
func (*TranslateTextGlossaryConfig) Descriptor ¶
func (*TranslateTextGlossaryConfig) Descriptor() ([]byte, []int)
func (*TranslateTextGlossaryConfig) GetGlossary ¶
func (m *TranslateTextGlossaryConfig) GetGlossary() string
func (*TranslateTextGlossaryConfig) GetIgnoreCase ¶
func (m *TranslateTextGlossaryConfig) GetIgnoreCase() bool
func (*TranslateTextGlossaryConfig) ProtoMessage ¶
func (*TranslateTextGlossaryConfig) ProtoMessage()
func (*TranslateTextGlossaryConfig) Reset ¶
func (m *TranslateTextGlossaryConfig) Reset()
func (*TranslateTextGlossaryConfig) String ¶
func (m *TranslateTextGlossaryConfig) String() string
func (*TranslateTextGlossaryConfig) XXX_DiscardUnknown ¶
func (m *TranslateTextGlossaryConfig) XXX_DiscardUnknown()
func (*TranslateTextGlossaryConfig) XXX_Marshal ¶
func (m *TranslateTextGlossaryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TranslateTextGlossaryConfig) XXX_Merge ¶
func (m *TranslateTextGlossaryConfig) XXX_Merge(src proto.Message)
func (*TranslateTextGlossaryConfig) XXX_Size ¶
func (m *TranslateTextGlossaryConfig) XXX_Size() int
func (*TranslateTextGlossaryConfig) XXX_Unmarshal ¶
func (m *TranslateTextGlossaryConfig) XXX_Unmarshal(b []byte) error
type TranslateTextRequest ¶
type TranslateTextRequest struct { // Required. The content of the input in string format. // We recommend the total content be less than 30k codepoints. // Use BatchTranslateText for larger text. Contents []string `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents,omitempty"` // Optional. The format of the source text, for example, "text/html", // "text/plain". If left blank, the MIME type defaults to "text/html". MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` // Optional. The BCP-47 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. SourceLanguageCode string `protobuf:"bytes,4,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"` // Required. The BCP-47 language code to use for translation of the input // text, set to one of the language codes listed in Language Support. TargetLanguageCode string `protobuf:"bytes,5,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"` // Required. Project or location to make a call. Must refer to a caller's // project. // // Format: `projects/{project-number-or-id}` or // `projects/{project-number-or-id}/locations/{location-id}`. // // For global calls, use `projects/{project-number-or-id}/locations/global` or // `projects/{project-number-or-id}`. // // Non-global location is required for requests using AutoML models or // custom glossaries. // // Models and glossaries must be within the same region (have same // location-id), otherwise an INVALID_ARGUMENT (400) error is returned. Parent string `protobuf:"bytes,8,opt,name=parent,proto3" json:"parent,omitempty"` // 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`, // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` // // // For global (non-regionalized) requests, use `location-id` `global`. // For example, // `projects/{project-number-or-id}/locations/global/models/general/nmt`. // // If missing, the system decides which google base model to use. Model string `protobuf:"bytes,6,opt,name=model,proto3" json:"model,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 *TranslateTextGlossaryConfig `protobuf:"bytes,7,opt,name=glossary_config,json=glossaryConfig,proto3" json:"glossary_config,omitempty"` // 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/labels for more information. Labels map[string]string `` /* 154-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message for synchronous translation.
func (*TranslateTextRequest) Descriptor ¶
func (*TranslateTextRequest) Descriptor() ([]byte, []int)
func (*TranslateTextRequest) GetContents ¶
func (m *TranslateTextRequest) GetContents() []string
func (*TranslateTextRequest) GetGlossaryConfig ¶
func (m *TranslateTextRequest) GetGlossaryConfig() *TranslateTextGlossaryConfig
func (*TranslateTextRequest) GetLabels ¶
func (m *TranslateTextRequest) GetLabels() map[string]string
func (*TranslateTextRequest) GetMimeType ¶
func (m *TranslateTextRequest) GetMimeType() string
func (*TranslateTextRequest) GetModel ¶
func (m *TranslateTextRequest) GetModel() string
func (*TranslateTextRequest) GetParent ¶
func (m *TranslateTextRequest) GetParent() string
func (*TranslateTextRequest) GetSourceLanguageCode ¶
func (m *TranslateTextRequest) GetSourceLanguageCode() string
func (*TranslateTextRequest) GetTargetLanguageCode ¶
func (m *TranslateTextRequest) GetTargetLanguageCode() string
func (*TranslateTextRequest) ProtoMessage ¶
func (*TranslateTextRequest) ProtoMessage()
func (*TranslateTextRequest) Reset ¶
func (m *TranslateTextRequest) Reset()
func (*TranslateTextRequest) String ¶
func (m *TranslateTextRequest) String() string
func (*TranslateTextRequest) XXX_DiscardUnknown ¶
func (m *TranslateTextRequest) XXX_DiscardUnknown()
func (*TranslateTextRequest) XXX_Marshal ¶
func (m *TranslateTextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TranslateTextRequest) XXX_Merge ¶
func (m *TranslateTextRequest) XXX_Merge(src proto.Message)
func (*TranslateTextRequest) XXX_Size ¶
func (m *TranslateTextRequest) XXX_Size() int
func (*TranslateTextRequest) XXX_Unmarshal ¶
func (m *TranslateTextRequest) XXX_Unmarshal(b []byte) error
type TranslateTextResponse ¶
type TranslateTextResponse struct { // Text translation responses with no glossary applied. // This field has the same length as // [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. Translations []*Translation `protobuf:"bytes,1,rep,name=translations,proto3" json:"translations,omitempty"` // Text translation responses if a glossary is provided in the request. // This can be the same as // [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] // if no terms apply. This field has the same length as // [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. GlossaryTranslations []*Translation `protobuf:"bytes,3,rep,name=glossary_translations,json=glossaryTranslations,proto3" json:"glossary_translations,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TranslateTextResponse) Descriptor ¶
func (*TranslateTextResponse) Descriptor() ([]byte, []int)
func (*TranslateTextResponse) GetGlossaryTranslations ¶
func (m *TranslateTextResponse) GetGlossaryTranslations() []*Translation
func (*TranslateTextResponse) GetTranslations ¶
func (m *TranslateTextResponse) GetTranslations() []*Translation
func (*TranslateTextResponse) ProtoMessage ¶
func (*TranslateTextResponse) ProtoMessage()
func (*TranslateTextResponse) Reset ¶
func (m *TranslateTextResponse) Reset()
func (*TranslateTextResponse) String ¶
func (m *TranslateTextResponse) String() string
func (*TranslateTextResponse) XXX_DiscardUnknown ¶
func (m *TranslateTextResponse) XXX_DiscardUnknown()
func (*TranslateTextResponse) XXX_Marshal ¶
func (m *TranslateTextResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TranslateTextResponse) XXX_Merge ¶
func (m *TranslateTextResponse) XXX_Merge(src proto.Message)
func (*TranslateTextResponse) XXX_Size ¶
func (m *TranslateTextResponse) XXX_Size() int
func (*TranslateTextResponse) XXX_Unmarshal ¶
func (m *TranslateTextResponse) XXX_Unmarshal(b []byte) error
type Translation ¶
type Translation struct { // Text translated into the target language. TranslatedText string `protobuf:"bytes,1,opt,name=translated_text,json=translatedText,proto3" json:"translated_text,omitempty"` // 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`. Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` // The BCP-47 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. DetectedLanguageCode string `protobuf:"bytes,4,opt,name=detected_language_code,json=detectedLanguageCode,proto3" json:"detected_language_code,omitempty"` // The `glossary_config` used for this translation. GlossaryConfig *TranslateTextGlossaryConfig `protobuf:"bytes,3,opt,name=glossary_config,json=glossaryConfig,proto3" json:"glossary_config,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A single translation response.
func (*Translation) Descriptor ¶
func (*Translation) Descriptor() ([]byte, []int)
func (*Translation) GetDetectedLanguageCode ¶
func (m *Translation) GetDetectedLanguageCode() string
func (*Translation) GetGlossaryConfig ¶
func (m *Translation) GetGlossaryConfig() *TranslateTextGlossaryConfig
func (*Translation) GetModel ¶
func (m *Translation) GetModel() string
func (*Translation) GetTranslatedText ¶
func (m *Translation) GetTranslatedText() string
func (*Translation) ProtoMessage ¶
func (*Translation) ProtoMessage()
func (*Translation) Reset ¶
func (m *Translation) Reset()
func (*Translation) String ¶
func (m *Translation) String() string
func (*Translation) XXX_DiscardUnknown ¶
func (m *Translation) XXX_DiscardUnknown()
func (*Translation) XXX_Marshal ¶
func (m *Translation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Translation) XXX_Merge ¶
func (m *Translation) XXX_Merge(src proto.Message)
func (*Translation) XXX_Size ¶
func (m *Translation) XXX_Size() int
func (*Translation) XXX_Unmarshal ¶
func (m *Translation) XXX_Unmarshal(b []byte) error
type TranslationServiceClient ¶
type TranslationServiceClient interface { // Translates input text and returns translated text. TranslateText(ctx context.Context, in *TranslateTextRequest, opts ...grpc.CallOption) (*TranslateTextResponse, error) // Detects the language of text within a request. DetectLanguage(ctx context.Context, in *DetectLanguageRequest, opts ...grpc.CallOption) (*DetectLanguageResponse, error) // Returns a list of supported languages for translation. GetSupportedLanguages(ctx context.Context, in *GetSupportedLanguagesRequest, opts ...grpc.CallOption) (*SupportedLanguages, error) // Translates a large volume of text in asynchronous batch mode. // This function provides real-time output as the inputs are being processed. // If caller cancels a request, the partial results (for an input file, it's // all or nothing) may still be available on the specified output location. // // This call returns immediately and you can // use google.longrunning.Operation.name to poll the status of the call. BatchTranslateText(ctx context.Context, in *BatchTranslateTextRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) // Creates a glossary and returns the long-running operation. Returns // NOT_FOUND, if the project doesn't exist. CreateGlossary(ctx context.Context, in *CreateGlossaryRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) // Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't // exist. ListGlossaries(ctx context.Context, in *ListGlossariesRequest, opts ...grpc.CallOption) (*ListGlossariesResponse, error) // Gets a glossary. Returns NOT_FOUND, if the glossary doesn't // exist. GetGlossary(ctx context.Context, in *GetGlossaryRequest, opts ...grpc.CallOption) (*Glossary, error) // Deletes a glossary, or cancels glossary construction // if the glossary isn't created yet. // Returns NOT_FOUND, if the glossary doesn't exist. DeleteGlossary(ctx context.Context, in *DeleteGlossaryRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) }
TranslationServiceClient is the client API for TranslationService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTranslationServiceClient ¶
func NewTranslationServiceClient(cc grpc.ClientConnInterface) TranslationServiceClient
type TranslationServiceServer ¶
type TranslationServiceServer interface { // Translates input text and returns translated text. TranslateText(context.Context, *TranslateTextRequest) (*TranslateTextResponse, error) // Detects the language of text within a request. DetectLanguage(context.Context, *DetectLanguageRequest) (*DetectLanguageResponse, error) // Returns a list of supported languages for translation. GetSupportedLanguages(context.Context, *GetSupportedLanguagesRequest) (*SupportedLanguages, error) // Translates a large volume of text in asynchronous batch mode. // This function provides real-time output as the inputs are being processed. // If caller cancels a request, the partial results (for an input file, it's // all or nothing) may still be available on the specified output location. // // This call returns immediately and you can // use google.longrunning.Operation.name to poll the status of the call. BatchTranslateText(context.Context, *BatchTranslateTextRequest) (*longrunning.Operation, error) // Creates a glossary and returns the long-running operation. Returns // NOT_FOUND, if the project doesn't exist. CreateGlossary(context.Context, *CreateGlossaryRequest) (*longrunning.Operation, error) // Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't // exist. ListGlossaries(context.Context, *ListGlossariesRequest) (*ListGlossariesResponse, error) // Gets a glossary. Returns NOT_FOUND, if the glossary doesn't // exist. GetGlossary(context.Context, *GetGlossaryRequest) (*Glossary, error) // Deletes a glossary, or cancels glossary construction // if the glossary isn't created yet. // Returns NOT_FOUND, if the glossary doesn't exist. DeleteGlossary(context.Context, *DeleteGlossaryRequest) (*longrunning.Operation, error) }
TranslationServiceServer is the server API for TranslationService service.
type UnimplementedTranslationServiceServer ¶
type UnimplementedTranslationServiceServer struct { }
UnimplementedTranslationServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedTranslationServiceServer) BatchTranslateText ¶
func (*UnimplementedTranslationServiceServer) BatchTranslateText(ctx context.Context, req *BatchTranslateTextRequest) (*longrunning.Operation, error)
func (*UnimplementedTranslationServiceServer) CreateGlossary ¶
func (*UnimplementedTranslationServiceServer) CreateGlossary(ctx context.Context, req *CreateGlossaryRequest) (*longrunning.Operation, error)
func (*UnimplementedTranslationServiceServer) DeleteGlossary ¶
func (*UnimplementedTranslationServiceServer) DeleteGlossary(ctx context.Context, req *DeleteGlossaryRequest) (*longrunning.Operation, error)
func (*UnimplementedTranslationServiceServer) DetectLanguage ¶
func (*UnimplementedTranslationServiceServer) DetectLanguage(ctx context.Context, req *DetectLanguageRequest) (*DetectLanguageResponse, error)
func (*UnimplementedTranslationServiceServer) GetGlossary ¶
func (*UnimplementedTranslationServiceServer) GetGlossary(ctx context.Context, req *GetGlossaryRequest) (*Glossary, error)
func (*UnimplementedTranslationServiceServer) GetSupportedLanguages ¶
func (*UnimplementedTranslationServiceServer) GetSupportedLanguages(ctx context.Context, req *GetSupportedLanguagesRequest) (*SupportedLanguages, error)
func (*UnimplementedTranslationServiceServer) ListGlossaries ¶
func (*UnimplementedTranslationServiceServer) ListGlossaries(ctx context.Context, req *ListGlossariesRequest) (*ListGlossariesResponse, error)
func (*UnimplementedTranslationServiceServer) TranslateText ¶
func (*UnimplementedTranslationServiceServer) TranslateText(ctx context.Context, req *TranslateTextRequest) (*TranslateTextResponse, error)