update share endpoint tweaks (#834)

This commit is contained in:
Michael Quigley
2025-02-04 10:33:39 -05:00
parent 0a8c5f2054
commit fc4a32b301
12 changed files with 356 additions and 94 deletions

View File

@ -14,8 +14,6 @@ import (
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/openziti/zrok/rest_model_zrok"
)
// NewUpdateShareParams creates a new UpdateShareParams object,
@ -64,7 +62,7 @@ UpdateShareParams contains all the parameters to send to the API endpoint
type UpdateShareParams struct {
// Body.
Body *rest_model_zrok.UpdateShareRequest
Body UpdateShareBody
timeout time.Duration
Context context.Context
@ -120,13 +118,13 @@ func (o *UpdateShareParams) SetHTTPClient(client *http.Client) {
}
// WithBody adds the body to the update share params
func (o *UpdateShareParams) WithBody(body *rest_model_zrok.UpdateShareRequest) *UpdateShareParams {
func (o *UpdateShareParams) WithBody(body UpdateShareBody) *UpdateShareParams {
o.SetBody(body)
return o
}
// SetBody adds the body to the update share params
func (o *UpdateShareParams) SetBody(body *rest_model_zrok.UpdateShareRequest) {
func (o *UpdateShareParams) SetBody(body UpdateShareBody) {
o.Body = body
}
@ -137,10 +135,8 @@ func (o *UpdateShareParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R
return err
}
var res []error
if o.Body != nil {
if err := r.SetBodyParam(o.Body); err != nil {
return err
}
if err := r.SetBodyParam(o.Body); err != nil {
return err
}
if len(res) > 0 {