translate20250301

package
v1.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package translate20250301iface provides an interface to enable mocking the TRANSLATE20250301 service client for testing your code.

It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters.

Index

Constants

View Source
const (
	ServiceName = "translate" // Name of service.
	EndpointsID = ServiceName // ID to lookup a service endpoint with.
	ServiceID   = "translate" // ServiceID is a unique identifer of a specific service.
)

Service information constants

Variables

This section is empty.

Functions

This section is empty.

Types

type DetectedLanguageListForLangDetectOutput

type DetectedLanguageListForLangDetectOutput struct {
	Confidence *float64 `type:"float" json:",omitempty"`

	Language *string `type:"string" json:",omitempty"`
	// contains filtered or unexported fields
}

func (DetectedLanguageListForLangDetectOutput) GoString

GoString returns the string representation

func (*DetectedLanguageListForLangDetectOutput) SetConfidence

SetConfidence sets the Confidence field's value.

func (*DetectedLanguageListForLangDetectOutput) SetLanguage

SetLanguage sets the Language field's value.

func (DetectedLanguageListForLangDetectOutput) String

String returns the string representation

type GetUsageInput added in v1.1.9

type GetUsageInput struct {

	// From is a required field
	From *int32 `type:"int32" json:",omitempty" required:"true"`

	// Service is a required field
	Service *string `type:"string" json:",omitempty" required:"true"`

	// To is a required field
	To *int32 `type:"int32" json:",omitempty" required:"true"`
	// contains filtered or unexported fields
}

func (GetUsageInput) GoString added in v1.1.9

func (s GetUsageInput) GoString() string

GoString returns the string representation

func (*GetUsageInput) SetFrom added in v1.1.9

func (s *GetUsageInput) SetFrom(v int32) *GetUsageInput

SetFrom sets the From field's value.

func (*GetUsageInput) SetService added in v1.1.9

func (s *GetUsageInput) SetService(v string) *GetUsageInput

SetService sets the Service field's value.

func (*GetUsageInput) SetTo added in v1.1.9

func (s *GetUsageInput) SetTo(v int32) *GetUsageInput

SetTo sets the To field's value.

func (GetUsageInput) String added in v1.1.9

func (s GetUsageInput) String() string

String returns the string representation

func (*GetUsageInput) Validate added in v1.1.9

