func (v *CnameRecordType) Validate() error {
	if v.Type != nil {
		typeValidValues := []string{"normal", "website"}
		typeParameterValue := fmt.Sprint(*v.Type)
		typeIsValid := false
		for _, value := range typeValidValues {
			if value == typeParameterValue {
				typeIsValid = true
			}
		}
		if !typeIsValid {
			return errors.ParameterValueNotAllowedError{
				ParameterName:  "Type",
				ParameterValue: typeParameterValue,
				AllowedValues:  typeValidValues,
			}
		}
	}
	return nil
}
Validate validates the CnameRecord.
package service
import (
	"fmt"
	"time"
	"github.com/qingstor/qingstor-sdk-go/v4/request/errors"
)
type Properties struct {
	BucketName *string `json:"bucket-name" name:"bucket-name"`  
	ObjectKey *string `json:"object-key" name:"object-key"`  
	Zone *string `json:"zone" name:"zone"`
}
type AbortIncompleteMultipartUploadType struct {
	DaysAfterInitiation *int `json:"days_after_initiation" name:"days_after_initiation"`  
}
func (v *AbortIncompleteMultipartUploadType) Validate() error {
	if v.DaysAfterInitiation == nil {
		return errors.ParameterRequiredError{
			ParameterName: "DaysAfterInitiation",
			ParentName:    "AbortIncompleteMultipartUpload",
		}
	}
	return nil
}
type ACLType struct {
	Grantee *GranteeType `json:"grantee" name:"grantee"`  
	Permission *string `json:"permission" name:"permission"`  
}
func (v *ACLType) Validate() error {
	if v.Grantee != nil {
		if err := v.Grantee.Validate(); err != nil {
			return err
		}
	}
	if v.Grantee == nil {
		return errors.ParameterRequiredError{
			ParameterName: "Grantee",
			ParentName:    "ACL",
		}
	}
	if v.Permission == nil {
		return errors.ParameterRequiredError{
			ParameterName: "Permission",
			ParentName:    "ACL",
		}
	}
	if v.Permission != nil {
		permissionValidValues := []string{"READ", "WRITE", "FULL_CONTROL"}
		permissionParameterValue := fmt.Sprint(*v.Permission)
		permissionIsValid := false
		for _, value := range permissionValidValues {
			if value == permissionParameterValue {
				permissionIsValid = true
			}
		}
		if !permissionIsValid {
			return errors.ParameterValueNotAllowedError{
				ParameterName:  "Permission",
				ParameterValue: permissionParameterValue,
				AllowedValues:  permissionValidValues,
			}
		}
	}
	return nil
}
type BucketType struct {
	Created *time.Time `json:"created,omitempty" name:"created" format:"ISO 8601"`
	Location *string `json:"location,omitempty" name:"location"`
	Name *string `json:"name,omitempty" name:"name"`
	URL *string `json:"url,omitempty" name:"url"`
}
func (v *BucketType) Validate() error {
	return nil
}
type CloudfuncArgsType struct {
	Action     *string `json:"action" name:"action"`  
	KeyPrefix  *string `json:"key_prefix,omitempty" name:"key_prefix" default:"gen"`
	KeySeprate *string `json:"key_seprate,omitempty" name:"key_seprate" default:"_"`
	SaveBucket *string `json:"save_bucket,omitempty" name:"save_bucket"`
}
func (v *CloudfuncArgsType) Validate() error {
	if v.Action == nil {
		return errors.ParameterRequiredError{
			ParameterName: "Action",
			ParentName:    "CloudfuncArgs",
		}
	}
	return nil
}
type CnameType struct {
	Domain *string `json:"domain" name:"domain"`  
	Type *string `json:"type,omitempty" name:"type"`
}
func (v *CnameType) Validate() error {
	if v.Domain == nil {
		return errors.ParameterRequiredError{
			ParameterName: "Domain",
			ParentName:    "Cname",
		}
	}
	if v.Type != nil {
		typeValidValues := []string{"normal", "website"}
		typeParameterValue := fmt.Sprint(*v.Type)
		typeIsValid := false
		for _, value := range typeValidValues {
			if value == typeParameterValue {
				typeIsValid = true
			}
		}
		if !typeIsValid {
			return errors.ParameterValueNotAllowedError{
				ParameterName:  "Type",
				ParameterValue: typeParameterValue,
				AllowedValues:  typeValidValues,
			}
		}
	}
	return nil
}
type CnameRecordType struct {
	Created *string `json:"created,omitempty" name:"created"`
	Domain *string `json:"domain,omitempty" name:"domain"`
	Type *string `json:"type,omitempty" name:"type"`
}