Versions in this module Expand all Collapse all v0 v0.196.2 Sep 10, 2024 Changes in this version + const CloudPlatformScope + const CloudTranslationScope + type BatchDocumentInputConfig struct + ForceSendFields []string + GcsSource *GcsSource + NullFields []string + func (s BatchDocumentInputConfig) MarshalJSON() ([]byte, error) + type BatchDocumentOutputConfig struct + ForceSendFields []string + GcsDestination *GcsDestination + NullFields []string + func (s BatchDocumentOutputConfig) MarshalJSON() ([]byte, error) + type BatchTranslateDocumentRequest struct + CustomizedAttribution string + EnableRotationCorrection bool + EnableShadowRemovalNativePdf bool + ForceSendFields []string + FormatConversions map[string]string + Glossaries map[string]TranslateTextGlossaryConfig + InputConfigs []*BatchDocumentInputConfig + Models map[string]string + NullFields []string + OutputConfig *BatchDocumentOutputConfig + SourceLanguageCode string + TargetLanguageCodes []string + func (s BatchTranslateDocumentRequest) MarshalJSON() ([]byte, error) + type BatchTranslateTextRequest struct + ForceSendFields []string + Glossaries map[string]TranslateTextGlossaryConfig + InputConfigs []*InputConfig + Labels map[string]string + Models map[string]string + NullFields []string + OutputConfig *OutputConfig + SourceLanguageCode string + TargetLanguageCodes []string + func (s BatchTranslateTextRequest) MarshalJSON() ([]byte, error) + type CancelOperationRequest struct + type DetectLanguageRequest struct + Content string + ForceSendFields []string + Labels map[string]string + MimeType string + Model string + NullFields []string + func (s DetectLanguageRequest) MarshalJSON() ([]byte, error) + type DetectLanguageResponse struct + ForceSendFields []string + Languages []*DetectedLanguage + NullFields []string + func (s DetectLanguageResponse) MarshalJSON() ([]byte, error) + type DetectedLanguage struct + Confidence float64 + ForceSendFields []string + LanguageCode string + NullFields []string + func (s *DetectedLanguage) UnmarshalJSON(data []byte) error + func (s DetectedLanguage) MarshalJSON() ([]byte, error) + type DocumentInputConfig struct + Content string + ForceSendFields []string + GcsSource *GcsSource + MimeType string + NullFields []string + func (s DocumentInputConfig) MarshalJSON() ([]byte, error) + type DocumentOutputConfig struct + ForceSendFields []string + GcsDestination *GcsDestination + MimeType string + NullFields []string + func (s DocumentOutputConfig) MarshalJSON() ([]byte, error) + type DocumentTranslation struct + ByteStreamOutputs []string + DetectedLanguageCode string + ForceSendFields []string + MimeType string + NullFields []string + func (s DocumentTranslation) MarshalJSON() ([]byte, error) + type Empty struct + type GcsDestination struct + ForceSendFields []string + NullFields []string + OutputUriPrefix string + func (s GcsDestination) MarshalJSON() ([]byte, error) + type GcsSource struct + ForceSendFields []string + InputUri string + NullFields []string + func (s GcsSource) MarshalJSON() ([]byte, error) + type Glossary struct + EndTime string + EntryCount int64 + ForceSendFields []string + InputConfig *GlossaryInputConfig + LanguageCodesSet *LanguageCodesSet + LanguagePair *LanguageCodePair + Name string + NullFields []string + SubmitTime string + func (s Glossary) MarshalJSON() ([]byte, error) + type GlossaryInputConfig struct + ForceSendFields []string + GcsSource *GcsSource + NullFields []string + func (s GlossaryInputConfig) MarshalJSON() ([]byte, error) + type InputConfig struct + ForceSendFields []string + GcsSource *GcsSource + MimeType string + NullFields []string + func (s InputConfig) MarshalJSON() ([]byte, error) + type LanguageCodePair struct + ForceSendFields []string + NullFields []string + SourceLanguageCode string + TargetLanguageCode string + func (s LanguageCodePair) MarshalJSON() ([]byte, error) + type LanguageCodesSet struct + ForceSendFields []string + LanguageCodes []string + NullFields []string + func (s LanguageCodesSet) MarshalJSON() ([]byte, error) + type ListGlossariesResponse struct + ForceSendFields []string + Glossaries []*Glossary + NextPageToken string + NullFields []string + func (s ListGlossariesResponse) MarshalJSON() ([]byte, error) + type ListLocationsResponse struct + ForceSendFields []string + Locations []*Location + NextPageToken string + NullFields []string + func (s ListLocationsResponse) MarshalJSON() ([]byte, error) + type ListOperationsResponse struct + ForceSendFields []string + NextPageToken string + NullFields []string + Operations []*Operation + func (s ListOperationsResponse) MarshalJSON() ([]byte, error) + type Location struct + DisplayName string + ForceSendFields []string + Labels map[string]string + LocationId string + Metadata googleapi.RawMessage + Name string + NullFields []string + func (s Location) MarshalJSON() ([]byte, error) + type Operation struct + Done bool + Error *Status + ForceSendFields []string + Metadata googleapi.RawMessage + Name string + NullFields []string + Response googleapi.RawMessage + func (s Operation) MarshalJSON() ([]byte, error) + type OutputConfig struct + ForceSendFields []string + GcsDestination *GcsDestination + NullFields []string + func (s OutputConfig) MarshalJSON() ([]byte, error) + type ProjectsDetectLanguageCall struct + func (c *ProjectsDetectLanguageCall) Context(ctx context.Context) *ProjectsDetectLanguageCall + func (c *ProjectsDetectLanguageCall) Do(opts ...googleapi.CallOption) (*DetectLanguageResponse, error) + func (c *ProjectsDetectLanguageCall) Fields(s ...googleapi.Field) *ProjectsDetectLanguageCall + func (c *ProjectsDetectLanguageCall) Header() http.Header + type ProjectsGetSupportedLanguagesCall struct + func (c *ProjectsGetSupportedLanguagesCall) Context(ctx context.Context) *ProjectsGetSupportedLanguagesCall + func (c *ProjectsGetSupportedLanguagesCall) DisplayLanguageCode(displayLanguageCode string) *ProjectsGetSupportedLanguagesCall + func (c *ProjectsGetSupportedLanguagesCall) Do(opts ...googleapi.CallOption) (*SupportedLanguages, error) + func (c *ProjectsGetSupportedLanguagesCall) Fields(s ...googleapi.Field) *ProjectsGetSupportedLanguagesCall + func (c *ProjectsGetSupportedLanguagesCall) Header() http.Header + func (c *ProjectsGetSupportedLanguagesCall) IfNoneMatch(entityTag string) *ProjectsGetSupportedLanguagesCall + func (c *ProjectsGetSupportedLanguagesCall) Model(model string) *ProjectsGetSupportedLanguagesCall + type ProjectsLocationsBatchTranslateDocumentCall struct + func (c *ProjectsLocationsBatchTranslateDocumentCall) Context(ctx context.Context) *ProjectsLocationsBatchTranslateDocumentCall + func (c *ProjectsLocationsBatchTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*Operation, error) + func (c *ProjectsLocationsBatchTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateDocumentCall + func (c *ProjectsLocationsBatchTranslateDocumentCall) Header() http.Header + type ProjectsLocationsBatchTranslateTextCall struct + func (c *ProjectsLocationsBatchTranslateTextCall) Context(ctx context.Context) *ProjectsLocationsBatchTranslateTextCall + func (c *ProjectsLocationsBatchTranslateTextCall) Do(opts ...googleapi.CallOption) (*Operation, error) + func (c *ProjectsLocationsBatchTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateTextCall + func (c *ProjectsLocationsBatchTranslateTextCall) Header() http.Header + type ProjectsLocationsDetectLanguageCall struct + func (c *ProjectsLocationsDetectLanguageCall) Context(ctx context.Context) *ProjectsLocationsDetectLanguageCall + func (c *ProjectsLocationsDetectLanguageCall) Do(opts ...googleapi.CallOption) (*DetectLanguageResponse, error) + func (c *ProjectsLocationsDetectLanguageCall) Fields(s ...googleapi.Field) *ProjectsLocationsDetectLanguageCall + func (c *ProjectsLocationsDetectLanguageCall) Header() http.Header + type ProjectsLocationsGetCall struct + func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall + func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) + func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall + func (c *ProjectsLocationsGetCall) Header() http.Header + func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall + type ProjectsLocationsGetSupportedLanguagesCall struct + func (c *ProjectsLocationsGetSupportedLanguagesCall) Context(ctx context.Context) *ProjectsLocationsGetSupportedLanguagesCall + func (c *ProjectsLocationsGetSupportedLanguagesCall) DisplayLanguageCode(displayLanguageCode string) *ProjectsLocationsGetSupportedLanguagesCall + func (c *ProjectsLocationsGetSupportedLanguagesCall) Do(opts ...googleapi.CallOption) (*SupportedLanguages, error) + func (c *ProjectsLocationsGetSupportedLanguagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetSupportedLanguagesCall + func (c *ProjectsLocationsGetSupportedLanguagesCall) Header() http.Header + func (c *ProjectsLocationsGetSupportedLanguagesCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetSupportedLanguagesCall + func (c *ProjectsLocationsGetSupportedLanguagesCall) Model(model string) *ProjectsLocationsGetSupportedLanguagesCall + type ProjectsLocationsGlossariesCreateCall struct + func (c *ProjectsLocationsGlossariesCreateCall) Context(ctx context.Context) *ProjectsLocationsGlossariesCreateCall + func (c *ProjectsLocationsGlossariesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) + func (c *ProjectsLocationsGlossariesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesCreateCall + func (c *ProjectsLocationsGlossariesCreateCall) Header() http.Header + type ProjectsLocationsGlossariesDeleteCall struct + func (c *ProjectsLocationsGlossariesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlossariesDeleteCall + func (c *ProjectsLocationsGlossariesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) + func (c *ProjectsLocationsGlossariesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesDeleteCall + func (c *ProjectsLocationsGlossariesDeleteCall) Header() http.Header + type ProjectsLocationsGlossariesGetCall struct + func (c *ProjectsLocationsGlossariesGetCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGetCall + func (c *ProjectsLocationsGlossariesGetCall) Do(opts ...googleapi.CallOption) (*Glossary, error) + func (c *ProjectsLocationsGlossariesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGetCall + func (c *ProjectsLocationsGlossariesGetCall) Header() http.Header + func (c *ProjectsLocationsGlossariesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesGetCall + type ProjectsLocationsGlossariesListCall struct + func (c *ProjectsLocationsGlossariesListCall) Context(ctx context.Context) *ProjectsLocationsGlossariesListCall + func (c *ProjectsLocationsGlossariesListCall) Do(opts ...googleapi.CallOption) (*ListGlossariesResponse, error) + func (c *ProjectsLocationsGlossariesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesListCall + func (c *ProjectsLocationsGlossariesListCall) Filter(filter string) *ProjectsLocationsGlossariesListCall + func (c *ProjectsLocationsGlossariesListCall) Header() http.Header + func (c *ProjectsLocationsGlossariesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesListCall + func (c *ProjectsLocationsGlossariesListCall) PageSize(pageSize int64) *ProjectsLocationsGlossariesListCall + func (c *ProjectsLocationsGlossariesListCall) PageToken(pageToken string) *ProjectsLocationsGlossariesListCall + func (c *ProjectsLocationsGlossariesListCall) Pages(ctx context.Context, f func(*ListGlossariesResponse) error) error + type ProjectsLocationsGlossariesService struct + func NewProjectsLocationsGlossariesService(s *Service) *ProjectsLocationsGlossariesService + func (r *ProjectsLocationsGlossariesService) Create(parent string, glossary *Glossary) *ProjectsLocationsGlossariesCreateCall + func (r *ProjectsLocationsGlossariesService) Delete(name string) *ProjectsLocationsGlossariesDeleteCall + func (r *ProjectsLocationsGlossariesService) Get(name string) *ProjectsLocationsGlossariesGetCall + func (r *ProjectsLocationsGlossariesService) List(parent string) *ProjectsLocationsGlossariesListCall + type ProjectsLocationsListCall struct + func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall + func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) + func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall + func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall + func (c *ProjectsLocationsListCall) Header() http.Header + func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall + func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall + func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall + func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error + type ProjectsLocationsOperationsCancelCall struct + func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall + func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) + func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall + func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header + type ProjectsLocationsOperationsDeleteCall struct + func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall + func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) + func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall + func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header + type ProjectsLocationsOperationsGetCall struct + func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall + func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) + func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall + func (c *ProjectsLocationsOperationsGetCall) Header() http.Header + func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall + type ProjectsLocationsOperationsListCall struct + func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall + func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) + func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall + func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall + func (c *ProjectsLocationsOperationsListCall) Header() http.Header + func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall + func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall + func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall + func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error + type ProjectsLocationsOperationsService struct + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService + func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall + func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall + func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall + func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall + func (r *ProjectsLocationsOperationsService) Wait(name string, waitoperationrequest *WaitOperationRequest) *ProjectsLocationsOperationsWaitCall + type ProjectsLocationsOperationsWaitCall struct + func (c *ProjectsLocationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsOperationsWaitCall + func (c *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, error) + func (c *ProjectsLocationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsWaitCall + func (c *ProjectsLocationsOperationsWaitCall) Header() http.Header + type ProjectsLocationsService struct + Glossaries *ProjectsLocationsGlossariesService + Operations *ProjectsLocationsOperationsService + func NewProjectsLocationsService(s *Service) *ProjectsLocationsService + func (r *ProjectsLocationsService) BatchTranslateDocument(parent string, batchtranslatedocumentrequest *BatchTranslateDocumentRequest) *ProjectsLocationsBatchTranslateDocumentCall + func (r *ProjectsLocationsService) BatchTranslateText(parent string, batchtranslatetextrequest *BatchTranslateTextRequest) *ProjectsLocationsBatchTranslateTextCall + func (r *ProjectsLocationsService) DetectLanguage(parent string, detectlanguagerequest *DetectLanguageRequest) *ProjectsLocationsDetectLanguageCall + func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall + func (r *ProjectsLocationsService) GetSupportedLanguages(parent string) *ProjectsLocationsGetSupportedLanguagesCall + func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall + func (r *ProjectsLocationsService) TranslateDocument(parent string, translatedocumentrequest *TranslateDocumentRequest) *ProjectsLocationsTranslateDocumentCall + func (r *ProjectsLocationsService) TranslateText(parent string, translatetextrequest *TranslateTextRequest) *ProjectsLocationsTranslateTextCall + type ProjectsLocationsTranslateDocumentCall struct + func (c *ProjectsLocationsTranslateDocumentCall) Context(ctx context.Context) *ProjectsLocationsTranslateDocumentCall + func (c *ProjectsLocationsTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*TranslateDocumentResponse, error) + func (c *ProjectsLocationsTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateDocumentCall + func (c *ProjectsLocationsTranslateDocumentCall) Header() http.Header + type ProjectsLocationsTranslateTextCall struct + func (c *ProjectsLocationsTranslateTextCall) Context(ctx context.Context) *ProjectsLocationsTranslateTextCall + func (c *ProjectsLocationsTranslateTextCall) Do(opts ...googleapi.CallOption) (*TranslateTextResponse, error) + func (c *ProjectsLocationsTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateTextCall + func (c *ProjectsLocationsTranslateTextCall) Header() http.Header + type ProjectsService struct + Locations *ProjectsLocationsService + func NewProjectsService(s *Service) *ProjectsService + func (r *ProjectsService) DetectLanguage(parent string, detectlanguagerequest *DetectLanguageRequest) *ProjectsDetectLanguageCall + func (r *ProjectsService) GetSupportedLanguages(parent string) *ProjectsGetSupportedLanguagesCall + func (r *ProjectsService) TranslateText(parent string, translatetextrequest *TranslateTextRequest) *ProjectsTranslateTextCall + type ProjectsTranslateTextCall struct + func (c *ProjectsTranslateTextCall) Context(ctx context.Context) *ProjectsTranslateTextCall + func (c *ProjectsTranslateTextCall) Do(opts ...googleapi.CallOption) (*TranslateTextResponse, error) + func (c *ProjectsTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsTranslateTextCall + func (c *ProjectsTranslateTextCall) Header() http.Header + type Service struct + BasePath string + Projects *ProjectsService + UserAgent string + func New(client *http.Client) (*Service, error) + func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) + type Status struct + Code int64 + Details []googleapi.RawMessage + ForceSendFields []string + Message string + NullFields []string + func (s Status) MarshalJSON() ([]byte, error) + type SupportedLanguage struct + DisplayName string + ForceSendFields []string + LanguageCode string + NullFields []string + SupportSource bool + SupportTarget bool + func (s SupportedLanguage) MarshalJSON() ([]byte, error) + type SupportedLanguages struct + ForceSendFields []string + Languages []*SupportedLanguage + NullFields []string + func (s SupportedLanguages) MarshalJSON() ([]byte, error) + type TranslateDocumentRequest struct + CustomizedAttribution string + DocumentInputConfig *DocumentInputConfig + DocumentOutputConfig *DocumentOutputConfig + EnableRotationCorrection bool + EnableShadowRemovalNativePdf bool + ForceSendFields []string + GlossaryConfig *TranslateTextGlossaryConfig + IsTranslateNativePdfOnly bool + Labels map[string]string + Model string + NullFields []string + SourceLanguageCode string + TargetLanguageCode string + func (s TranslateDocumentRequest) MarshalJSON() ([]byte, error) + type TranslateDocumentResponse struct + DocumentTranslation *DocumentTranslation + ForceSendFields []string + GlossaryConfig *TranslateTextGlossaryConfig + GlossaryDocumentTranslation *DocumentTranslation + Model string + NullFields []string + func (s TranslateDocumentResponse) MarshalJSON() ([]byte, error) + type TranslateTextGlossaryConfig struct + ForceSendFields []string + Glossary string + IgnoreCase bool + NullFields []string + func (s TranslateTextGlossaryConfig) MarshalJSON() ([]byte, error) + type TranslateTextRequest struct + Contents []string + ForceSendFields []string + GlossaryConfig *TranslateTextGlossaryConfig + Labels map[string]string + MimeType string + Model string + NullFields []string + SourceLanguageCode string + TargetLanguageCode string + func (s TranslateTextRequest) MarshalJSON() ([]byte, error) + type TranslateTextResponse struct + ForceSendFields []string + GlossaryTranslations []*Translation + NullFields []string + Translations []*Translation + func (s TranslateTextResponse) MarshalJSON() ([]byte, error) + type Translation struct + DetectedLanguageCode string + ForceSendFields []string + GlossaryConfig *TranslateTextGlossaryConfig + Model string + NullFields []string + TranslatedText string + func (s Translation) MarshalJSON() ([]byte, error) + type WaitOperationRequest struct + ForceSendFields []string + NullFields []string + Timeout string + func (s WaitOperationRequest) MarshalJSON() ([]byte, error)