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

package ecs

import (
	"encoding/json"

	"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 opDescribeImagesCommon = "DescribeImages"

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

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

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

	return
}

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

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

const opDescribeImages = "DescribeImages"

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

	if input == nil {
		input = &DescribeImagesInput{}
	}

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

	return
}

// DescribeImages API operation for ECS.
//
// 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 ECS's
// API operation DescribeImages for usage and error information.
func (c *ECS) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
	req, out := c.DescribeImagesRequest(input)
	return out, req.Send()
}

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

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

	ImageIds []*string `type:"list"`

	ImageStatus *string `type:"string"`

	InstanceTypeId *string `type:"string"`

	IsSupportCloudInit *bool `type:"boolean"`

	MaxResults *int32 `type:"int32"`

	NextToken *string `type:"string"`

	OsType *string `type:"string"`

	ProjectName *string `type:"string"`

	Status []*string `type:"list"`

	Visibility *string `type:"string"`
}

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

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

// SetImageIds sets the ImageIds field's value.
func (s *DescribeImagesInput) SetImageIds(v []*string) *DescribeImagesInput {
	s.ImageIds = v
	return s
}

// SetImageStatus sets the ImageStatus field's value.
func (s *DescribeImagesInput) SetImageStatus(v string) *DescribeImagesInput {
	s.ImageStatus = &v
	return s
}

// SetInstanceTypeId sets the InstanceTypeId field's value.
func (s *DescribeImagesInput) SetInstanceTypeId(v string) *DescribeImagesInput {
	s.InstanceTypeId = &v
	return s
}

// SetIsSupportCloudInit sets the IsSupportCloudInit field's value.
func (s *DescribeImagesInput) SetIsSupportCloudInit(v bool) *DescribeImagesInput {
	s.IsSupportCloudInit = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *DescribeImagesInput) SetMaxResults(v int32) *DescribeImagesInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *DescribeImagesInput) SetNextToken(v string) *DescribeImagesInput {
	s.NextToken = &v
	return s
}

// SetOsType sets the OsType field's value.
func (s *DescribeImagesInput) SetOsType(v string) *DescribeImagesInput {
	s.OsType = &v
	return s
}

// SetProjectName sets the ProjectName field's value.
func (s *DescribeImagesInput) SetProjectName(v string) *DescribeImagesInput {
	s.ProjectName = &v
	return s
}

// SetStatus sets the Status field's value.
func (s *DescribeImagesInput) SetStatus(v []*string) *DescribeImagesInput {
	s.Status = v
	return s
}

// SetVisibility sets the Visibility field's value.
func (s *DescribeImagesInput) SetVisibility(v string) *DescribeImagesInput {
	s.Visibility = &v
	return s
}

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

	Metadata *response.ResponseMetadata

	Images []*ImageForDescribeImagesOutput `type:"list"`

	NextToken *string `type:"string"`

	TotalCount *int32 `type:"int32"`
}

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

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

// SetImages sets the Images field's value.
func (s *DescribeImagesOutput) SetImages(v []*ImageForDescribeImagesOutput) *DescribeImagesOutput {
	s.Images = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *DescribeImagesOutput) SetNextToken(v string) *DescribeImagesOutput {
	s.NextToken = &v
	return s
}

// SetTotalCount sets the TotalCount field's value.
func (s *DescribeImagesOutput) SetTotalCount(v int32) *DescribeImagesOutput {
	s.TotalCount = &v
	return s
}

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

	Architecture *string `type:"string"`

	CreatedAt *string `type:"string"`

	Description *string `type:"string"`

	ImageId *string `type:"string"`

	ImageName *string `type:"string"`

	ImageOwnerId *string `type:"string"`

	IsSupportCloudInit *bool `type:"boolean"`

	OsName *string `type:"string"`

	OsType *string `type:"string"`

	Platform *string `type:"string"`

	PlatformVersion *string `type:"string"`

	ProjectName *string `type:"string"`

	ShareStatus *string `type:"string"`

	Size *int32 `type:"int32"`

	Status *string `type:"string"`

	UpdatedAt *string `type:"string"`

	VirtualSize *json.Number `type:"json_number"`

	Visibility *string `type:"string"`
}

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

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

