158 lines
4.5 KiB
Go
158 lines
4.5 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
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/go-openapi/swag"
|
|
)
|
|
|
|
// NewGetCarupdateslogParams creates a new GetCarupdateslogParams object,
|
|
// with the default timeout for this client.
|
|
//
|
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
//
|
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
func NewGetCarupdateslogParams() *GetCarupdateslogParams {
|
|
return &GetCarupdateslogParams{
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewGetCarupdateslogParamsWithTimeout creates a new GetCarupdateslogParams object
|
|
// with the ability to set a timeout on a request.
|
|
func NewGetCarupdateslogParamsWithTimeout(timeout time.Duration) *GetCarupdateslogParams {
|
|
return &GetCarupdateslogParams{
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewGetCarupdateslogParamsWithContext creates a new GetCarupdateslogParams object
|
|
// with the ability to set a context for a request.
|
|
func NewGetCarupdateslogParamsWithContext(ctx context.Context) *GetCarupdateslogParams {
|
|
return &GetCarupdateslogParams{
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewGetCarupdateslogParamsWithHTTPClient creates a new GetCarupdateslogParams object
|
|
// with the ability to set a custom HTTPClient for a request.
|
|
func NewGetCarupdateslogParamsWithHTTPClient(client *http.Client) *GetCarupdateslogParams {
|
|
return &GetCarupdateslogParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*
|
|
GetCarupdateslogParams contains all the parameters to send to the API endpoint
|
|
|
|
for the get carupdateslog operation.
|
|
|
|
Typically these are written to a http.Request.
|
|
*/
|
|
type GetCarupdateslogParams struct {
|
|
|
|
/* Carupdateid.
|
|
|
|
car update id
|
|
*/
|
|
Carupdateid int64
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithDefaults hydrates default values in the get carupdateslog params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *GetCarupdateslogParams) WithDefaults() *GetCarupdateslogParams {
|
|
o.SetDefaults()
|
|
return o
|
|
}
|
|
|
|
// SetDefaults hydrates default values in the get carupdateslog params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *GetCarupdateslogParams) SetDefaults() {
|
|
// no default values defined for this parameter
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the get carupdateslog params
|
|
func (o *GetCarupdateslogParams) WithTimeout(timeout time.Duration) *GetCarupdateslogParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the get carupdateslog params
|
|
func (o *GetCarupdateslogParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the get carupdateslog params
|
|
func (o *GetCarupdateslogParams) WithContext(ctx context.Context) *GetCarupdateslogParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the get carupdateslog params
|
|
func (o *GetCarupdateslogParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the get carupdateslog params
|
|
func (o *GetCarupdateslogParams) WithHTTPClient(client *http.Client) *GetCarupdateslogParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the get carupdateslog params
|
|
func (o *GetCarupdateslogParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithCarupdateid adds the carupdateid to the get carupdateslog params
|
|
func (o *GetCarupdateslogParams) WithCarupdateid(carupdateid int64) *GetCarupdateslogParams {
|
|
o.SetCarupdateid(carupdateid)
|
|
return o
|
|
}
|
|
|
|
// SetCarupdateid adds the carupdateid to the get carupdateslog params
|
|
func (o *GetCarupdateslogParams) SetCarupdateid(carupdateid int64) {
|
|
o.Carupdateid = carupdateid
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *GetCarupdateslogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
// query param carupdateid
|
|
qrCarupdateid := o.Carupdateid
|
|
qCarupdateid := swag.FormatInt64(qrCarupdateid)
|
|
if qCarupdateid != "" {
|
|
|
|
if err := r.SetQueryParam("carupdateid", qCarupdateid); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|