Serge Bazanski | cc25bdf | 2018-10-25 14:02:58 +0200 | [diff] [blame] | 1 | // 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 | |
| 17 | package 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 | |
| 22 | import ( |
| 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 | // NewIPAMPrefixesListParams creates a new IPAMPrefixesListParams object |
| 37 | // with the default values initialized. |
| 38 | func NewIPAMPrefixesListParams() *IPAMPrefixesListParams { |
| 39 | var () |
| 40 | return &IPAMPrefixesListParams{ |
| 41 | |
| 42 | timeout: cr.DefaultTimeout, |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | // NewIPAMPrefixesListParamsWithTimeout creates a new IPAMPrefixesListParams object |
| 47 | // with the default values initialized, and the ability to set a timeout on a request |
| 48 | func NewIPAMPrefixesListParamsWithTimeout(timeout time.Duration) *IPAMPrefixesListParams { |
| 49 | var () |
| 50 | return &IPAMPrefixesListParams{ |
| 51 | |
| 52 | timeout: timeout, |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // NewIPAMPrefixesListParamsWithContext creates a new IPAMPrefixesListParams object |
| 57 | // with the default values initialized, and the ability to set a context for a request |
| 58 | func NewIPAMPrefixesListParamsWithContext(ctx context.Context) *IPAMPrefixesListParams { |
| 59 | var () |
| 60 | return &IPAMPrefixesListParams{ |
| 61 | |
| 62 | Context: ctx, |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | // NewIPAMPrefixesListParamsWithHTTPClient creates a new IPAMPrefixesListParams object |
| 67 | // with the default values initialized, and the ability to set a custom HTTPClient for a request |
| 68 | func NewIPAMPrefixesListParamsWithHTTPClient(client *http.Client) *IPAMPrefixesListParams { |
| 69 | var () |
| 70 | return &IPAMPrefixesListParams{ |
| 71 | HTTPClient: client, |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | /*IPAMPrefixesListParams contains all the parameters to send to the API endpoint |
| 76 | for the ipam prefixes list operation typically these are written to a http.Request |
| 77 | */ |
| 78 | type IPAMPrefixesListParams struct { |
| 79 | |
| 80 | /*Contains*/ |
| 81 | Contains *string |
| 82 | /*Family*/ |
| 83 | Family *string |
| 84 | /*IDIn |
| 85 | Multiple values may be separated by commas. |
| 86 | |
| 87 | */ |
| 88 | IDIn *string |
| 89 | /*IsPool*/ |
| 90 | IsPool *string |
| 91 | /*Limit |
| 92 | Number of results to return per page. |
| 93 | |
| 94 | */ |
| 95 | Limit *int64 |
| 96 | /*MaskLength*/ |
| 97 | MaskLength *float64 |
| 98 | /*Offset |
| 99 | The initial index from which to return the results. |
| 100 | |
| 101 | */ |
| 102 | Offset *int64 |
| 103 | /*Q*/ |
| 104 | Q *string |
| 105 | /*Role*/ |
| 106 | Role *string |
| 107 | /*RoleID*/ |
| 108 | RoleID *string |
| 109 | /*Site*/ |
| 110 | Site *string |
| 111 | /*SiteID*/ |
| 112 | SiteID *string |
| 113 | /*Status*/ |
| 114 | Status *string |
| 115 | /*Tenant*/ |
| 116 | Tenant *string |
| 117 | /*TenantID*/ |
| 118 | TenantID *string |
| 119 | /*VlanID*/ |
| 120 | VlanID *string |
| 121 | /*VlanVid*/ |
| 122 | VlanVid *float64 |
| 123 | /*Vrf*/ |
| 124 | Vrf *string |
| 125 | /*VrfID*/ |
| 126 | VrfID *string |
| 127 | /*Within*/ |
| 128 | Within *string |
| 129 | /*WithinInclude*/ |
| 130 | WithinInclude *string |
| 131 | |
| 132 | timeout time.Duration |
| 133 | Context context.Context |
| 134 | HTTPClient *http.Client |
| 135 | } |
| 136 | |
| 137 | // WithTimeout adds the timeout to the ipam prefixes list params |
| 138 | func (o *IPAMPrefixesListParams) WithTimeout(timeout time.Duration) *IPAMPrefixesListParams { |
| 139 | o.SetTimeout(timeout) |
| 140 | return o |
| 141 | } |
| 142 | |
| 143 | // SetTimeout adds the timeout to the ipam prefixes list params |
| 144 | func (o *IPAMPrefixesListParams) SetTimeout(timeout time.Duration) { |
| 145 | o.timeout = timeout |
| 146 | } |
| 147 | |
| 148 | // WithContext adds the context to the ipam prefixes list params |
| 149 | func (o *IPAMPrefixesListParams) WithContext(ctx context.Context) *IPAMPrefixesListParams { |
| 150 | o.SetContext(ctx) |
| 151 | return o |
| 152 | } |
| 153 | |
| 154 | // SetContext adds the context to the ipam prefixes list params |
| 155 | func (o *IPAMPrefixesListParams) SetContext(ctx context.Context) { |
| 156 | o.Context = ctx |
| 157 | } |
| 158 | |
| 159 | // WithHTTPClient adds the HTTPClient to the ipam prefixes list params |
| 160 | func (o *IPAMPrefixesListParams) WithHTTPClient(client *http.Client) *IPAMPrefixesListParams { |
| 161 | o.SetHTTPClient(client) |
| 162 | return o |
| 163 | } |
| 164 | |
| 165 | // SetHTTPClient adds the HTTPClient to the ipam prefixes list params |
| 166 | func (o *IPAMPrefixesListParams) SetHTTPClient(client *http.Client) { |
| 167 | o.HTTPClient = client |
| 168 | } |
| 169 | |
| 170 | // WithContains adds the contains to the ipam prefixes list params |
| 171 | func (o *IPAMPrefixesListParams) WithContains(contains *string) *IPAMPrefixesListParams { |
| 172 | o.SetContains(contains) |
| 173 | return o |
| 174 | } |
| 175 | |
| 176 | // SetContains adds the contains to the ipam prefixes list params |
| 177 | func (o *IPAMPrefixesListParams) SetContains(contains *string) { |
| 178 | o.Contains = contains |
| 179 | } |
| 180 | |
| 181 | // WithFamily adds the family to the ipam prefixes list params |
| 182 | func (o *IPAMPrefixesListParams) WithFamily(family *string) *IPAMPrefixesListParams { |
| 183 | o.SetFamily(family) |
| 184 | return o |
| 185 | } |
| 186 | |
| 187 | // SetFamily adds the family to the ipam prefixes list params |
| 188 | func (o *IPAMPrefixesListParams) SetFamily(family *string) { |
| 189 | o.Family = family |
| 190 | } |
| 191 | |
| 192 | // WithIDIn adds the iDIn to the ipam prefixes list params |
| 193 | func (o *IPAMPrefixesListParams) WithIDIn(iDIn *string) *IPAMPrefixesListParams { |
| 194 | o.SetIDIn(iDIn) |
| 195 | return o |
| 196 | } |
| 197 | |
| 198 | // SetIDIn adds the idIn to the ipam prefixes list params |
| 199 | func (o *IPAMPrefixesListParams) SetIDIn(iDIn *string) { |
| 200 | o.IDIn = iDIn |
| 201 | } |
| 202 | |
| 203 | // WithIsPool adds the isPool to the ipam prefixes list params |
| 204 | func (o *IPAMPrefixesListParams) WithIsPool(isPool *string) *IPAMPrefixesListParams { |
| 205 | o.SetIsPool(isPool) |
| 206 | return o |
| 207 | } |
| 208 | |
| 209 | // SetIsPool adds the isPool to the ipam prefixes list params |
| 210 | func (o *IPAMPrefixesListParams) SetIsPool(isPool *string) { |
| 211 | o.IsPool = isPool |
| 212 | } |
| 213 | |
| 214 | // WithLimit adds the limit to the ipam prefixes list params |
| 215 | func (o *IPAMPrefixesListParams) WithLimit(limit *int64) *IPAMPrefixesListParams { |
| 216 | o.SetLimit(limit) |
| 217 | return o |
| 218 | } |
| 219 | |
| 220 | // SetLimit adds the limit to the ipam prefixes list params |
| 221 | func (o *IPAMPrefixesListParams) SetLimit(limit *int64) { |
| 222 | o.Limit = limit |
| 223 | } |
| 224 | |
| 225 | // WithMaskLength adds the maskLength to the ipam prefixes list params |
| 226 | func (o *IPAMPrefixesListParams) WithMaskLength(maskLength *float64) *IPAMPrefixesListParams { |
| 227 | o.SetMaskLength(maskLength) |
| 228 | return o |
| 229 | } |
| 230 | |
| 231 | // SetMaskLength adds the maskLength to the ipam prefixes list params |
| 232 | func (o *IPAMPrefixesListParams) SetMaskLength(maskLength *float64) { |
| 233 | o.MaskLength = maskLength |
| 234 | } |
| 235 | |
| 236 | // WithOffset adds the offset to the ipam prefixes list params |
| 237 | func (o *IPAMPrefixesListParams) WithOffset(offset *int64) *IPAMPrefixesListParams { |
| 238 | o.SetOffset(offset) |
| 239 | return o |
| 240 | } |
| 241 | |
| 242 | // SetOffset adds the offset to the ipam prefixes list params |
| 243 | func (o *IPAMPrefixesListParams) SetOffset(offset *int64) { |
| 244 | o.Offset = offset |
| 245 | } |
| 246 | |
| 247 | // WithQ adds the q to the ipam prefixes list params |
| 248 | func (o *IPAMPrefixesListParams) WithQ(q *string) *IPAMPrefixesListParams { |
| 249 | o.SetQ(q) |
| 250 | return o |
| 251 | } |
| 252 | |
| 253 | // SetQ adds the q to the ipam prefixes list params |
| 254 | func (o *IPAMPrefixesListParams) SetQ(q *string) { |
| 255 | o.Q = q |
| 256 | } |
| 257 | |
| 258 | // WithRole adds the role to the ipam prefixes list params |
| 259 | func (o *IPAMPrefixesListParams) WithRole(role *string) *IPAMPrefixesListParams { |
| 260 | o.SetRole(role) |
| 261 | return o |
| 262 | } |
| 263 | |
| 264 | // SetRole adds the role to the ipam prefixes list params |
| 265 | func (o *IPAMPrefixesListParams) SetRole(role *string) { |
| 266 | o.Role = role |
| 267 | } |
| 268 | |
| 269 | // WithRoleID adds the roleID to the ipam prefixes list params |
| 270 | func (o *IPAMPrefixesListParams) WithRoleID(roleID *string) *IPAMPrefixesListParams { |
| 271 | o.SetRoleID(roleID) |
| 272 | return o |
| 273 | } |
| 274 | |
| 275 | // SetRoleID adds the roleId to the ipam prefixes list params |
| 276 | func (o *IPAMPrefixesListParams) SetRoleID(roleID *string) { |
| 277 | o.RoleID = roleID |
| 278 | } |
| 279 | |
| 280 | // WithSite adds the site to the ipam prefixes list params |
| 281 | func (o *IPAMPrefixesListParams) WithSite(site *string) *IPAMPrefixesListParams { |
| 282 | o.SetSite(site) |
| 283 | return o |
| 284 | } |
| 285 | |
| 286 | // SetSite adds the site to the ipam prefixes list params |
| 287 | func (o *IPAMPrefixesListParams) SetSite(site *string) { |
| 288 | o.Site = site |
| 289 | } |
| 290 | |
| 291 | // WithSiteID adds the siteID to the ipam prefixes list params |
| 292 | func (o *IPAMPrefixesListParams) WithSiteID(siteID *string) *IPAMPrefixesListParams { |
| 293 | o.SetSiteID(siteID) |
| 294 | return o |
| 295 | } |
| 296 | |
| 297 | // SetSiteID adds the siteId to the ipam prefixes list params |
| 298 | func (o *IPAMPrefixesListParams) SetSiteID(siteID *string) { |
| 299 | o.SiteID = siteID |
| 300 | } |
| 301 | |
| 302 | // WithStatus adds the status to the ipam prefixes list params |
| 303 | func (o *IPAMPrefixesListParams) WithStatus(status *string) *IPAMPrefixesListParams { |
| 304 | o.SetStatus(status) |
| 305 | return o |
| 306 | } |
| 307 | |
| 308 | // SetStatus adds the status to the ipam prefixes list params |
| 309 | func (o *IPAMPrefixesListParams) SetStatus(status *string) { |
| 310 | o.Status = status |
| 311 | } |
| 312 | |
| 313 | // WithTenant adds the tenant to the ipam prefixes list params |
| 314 | func (o *IPAMPrefixesListParams) WithTenant(tenant *string) *IPAMPrefixesListParams { |
| 315 | o.SetTenant(tenant) |
| 316 | return o |
| 317 | } |
| 318 | |
| 319 | // SetTenant adds the tenant to the ipam prefixes list params |
| 320 | func (o *IPAMPrefixesListParams) SetTenant(tenant *string) { |
| 321 | o.Tenant = tenant |
| 322 | } |
| 323 | |
| 324 | // WithTenantID adds the tenantID to the ipam prefixes list params |
| 325 | func (o *IPAMPrefixesListParams) WithTenantID(tenantID *string) *IPAMPrefixesListParams { |
| 326 | o.SetTenantID(tenantID) |
| 327 | return o |
| 328 | } |
| 329 | |
| 330 | // SetTenantID adds the tenantId to the ipam prefixes list params |
| 331 | func (o *IPAMPrefixesListParams) SetTenantID(tenantID *string) { |
| 332 | o.TenantID = tenantID |
| 333 | } |
| 334 | |
| 335 | // WithVlanID adds the vlanID to the ipam prefixes list params |
| 336 | func (o *IPAMPrefixesListParams) WithVlanID(vlanID *string) *IPAMPrefixesListParams { |
| 337 | o.SetVlanID(vlanID) |
| 338 | return o |
| 339 | } |
| 340 | |
| 341 | // SetVlanID adds the vlanId to the ipam prefixes list params |
| 342 | func (o *IPAMPrefixesListParams) SetVlanID(vlanID *string) { |
| 343 | o.VlanID = vlanID |
| 344 | } |
| 345 | |
| 346 | // WithVlanVid adds the vlanVid to the ipam prefixes list params |
| 347 | func (o *IPAMPrefixesListParams) WithVlanVid(vlanVid *float64) *IPAMPrefixesListParams { |
| 348 | o.SetVlanVid(vlanVid) |
| 349 | return o |
| 350 | } |
| 351 | |
| 352 | // SetVlanVid adds the vlanVid to the ipam prefixes list params |
| 353 | func (o *IPAMPrefixesListParams) SetVlanVid(vlanVid *float64) { |
| 354 | o.VlanVid = vlanVid |
| 355 | } |
| 356 | |
| 357 | // WithVrf adds the vrf to the ipam prefixes list params |
| 358 | func (o *IPAMPrefixesListParams) WithVrf(vrf *string) *IPAMPrefixesListParams { |
| 359 | o.SetVrf(vrf) |
| 360 | return o |
| 361 | } |
| 362 | |
| 363 | // SetVrf adds the vrf to the ipam prefixes list params |
| 364 | func (o *IPAMPrefixesListParams) SetVrf(vrf *string) { |
| 365 | o.Vrf = vrf |
| 366 | } |
| 367 | |
| 368 | // WithVrfID adds the vrfID to the ipam prefixes list params |
| 369 | func (o *IPAMPrefixesListParams) WithVrfID(vrfID *string) *IPAMPrefixesListParams { |
| 370 | o.SetVrfID(vrfID) |
| 371 | return o |
| 372 | } |
| 373 | |
| 374 | // SetVrfID adds the vrfId to the ipam prefixes list params |
| 375 | func (o *IPAMPrefixesListParams) SetVrfID(vrfID *string) { |
| 376 | o.VrfID = vrfID |
| 377 | } |
| 378 | |
| 379 | // WithWithin adds the within to the ipam prefixes list params |
| 380 | func (o *IPAMPrefixesListParams) WithWithin(within *string) *IPAMPrefixesListParams { |
| 381 | o.SetWithin(within) |
| 382 | return o |
| 383 | } |
| 384 | |
| 385 | // SetWithin adds the within to the ipam prefixes list params |
| 386 | func (o *IPAMPrefixesListParams) SetWithin(within *string) { |
| 387 | o.Within = within |
| 388 | } |
| 389 | |
| 390 | // WithWithinInclude adds the withinInclude to the ipam prefixes list params |
| 391 | func (o *IPAMPrefixesListParams) WithWithinInclude(withinInclude *string) *IPAMPrefixesListParams { |
| 392 | o.SetWithinInclude(withinInclude) |
| 393 | return o |
| 394 | } |
| 395 | |
| 396 | // SetWithinInclude adds the withinInclude to the ipam prefixes list params |
| 397 | func (o *IPAMPrefixesListParams) SetWithinInclude(withinInclude *string) { |
| 398 | o.WithinInclude = withinInclude |
| 399 | } |
| 400 | |
| 401 | // WriteToRequest writes these params to a swagger request |
| 402 | func (o *IPAMPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { |
| 403 | |
| 404 | if err := r.SetTimeout(o.timeout); err != nil { |
| 405 | return err |
| 406 | } |
| 407 | var res []error |
| 408 | |
| 409 | if o.Contains != nil { |
| 410 | |
| 411 | // query param contains |
| 412 | var qrContains string |
| 413 | if o.Contains != nil { |
| 414 | qrContains = *o.Contains |
| 415 | } |
| 416 | qContains := qrContains |
| 417 | if qContains != "" { |
| 418 | if err := r.SetQueryParam("contains", qContains); err != nil { |
| 419 | return err |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | } |
| 424 | |
| 425 | if o.Family != nil { |
| 426 | |
| 427 | // query param family |
| 428 | var qrFamily string |
| 429 | if o.Family != nil { |
| 430 | qrFamily = *o.Family |
| 431 | } |
| 432 | qFamily := qrFamily |
| 433 | if qFamily != "" { |
| 434 | if err := r.SetQueryParam("family", qFamily); err != nil { |
| 435 | return err |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | } |
| 440 | |
| 441 | if o.IDIn != nil { |
| 442 | |
| 443 | // query param id__in |
| 444 | var qrIDIn string |
| 445 | if o.IDIn != nil { |
| 446 | qrIDIn = *o.IDIn |
| 447 | } |
| 448 | qIDIn := qrIDIn |
| 449 | if qIDIn != "" { |
| 450 | if err := r.SetQueryParam("id__in", qIDIn); err != nil { |
| 451 | return err |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | } |
| 456 | |
| 457 | if o.IsPool != nil { |
| 458 | |
| 459 | // query param is_pool |
| 460 | var qrIsPool string |
| 461 | if o.IsPool != nil { |
| 462 | qrIsPool = *o.IsPool |
| 463 | } |
| 464 | qIsPool := qrIsPool |
| 465 | if qIsPool != "" { |
| 466 | if err := r.SetQueryParam("is_pool", qIsPool); err != nil { |
| 467 | return err |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | } |
| 472 | |
| 473 | if o.Limit != nil { |
| 474 | |
| 475 | // query param limit |
| 476 | var qrLimit int64 |
| 477 | if o.Limit != nil { |
| 478 | qrLimit = *o.Limit |
| 479 | } |
| 480 | qLimit := swag.FormatInt64(qrLimit) |
| 481 | if qLimit != "" { |
| 482 | if err := r.SetQueryParam("limit", qLimit); err != nil { |
| 483 | return err |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | } |
| 488 | |
| 489 | if o.MaskLength != nil { |
| 490 | |
| 491 | // query param mask_length |
| 492 | var qrMaskLength float64 |
| 493 | if o.MaskLength != nil { |
| 494 | qrMaskLength = *o.MaskLength |
| 495 | } |
| 496 | qMaskLength := swag.FormatFloat64(qrMaskLength) |
| 497 | if qMaskLength != "" { |
| 498 | if err := r.SetQueryParam("mask_length", qMaskLength); err != nil { |
| 499 | return err |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | } |
| 504 | |
| 505 | if o.Offset != nil { |
| 506 | |
| 507 | // query param offset |
| 508 | var qrOffset int64 |
| 509 | if o.Offset != nil { |
| 510 | qrOffset = *o.Offset |
| 511 | } |
| 512 | qOffset := swag.FormatInt64(qrOffset) |
| 513 | if qOffset != "" { |
| 514 | if err := r.SetQueryParam("offset", qOffset); err != nil { |
| 515 | return err |
| 516 | } |
| 517 | } |
| 518 | |
| 519 | } |
| 520 | |
| 521 | if o.Q != nil { |
| 522 | |
| 523 | // query param q |
| 524 | var qrQ string |
| 525 | if o.Q != nil { |
| 526 | qrQ = *o.Q |
| 527 | } |
| 528 | qQ := qrQ |
| 529 | if qQ != "" { |
| 530 | if err := r.SetQueryParam("q", qQ); err != nil { |
| 531 | return err |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | } |
| 536 | |
| 537 | if o.Role != nil { |
| 538 | |
| 539 | // query param role |
| 540 | var qrRole string |
| 541 | if o.Role != nil { |
| 542 | qrRole = *o.Role |
| 543 | } |
| 544 | qRole := qrRole |
| 545 | if qRole != "" { |
| 546 | if err := r.SetQueryParam("role", qRole); err != nil { |
| 547 | return err |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | } |
| 552 | |
| 553 | if o.RoleID != nil { |
| 554 | |
| 555 | // query param role_id |
| 556 | var qrRoleID string |
| 557 | if o.RoleID != nil { |
| 558 | qrRoleID = *o.RoleID |
| 559 | } |
| 560 | qRoleID := qrRoleID |
| 561 | if qRoleID != "" { |
| 562 | if err := r.SetQueryParam("role_id", qRoleID); err != nil { |
| 563 | return err |
| 564 | } |
| 565 | } |
| 566 | |
| 567 | } |
| 568 | |
| 569 | if o.Site != nil { |
| 570 | |
| 571 | // query param site |
| 572 | var qrSite string |
| 573 | if o.Site != nil { |
| 574 | qrSite = *o.Site |
| 575 | } |
| 576 | qSite := qrSite |
| 577 | if qSite != "" { |
| 578 | if err := r.SetQueryParam("site", qSite); err != nil { |
| 579 | return err |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | } |
| 584 | |
| 585 | if o.SiteID != nil { |
| 586 | |
| 587 | // query param site_id |
| 588 | var qrSiteID string |
| 589 | if o.SiteID != nil { |
| 590 | qrSiteID = *o.SiteID |
| 591 | } |
| 592 | qSiteID := qrSiteID |
| 593 | if qSiteID != "" { |
| 594 | if err := r.SetQueryParam("site_id", qSiteID); err != nil { |
| 595 | return err |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | } |
| 600 | |
| 601 | if o.Status != nil { |
| 602 | |
| 603 | // query param status |
| 604 | var qrStatus string |
| 605 | if o.Status != nil { |
| 606 | qrStatus = *o.Status |
| 607 | } |
| 608 | qStatus := qrStatus |
| 609 | if qStatus != "" { |
| 610 | if err := r.SetQueryParam("status", qStatus); err != nil { |
| 611 | return err |
| 612 | } |
| 613 | } |
| 614 | |
| 615 | } |
| 616 | |
| 617 | if o.Tenant != nil { |
| 618 | |
| 619 | // query param tenant |
| 620 | var qrTenant string |
| 621 | if o.Tenant != nil { |
| 622 | qrTenant = *o.Tenant |
| 623 | } |
| 624 | qTenant := qrTenant |
| 625 | if qTenant != "" { |
| 626 | if err := r.SetQueryParam("tenant", qTenant); err != nil { |
| 627 | return err |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | } |
| 632 | |
| 633 | if o.TenantID != nil { |
| 634 | |
| 635 | // query param tenant_id |
| 636 | var qrTenantID string |
| 637 | if o.TenantID != nil { |
| 638 | qrTenantID = *o.TenantID |
| 639 | } |
| 640 | qTenantID := qrTenantID |
| 641 | if qTenantID != "" { |
| 642 | if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { |
| 643 | return err |
| 644 | } |
| 645 | } |
| 646 | |
| 647 | } |
| 648 | |
| 649 | if o.VlanID != nil { |
| 650 | |
| 651 | // query param vlan_id |
| 652 | var qrVlanID string |
| 653 | if o.VlanID != nil { |
| 654 | qrVlanID = *o.VlanID |
| 655 | } |
| 656 | qVlanID := qrVlanID |
| 657 | if qVlanID != "" { |
| 658 | if err := r.SetQueryParam("vlan_id", qVlanID); err != nil { |
| 659 | return err |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | } |
| 664 | |
| 665 | if o.VlanVid != nil { |
| 666 | |
| 667 | // query param vlan_vid |
| 668 | var qrVlanVid float64 |
| 669 | if o.VlanVid != nil { |
| 670 | qrVlanVid = *o.VlanVid |
| 671 | } |
| 672 | qVlanVid := swag.FormatFloat64(qrVlanVid) |
| 673 | if qVlanVid != "" { |
| 674 | if err := r.SetQueryParam("vlan_vid", qVlanVid); err != nil { |
| 675 | return err |
| 676 | } |
| 677 | } |
| 678 | |
| 679 | } |
| 680 | |
| 681 | if o.Vrf != nil { |
| 682 | |
| 683 | // query param vrf |
| 684 | var qrVrf string |
| 685 | if o.Vrf != nil { |
| 686 | qrVrf = *o.Vrf |
| 687 | } |
| 688 | qVrf := qrVrf |
| 689 | if qVrf != "" { |
| 690 | if err := r.SetQueryParam("vrf", qVrf); err != nil { |
| 691 | return err |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | } |
| 696 | |
| 697 | if o.VrfID != nil { |
| 698 | |
| 699 | // query param vrf_id |
| 700 | var qrVrfID string |
| 701 | if o.VrfID != nil { |
| 702 | qrVrfID = *o.VrfID |
| 703 | } |
| 704 | qVrfID := qrVrfID |
| 705 | if qVrfID != "" { |
| 706 | if err := r.SetQueryParam("vrf_id", qVrfID); err != nil { |
| 707 | return err |
| 708 | } |
| 709 | } |
| 710 | |
| 711 | } |
| 712 | |
| 713 | if o.Within != nil { |
| 714 | |
| 715 | // query param within |
| 716 | var qrWithin string |
| 717 | if o.Within != nil { |
| 718 | qrWithin = *o.Within |
| 719 | } |
| 720 | qWithin := qrWithin |
| 721 | if qWithin != "" { |
| 722 | if err := r.SetQueryParam("within", qWithin); err != nil { |
| 723 | return err |
| 724 | } |
| 725 | } |
| 726 | |
| 727 | } |
| 728 | |
| 729 | if o.WithinInclude != nil { |
| 730 | |
| 731 | // query param within_include |
| 732 | var qrWithinInclude string |
| 733 | if o.WithinInclude != nil { |
| 734 | qrWithinInclude = *o.WithinInclude |
| 735 | } |
| 736 | qWithinInclude := qrWithinInclude |
| 737 | if qWithinInclude != "" { |
| 738 | if err := r.SetQueryParam("within_include", qWithinInclude); err != nil { |
| 739 | return err |
| 740 | } |
| 741 | } |
| 742 | |
| 743 | } |
| 744 | |
| 745 | if len(res) > 0 { |
| 746 | return errors.CompositeValidationError(res...) |
| 747 | } |
| 748 | return nil |
| 749 | } |