func (o *UpdateCurrentUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
	if err := r.SetTimeout(o.timeout); err != nil {
		return err
	}
	var res []error
	if o.Body != nil {
		if err := r.SetBodyParam(o.Body); err != nil {
			return err
		}
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
WriteToRequest writes these params to a swagger request
package user
import (
	"context"
	"net/http"
	"time"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	cr "github.com/go-openapi/runtime/client"
	strfmt "github.com/go-openapi/strfmt"
	models "github.com/gotify/go-api-client/v2/models"
)
func NewUpdateCurrentUserParams() *UpdateCurrentUserParams {
	var ()
	return &UpdateCurrentUserParams{
		timeout: cr.DefaultTimeout,
	}
}
func NewUpdateCurrentUserParamsWithTimeout(timeout time.Duration) *UpdateCurrentUserParams {
	var ()
	return &UpdateCurrentUserParams{
		timeout: timeout,
	}
}
func NewUpdateCurrentUserParamsWithContext(ctx context.Context) *UpdateCurrentUserParams {
	var ()
	return &UpdateCurrentUserParams{
		Context: ctx,
	}
}
func NewUpdateCurrentUserParamsWithHTTPClient(client *http.Client) *UpdateCurrentUserParams {
	var ()
	return &UpdateCurrentUserParams{
		HTTPClient: client,
	}
}
type UpdateCurrentUserParams struct {
	Body *models.UserExternalPass
	timeout    time.Duration
	Context    context.Context
	HTTPClient *http.Client
}
func (o *UpdateCurrentUserParams) WithTimeout(timeout time.Duration) *UpdateCurrentUserParams {
	o.SetTimeout(timeout)
	return o
}
func (o *UpdateCurrentUserParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}
func (o *UpdateCurrentUserParams) WithContext(ctx context.Context) *UpdateCurrentUserParams {
	o.SetContext(ctx)
	return o
}
func (o *UpdateCurrentUserParams) SetContext(ctx context.Context) {
	o.Context = ctx
}
func (o *UpdateCurrentUserParams) WithHTTPClient(client *http.Client) *UpdateCurrentUserParams {
	o.SetHTTPClient(client)
	return o
}
func (o *UpdateCurrentUserParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}
func (o *UpdateCurrentUserParams) WithBody(body *models.UserExternalPass) *UpdateCurrentUserParams {
	o.SetBody(body)
	return o
}
func (o *UpdateCurrentUserParams) SetBody(body *models.UserExternalPass) {
	o.Body = body
}