diff --git a/service/vefaas/api_create_timer.go b/service/vefaas/api_create_timer.go new file mode 100644 index 00000000..744aea13 --- /dev/null +++ b/service/vefaas/api_create_timer.go @@ -0,0 +1,466 @@ +// Code generated by volcengine with private/model/cli/gen-api/main.go. DO NOT EDIT. + +package vefaas + +import ( + "github.com/volcengine/volcengine-go-sdk/volcengine" + "github.com/volcengine/volcengine-go-sdk/volcengine/request" + "github.com/volcengine/volcengine-go-sdk/volcengine/response" + "github.com/volcengine/volcengine-go-sdk/volcengine/volcengineutil" +) + +const opCreateTimerCommon = "CreateTimer" + +// CreateTimerCommonRequest generates a "volcengine/request.Request" representing the +// client's request for the CreateTimerCommon operation. The "output" return +// value will be populated with the CreateTimerCommon request's response once the request completes +// successfully. +// +// Use "Send" method on the returned CreateTimerCommon Request to send the API call to the service. +// the "output" return value is not valid until after CreateTimerCommon Send returns without error. +// +// See CreateTimerCommon for more information on using the CreateTimerCommon +// API call, and error handling. +// +// // Example sending a request using the CreateTimerCommonRequest method. +// req, resp := client.CreateTimerCommonRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *VEFAAS) CreateTimerCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{}) { + op := &request.Operation{ + Name: opCreateTimerCommon, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &map[string]interface{}{} + } + + output = &map[string]interface{}{} + req = c.newRequest(op, input, output) + + req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8") + + return +} + +// CreateTimerCommon API operation for VEFAAS. +// +// 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 VEFAAS's +// API operation CreateTimerCommon for usage and error information. +func (c *VEFAAS) CreateTimerCommon(input *map[string]interface{}) (*map[string]interface{}, error) { + req, out := c.CreateTimerCommonRequest(input) + return out, req.Send() +} + +// CreateTimerCommonWithContext is the same as CreateTimerCommon with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTimerCommon 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 (c *VEFAAS) CreateTimerCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error) { + req, out := c.CreateTimerCommonRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTimer = "CreateTimer" + +// CreateTimerRequest generates a "volcengine/request.Request" representing the +// client's request for the CreateTimer operation. The "output" return +// value will be populated with the CreateTimerCommon request's response once the request completes +// successfully. +// +// Use "Send" method on the returned CreateTimerCommon Request to send the API call to the service. +// the "output" return value is not valid until after CreateTimerCommon Send returns without error. +// +// See CreateTimer for more information on using the CreateTimer +// API call, and error handling. +// +// // Example sending a request using the CreateTimerRequest method. +// req, resp := client.CreateTimerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *VEFAAS) CreateTimerRequest(input *CreateTimerInput) (req *request.Request, output *CreateTimerOutput) { + op := &request.Operation{ + Name: opCreateTimer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTimerInput{} + } + + output = &CreateTimerOutput{} + req = c.newRequest(op, input, output) + + req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8") + + return +} + +// CreateTimer API operation for VEFAAS. +// +// 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 VEFAAS's +// API operation CreateTimer for usage and error information. +func (c *VEFAAS) CreateTimer(input *CreateTimerInput) (*CreateTimerOutput, error) { + req, out := c.CreateTimerRequest(input) + return out, req.Send() +} + +// CreateTimerWithContext is the same as CreateTimer with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTimer 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 (c *VEFAAS) CreateTimerWithContext(ctx volcengine.Context, input *CreateTimerInput, opts ...request.Option) (*CreateTimerOutput, error) { + req, out := c.CreateTimerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type CreateTimerInput struct { + _ struct{} `type:"structure" json:",omitempty"` + + // Crontab is a required field + Crontab *string `type:"string" json:",omitempty" required:"true"` + + Description *string `type:"string" json:",omitempty"` + + EnableConcurrency *bool `type:"boolean" json:",omitempty"` + + Enabled *bool `type:"boolean" json:",omitempty"` + + // FunctionId is a required field + FunctionId *string `type:"string" json:",omitempty" required:"true"` + + // Name is a required field + Name *string `type:"string" json:",omitempty" required:"true"` + + Payload *string `type:"string" json:",omitempty"` + + Retries *int32 `type:"int32" json:",omitempty"` + + TopParam *TopParamForCreateTimerInput `type:"structure" json:",omitempty"` +} + +// String returns the string representation +func (s CreateTimerInput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTimerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTimerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTimerInput"} + if s.Crontab == nil { + invalidParams.Add(request.NewErrParamRequired("Crontab")) + } + if s.FunctionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCrontab sets the Crontab field's value. +func (s *CreateTimerInput) SetCrontab(v string) *CreateTimerInput { + s.Crontab = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateTimerInput) SetDescription(v string) *CreateTimerInput { + s.Description = &v + return s +} + +// SetEnableConcurrency sets the EnableConcurrency field's value. +func (s *CreateTimerInput) SetEnableConcurrency(v bool) *CreateTimerInput { + s.EnableConcurrency = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *CreateTimerInput) SetEnabled(v bool) *CreateTimerInput { + s.Enabled = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *CreateTimerInput) SetFunctionId(v string) *CreateTimerInput { + s.FunctionId = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateTimerInput) SetName(v string) *CreateTimerInput { + s.Name = &v + return s +} + +// SetPayload sets the Payload field's value. +func (s *CreateTimerInput) SetPayload(v string) *CreateTimerInput { + s.Payload = &v + return s +} + +// SetRetries sets the Retries field's value. +func (s *CreateTimerInput) SetRetries(v int32) *CreateTimerInput { + s.Retries = &v + return s +} + +// SetTopParam sets the TopParam field's value. +func (s *CreateTimerInput) SetTopParam(v *TopParamForCreateTimerInput) *CreateTimerInput { + s.TopParam = v + return s +} + +type CreateTimerOutput struct { + _ struct{} `type:"structure" json:",omitempty"` + + Metadata *response.ResponseMetadata + + CreationTime *string `type:"string" json:",omitempty"` + + Crontab *string `type:"string" json:",omitempty"` + + Description *string `type:"string" json:",omitempty"` + + EnableConcurrency *bool `type:"boolean" json:",omitempty"` + + Enabled *bool `type:"boolean" json:",omitempty"` + + FunctionId *string `type:"string" json:",omitempty"` + + Id *string `type:"string" json:",omitempty"` + + LastUpdateTime *string `type:"string" json:",omitempty"` + + Name *string `type:"string" json:",omitempty"` + + Payload *string `type:"string" json:",omitempty"` + + Retries *int32 `type:"int32" json:",omitempty"` +} + +// String returns the string representation +func (s CreateTimerOutput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTimerOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *CreateTimerOutput) SetCreationTime(v string) *CreateTimerOutput { + s.CreationTime = &v + return s +} + +// SetCrontab sets the Crontab field's value. +func (s *CreateTimerOutput) SetCrontab(v string) *CreateTimerOutput { + s.Crontab = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateTimerOutput) SetDescription(v string) *CreateTimerOutput { + s.Description = &v + return s +} + +// SetEnableConcurrency sets the EnableConcurrency field's value. +func (s *CreateTimerOutput) SetEnableConcurrency(v bool) *CreateTimerOutput { + s.EnableConcurrency = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *CreateTimerOutput) SetEnabled(v bool) *CreateTimerOutput { + s.Enabled = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *CreateTimerOutput) SetFunctionId(v string) *CreateTimerOutput { + s.FunctionId = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateTimerOutput) SetId(v string) *CreateTimerOutput { + s.Id = &v + return s +} + +// SetLastUpdateTime sets the LastUpdateTime field's value. +func (s *CreateTimerOutput) SetLastUpdateTime(v string) *CreateTimerOutput { + s.LastUpdateTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateTimerOutput) SetName(v string) *CreateTimerOutput { + s.Name = &v + return s +} + +// SetPayload sets the Payload field's value. +func (s *CreateTimerOutput) SetPayload(v string) *CreateTimerOutput { + s.Payload = &v + return s +} + +// SetRetries sets the Retries field's value. +func (s *CreateTimerOutput) SetRetries(v int32) *CreateTimerOutput { + s.Retries = &v + return s +} + +type TopParamForCreateTimerInput struct { + _ struct{} `type:"structure" json:",omitempty"` + + AccountId *int64 `type:"int64" json:",omitempty"` + + DestService *string `type:"string" json:",omitempty"` + + IsInternal *string `type:"string" json:",omitempty"` + + Psm *string `type:"string" json:",omitempty"` + + RealIp *string `type:"string" json:",omitempty"` + + Region *string `type:"string" json:",omitempty"` + + RequestId *string `type:"string" json:",omitempty"` + + RoleId *int64 `type:"int64" json:",omitempty"` + + Site *string `type:"string" json:",omitempty"` + + SourceService *string `type:"string" json:",omitempty"` + + UserAgent *string `type:"string" json:",omitempty"` + + UserId *int64 `type:"int64" json:",omitempty"` +} + +// String returns the string representation +func (s TopParamForCreateTimerInput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s TopParamForCreateTimerInput) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *TopParamForCreateTimerInput) SetAccountId(v int64) *TopParamForCreateTimerInput { + s.AccountId = &v + return s +} + +// SetDestService sets the DestService field's value. +func (s *TopParamForCreateTimerInput) SetDestService(v string) *TopParamForCreateTimerInput { + s.DestService = &v + return s +} + +// SetIsInternal sets the IsInternal field's value. +func (s *TopParamForCreateTimerInput) SetIsInternal(v string) *TopParamForCreateTimerInput { + s.IsInternal = &v + return s +} + +// SetPsm sets the Psm field's value. +func (s *TopParamForCreateTimerInput) SetPsm(v string) *TopParamForCreateTimerInput { + s.Psm = &v + return s +} + +// SetRealIp sets the RealIp field's value. +func (s *TopParamForCreateTimerInput) SetRealIp(v string) *TopParamForCreateTimerInput { + s.RealIp = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *TopParamForCreateTimerInput) SetRegion(v string) *TopParamForCreateTimerInput { + s.Region = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *TopParamForCreateTimerInput) SetRequestId(v string) *TopParamForCreateTimerInput { + s.RequestId = &v + return s +} + +// SetRoleId sets the RoleId field's value. +func (s *TopParamForCreateTimerInput) SetRoleId(v int64) *TopParamForCreateTimerInput { + s.RoleId = &v + return s +} + +// SetSite sets the Site field's value. +func (s *TopParamForCreateTimerInput) SetSite(v string) *TopParamForCreateTimerInput { + s.Site = &v + return s +} + +// SetSourceService sets the SourceService field's value. +func (s *TopParamForCreateTimerInput) SetSourceService(v string) *TopParamForCreateTimerInput { + s.SourceService = &v + return s +} + +// SetUserAgent sets the UserAgent field's value. +func (s *TopParamForCreateTimerInput) SetUserAgent(v string) *TopParamForCreateTimerInput { + s.UserAgent = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *TopParamForCreateTimerInput) SetUserId(v int64) *TopParamForCreateTimerInput { + s.UserId = &v + return s +} diff --git a/service/vefaas/api_delete_timer.go b/service/vefaas/api_delete_timer.go new file mode 100644 index 00000000..48e9e9be --- /dev/null +++ b/service/vefaas/api_delete_timer.go @@ -0,0 +1,326 @@ +// Code generated by volcengine with private/model/cli/gen-api/main.go. DO NOT EDIT. + +package vefaas + +import ( + "github.com/volcengine/volcengine-go-sdk/volcengine" + "github.com/volcengine/volcengine-go-sdk/volcengine/request" + "github.com/volcengine/volcengine-go-sdk/volcengine/response" + "github.com/volcengine/volcengine-go-sdk/volcengine/volcengineutil" +) + +const opDeleteTimerCommon = "DeleteTimer" + +// DeleteTimerCommonRequest generates a "volcengine/request.Request" representing the +// client's request for the DeleteTimerCommon operation. The "output" return +// value will be populated with the DeleteTimerCommon request's response once the request completes +// successfully. +// +// Use "Send" method on the returned DeleteTimerCommon Request to send the API call to the service. +// the "output" return value is not valid until after DeleteTimerCommon Send returns without error. +// +// See DeleteTimerCommon for more information on using the DeleteTimerCommon +// API call, and error handling. +// +// // Example sending a request using the DeleteTimerCommonRequest method. +// req, resp := client.DeleteTimerCommonRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *VEFAAS) DeleteTimerCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{}) { + op := &request.Operation{ + Name: opDeleteTimerCommon, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &map[string]interface{}{} + } + + output = &map[string]interface{}{} + req = c.newRequest(op, input, output) + + req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8") + + return +} + +// DeleteTimerCommon API operation for VEFAAS. +// +// 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 VEFAAS's +// API operation DeleteTimerCommon for usage and error information. +func (c *VEFAAS) DeleteTimerCommon(input *map[string]interface{}) (*map[string]interface{}, error) { + req, out := c.DeleteTimerCommonRequest(input) + return out, req.Send() +} + +// DeleteTimerCommonWithContext is the same as DeleteTimerCommon with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTimerCommon 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 (c *VEFAAS) DeleteTimerCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error) { + req, out := c.DeleteTimerCommonRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTimer = "DeleteTimer" + +// DeleteTimerRequest generates a "volcengine/request.Request" representing the +// client's request for the DeleteTimer operation. The "output" return +// value will be populated with the DeleteTimerCommon request's response once the request completes +// successfully. +// +// Use "Send" method on the returned DeleteTimerCommon Request to send the API call to the service. +// the "output" return value is not valid until after DeleteTimerCommon Send returns without error. +// +// See DeleteTimer for more information on using the DeleteTimer +// API call, and error handling. +// +// // Example sending a request using the DeleteTimerRequest method. +// req, resp := client.DeleteTimerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *VEFAAS) DeleteTimerRequest(input *DeleteTimerInput) (req *request.Request, output *DeleteTimerOutput) { + op := &request.Operation{ + Name: opDeleteTimer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTimerInput{} + } + + output = &DeleteTimerOutput{} + req = c.newRequest(op, input, output) + + req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8") + + return +} + +// DeleteTimer API operation for VEFAAS. +// +// 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 VEFAAS's +// API operation DeleteTimer for usage and error information. +func (c *VEFAAS) DeleteTimer(input *DeleteTimerInput) (*DeleteTimerOutput, error) { + req, out := c.DeleteTimerRequest(input) + return out, req.Send() +} + +// DeleteTimerWithContext is the same as DeleteTimer with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTimer 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 (c *VEFAAS) DeleteTimerWithContext(ctx volcengine.Context, input *DeleteTimerInput, opts ...request.Option) (*DeleteTimerOutput, error) { + req, out := c.DeleteTimerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type DeleteTimerInput struct { + _ struct{} `type:"structure" json:",omitempty"` + + // FunctionId is a required field + FunctionId *string `type:"string" json:",omitempty" required:"true"` + + // Id is a required field + Id *string `type:"string" json:",omitempty" required:"true"` + + TopParam *TopParamForDeleteTimerInput `type:"structure" json:",omitempty"` +} + +// String returns the string representation +func (s DeleteTimerInput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTimerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTimerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTimerInput"} + if s.FunctionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionId")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFunctionId sets the FunctionId field's value. +func (s *DeleteTimerInput) SetFunctionId(v string) *DeleteTimerInput { + s.FunctionId = &v + return s +} + +// SetId sets the Id field's value. +func (s *DeleteTimerInput) SetId(v string) *DeleteTimerInput { + s.Id = &v + return s +} + +// SetTopParam sets the TopParam field's value. +func (s *DeleteTimerInput) SetTopParam(v *TopParamForDeleteTimerInput) *DeleteTimerInput { + s.TopParam = v + return s +} + +type DeleteTimerOutput struct { + _ struct{} `type:"structure" json:",omitempty"` + + Metadata *response.ResponseMetadata +} + +// String returns the string representation +func (s DeleteTimerOutput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTimerOutput) GoString() string { + return s.String() +} + +type TopParamForDeleteTimerInput struct { + _ struct{} `type:"structure" json:",omitempty"` + + AccountId *int64 `type:"int64" json:",omitempty"` + + DestService *string `type:"string" json:",omitempty"` + + IsInternal *string `type:"string" json:",omitempty"` + + Psm *string `type:"string" json:",omitempty"` + + RealIp *string `type:"string" json:",omitempty"` + + Region *string `type:"string" json:",omitempty"` + + RequestId *string `type:"string" json:",omitempty"` + + RoleId *int64 `type:"int64" json:",omitempty"` + + Site *string `type:"string" json:",omitempty"` + + SourceService *string `type:"string" json:",omitempty"` + + UserAgent *string `type:"string" json:",omitempty"` + + UserId *int64 `type:"int64" json:",omitempty"` +} + +// String returns the string representation +func (s TopParamForDeleteTimerInput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s TopParamForDeleteTimerInput) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *TopParamForDeleteTimerInput) SetAccountId(v int64) *TopParamForDeleteTimerInput { + s.AccountId = &v + return s +} + +// SetDestService sets the DestService field's value. +func (s *TopParamForDeleteTimerInput) SetDestService(v string) *TopParamForDeleteTimerInput { + s.DestService = &v + return s +} + +// SetIsInternal sets the IsInternal field's value. +func (s *TopParamForDeleteTimerInput) SetIsInternal(v string) *TopParamForDeleteTimerInput { + s.IsInternal = &v + return s +} + +// SetPsm sets the Psm field's value. +func (s *TopParamForDeleteTimerInput) SetPsm(v string) *TopParamForDeleteTimerInput { + s.Psm = &v + return s +} + +// SetRealIp sets the RealIp field's value. +func (s *TopParamForDeleteTimerInput) SetRealIp(v string) *TopParamForDeleteTimerInput { + s.RealIp = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *TopParamForDeleteTimerInput) SetRegion(v string) *TopParamForDeleteTimerInput { + s.Region = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *TopParamForDeleteTimerInput) SetRequestId(v string) *TopParamForDeleteTimerInput { + s.RequestId = &v + return s +} + +// SetRoleId sets the RoleId field's value. +func (s *TopParamForDeleteTimerInput) SetRoleId(v int64) *TopParamForDeleteTimerInput { + s.RoleId = &v + return s +} + +// SetSite sets the Site field's value. +func (s *TopParamForDeleteTimerInput) SetSite(v string) *TopParamForDeleteTimerInput { + s.Site = &v + return s +} + +// SetSourceService sets the SourceService field's value. +func (s *TopParamForDeleteTimerInput) SetSourceService(v string) *TopParamForDeleteTimerInput { + s.SourceService = &v + return s +} + +// SetUserAgent sets the UserAgent field's value. +func (s *TopParamForDeleteTimerInput) SetUserAgent(v string) *TopParamForDeleteTimerInput { + s.UserAgent = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *TopParamForDeleteTimerInput) SetUserId(v int64) *TopParamForDeleteTimerInput { + s.UserId = &v + return s +} diff --git a/service/vefaas/api_get_timer.go b/service/vefaas/api_get_timer.go new file mode 100644 index 00000000..2ef29a8e --- /dev/null +++ b/service/vefaas/api_get_timer.go @@ -0,0 +1,414 @@ +// Code generated by volcengine with private/model/cli/gen-api/main.go. DO NOT EDIT. + +package vefaas + +import ( + "github.com/volcengine/volcengine-go-sdk/volcengine" + "github.com/volcengine/volcengine-go-sdk/volcengine/request" + "github.com/volcengine/volcengine-go-sdk/volcengine/response" + "github.com/volcengine/volcengine-go-sdk/volcengine/volcengineutil" +) + +const opGetTimerCommon = "GetTimer" + +// GetTimerCommonRequest generates a "volcengine/request.Request" representing the +// client's request for the GetTimerCommon operation. The "output" return +// value will be populated with the GetTimerCommon request's response once the request completes +// successfully. +// +// Use "Send" method on the returned GetTimerCommon Request to send the API call to the service. +// the "output" return value is not valid until after GetTimerCommon Send returns without error. +// +// See GetTimerCommon for more information on using the GetTimerCommon +// API call, and error handling. +// +// // Example sending a request using the GetTimerCommonRequest method. +// req, resp := client.GetTimerCommonRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *VEFAAS) GetTimerCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{}) { + op := &request.Operation{ + Name: opGetTimerCommon, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &map[string]interface{}{} + } + + output = &map[string]interface{}{} + req = c.newRequest(op, input, output) + + req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8") + + return +} + +// GetTimerCommon API operation for VEFAAS. +// +// 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 VEFAAS's +// API operation GetTimerCommon for usage and error information. +func (c *VEFAAS) GetTimerCommon(input *map[string]interface{}) (*map[string]interface{}, error) { + req, out := c.GetTimerCommonRequest(input) + return out, req.Send() +} + +// GetTimerCommonWithContext is the same as GetTimerCommon with the addition of +// the ability to pass a context and additional request options. +// +// See GetTimerCommon 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 (c *VEFAAS) GetTimerCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error) { + req, out := c.GetTimerCommonRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetTimer = "GetTimer" + +// GetTimerRequest generates a "volcengine/request.Request" representing the +// client's request for the GetTimer operation. The "output" return +// value will be populated with the GetTimerCommon request's response once the request completes +// successfully. +// +// Use "Send" method on the returned GetTimerCommon Request to send the API call to the service. +// the "output" return value is not valid until after GetTimerCommon Send returns without error. +// +// See GetTimer for more information on using the GetTimer +// API call, and error handling. +// +// // Example sending a request using the GetTimerRequest method. +// req, resp := client.GetTimerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *VEFAAS) GetTimerRequest(input *GetTimerInput) (req *request.Request, output *GetTimerOutput) { + op := &request.Operation{ + Name: opGetTimer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetTimerInput{} + } + + output = &GetTimerOutput{} + req = c.newRequest(op, input, output) + + req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8") + + return +} + +// GetTimer API operation for VEFAAS. +// +// 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 VEFAAS's +// API operation GetTimer for usage and error information. +func (c *VEFAAS) GetTimer(input *GetTimerInput) (*GetTimerOutput, error) { + req, out := c.GetTimerRequest(input) + return out, req.Send() +} + +// GetTimerWithContext is the same as GetTimer with the addition of +// the ability to pass a context and additional request options. +// +// See GetTimer 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 (c *VEFAAS) GetTimerWithContext(ctx volcengine.Context, input *GetTimerInput, opts ...request.Option) (*GetTimerOutput, error) { + req, out := c.GetTimerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type GetTimerInput struct { + _ struct{} `type:"structure" json:",omitempty"` + + // FunctionId is a required field + FunctionId *string `type:"string" json:",omitempty" required:"true"` + + // Id is a required field + Id *string `type:"string" json:",omitempty" required:"true"` + + TopParam *TopParamForGetTimerInput `type:"structure" json:",omitempty"` +} + +// String returns the string representation +func (s GetTimerInput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTimerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTimerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTimerInput"} + if s.FunctionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionId")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFunctionId sets the FunctionId field's value. +func (s *GetTimerInput) SetFunctionId(v string) *GetTimerInput { + s.FunctionId = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetTimerInput) SetId(v string) *GetTimerInput { + s.Id = &v + return s +} + +// SetTopParam sets the TopParam field's value. +func (s *GetTimerInput) SetTopParam(v *TopParamForGetTimerInput) *GetTimerInput { + s.TopParam = v + return s +} + +type GetTimerOutput struct { + _ struct{} `type:"structure" json:",omitempty"` + + Metadata *response.ResponseMetadata + + CreationTime *string `type:"string" json:",omitempty"` + + Crontab *string `type:"string" json:",omitempty"` + + Description *string `type:"string" json:",omitempty"` + + EnableConcurrency *bool `type:"boolean" json:",omitempty"` + + Enabled *bool `type:"boolean" json:",omitempty"` + + FunctionId *string `type:"string" json:",omitempty"` + + Id *string `type:"string" json:",omitempty"` + + LastUpdateTime *string `type:"string" json:",omitempty"` + + Name *string `type:"string" json:",omitempty"` + + Payload *string `type:"string" json:",omitempty"` + + Retries *int32 `type:"int32" json:",omitempty"` +} + +// String returns the string representation +func (s GetTimerOutput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTimerOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *GetTimerOutput) SetCreationTime(v string) *GetTimerOutput { + s.CreationTime = &v + return s +} + +// SetCrontab sets the Crontab field's value. +func (s *GetTimerOutput) SetCrontab(v string) *GetTimerOutput { + s.Crontab = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetTimerOutput) SetDescription(v string) *GetTimerOutput { + s.Description = &v + return s +} + +// SetEnableConcurrency sets the EnableConcurrency field's value. +func (s *GetTimerOutput) SetEnableConcurrency(v bool) *GetTimerOutput { + s.EnableConcurrency = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *GetTimerOutput) SetEnabled(v bool) *GetTimerOutput { + s.Enabled = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *GetTimerOutput) SetFunctionId(v string) *GetTimerOutput { + s.FunctionId = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetTimerOutput) SetId(v string) *GetTimerOutput { + s.Id = &v + return s +} + +// SetLastUpdateTime sets the LastUpdateTime field's value. +func (s *GetTimerOutput) SetLastUpdateTime(v string) *GetTimerOutput { + s.LastUpdateTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetTimerOutput) SetName(v string) *GetTimerOutput { + s.Name = &v + return s +} + +// SetPayload sets the Payload field's value. +func (s *GetTimerOutput) SetPayload(v string) *GetTimerOutput { + s.Payload = &v + return s +} + +// SetRetries sets the Retries field's value. +func (s *GetTimerOutput) SetRetries(v int32) *GetTimerOutput { + s.Retries = &v + return s +} + +type TopParamForGetTimerInput struct { + _ struct{} `type:"structure" json:",omitempty"` + + AccountId *int64 `type:"int64" json:",omitempty"` + + DestService *string `type:"string" json:",omitempty"` + + IsInternal *string `type:"string" json:",omitempty"` + + Psm *string `type:"string" json:",omitempty"` + + RealIp *string `type:"string" json:",omitempty"` + + Region *string `type:"string" json:",omitempty"` + + RequestId *string `type:"string" json:",omitempty"` + + RoleId *int64 `type:"int64" json:",omitempty"` + + Site *string `type:"string" json:",omitempty"` + + SourceService *string `type:"string" json:",omitempty"` + + UserAgent *string `type:"string" json:",omitempty"` + + UserId *int64 `type:"int64" json:",omitempty"` +} + +// String returns the string representation +func (s TopParamForGetTimerInput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s TopParamForGetTimerInput) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *TopParamForGetTimerInput) SetAccountId(v int64) *TopParamForGetTimerInput { + s.AccountId = &v + return s +} + +// SetDestService sets the DestService field's value. +func (s *TopParamForGetTimerInput) SetDestService(v string) *TopParamForGetTimerInput { + s.DestService = &v + return s +} + +// SetIsInternal sets the IsInternal field's value. +func (s *TopParamForGetTimerInput) SetIsInternal(v string) *TopParamForGetTimerInput { + s.IsInternal = &v + return s +} + +// SetPsm sets the Psm field's value. +func (s *TopParamForGetTimerInput) SetPsm(v string) *TopParamForGetTimerInput { + s.Psm = &v + return s +} + +// SetRealIp sets the RealIp field's value. +func (s *TopParamForGetTimerInput) SetRealIp(v string) *TopParamForGetTimerInput { + s.RealIp = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *TopParamForGetTimerInput) SetRegion(v string) *TopParamForGetTimerInput { + s.Region = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *TopParamForGetTimerInput) SetRequestId(v string) *TopParamForGetTimerInput { + s.RequestId = &v + return s +} + +// SetRoleId sets the RoleId field's value. +func (s *TopParamForGetTimerInput) SetRoleId(v int64) *TopParamForGetTimerInput { + s.RoleId = &v + return s +} + +// SetSite sets the Site field's value. +func (s *TopParamForGetTimerInput) SetSite(v string) *TopParamForGetTimerInput { + s.Site = &v + return s +} + +// SetSourceService sets the SourceService field's value. +func (s *TopParamForGetTimerInput) SetSourceService(v string) *TopParamForGetTimerInput { + s.SourceService = &v + return s +} + +// SetUserAgent sets the UserAgent field's value. +func (s *TopParamForGetTimerInput) SetUserAgent(v string) *TopParamForGetTimerInput { + s.UserAgent = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *TopParamForGetTimerInput) SetUserId(v int64) *TopParamForGetTimerInput { + s.UserId = &v + return s +} diff --git a/service/vefaas/api_list_function_instances.go b/service/vefaas/api_list_function_instances.go index 288e7979..6a988e8d 100644 --- a/service/vefaas/api_list_function_instances.go +++ b/service/vefaas/api_list_function_instances.go @@ -156,7 +156,13 @@ type ItemForListFunctionInstancesOutput struct { InstanceStatus *string `type:"string" json:",omitempty"` + InstanceType *string `type:"string" json:",omitempty"` + RevisionNumber *int32 `type:"int32" json:",omitempty"` + + UserVpcIP *string `type:"string" json:",omitempty"` + + UserVpcIPv6 *string `type:"string" json:",omitempty"` } // String returns the string representation @@ -199,12 +205,30 @@ func (s *ItemForListFunctionInstancesOutput) SetInstanceStatus(v string) *ItemFo return s } +// SetInstanceType sets the InstanceType field's value. +func (s *ItemForListFunctionInstancesOutput) SetInstanceType(v string) *ItemForListFunctionInstancesOutput { + s.InstanceType = &v + return s +} + // SetRevisionNumber sets the RevisionNumber field's value. func (s *ItemForListFunctionInstancesOutput) SetRevisionNumber(v int32) *ItemForListFunctionInstancesOutput { s.RevisionNumber = &v return s } +// SetUserVpcIP sets the UserVpcIP field's value. +func (s *ItemForListFunctionInstancesOutput) SetUserVpcIP(v string) *ItemForListFunctionInstancesOutput { + s.UserVpcIP = &v + return s +} + +// SetUserVpcIPv6 sets the UserVpcIPv6 field's value. +func (s *ItemForListFunctionInstancesOutput) SetUserVpcIPv6(v string) *ItemForListFunctionInstancesOutput { + s.UserVpcIPv6 = &v + return s +} + type ListFunctionInstancesInput struct { _ struct{} `type:"structure" json:",omitempty"` diff --git a/service/vefaas/api_update_timer.go b/service/vefaas/api_update_timer.go new file mode 100644 index 00000000..39ef93ed --- /dev/null +++ b/service/vefaas/api_update_timer.go @@ -0,0 +1,462 @@ +// Code generated by volcengine with private/model/cli/gen-api/main.go. DO NOT EDIT. + +package vefaas + +import ( + "github.com/volcengine/volcengine-go-sdk/volcengine" + "github.com/volcengine/volcengine-go-sdk/volcengine/request" + "github.com/volcengine/volcengine-go-sdk/volcengine/response" + "github.com/volcengine/volcengine-go-sdk/volcengine/volcengineutil" +) + +const opUpdateTimerCommon = "UpdateTimer" + +// UpdateTimerCommonRequest generates a "volcengine/request.Request" representing the +// client's request for the UpdateTimerCommon operation. The "output" return +// value will be populated with the UpdateTimerCommon request's response once the request completes +// successfully. +// +// Use "Send" method on the returned UpdateTimerCommon Request to send the API call to the service. +// the "output" return value is not valid until after UpdateTimerCommon Send returns without error. +// +// See UpdateTimerCommon for more information on using the UpdateTimerCommon +// API call, and error handling. +// +// // Example sending a request using the UpdateTimerCommonRequest method. +// req, resp := client.UpdateTimerCommonRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *VEFAAS) UpdateTimerCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{}) { + op := &request.Operation{ + Name: opUpdateTimerCommon, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &map[string]interface{}{} + } + + output = &map[string]interface{}{} + req = c.newRequest(op, input, output) + + req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8") + + return +} + +// UpdateTimerCommon API operation for VEFAAS. +// +// 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 VEFAAS's +// API operation UpdateTimerCommon for usage and error information. +func (c *VEFAAS) UpdateTimerCommon(input *map[string]interface{}) (*map[string]interface{}, error) { + req, out := c.UpdateTimerCommonRequest(input) + return out, req.Send() +} + +// UpdateTimerCommonWithContext is the same as UpdateTimerCommon with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTimerCommon 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 (c *VEFAAS) UpdateTimerCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error) { + req, out := c.UpdateTimerCommonRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateTimer = "UpdateTimer" + +// UpdateTimerRequest generates a "volcengine/request.Request" representing the +// client's request for the UpdateTimer operation. The "output" return +// value will be populated with the UpdateTimerCommon request's response once the request completes +// successfully. +// +// Use "Send" method on the returned UpdateTimerCommon Request to send the API call to the service. +// the "output" return value is not valid until after UpdateTimerCommon Send returns without error. +// +// See UpdateTimer for more information on using the UpdateTimer +// API call, and error handling. +// +// // Example sending a request using the UpdateTimerRequest method. +// req, resp := client.UpdateTimerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *VEFAAS) UpdateTimerRequest(input *UpdateTimerInput) (req *request.Request, output *UpdateTimerOutput) { + op := &request.Operation{ + Name: opUpdateTimer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTimerInput{} + } + + output = &UpdateTimerOutput{} + req = c.newRequest(op, input, output) + + req.HTTPRequest.Header.Set("Content-Type", "application/json; charset=utf-8") + + return +} + +// UpdateTimer API operation for VEFAAS. +// +// 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 VEFAAS's +// API operation UpdateTimer for usage and error information. +func (c *VEFAAS) UpdateTimer(input *UpdateTimerInput) (*UpdateTimerOutput, error) { + req, out := c.UpdateTimerRequest(input) + return out, req.Send() +} + +// UpdateTimerWithContext is the same as UpdateTimer with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTimer 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 (c *VEFAAS) UpdateTimerWithContext(ctx volcengine.Context, input *UpdateTimerInput, opts ...request.Option) (*UpdateTimerOutput, error) { + req, out := c.UpdateTimerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type TopParamForUpdateTimerInput struct { + _ struct{} `type:"structure" json:",omitempty"` + + AccountId *int64 `type:"int64" json:",omitempty"` + + DestService *string `type:"string" json:",omitempty"` + + IsInternal *string `type:"string" json:",omitempty"` + + Psm *string `type:"string" json:",omitempty"` + + RealIp *string `type:"string" json:",omitempty"` + + Region *string `type:"string" json:",omitempty"` + + RequestId *string `type:"string" json:",omitempty"` + + RoleId *int64 `type:"int64" json:",omitempty"` + + Site *string `type:"string" json:",omitempty"` + + SourceService *string `type:"string" json:",omitempty"` + + UserAgent *string `type:"string" json:",omitempty"` + + UserId *int64 `type:"int64" json:",omitempty"` +} + +// String returns the string representation +func (s TopParamForUpdateTimerInput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s TopParamForUpdateTimerInput) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *TopParamForUpdateTimerInput) SetAccountId(v int64) *TopParamForUpdateTimerInput { + s.AccountId = &v + return s +} + +// SetDestService sets the DestService field's value. +func (s *TopParamForUpdateTimerInput) SetDestService(v string) *TopParamForUpdateTimerInput { + s.DestService = &v + return s +} + +// SetIsInternal sets the IsInternal field's value. +func (s *TopParamForUpdateTimerInput) SetIsInternal(v string) *TopParamForUpdateTimerInput { + s.IsInternal = &v + return s +} + +// SetPsm sets the Psm field's value. +func (s *TopParamForUpdateTimerInput) SetPsm(v string) *TopParamForUpdateTimerInput { + s.Psm = &v + return s +} + +// SetRealIp sets the RealIp field's value. +func (s *TopParamForUpdateTimerInput) SetRealIp(v string) *TopParamForUpdateTimerInput { + s.RealIp = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *TopParamForUpdateTimerInput) SetRegion(v string) *TopParamForUpdateTimerInput { + s.Region = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *TopParamForUpdateTimerInput) SetRequestId(v string) *TopParamForUpdateTimerInput { + s.RequestId = &v + return s +} + +// SetRoleId sets the RoleId field's value. +func (s *TopParamForUpdateTimerInput) SetRoleId(v int64) *TopParamForUpdateTimerInput { + s.RoleId = &v + return s +} + +// SetSite sets the Site field's value. +func (s *TopParamForUpdateTimerInput) SetSite(v string) *TopParamForUpdateTimerInput { + s.Site = &v + return s +} + +// SetSourceService sets the SourceService field's value. +func (s *TopParamForUpdateTimerInput) SetSourceService(v string) *TopParamForUpdateTimerInput { + s.SourceService = &v + return s +} + +// SetUserAgent sets the UserAgent field's value. +func (s *TopParamForUpdateTimerInput) SetUserAgent(v string) *TopParamForUpdateTimerInput { + s.UserAgent = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *TopParamForUpdateTimerInput) SetUserId(v int64) *TopParamForUpdateTimerInput { + s.UserId = &v + return s +} + +type UpdateTimerInput struct { + _ struct{} `type:"structure" json:",omitempty"` + + Crontab *string `type:"string" json:",omitempty"` + + Description *string `type:"string" json:",omitempty"` + + EnableConcurrency *bool `type:"boolean" json:",omitempty"` + + Enabled *bool `type:"boolean" json:",omitempty"` + + // FunctionId is a required field + FunctionId *string `type:"string" json:",omitempty" required:"true"` + + // Id is a required field + Id *string `type:"string" json:",omitempty" required:"true"` + + Payload *string `type:"string" json:",omitempty"` + + Retries *int32 `type:"int32" json:",omitempty"` + + TopParam *TopParamForUpdateTimerInput `type:"structure" json:",omitempty"` +} + +// String returns the string representation +func (s UpdateTimerInput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTimerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTimerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTimerInput"} + if s.FunctionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionId")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCrontab sets the Crontab field's value. +func (s *UpdateTimerInput) SetCrontab(v string) *UpdateTimerInput { + s.Crontab = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateTimerInput) SetDescription(v string) *UpdateTimerInput { + s.Description = &v + return s +} + +// SetEnableConcurrency sets the EnableConcurrency field's value. +func (s *UpdateTimerInput) SetEnableConcurrency(v bool) *UpdateTimerInput { + s.EnableConcurrency = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *UpdateTimerInput) SetEnabled(v bool) *UpdateTimerInput { + s.Enabled = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *UpdateTimerInput) SetFunctionId(v string) *UpdateTimerInput { + s.FunctionId = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateTimerInput) SetId(v string) *UpdateTimerInput { + s.Id = &v + return s +} + +// SetPayload sets the Payload field's value. +func (s *UpdateTimerInput) SetPayload(v string) *UpdateTimerInput { + s.Payload = &v + return s +} + +// SetRetries sets the Retries field's value. +func (s *UpdateTimerInput) SetRetries(v int32) *UpdateTimerInput { + s.Retries = &v + return s +} + +// SetTopParam sets the TopParam field's value. +func (s *UpdateTimerInput) SetTopParam(v *TopParamForUpdateTimerInput) *UpdateTimerInput { + s.TopParam = v + return s +} + +type UpdateTimerOutput struct { + _ struct{} `type:"structure" json:",omitempty"` + + Metadata *response.ResponseMetadata + + CreationTime *string `type:"string" json:",omitempty"` + + Crontab *string `type:"string" json:",omitempty"` + + Description *string `type:"string" json:",omitempty"` + + EnableConcurrency *bool `type:"boolean" json:",omitempty"` + + Enabled *bool `type:"boolean" json:",omitempty"` + + FunctionId *string `type:"string" json:",omitempty"` + + Id *string `type:"string" json:",omitempty"` + + LastUpdateTime *string `type:"string" json:",omitempty"` + + Name *string `type:"string" json:",omitempty"` + + Payload *string `type:"string" json:",omitempty"` + + Retries *int32 `type:"int32" json:",omitempty"` +} + +// String returns the string representation +func (s UpdateTimerOutput) String() string { + return volcengineutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTimerOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *UpdateTimerOutput) SetCreationTime(v string) *UpdateTimerOutput { + s.CreationTime = &v + return s +} + +// SetCrontab sets the Crontab field's value. +func (s *UpdateTimerOutput) SetCrontab(v string) *UpdateTimerOutput { + s.Crontab = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateTimerOutput) SetDescription(v string) *UpdateTimerOutput { + s.Description = &v + return s +} + +// SetEnableConcurrency sets the EnableConcurrency field's value. +func (s *UpdateTimerOutput) SetEnableConcurrency(v bool) *UpdateTimerOutput { + s.EnableConcurrency = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *UpdateTimerOutput) SetEnabled(v bool) *UpdateTimerOutput { + s.Enabled = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *UpdateTimerOutput) SetFunctionId(v string) *UpdateTimerOutput { + s.FunctionId = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateTimerOutput) SetId(v string) *UpdateTimerOutput { + s.Id = &v + return s +} + +// SetLastUpdateTime sets the LastUpdateTime field's value. +func (s *UpdateTimerOutput) SetLastUpdateTime(v string) *UpdateTimerOutput { + s.LastUpdateTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateTimerOutput) SetName(v string) *UpdateTimerOutput { + s.Name = &v + return s +} + +// SetPayload sets the Payload field's value. +func (s *UpdateTimerOutput) SetPayload(v string) *UpdateTimerOutput { + s.Payload = &v + return s +} + +// SetRetries sets the Retries field's value. +func (s *UpdateTimerOutput) SetRetries(v int32) *UpdateTimerOutput { + s.Retries = &v + return s +} diff --git a/service/vefaas/interface_vefaas.go b/service/vefaas/interface_vefaas.go index 2d65403a..090a5993 100644 --- a/service/vefaas/interface_vefaas.go +++ b/service/vefaas/interface_vefaas.go @@ -46,6 +46,14 @@ type VEFAASAPI interface { CreateFunctionWithContext(volcengine.Context, *CreateFunctionInput, ...request.Option) (*CreateFunctionOutput, error) CreateFunctionRequest(*CreateFunctionInput) (*request.Request, *CreateFunctionOutput) + CreateTimerCommon(*map[string]interface{}) (*map[string]interface{}, error) + CreateTimerCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) + CreateTimerCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) + + CreateTimer(*CreateTimerInput) (*CreateTimerOutput, error) + CreateTimerWithContext(volcengine.Context, *CreateTimerInput, ...request.Option) (*CreateTimerOutput, error) + CreateTimerRequest(*CreateTimerInput) (*request.Request, *CreateTimerOutput) + DeleteFunctionCommon(*map[string]interface{}) (*map[string]interface{}, error) DeleteFunctionCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DeleteFunctionCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) @@ -54,6 +62,14 @@ type VEFAASAPI interface { DeleteFunctionWithContext(volcengine.Context, *DeleteFunctionInput, ...request.Option) (*DeleteFunctionOutput, error) DeleteFunctionRequest(*DeleteFunctionInput) (*request.Request, *DeleteFunctionOutput) + DeleteTimerCommon(*map[string]interface{}) (*map[string]interface{}, error) + DeleteTimerCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) + DeleteTimerCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) + + DeleteTimer(*DeleteTimerInput) (*DeleteTimerOutput, error) + DeleteTimerWithContext(volcengine.Context, *DeleteTimerInput, ...request.Option) (*DeleteTimerOutput, error) + DeleteTimerRequest(*DeleteTimerInput) (*request.Request, *DeleteTimerOutput) + GetFunctionCommon(*map[string]interface{}) (*map[string]interface{}, error) GetFunctionCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) GetFunctionCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) @@ -94,6 +110,14 @@ type VEFAASAPI interface { GetRocketMQTriggerWithContext(volcengine.Context, *GetRocketMQTriggerInput, ...request.Option) (*GetRocketMQTriggerOutput, error) GetRocketMQTriggerRequest(*GetRocketMQTriggerInput) (*request.Request, *GetRocketMQTriggerOutput) + GetTimerCommon(*map[string]interface{}) (*map[string]interface{}, error) + GetTimerCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) + GetTimerCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) + + GetTimer(*GetTimerInput) (*GetTimerOutput, error) + GetTimerWithContext(volcengine.Context, *GetTimerInput, ...request.Option) (*GetTimerOutput, error) + GetTimerRequest(*GetTimerInput) (*request.Request, *GetTimerOutput) + ListFunctionInstancesCommon(*map[string]interface{}) (*map[string]interface{}, error) ListFunctionInstancesCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ListFunctionInstancesCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) @@ -157,6 +181,14 @@ type VEFAASAPI interface { UpdateRelease(*UpdateReleaseInput) (*UpdateReleaseOutput, error) UpdateReleaseWithContext(volcengine.Context, *UpdateReleaseInput, ...request.Option) (*UpdateReleaseOutput, error) UpdateReleaseRequest(*UpdateReleaseInput) (*request.Request, *UpdateReleaseOutput) + + UpdateTimerCommon(*map[string]interface{}) (*map[string]interface{}, error) + UpdateTimerCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) + UpdateTimerCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) + + UpdateTimer(*UpdateTimerInput) (*UpdateTimerOutput, error) + UpdateTimerWithContext(volcengine.Context, *UpdateTimerInput, ...request.Option) (*UpdateTimerOutput, error) + UpdateTimerRequest(*UpdateTimerInput) (*request.Request, *UpdateTimerOutput) } var _ VEFAASAPI = (*VEFAAS)(nil)