blob: 652225cd3be3dd342f28bde764d5c3bcaaa78b2a [file] [log] [blame]
Serge Bazanskicc25bdf2018-10-25 14:02:58 +02001// Code generated by go-swagger; DO NOT EDIT.
2
3// Copyright 2018 The go-netbox Authors.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
17package ipam
18
19// This file was generated by the swagger tool.
20// Editing this file might prove futile when you re-run the swagger generate command
21
22import (
23 "net/http"
24 "time"
25
26 "golang.org/x/net/context"
27
28 "github.com/go-openapi/errors"
29 "github.com/go-openapi/runtime"
30 cr "github.com/go-openapi/runtime/client"
31 "github.com/go-openapi/swag"
32
33 strfmt "github.com/go-openapi/strfmt"
34)
35
36// NewIPAMVlansListParams creates a new IPAMVlansListParams object
37// with the default values initialized.
38func NewIPAMVlansListParams() *IPAMVlansListParams {
39 var ()
40 return &IPAMVlansListParams{
41
42 timeout: cr.DefaultTimeout,
43 }
44}
45
46// NewIPAMVlansListParamsWithTimeout creates a new IPAMVlansListParams object
47// with the default values initialized, and the ability to set a timeout on a request
48func NewIPAMVlansListParamsWithTimeout(timeout time.Duration) *IPAMVlansListParams {
49 var ()
50 return &IPAMVlansListParams{
51
52 timeout: timeout,
53 }
54}
55
56// NewIPAMVlansListParamsWithContext creates a new IPAMVlansListParams object
57// with the default values initialized, and the ability to set a context for a request
58func NewIPAMVlansListParamsWithContext(ctx context.Context) *IPAMVlansListParams {
59 var ()
60 return &IPAMVlansListParams{
61
62 Context: ctx,
63 }
64}
65
66// NewIPAMVlansListParamsWithHTTPClient creates a new IPAMVlansListParams object
67// with the default values initialized, and the ability to set a custom HTTPClient for a request
68func NewIPAMVlansListParamsWithHTTPClient(client *http.Client) *IPAMVlansListParams {
69 var ()
70 return &IPAMVlansListParams{
71 HTTPClient: client,
72 }
73}
74
75/*IPAMVlansListParams contains all the parameters to send to the API endpoint
76for the ipam vlans list operation typically these are written to a http.Request
77*/
78type IPAMVlansListParams struct {
79
80 /*Group*/
81 Group *string
82 /*GroupID*/
83 GroupID *string
84 /*IDIn
85 Multiple values may be separated by commas.
86
87 */
88 IDIn *string
89 /*Limit
90 Number of results to return per page.
91
92 */
93 Limit *int64
94 /*Name*/
95 Name *string
96 /*Offset
97 The initial index from which to return the results.
98
99 */
100 Offset *int64
101 /*Q*/
102 Q *string
103 /*Role*/
104 Role *string
105 /*RoleID*/
106 RoleID *string
107 /*Site*/
108 Site *string
109 /*SiteID*/
110 SiteID *string
111 /*Status*/
112 Status *string
113 /*Tenant*/
114 Tenant *string
115 /*TenantID*/
116 TenantID *string
117 /*Vid*/
118 Vid *float64
119
120 timeout time.Duration
121 Context context.Context
122 HTTPClient *http.Client
123}
124
125// WithTimeout adds the timeout to the ipam vlans list params
126func (o *IPAMVlansListParams) WithTimeout(timeout time.Duration) *IPAMVlansListParams {
127 o.SetTimeout(timeout)
128 return o
129}
130
131// SetTimeout adds the timeout to the ipam vlans list params
132func (o *IPAMVlansListParams) SetTimeout(timeout time.Duration) {
133 o.timeout = timeout
134}
135
136// WithContext adds the context to the ipam vlans list params
137func (o *IPAMVlansListParams) WithContext(ctx context.Context) *IPAMVlansListParams {
138 o.SetContext(ctx)
139 return o
140}
141
142// SetContext adds the context to the ipam vlans list params
143func (o *IPAMVlansListParams) SetContext(ctx context.Context) {
144 o.Context = ctx
145}
146
147// WithHTTPClient adds the HTTPClient to the ipam vlans list params
148func (o *IPAMVlansListParams) WithHTTPClient(client *http.Client) *IPAMVlansListParams {
149 o.SetHTTPClient(client)
150 return o
151}
152
153// SetHTTPClient adds the HTTPClient to the ipam vlans list params
154func (o *IPAMVlansListParams) SetHTTPClient(client *http.Client) {
155 o.HTTPClient = client
156}
157
158// WithGroup adds the group to the ipam vlans list params
159func (o *IPAMVlansListParams) WithGroup(group *string) *IPAMVlansListParams {
160 o.SetGroup(group)
161 return o
162}
163
164// SetGroup adds the group to the ipam vlans list params
165func (o *IPAMVlansListParams) SetGroup(group *string) {
166 o.Group = group
167}
168
169// WithGroupID adds the groupID to the ipam vlans list params
170func (o *IPAMVlansListParams) WithGroupID(groupID *string) *IPAMVlansListParams {
171 o.SetGroupID(groupID)
172 return o
173}
174
175// SetGroupID adds the groupId to the ipam vlans list params
176func (o *IPAMVlansListParams) SetGroupID(groupID *string) {
177 o.GroupID = groupID
178}
179
180// WithIDIn adds the iDIn to the ipam vlans list params
181func (o *IPAMVlansListParams) WithIDIn(iDIn *string) *IPAMVlansListParams {
182 o.SetIDIn(iDIn)
183 return o
184}
185
186// SetIDIn adds the idIn to the ipam vlans list params
187func (o *IPAMVlansListParams) SetIDIn(iDIn *string) {
188 o.IDIn = iDIn
189}
190
191// WithLimit adds the limit to the ipam vlans list params
192func (o *IPAMVlansListParams) WithLimit(limit *int64) *IPAMVlansListParams {
193 o.SetLimit(limit)
194 return o
195}
196
197// SetLimit adds the limit to the ipam vlans list params
198func (o *IPAMVlansListParams) SetLimit(limit *int64) {
199 o.Limit = limit
200}
201
202// WithName adds the name to the ipam vlans list params
203func (o *IPAMVlansListParams) WithName(name *string) *IPAMVlansListParams {
204 o.SetName(name)
205 return o
206}
207
208// SetName adds the name to the ipam vlans list params
209func (o *IPAMVlansListParams) SetName(name *string) {
210 o.Name = name
211}
212
213// WithOffset adds the offset to the ipam vlans list params
214func (o *IPAMVlansListParams) WithOffset(offset *int64) *IPAMVlansListParams {
215 o.SetOffset(offset)
216 return o
217}
218
219// SetOffset adds the offset to the ipam vlans list params
220func (o *IPAMVlansListParams) SetOffset(offset *int64) {
221 o.Offset = offset
222}
223
224// WithQ adds the q to the ipam vlans list params
225func (o *IPAMVlansListParams) WithQ(q *string) *IPAMVlansListParams {
226 o.SetQ(q)
227 return o
228}
229
230// SetQ adds the q to the ipam vlans list params
231func (o *IPAMVlansListParams) SetQ(q *string) {
232 o.Q = q
233}
234
235// WithRole adds the role to the ipam vlans list params
236func (o *IPAMVlansListParams) WithRole(role *string) *IPAMVlansListParams {
237 o.SetRole(role)
238 return o
239}
240
241// SetRole adds the role to the ipam vlans list params
242func (o *IPAMVlansListParams) SetRole(role *string) {
243 o.Role = role
244}
245
246// WithRoleID adds the roleID to the ipam vlans list params
247func (o *IPAMVlansListParams) WithRoleID(roleID *string) *IPAMVlansListParams {
248 o.SetRoleID(roleID)
249 return o
250}
251
252// SetRoleID adds the roleId to the ipam vlans list params
253func (o *IPAMVlansListParams) SetRoleID(roleID *string) {
254 o.RoleID = roleID
255}
256
257// WithSite adds the site to the ipam vlans list params
258func (o *IPAMVlansListParams) WithSite(site *string) *IPAMVlansListParams {
259 o.SetSite(site)
260 return o
261}
262
263// SetSite adds the site to the ipam vlans list params
264func (o *IPAMVlansListParams) SetSite(site *string) {
265 o.Site = site
266}
267
268// WithSiteID adds the siteID to the ipam vlans list params
269func (o *IPAMVlansListParams) WithSiteID(siteID *string) *IPAMVlansListParams {
270 o.SetSiteID(siteID)
271 return o
272}
273
274// SetSiteID adds the siteId to the ipam vlans list params
275func (o *IPAMVlansListParams) SetSiteID(siteID *string) {
276 o.SiteID = siteID
277}
278
279// WithStatus adds the status to the ipam vlans list params
280func (o *IPAMVlansListParams) WithStatus(status *string) *IPAMVlansListParams {
281 o.SetStatus(status)
282 return o
283}
284
285// SetStatus adds the status to the ipam vlans list params
286func (o *IPAMVlansListParams) SetStatus(status *string) {
287 o.Status = status
288}
289
290// WithTenant adds the tenant to the ipam vlans list params
291func (o *IPAMVlansListParams) WithTenant(tenant *string) *IPAMVlansListParams {
292 o.SetTenant(tenant)
293 return o
294}
295
296// SetTenant adds the tenant to the ipam vlans list params
297func (o *IPAMVlansListParams) SetTenant(tenant *string) {
298 o.Tenant = tenant
299}
300
301// WithTenantID adds the tenantID to the ipam vlans list params
302func (o *IPAMVlansListParams) WithTenantID(tenantID *string) *IPAMVlansListParams {
303 o.SetTenantID(tenantID)
304 return o
305}
306
307// SetTenantID adds the tenantId to the ipam vlans list params
308func (o *IPAMVlansListParams) SetTenantID(tenantID *string) {
309 o.TenantID = tenantID
310}
311
312// WithVid adds the vid to the ipam vlans list params
313func (o *IPAMVlansListParams) WithVid(vid *float64) *IPAMVlansListParams {
314 o.SetVid(vid)
315 return o
316}
317
318// SetVid adds the vid to the ipam vlans list params
319func (o *IPAMVlansListParams) SetVid(vid *float64) {
320 o.Vid = vid
321}
322
323// WriteToRequest writes these params to a swagger request
324func (o *IPAMVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
325
326 if err := r.SetTimeout(o.timeout); err != nil {
327 return err
328 }
329 var res []error
330
331 if o.Group != nil {
332
333 // query param group
334 var qrGroup string
335 if o.Group != nil {
336 qrGroup = *o.Group
337 }
338 qGroup := qrGroup
339 if qGroup != "" {
340 if err := r.SetQueryParam("group", qGroup); err != nil {
341 return err
342 }
343 }
344
345 }
346
347 if o.GroupID != nil {
348
349 // query param group_id
350 var qrGroupID string
351 if o.GroupID != nil {
352 qrGroupID = *o.GroupID
353 }
354 qGroupID := qrGroupID
355 if qGroupID != "" {
356 if err := r.SetQueryParam("group_id", qGroupID); err != nil {
357 return err
358 }
359 }
360
361 }
362
363 if o.IDIn != nil {
364
365 // query param id__in
366 var qrIDIn string
367 if o.IDIn != nil {
368 qrIDIn = *o.IDIn
369 }
370 qIDIn := qrIDIn
371 if qIDIn != "" {
372 if err := r.SetQueryParam("id__in", qIDIn); err != nil {
373 return err
374 }
375 }
376
377 }
378
379 if o.Limit != nil {
380
381 // query param limit
382 var qrLimit int64
383 if o.Limit != nil {
384 qrLimit = *o.Limit
385 }
386 qLimit := swag.FormatInt64(qrLimit)
387 if qLimit != "" {
388 if err := r.SetQueryParam("limit", qLimit); err != nil {
389 return err
390 }
391 }
392
393 }
394
395 if o.Name != nil {
396
397 // query param name
398 var qrName string
399 if o.Name != nil {
400 qrName = *o.Name
401 }
402 qName := qrName
403 if qName != "" {
404 if err := r.SetQueryParam("name", qName); err != nil {
405 return err
406 }
407 }
408
409 }
410
411 if o.Offset != nil {
412
413 // query param offset
414 var qrOffset int64
415 if o.Offset != nil {
416 qrOffset = *o.Offset
417 }
418 qOffset := swag.FormatInt64(qrOffset)
419 if qOffset != "" {
420 if err := r.SetQueryParam("offset", qOffset); err != nil {
421 return err
422 }
423 }
424
425 }
426
427 if o.Q != nil {
428
429 // query param q
430 var qrQ string
431 if o.Q != nil {
432 qrQ = *o.Q
433 }
434 qQ := qrQ
435 if qQ != "" {
436 if err := r.SetQueryParam("q", qQ); err != nil {
437 return err
438 }
439 }
440
441 }
442
443 if o.Role != nil {
444
445 // query param role
446 var qrRole string
447 if o.Role != nil {
448 qrRole = *o.Role
449 }
450 qRole := qrRole
451 if qRole != "" {
452 if err := r.SetQueryParam("role", qRole); err != nil {
453 return err
454 }
455 }
456
457 }
458
459 if o.RoleID != nil {
460
461 // query param role_id
462 var qrRoleID string
463 if o.RoleID != nil {
464 qrRoleID = *o.RoleID
465 }
466 qRoleID := qrRoleID
467 if qRoleID != "" {
468 if err := r.SetQueryParam("role_id", qRoleID); err != nil {
469 return err
470 }
471 }
472
473 }
474
475 if o.Site != nil {
476
477 // query param site
478 var qrSite string
479 if o.Site != nil {
480 qrSite = *o.Site
481 }
482 qSite := qrSite
483 if qSite != "" {
484 if err := r.SetQueryParam("site", qSite); err != nil {
485 return err
486 }
487 }
488
489 }
490
491 if o.SiteID != nil {
492
493 // query param site_id
494 var qrSiteID string
495 if o.SiteID != nil {
496 qrSiteID = *o.SiteID
497 }
498 qSiteID := qrSiteID
499 if qSiteID != "" {
500 if err := r.SetQueryParam("site_id", qSiteID); err != nil {
501 return err
502 }
503 }
504
505 }
506
507 if o.Status != nil {
508
509 // query param status
510 var qrStatus string
511 if o.Status != nil {
512 qrStatus = *o.Status
513 }
514 qStatus := qrStatus
515 if qStatus != "" {
516 if err := r.SetQueryParam("status", qStatus); err != nil {
517 return err
518 }
519 }
520
521 }
522
523 if o.Tenant != nil {
524
525 // query param tenant
526 var qrTenant string
527 if o.Tenant != nil {
528 qrTenant = *o.Tenant
529 }
530 qTenant := qrTenant
531 if qTenant != "" {
532 if err := r.SetQueryParam("tenant", qTenant); err != nil {
533 return err
534 }
535 }
536
537 }
538
539 if o.TenantID != nil {
540
541 // query param tenant_id
542 var qrTenantID string
543 if o.TenantID != nil {
544 qrTenantID = *o.TenantID
545 }
546 qTenantID := qrTenantID
547 if qTenantID != "" {
548 if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
549 return err
550 }
551 }
552
553 }
554
555 if o.Vid != nil {
556
557 // query param vid
558 var qrVid float64
559 if o.Vid != nil {
560 qrVid = *o.Vid
561 }
562 qVid := swag.FormatFloat64(qrVid)
563 if qVid != "" {
564 if err := r.SetQueryParam("vid", qVid); err != nil {
565 return err
566 }
567 }
568
569 }
570
571 if len(res) > 0 {
572 return errors.CompositeValidationError(res...)
573 }
574 return nil
575}