/
get_csec_query_parameters.go
145 lines (117 loc) · 3.21 KB
/
get_csec_query_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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
package security
// 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/swag"
)
// NewGetCsecQueryParams creates a new GetCsecQueryParams object
// with the default values initialized.
func NewGetCsecQueryParams() *GetCsecQueryParams {
return &GetCsecQueryParams{}
}
/*GetCsecQueryParams contains all the parameters to send to the API endpoint
for the get csec query operation typically these are written to a http.Request
*/
type GetCsecQueryParams struct {
/*Businessid
business ID
*/
Businessid int64
/*Captype
captcha type
*/
Captype int64
/*Sceneid
scene ID
*/
Sceneid int64
/*Userid
user ID
*/
Userid int64
/*Userip
user IP
*/
Userip string
}
// WithBusinessid adds the businessid to the get csec query params
func (o *GetCsecQueryParams) WithBusinessid(businessid int64) *GetCsecQueryParams {
o.Businessid = businessid
return o
}
// WithCaptype adds the captype to the get csec query params
func (o *GetCsecQueryParams) WithCaptype(captype int64) *GetCsecQueryParams {
o.Captype = captype
return o
}
// WithSceneid adds the sceneid to the get csec query params
func (o *GetCsecQueryParams) WithSceneid(sceneid int64) *GetCsecQueryParams {
o.Sceneid = sceneid
return o
}
// WithUserid adds the userid to the get csec query params
func (o *GetCsecQueryParams) WithUserid(userid int64) *GetCsecQueryParams {
o.Userid = userid
return o
}
// WithUserip adds the userip to the get csec query params
func (o *GetCsecQueryParams) WithUserip(userip string) *GetCsecQueryParams {
o.Userip = userip
return o
}
// WriteToRequest writes these params to a swagger request
func (o *GetCsecQueryParams) WriteToRequest(r client.Request, reg strfmt.Registry) error {
var res []error
// query param businessid
qrBusinessid := o.Businessid
qBusinessid := swag.FormatInt64(qrBusinessid)
if qBusinessid != "" && qBusinessid != "-1" {
if err := r.SetQueryParam("businessid", qBusinessid); err != nil {
return err
}
}
// query array param businessid
// query param captype
qrCaptype := o.Captype
qCaptype := swag.FormatInt64(qrCaptype)
if qCaptype != "" && qCaptype != "-1" {
if err := r.SetQueryParam("captype", qCaptype); err != nil {
return err
}
}
// query array param captype
// query param sceneid
qrSceneid := o.Sceneid
qSceneid := swag.FormatInt64(qrSceneid)
if qSceneid != "" && qSceneid != "-1" {
if err := r.SetQueryParam("sceneid", qSceneid); err != nil {
return err
}
}
// query array param sceneid
// query param userid
qrUserid := o.Userid
qUserid := swag.FormatInt64(qrUserid)
if qUserid != "" && qUserid != "-1" {
if err := r.SetQueryParam("userid", qUserid); err != nil {
return err
}
}
// query array param userid
// query param userip
qrUserip := o.Userip
qUserip := qrUserip
if qUserip != "" && qUserip != "-1" {
if err := r.SetQueryParam("userip", qUserip); err != nil {
return err
}
}
// query array param userip
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}