func (o *GetPublicGetorderbookParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
	if err := r.SetTimeout(o.timeout); err != nil {
		return err
	}
	var res []error
	if o.Depth != nil {
		var qrDepth float64
		if o.Depth != nil {
			qrDepth = *o.Depth
		}
		qDepth := swag.FormatFloat64(qrDepth)
		if qDepth != "" {
			if err := r.SetQueryParam("depth", qDepth); err != nil {
				return err
			}
		}
	}
	qrInstrument := o.Instrument
	qInstrument := qrInstrument
	if qInstrument != "" {
		if err := r.SetQueryParam("instrument", qInstrument); err != nil {
			return err
		}
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
WriteToRequest writes these params to a swagger request
package operations
import (
	"context"
	"net/http"
	"time"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	cr "github.com/go-openapi/runtime/client"
	"github.com/go-openapi/swag"
	strfmt "github.com/go-openapi/strfmt"
)
func NewGetPublicGetorderbookParams() *GetPublicGetorderbookParams {
	var ()
	return &GetPublicGetorderbookParams{
		timeout: cr.DefaultTimeout,
	}
}
func NewGetPublicGetorderbookParamsWithTimeout(timeout time.Duration) *GetPublicGetorderbookParams {
	var ()
	return &GetPublicGetorderbookParams{
		timeout: timeout,
	}
}
func NewGetPublicGetorderbookParamsWithContext(ctx context.Context) *GetPublicGetorderbookParams {
	var ()
	return &GetPublicGetorderbookParams{
		Context: ctx,
	}
}
func NewGetPublicGetorderbookParamsWithHTTPClient(client *http.Client) *GetPublicGetorderbookParams {
	var ()
	return &GetPublicGetorderbookParams{
		HTTPClient: client,
	}
}
type GetPublicGetorderbookParams struct {
	Depth *float64
	Instrument string
	timeout    time.Duration
	Context    context.Context
	HTTPClient *http.Client
}
func (o *GetPublicGetorderbookParams) WithTimeout(timeout time.Duration) *GetPublicGetorderbookParams {
	o.SetTimeout(timeout)
	return o
}
func (o *GetPublicGetorderbookParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}
func (o *GetPublicGetorderbookParams) WithContext(ctx context.Context) *GetPublicGetorderbookParams {
	o.SetContext(ctx)
	return o
}
func (o *GetPublicGetorderbookParams) SetContext(ctx context.Context) {
	o.Context = ctx
}
func (o *GetPublicGetorderbookParams) WithHTTPClient(client *http.Client) *GetPublicGetorderbookParams {
	o.SetHTTPClient(client)
	return o
}
func (o *GetPublicGetorderbookParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}
func (o *GetPublicGetorderbookParams) WithDepth(depth *float64) *GetPublicGetorderbookParams {
	o.SetDepth(depth)
	return o
}
func (o *GetPublicGetorderbookParams) SetDepth(depth *float64) {
	o.Depth = depth
}
func (o *GetPublicGetorderbookParams) WithInstrument(instrument string) *GetPublicGetorderbookParams {
	o.SetInstrument(instrument)
	return o
}
func (o *GetPublicGetorderbookParams) SetInstrument(instrument string) {
	o.Instrument = instrument
}