func (s *GetUsageInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetUsageOutput added in v1.1.9

type GetUsageOutput struct {
	Metadata *response.ResponseMetadata

	Points []*PointForGetUsageOutput `type:"list" json:",omitempty"`
	// contains filtered or unexported fields
}

func (GetUsageOutput) GoString added in v1.1.9

func (s GetUsageOutput) GoString() string

GoString returns the string representation

func (*GetUsageOutput) SetPoints added in v1.1.9

SetPoints sets the Points field's value.

func (GetUsageOutput) String added in v1.1.9

func (s GetUsageOutput) String() string

String returns the string representation

type LangDetectInput

type LangDetectInput struct {
	TextList []*string `type:"list" json:",omitempty"`
	// contains filtered or unexported fields
}

func (LangDetectInput) GoString

func (s LangDetectInput) GoString() string

GoString returns the string representation

func (*LangDetectInput) SetTextList

func (s *LangDetectInput) SetTextList(v []*string) *LangDetectInput

SetTextList sets the TextList field's value.

func (LangDetectInput) String

func (s LangDetectInput) String() string

String returns the string representation

type LangDetectOutput

type LangDetectOutput struct {
	Metadata *response.ResponseMetadata

	DetectedLanguageList []*DetectedLanguageListForLangDetectOutput `type:"list" json:",omitempty"`
	// contains filtered or unexported fields
}

func (LangDetectOutput) GoString

func (s LangDetectOutput) GoString() string

GoString returns the string representation

func (*LangDetectOutput) SetDetectedLanguageList

SetDetectedLanguageList sets the DetectedLanguageList field's value.

func (LangDetectOutput) String

func (s LangDetectOutput) String() string

String returns the string representation

type PointForGetUsageOutput added in v1.1.9

type PointForGetUsageOutput struct {
	Timestamp *int32 `type:"int32" json:",omitempty"`

	Value *int32 `type:"int32" json:",omitempty"`
	// contains filtered or unexported fields
}

func (PointForGetUsageOutput) GoString added in v1.1.9

func (s PointForGetUsageOutput) GoString() string

GoString returns the string representation

func (*PointForGetUsageOutput) SetTimestamp added in v1.1.9

SetTimestamp sets the Timestamp field's value.

func (*PointForGetUsageOutput) SetValue added in v1.1.9

SetValue sets the Value field's value.

func (PointForGetUsageOutput) String added in v1.1.9

func (s PointForGetUsageOutput) String() string

String returns the string representation

type PointForTranslateImageOutput

type PointForTranslateImageOutput struct {
	X *int32 `type:"int32" json:",omitempty"`

	Y *int32 `type:"int32" json:",omitempty"`
	// contains filtered or unexported fields
}

func (PointForTranslateImageOutput) GoString

func (s PointForTranslateImageOutput) GoString() string

GoString returns the string representation

func (*PointForTranslateImageOutput) SetX

SetX sets the X field's value.

func (*PointForTranslateImageOutput) SetY

SetY sets the Y field's value.

func (PointForTranslateImageOutput) String

String returns the string representation

type QueryAudioInput

type QueryAudioInput struct {

	// TaskId is a required field
	TaskId *string `type:"string" json:",omitempty" required:"true"`
	// contains filtered or unexported fields
}

func (QueryAudioInput) GoString

func (s QueryAudioInput) GoString() string

GoString returns the string representation

func (*QueryAudioInput) SetTaskId

func (s *QueryAudioInput) SetTaskId(v string) *QueryAudioInput

SetTaskId sets the TaskId field's value.

func (QueryAudioInput) String

func (s QueryAudioInput) String() string

String returns the string representation

func (*QueryAudioInput) Validate

func (s *QueryAudioInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type QueryAudioOutput

type QueryAudioOutput struct {
	Metadata *response.ResponseMetadata

	Confidence *float64 `type:"float" json:",omitempty"`

	Status *string `type:"string" json:",omitempty"`

	Subtitles []*SubtitleForQueryAudioOutput `type:"list" json:",omitempty"`
	// contains filtered or unexported fields
}

func (QueryAudioOutput) GoString

func (s QueryAudioOutput) GoString() string

GoString returns the string representation

func (*QueryAudioOutput) SetConfidence

func (s *QueryAudioOutput) SetConfidence(v float64) *QueryAudioOutput

SetConfidence sets the Confidence field's value.

func (*QueryAudioOutput) SetStatus

func (s *QueryAudioOutput) SetStatus(v string) *QueryAudioOutput

SetStatus sets the Status field's value.

func (*QueryAudioOutput) SetSubtitles

SetSubtitles sets the Subtitles field's value.

func (QueryAudioOutput) String

func (s QueryAudioOutput) String() string

String returns the string representation

type SubmitAudioInput

type SubmitAudioInput struct {

	// SourceLanguage is a required field
	SourceLanguage *string `type:"string" json:",omitempty" required:"true"`

	// TargetLanguage is a required field
	TargetLanguage *string `type:"string" json:",omitempty" required:"true"`

	// Uri is a required field
	Uri *string `type:"string" json:",omitempty" required:"true"`
	// contains filtered or unexported fields
}

func (SubmitAudioInput) GoString

func (s SubmitAudioInput) GoString() string

GoString returns the string representation

func (*SubmitAudioInput) SetSourceLanguage

func (s *SubmitAudioInput) SetSourceLanguage(v string) *SubmitAudioInput

SetSourceLanguage sets the SourceLanguage field's value.

func (*SubmitAudioInput) SetTargetLanguage

func (s *SubmitAudioInput) SetTargetLanguage(v string) *SubmitAudioInput

SetTargetLanguage sets the TargetLanguage field's value.

func (*SubmitAudioInput) SetUri

SetUri sets the Uri field's value.

func (SubmitAudioInput) String

func (s SubmitAudioInput) String() string

String returns the string representation

func (*SubmitAudioInput) Validate

func (s *SubmitAudioInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type SubmitAudioOutput

type SubmitAudioOutput struct {
	Metadata *response.ResponseMetadata

	TaskId *string `type:"string" json:",omitempty"`
	// contains filtered or unexported fields
}

func (SubmitAudioOutput) GoString

func (s SubmitAudioOutput) GoString() string

GoString returns the string representation

func (*SubmitAudioOutput) SetTaskId

func (s *SubmitAudioOutput) SetTaskId(v string) *SubmitAudioOutput

SetTaskId sets the TaskId field's value.

func (SubmitAudioOutput) String

func (s SubmitAudioOutput) String() string

String returns the string representation

type SubtitleForQueryAudioOutput

type SubtitleForQueryAudioOutput struct {
	EndTime *int32 `type:"int32" json:",omitempty"`

	StartTime *int32 `type:"int32" json:",omitempty"`

	Text *string `type:"string" json:",omitempty"`

	Translation *string `type:"string" json:",omitempty"`
	// contains filtered or unexported fields
}

func (SubtitleForQueryAudioOutput) GoString

func (s SubtitleForQueryAudioOutput) GoString() string

GoString returns the string representation

func (*SubtitleForQueryAudioOutput) SetEndTime

SetEndTime sets the EndTime field's value.

func (*SubtitleForQueryAudioOutput) SetStartTime

SetStartTime sets the StartTime field's value.

func (*SubtitleForQueryAudioOutput) SetText

SetText sets the Text field's value.

func (*SubtitleForQueryAudioOutput) SetTranslation

SetTranslation sets the Translation field's value.

func (SubtitleForQueryAudioOutput) String

String returns the string representation

type TRANSLATE20250301

type TRANSLATE20250301 struct {
	*client.Client
}

TRANSLATE20250301 provides the API operation methods for making requests to TRANSLATE20250301. See this package's package overview docs for details on the service.

TRANSLATE20250301 methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

New create int can support ssl or region locate set

func (*TRANSLATE20250301) GetUsage added in v1.1.9

func (c *TRANSLATE20250301) GetUsage(input *GetUsageInput) (*GetUsageOutput, error)

GetUsage API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation GetUsage for usage and error information.

func (*TRANSLATE20250301) GetUsageCommon added in v1.1.9

func (c *TRANSLATE20250301) GetUsageCommon(input *map[string]interface{}) (*map[string]interface{}, error)

GetUsageCommon API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation GetUsageCommon for usage and error information.

func (*TRANSLATE20250301) GetUsageCommonRequest added in v1.1.9

func (c *TRANSLATE20250301) GetUsageCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

GetUsageCommonRequest generates a "volcengine/request.Request" representing the client's request for the GetUsageCommon operation. The "output" return value will be populated with the GetUsageCommon request's response once the request completes successfully.

Use "Send" method on the returned GetUsageCommon Request to send the API call to the service. the "output" return value is not valid until after GetUsageCommon Send returns without error.

See GetUsageCommon for more information on using the GetUsageCommon API call, and error handling.

// Example sending a request using the GetUsageCommonRequest method.
req, resp := client.GetUsageCommonRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) GetUsageCommonWithContext added in v1.1.9

func (c *TRANSLATE20250301) GetUsageCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

GetUsageCommonWithContext is the same as GetUsageCommon with the addition of the ability to pass a context and additional request options.

See GetUsageCommon for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) GetUsageRequest added in v1.1.9

func (c *TRANSLATE20250301) GetUsageRequest(input *GetUsageInput) (req *request.Request, output *GetUsageOutput)

GetUsageRequest generates a "volcengine/request.Request" representing the client's request for the GetUsage operation. The "output" return value will be populated with the GetUsageCommon request's response once the request completes successfully.

Use "Send" method on the returned GetUsageCommon Request to send the API call to the service. the "output" return value is not valid until after GetUsageCommon Send returns without error.

See GetUsage for more information on using the GetUsage API call, and error handling.

// Example sending a request using the GetUsageRequest method.
req, resp := client.GetUsageRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) GetUsageWithContext added in v1.1.9

