...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package tlog
20
21
22
23
24 import (
25 "context"
26 "net/http"
27 "time"
28
29 "github.com/go-openapi/errors"
30 "github.com/go-openapi/runtime"
31 cr "github.com/go-openapi/runtime/client"
32 "github.com/go-openapi/strfmt"
33 "github.com/go-openapi/swag"
34 )
35
36
37
38
39
40
41
42 func NewGetLogInfoParams() *GetLogInfoParams {
43 return &GetLogInfoParams{
44 timeout: cr.DefaultTimeout,
45 }
46 }
47
48
49
50 func NewGetLogInfoParamsWithTimeout(timeout time.Duration) *GetLogInfoParams {
51 return &GetLogInfoParams{
52 timeout: timeout,
53 }
54 }
55
56
57
58 func NewGetLogInfoParamsWithContext(ctx context.Context) *GetLogInfoParams {
59 return &GetLogInfoParams{
60 Context: ctx,
61 }
62 }
63
64
65
66 func NewGetLogInfoParamsWithHTTPClient(client *http.Client) *GetLogInfoParams {
67 return &GetLogInfoParams{
68 HTTPClient: client,
69 }
70 }
71
72
79 type GetLogInfoParams struct {
80
81
85 Stable *bool
86
87 timeout time.Duration
88 Context context.Context
89 HTTPClient *http.Client
90 }
91
92
93
94
95 func (o *GetLogInfoParams) WithDefaults() *GetLogInfoParams {
96 o.SetDefaults()
97 return o
98 }
99
100
101
102
103 func (o *GetLogInfoParams) SetDefaults() {
104 var (
105 stableDefault = bool(false)
106 )
107
108 val := GetLogInfoParams{
109 Stable: &stableDefault,
110 }
111
112 val.timeout = o.timeout
113 val.Context = o.Context
114 val.HTTPClient = o.HTTPClient
115 *o = val
116 }
117
118
119 func (o *GetLogInfoParams) WithTimeout(timeout time.Duration) *GetLogInfoParams {
120 o.SetTimeout(timeout)
121 return o
122 }
123
124
125 func (o *GetLogInfoParams) SetTimeout(timeout time.Duration) {
126 o.timeout = timeout
127 }
128
129
130 func (o *GetLogInfoParams) WithContext(ctx context.Context) *GetLogInfoParams {
131 o.SetContext(ctx)
132 return o
133 }
134
135
136 func (o *GetLogInfoParams) SetContext(ctx context.Context) {
137 o.Context = ctx
138 }
139
140
141 func (o *GetLogInfoParams) WithHTTPClient(client *http.Client) *GetLogInfoParams {
142 o.SetHTTPClient(client)
143 return o
144 }
145
146
147 func (o *GetLogInfoParams) SetHTTPClient(client *http.Client) {
148 o.HTTPClient = client
149 }
150
151
152 func (o *GetLogInfoParams) WithStable(stable *bool) *GetLogInfoParams {
153 o.SetStable(stable)
154 return o
155 }
156
157
158 func (o *GetLogInfoParams) SetStable(stable *bool) {
159 o.Stable = stable
160 }
161
162
163 func (o *GetLogInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
164
165 if err := r.SetTimeout(o.timeout); err != nil {
166 return err
167 }
168 var res []error
169
170 if o.Stable != nil {
171
172
173 var qrStable bool
174
175 if o.Stable != nil {
176 qrStable = *o.Stable
177 }
178 qStable := swag.FormatBool(qrStable)
179 if qStable != "" {
180
181 if err := r.SetQueryParam("stable", qStable); err != nil {
182 return err
183 }
184 }
185 }
186
187 if len(res) > 0 {
188 return errors.CompositeValidationError(res...)
189 }
190 return nil
191 }
192
View as plain text