This commit is contained in:
2026-08-21 18:12:55 +04:00
parent f34fa6055c
commit 3c5157281e
1285 changed files with 4016 additions and 3302 deletions

View File

@@ -0,0 +1,37 @@
package qospolicy
import (
"context"
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators"
)
type DeleteRequest struct {
// QoS policy ID
// Required: true
QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"`
}
func (qp QoSPolicy) Delete(ctx context.Context, req DeleteRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudbroker/network_qos_policy/delete"
res, err := qp.client.DecortApiCallCtype(ctx, http.MethodDelete, url, constants.MIMEJSON, req)
if err != nil {
return false, err
}
result, err := strconv.ParseBool(string(res))
if err != nil {
return false, err
}
return result, nil
}