func (c *TRANSLATE20250301) GetUsageWithContext(ctx volcengine.Context, input *GetUsageInput, opts ...request.Option) (*GetUsageOutput, error)

GetUsageWithContext is the same as GetUsage with the addition of the ability to pass a context and additional request options.

See GetUsage for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) LangDetect

func (c *TRANSLATE20250301) LangDetect(input *LangDetectInput) (*LangDetectOutput, error)

LangDetect API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation LangDetect for usage and error information.

func (*TRANSLATE20250301) LangDetectCommon

func (c *TRANSLATE20250301) LangDetectCommon(input *map[string]interface{}) (*map[string]interface{}, error)

LangDetectCommon API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation LangDetectCommon for usage and error information.

func (*TRANSLATE20250301) LangDetectCommonRequest

func (c *TRANSLATE20250301) LangDetectCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

LangDetectCommonRequest generates a "volcengine/request.Request" representing the client's request for the LangDetectCommon operation. The "output" return value will be populated with the LangDetectCommon request's response once the request completes successfully.

Use "Send" method on the returned LangDetectCommon Request to send the API call to the service. the "output" return value is not valid until after LangDetectCommon Send returns without error.

See LangDetectCommon for more information on using the LangDetectCommon API call, and error handling.

// Example sending a request using the LangDetectCommonRequest method.
req, resp := client.LangDetectCommonRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) LangDetectCommonWithContext

