blob: 2a03ebd91bc1f238e213627920e3b6543d99e743 [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// NewIPAMIPAddressesListParams creates a new IPAMIPAddressesListParams object
37// with the default values initialized.
38func NewIPAMIPAddressesListParams() *IPAMIPAddressesListParams {
39 var ()
40 return &IPAMIPAddressesListParams{
41
42 timeout: cr.DefaultTimeout,
43 }
44}
45
46// NewIPAMIPAddressesListParamsWithTimeout creates a new IPAMIPAddressesListParams object
47// with the default values initialized, and the ability to set a timeout on a request
48func NewIPAMIPAddressesListParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesListParams {
49 var ()
50 return &IPAMIPAddressesListParams{
51
52 timeout: timeout,
53 }
54}
55
56// NewIPAMIPAddressesListParamsWithContext creates a new IPAMIPAddressesListParams object
57// with the default values initialized, and the ability to set a context for a request
58func NewIPAMIPAddressesListParamsWithContext(ctx context.Context) *IPAMIPAddressesListParams {
59 var ()
60 return &IPAMIPAddressesListParams{
61
62 Context: ctx,
63 }
64}
65
66// NewIPAMIPAddressesListParamsWithHTTPClient creates a new IPAMIPAddressesListParams object
67// with the default values initialized, and the ability to set a custom HTTPClient for a request
68func NewIPAMIPAddressesListParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesListParams {
69 var ()
70 return &IPAMIPAddressesListParams{
71 HTTPClient: client,
72 }
73}
74
75/*IPAMIPAddressesListParams contains all the parameters to send to the API endpoint
76for the ipam ip addresses list operation typically these are written to a http.Request
77*/
78type IPAMIPAddressesListParams struct {
79
80 /*Device*/
81 Device *string
82 /*DeviceID*/
83 DeviceID *float64
84 /*Family*/
85 Family *string
86 /*IDIn
87 Multiple values may be separated by commas.
88
89 */
90 IDIn *string
91 /*InterfaceID*/
92 InterfaceID *string
93 /*Limit
94 Number of results to return per page.
95
96 */
97 Limit *int64
98 /*MaskLength*/
99 MaskLength *float64
100 /*Offset
101 The initial index from which to return the results.
102
103 */
104 Offset *int64
105 /*Parent*/
106 Parent *string
107 /*Q*/
108 Q *string
109 /*Role*/
110 Role *string
111 /*Status*/
112 Status *string
113 /*Tenant*/
114 Tenant *string
115 /*TenantID*/
116 TenantID *string
117 /*VirtualMachine*/
118 VirtualMachine *string
119 /*VirtualMachineID*/
120 VirtualMachineID *string
121 /*Vrf*/
122 Vrf *string
123 /*VrfID*/
124 VrfID *string
125
126 timeout time.Duration
127 Context context.Context
128 HTTPClient *http.Client
129}
130
131// WithTimeout adds the timeout to the ipam ip addresses list params
132func (o *IPAMIPAddressesListParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesListParams {
133 o.SetTimeout(timeout)
134 return o
135}
136
137// SetTimeout adds the timeout to the ipam ip addresses list params
138func (o *IPAMIPAddressesListParams) SetTimeout(timeout time.Duration) {
139 o.timeout = timeout
140}
141
142// WithContext adds the context to the ipam ip addresses list params
143func (o *IPAMIPAddressesListParams) WithContext(ctx context.Context) *IPAMIPAddressesListParams {
144 o.SetContext(ctx)
145 return o
146}
147
148// SetContext adds the context to the ipam ip addresses list params
149func (o *IPAMIPAddressesListParams) SetContext(ctx context.Context) {
150 o.Context = ctx
151}
152
153// WithHTTPClient adds the HTTPClient to the ipam ip addresses list params
154func (o *IPAMIPAddressesListParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesListParams {
155 o.SetHTTPClient(client)
156 return o
157}
158
159// SetHTTPClient adds the HTTPClient to the ipam ip addresses list params
160func (o *IPAMIPAddressesListParams) SetHTTPClient(client *http.Client) {
161 o.HTTPClient = client
162}
163
164// WithDevice adds the device to the ipam ip addresses list params
165func (o *IPAMIPAddressesListParams) WithDevice(device *string) *IPAMIPAddressesListParams {
166 o.SetDevice(device)
167 return o
168}
169
170// SetDevice adds the device to the ipam ip addresses list params
171func (o *IPAMIPAddressesListParams) SetDevice(device *string) {
172 o.Device = device
173}
174
175// WithDeviceID adds the deviceID to the ipam ip addresses list params
176func (o *IPAMIPAddressesListParams) WithDeviceID(deviceID *float64) *IPAMIPAddressesListParams {
177 o.SetDeviceID(deviceID)
178 return o
179}
180
181// SetDeviceID adds the deviceId to the ipam ip addresses list params
182func (o *IPAMIPAddressesListParams) SetDeviceID(deviceID *float64) {
183 o.DeviceID = deviceID
184}
185
186// WithFamily adds the family to the ipam ip addresses list params
187func (o *IPAMIPAddressesListParams) WithFamily(family *string) *IPAMIPAddressesListParams {
188 o.SetFamily(family)
189 return o
190}
191
192// SetFamily adds the family to the ipam ip addresses list params
193func (o *IPAMIPAddressesListParams) SetFamily(family *string) {
194 o.Family = family
195}
196
197// WithIDIn adds the iDIn to the ipam ip addresses list params
198func (o *IPAMIPAddressesListParams) WithIDIn(iDIn *string) *IPAMIPAddressesListParams {
199 o.SetIDIn(iDIn)
200 return o
201}
202
203// SetIDIn adds the idIn to the ipam ip addresses list params
204func (o *IPAMIPAddressesListParams) SetIDIn(iDIn *string) {
205 o.IDIn = iDIn
206}
207
208// WithInterfaceID adds the interfaceID to the ipam ip addresses list params
209func (o *IPAMIPAddressesListParams) WithInterfaceID(interfaceID *string) *IPAMIPAddressesListParams {
210 o.SetInterfaceID(interfaceID)
211 return o
212}
213
214// SetInterfaceID adds the interfaceId to the ipam ip addresses list params
215func (o *IPAMIPAddressesListParams) SetInterfaceID(interfaceID *string) {
216 o.InterfaceID = interfaceID
217}
218
219// WithLimit adds the limit to the ipam ip addresses list params
220func (o *IPAMIPAddressesListParams) WithLimit(limit *int64) *IPAMIPAddressesListParams {
221 o.SetLimit(limit)
222 return o
223}
224
225// SetLimit adds the limit to the ipam ip addresses list params
226func (o *IPAMIPAddressesListParams) SetLimit(limit *int64) {
227 o.Limit = limit
228}
229
230// WithMaskLength adds the maskLength to the ipam ip addresses list params
231func (o *IPAMIPAddressesListParams) WithMaskLength(maskLength *float64) *IPAMIPAddressesListParams {
232 o.SetMaskLength(maskLength)
233 return o
234}
235
236// SetMaskLength adds the maskLength to the ipam ip addresses list params
237func (o *IPAMIPAddressesListParams) SetMaskLength(maskLength *float64) {
238 o.MaskLength = maskLength
239}
240
241// WithOffset adds the offset to the ipam ip addresses list params
242func (o *IPAMIPAddressesListParams) WithOffset(offset *int64) *IPAMIPAddressesListParams {
243 o.SetOffset(offset)
244 return o
245}
246
247// SetOffset adds the offset to the ipam ip addresses list params
248func (o *IPAMIPAddressesListParams) SetOffset(offset *int64) {
249 o.Offset = offset
250}
251
252// WithParent adds the parent to the ipam ip addresses list params
253func (o *IPAMIPAddressesListParams) WithParent(parent *string) *IPAMIPAddressesListParams {
254 o.SetParent(parent)
255 return o
256}
257
258// SetParent adds the parent to the ipam ip addresses list params
259func (o *IPAMIPAddressesListParams) SetParent(parent *string) {
260 o.Parent = parent
261}
262
263// WithQ adds the q to the ipam ip addresses list params
264func (o *IPAMIPAddressesListParams) WithQ(q *string) *IPAMIPAddressesListParams {
265 o.SetQ(q)
266 return o
267}
268
269// SetQ adds the q to the ipam ip addresses list params
270func (o *IPAMIPAddressesListParams) SetQ(q *string) {
271 o.Q = q
272}
273
274// WithRole adds the role to the ipam ip addresses list params
275func (o *IPAMIPAddressesListParams) WithRole(role *string) *IPAMIPAddressesListParams {
276 o.SetRole(role)
277 return o
278}
279
280// SetRole adds the role to the ipam ip addresses list params
281func (o *IPAMIPAddressesListParams) SetRole(role *string) {
282 o.Role = role
283}
284
285// WithStatus adds the status to the ipam ip addresses list params
286func (o *IPAMIPAddressesListParams) WithStatus(status *string) *IPAMIPAddressesListParams {
287 o.SetStatus(status)
288 return o
289}
290
291// SetStatus adds the status to the ipam ip addresses list params
292func (o *IPAMIPAddressesListParams) SetStatus(status *string) {
293 o.Status = status
294}
295
296// WithTenant adds the tenant to the ipam ip addresses list params
297func (o *IPAMIPAddressesListParams) WithTenant(tenant *string) *IPAMIPAddressesListParams {
298 o.SetTenant(tenant)
299 return o
300}
301
302// SetTenant adds the tenant to the ipam ip addresses list params
303func (o *IPAMIPAddressesListParams) SetTenant(tenant *string) {
304 o.Tenant = tenant
305}
306
307// WithTenantID adds the tenantID to the ipam ip addresses list params
308func (o *IPAMIPAddressesListParams) WithTenantID(tenantID *string) *IPAMIPAddressesListParams {
309 o.SetTenantID(tenantID)
310 return o
311}
312
313// SetTenantID adds the tenantId to the ipam ip addresses list params
314func (o *IPAMIPAddressesListParams) SetTenantID(tenantID *string) {
315 o.TenantID = tenantID
316}
317
318// WithVirtualMachine adds the virtualMachine to the ipam ip addresses list params
319func (o *IPAMIPAddressesListParams) WithVirtualMachine(virtualMachine *string) *IPAMIPAddressesListParams {
320 o.SetVirtualMachine(virtualMachine)
321 return o
322}
323
324// SetVirtualMachine adds the virtualMachine to the ipam ip addresses list params
325func (o *IPAMIPAddressesListParams) SetVirtualMachine(virtualMachine *string) {
326 o.VirtualMachine = virtualMachine
327}
328
329// WithVirtualMachineID adds the virtualMachineID to the ipam ip addresses list params
330func (o *IPAMIPAddressesListParams) WithVirtualMachineID(virtualMachineID *string) *IPAMIPAddressesListParams {
331 o.SetVirtualMachineID(virtualMachineID)
332 return o
333}
334
335// SetVirtualMachineID adds the virtualMachineId to the ipam ip addresses list params
336func (o *IPAMIPAddressesListParams) SetVirtualMachineID(virtualMachineID *string) {
337 o.VirtualMachineID = virtualMachineID
338}
339
340// WithVrf adds the vrf to the ipam ip addresses list params
341func (o *IPAMIPAddressesListParams) WithVrf(vrf *string) *IPAMIPAddressesListParams {
342 o.SetVrf(vrf)
343 return o
344}
345
346// SetVrf adds the vrf to the ipam ip addresses list params
347func (o *IPAMIPAddressesListParams) SetVrf(vrf *string) {
348 o.Vrf = vrf
349}
350
351// WithVrfID adds the vrfID to the ipam ip addresses list params
352func (o *IPAMIPAddressesListParams) WithVrfID(vrfID *string) *IPAMIPAddressesListParams {
353 o.SetVrfID(vrfID)
354 return o
355}
356
357// SetVrfID adds the vrfId to the ipam ip addresses list params
358func (o *IPAMIPAddressesListParams) SetVrfID(vrfID *string) {
359 o.VrfID = vrfID
360}
361
362// WriteToRequest writes these params to a swagger request
363func (o *IPAMIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
364
365 if err := r.SetTimeout(o.timeout); err != nil {
366 return err
367 }
368 var res []error
369
370 if o.Device != nil {
371
372 // query param device
373 var qrDevice string
374 if o.Device != nil {
375 qrDevice = *o.Device
376 }
377 qDevice := qrDevice
378 if qDevice != "" {
379 if err := r.SetQueryParam("device", qDevice); err != nil {
380 return err
381 }
382 }
383
384 }
385
386 if o.DeviceID != nil {
387
388 // query param device_id
389 var qrDeviceID float64
390 if o.DeviceID != nil {
391 qrDeviceID = *o.DeviceID
392 }
393 qDeviceID := swag.FormatFloat64(qrDeviceID)
394 if qDeviceID != "" {
395 if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
396 return err
397 }
398 }
399
400 }
401
402 if o.Family != nil {
403
404 // query param family
405 var qrFamily string
406 if o.Family != nil {
407 qrFamily = *o.Family
408 }
409 qFamily := qrFamily
410 if qFamily != "" {
411 if err := r.SetQueryParam("family", qFamily); err != nil {
412 return err
413 }
414 }
415
416 }
417
418 if o.IDIn != nil {
419
420 // query param id__in
421 var qrIDIn string
422 if o.IDIn != nil {
423 qrIDIn = *o.IDIn
424 }
425 qIDIn := qrIDIn
426 if qIDIn != "" {
427 if err := r.SetQueryParam("id__in", qIDIn); err != nil {
428 return err
429 }
430 }
431
432 }
433
434 if o.InterfaceID != nil {
435
436 // query param interface_id
437 var qrInterfaceID string
438 if o.InterfaceID != nil {
439 qrInterfaceID = *o.InterfaceID
440 }
441 qInterfaceID := qrInterfaceID
442 if qInterfaceID != "" {
443 if err := r.SetQueryParam("interface_id", qInterfaceID); err != nil {
444 return err
445 }
446 }
447
448 }
449
450 if o.Limit != nil {
451
452 // query param limit
453 var qrLimit int64
454 if o.Limit != nil {
455 qrLimit = *o.Limit
456 }
457 qLimit := swag.FormatInt64(qrLimit)
458 if qLimit != "" {
459 if err := r.SetQueryParam("limit", qLimit); err != nil {
460 return err
461 }
462 }
463
464 }
465
466 if o.MaskLength != nil {
467
468 // query param mask_length
469 var qrMaskLength float64
470 if o.MaskLength != nil {
471 qrMaskLength = *o.MaskLength
472 }
473 qMaskLength := swag.FormatFloat64(qrMaskLength)
474 if qMaskLength != "" {
475 if err := r.SetQueryParam("mask_length", qMaskLength); err != nil {
476 return err
477 }
478 }
479
480 }
481
482 if o.Offset != nil {
483
484 // query param offset
485 var qrOffset int64
486 if o.Offset != nil {
487 qrOffset = *o.Offset
488 }
489 qOffset := swag.FormatInt64(qrOffset)
490 if qOffset != "" {
491 if err := r.SetQueryParam("offset", qOffset); err != nil {
492 return err
493 }
494 }
495
496 }
497
498 if o.Parent != nil {
499
500 // query param parent
501 var qrParent string
502 if o.Parent != nil {
503 qrParent = *o.Parent
504 }
505 qParent := qrParent
506 if qParent != "" {
507 if err := r.SetQueryParam("parent", qParent); err != nil {
508 return err
509 }
510 }
511
512 }
513
514 if o.Q != nil {
515
516 // query param q
517 var qrQ string
518 if o.Q != nil {
519 qrQ = *o.Q
520 }
521 qQ := qrQ
522 if qQ != "" {
523 if err := r.SetQueryParam("q", qQ); err != nil {
524 return err
525 }
526 }
527
528 }
529
530 if o.Role != nil {
531
532 // query param role
533 var qrRole string
534 if o.Role != nil {
535 qrRole = *o.Role
536 }
537 qRole := qrRole
538 if qRole != "" {
539 if err := r.SetQueryParam("role", qRole); err != nil {
540 return err
541 }
542 }
543
544 }
545
546 if o.Status != nil {
547
548 // query param status
549 var qrStatus string
550 if o.Status != nil {
551 qrStatus = *o.Status
552 }
553 qStatus := qrStatus
554 if qStatus != "" {
555 if err := r.SetQueryParam("status", qStatus); err != nil {
556 return err
557 }
558 }
559
560 }
561
562 if o.Tenant != nil {
563
564 // query param tenant
565 var qrTenant string
566 if o.Tenant != nil {
567 qrTenant = *o.Tenant
568 }
569 qTenant := qrTenant
570 if qTenant != "" {
571 if err := r.SetQueryParam("tenant", qTenant); err != nil {
572 return err
573 }
574 }
575
576 }
577
578 if o.TenantID != nil {
579
580 // query param tenant_id
581 var qrTenantID string
582 if o.TenantID != nil {
583 qrTenantID = *o.TenantID
584 }
585 qTenantID := qrTenantID
586 if qTenantID != "" {
587 if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
588 return err
589 }
590 }
591
592 }
593
594 if o.VirtualMachine != nil {
595
596 // query param virtual_machine
597 var qrVirtualMachine string
598 if o.VirtualMachine != nil {
599 qrVirtualMachine = *o.VirtualMachine
600 }
601 qVirtualMachine := qrVirtualMachine
602 if qVirtualMachine != "" {
603 if err := r.SetQueryParam("virtual_machine", qVirtualMachine); err != nil {
604 return err
605 }
606 }
607
608 }
609
610 if o.VirtualMachineID != nil {
611
612 // query param virtual_machine_id
613 var qrVirtualMachineID string
614 if o.VirtualMachineID != nil {
615 qrVirtualMachineID = *o.VirtualMachineID
616 }
617 qVirtualMachineID := qrVirtualMachineID
618 if qVirtualMachineID != "" {
619 if err := r.SetQueryParam("virtual_machine_id", qVirtualMachineID); err != nil {
620 return err
621 }
622 }
623
624 }
625
626 if o.Vrf != nil {
627
628 // query param vrf
629 var qrVrf string
630 if o.Vrf != nil {
631 qrVrf = *o.Vrf
632 }
633 qVrf := qrVrf
634 if qVrf != "" {
635 if err := r.SetQueryParam("vrf", qVrf); err != nil {
636 return err
637 }
638 }
639
640 }
641
642 if o.VrfID != nil {
643
644 // query param vrf_id
645 var qrVrfID string
646 if o.VrfID != nil {
647 qrVrfID = *o.VrfID
648 }
649 qVrfID := qrVrfID
650 if qVrfID != "" {
651 if err := r.SetQueryParam("vrf_id", qVrfID); err != nil {
652 return err
653 }
654 }
655
656 }
657
658 if len(res) > 0 {
659 return errors.CompositeValidationError(res...)
660 }
661 return nil
662}