func (o *PostCompareParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
	if err := r.SetTimeout(o.timeout); err != nil {
		return err
	}
	var res []error
	if o.Request != nil {
		if err := r.SetBodyParam(o.Request); 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/strfmt"
	"github.com/trustbloc/edge-service/pkg/client/csh/models"
)
func NewPostCompareParams() *PostCompareParams {
	return &PostCompareParams{
		timeout: cr.DefaultTimeout,
	}
}
func NewPostCompareParamsWithTimeout(timeout time.Duration) *PostCompareParams {
	return &PostCompareParams{
		timeout: timeout,
	}
}
func NewPostCompareParamsWithContext(ctx context.Context) *PostCompareParams {
	return &PostCompareParams{
		Context: ctx,
	}
}
func NewPostCompareParamsWithHTTPClient(client *http.Client) *PostCompareParams {
	return &PostCompareParams{
		HTTPClient: client,
	}
}
type PostCompareParams struct {
	Request *models.ComparisonRequest
	timeout    time.Duration
	Context    context.Context
	HTTPClient *http.Client
}
func (o *PostCompareParams) WithDefaults() *PostCompareParams {
	o.SetDefaults()
	return o
}
func (o *PostCompareParams) SetDefaults() {
}
func (o *PostCompareParams) WithTimeout(timeout time.Duration) *PostCompareParams {
	o.SetTimeout(timeout)
	return o
}
func (o *PostCompareParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}
func (o *PostCompareParams) WithContext(ctx context.Context) *PostCompareParams {
	o.SetContext(ctx)
	return o
}
func (o *PostCompareParams) SetContext(ctx context.Context) {
	o.Context = ctx
}
func (o *PostCompareParams) WithHTTPClient(client *http.Client) *PostCompareParams {
	o.SetHTTPClient(client)
	return o
}
func (o *PostCompareParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}
func (o *PostCompareParams) WithRequest(request *models.ComparisonRequest) *PostCompareParams {
	o.SetRequest(request)
	return o
}
func (o *PostCompareParams) SetRequest(request *models.ComparisonRequest) {
	o.Request = request
}