github.com/digitalocean/go-netbox@v0.0.2/netbox/client/dcim/dcim_power_panels_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 dcim 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 // NewDcimPowerPanelsListParams creates a new DcimPowerPanelsListParams 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 NewDcimPowerPanelsListParams() *DcimPowerPanelsListParams { 42 return &DcimPowerPanelsListParams{ 43 timeout: cr.DefaultTimeout, 44 } 45 } 46 47 // NewDcimPowerPanelsListParamsWithTimeout creates a new DcimPowerPanelsListParams object 48 // with the ability to set a timeout on a request. 49 func NewDcimPowerPanelsListParamsWithTimeout(timeout time.Duration) *DcimPowerPanelsListParams { 50 return &DcimPowerPanelsListParams{ 51 timeout: timeout, 52 } 53 } 54 55 // NewDcimPowerPanelsListParamsWithContext creates a new DcimPowerPanelsListParams object 56 // with the ability to set a context for a request. 57 func NewDcimPowerPanelsListParamsWithContext(ctx context.Context) *DcimPowerPanelsListParams { 58 return &DcimPowerPanelsListParams{ 59 Context: ctx, 60 } 61 } 62 63 // NewDcimPowerPanelsListParamsWithHTTPClient creates a new DcimPowerPanelsListParams object 64 // with the ability to set a custom HTTPClient for a request. 65 func NewDcimPowerPanelsListParamsWithHTTPClient(client *http.Client) *DcimPowerPanelsListParams { 66 return &DcimPowerPanelsListParams{ 67 HTTPClient: client, 68 } 69 } 70 71 /* DcimPowerPanelsListParams contains all the parameters to send to the API endpoint 72 for the dcim power panels list operation. 73 74 Typically these are written to a http.Request. 75 */ 76 type DcimPowerPanelsListParams 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 // LocationID. 121 LocationID *string 122 123 // LocationIDn. 124 LocationIDn *string 125 126 // Name. 127 Name *string 128 129 // NameEmpty. 130 NameEmpty *string 131 132 // NameIc. 133 NameIc *string 134 135 // NameIe. 136 NameIe *string 137 138 // NameIew. 139 NameIew *string 140 141 // NameIsw. 142 NameIsw *string 143 144 // Namen. 145 Namen *string 146 147 // NameNic. 148 NameNic *string 149 150 // NameNie. 151 NameNie *string 152 153 // NameNiew. 154 NameNiew *string 155 156 // NameNisw. 157 NameNisw *string 158 159 /* Offset. 160 161 The initial index from which to return the results. 162 */ 163 Offset *int64 164 165 // Q. 166 Q *string 167 168 // Region. 169 Region *string 170 171 // Regionn. 172 Regionn *string 173 174 // RegionID. 175 RegionID *string 176 177 // RegionIDn. 178 RegionIDn *string 179 180 // Site. 181 Site *string 182 183 // Siten. 184 Siten *string 185 186 // SiteGroup. 187 SiteGroup *string 188 189 // SiteGroupn. 190 SiteGroupn *string 191 192 // SiteGroupID. 193 SiteGroupID *string 194 195 // SiteGroupIDn. 196 SiteGroupIDn *string 197 198 // SiteID. 199 SiteID *string 200 201 // SiteIDn. 202 SiteIDn *string 203 204 // Tag. 205 Tag *string 206 207 // Tagn. 208 Tagn *string 209 210 timeout time.Duration 211 Context context.Context 212 HTTPClient *http.Client 213 } 214 215 // WithDefaults hydrates default values in the dcim power panels list params (not the query body). 216 // 217 // All values with no default are reset to their zero value. 218 func (o *DcimPowerPanelsListParams) WithDefaults() *DcimPowerPanelsListParams { 219 o.SetDefaults() 220 return o 221 } 222 223 // SetDefaults hydrates default values in the dcim power panels list params (not the query body). 224 // 225 // All values with no default are reset to their zero value. 226 func (o *DcimPowerPanelsListParams) SetDefaults() { 227 // no default values defined for this parameter 228 } 229 230 // WithTimeout adds the timeout to the dcim power panels list params 231 func (o *DcimPowerPanelsListParams) WithTimeout(timeout time.Duration) *DcimPowerPanelsListParams { 232 o.SetTimeout(timeout) 233 return o 234 } 235 236 // SetTimeout adds the timeout to the dcim power panels list params 237 func (o *DcimPowerPanelsListParams) SetTimeout(timeout time.Duration) { 238 o.timeout = timeout 239 } 240 241 // WithContext adds the context to the dcim power panels list params 242 func (o *DcimPowerPanelsListParams) WithContext(ctx context.Context) *DcimPowerPanelsListParams { 243 o.SetContext(ctx) 244 return o 245 } 246 247 // SetContext adds the context to the dcim power panels list params 248 func (o *DcimPowerPanelsListParams) SetContext(ctx context.Context) { 249 o.Context = ctx 250 } 251 252 // WithHTTPClient adds the HTTPClient to the dcim power panels list params 253 func (o *DcimPowerPanelsListParams) WithHTTPClient(client *http.Client) *DcimPowerPanelsListParams { 254 o.SetHTTPClient(client) 255 return o 256 } 257 258 // SetHTTPClient adds the HTTPClient to the dcim power panels list params 259 func (o *DcimPowerPanelsListParams) SetHTTPClient(client *http.Client) { 260 o.HTTPClient = client 261 } 262 263 // WithCreated adds the created to the dcim power panels list params 264 func (o *DcimPowerPanelsListParams) WithCreated(created *string) *DcimPowerPanelsListParams { 265 o.SetCreated(created) 266 return o 267 } 268 269 // SetCreated adds the created to the dcim power panels list params 270 func (o *DcimPowerPanelsListParams) SetCreated(created *string) { 271 o.Created = created 272 } 273 274 // WithCreatedGte adds the createdGte to the dcim power panels list params 275 func (o *DcimPowerPanelsListParams) WithCreatedGte(createdGte *string) *DcimPowerPanelsListParams { 276 o.SetCreatedGte(createdGte) 277 return o 278 } 279 280 // SetCreatedGte adds the createdGte to the dcim power panels list params 281 func (o *DcimPowerPanelsListParams) SetCreatedGte(createdGte *string) { 282 o.CreatedGte = createdGte 283 } 284 285 // WithCreatedLte adds the createdLte to the dcim power panels list params 286 func (o *DcimPowerPanelsListParams) WithCreatedLte(createdLte *string) *DcimPowerPanelsListParams { 287 o.SetCreatedLte(createdLte) 288 return o 289 } 290 291 // SetCreatedLte adds the createdLte to the dcim power panels list params 292 func (o *DcimPowerPanelsListParams) SetCreatedLte(createdLte *string) { 293 o.CreatedLte = createdLte 294 } 295 296 // WithID adds the id to the dcim power panels list params 297 func (o *DcimPowerPanelsListParams) WithID(id *string) *DcimPowerPanelsListParams { 298 o.SetID(id) 299 return o 300 } 301 302 // SetID adds the id to the dcim power panels list params 303 func (o *DcimPowerPanelsListParams) SetID(id *string) { 304 o.ID = id 305 } 306 307 // WithIDGt adds the iDGt to the dcim power panels list params 308 func (o *DcimPowerPanelsListParams) WithIDGt(iDGt *string) *DcimPowerPanelsListParams { 309 o.SetIDGt(iDGt) 310 return o 311 } 312 313 // SetIDGt adds the idGt to the dcim power panels list params 314 func (o *DcimPowerPanelsListParams) SetIDGt(iDGt *string) { 315 o.IDGt = iDGt 316 } 317 318 // WithIDGte adds the iDGte to the dcim power panels list params 319 func (o *DcimPowerPanelsListParams) WithIDGte(iDGte *string) *DcimPowerPanelsListParams { 320 o.SetIDGte(iDGte) 321 return o 322 } 323 324 // SetIDGte adds the idGte to the dcim power panels list params 325 func (o *DcimPowerPanelsListParams) SetIDGte(iDGte *string) { 326 o.IDGte = iDGte 327 } 328 329 // WithIDLt adds the iDLt to the dcim power panels list params 330 func (o *DcimPowerPanelsListParams) WithIDLt(iDLt *string) *DcimPowerPanelsListParams { 331 o.SetIDLt(iDLt) 332 return o 333 } 334 335 // SetIDLt adds the idLt to the dcim power panels list params 336 func (o *DcimPowerPanelsListParams) SetIDLt(iDLt *string) { 337 o.IDLt = iDLt 338 } 339 340 // WithIDLte adds the iDLte to the dcim power panels list params 341 func (o *DcimPowerPanelsListParams) WithIDLte(iDLte *string) *DcimPowerPanelsListParams { 342 o.SetIDLte(iDLte) 343 return o 344 } 345 346 // SetIDLte adds the idLte to the dcim power panels list params 347 func (o *DcimPowerPanelsListParams) SetIDLte(iDLte *string) { 348 o.IDLte = iDLte 349 } 350 351 // WithIDn adds the iDn to the dcim power panels list params 352 func (o *DcimPowerPanelsListParams) WithIDn(iDn *string) *DcimPowerPanelsListParams { 353 o.SetIDn(iDn) 354 return o 355 } 356 357 // SetIDn adds the idN to the dcim power panels list params 358 func (o *DcimPowerPanelsListParams) SetIDn(iDn *string) { 359 o.IDn = iDn 360 } 361 362 // WithLastUpdated adds the lastUpdated to the dcim power panels list params 363 func (o *DcimPowerPanelsListParams) WithLastUpdated(lastUpdated *string) *DcimPowerPanelsListParams { 364 o.SetLastUpdated(lastUpdated) 365 return o 366 } 367 368 // SetLastUpdated adds the lastUpdated to the dcim power panels list params 369 func (o *DcimPowerPanelsListParams) SetLastUpdated(lastUpdated *string) { 370 o.LastUpdated = lastUpdated 371 } 372 373 // WithLastUpdatedGte adds the lastUpdatedGte to the dcim power panels list params 374 func (o *DcimPowerPanelsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimPowerPanelsListParams { 375 o.SetLastUpdatedGte(lastUpdatedGte) 376 return o 377 } 378 379 // SetLastUpdatedGte adds the lastUpdatedGte to the dcim power panels list params 380 func (o *DcimPowerPanelsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { 381 o.LastUpdatedGte = lastUpdatedGte 382 } 383 384 // WithLastUpdatedLte adds the lastUpdatedLte to the dcim power panels list params 385 func (o *DcimPowerPanelsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimPowerPanelsListParams { 386 o.SetLastUpdatedLte(lastUpdatedLte) 387 return o 388 } 389 390 // SetLastUpdatedLte adds the lastUpdatedLte to the dcim power panels list params 391 func (o *DcimPowerPanelsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { 392 o.LastUpdatedLte = lastUpdatedLte 393 } 394 395 // WithLimit adds the limit to the dcim power panels list params 396 func (o *DcimPowerPanelsListParams) WithLimit(limit *int64) *DcimPowerPanelsListParams { 397 o.SetLimit(limit) 398 return o 399 } 400 401 // SetLimit adds the limit to the dcim power panels list params 402 func (o *DcimPowerPanelsListParams) SetLimit(limit *int64) { 403 o.Limit = limit 404 } 405 406 // WithLocationID adds the locationID to the dcim power panels list params 407 func (o *DcimPowerPanelsListParams) WithLocationID(locationID *string) *DcimPowerPanelsListParams { 408 o.SetLocationID(locationID) 409 return o 410 } 411 412 // SetLocationID adds the locationId to the dcim power panels list params 413 func (o *DcimPowerPanelsListParams) SetLocationID(locationID *string) { 414 o.LocationID = locationID 415 } 416 417 // WithLocationIDn adds the locationIDn to the dcim power panels list params 418 func (o *DcimPowerPanelsListParams) WithLocationIDn(locationIDn *string) *DcimPowerPanelsListParams { 419 o.SetLocationIDn(locationIDn) 420 return o 421 } 422 423 // SetLocationIDn adds the locationIdN to the dcim power panels list params 424 func (o *DcimPowerPanelsListParams) SetLocationIDn(locationIDn *string) { 425 o.LocationIDn = locationIDn 426 } 427 428 // WithName adds the name to the dcim power panels list params 429 func (o *DcimPowerPanelsListParams) WithName(name *string) *DcimPowerPanelsListParams { 430 o.SetName(name) 431 return o 432 } 433 434 // SetName adds the name to the dcim power panels list params 435 func (o *DcimPowerPanelsListParams) SetName(name *string) { 436 o.Name = name 437 } 438 439 // WithNameEmpty adds the nameEmpty to the dcim power panels list params 440 func (o *DcimPowerPanelsListParams) WithNameEmpty(nameEmpty *string) *DcimPowerPanelsListParams { 441 o.SetNameEmpty(nameEmpty) 442 return o 443 } 444 445 // SetNameEmpty adds the nameEmpty to the dcim power panels list params 446 func (o *DcimPowerPanelsListParams) SetNameEmpty(nameEmpty *string) { 447 o.NameEmpty = nameEmpty 448 } 449 450 // WithNameIc adds the nameIc to the dcim power panels list params 451 func (o *DcimPowerPanelsListParams) WithNameIc(nameIc *string) *DcimPowerPanelsListParams { 452 o.SetNameIc(nameIc) 453 return o 454 } 455 456 // SetNameIc adds the nameIc to the dcim power panels list params 457 func (o *DcimPowerPanelsListParams) SetNameIc(nameIc *string) { 458 o.NameIc = nameIc 459 } 460 461 // WithNameIe adds the nameIe to the dcim power panels list params 462 func (o *DcimPowerPanelsListParams) WithNameIe(nameIe *string) *DcimPowerPanelsListParams { 463 o.SetNameIe(nameIe) 464 return o 465 } 466 467 // SetNameIe adds the nameIe to the dcim power panels list params 468 func (o *DcimPowerPanelsListParams) SetNameIe(nameIe *string) { 469 o.NameIe = nameIe 470 } 471 472 // WithNameIew adds the nameIew to the dcim power panels list params 473 func (o *DcimPowerPanelsListParams) WithNameIew(nameIew *string) *DcimPowerPanelsListParams { 474 o.SetNameIew(nameIew) 475 return o 476 } 477 478 // SetNameIew adds the nameIew to the dcim power panels list params 479 func (o *DcimPowerPanelsListParams) SetNameIew(nameIew *string) { 480 o.NameIew = nameIew 481 } 482 483 // WithNameIsw adds the nameIsw to the dcim power panels list params 484 func (o *DcimPowerPanelsListParams) WithNameIsw(nameIsw *string) *DcimPowerPanelsListParams { 485 o.SetNameIsw(nameIsw) 486 return o 487 } 488 489 // SetNameIsw adds the nameIsw to the dcim power panels list params 490 func (o *DcimPowerPanelsListParams) SetNameIsw(nameIsw *string) { 491 o.NameIsw = nameIsw 492 } 493 494 // WithNamen adds the namen to the dcim power panels list params 495 func (o *DcimPowerPanelsListParams) WithNamen(namen *string) *DcimPowerPanelsListParams { 496 o.SetNamen(namen) 497 return o 498 } 499 500 // SetNamen adds the nameN to the dcim power panels list params 501 func (o *DcimPowerPanelsListParams) SetNamen(namen *string) { 502 o.Namen = namen 503 } 504 505 // WithNameNic adds the nameNic to the dcim power panels list params 506 func (o *DcimPowerPanelsListParams) WithNameNic(nameNic *string) *DcimPowerPanelsListParams { 507 o.SetNameNic(nameNic) 508 return o 509 } 510 511 // SetNameNic adds the nameNic to the dcim power panels list params 512 func (o *DcimPowerPanelsListParams) SetNameNic(nameNic *string) { 513 o.NameNic = nameNic 514 } 515 516 // WithNameNie adds the nameNie to the dcim power panels list params 517 func (o *DcimPowerPanelsListParams) WithNameNie(nameNie *string) *DcimPowerPanelsListParams { 518 o.SetNameNie(nameNie) 519 return o 520 } 521 522 // SetNameNie adds the nameNie to the dcim power panels list params 523 func (o *DcimPowerPanelsListParams) SetNameNie(nameNie *string) { 524 o.NameNie = nameNie 525 } 526 527 // WithNameNiew adds the nameNiew to the dcim power panels list params 528 func (o *DcimPowerPanelsListParams) WithNameNiew(nameNiew *string) *DcimPowerPanelsListParams { 529 o.SetNameNiew(nameNiew) 530 return o 531 } 532 533 // SetNameNiew adds the nameNiew to the dcim power panels list params 534 func (o *DcimPowerPanelsListParams) SetNameNiew(nameNiew *string) { 535 o.NameNiew = nameNiew 536 } 537 538 // WithNameNisw adds the nameNisw to the dcim power panels list params 539 func (o *DcimPowerPanelsListParams) WithNameNisw(nameNisw *string) *DcimPowerPanelsListParams { 540 o.SetNameNisw(nameNisw) 541 return o 542 } 543 544 // SetNameNisw adds the nameNisw to the dcim power panels list params 545 func (o *DcimPowerPanelsListParams) SetNameNisw(nameNisw *string) { 546 o.NameNisw = nameNisw 547 } 548 549 // WithOffset adds the offset to the dcim power panels list params 550 func (o *DcimPowerPanelsListParams) WithOffset(offset *int64) *DcimPowerPanelsListParams { 551 o.SetOffset(offset) 552 return o 553 } 554 555 // SetOffset adds the offset to the dcim power panels list params 556 func (o *DcimPowerPanelsListParams) SetOffset(offset *int64) { 557 o.Offset = offset 558 } 559 560 // WithQ adds the q to the dcim power panels list params 561 func (o *DcimPowerPanelsListParams) WithQ(q *string) *DcimPowerPanelsListParams { 562 o.SetQ(q) 563 return o 564 } 565 566 // SetQ adds the q to the dcim power panels list params 567 func (o *DcimPowerPanelsListParams) SetQ(q *string) { 568 o.Q = q 569 } 570 571 // WithRegion adds the region to the dcim power panels list params 572 func (o *DcimPowerPanelsListParams) WithRegion(region *string) *DcimPowerPanelsListParams { 573 o.SetRegion(region) 574 return o 575 } 576 577 // SetRegion adds the region to the dcim power panels list params 578 func (o *DcimPowerPanelsListParams) SetRegion(region *string) { 579 o.Region = region 580 } 581 582 // WithRegionn adds the regionn to the dcim power panels list params 583 func (o *DcimPowerPanelsListParams) WithRegionn(regionn *string) *DcimPowerPanelsListParams { 584 o.SetRegionn(regionn) 585 return o 586 } 587 588 // SetRegionn adds the regionN to the dcim power panels list params 589 func (o *DcimPowerPanelsListParams) SetRegionn(regionn *string) { 590 o.Regionn = regionn 591 } 592 593 // WithRegionID adds the regionID to the dcim power panels list params 594 func (o *DcimPowerPanelsListParams) WithRegionID(regionID *string) *DcimPowerPanelsListParams { 595 o.SetRegionID(regionID) 596 return o 597 } 598 599 // SetRegionID adds the regionId to the dcim power panels list params 600 func (o *DcimPowerPanelsListParams) SetRegionID(regionID *string) { 601 o.RegionID = regionID 602 } 603 604 // WithRegionIDn adds the regionIDn to the dcim power panels list params 605 func (o *DcimPowerPanelsListParams) WithRegionIDn(regionIDn *string) *DcimPowerPanelsListParams { 606 o.SetRegionIDn(regionIDn) 607 return o 608 } 609 610 // SetRegionIDn adds the regionIdN to the dcim power panels list params 611 func (o *DcimPowerPanelsListParams) SetRegionIDn(regionIDn *string) { 612 o.RegionIDn = regionIDn 613 } 614 615 // WithSite adds the site to the dcim power panels list params 616 func (o *DcimPowerPanelsListParams) WithSite(site *string) *DcimPowerPanelsListParams { 617 o.SetSite(site) 618 return o 619 } 620 621 // SetSite adds the site to the dcim power panels list params 622 func (o *DcimPowerPanelsListParams) SetSite(site *string) { 623 o.Site = site 624 } 625 626 // WithSiten adds the siten to the dcim power panels list params 627 func (o *DcimPowerPanelsListParams) WithSiten(siten *string) *DcimPowerPanelsListParams { 628 o.SetSiten(siten) 629 return o 630 } 631 632 // SetSiten adds the siteN to the dcim power panels list params 633 func (o *DcimPowerPanelsListParams) SetSiten(siten *string) { 634 o.Siten = siten 635 } 636 637 // WithSiteGroup adds the siteGroup to the dcim power panels list params 638 func (o *DcimPowerPanelsListParams) WithSiteGroup(siteGroup *string) *DcimPowerPanelsListParams { 639 o.SetSiteGroup(siteGroup) 640 return o 641 } 642 643 // SetSiteGroup adds the siteGroup to the dcim power panels list params 644 func (o *DcimPowerPanelsListParams) SetSiteGroup(siteGroup *string) { 645 o.SiteGroup = siteGroup 646 } 647 648 // WithSiteGroupn adds the siteGroupn to the dcim power panels list params 649 func (o *DcimPowerPanelsListParams) WithSiteGroupn(siteGroupn *string) *DcimPowerPanelsListParams { 650 o.SetSiteGroupn(siteGroupn) 651 return o 652 } 653 654 // SetSiteGroupn adds the siteGroupN to the dcim power panels list params 655 func (o *DcimPowerPanelsListParams) SetSiteGroupn(siteGroupn *string) { 656 o.SiteGroupn = siteGroupn 657 } 658 659 // WithSiteGroupID adds the siteGroupID to the dcim power panels list params 660 func (o *DcimPowerPanelsListParams) WithSiteGroupID(siteGroupID *string) *DcimPowerPanelsListParams { 661 o.SetSiteGroupID(siteGroupID) 662 return o 663 } 664 665 // SetSiteGroupID adds the siteGroupId to the dcim power panels list params 666 func (o *DcimPowerPanelsListParams) SetSiteGroupID(siteGroupID *string) { 667 o.SiteGroupID = siteGroupID 668 } 669 670 // WithSiteGroupIDn adds the siteGroupIDn to the dcim power panels list params 671 func (o *DcimPowerPanelsListParams) WithSiteGroupIDn(siteGroupIDn *string) *DcimPowerPanelsListParams { 672 o.SetSiteGroupIDn(siteGroupIDn) 673 return o 674 } 675 676 // SetSiteGroupIDn adds the siteGroupIdN to the dcim power panels list params 677 func (o *DcimPowerPanelsListParams) SetSiteGroupIDn(siteGroupIDn *string) { 678 o.SiteGroupIDn = siteGroupIDn 679 } 680 681 // WithSiteID adds the siteID to the dcim power panels list params 682 func (o *DcimPowerPanelsListParams) WithSiteID(siteID *string) *DcimPowerPanelsListParams { 683 o.SetSiteID(siteID) 684 return o 685 } 686 687 // SetSiteID adds the siteId to the dcim power panels list params 688 func (o *DcimPowerPanelsListParams) SetSiteID(siteID *string) { 689 o.SiteID = siteID 690 } 691 692 // WithSiteIDn adds the siteIDn to the dcim power panels list params 693 func (o *DcimPowerPanelsListParams) WithSiteIDn(siteIDn *string) *DcimPowerPanelsListParams { 694 o.SetSiteIDn(siteIDn) 695 return o 696 } 697 698 // SetSiteIDn adds the siteIdN to the dcim power panels list params 699 func (o *DcimPowerPanelsListParams) SetSiteIDn(siteIDn *string) { 700 o.SiteIDn = siteIDn 701 } 702 703 // WithTag adds the tag to the dcim power panels list params 704 func (o *DcimPowerPanelsListParams) WithTag(tag *string) *DcimPowerPanelsListParams { 705 o.SetTag(tag) 706 return o 707 } 708 709 // SetTag adds the tag to the dcim power panels list params 710 func (o *DcimPowerPanelsListParams) SetTag(tag *string) { 711 o.Tag = tag 712 } 713 714 // WithTagn adds the tagn to the dcim power panels list params 715 func (o *DcimPowerPanelsListParams) WithTagn(tagn *string) *DcimPowerPanelsListParams { 716 o.SetTagn(tagn) 717 return o 718 } 719 720 // SetTagn adds the tagN to the dcim power panels list params 721 func (o *DcimPowerPanelsListParams) SetTagn(tagn *string) { 722 o.Tagn = tagn 723 } 724 725 // WriteToRequest writes these params to a swagger request 726 func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { 727 728 if err := r.SetTimeout(o.timeout); err != nil { 729 return err 730 } 731 var res []error 732 733 if o.Created != nil { 734 735 // query param created 736 var qrCreated string 737 738 if o.Created != nil { 739 qrCreated = *o.Created 740 } 741 qCreated := qrCreated 742 if qCreated != "" { 743 744 if err := r.SetQueryParam("created", qCreated); err != nil { 745 return err 746 } 747 } 748 } 749 750 if o.CreatedGte != nil { 751 752 // query param created__gte 753 var qrCreatedGte string 754 755 if o.CreatedGte != nil { 756 qrCreatedGte = *o.CreatedGte 757 } 758 qCreatedGte := qrCreatedGte 759 if qCreatedGte != "" { 760 761 if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { 762 return err 763 } 764 } 765 } 766 767 if o.CreatedLte != nil { 768 769 // query param created__lte 770 var qrCreatedLte string 771 772 if o.CreatedLte != nil { 773 qrCreatedLte = *o.CreatedLte 774 } 775 qCreatedLte := qrCreatedLte 776 if qCreatedLte != "" { 777 778 if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { 779 return err 780 } 781 } 782 } 783 784 if o.ID != nil { 785 786 // query param id 787 var qrID string 788 789 if o.ID != nil { 790 qrID = *o.ID 791 } 792 qID := qrID 793 if qID != "" { 794 795 if err := r.SetQueryParam("id", qID); err != nil { 796 return err 797 } 798 } 799 } 800 801 if o.IDGt != nil { 802 803 // query param id__gt 804 var qrIDGt string 805 806 if o.IDGt != nil { 807 qrIDGt = *o.IDGt 808 } 809 qIDGt := qrIDGt 810 if qIDGt != "" { 811 812 if err := r.SetQueryParam("id__gt", qIDGt); err != nil { 813 return err 814 } 815 } 816 } 817 818 if o.IDGte != nil { 819 820 // query param id__gte 821 var qrIDGte string 822 823 if o.IDGte != nil { 824 qrIDGte = *o.IDGte 825 } 826 qIDGte := qrIDGte 827 if qIDGte != "" { 828 829 if err := r.SetQueryParam("id__gte", qIDGte); err != nil { 830 return err 831 } 832 } 833 } 834 835 if o.IDLt != nil { 836 837 // query param id__lt 838 var qrIDLt string 839 840 if o.IDLt != nil { 841 qrIDLt = *o.IDLt 842 } 843 qIDLt := qrIDLt 844 if qIDLt != "" { 845 846 if err := r.SetQueryParam("id__lt", qIDLt); err != nil { 847 return err 848 } 849 } 850 } 851 852 if o.IDLte != nil { 853 854 // query param id__lte 855 var qrIDLte string 856 857 if o.IDLte != nil { 858 qrIDLte = *o.IDLte 859 } 860 qIDLte := qrIDLte 861 if qIDLte != "" { 862 863 if err := r.SetQueryParam("id__lte", qIDLte); err != nil { 864 return err 865 } 866 } 867 } 868 869 if o.IDn != nil { 870 871 // query param id__n 872 var qrIDn string 873 874 if o.IDn != nil { 875 qrIDn = *o.IDn 876 } 877 qIDn := qrIDn 878 if qIDn != "" { 879 880 if err := r.SetQueryParam("id__n", qIDn); err != nil { 881 return err 882 } 883 } 884 } 885 886 if o.LastUpdated != nil { 887 888 // query param last_updated 889 var qrLastUpdated string 890 891 if o.LastUpdated != nil { 892 qrLastUpdated = *o.LastUpdated 893 } 894 qLastUpdated := qrLastUpdated 895 if qLastUpdated != "" { 896 897 if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { 898 return err 899 } 900 } 901 } 902 903 if o.LastUpdatedGte != nil { 904 905 // query param last_updated__gte 906 var qrLastUpdatedGte string 907 908 if o.LastUpdatedGte != nil { 909 qrLastUpdatedGte = *o.LastUpdatedGte 910 } 911 qLastUpdatedGte := qrLastUpdatedGte 912 if qLastUpdatedGte != "" { 913 914 if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { 915 return err 916 } 917 } 918 } 919 920 if o.LastUpdatedLte != nil { 921 922 // query param last_updated__lte 923 var qrLastUpdatedLte string 924 925 if o.LastUpdatedLte != nil { 926 qrLastUpdatedLte = *o.LastUpdatedLte 927 } 928 qLastUpdatedLte := qrLastUpdatedLte 929 if qLastUpdatedLte != "" { 930 931 if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { 932 return err 933 } 934 } 935 } 936 937 if o.Limit != nil { 938 939 // query param limit 940 var qrLimit int64 941 942 if o.Limit != nil { 943 qrLimit = *o.Limit 944 } 945 qLimit := swag.FormatInt64(qrLimit) 946 if qLimit != "" { 947 948 if err := r.SetQueryParam("limit", qLimit); err != nil { 949 return err 950 } 951 } 952 } 953 954 if o.LocationID != nil { 955 956 // query param location_id 957 var qrLocationID string 958 959 if o.LocationID != nil { 960 qrLocationID = *o.LocationID 961 } 962 qLocationID := qrLocationID 963 if qLocationID != "" { 964 965 if err := r.SetQueryParam("location_id", qLocationID); err != nil { 966 return err 967 } 968 } 969 } 970 971 if o.LocationIDn != nil { 972 973 // query param location_id__n 974 var qrLocationIDn string 975 976 if o.LocationIDn != nil { 977 qrLocationIDn = *o.LocationIDn 978 } 979 qLocationIDn := qrLocationIDn 980 if qLocationIDn != "" { 981 982 if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { 983 return err 984 } 985 } 986 } 987 988 if o.Name != nil { 989 990 // query param name 991 var qrName string 992 993 if o.Name != nil { 994 qrName = *o.Name 995 } 996 qName := qrName 997 if qName != "" { 998 999 if err := r.SetQueryParam("name", qName); err != nil { 1000 return err 1001 } 1002 } 1003 } 1004 1005 if o.NameEmpty != nil { 1006 1007 // query param name__empty 1008 var qrNameEmpty string 1009 1010 if o.NameEmpty != nil { 1011 qrNameEmpty = *o.NameEmpty 1012 } 1013 qNameEmpty := qrNameEmpty 1014 if qNameEmpty != "" { 1015 1016 if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { 1017 return err 1018 } 1019 } 1020 } 1021 1022 if o.NameIc != nil { 1023 1024 // query param name__ic 1025 var qrNameIc string 1026 1027 if o.NameIc != nil { 1028 qrNameIc = *o.NameIc 1029 } 1030 qNameIc := qrNameIc 1031 if qNameIc != "" { 1032 1033 if err := r.SetQueryParam("name__ic", qNameIc); err != nil { 1034 return err 1035 } 1036 } 1037 } 1038 1039 if o.NameIe != nil { 1040 1041 // query param name__ie 1042 var qrNameIe string 1043 1044 if o.NameIe != nil { 1045 qrNameIe = *o.NameIe 1046 } 1047 qNameIe := qrNameIe 1048 if qNameIe != "" { 1049 1050 if err := r.SetQueryParam("name__ie", qNameIe); err != nil { 1051 return err 1052 } 1053 } 1054 } 1055 1056 if o.NameIew != nil { 1057 1058 // query param name__iew 1059 var qrNameIew string 1060 1061 if o.NameIew != nil { 1062 qrNameIew = *o.NameIew 1063 } 1064 qNameIew := qrNameIew 1065 if qNameIew != "" { 1066 1067 if err := r.SetQueryParam("name__iew", qNameIew); err != nil { 1068 return err 1069 } 1070 } 1071 } 1072 1073 if o.NameIsw != nil { 1074 1075 // query param name__isw 1076 var qrNameIsw string 1077 1078 if o.NameIsw != nil { 1079 qrNameIsw = *o.NameIsw 1080 } 1081 qNameIsw := qrNameIsw 1082 if qNameIsw != "" { 1083 1084 if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { 1085 return err 1086 } 1087 } 1088 } 1089 1090 if o.Namen != nil { 1091 1092 // query param name__n 1093 var qrNamen string 1094 1095 if o.Namen != nil { 1096 qrNamen = *o.Namen 1097 } 1098 qNamen := qrNamen 1099 if qNamen != "" { 1100 1101 if err := r.SetQueryParam("name__n", qNamen); err != nil { 1102 return err 1103 } 1104 } 1105 } 1106 1107 if o.NameNic != nil { 1108 1109 // query param name__nic 1110 var qrNameNic string 1111 1112 if o.NameNic != nil { 1113 qrNameNic = *o.NameNic 1114 } 1115 qNameNic := qrNameNic 1116 if qNameNic != "" { 1117 1118 if err := r.SetQueryParam("name__nic", qNameNic); err != nil { 1119 return err 1120 } 1121 } 1122 } 1123 1124 if o.NameNie != nil { 1125 1126 // query param name__nie 1127 var qrNameNie string 1128 1129 if o.NameNie != nil { 1130 qrNameNie = *o.NameNie 1131 } 1132 qNameNie := qrNameNie 1133 if qNameNie != "" { 1134 1135 if err := r.SetQueryParam("name__nie", qNameNie); err != nil { 1136 return err 1137 } 1138 } 1139 } 1140 1141 if o.NameNiew != nil { 1142 1143 // query param name__niew 1144 var qrNameNiew string 1145 1146 if o.NameNiew != nil { 1147 qrNameNiew = *o.NameNiew 1148 } 1149 qNameNiew := qrNameNiew 1150 if qNameNiew != "" { 1151 1152 if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { 1153 return err 1154 } 1155 } 1156 } 1157 1158 if o.NameNisw != nil { 1159 1160 // query param name__nisw 1161 var qrNameNisw string 1162 1163 if o.NameNisw != nil { 1164 qrNameNisw = *o.NameNisw 1165 } 1166 qNameNisw := qrNameNisw 1167 if qNameNisw != "" { 1168 1169 if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { 1170 return err 1171 } 1172 } 1173 } 1174 1175 if o.Offset != nil { 1176 1177 // query param offset 1178 var qrOffset int64 1179 1180 if o.Offset != nil { 1181 qrOffset = *o.Offset 1182 } 1183 qOffset := swag.FormatInt64(qrOffset) 1184 if qOffset != "" { 1185 1186 if err := r.SetQueryParam("offset", qOffset); err != nil { 1187 return err 1188 } 1189 } 1190 } 1191 1192 if o.Q != nil { 1193 1194 // query param q 1195 var qrQ string 1196 1197 if o.Q != nil { 1198 qrQ = *o.Q 1199 } 1200 qQ := qrQ 1201 if qQ != "" { 1202 1203 if err := r.SetQueryParam("q", qQ); err != nil { 1204 return err 1205 } 1206 } 1207 } 1208 1209 if o.Region != nil { 1210 1211 // query param region 1212 var qrRegion string 1213 1214 if o.Region != nil { 1215 qrRegion = *o.Region 1216 } 1217 qRegion := qrRegion 1218 if qRegion != "" { 1219 1220 if err := r.SetQueryParam("region", qRegion); err != nil { 1221 return err 1222 } 1223 } 1224 } 1225 1226 if o.Regionn != nil { 1227 1228 // query param region__n 1229 var qrRegionn string 1230 1231 if o.Regionn != nil { 1232 qrRegionn = *o.Regionn 1233 } 1234 qRegionn := qrRegionn 1235 if qRegionn != "" { 1236 1237 if err := r.SetQueryParam("region__n", qRegionn); err != nil { 1238 return err 1239 } 1240 } 1241 } 1242 1243 if o.RegionID != nil { 1244 1245 // query param region_id 1246 var qrRegionID string 1247 1248 if o.RegionID != nil { 1249 qrRegionID = *o.RegionID 1250 } 1251 qRegionID := qrRegionID 1252 if qRegionID != "" { 1253 1254 if err := r.SetQueryParam("region_id", qRegionID); err != nil { 1255 return err 1256 } 1257 } 1258 } 1259 1260 if o.RegionIDn != nil { 1261 1262 // query param region_id__n 1263 var qrRegionIDn string 1264 1265 if o.RegionIDn != nil { 1266 qrRegionIDn = *o.RegionIDn 1267 } 1268 qRegionIDn := qrRegionIDn 1269 if qRegionIDn != "" { 1270 1271 if err := r.SetQueryParam("region_id__n", qRegionIDn); err != nil { 1272 return err 1273 } 1274 } 1275 } 1276 1277 if o.Site != nil { 1278 1279 // query param site 1280 var qrSite string 1281 1282 if o.Site != nil { 1283 qrSite = *o.Site 1284 } 1285 qSite := qrSite 1286 if qSite != "" { 1287 1288 if err := r.SetQueryParam("site", qSite); err != nil { 1289 return err 1290 } 1291 } 1292 } 1293 1294 if o.Siten != nil { 1295 1296 // query param site__n 1297 var qrSiten string 1298 1299 if o.Siten != nil { 1300 qrSiten = *o.Siten 1301 } 1302 qSiten := qrSiten 1303 if qSiten != "" { 1304 1305 if err := r.SetQueryParam("site__n", qSiten); err != nil { 1306 return err 1307 } 1308 } 1309 } 1310 1311 if o.SiteGroup != nil { 1312 1313 // query param site_group 1314 var qrSiteGroup string 1315 1316 if o.SiteGroup != nil { 1317 qrSiteGroup = *o.SiteGroup 1318 } 1319 qSiteGroup := qrSiteGroup 1320 if qSiteGroup != "" { 1321 1322 if err := r.SetQueryParam("site_group", qSiteGroup); err != nil { 1323 return err 1324 } 1325 } 1326 } 1327 1328 if o.SiteGroupn != nil { 1329 1330 // query param site_group__n 1331 var qrSiteGroupn string 1332 1333 if o.SiteGroupn != nil { 1334 qrSiteGroupn = *o.SiteGroupn 1335 } 1336 qSiteGroupn := qrSiteGroupn 1337 if qSiteGroupn != "" { 1338 1339 if err := r.SetQueryParam("site_group__n", qSiteGroupn); err != nil { 1340 return err 1341 } 1342 } 1343 } 1344 1345 if o.SiteGroupID != nil { 1346 1347 // query param site_group_id 1348 var qrSiteGroupID string 1349 1350 if o.SiteGroupID != nil { 1351 qrSiteGroupID = *o.SiteGroupID 1352 } 1353 qSiteGroupID := qrSiteGroupID 1354 if qSiteGroupID != "" { 1355 1356 if err := r.SetQueryParam("site_group_id", qSiteGroupID); err != nil { 1357 return err 1358 } 1359 } 1360 } 1361 1362 if o.SiteGroupIDn != nil { 1363 1364 // query param site_group_id__n 1365 var qrSiteGroupIDn string 1366 1367 if o.SiteGroupIDn != nil { 1368 qrSiteGroupIDn = *o.SiteGroupIDn 1369 } 1370 qSiteGroupIDn := qrSiteGroupIDn 1371 if qSiteGroupIDn != "" { 1372 1373 if err := r.SetQueryParam("site_group_id__n", qSiteGroupIDn); err != nil { 1374 return err 1375 } 1376 } 1377 } 1378 1379 if o.SiteID != nil { 1380 1381 // query param site_id 1382 var qrSiteID string 1383 1384 if o.SiteID != nil { 1385 qrSiteID = *o.SiteID 1386 } 1387 qSiteID := qrSiteID 1388 if qSiteID != "" { 1389 1390 if err := r.SetQueryParam("site_id", qSiteID); err != nil { 1391 return err 1392 } 1393 } 1394 } 1395 1396 if o.SiteIDn != nil { 1397 1398 // query param site_id__n 1399 var qrSiteIDn string 1400 1401 if o.SiteIDn != nil { 1402 qrSiteIDn = *o.SiteIDn 1403 } 1404 qSiteIDn := qrSiteIDn 1405 if qSiteIDn != "" { 1406 1407 if err := r.SetQueryParam("site_id__n", qSiteIDn); err != nil { 1408 return err 1409 } 1410 } 1411 } 1412 1413 if o.Tag != nil { 1414 1415 // query param tag 1416 var qrTag string 1417 1418 if o.Tag != nil { 1419 qrTag = *o.Tag 1420 } 1421 qTag := qrTag 1422 if qTag != "" { 1423 1424 if err := r.SetQueryParam("tag", qTag); err != nil { 1425 return err 1426 } 1427 } 1428 } 1429 1430 if o.Tagn != nil { 1431 1432 // query param tag__n 1433 var qrTagn string 1434 1435 if o.Tagn != nil { 1436 qrTagn = *o.Tagn 1437 } 1438 qTagn := qrTagn 1439 if qTagn != "" { 1440 1441 if err := r.SetQueryParam("tag__n", qTagn); err != nil { 1442 return err 1443 } 1444 } 1445 } 1446 1447 if len(res) > 0 { 1448 return errors.CompositeValidationError(res...) 1449 } 1450 return nil 1451 }