代码拉取完成,页面将自动刷新
package todos
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-swagger/go-swagger/client"
"github.com/go-swagger/go-swagger/errors"
"github.com/go-swagger/go-swagger/strfmt"
"github.com/go-swagger/go-swagger/examples/todo-list/models"
)
// NewUpdateOneParams creates a new UpdateOneParams object
// with the default values initialized.
func NewUpdateOneParams() *UpdateOneParams {
return &UpdateOneParams{}
}
/*UpdateOneParams contains all the parameters to send to the API endpoint
for the update one operation typically these are written to a http.Request
*/
type UpdateOneParams struct {
/*Body*/
Body *models.Item
/*ID*/
ID string
}
// WithBody adds the body to the update one params
func (o *UpdateOneParams) WithBody(body *models.Item) *UpdateOneParams {
o.Body = body
return o
}
// WithID adds the id to the update one params
func (o *UpdateOneParams) WithID(id string) *UpdateOneParams {
o.ID = id
return o
}
// WriteToRequest writes these params to a swagger request
func (o *UpdateOneParams) WriteToRequest(r client.Request, reg strfmt.Registry) error {
var res []error
if o.Body == nil {
o.Body = new(models.Item)
}
if err := r.SetBodyParam(o.Body); err != nil {
return err
}
// path param id
if err := r.SetPathParam("id", o.ID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。