func (c *TRANSLATE20250301) LangDetectCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

LangDetectCommonWithContext is the same as LangDetectCommon with the addition of the ability to pass a context and additional request options.

See LangDetectCommon for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) LangDetectRequest

func (c *TRANSLATE20250301) LangDetectRequest(input *LangDetectInput) (req *request.Request, output *LangDetectOutput)

LangDetectRequest generates a "volcengine/request.Request" representing the client's request for the LangDetect operation. The "output" return value will be populated with the LangDetectCommon request's response once the request completes successfully.

Use "Send" method on the returned LangDetectCommon Request to send the API call to the service. the "output" return value is not valid until after LangDetectCommon Send returns without error.

See LangDetect for more information on using the LangDetect API call, and error handling.

// Example sending a request using the LangDetectRequest method.
req, resp := client.LangDetectRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) LangDetectWithContext

func (c *TRANSLATE20250301) LangDetectWithContext(ctx volcengine.Context, input *LangDetectInput, opts ...request.Option) (*LangDetectOutput, error)

LangDetectWithContext is the same as LangDetect with the addition of the ability to pass a context and additional request options.

See LangDetect for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) QueryAudio

func (c *TRANSLATE20250301) QueryAudio(input *QueryAudioInput) (*QueryAudioOutput, error)

QueryAudio API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation QueryAudio for usage and error information.

func (*TRANSLATE20250301) QueryAudioCommon

func (c *TRANSLATE20250301) QueryAudioCommon(input *map[string]interface{}) (*map[string]interface{}, error)

QueryAudioCommon API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation QueryAudioCommon for usage and error information.

func (*TRANSLATE20250301) QueryAudioCommonRequest

func (c *TRANSLATE20250301) QueryAudioCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

QueryAudioCommonRequest generates a "volcengine/request.Request" representing the client's request for the QueryAudioCommon operation. The "output" return value will be populated with the QueryAudioCommon request's response once the request completes successfully.

Use "Send" method on the returned QueryAudioCommon Request to send the API call to the service. the "output" return value is not valid until after QueryAudioCommon Send returns without error.

See QueryAudioCommon for more information on using the QueryAudioCommon API call, and error handling.

// Example sending a request using the QueryAudioCommonRequest method.
req, resp := client.QueryAudioCommonRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) QueryAudioCommonWithContext

func (c *TRANSLATE20250301) QueryAudioCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

QueryAudioCommonWithContext is the same as QueryAudioCommon with the addition of the ability to pass a context and additional request options.

See QueryAudioCommon for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) QueryAudioRequest

func (c *TRANSLATE20250301) QueryAudioRequest(input *QueryAudioInput) (req *request.Request, output *QueryAudioOutput)

QueryAudioRequest generates a "volcengine/request.Request" representing the client's request for the QueryAudio operation. The "output" return value will be populated with the QueryAudioCommon request's response once the request completes successfully.

Use "Send" method on the returned QueryAudioCommon Request to send the API call to the service. the "output" return value is not valid until after QueryAudioCommon Send returns without error.

