// Code generated by volcengine with private/model/cli/gen-api/main.go. DO NOT EDIT.

package autoscaling

import (
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/volcengine/volcengine-go-sdk/volcengine"
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/volcengine/volcengine-go-sdk/volcengine/request"
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/volcengine/volcengine-go-sdk/volcengine/response"
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/volcengine/volcengine-go-sdk/volcengine/volcengineutil"
)

const opModifyLifecycleHookCommon = "ModifyLifecycleHook"

// ModifyLifecycleHookCommonRequest generates a "volcengine/request.Request" representing the
// client's request for the ModifyLifecycleHookCommon operation. The "output" return
// value will be populated with the ModifyLifecycleHookCommon request's response once the request completes
// successfully.
//
// Use "Send" method on the returned ModifyLifecycleHookCommon Request to send the API call to the service.
// the "output" return value is not valid until after ModifyLifecycleHookCommon Send returns without error.
//
// See ModifyLifecycleHookCommon for more information on using the ModifyLifecycleHookCommon
// API call, and error handling.
//
//	// Example sending a request using the ModifyLifecycleHookCommonRequest method.
//	req, resp := client.ModifyLifecycleHookCommonRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
func (c *AUTOSCALING) ModifyLifecycleHookCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{}) {
	op := &request.Operation{
		Name:       opModifyLifecycleHookCommon,
		HTTPMethod: "GET",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &map[string]interface{}{}
	}

	output = &map[string]interface{}{}
	req = c.newRequest(op, input, output)

	return
}

// ModifyLifecycleHookCommon API operation for AUTO_SCALING.
//
// 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 AUTO_SCALING's
// API operation ModifyLifecycleHookCommon for usage and error information.
func (c *AUTOSCALING) ModifyLifecycleHookCommon(input *map[string]interface{}) (*map[string]interface{}, error) {
	req, out := c.ModifyLifecycleHookCommonRequest(input)
	return out, req.Send()
}

// ModifyLifecycleHookCommonWithContext is the same as ModifyLifecycleHookCommon with the addition of
// the ability to pass a context and additional request options.
//
// See ModifyLifecycleHookCommon 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 *AUTOSCALING) ModifyLifecycleHookCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error) {
	req, out := c.ModifyLifecycleHookCommonRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opModifyLifecycleHook = "ModifyLifecycleHook"

// ModifyLifecycleHookRequest generates a "volcengine/request.Request" representing the
// client's request for the ModifyLifecycleHook operation. The "output" return
// value will be populated with the ModifyLifecycleHookCommon request's response once the request completes
// successfully.
//
// Use "Send" method on the returned ModifyLifecycleHookCommon Request to send the API call to the service.
// the "output" return value is not valid until after ModifyLifecycleHookCommon Send returns without error.
//
// See ModifyLifecycleHook for more information on using the ModifyLifecycleHook
// API call, and error handling.
//
//	// Example sending a request using the ModifyLifecycleHookRequest method.
//	req, resp := client.ModifyLifecycleHookRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
func (c *AUTOSCALING) ModifyLifecycleHookRequest(input *ModifyLifecycleHookInput) (req *request.Request, output *ModifyLifecycleHookOutput) {
	op := &request.Operation{
		Name:       opModifyLifecycleHook,
		HTTPMethod: "GET",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &ModifyLifecycleHookInput{}
	}

	output = &ModifyLifecycleHookOutput{}
	req = c.newRequest(op, input, output)

	return
}

// ModifyLifecycleHook API operation for AUTO_SCALING.
//
// 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 AUTO_SCALING's
// API operation ModifyLifecycleHook for usage and error information.
func (c *AUTOSCALING) ModifyLifecycleHook(input *ModifyLifecycleHookInput) (*ModifyLifecycleHookOutput, error) {
	req, out := c.ModifyLifecycleHookRequest(input)
	return out, req.Send()
}

// ModifyLifecycleHookWithContext is the same as ModifyLifecycleHook with the addition of
// the ability to pass a context and additional request options.
//
// See ModifyLifecycleHook 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 *AUTOSCALING) ModifyLifecycleHookWithContext(ctx volcengine.Context, input *ModifyLifecycleHookInput, opts ...request.Option) (*ModifyLifecycleHookOutput, error) {
	req, out := c.ModifyLifecycleHookRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

type ModifyLifecycleHookInput struct {
	_ struct{} `type:"structure"`

	LifecycleHookId *string `type:"string"`

	LifecycleHookPolicy *string `type:"string"`

	LifecycleHookTimeout *int32 `type:"int32"`

	LifecycleHookType *string `type:"string"`
}

// String returns the string representation
func (s ModifyLifecycleHookInput) String() string {
	return volcengineutil.Prettify(s)
}

// GoString returns the string representation
func (s ModifyLifecycleHookInput) GoString() string {
	return s.String()
}

// SetLifecycleHookId sets the LifecycleHookId field's value.
func (s *ModifyLifecycleHookInput) SetLifecycleHookId(v string) *ModifyLifecycleHookInput {
	s.LifecycleHookId = &v
	return s
}

// SetLifecycleHookPolicy sets the LifecycleHookPolicy field's value.
func (s *ModifyLifecycleHookInput) SetLifecycleHookPolicy(v string) *ModifyLifecycleHookInput {
	s.LifecycleHookPolicy = &v
	return s
}

// SetLifecycleHookTimeout sets the LifecycleHookTimeout field's value.
func (s *ModifyLifecycleHookInput) SetLifecycleHookTimeout(v int32) *ModifyLifecycleHookInput {
	s.LifecycleHookTimeout = &v
	return s
}

// SetLifecycleHookType sets the LifecycleHookType field's value.
func (s *ModifyLifecycleHookInput) SetLifecycleHookType(v string) *ModifyLifecycleHookInput {
	s.LifecycleHookType = &v
	return s
}

type ModifyLifecycleHookOutput struct {
	_ struct{} `type:"structure"`

	Metadata *response.ResponseMetadata

	LifecycleHookId *string `type:"string"`
}

// String returns the string representation
func (s ModifyLifecycleHookOutput) String() string {
	return volcengineutil.Prettify(s)
}

// GoString returns the string representation
func (s ModifyLifecycleHookOutput) GoString() string {
	return s.String()
}

// SetLifecycleHookId sets the LifecycleHookId field's value.
func (s *ModifyLifecycleHookOutput) SetLifecycleHookId(v string) *ModifyLifecycleHookOutput {
	s.LifecycleHookId = &v
	return s
}
