/
head_phones_name_parameters.go
50 lines (39 loc) · 1.21 KB
/
head_phones_name_parameters.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package misc
// 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"
)
// NewHeadPhonesNameParams creates a new HeadPhonesNameParams object
// with the default values initialized.
func NewHeadPhonesNameParams() *HeadPhonesNameParams {
return &HeadPhonesNameParams{}
}
/*HeadPhonesNameParams contains all the parameters to send to the API endpoint
for the head phones name operation typically these are written to a http.Request
*/
type HeadPhonesNameParams struct {
/*Name
电话号码
*/
Name string
}
// WithName adds the name to the head phones name params
func (o *HeadPhonesNameParams) WithName(name string) *HeadPhonesNameParams {
o.Name = name
return o
}
// WriteToRequest writes these params to a swagger request
func (o *HeadPhonesNameParams) WriteToRequest(r client.Request, reg strfmt.Registry) error {
var res []error
// path param name
if err := r.SetPathParam("name", o.Name); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}