See QueryAudio for more information on using the QueryAudio API call, and error handling.

// Example sending a request using the QueryAudioRequest method.
req, resp := client.QueryAudioRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) QueryAudioWithContext

func (c *TRANSLATE20250301) QueryAudioWithContext(ctx volcengine.Context, input *QueryAudioInput, opts ...request.Option) (*QueryAudioOutput, error)

QueryAudioWithContext is the same as QueryAudio with the addition of the ability to pass a context and additional request options.

See QueryAudio for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) SubmitAudio

func (c *TRANSLATE20250301) SubmitAudio(input *SubmitAudioInput) (*SubmitAudioOutput, error)

SubmitAudio API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation SubmitAudio for usage and error information.

func (*TRANSLATE20250301) SubmitAudioCommon

func (c *TRANSLATE20250301) SubmitAudioCommon(input *map[string]interface{}) (*map[string]interface{}, error)

SubmitAudioCommon API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation SubmitAudioCommon for usage and error information.

func (*TRANSLATE20250301) SubmitAudioCommonRequest

func (c *TRANSLATE20250301) SubmitAudioCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

SubmitAudioCommonRequest generates a "volcengine/request.Request" representing the client's request for the SubmitAudioCommon operation. The "output" return value will be populated with the SubmitAudioCommon request's response once the request completes successfully.

Use "Send" method on the returned SubmitAudioCommon Request to send the API call to the service. the "output" return value is not valid until after SubmitAudioCommon Send returns without error.

See SubmitAudioCommon for more information on using the SubmitAudioCommon API call, and error handling.

// Example sending a request using the SubmitAudioCommonRequest method.
req, resp := client.SubmitAudioCommonRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) SubmitAudioCommonWithContext

func (c *TRANSLATE20250301) SubmitAudioCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

SubmitAudioCommonWithContext is the same as SubmitAudioCommon with the addition of the ability to pass a context and additional request options.

See SubmitAudioCommon for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) SubmitAudioRequest

func (c *TRANSLATE20250301) SubmitAudioRequest(input *SubmitAudioInput) (req *request.Request, output *SubmitAudioOutput)

SubmitAudioRequest generates a "volcengine/request.Request" representing the client's request for the SubmitAudio operation. The "output" return value will be populated with the SubmitAudioCommon request's response once the request completes successfully.

Use "Send" method on the returned SubmitAudioCommon Request to send the API call to the service. the "output" return value is not valid until after SubmitAudioCommon Send returns without error.

See SubmitAudio for more information on using the SubmitAudio API call, and error handling.

// Example sending a request using the SubmitAudioRequest method.
req, resp := client.SubmitAudioRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) SubmitAudioWithContext

func (c *TRANSLATE20250301) SubmitAudioWithContext(ctx volcengine.Context, input *SubmitAudioInput, opts ...request.Option) (*SubmitAudioOutput, error)

SubmitAudioWithContext is the same as SubmitAudio with the addition of the ability to pass a context and additional request options.

See SubmitAudio for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) TranslateImage

func (c *TRANSLATE20250301) TranslateImage(input *TranslateImageInput) (*TranslateImageOutput, error)

TranslateImage API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation TranslateImage for usage and error information.

func (*TRANSLATE20250301) TranslateImageCommon

func (c *TRANSLATE20250301) TranslateImageCommon(input *map[string]interface{}) (*map[string]interface{}, error)

TranslateImageCommon API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation TranslateImageCommon for usage and error information.

func (*TRANSLATE20250301) TranslateImageCommonRequest

func (c *TRANSLATE20250301) TranslateImageCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

TranslateImageCommonRequest generates a "volcengine/request.Request" representing the client's request for the TranslateImageCommon operation. The "output" return value will be populated with the TranslateImageCommon request's response once the request completes successfully.

Use "Send" method on the returned TranslateImageCommon Request to send the API call to the service. the "output" return value is not valid until after TranslateImageCommon Send returns without error.

See TranslateImageCommon for more information on using the TranslateImageCommon API call, and error handling.

// Example sending a request using the TranslateImageCommonRequest method.
req, resp := client.TranslateImageCommonRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) TranslateImageCommonWithContext

