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