// Code is generated by ucloud-model, DO NOT EDIT IT.

package ufile

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

// DeleteUFileTokenRequest is request schema for DeleteUFileToken action
type DeleteUFileTokenRequest struct {
	request.CommonBase

	// [公共参数] 项目ID。不填写为默认项目，子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html)
	// ProjectId *string `required:"true"`

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

	// 令牌ID
	TokenId *string `required:"true"`
}

// DeleteUFileTokenResponse is response schema for DeleteUFileToken action
type DeleteUFileTokenResponse struct {
	response.CommonBase
}

// NewDeleteUFileTokenRequest will create request of DeleteUFileToken action.
func (c *UFileClient) NewDeleteUFileTokenRequest() *DeleteUFileTokenRequest {
	req := &DeleteUFileTokenRequest{}

	// 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
}

// DeleteUFileToken - 删除令牌
func (c *UFileClient) DeleteUFileToken(req *DeleteUFileTokenRequest) (*DeleteUFileTokenResponse, error) {
	var err error
	var res DeleteUFileTokenResponse

	reqCopier := *req

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

	return &res, nil
}