func (c *TRANSLATE20250301) TranslateImageCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

TranslateImageCommonWithContext is the same as TranslateImageCommon with the addition of the ability to pass a context and additional request options.

See TranslateImageCommon for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) TranslateImageRequest

func (c *TRANSLATE20250301) TranslateImageRequest(input *TranslateImageInput) (req *request.Request, output *TranslateImageOutput)

TranslateImageRequest generates a "volcengine/request.Request" representing the client's request for the TranslateImage operation. The "output" return value will be populated with the TranslateImageCommon request's response once the request completes successfully.

Use "Send" method on the returned TranslateImageCommon Request to send the API call to the service. the "output" return value is not valid until after TranslateImageCommon Send returns without error.

See TranslateImage for more information on using the TranslateImage API call, and error handling.

// Example sending a request using the TranslateImageRequest method.
req, resp := client.TranslateImageRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) TranslateImageWithContext

func (c *TRANSLATE20250301) TranslateImageWithContext(ctx volcengine.Context, input *TranslateImageInput, opts ...request.Option) (*TranslateImageOutput, error)

TranslateImageWithContext is the same as TranslateImage with the addition of the ability to pass a context and additional request options.

See TranslateImage for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) TranslateText

func (c *TRANSLATE20250301) TranslateText(input *TranslateTextInput) (*TranslateTextOutput, error)

TranslateText API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation TranslateText for usage and error information.

func (*TRANSLATE20250301) TranslateTextCommon

func (c *TRANSLATE20250301) TranslateTextCommon(input *map[string]interface{}) (*map[string]interface{}, error)

TranslateTextCommon API operation for TRANSLATE20250301.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for TRANSLATE20250301's API operation TranslateTextCommon for usage and error information.

func (*TRANSLATE20250301) TranslateTextCommonRequest

func (c *TRANSLATE20250301) TranslateTextCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

TranslateTextCommonRequest generates a "volcengine/request.Request" representing the client's request for the TranslateTextCommon operation. The "output" return value will be populated with the TranslateTextCommon request's response once the request completes successfully.

Use "Send" method on the returned TranslateTextCommon Request to send the API call to the service. the "output" return value is not valid until after TranslateTextCommon Send returns without error.

See TranslateTextCommon for more information on using the TranslateTextCommon API call, and error handling.

// Example sending a request using the TranslateTextCommonRequest method.
req, resp := client.TranslateTextCommonRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) TranslateTextCommonWithContext

func (c *TRANSLATE20250301) TranslateTextCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

TranslateTextCommonWithContext is the same as TranslateTextCommon with the addition of the ability to pass a context and additional request options.

See TranslateTextCommon for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*TRANSLATE20250301) TranslateTextRequest

func (c *TRANSLATE20250301) TranslateTextRequest(input *TranslateTextInput) (req *request.Request, output *TranslateTextOutput)

TranslateTextRequest generates a "volcengine/request.Request" representing the client's request for the TranslateText operation. The "output" return value will be populated with the TranslateTextCommon request's response once the request completes successfully.

Use "Send" method on the returned TranslateTextCommon Request to send the API call to the service. the "output" return value is not valid until after TranslateTextCommon Send returns without error.

See TranslateText for more information on using the TranslateText API call, and error handling.

// Example sending a request using the TranslateTextRequest method.
req, resp := client.TranslateTextRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*TRANSLATE20250301) TranslateTextWithContext

func (c *TRANSLATE20250301) TranslateTextWithContext(ctx volcengine.Context, input *TranslateTextInput, opts ...request.Option) (*TranslateTextOutput, error)

TranslateTextWithContext is the same as TranslateText with the addition of the ability to pass a context and additional request options.

See TranslateText for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

type TRANSLATE20250301API