// SetArchitecture sets the Architecture field's value.
func (s *ImageForDescribeImagesOutput) SetArchitecture(v string) *ImageForDescribeImagesOutput {
	s.Architecture = &v
	return s
}

// SetCreatedAt sets the CreatedAt field's value.
func (s *ImageForDescribeImagesOutput) SetCreatedAt(v string) *ImageForDescribeImagesOutput {
	s.CreatedAt = &v
	return s
}

// SetDescription sets the Description field's value.
func (s *ImageForDescribeImagesOutput) SetDescription(v string) *ImageForDescribeImagesOutput {
	s.Description = &v
	return s
}

// SetImageId sets the ImageId field's value.
func (s *ImageForDescribeImagesOutput) SetImageId(v string) *ImageForDescribeImagesOutput {
	s.ImageId = &v
	return s
}

// SetImageName sets the ImageName field's value.
func (s *ImageForDescribeImagesOutput) SetImageName(v string) *ImageForDescribeImagesOutput {
	s.ImageName = &v
	return s
}

// SetImageOwnerId sets the ImageOwnerId field's value.
func (s *ImageForDescribeImagesOutput) SetImageOwnerId(v string) *ImageForDescribeImagesOutput {
	s.ImageOwnerId = &v
	return s
}

// SetIsSupportCloudInit sets the IsSupportCloudInit field's value.
func (s *ImageForDescribeImagesOutput) SetIsSupportCloudInit(v bool) *ImageForDescribeImagesOutput {
	s.IsSupportCloudInit = &v
	return s
}

// SetOsName sets the OsName field's value.
func (s *ImageForDescribeImagesOutput) SetOsName(v string) *ImageForDescribeImagesOutput {
	s.OsName = &v
	return s
}

// SetOsType sets the OsType field's value.
func (s *ImageForDescribeImagesOutput) SetOsType(v string) *ImageForDescribeImagesOutput {
	s.OsType = &v
	return s
}

// SetPlatform sets the Platform field's value.
func (s *ImageForDescribeImagesOutput) SetPlatform(v string) *ImageForDescribeImagesOutput {
	s.Platform = &v
	return s
}

// SetPlatformVersion sets the PlatformVersion field's value.
func (s *ImageForDescribeImagesOutput) SetPlatformVersion(v string) *ImageForDescribeImagesOutput {
	s.PlatformVersion = &v
	return s
}

// SetProjectName sets the ProjectName field's value.
func (s *ImageForDescribeImagesOutput) SetProjectName(v string) *ImageForDescribeImagesOutput {
	s.ProjectName = &v
	return s
}

// SetShareStatus sets the ShareStatus field's value.
func (s *ImageForDescribeImagesOutput) SetShareStatus(v string) *ImageForDescribeImagesOutput {
	s.ShareStatus = &v
	return s
}

// SetSize sets the Size field's value.
func (s *ImageForDescribeImagesOutput) SetSize(v int32) *ImageForDescribeImagesOutput {
	s.Size = &v
	return s
}

// SetStatus sets the Status field's value.
func (s *ImageForDescribeImagesOutput) SetStatus(v string) *ImageForDescribeImagesOutput {
	s.Status = &v
	return s
}

// SetUpdatedAt sets the UpdatedAt field's value.
func (s *ImageForDescribeImagesOutput) SetUpdatedAt(v string) *ImageForDescribeImagesOutput {
	s.UpdatedAt = &v
	return s
}

// SetVirtualSize sets the VirtualSize field's value.
func (s *ImageForDescribeImagesOutput) SetVirtualSize(v json.Number) *ImageForDescribeImagesOutput {
	s.VirtualSize = &v
	return s
}

// SetVisibility sets the Visibility field's value.
func (s *ImageForDescribeImagesOutput) SetVisibility(v string) *ImageForDescribeImagesOutput {
	s.Visibility = &v
	return s
}
