//Code is generated by ucloud code generator, don't modify it by hand, it will cause undefined behaviors.
//go:generate ucloud-gen-go-api UHost DeleteIsolationGroup

package uhost

import (
	"github.com/ucloud/ucloud-sdk-go/ucloud/request"
	"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)

// DeleteIsolationGroupRequest is request schema for DeleteIsolationGroup action
type DeleteIsolationGroupRequest struct {
	request.CommonBase

	// [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html)
	// Region *string `required:"true"`

	// [公共参数] 项目id
	// ProjectId *string `required:"false"`

	// 硬件隔离组id
	GroupId *string `required:"true"`
}

// DeleteIsolationGroupResponse is response schema for DeleteIsolationGroup action
type DeleteIsolationGroupResponse struct {
	response.CommonBase

	// 硬件隔离组id
	GroupId string
}

// NewDeleteIsolationGroupRequest will create request of DeleteIsolationGroup action.
func (c *UHostClient) NewDeleteIsolationGroupRequest() *DeleteIsolationGroupRequest {
	req := &DeleteIsolationGroupRequest{}

	// setup request with client config
	c.Client.SetupRequest(req)

	// setup retryable with default retry policy (retry for non-create action and common error)
	req.SetRetryable(true)
	return req
}

// DeleteIsolationGroup - 删除硬件隔离组。
func (c *UHostClient) DeleteIsolationGroup(req *DeleteIsolationGroupRequest) (*DeleteIsolationGroupResponse, error) {
	var err error
	var res DeleteIsolationGroupResponse

	err = c.Client.InvokeAction("DeleteIsolationGroup", req, &res)
	if err != nil {
		return &res, err
	}

	return &res, nil
}
