github.com/digitalocean/go-netbox@v0.0.2/netbox/client/circuits/circuits_provider_networks_list_parameters.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 // Copyright 2020 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 18 package circuits 19 20 // This file was generated by the swagger tool. 21 // Editing this file might prove futile when you re-run the swagger generate command 22 23 import ( 24 "context" 25 "net/http" 26 "time" 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/strfmt" 32 "github.com/go-openapi/swag" 33 ) 34 35 // NewCircuitsProviderNetworksListParams creates a new CircuitsProviderNetworksListParams object, 36 // with the default timeout for this client. 37 // 38 // Default values are not hydrated, since defaults are normally applied by the API server side. 39 // 40 // To enforce default values in parameter, use SetDefaults or WithDefaults. 41 func NewCircuitsProviderNetworksListParams() *CircuitsProviderNetworksListParams { 42 return &CircuitsProviderNetworksListParams{ 43 timeout: cr.DefaultTimeout, 44 } 45 } 46 47 // NewCircuitsProviderNetworksListParamsWithTimeout creates a new CircuitsProviderNetworksListParams object 48 // with the ability to set a timeout on a request. 49 func NewCircuitsProviderNetworksListParamsWithTimeout(timeout time.Duration) *CircuitsProviderNetworksListParams { 50 return &CircuitsProviderNetworksListParams{ 51 timeout: timeout, 52 } 53 } 54 55 // NewCircuitsProviderNetworksListParamsWithContext creates a new CircuitsProviderNetworksListParams object 56 // with the ability to set a context for a request. 57 func NewCircuitsProviderNetworksListParamsWithContext(ctx context.Context) *CircuitsProviderNetworksListParams { 58 return &CircuitsProviderNetworksListParams{ 59 Context: ctx, 60 } 61 } 62 63 // NewCircuitsProviderNetworksListParamsWithHTTPClient creates a new CircuitsProviderNetworksListParams object 64 // with the ability to set a custom HTTPClient for a request. 65 func NewCircuitsProviderNetworksListParamsWithHTTPClient(client *http.Client) *CircuitsProviderNetworksListParams { 66 return &CircuitsProviderNetworksListParams{ 67 HTTPClient: client, 68 } 69 } 70 71 /* CircuitsProviderNetworksListParams contains all the parameters to send to the API endpoint 72 for the circuits provider networks list operation. 73 74 Typically these are written to a http.Request. 75 */ 76 type CircuitsProviderNetworksListParams struct { 77 78 // Created. 79 Created *string 80 81 // CreatedGte. 82 CreatedGte *string 83 84 // CreatedLte. 85 CreatedLte *string 86 87 // ID. 88 ID *string 89 90 // IDGt. 91 IDGt *string 92 93 // IDGte. 94 IDGte *string 95 96 // IDLt. 97 IDLt *string 98 99 // IDLte. 100 IDLte *string 101 102 // IDn. 103 IDn *string 104 105 // LastUpdated. 106 LastUpdated *string 107 108 // LastUpdatedGte. 109 LastUpdatedGte *string 110 111 // LastUpdatedLte. 112 LastUpdatedLte *string 113 114 /* Limit. 115 116 Number of results to return per page. 117 */ 118 Limit *int64 119 120 // Name. 121 Name *string 122 123 // NameEmpty. 124 NameEmpty *string 125 126 // NameIc. 127 NameIc *string 128 129 // NameIe. 130 NameIe *string 131 132 // NameIew. 133 NameIew *string 134 135 // NameIsw. 136 NameIsw *string 137 138 // Namen. 139 Namen *string 140 141 // NameNic. 142 NameNic *string 143 144 // NameNie. 145 NameNie *string 146 147 // NameNiew. 148 NameNiew *string 149 150 // NameNisw. 151 NameNisw *string 152 153 /* Offset. 154 155 The initial index from which to return the results. 156 */ 157 Offset *int64 158 159 // Provider. 160 Provider *string 161 162 // Providern. 163 Providern *string 164 165 // ProviderID. 166 ProviderID *string 167 168 // ProviderIDn. 169 ProviderIDn *string 170 171 // Q. 172 Q *string 173 174 // Tag. 175 Tag *string 176 177 // Tagn. 178 Tagn *string 179 180 timeout time.Duration 181 Context context.Context 182 HTTPClient *http.Client 183 } 184 185 // WithDefaults hydrates default values in the circuits provider networks list params (not the query body). 186 // 187 // All values with no default are reset to their zero value. 188 func (o *CircuitsProviderNetworksListParams) WithDefaults() *CircuitsProviderNetworksListParams { 189 o.SetDefaults() 190 return o 191 } 192 193 // SetDefaults hydrates default values in the circuits provider networks list params (not the query body). 194 // 195 // All values with no default are reset to their zero value. 196 func (o *CircuitsProviderNetworksListParams) SetDefaults() { 197 // no default values defined for this parameter 198 } 199 200 // WithTimeout adds the timeout to the circuits provider networks list params 201 func (o *CircuitsProviderNetworksListParams) WithTimeout(timeout time.Duration) *CircuitsProviderNetworksListParams { 202 o.SetTimeout(timeout) 203 return o 204 } 205 206 // SetTimeout adds the timeout to the circuits provider networks list params 207 func (o *CircuitsProviderNetworksListParams) SetTimeout(timeout time.Duration) { 208 o.timeout = timeout 209 } 210 211 // WithContext adds the context to the circuits provider networks list params 212 func (o *CircuitsProviderNetworksListParams) WithContext(ctx context.Context) *CircuitsProviderNetworksListParams { 213 o.SetContext(ctx) 214 return o 215 } 216 217 // SetContext adds the context to the circuits provider networks list params 218 func (o *CircuitsProviderNetworksListParams) SetContext(ctx context.Context) { 219 o.Context = ctx 220 } 221 222 // WithHTTPClient adds the HTTPClient to the circuits provider networks list params 223 func (o *CircuitsProviderNetworksListParams) WithHTTPClient(client *http.Client) *CircuitsProviderNetworksListParams { 224 o.SetHTTPClient(client) 225 return o 226 } 227 228 // SetHTTPClient adds the HTTPClient to the circuits provider networks list params 229 func (o *CircuitsProviderNetworksListParams) SetHTTPClient(client *http.Client) { 230 o.HTTPClient = client 231 } 232 233 // WithCreated adds the created to the circuits provider networks list params 234 func (o *CircuitsProviderNetworksListParams) WithCreated(created *string) *CircuitsProviderNetworksListParams { 235 o.SetCreated(created) 236 return o 237 } 238 239 // SetCreated adds the created to the circuits provider networks list params 240 func (o *CircuitsProviderNetworksListParams) SetCreated(created *string) { 241 o.Created = created 242 } 243 244 // WithCreatedGte adds the createdGte to the circuits provider networks list params 245 func (o *CircuitsProviderNetworksListParams) WithCreatedGte(createdGte *string) *CircuitsProviderNetworksListParams { 246 o.SetCreatedGte(createdGte) 247 return o 248 } 249 250 // SetCreatedGte adds the createdGte to the circuits provider networks list params 251 func (o *CircuitsProviderNetworksListParams) SetCreatedGte(createdGte *string) { 252 o.CreatedGte = createdGte 253 } 254 255 // WithCreatedLte adds the createdLte to the circuits provider networks list params 256 func (o *CircuitsProviderNetworksListParams) WithCreatedLte(createdLte *string) *CircuitsProviderNetworksListParams { 257 o.SetCreatedLte(createdLte) 258 return o 259 } 260 261 // SetCreatedLte adds the createdLte to the circuits provider networks list params 262 func (o *CircuitsProviderNetworksListParams) SetCreatedLte(createdLte *string) { 263 o.CreatedLte = createdLte 264 } 265 266 // WithID adds the id to the circuits provider networks list params 267 func (o *CircuitsProviderNetworksListParams) WithID(id *string) *CircuitsProviderNetworksListParams { 268 o.SetID(id) 269 return o 270 } 271 272 // SetID adds the id to the circuits provider networks list params 273 func (o *CircuitsProviderNetworksListParams) SetID(id *string) { 274 o.ID = id 275 } 276 277 // WithIDGt adds the iDGt to the circuits provider networks list params 278 func (o *CircuitsProviderNetworksListParams) WithIDGt(iDGt *string) *CircuitsProviderNetworksListParams { 279 o.SetIDGt(iDGt) 280 return o 281 } 282 283 // SetIDGt adds the idGt to the circuits provider networks list params 284 func (o *CircuitsProviderNetworksListParams) SetIDGt(iDGt *string) { 285 o.IDGt = iDGt 286 } 287 288 // WithIDGte adds the iDGte to the circuits provider networks list params 289 func (o *CircuitsProviderNetworksListParams) WithIDGte(iDGte *string) *CircuitsProviderNetworksListParams { 290 o.SetIDGte(iDGte) 291 return o 292 } 293 294 // SetIDGte adds the idGte to the circuits provider networks list params 295 func (o *CircuitsProviderNetworksListParams) SetIDGte(iDGte *string) { 296 o.IDGte = iDGte 297 } 298 299 // WithIDLt adds the iDLt to the circuits provider networks list params 300 func (o *CircuitsProviderNetworksListParams) WithIDLt(iDLt *string) *CircuitsProviderNetworksListParams { 301 o.SetIDLt(iDLt) 302 return o 303 } 304 305 // SetIDLt adds the idLt to the circuits provider networks list params 306 func (o *CircuitsProviderNetworksListParams) SetIDLt(iDLt *string) { 307 o.IDLt = iDLt 308 } 309 310 // WithIDLte adds the iDLte to the circuits provider networks list params 311 func (o *CircuitsProviderNetworksListParams) WithIDLte(iDLte *string) *CircuitsProviderNetworksListParams { 312 o.SetIDLte(iDLte) 313 return o 314 } 315 316 // SetIDLte adds the idLte to the circuits provider networks list params 317 func (o *CircuitsProviderNetworksListParams) SetIDLte(iDLte *string) { 318 o.IDLte = iDLte 319 } 320 321 // WithIDn adds the iDn to the circuits provider networks list params 322 func (o *CircuitsProviderNetworksListParams) WithIDn(iDn *string) *CircuitsProviderNetworksListParams { 323 o.SetIDn(iDn) 324 return o 325 } 326 327 // SetIDn adds the idN to the circuits provider networks list params 328 func (o *CircuitsProviderNetworksListParams) SetIDn(iDn *string) { 329 o.IDn = iDn 330 } 331 332 // WithLastUpdated adds the lastUpdated to the circuits provider networks list params 333 func (o *CircuitsProviderNetworksListParams) WithLastUpdated(lastUpdated *string) *CircuitsProviderNetworksListParams { 334 o.SetLastUpdated(lastUpdated) 335 return o 336 } 337 338 // SetLastUpdated adds the lastUpdated to the circuits provider networks list params 339 func (o *CircuitsProviderNetworksListParams) SetLastUpdated(lastUpdated *string) { 340 o.LastUpdated = lastUpdated 341 } 342 343 // WithLastUpdatedGte adds the lastUpdatedGte to the circuits provider networks list params 344 func (o *CircuitsProviderNetworksListParams) WithLastUpdatedGte(lastUpdatedGte *string) *CircuitsProviderNetworksListParams { 345 o.SetLastUpdatedGte(lastUpdatedGte) 346 return o 347 } 348 349 // SetLastUpdatedGte adds the lastUpdatedGte to the circuits provider networks list params 350 func (o *CircuitsProviderNetworksListParams) SetLastUpdatedGte(lastUpdatedGte *string) { 351 o.LastUpdatedGte = lastUpdatedGte 352 } 353 354 // WithLastUpdatedLte adds the lastUpdatedLte to the circuits provider networks list params 355 func (o *CircuitsProviderNetworksListParams) WithLastUpdatedLte(lastUpdatedLte *string) *CircuitsProviderNetworksListParams { 356 o.SetLastUpdatedLte(lastUpdatedLte) 357 return o 358 } 359 360 // SetLastUpdatedLte adds the lastUpdatedLte to the circuits provider networks list params 361 func (o *CircuitsProviderNetworksListParams) SetLastUpdatedLte(lastUpdatedLte *string) { 362 o.LastUpdatedLte = lastUpdatedLte 363 } 364 365 // WithLimit adds the limit to the circuits provider networks list params 366 func (o *CircuitsProviderNetworksListParams) WithLimit(limit *int64) *CircuitsProviderNetworksListParams { 367 o.SetLimit(limit) 368 return o 369 } 370 371 // SetLimit adds the limit to the circuits provider networks list params 372 func (o *CircuitsProviderNetworksListParams) SetLimit(limit *int64) { 373 o.Limit = limit 374 } 375 376 // WithName adds the name to the circuits provider networks list params 377 func (o *CircuitsProviderNetworksListParams) WithName(name *string) *CircuitsProviderNetworksListParams { 378 o.SetName(name) 379 return o 380 } 381 382 // SetName adds the name to the circuits provider networks list params 383 func (o *CircuitsProviderNetworksListParams) SetName(name *string) { 384 o.Name = name 385 } 386 387 // WithNameEmpty adds the nameEmpty to the circuits provider networks list params 388 func (o *CircuitsProviderNetworksListParams) WithNameEmpty(nameEmpty *string) *CircuitsProviderNetworksListParams { 389 o.SetNameEmpty(nameEmpty) 390 return o 391 } 392 393 // SetNameEmpty adds the nameEmpty to the circuits provider networks list params 394 func (o *CircuitsProviderNetworksListParams) SetNameEmpty(nameEmpty *string) { 395 o.NameEmpty = nameEmpty 396 } 397 398 // WithNameIc adds the nameIc to the circuits provider networks list params 399 func (o *CircuitsProviderNetworksListParams) WithNameIc(nameIc *string) *CircuitsProviderNetworksListParams { 400 o.SetNameIc(nameIc) 401 return o 402 } 403 404 // SetNameIc adds the nameIc to the circuits provider networks list params 405 func (o *CircuitsProviderNetworksListParams) SetNameIc(nameIc *string) { 406 o.NameIc = nameIc 407 } 408 409 // WithNameIe adds the nameIe to the circuits provider networks list params 410 func (o *CircuitsProviderNetworksListParams) WithNameIe(nameIe *string) *CircuitsProviderNetworksListParams { 411 o.SetNameIe(nameIe) 412 return o 413 } 414 415 // SetNameIe adds the nameIe to the circuits provider networks list params 416 func (o *CircuitsProviderNetworksListParams) SetNameIe(nameIe *string) { 417 o.NameIe = nameIe 418 } 419 420 // WithNameIew adds the nameIew to the circuits provider networks list params 421 func (o *CircuitsProviderNetworksListParams) WithNameIew(nameIew *string) *CircuitsProviderNetworksListParams { 422 o.SetNameIew(nameIew) 423 return o 424 } 425 426 // SetNameIew adds the nameIew to the circuits provider networks list params 427 func (o *CircuitsProviderNetworksListParams) SetNameIew(nameIew *string) { 428 o.NameIew = nameIew 429 } 430 431 // WithNameIsw adds the nameIsw to the circuits provider networks list params 432 func (o *CircuitsProviderNetworksListParams) WithNameIsw(nameIsw *string) *CircuitsProviderNetworksListParams { 433 o.SetNameIsw(nameIsw) 434 return o 435 } 436 437 // SetNameIsw adds the nameIsw to the circuits provider networks list params 438 func (o *CircuitsProviderNetworksListParams) SetNameIsw(nameIsw *string) { 439 o.NameIsw = nameIsw 440 } 441 442 // WithNamen adds the namen to the circuits provider networks list params 443 func (o *CircuitsProviderNetworksListParams) WithNamen(namen *string) *CircuitsProviderNetworksListParams { 444 o.SetNamen(namen) 445 return o 446 } 447 448 // SetNamen adds the nameN to the circuits provider networks list params 449 func (o *CircuitsProviderNetworksListParams) SetNamen(namen *string) { 450 o.Namen = namen 451 } 452 453 // WithNameNic adds the nameNic to the circuits provider networks list params 454 func (o *CircuitsProviderNetworksListParams) WithNameNic(nameNic *string) *CircuitsProviderNetworksListParams { 455 o.SetNameNic(nameNic) 456 return o 457 } 458 459 // SetNameNic adds the nameNic to the circuits provider networks list params 460 func (o *CircuitsProviderNetworksListParams) SetNameNic(nameNic *string) { 461 o.NameNic = nameNic 462 } 463 464 // WithNameNie adds the nameNie to the circuits provider networks list params 465 func (o *CircuitsProviderNetworksListParams) WithNameNie(nameNie *string) *CircuitsProviderNetworksListParams { 466 o.SetNameNie(nameNie) 467 return o 468 } 469 470 // SetNameNie adds the nameNie to the circuits provider networks list params 471 func (o *CircuitsProviderNetworksListParams) SetNameNie(nameNie *string) { 472 o.NameNie = nameNie 473 } 474 475 // WithNameNiew adds the nameNiew to the circuits provider networks list params 476 func (o *CircuitsProviderNetworksListParams) WithNameNiew(nameNiew *string) *CircuitsProviderNetworksListParams { 477 o.SetNameNiew(nameNiew) 478 return o 479 } 480 481 // SetNameNiew adds the nameNiew to the circuits provider networks list params 482 func (o *CircuitsProviderNetworksListParams) SetNameNiew(nameNiew *string) { 483 o.NameNiew = nameNiew 484 } 485 486 // WithNameNisw adds the nameNisw to the circuits provider networks list params 487 func (o *CircuitsProviderNetworksListParams) WithNameNisw(nameNisw *string) *CircuitsProviderNetworksListParams { 488 o.SetNameNisw(nameNisw) 489 return o 490 } 491 492 // SetNameNisw adds the nameNisw to the circuits provider networks list params 493 func (o *CircuitsProviderNetworksListParams) SetNameNisw(nameNisw *string) { 494 o.NameNisw = nameNisw 495 } 496 497 // WithOffset adds the offset to the circuits provider networks list params 498 func (o *CircuitsProviderNetworksListParams) WithOffset(offset *int64) *CircuitsProviderNetworksListParams { 499 o.SetOffset(offset) 500 return o 501 } 502 503 // SetOffset adds the offset to the circuits provider networks list params 504 func (o *CircuitsProviderNetworksListParams) SetOffset(offset *int64) { 505 o.Offset = offset 506 } 507 508 // WithProvider adds the provider to the circuits provider networks list params 509 func (o *CircuitsProviderNetworksListParams) WithProvider(provider *string) *CircuitsProviderNetworksListParams { 510 o.SetProvider(provider) 511 return o 512 } 513 514 // SetProvider adds the provider to the circuits provider networks list params 515 func (o *CircuitsProviderNetworksListParams) SetProvider(provider *string) { 516 o.Provider = provider 517 } 518 519 // WithProvidern adds the providern to the circuits provider networks list params 520 func (o *CircuitsProviderNetworksListParams) WithProvidern(providern *string) *CircuitsProviderNetworksListParams { 521 o.SetProvidern(providern) 522 return o 523 } 524 525 // SetProvidern adds the providerN to the circuits provider networks list params 526 func (o *CircuitsProviderNetworksListParams) SetProvidern(providern *string) { 527 o.Providern = providern 528 } 529 530 // WithProviderID adds the providerID to the circuits provider networks list params 531 func (o *CircuitsProviderNetworksListParams) WithProviderID(providerID *string) *CircuitsProviderNetworksListParams { 532 o.SetProviderID(providerID) 533 return o 534 } 535 536 // SetProviderID adds the providerId to the circuits provider networks list params 537 func (o *CircuitsProviderNetworksListParams) SetProviderID(providerID *string) { 538 o.ProviderID = providerID 539 } 540 541 // WithProviderIDn adds the providerIDn to the circuits provider networks list params 542 func (o *CircuitsProviderNetworksListParams) WithProviderIDn(providerIDn *string) *CircuitsProviderNetworksListParams { 543 o.SetProviderIDn(providerIDn) 544 return o 545 } 546 547 // SetProviderIDn adds the providerIdN to the circuits provider networks list params 548 func (o *CircuitsProviderNetworksListParams) SetProviderIDn(providerIDn *string) { 549 o.ProviderIDn = providerIDn 550 } 551 552 // WithQ adds the q to the circuits provider networks list params 553 func (o *CircuitsProviderNetworksListParams) WithQ(q *string) *CircuitsProviderNetworksListParams { 554 o.SetQ(q) 555 return o 556 } 557 558 // SetQ adds the q to the circuits provider networks list params 559 func (o *CircuitsProviderNetworksListParams) SetQ(q *string) { 560 o.Q = q 561 } 562 563 // WithTag adds the tag to the circuits provider networks list params 564 func (o *CircuitsProviderNetworksListParams) WithTag(tag *string) *CircuitsProviderNetworksListParams { 565 o.SetTag(tag) 566 return o 567 } 568 569 // SetTag adds the tag to the circuits provider networks list params 570 func (o *CircuitsProviderNetworksListParams) SetTag(tag *string) { 571 o.Tag = tag 572 } 573 574 // WithTagn adds the tagn to the circuits provider networks list params 575 func (o *CircuitsProviderNetworksListParams) WithTagn(tagn *string) *CircuitsProviderNetworksListParams { 576 o.SetTagn(tagn) 577 return o 578 } 579 580 // SetTagn adds the tagN to the circuits provider networks list params 581 func (o *CircuitsProviderNetworksListParams) SetTagn(tagn *string) { 582 o.Tagn = tagn 583 } 584 585 // WriteToRequest writes these params to a swagger request 586 func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { 587 588 if err := r.SetTimeout(o.timeout); err != nil { 589 return err 590 } 591 var res []error 592 593 if o.Created != nil { 594 595 // query param created 596 var qrCreated string 597 598 if o.Created != nil { 599 qrCreated = *o.Created 600 } 601 qCreated := qrCreated 602 if qCreated != "" { 603 604 if err := r.SetQueryParam("created", qCreated); err != nil { 605 return err 606 } 607 } 608 } 609 610 if o.CreatedGte != nil { 611 612 // query param created__gte 613 var qrCreatedGte string 614 615 if o.CreatedGte != nil { 616 qrCreatedGte = *o.CreatedGte 617 } 618 qCreatedGte := qrCreatedGte 619 if qCreatedGte != "" { 620 621 if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { 622 return err 623 } 624 } 625 } 626 627 if o.CreatedLte != nil { 628 629 // query param created__lte 630 var qrCreatedLte string 631 632 if o.CreatedLte != nil { 633 qrCreatedLte = *o.CreatedLte 634 } 635 qCreatedLte := qrCreatedLte 636 if qCreatedLte != "" { 637 638 if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { 639 return err 640 } 641 } 642 } 643 644 if o.ID != nil { 645 646 // query param id 647 var qrID string 648 649 if o.ID != nil { 650 qrID = *o.ID 651 } 652 qID := qrID 653 if qID != "" { 654 655 if err := r.SetQueryParam("id", qID); err != nil { 656 return err 657 } 658 } 659 } 660 661 if o.IDGt != nil { 662 663 // query param id__gt 664 var qrIDGt string 665 666 if o.IDGt != nil { 667 qrIDGt = *o.IDGt 668 } 669 qIDGt := qrIDGt 670 if qIDGt != "" { 671 672 if err := r.SetQueryParam("id__gt", qIDGt); err != nil { 673 return err 674 } 675 } 676 } 677 678 if o.IDGte != nil { 679 680 // query param id__gte 681 var qrIDGte string 682 683 if o.IDGte != nil { 684 qrIDGte = *o.IDGte 685 } 686 qIDGte := qrIDGte 687 if qIDGte != "" { 688 689 if err := r.SetQueryParam("id__gte", qIDGte); err != nil { 690 return err 691 } 692 } 693 } 694 695 if o.IDLt != nil { 696 697 // query param id__lt 698 var qrIDLt string 699 700 if o.IDLt != nil { 701 qrIDLt = *o.IDLt 702 } 703 qIDLt := qrIDLt 704 if qIDLt != "" { 705 706 if err := r.SetQueryParam("id__lt", qIDLt); err != nil { 707 return err 708 } 709 } 710 } 711 712 if o.IDLte != nil { 713 714 // query param id__lte 715 var qrIDLte string 716 717 if o.IDLte != nil { 718 qrIDLte = *o.IDLte 719 } 720 qIDLte := qrIDLte 721 if qIDLte != "" { 722 723 if err := r.SetQueryParam("id__lte", qIDLte); err != nil { 724 return err 725 } 726 } 727 } 728 729 if o.IDn != nil { 730 731 // query param id__n 732 var qrIDn string 733 734 if o.IDn != nil { 735 qrIDn = *o.IDn 736 } 737 qIDn := qrIDn 738 if qIDn != "" { 739 740 if err := r.SetQueryParam("id__n", qIDn); err != nil { 741 return err 742 } 743 } 744 } 745 746 if o.LastUpdated != nil { 747 748 // query param last_updated 749 var qrLastUpdated string 750 751 if o.LastUpdated != nil { 752 qrLastUpdated = *o.LastUpdated 753 } 754 qLastUpdated := qrLastUpdated 755 if qLastUpdated != "" { 756 757 if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { 758 return err 759 } 760 } 761 } 762 763 if o.LastUpdatedGte != nil { 764 765 // query param last_updated__gte 766 var qrLastUpdatedGte string 767 768 if o.LastUpdatedGte != nil { 769 qrLastUpdatedGte = *o.LastUpdatedGte 770 } 771 qLastUpdatedGte := qrLastUpdatedGte 772 if qLastUpdatedGte != "" { 773 774 if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { 775 return err 776 } 777 } 778 } 779 780 if o.LastUpdatedLte != nil { 781 782 // query param last_updated__lte 783 var qrLastUpdatedLte string 784 785 if o.LastUpdatedLte != nil { 786 qrLastUpdatedLte = *o.LastUpdatedLte 787 } 788 qLastUpdatedLte := qrLastUpdatedLte 789 if qLastUpdatedLte != "" { 790 791 if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { 792 return err 793 } 794 } 795 } 796 797 if o.Limit != nil { 798 799 // query param limit 800 var qrLimit int64 801 802 if o.Limit != nil { 803 qrLimit = *o.Limit 804 } 805 qLimit := swag.FormatInt64(qrLimit) 806 if qLimit != "" { 807 808 if err := r.SetQueryParam("limit", qLimit); err != nil { 809 return err 810 } 811 } 812 } 813 814 if o.Name != nil { 815 816 // query param name 817 var qrName string 818 819 if o.Name != nil { 820 qrName = *o.Name 821 } 822 qName := qrName 823 if qName != "" { 824 825 if err := r.SetQueryParam("name", qName); err != nil { 826 return err 827 } 828 } 829 } 830 831 if o.NameEmpty != nil { 832 833 // query param name__empty 834 var qrNameEmpty string 835 836 if o.NameEmpty != nil { 837 qrNameEmpty = *o.NameEmpty 838 } 839 qNameEmpty := qrNameEmpty 840 if qNameEmpty != "" { 841 842 if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { 843 return err 844 } 845 } 846 } 847 848 if o.NameIc != nil { 849 850 // query param name__ic 851 var qrNameIc string 852 853 if o.NameIc != nil { 854 qrNameIc = *o.NameIc 855 } 856 qNameIc := qrNameIc 857 if qNameIc != "" { 858 859 if err := r.SetQueryParam("name__ic", qNameIc); err != nil { 860 return err 861 } 862 } 863 } 864 865 if o.NameIe != nil { 866 867 // query param name__ie 868 var qrNameIe string 869 870 if o.NameIe != nil { 871 qrNameIe = *o.NameIe 872 } 873 qNameIe := qrNameIe 874 if qNameIe != "" { 875 876 if err := r.SetQueryParam("name__ie", qNameIe); err != nil { 877 return err 878 } 879 } 880 } 881 882 if o.NameIew != nil { 883 884 // query param name__iew 885 var qrNameIew string 886 887 if o.NameIew != nil { 888 qrNameIew = *o.NameIew 889 } 890 qNameIew := qrNameIew 891 if qNameIew != "" { 892 893 if err := r.SetQueryParam("name__iew", qNameIew); err != nil { 894 return err 895 } 896 } 897 } 898 899 if o.NameIsw != nil { 900 901 // query param name__isw 902 var qrNameIsw string 903 904 if o.NameIsw != nil { 905 qrNameIsw = *o.NameIsw 906 } 907 qNameIsw := qrNameIsw 908 if qNameIsw != "" { 909 910 if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { 911 return err 912 } 913 } 914 } 915 916 if o.Namen != nil { 917 918 // query param name__n 919 var qrNamen string 920 921 if o.Namen != nil { 922 qrNamen = *o.Namen 923 } 924 qNamen := qrNamen 925 if qNamen != "" { 926 927 if err := r.SetQueryParam("name__n", qNamen); err != nil { 928 return err 929 } 930 } 931 } 932 933 if o.NameNic != nil { 934 935 // query param name__nic 936 var qrNameNic string 937 938 if o.NameNic != nil { 939 qrNameNic = *o.NameNic 940 } 941 qNameNic := qrNameNic 942 if qNameNic != "" { 943 944 if err := r.SetQueryParam("name__nic", qNameNic); err != nil { 945 return err 946 } 947 } 948 } 949 950 if o.NameNie != nil { 951 952 // query param name__nie 953 var qrNameNie string 954 955 if o.NameNie != nil { 956 qrNameNie = *o.NameNie 957 } 958 qNameNie := qrNameNie 959 if qNameNie != "" { 960 961 if err := r.SetQueryParam("name__nie", qNameNie); err != nil { 962 return err 963 } 964 } 965 } 966 967 if o.NameNiew != nil { 968 969 // query param name__niew 970 var qrNameNiew string 971 972 if o.NameNiew != nil { 973 qrNameNiew = *o.NameNiew 974 } 975 qNameNiew := qrNameNiew 976 if qNameNiew != "" { 977 978 if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { 979 return err 980 } 981 } 982 } 983 984 if o.NameNisw != nil { 985 986 // query param name__nisw 987 var qrNameNisw string 988 989 if o.NameNisw != nil { 990 qrNameNisw = *o.NameNisw 991 } 992 qNameNisw := qrNameNisw 993 if qNameNisw != "" { 994 995 if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { 996 return err 997 } 998 } 999 } 1000 1001 if o.Offset != nil { 1002 1003 // query param offset 1004 var qrOffset int64 1005 1006 if o.Offset != nil { 1007 qrOffset = *o.Offset 1008 } 1009 qOffset := swag.FormatInt64(qrOffset) 1010 if qOffset != "" { 1011 1012 if err := r.SetQueryParam("offset", qOffset); err != nil { 1013 return err 1014 } 1015 } 1016 } 1017 1018 if o.Provider != nil { 1019 1020 // query param provider 1021 var qrProvider string 1022 1023 if o.Provider != nil { 1024 qrProvider = *o.Provider 1025 } 1026 qProvider := qrProvider 1027 if qProvider != "" { 1028 1029 if err := r.SetQueryParam("provider", qProvider); err != nil { 1030 return err 1031 } 1032 } 1033 } 1034 1035 if o.Providern != nil { 1036 1037 // query param provider__n 1038 var qrProvidern string 1039 1040 if o.Providern != nil { 1041 qrProvidern = *o.Providern 1042 } 1043 qProvidern := qrProvidern 1044 if qProvidern != "" { 1045 1046 if err := r.SetQueryParam("provider__n", qProvidern); err != nil { 1047 return err 1048 } 1049 } 1050 } 1051 1052 if o.ProviderID != nil { 1053 1054 // query param provider_id 1055 var qrProviderID string 1056 1057 if o.ProviderID != nil { 1058 qrProviderID = *o.ProviderID 1059 } 1060 qProviderID := qrProviderID 1061 if qProviderID != "" { 1062 1063 if err := r.SetQueryParam("provider_id", qProviderID); err != nil { 1064 return err 1065 } 1066 } 1067 } 1068 1069 if o.ProviderIDn != nil { 1070 1071 // query param provider_id__n 1072 var qrProviderIDn string 1073 1074 if o.ProviderIDn != nil { 1075 qrProviderIDn = *o.ProviderIDn 1076 } 1077 qProviderIDn := qrProviderIDn 1078 if qProviderIDn != "" { 1079 1080 if err := r.SetQueryParam("provider_id__n", qProviderIDn); err != nil { 1081 return err 1082 } 1083 } 1084 } 1085 1086 if o.Q != nil { 1087 1088 // query param q 1089 var qrQ string 1090 1091 if o.Q != nil { 1092 qrQ = *o.Q 1093 } 1094 qQ := qrQ 1095 if qQ != "" { 1096 1097 if err := r.SetQueryParam("q", qQ); err != nil { 1098 return err 1099 } 1100 } 1101 } 1102 1103 if o.Tag != nil { 1104 1105 // query param tag 1106 var qrTag string 1107 1108 if o.Tag != nil { 1109 qrTag = *o.Tag 1110 } 1111 qTag := qrTag 1112 if qTag != "" { 1113 1114 if err := r.SetQueryParam("tag", qTag); err != nil { 1115 return err 1116 } 1117 } 1118 } 1119 1120 if o.Tagn != nil { 1121 1122 // query param tag__n 1123 var qrTagn string 1124 1125 if o.Tagn != nil { 1126 qrTagn = *o.Tagn 1127 } 1128 qTagn := qrTagn 1129 if qTagn != "" { 1130 1131 if err := r.SetQueryParam("tag__n", qTagn); err != nil { 1132 return err 1133 } 1134 } 1135 } 1136 1137 if len(res) > 0 { 1138 return errors.CompositeValidationError(res...) 1139 } 1140 return nil 1141 }