func (o *TriggerScanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
	if err := r.SetTimeout(o.timeout); err != nil {
		return err
	}
	var res []error
	qrScanType := o.ScanType
	qScanType := qrScanType
	if qScanType != "" {
		if err := r.SetQueryParam("scan_type", qScanType); err != nil {
			return err
		}
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
WriteToRequest writes these params to a swagger request
package kubernetes_protection
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"
)
func NewTriggerScanParams() *TriggerScanParams {
	return &TriggerScanParams{
		timeout: cr.DefaultTimeout,
	}
}
func NewTriggerScanParamsWithTimeout(timeout time.Duration) *TriggerScanParams {
	return &TriggerScanParams{
		timeout: timeout,
	}
}
func NewTriggerScanParamsWithContext(ctx context.Context) *TriggerScanParams {
	return &TriggerScanParams{
		Context: ctx,
	}
}
func NewTriggerScanParamsWithHTTPClient(client *http.Client) *TriggerScanParams {
	return &TriggerScanParams{
		HTTPClient: client,
	}
}
type TriggerScanParams struct {
	ScanType string
	timeout    time.Duration
	Context    context.Context
	HTTPClient *http.Client
}
func (o *TriggerScanParams) WithDefaults() *TriggerScanParams {
	o.SetDefaults()
	return o
}
func (o *TriggerScanParams) SetDefaults() {
	var (
		scanTypeDefault = string("dry-run")
	)
	val := TriggerScanParams{
		ScanType: scanTypeDefault,
	}
	val.timeout = o.timeout
	val.Context = o.Context
	val.HTTPClient = o.HTTPClient
	*o = val
}
func (o *TriggerScanParams) WithTimeout(timeout time.Duration) *TriggerScanParams {
	o.SetTimeout(timeout)
	return o
}
func (o *TriggerScanParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}
func (o *TriggerScanParams) WithContext(ctx context.Context) *TriggerScanParams {
	o.SetContext(ctx)
	return o
}
func (o *TriggerScanParams) SetContext(ctx context.Context) {
	o.Context = ctx
}
func (o *TriggerScanParams) WithHTTPClient(client *http.Client) *TriggerScanParams {
	o.SetHTTPClient(client)
	return o
}
func (o *TriggerScanParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}
func (o *TriggerScanParams) WithScanType(scanType string) *TriggerScanParams {
	o.SetScanType(scanType)
	return o
}
func (o *TriggerScanParams) SetScanType(scanType string) {
	o.ScanType = scanType
}