type TRANSLATE20250301API interface {
	GetUsageCommon(*map[string]interface{}) (*map[string]interface{}, error)
	GetUsageCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	GetUsageCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	GetUsage(*GetUsageInput) (*GetUsageOutput, error)
	GetUsageWithContext(volcengine.Context, *GetUsageInput, ...request.Option) (*GetUsageOutput, error)
	GetUsageRequest(*GetUsageInput) (*request.Request, *GetUsageOutput)

	LangDetectCommon(*map[string]interface{}) (*map[string]interface{}, error)
	LangDetectCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	LangDetectCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	LangDetect(*LangDetectInput) (*LangDetectOutput, error)
	LangDetectWithContext(volcengine.Context, *LangDetectInput, ...request.Option) (*LangDetectOutput, error)
	LangDetectRequest(*LangDetectInput) (*request.Request, *LangDetectOutput)

	QueryAudioCommon(*map[string]interface{}) (*map[string]interface{}, error)
	QueryAudioCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	QueryAudioCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	QueryAudio(*QueryAudioInput) (*QueryAudioOutput, error)
	QueryAudioWithContext(volcengine.Context, *QueryAudioInput, ...request.Option) (*QueryAudioOutput, error)
	QueryAudioRequest(*QueryAudioInput) (*request.Request, *QueryAudioOutput)

	SubmitAudioCommon(*map[string]interface{}) (*map[string]interface{}, error)
	SubmitAudioCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	SubmitAudioCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	SubmitAudio(*SubmitAudioInput) (*SubmitAudioOutput, error)
	SubmitAudioWithContext(volcengine.Context, *SubmitAudioInput, ...request.Option) (*SubmitAudioOutput, error)
	SubmitAudioRequest(*SubmitAudioInput) (*request.Request, *SubmitAudioOutput)

	TranslateImageCommon(*map[string]interface{}) (*map[string]interface{}, error)
	TranslateImageCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	TranslateImageCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	TranslateImage(*TranslateImageInput) (*TranslateImageOutput, error)
	TranslateImageWithContext(volcengine.Context, *TranslateImageInput, ...request.Option) (*TranslateImageOutput, error)
	TranslateImageRequest(*TranslateImageInput) (*request.Request, *TranslateImageOutput)

	TranslateTextCommon(*map[string]interface{}) (*map[string]interface{}, error)
	TranslateTextCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	TranslateTextCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	TranslateText(*TranslateTextInput) (*TranslateTextOutput, error)
	TranslateTextWithContext(volcengine.Context, *TranslateTextInput, ...request.Option) (*TranslateTextOutput, error)
	TranslateTextRequest(*TranslateTextInput) (*request.Request, *TranslateTextOutput)
}

TRANSLATE20250301API provides an interface to enable mocking the translate20250301.TRANSLATE20250301 service client's API operation,

// volcengine sdk func uses an SDK service client to make a request to
// TRANSLATE20250301.
func myFunc(svc TRANSLATE20250301API) bool {
    // Make svc.GetUsage request
}

func main() {
    sess := session.New()
    svc := translate20250301.New(sess)

    myFunc(svc)
}

type TextBlockForTranslateImageOutput

type TextBlockForTranslateImageOutput struct {
	BackColor []*int32 `type:"list" json:",omitempty"`

	DetectedLanguage *string `type:"string" json:",omitempty"`

	ForeColor []*int32 `type:"list" json:",omitempty"`

	Points []*PointForTranslateImageOutput `type:"list" json:",omitempty"`

	Text *string `type:"string" json:",omitempty"`

	Translation *string `type:"string" json:",omitempty"`
	// contains filtered or unexported fields
}

func (TextBlockForTranslateImageOutput) GoString

GoString returns the string representation

func (*TextBlockForTranslateImageOutput) SetBackColor

SetBackColor sets the BackColor field's value.

func (*TextBlockForTranslateImageOutput) SetDetectedLanguage

SetDetectedLanguage sets the DetectedLanguage field's value.

func (*TextBlockForTranslateImageOutput) SetForeColor

SetForeColor sets the ForeColor field's value.

func (*TextBlockForTranslateImageOutput) SetPoints

SetPoints sets the Points field's value.

func (*TextBlockForTranslateImageOutput) SetText

SetText sets the Text field's value.

func (*TextBlockForTranslateImageOutput) SetTranslation

SetTranslation sets the Translation field's value.

func (TextBlockForTranslateImageOutput) String

String returns the string representation

type TranslateImageInput

