vs

package
v1.0.69 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package vsiface provides an interface to enable mocking the VS 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 = "vs"        // Name of service.
	EndpointsID = ServiceName // ID to lookup a service endpoint with.
	ServiceID   = "vs"        // ServiceID is a unique identifer of a specific service.
)

Service information constants

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateVoiceTaskInput

type CreateVoiceTaskInput struct {

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

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

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

	NumberInfoList *NumberInfoListForCreateVoiceTaskInput `type:"structure" json:",omitempty"`

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

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

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

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

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

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

	VoiceContent *VoiceContentForCreateVoiceTaskInput `type:"structure" json:",omitempty"`
	// contains filtered or unexported fields
}

func (CreateVoiceTaskInput) GoString

func (s CreateVoiceTaskInput) GoString() string

GoString returns the string representation

func (*CreateVoiceTaskInput) SetDisplayNum

func (s *CreateVoiceTaskInput) SetDisplayNum(v string) *CreateVoiceTaskInput

SetDisplayNum sets the DisplayNum field's value.

func (*CreateVoiceTaskInput) SetMaxHangUpTime

func (s *CreateVoiceTaskInput) SetMaxHangUpTime(v int32) *CreateVoiceTaskInput

SetMaxHangUpTime sets the MaxHangUpTime field's value.

func (*CreateVoiceTaskInput) SetMaxRingTime

func (s *CreateVoiceTaskInput) SetMaxRingTime(v int32) *CreateVoiceTaskInput

SetMaxRingTime sets the MaxRingTime field's value.

func (*CreateVoiceTaskInput) SetNumberInfoList

SetNumberInfoList sets the NumberInfoList field's value.

func (*CreateVoiceTaskInput) SetRepeatingCount

func (s *CreateVoiceTaskInput) SetRepeatingCount(v int32) *CreateVoiceTaskInput

SetRepeatingCount sets the RepeatingCount field's value.

func (*CreateVoiceTaskInput) SetSendTime

SetSendTime sets the SendTime field's value.

func (*CreateVoiceTaskInput) SetServiceCode

func (s *CreateVoiceTaskInput) SetServiceCode(v string) *CreateVoiceTaskInput

SetServiceCode sets the ServiceCode field's value.

func (*CreateVoiceTaskInput) SetTaskId

SetTaskId sets the TaskId field's value.

func (*CreateVoiceTaskInput) SetTaskName

SetTaskName sets the TaskName field's value.

func (*CreateVoiceTaskInput) SetTimeZone

SetTimeZone sets the TimeZone field's value.

func (*CreateVoiceTaskInput) SetVoiceContent

SetVoiceContent sets the VoiceContent field's value.

func (CreateVoiceTaskInput) String

func (s CreateVoiceTaskInput) String() string

String returns the string representation

func (*CreateVoiceTaskInput) Validate

func (s *CreateVoiceTaskInput) Validate() error

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

type CreateVoiceTaskOutput

