package message

import "errors"

type DeleteNetworkReq struct {
	TenantID  string `json:"tenant_id"`
	ProjectID string `json:"project_id"`
	VPCID     string `json:"vpc_id"`
	// keepVPC is a flag to indicate whether to keep the VPC after deleting the network. If it is true, the VPC will not be deleted.
	KeepVPC bool `json:"keep_vpc"`
}

func (req *DeleteNetworkReq) Validate() error {
	if req == nil {
		return errors.New("request is nil")
	}

	if req.ProjectID == "" && req.VPCID == "" {
		return errors.New("project_id or vpc_id is required")
	}
	return nil
}