type TranslateImageInput struct {

	// Image is a required field
	Image *string `type:"string" json:",omitempty" required:"true"`

	SourceLanguage *string `type:"string" json:",omitempty"`

	// TargetLanguage is a required field
	TargetLanguage *string `type:"string" json:",omitempty" required:"true"`
	// contains filtered or unexported fields
}

func (TranslateImageInput) GoString

func (s TranslateImageInput) GoString() string

GoString returns the string representation

func (*TranslateImageInput) SetImage

SetImage sets the Image field's value.

func (*TranslateImageInput) SetSourceLanguage

func (s *TranslateImageInput) SetSourceLanguage(v string) *TranslateImageInput

SetSourceLanguage sets the SourceLanguage field's value.

func (*TranslateImageInput) SetTargetLanguage

func (s *TranslateImageInput) SetTargetLanguage(v string) *TranslateImageInput

SetTargetLanguage sets the TargetLanguage field's value.

func (TranslateImageInput) String

func (s TranslateImageInput) String() string

String returns the string representation

func (*TranslateImageInput) Validate

func (s *TranslateImageInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type TranslateImageOutput

type TranslateImageOutput struct {
	Metadata *response.ResponseMetadata

	Image *string `type:"string" json:",omitempty"`

	TextBlocks []*TextBlockForTranslateImageOutput `type:"list" json:",omitempty"`
	// contains filtered or unexported fields
}

func (TranslateImageOutput) GoString

func (s TranslateImageOutput) GoString() string

GoString returns the string representation

func (*TranslateImageOutput) SetImage

SetImage sets the Image field's value.

func (*TranslateImageOutput) SetTextBlocks

SetTextBlocks sets the TextBlocks field's value.

func (TranslateImageOutput) String

func (s TranslateImageOutput) String() string

String returns the string representation

type TranslateTextInput

type TranslateTextInput struct {
	SourceLanguage *string `type:"string" json:",omitempty"`

	// TargetLanguage is a required field
	TargetLanguage *string `type:"string" json:",omitempty" required:"true"`

	TextList []*string `type:"list" json:",omitempty"`
	// contains filtered or unexported fields
}

func (TranslateTextInput) GoString

func (s TranslateTextInput) GoString() string

GoString returns the string representation

func (*TranslateTextInput) SetSourceLanguage

func (s *TranslateTextInput) SetSourceLanguage(v string) *TranslateTextInput

SetSourceLanguage sets the SourceLanguage field's value.

func (*TranslateTextInput) SetTargetLanguage

func (s *TranslateTextInput) SetTargetLanguage(v string) *TranslateTextInput

SetTargetLanguage sets the TargetLanguage field's value.

func (*TranslateTextInput) SetTextList

func (s *TranslateTextInput) SetTextList(v []*string) *TranslateTextInput

SetTextList sets the TextList field's value.

func (TranslateTextInput) String

func (s TranslateTextInput) String() string

String returns the string representation

func (*TranslateTextInput) Validate

func (s *TranslateTextInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type TranslateTextOutput

type TranslateTextOutput struct {
	Metadata *response.ResponseMetadata

	TranslationList []*TranslationListForTranslateTextOutput `type:"list" json:",omitempty"`
	// contains filtered or unexported fields
}

func (TranslateTextOutput) GoString

func (s TranslateTextOutput) GoString() string

GoString returns the string representation

func (*TranslateTextOutput) SetTranslationList

SetTranslationList sets the TranslationList field's value.

func (TranslateTextOutput) String

func (s TranslateTextOutput) String() string

String returns the string representation

type TranslationListForTranslateTextOutput

type TranslationListForTranslateTextOutput struct {
	DetectedSourceLanguage *string `type:"string" json:",omitempty"`

	Translation *string `type:"string" json:",omitempty"`
	// contains filtered or unexported fields
}

func (TranslationListForTranslateTextOutput) GoString

GoString returns the string representation

func (*TranslationListForTranslateTextOutput) SetDetectedSourceLanguage

SetDetectedSourceLanguage sets the DetectedSourceLanguage field's value.

func (*TranslationListForTranslateTextOutput) SetTranslation

SetTranslation sets the Translation field's value.

func (TranslationListForTranslateTextOutput) String

String returns the string representation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL