package compute import ( "context" "net/http" "strconv" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v12/internal/validators" ) // AbortSharedSnapshotMergeRequest struct to abort shared snapshots merge type AbortSharedSnapshotMergeRequest struct { // ID of the compute // Required: true ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` // Label of the snapshot // Required: true Label string `url:"label" json:"label" validate:"required"` } // AbortSharedSnapshotMerge shared snapshots merge abort func (c Compute) AbortSharedSnapshotMerge(ctx context.Context, req AbortSharedSnapshotMergeRequest) (bool, error) { err := validators.ValidateRequest(req) if err != nil { return false, validators.ValidationErrors(validators.GetErrors(err)) } url := "/cloudapi/compute/abort_shared_snapshot_merge" res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) if err != nil { return false, err } result, err := strconv.ParseBool(string(res)) if err != nil { return false, err } return result, nil }