type CreateVoiceTaskOutput struct {
	Metadata *response.ResponseMetadata

	Data *DataForCreateVoiceTaskOutput `type:"structure" json:",omitempty"`

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

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

func (CreateVoiceTaskOutput) GoString

func (s CreateVoiceTaskOutput) GoString() string

GoString returns the string representation

func (*CreateVoiceTaskOutput) SetData

SetData sets the Data field's value.

func (*CreateVoiceTaskOutput) SetErrorMessage

func (s *CreateVoiceTaskOutput) SetErrorMessage(v string) *CreateVoiceTaskOutput

SetErrorMessage sets the ErrorMessage field's value.

func (*CreateVoiceTaskOutput) SetResult

SetResult sets the Result field's value.

func (CreateVoiceTaskOutput) String

func (s CreateVoiceTaskOutput) String() string

String returns the string representation

type DataForCreateVoiceTaskOutput

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

func (DataForCreateVoiceTaskOutput) GoString

func (s DataForCreateVoiceTaskOutput) GoString() string

GoString returns the string representation

func (*DataForCreateVoiceTaskOutput) SetTaskId

SetTaskId sets the TaskId field's value.

func (DataForCreateVoiceTaskOutput) String

String returns the string representation

type NumberInfoListForCreateVoiceTaskInput

type NumberInfoListForCreateVoiceTaskInput struct {
	CalleeNumber *string `type:"string" json:"calleeNumber,omitempty"`

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

func (NumberInfoListForCreateVoiceTaskInput) GoString

GoString returns the string representation

func (*NumberInfoListForCreateVoiceTaskInput) SetCalleeNumber

SetCalleeNumber sets the CalleeNumber field's value.

func (*NumberInfoListForCreateVoiceTaskInput) SetParamObj

SetParamObj sets the ParamObj field's value.

func (NumberInfoListForCreateVoiceTaskInput) String

String returns the string representation

type VS

type VS struct {
	*client.Client
}

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

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

func New

func New(p client.ConfigProvider, cfgs ...*byteplus.Config) *VS

New create int can support ssl or region locate set

func (*VS) CreateVoiceTask

func (c *VS) CreateVoiceTask(input *CreateVoiceTaskInput) (*CreateVoiceTaskOutput, error)

CreateVoiceTask API operation for VS.

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

See the BYTEPLUS API reference guide for VS's API operation CreateVoiceTask for usage and error information.

func (*VS) CreateVoiceTaskCommon

func (c *VS) CreateVoiceTaskCommon(input *map[string]interface{}) (*map[string]interface{}, error)

CreateVoiceTaskCommon API operation for VS.

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

See the BYTEPLUS API reference guide for VS's API operation CreateVoiceTaskCommon for usage and error information.

func (*VS) CreateVoiceTaskCommonRequest

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

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

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

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

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

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

func (*VS) CreateVoiceTaskCommonWithContext

func (c *VS) CreateVoiceTaskCommonWithContext(ctx byteplus.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

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

See CreateVoiceTaskCommon 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 (*VS) CreateVoiceTaskRequest

func (c *VS) CreateVoiceTaskRequest(input *CreateVoiceTaskInput) (req *request.Request, output *CreateVoiceTaskOutput)

CreateVoiceTaskRequest generates a "byteplus/request.Request" representing the client's request for the CreateVoiceTask operation. The "output" return value will be populated with the CreateVoiceTaskCommon request's response once the request completes successfully.

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

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

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

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

func (*VS) CreateVoiceTaskWithContext

func (c *VS) CreateVoiceTaskWithContext(ctx byteplus.Context, input *CreateVoiceTaskInput, opts ...request.Option) (*CreateVoiceTaskOutput, error)

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

See CreateVoiceTask 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 VSAPI

type VSAPI interface {
	CreateVoiceTaskCommon(*map[string]interface{}) (*map[string]interface{}, error)
	CreateVoiceTaskCommonWithContext(byteplus.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	CreateVoiceTaskCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	CreateVoiceTask(*CreateVoiceTaskInput) (*CreateVoiceTaskOutput, error)
	CreateVoiceTaskWithContext(byteplus.Context, *CreateVoiceTaskInput, ...request.Option) (*CreateVoiceTaskOutput, error)
	CreateVoiceTaskRequest(*CreateVoiceTaskInput) (*request.Request, *CreateVoiceTaskOutput)
}

VSAPI provides an interface to enable mocking the vs.VS service client's API operation,

// byteplus sdk func uses an SDK service client to make a request to
// VS.
func myFunc(svc VSAPI) bool {
    // Make svc.CreateVoiceTask request
}

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

    myFunc(svc)
}

type VoiceContentForCreateVoiceTaskInput

type VoiceContentForCreateVoiceTaskInput struct {
	BaseFile *string `type:"string" json:"baseFile,omitempty"`

	FileName *string `type:"string" json:"fileName,omitempty"`

	Source *int32 `type:"int32" json:"source,omitempty"`

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

	TtsLanguage *string `type:"string" json:"ttsLanguage,omitempty"`

	TtsSpeed *int32 `type:"int32" json:"ttsSpeed,omitempty"`

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

func (VoiceContentForCreateVoiceTaskInput) GoString

GoString returns the string representation

func (*VoiceContentForCreateVoiceTaskInput) SetBaseFile

SetBaseFile sets the BaseFile field's value.

func (*VoiceContentForCreateVoiceTaskInput) SetFileName

SetFileName sets the FileName field's value.

func (*VoiceContentForCreateVoiceTaskInput) SetSource

SetSource sets the Source field's value.

func (*VoiceContentForCreateVoiceTaskInput) SetText

SetText sets the Text field's value.

func (*VoiceContentForCreateVoiceTaskInput) SetTtsLanguage

SetTtsLanguage sets the TtsLanguage field's value.

func (*VoiceContentForCreateVoiceTaskInput) SetTtsSpeed

SetTtsSpeed sets the TtsSpeed field's value.

func (*VoiceContentForCreateVoiceTaskInput) SetVoiceId

SetVoiceId sets the VoiceId field's value.

func (VoiceContentForCreateVoiceTaskInput) String

String returns the string representation

Jump to

Keyboard shortcuts

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