github.com/digitalocean/go-netbox@v0.0.2/netbox/models/power_port.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 models 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 "encoding/json" 26 "strconv" 27 28 "github.com/go-openapi/errors" 29 "github.com/go-openapi/strfmt" 30 "github.com/go-openapi/swag" 31 "github.com/go-openapi/validate" 32 ) 33 34 // PowerPort power port 35 // 36 // swagger:model PowerPort 37 type PowerPort struct { 38 39 // occupied 40 // Read Only: true 41 Occupied *bool `json:"_occupied,omitempty"` 42 43 // Allocated draw 44 // 45 // Allocated power draw (watts) 46 // Maximum: 32767 47 // Minimum: 1 48 AllocatedDraw *int64 `json:"allocated_draw,omitempty"` 49 50 // cable 51 Cable *NestedCable `json:"cable,omitempty"` 52 53 // Cable peer 54 // 55 // 56 // Return the appropriate serializer for the cable termination model. 57 // 58 // Read Only: true 59 CablePeer map[string]*string `json:"cable_peer,omitempty"` 60 61 // Cable peer type 62 // Read Only: true 63 CablePeerType string `json:"cable_peer_type,omitempty"` 64 65 // Connected endpoint 66 // 67 // 68 // Return the appropriate serializer for the type of connected object. 69 // 70 // Read Only: true 71 ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` 72 73 // Connected endpoint reachable 74 // Read Only: true 75 ConnectedEndpointReachable *bool `json:"connected_endpoint_reachable,omitempty"` 76 77 // Connected endpoint type 78 // Read Only: true 79 ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` 80 81 // Created 82 // Read Only: true 83 // Format: date 84 Created strfmt.Date `json:"created,omitempty"` 85 86 // Custom fields 87 CustomFields interface{} `json:"custom_fields,omitempty"` 88 89 // Description 90 // Max Length: 200 91 Description string `json:"description,omitempty"` 92 93 // device 94 // Required: true 95 Device *NestedDevice `json:"device"` 96 97 // Display 98 // Read Only: true 99 Display string `json:"display,omitempty"` 100 101 // Id 102 // Read Only: true 103 ID int64 `json:"id,omitempty"` 104 105 // Label 106 // 107 // Physical label 108 // Max Length: 64 109 Label string `json:"label,omitempty"` 110 111 // Last updated 112 // Read Only: true 113 // Format: date-time 114 LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` 115 116 // Mark connected 117 // 118 // Treat as if a cable is connected 119 MarkConnected bool `json:"mark_connected,omitempty"` 120 121 // Maximum draw 122 // 123 // Maximum power draw (watts) 124 // Maximum: 32767 125 // Minimum: 1 126 MaximumDraw *int64 `json:"maximum_draw,omitempty"` 127 128 // Name 129 // Required: true 130 // Max Length: 64 131 // Min Length: 1 132 Name *string `json:"name"` 133 134 // tags 135 Tags []*NestedTag `json:"tags"` 136 137 // type 138 Type *PowerPortType `json:"type,omitempty"` 139 140 // Url 141 // Read Only: true 142 // Format: uri 143 URL strfmt.URI `json:"url,omitempty"` 144 } 145 146 // Validate validates this power port 147 func (m *PowerPort) Validate(formats strfmt.Registry) error { 148 var res []error 149 150 if err := m.validateAllocatedDraw(formats); err != nil { 151 res = append(res, err) 152 } 153 154 if err := m.validateCable(formats); err != nil { 155 res = append(res, err) 156 } 157 158 if err := m.validateCreated(formats); err != nil { 159 res = append(res, err) 160 } 161 162 if err := m.validateDescription(formats); err != nil { 163 res = append(res, err) 164 } 165 166 if err := m.validateDevice(formats); err != nil { 167 res = append(res, err) 168 } 169 170 if err := m.validateLabel(formats); err != nil { 171 res = append(res, err) 172 } 173 174 if err := m.validateLastUpdated(formats); err != nil { 175 res = append(res, err) 176 } 177 178 if err := m.validateMaximumDraw(formats); err != nil { 179 res = append(res, err) 180 } 181 182 if err := m.validateName(formats); err != nil { 183 res = append(res, err) 184 } 185 186 if err := m.validateTags(formats); err != nil { 187 res = append(res, err) 188 } 189 190 if err := m.validateType(formats); err != nil { 191 res = append(res, err) 192 } 193 194 if err := m.validateURL(formats); err != nil { 195 res = append(res, err) 196 } 197 198 if len(res) > 0 { 199 return errors.CompositeValidationError(res...) 200 } 201 return nil 202 } 203 204 func (m *PowerPort) validateAllocatedDraw(formats strfmt.Registry) error { 205 if swag.IsZero(m.AllocatedDraw) { // not required 206 return nil 207 } 208 209 if err := validate.MinimumInt("allocated_draw", "body", *m.AllocatedDraw, 1, false); err != nil { 210 return err 211 } 212 213 if err := validate.MaximumInt("allocated_draw", "body", *m.AllocatedDraw, 32767, false); err != nil { 214 return err 215 } 216 217 return nil 218 } 219 220 func (m *PowerPort) validateCable(formats strfmt.Registry) error { 221 if swag.IsZero(m.Cable) { // not required 222 return nil 223 } 224 225 if m.Cable != nil { 226 if err := m.Cable.Validate(formats); err != nil { 227 if ve, ok := err.(*errors.Validation); ok { 228 return ve.ValidateName("cable") 229 } else if ce, ok := err.(*errors.CompositeError); ok { 230 return ce.ValidateName("cable") 231 } 232 return err 233 } 234 } 235 236 return nil 237 } 238 239 func (m *PowerPort) validateCreated(formats strfmt.Registry) error { 240 if swag.IsZero(m.Created) { // not required 241 return nil 242 } 243 244 if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { 245 return err 246 } 247 248 return nil 249 } 250 251 func (m *PowerPort) validateDescription(formats strfmt.Registry) error { 252 if swag.IsZero(m.Description) { // not required 253 return nil 254 } 255 256 if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { 257 return err 258 } 259 260 return nil 261 } 262 263 func (m *PowerPort) validateDevice(formats strfmt.Registry) error { 264 265 if err := validate.Required("device", "body", m.Device); err != nil { 266 return err 267 } 268 269 if m.Device != nil { 270 if err := m.Device.Validate(formats); err != nil { 271 if ve, ok := err.(*errors.Validation); ok { 272 return ve.ValidateName("device") 273 } else if ce, ok := err.(*errors.CompositeError); ok { 274 return ce.ValidateName("device") 275 } 276 return err 277 } 278 } 279 280 return nil 281 } 282 283 func (m *PowerPort) validateLabel(formats strfmt.Registry) error { 284 if swag.IsZero(m.Label) { // not required 285 return nil 286 } 287 288 if err := validate.MaxLength("label", "body", m.Label, 64); err != nil { 289 return err 290 } 291 292 return nil 293 } 294 295 func (m *PowerPort) validateLastUpdated(formats strfmt.Registry) error { 296 if swag.IsZero(m.LastUpdated) { // not required 297 return nil 298 } 299 300 if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { 301 return err 302 } 303 304 return nil 305 } 306 307 func (m *PowerPort) validateMaximumDraw(formats strfmt.Registry) error { 308 if swag.IsZero(m.MaximumDraw) { // not required 309 return nil 310 } 311 312 if err := validate.MinimumInt("maximum_draw", "body", *m.MaximumDraw, 1, false); err != nil { 313 return err 314 } 315 316 if err := validate.MaximumInt("maximum_draw", "body", *m.MaximumDraw, 32767, false); err != nil { 317 return err 318 } 319 320 return nil 321 } 322 323 func (m *PowerPort) validateName(formats strfmt.Registry) error { 324 325 if err := validate.Required("name", "body", m.Name); err != nil { 326 return err 327 } 328 329 if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { 330 return err 331 } 332 333 if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { 334 return err 335 } 336 337 return nil 338 } 339 340 func (m *PowerPort) validateTags(formats strfmt.Registry) error { 341 if swag.IsZero(m.Tags) { // not required 342 return nil 343 } 344 345 for i := 0; i < len(m.Tags); i++ { 346 if swag.IsZero(m.Tags[i]) { // not required 347 continue 348 } 349 350 if m.Tags[i] != nil { 351 if err := m.Tags[i].Validate(formats); err != nil { 352 if ve, ok := err.(*errors.Validation); ok { 353 return ve.ValidateName("tags" + "." + strconv.Itoa(i)) 354 } else if ce, ok := err.(*errors.CompositeError); ok { 355 return ce.ValidateName("tags" + "." + strconv.Itoa(i)) 356 } 357 return err 358 } 359 } 360 361 } 362 363 return nil 364 } 365 366 func (m *PowerPort) validateType(formats strfmt.Registry) error { 367 if swag.IsZero(m.Type) { // not required 368 return nil 369 } 370 371 if m.Type != nil { 372 if err := m.Type.Validate(formats); err != nil { 373 if ve, ok := err.(*errors.Validation); ok { 374 return ve.ValidateName("type") 375 } else if ce, ok := err.(*errors.CompositeError); ok { 376 return ce.ValidateName("type") 377 } 378 return err 379 } 380 } 381 382 return nil 383 } 384 385 func (m *PowerPort) validateURL(formats strfmt.Registry) error { 386 if swag.IsZero(m.URL) { // not required 387 return nil 388 } 389 390 if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { 391 return err 392 } 393 394 return nil 395 } 396 397 // ContextValidate validate this power port based on the context it is used 398 func (m *PowerPort) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 399 var res []error 400 401 if err := m.contextValidateOccupied(ctx, formats); err != nil { 402 res = append(res, err) 403 } 404 405 if err := m.contextValidateCable(ctx, formats); err != nil { 406 res = append(res, err) 407 } 408 409 if err := m.contextValidateCablePeer(ctx, formats); err != nil { 410 res = append(res, err) 411 } 412 413 if err := m.contextValidateCablePeerType(ctx, formats); err != nil { 414 res = append(res, err) 415 } 416 417 if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { 418 res = append(res, err) 419 } 420 421 if err := m.contextValidateConnectedEndpointReachable(ctx, formats); err != nil { 422 res = append(res, err) 423 } 424 425 if err := m.contextValidateConnectedEndpointType(ctx, formats); err != nil { 426 res = append(res, err) 427 } 428 429 if err := m.contextValidateCreated(ctx, formats); err != nil { 430 res = append(res, err) 431 } 432 433 if err := m.contextValidateDevice(ctx, formats); err != nil { 434 res = append(res, err) 435 } 436 437 if err := m.contextValidateDisplay(ctx, formats); err != nil { 438 res = append(res, err) 439 } 440 441 if err := m.contextValidateID(ctx, formats); err != nil { 442 res = append(res, err) 443 } 444 445 if err := m.contextValidateLastUpdated(ctx, formats); err != nil { 446 res = append(res, err) 447 } 448 449 if err := m.contextValidateTags(ctx, formats); err != nil { 450 res = append(res, err) 451 } 452 453 if err := m.contextValidateType(ctx, formats); err != nil { 454 res = append(res, err) 455 } 456 457 if err := m.contextValidateURL(ctx, formats); err != nil { 458 res = append(res, err) 459 } 460 461 if len(res) > 0 { 462 return errors.CompositeValidationError(res...) 463 } 464 return nil 465 } 466 467 func (m *PowerPort) contextValidateOccupied(ctx context.Context, formats strfmt.Registry) error { 468 469 if err := validate.ReadOnly(ctx, "_occupied", "body", m.Occupied); err != nil { 470 return err 471 } 472 473 return nil 474 } 475 476 func (m *PowerPort) contextValidateCable(ctx context.Context, formats strfmt.Registry) error { 477 478 if m.Cable != nil { 479 if err := m.Cable.ContextValidate(ctx, formats); err != nil { 480 if ve, ok := err.(*errors.Validation); ok { 481 return ve.ValidateName("cable") 482 } else if ce, ok := err.(*errors.CompositeError); ok { 483 return ce.ValidateName("cable") 484 } 485 return err 486 } 487 } 488 489 return nil 490 } 491 492 func (m *PowerPort) contextValidateCablePeer(ctx context.Context, formats strfmt.Registry) error { 493 494 return nil 495 } 496 497 func (m *PowerPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { 498 499 if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { 500 return err 501 } 502 503 return nil 504 } 505 506 func (m *PowerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { 507 508 return nil 509 } 510 511 func (m *PowerPort) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { 512 513 if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { 514 return err 515 } 516 517 return nil 518 } 519 520 func (m *PowerPort) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { 521 522 if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { 523 return err 524 } 525 526 return nil 527 } 528 529 func (m *PowerPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { 530 531 if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { 532 return err 533 } 534 535 return nil 536 } 537 538 func (m *PowerPort) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { 539 540 if m.Device != nil { 541 if err := m.Device.ContextValidate(ctx, formats); err != nil { 542 if ve, ok := err.(*errors.Validation); ok { 543 return ve.ValidateName("device") 544 } else if ce, ok := err.(*errors.CompositeError); ok { 545 return ce.ValidateName("device") 546 } 547 return err 548 } 549 } 550 551 return nil 552 } 553 554 func (m *PowerPort) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { 555 556 if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { 557 return err 558 } 559 560 return nil 561 } 562 563 func (m *PowerPort) contextValidateID(ctx context.Context, formats strfmt.Registry) error { 564 565 if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { 566 return err 567 } 568 569 return nil 570 } 571 572 func (m *PowerPort) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { 573 574 if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { 575 return err 576 } 577 578 return nil 579 } 580 581 func (m *PowerPort) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { 582 583 for i := 0; i < len(m.Tags); i++ { 584 585 if m.Tags[i] != nil { 586 if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { 587 if ve, ok := err.(*errors.Validation); ok { 588 return ve.ValidateName("tags" + "." + strconv.Itoa(i)) 589 } else if ce, ok := err.(*errors.CompositeError); ok { 590 return ce.ValidateName("tags" + "." + strconv.Itoa(i)) 591 } 592 return err 593 } 594 } 595 596 } 597 598 return nil 599 } 600 601 func (m *PowerPort) contextValidateType(ctx context.Context, formats strfmt.Registry) error { 602 603 if m.Type != nil { 604 if err := m.Type.ContextValidate(ctx, formats); err != nil { 605 if ve, ok := err.(*errors.Validation); ok { 606 return ve.ValidateName("type") 607 } else if ce, ok := err.(*errors.CompositeError); ok { 608 return ce.ValidateName("type") 609 } 610 return err 611 } 612 } 613 614 return nil 615 } 616 617 func (m *PowerPort) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { 618 619 if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { 620 return err 621 } 622 623 return nil 624 } 625 626 // MarshalBinary interface implementation 627 func (m *PowerPort) MarshalBinary() ([]byte, error) { 628 if m == nil { 629 return nil, nil 630 } 631 return swag.WriteJSON(m) 632 } 633 634 // UnmarshalBinary interface implementation 635 func (m *PowerPort) UnmarshalBinary(b []byte) error { 636 var res PowerPort 637 if err := swag.ReadJSON(b, &res); err != nil { 638 return err 639 } 640 *m = res 641 return nil 642 } 643 644 // PowerPortType Type 645 // 646 // swagger:model PowerPortType 647 type PowerPortType struct { 648 649 // label 650 // Required: true 651 // Enum: [C6 C8 C14 C16 C20 C22 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15P NEMA 5-15P NEMA 5-20P NEMA 5-30P NEMA 5-50P NEMA 6-15P NEMA 6-20P NEMA 6-30P NEMA 6-50P NEMA 10-30P NEMA 10-50P NEMA 14-20P NEMA 14-30P NEMA 14-50P NEMA 14-60P NEMA 15-15P NEMA 15-20P NEMA 15-30P NEMA 15-50P NEMA 15-60P NEMA L1-15P NEMA L5-15P NEMA L5-20P NEMA L5-30P NEMA L5-50P NEMA L6-15P NEMA L6-20P NEMA L6-30P NEMA L6-50P NEMA L10-30P NEMA L14-20P NEMA L14-30P NEMA L14-50P NEMA L14-60P NEMA L15-20P NEMA L15-30P NEMA L15-50P NEMA L15-60P NEMA L21-20P NEMA L21-30P CS6361C CS6365C CS8165C CS8265C CS8365C CS8465C ITA Type E (CEE 7/5) ITA Type F (CEE 7/4) ITA Type E/F (CEE 7/7) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B USB 3.0 Type B USB 3.0 Micro B DC Terminal Saf-D-Grid Hardwired] 652 Label *string `json:"label"` 653 654 // value 655 // Required: true 656 // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 iec-60320-c22 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15p nema-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-10-30p nema-10-50p nema-14-20p nema-14-30p nema-14-50p nema-14-60p nema-15-15p nema-15-20p nema-15-30p nema-15-50p nema-15-60p nema-l1-15p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-15p nema-l6-20p nema-l6-30p nema-l6-50p nema-l10-30p nema-l14-20p nema-l14-30p nema-l14-50p nema-l14-60p nema-l15-20p nema-l15-30p nema-l15-50p nema-l15-60p nema-l21-20p nema-l21-30p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-3-b usb-3-micro-b dc-terminal saf-d-grid hardwired] 657 Value *string `json:"value"` 658 } 659 660 // Validate validates this power port type 661 func (m *PowerPortType) Validate(formats strfmt.Registry) error { 662 var res []error 663 664 if err := m.validateLabel(formats); err != nil { 665 res = append(res, err) 666 } 667 668 if err := m.validateValue(formats); err != nil { 669 res = append(res, err) 670 } 671 672 if len(res) > 0 { 673 return errors.CompositeValidationError(res...) 674 } 675 return nil 676 } 677 678 var powerPortTypeTypeLabelPropEnum []interface{} 679 680 func init() { 681 var res []string 682 if err := json.Unmarshal([]byte(`["C6","C8","C14","C16","C20","C22","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15P","NEMA 5-15P","NEMA 5-20P","NEMA 5-30P","NEMA 5-50P","NEMA 6-15P","NEMA 6-20P","NEMA 6-30P","NEMA 6-50P","NEMA 10-30P","NEMA 10-50P","NEMA 14-20P","NEMA 14-30P","NEMA 14-50P","NEMA 14-60P","NEMA 15-15P","NEMA 15-20P","NEMA 15-30P","NEMA 15-50P","NEMA 15-60P","NEMA L1-15P","NEMA L5-15P","NEMA L5-20P","NEMA L5-30P","NEMA L5-50P","NEMA L6-15P","NEMA L6-20P","NEMA L6-30P","NEMA L6-50P","NEMA L10-30P","NEMA L14-20P","NEMA L14-30P","NEMA L14-50P","NEMA L14-60P","NEMA L15-20P","NEMA L15-30P","NEMA L15-50P","NEMA L15-60P","NEMA L21-20P","NEMA L21-30P","CS6361C","CS6365C","CS8165C","CS8265C","CS8365C","CS8465C","ITA Type E (CEE 7/5)","ITA Type F (CEE 7/4)","ITA Type E/F (CEE 7/7)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","USB 3.0 Type B","USB 3.0 Micro B","DC Terminal","Saf-D-Grid","Hardwired"]`), &res); err != nil { 683 panic(err) 684 } 685 for _, v := range res { 686 powerPortTypeTypeLabelPropEnum = append(powerPortTypeTypeLabelPropEnum, v) 687 } 688 } 689 690 const ( 691 692 // PowerPortTypeLabelC6 captures enum value "C6" 693 PowerPortTypeLabelC6 string = "C6" 694 695 // PowerPortTypeLabelC8 captures enum value "C8" 696 PowerPortTypeLabelC8 string = "C8" 697 698 // PowerPortTypeLabelC14 captures enum value "C14" 699 PowerPortTypeLabelC14 string = "C14" 700 701 // PowerPortTypeLabelC16 captures enum value "C16" 702 PowerPortTypeLabelC16 string = "C16" 703 704 // PowerPortTypeLabelC20 captures enum value "C20" 705 PowerPortTypeLabelC20 string = "C20" 706 707 // PowerPortTypeLabelC22 captures enum value "C22" 708 PowerPortTypeLabelC22 string = "C22" 709 710 // PowerPortTypeLabelPPlusNPlusE4H captures enum value "P+N+E 4H" 711 PowerPortTypeLabelPPlusNPlusE4H string = "P+N+E 4H" 712 713 // PowerPortTypeLabelPPlusNPlusE6H captures enum value "P+N+E 6H" 714 PowerPortTypeLabelPPlusNPlusE6H string = "P+N+E 6H" 715 716 // PowerPortTypeLabelPPlusNPlusE9H captures enum value "P+N+E 9H" 717 PowerPortTypeLabelPPlusNPlusE9H string = "P+N+E 9H" 718 719 // PowerPortTypeLabelNr2PPlusE4H captures enum value "2P+E 4H" 720 PowerPortTypeLabelNr2PPlusE4H string = "2P+E 4H" 721 722 // PowerPortTypeLabelNr2PPlusE6H captures enum value "2P+E 6H" 723 PowerPortTypeLabelNr2PPlusE6H string = "2P+E 6H" 724 725 // PowerPortTypeLabelNr2PPlusE9H captures enum value "2P+E 9H" 726 PowerPortTypeLabelNr2PPlusE9H string = "2P+E 9H" 727 728 // PowerPortTypeLabelNr3PPlusE4H captures enum value "3P+E 4H" 729 PowerPortTypeLabelNr3PPlusE4H string = "3P+E 4H" 730 731 // PowerPortTypeLabelNr3PPlusE6H captures enum value "3P+E 6H" 732 PowerPortTypeLabelNr3PPlusE6H string = "3P+E 6H" 733 734 // PowerPortTypeLabelNr3PPlusE9H captures enum value "3P+E 9H" 735 PowerPortTypeLabelNr3PPlusE9H string = "3P+E 9H" 736 737 // PowerPortTypeLabelNr3PPlusNPlusE4H captures enum value "3P+N+E 4H" 738 PowerPortTypeLabelNr3PPlusNPlusE4H string = "3P+N+E 4H" 739 740 // PowerPortTypeLabelNr3PPlusNPlusE6H captures enum value "3P+N+E 6H" 741 PowerPortTypeLabelNr3PPlusNPlusE6H string = "3P+N+E 6H" 742 743 // PowerPortTypeLabelNr3PPlusNPlusE9H captures enum value "3P+N+E 9H" 744 PowerPortTypeLabelNr3PPlusNPlusE9H string = "3P+N+E 9H" 745 746 // PowerPortTypeLabelNEMA1Dash15P captures enum value "NEMA 1-15P" 747 PowerPortTypeLabelNEMA1Dash15P string = "NEMA 1-15P" 748 749 // PowerPortTypeLabelNEMA5Dash15P captures enum value "NEMA 5-15P" 750 PowerPortTypeLabelNEMA5Dash15P string = "NEMA 5-15P" 751 752 // PowerPortTypeLabelNEMA5Dash20P captures enum value "NEMA 5-20P" 753 PowerPortTypeLabelNEMA5Dash20P string = "NEMA 5-20P" 754 755 // PowerPortTypeLabelNEMA5Dash30P captures enum value "NEMA 5-30P" 756 PowerPortTypeLabelNEMA5Dash30P string = "NEMA 5-30P" 757 758 // PowerPortTypeLabelNEMA5Dash50P captures enum value "NEMA 5-50P" 759 PowerPortTypeLabelNEMA5Dash50P string = "NEMA 5-50P" 760 761 // PowerPortTypeLabelNEMA6Dash15P captures enum value "NEMA 6-15P" 762 PowerPortTypeLabelNEMA6Dash15P string = "NEMA 6-15P" 763 764 // PowerPortTypeLabelNEMA6Dash20P captures enum value "NEMA 6-20P" 765 PowerPortTypeLabelNEMA6Dash20P string = "NEMA 6-20P" 766 767 // PowerPortTypeLabelNEMA6Dash30P captures enum value "NEMA 6-30P" 768 PowerPortTypeLabelNEMA6Dash30P string = "NEMA 6-30P" 769 770 // PowerPortTypeLabelNEMA6Dash50P captures enum value "NEMA 6-50P" 771 PowerPortTypeLabelNEMA6Dash50P string = "NEMA 6-50P" 772 773 // PowerPortTypeLabelNEMA10Dash30P captures enum value "NEMA 10-30P" 774 PowerPortTypeLabelNEMA10Dash30P string = "NEMA 10-30P" 775 776 // PowerPortTypeLabelNEMA10Dash50P captures enum value "NEMA 10-50P" 777 PowerPortTypeLabelNEMA10Dash50P string = "NEMA 10-50P" 778 779 // PowerPortTypeLabelNEMA14Dash20P captures enum value "NEMA 14-20P" 780 PowerPortTypeLabelNEMA14Dash20P string = "NEMA 14-20P" 781 782 // PowerPortTypeLabelNEMA14Dash30P captures enum value "NEMA 14-30P" 783 PowerPortTypeLabelNEMA14Dash30P string = "NEMA 14-30P" 784 785 // PowerPortTypeLabelNEMA14Dash50P captures enum value "NEMA 14-50P" 786 PowerPortTypeLabelNEMA14Dash50P string = "NEMA 14-50P" 787 788 // PowerPortTypeLabelNEMA14Dash60P captures enum value "NEMA 14-60P" 789 PowerPortTypeLabelNEMA14Dash60P string = "NEMA 14-60P" 790 791 // PowerPortTypeLabelNEMA15Dash15P captures enum value "NEMA 15-15P" 792 PowerPortTypeLabelNEMA15Dash15P string = "NEMA 15-15P" 793 794 // PowerPortTypeLabelNEMA15Dash20P captures enum value "NEMA 15-20P" 795 PowerPortTypeLabelNEMA15Dash20P string = "NEMA 15-20P" 796 797 // PowerPortTypeLabelNEMA15Dash30P captures enum value "NEMA 15-30P" 798 PowerPortTypeLabelNEMA15Dash30P string = "NEMA 15-30P" 799 800 // PowerPortTypeLabelNEMA15Dash50P captures enum value "NEMA 15-50P" 801 PowerPortTypeLabelNEMA15Dash50P string = "NEMA 15-50P" 802 803 // PowerPortTypeLabelNEMA15Dash60P captures enum value "NEMA 15-60P" 804 PowerPortTypeLabelNEMA15Dash60P string = "NEMA 15-60P" 805 806 // PowerPortTypeLabelNEMAL1Dash15P captures enum value "NEMA L1-15P" 807 PowerPortTypeLabelNEMAL1Dash15P string = "NEMA L1-15P" 808 809 // PowerPortTypeLabelNEMAL5Dash15P captures enum value "NEMA L5-15P" 810 PowerPortTypeLabelNEMAL5Dash15P string = "NEMA L5-15P" 811 812 // PowerPortTypeLabelNEMAL5Dash20P captures enum value "NEMA L5-20P" 813 PowerPortTypeLabelNEMAL5Dash20P string = "NEMA L5-20P" 814 815 // PowerPortTypeLabelNEMAL5Dash30P captures enum value "NEMA L5-30P" 816 PowerPortTypeLabelNEMAL5Dash30P string = "NEMA L5-30P" 817 818 // PowerPortTypeLabelNEMAL5Dash50P captures enum value "NEMA L5-50P" 819 PowerPortTypeLabelNEMAL5Dash50P string = "NEMA L5-50P" 820 821 // PowerPortTypeLabelNEMAL6Dash15P captures enum value "NEMA L6-15P" 822 PowerPortTypeLabelNEMAL6Dash15P string = "NEMA L6-15P" 823 824 // PowerPortTypeLabelNEMAL6Dash20P captures enum value "NEMA L6-20P" 825 PowerPortTypeLabelNEMAL6Dash20P string = "NEMA L6-20P" 826 827 // PowerPortTypeLabelNEMAL6Dash30P captures enum value "NEMA L6-30P" 828 PowerPortTypeLabelNEMAL6Dash30P string = "NEMA L6-30P" 829 830 // PowerPortTypeLabelNEMAL6Dash50P captures enum value "NEMA L6-50P" 831 PowerPortTypeLabelNEMAL6Dash50P string = "NEMA L6-50P" 832 833 // PowerPortTypeLabelNEMAL10Dash30P captures enum value "NEMA L10-30P" 834 PowerPortTypeLabelNEMAL10Dash30P string = "NEMA L10-30P" 835 836 // PowerPortTypeLabelNEMAL14Dash20P captures enum value "NEMA L14-20P" 837 PowerPortTypeLabelNEMAL14Dash20P string = "NEMA L14-20P" 838 839 // PowerPortTypeLabelNEMAL14Dash30P captures enum value "NEMA L14-30P" 840 PowerPortTypeLabelNEMAL14Dash30P string = "NEMA L14-30P" 841 842 // PowerPortTypeLabelNEMAL14Dash50P captures enum value "NEMA L14-50P" 843 PowerPortTypeLabelNEMAL14Dash50P string = "NEMA L14-50P" 844 845 // PowerPortTypeLabelNEMAL14Dash60P captures enum value "NEMA L14-60P" 846 PowerPortTypeLabelNEMAL14Dash60P string = "NEMA L14-60P" 847 848 // PowerPortTypeLabelNEMAL15Dash20P captures enum value "NEMA L15-20P" 849 PowerPortTypeLabelNEMAL15Dash20P string = "NEMA L15-20P" 850 851 // PowerPortTypeLabelNEMAL15Dash30P captures enum value "NEMA L15-30P" 852 PowerPortTypeLabelNEMAL15Dash30P string = "NEMA L15-30P" 853 854 // PowerPortTypeLabelNEMAL15Dash50P captures enum value "NEMA L15-50P" 855 PowerPortTypeLabelNEMAL15Dash50P string = "NEMA L15-50P" 856 857 // PowerPortTypeLabelNEMAL15Dash60P captures enum value "NEMA L15-60P" 858 PowerPortTypeLabelNEMAL15Dash60P string = "NEMA L15-60P" 859 860 // PowerPortTypeLabelNEMAL21Dash20P captures enum value "NEMA L21-20P" 861 PowerPortTypeLabelNEMAL21Dash20P string = "NEMA L21-20P" 862 863 // PowerPortTypeLabelNEMAL21Dash30P captures enum value "NEMA L21-30P" 864 PowerPortTypeLabelNEMAL21Dash30P string = "NEMA L21-30P" 865 866 // PowerPortTypeLabelCS6361C captures enum value "CS6361C" 867 PowerPortTypeLabelCS6361C string = "CS6361C" 868 869 // PowerPortTypeLabelCS6365C captures enum value "CS6365C" 870 PowerPortTypeLabelCS6365C string = "CS6365C" 871 872 // PowerPortTypeLabelCS8165C captures enum value "CS8165C" 873 PowerPortTypeLabelCS8165C string = "CS8165C" 874 875 // PowerPortTypeLabelCS8265C captures enum value "CS8265C" 876 PowerPortTypeLabelCS8265C string = "CS8265C" 877 878 // PowerPortTypeLabelCS8365C captures enum value "CS8365C" 879 PowerPortTypeLabelCS8365C string = "CS8365C" 880 881 // PowerPortTypeLabelCS8465C captures enum value "CS8465C" 882 PowerPortTypeLabelCS8465C string = "CS8465C" 883 884 // PowerPortTypeLabelITATypeECEE75 captures enum value "ITA Type E (CEE 7/5)" 885 PowerPortTypeLabelITATypeECEE75 string = "ITA Type E (CEE 7/5)" 886 887 // PowerPortTypeLabelITATypeFCEE74 captures enum value "ITA Type F (CEE 7/4)" 888 PowerPortTypeLabelITATypeFCEE74 string = "ITA Type F (CEE 7/4)" 889 890 // PowerPortTypeLabelITATypeEFCEE77 captures enum value "ITA Type E/F (CEE 7/7)" 891 PowerPortTypeLabelITATypeEFCEE77 string = "ITA Type E/F (CEE 7/7)" 892 893 // PowerPortTypeLabelITATypeGBS1363 captures enum value "ITA Type G (BS 1363)" 894 PowerPortTypeLabelITATypeGBS1363 string = "ITA Type G (BS 1363)" 895 896 // PowerPortTypeLabelITATypeH captures enum value "ITA Type H" 897 PowerPortTypeLabelITATypeH string = "ITA Type H" 898 899 // PowerPortTypeLabelITATypeI captures enum value "ITA Type I" 900 PowerPortTypeLabelITATypeI string = "ITA Type I" 901 902 // PowerPortTypeLabelITATypeJ captures enum value "ITA Type J" 903 PowerPortTypeLabelITATypeJ string = "ITA Type J" 904 905 // PowerPortTypeLabelITATypeK captures enum value "ITA Type K" 906 PowerPortTypeLabelITATypeK string = "ITA Type K" 907 908 // PowerPortTypeLabelITATypeLCEI23Dash50 captures enum value "ITA Type L (CEI 23-50)" 909 PowerPortTypeLabelITATypeLCEI23Dash50 string = "ITA Type L (CEI 23-50)" 910 911 // PowerPortTypeLabelITATypeMBS546 captures enum value "ITA Type M (BS 546)" 912 PowerPortTypeLabelITATypeMBS546 string = "ITA Type M (BS 546)" 913 914 // PowerPortTypeLabelITATypeN captures enum value "ITA Type N" 915 PowerPortTypeLabelITATypeN string = "ITA Type N" 916 917 // PowerPortTypeLabelITATypeO captures enum value "ITA Type O" 918 PowerPortTypeLabelITATypeO string = "ITA Type O" 919 920 // PowerPortTypeLabelUSBTypeA captures enum value "USB Type A" 921 PowerPortTypeLabelUSBTypeA string = "USB Type A" 922 923 // PowerPortTypeLabelUSBTypeB captures enum value "USB Type B" 924 PowerPortTypeLabelUSBTypeB string = "USB Type B" 925 926 // PowerPortTypeLabelUSBTypeC captures enum value "USB Type C" 927 PowerPortTypeLabelUSBTypeC string = "USB Type C" 928 929 // PowerPortTypeLabelUSBMiniA captures enum value "USB Mini A" 930 PowerPortTypeLabelUSBMiniA string = "USB Mini A" 931 932 // PowerPortTypeLabelUSBMiniB captures enum value "USB Mini B" 933 PowerPortTypeLabelUSBMiniB string = "USB Mini B" 934 935 // PowerPortTypeLabelUSBMicroA captures enum value "USB Micro A" 936 PowerPortTypeLabelUSBMicroA string = "USB Micro A" 937 938 // PowerPortTypeLabelUSBMicroB captures enum value "USB Micro B" 939 PowerPortTypeLabelUSBMicroB string = "USB Micro B" 940 941 // PowerPortTypeLabelUSB3Dot0TypeB captures enum value "USB 3.0 Type B" 942 PowerPortTypeLabelUSB3Dot0TypeB string = "USB 3.0 Type B" 943 944 // PowerPortTypeLabelUSB3Dot0MicroB captures enum value "USB 3.0 Micro B" 945 PowerPortTypeLabelUSB3Dot0MicroB string = "USB 3.0 Micro B" 946 947 // PowerPortTypeLabelDCTerminal captures enum value "DC Terminal" 948 PowerPortTypeLabelDCTerminal string = "DC Terminal" 949 950 // PowerPortTypeLabelSafDashDDashGrid captures enum value "Saf-D-Grid" 951 PowerPortTypeLabelSafDashDDashGrid string = "Saf-D-Grid" 952 953 // PowerPortTypeLabelHardwired captures enum value "Hardwired" 954 PowerPortTypeLabelHardwired string = "Hardwired" 955 ) 956 957 // prop value enum 958 func (m *PowerPortType) validateLabelEnum(path, location string, value string) error { 959 if err := validate.EnumCase(path, location, value, powerPortTypeTypeLabelPropEnum, true); err != nil { 960 return err 961 } 962 return nil 963 } 964 965 func (m *PowerPortType) validateLabel(formats strfmt.Registry) error { 966 967 if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil { 968 return err 969 } 970 971 // value enum 972 if err := m.validateLabelEnum("type"+"."+"label", "body", *m.Label); err != nil { 973 return err 974 } 975 976 return nil 977 } 978 979 var powerPortTypeTypeValuePropEnum []interface{} 980 981 func init() { 982 var res []string 983 if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","iec-60320-c22","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15p","nema-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-10-30p","nema-10-50p","nema-14-20p","nema-14-30p","nema-14-50p","nema-14-60p","nema-15-15p","nema-15-20p","nema-15-30p","nema-15-50p","nema-15-60p","nema-l1-15p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-15p","nema-l6-20p","nema-l6-30p","nema-l6-50p","nema-l10-30p","nema-l14-20p","nema-l14-30p","nema-l14-50p","nema-l14-60p","nema-l15-20p","nema-l15-30p","nema-l15-50p","nema-l15-60p","nema-l21-20p","nema-l21-30p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-3-b","usb-3-micro-b","dc-terminal","saf-d-grid","hardwired"]`), &res); err != nil { 984 panic(err) 985 } 986 for _, v := range res { 987 powerPortTypeTypeValuePropEnum = append(powerPortTypeTypeValuePropEnum, v) 988 } 989 } 990 991 const ( 992 993 // PowerPortTypeValueIecDash60320DashC6 captures enum value "iec-60320-c6" 994 PowerPortTypeValueIecDash60320DashC6 string = "iec-60320-c6" 995 996 // PowerPortTypeValueIecDash60320DashC8 captures enum value "iec-60320-c8" 997 PowerPortTypeValueIecDash60320DashC8 string = "iec-60320-c8" 998 999 // PowerPortTypeValueIecDash60320DashC14 captures enum value "iec-60320-c14" 1000 PowerPortTypeValueIecDash60320DashC14 string = "iec-60320-c14" 1001 1002 // PowerPortTypeValueIecDash60320DashC16 captures enum value "iec-60320-c16" 1003 PowerPortTypeValueIecDash60320DashC16 string = "iec-60320-c16" 1004 1005 // PowerPortTypeValueIecDash60320DashC20 captures enum value "iec-60320-c20" 1006 PowerPortTypeValueIecDash60320DashC20 string = "iec-60320-c20" 1007 1008 // PowerPortTypeValueIecDash60320DashC22 captures enum value "iec-60320-c22" 1009 PowerPortTypeValueIecDash60320DashC22 string = "iec-60320-c22" 1010 1011 // PowerPortTypeValueIecDash60309DashpDashnDasheDash4h captures enum value "iec-60309-p-n-e-4h" 1012 PowerPortTypeValueIecDash60309DashpDashnDasheDash4h string = "iec-60309-p-n-e-4h" 1013 1014 // PowerPortTypeValueIecDash60309DashpDashnDasheDash6h captures enum value "iec-60309-p-n-e-6h" 1015 PowerPortTypeValueIecDash60309DashpDashnDasheDash6h string = "iec-60309-p-n-e-6h" 1016 1017 // PowerPortTypeValueIecDash60309DashpDashnDasheDash9h captures enum value "iec-60309-p-n-e-9h" 1018 PowerPortTypeValueIecDash60309DashpDashnDasheDash9h string = "iec-60309-p-n-e-9h" 1019 1020 // PowerPortTypeValueIecDash60309Dash2pDasheDash4h captures enum value "iec-60309-2p-e-4h" 1021 PowerPortTypeValueIecDash60309Dash2pDasheDash4h string = "iec-60309-2p-e-4h" 1022 1023 // PowerPortTypeValueIecDash60309Dash2pDasheDash6h captures enum value "iec-60309-2p-e-6h" 1024 PowerPortTypeValueIecDash60309Dash2pDasheDash6h string = "iec-60309-2p-e-6h" 1025 1026 // PowerPortTypeValueIecDash60309Dash2pDasheDash9h captures enum value "iec-60309-2p-e-9h" 1027 PowerPortTypeValueIecDash60309Dash2pDasheDash9h string = "iec-60309-2p-e-9h" 1028 1029 // PowerPortTypeValueIecDash60309Dash3pDasheDash4h captures enum value "iec-60309-3p-e-4h" 1030 PowerPortTypeValueIecDash60309Dash3pDasheDash4h string = "iec-60309-3p-e-4h" 1031 1032 // PowerPortTypeValueIecDash60309Dash3pDasheDash6h captures enum value "iec-60309-3p-e-6h" 1033 PowerPortTypeValueIecDash60309Dash3pDasheDash6h string = "iec-60309-3p-e-6h" 1034 1035 // PowerPortTypeValueIecDash60309Dash3pDasheDash9h captures enum value "iec-60309-3p-e-9h" 1036 PowerPortTypeValueIecDash60309Dash3pDasheDash9h string = "iec-60309-3p-e-9h" 1037 1038 // PowerPortTypeValueIecDash60309Dash3pDashnDasheDash4h captures enum value "iec-60309-3p-n-e-4h" 1039 PowerPortTypeValueIecDash60309Dash3pDashnDasheDash4h string = "iec-60309-3p-n-e-4h" 1040 1041 // PowerPortTypeValueIecDash60309Dash3pDashnDasheDash6h captures enum value "iec-60309-3p-n-e-6h" 1042 PowerPortTypeValueIecDash60309Dash3pDashnDasheDash6h string = "iec-60309-3p-n-e-6h" 1043 1044 // PowerPortTypeValueIecDash60309Dash3pDashnDasheDash9h captures enum value "iec-60309-3p-n-e-9h" 1045 PowerPortTypeValueIecDash60309Dash3pDashnDasheDash9h string = "iec-60309-3p-n-e-9h" 1046 1047 // PowerPortTypeValueNemaDash1Dash15p captures enum value "nema-1-15p" 1048 PowerPortTypeValueNemaDash1Dash15p string = "nema-1-15p" 1049 1050 // PowerPortTypeValueNemaDash5Dash15p captures enum value "nema-5-15p" 1051 PowerPortTypeValueNemaDash5Dash15p string = "nema-5-15p" 1052 1053 // PowerPortTypeValueNemaDash5Dash20p captures enum value "nema-5-20p" 1054 PowerPortTypeValueNemaDash5Dash20p string = "nema-5-20p" 1055 1056 // PowerPortTypeValueNemaDash5Dash30p captures enum value "nema-5-30p" 1057 PowerPortTypeValueNemaDash5Dash30p string = "nema-5-30p" 1058 1059 // PowerPortTypeValueNemaDash5Dash50p captures enum value "nema-5-50p" 1060 PowerPortTypeValueNemaDash5Dash50p string = "nema-5-50p" 1061 1062 // PowerPortTypeValueNemaDash6Dash15p captures enum value "nema-6-15p" 1063 PowerPortTypeValueNemaDash6Dash15p string = "nema-6-15p" 1064 1065 // PowerPortTypeValueNemaDash6Dash20p captures enum value "nema-6-20p" 1066 PowerPortTypeValueNemaDash6Dash20p string = "nema-6-20p" 1067 1068 // PowerPortTypeValueNemaDash6Dash30p captures enum value "nema-6-30p" 1069 PowerPortTypeValueNemaDash6Dash30p string = "nema-6-30p" 1070 1071 // PowerPortTypeValueNemaDash6Dash50p captures enum value "nema-6-50p" 1072 PowerPortTypeValueNemaDash6Dash50p string = "nema-6-50p" 1073 1074 // PowerPortTypeValueNemaDash10Dash30p captures enum value "nema-10-30p" 1075 PowerPortTypeValueNemaDash10Dash30p string = "nema-10-30p" 1076 1077 // PowerPortTypeValueNemaDash10Dash50p captures enum value "nema-10-50p" 1078 PowerPortTypeValueNemaDash10Dash50p string = "nema-10-50p" 1079 1080 // PowerPortTypeValueNemaDash14Dash20p captures enum value "nema-14-20p" 1081 PowerPortTypeValueNemaDash14Dash20p string = "nema-14-20p" 1082 1083 // PowerPortTypeValueNemaDash14Dash30p captures enum value "nema-14-30p" 1084 PowerPortTypeValueNemaDash14Dash30p string = "nema-14-30p" 1085 1086 // PowerPortTypeValueNemaDash14Dash50p captures enum value "nema-14-50p" 1087 PowerPortTypeValueNemaDash14Dash50p string = "nema-14-50p" 1088 1089 // PowerPortTypeValueNemaDash14Dash60p captures enum value "nema-14-60p" 1090 PowerPortTypeValueNemaDash14Dash60p string = "nema-14-60p" 1091 1092 // PowerPortTypeValueNemaDash15Dash15p captures enum value "nema-15-15p" 1093 PowerPortTypeValueNemaDash15Dash15p string = "nema-15-15p" 1094 1095 // PowerPortTypeValueNemaDash15Dash20p captures enum value "nema-15-20p" 1096 PowerPortTypeValueNemaDash15Dash20p string = "nema-15-20p" 1097 1098 // PowerPortTypeValueNemaDash15Dash30p captures enum value "nema-15-30p" 1099 PowerPortTypeValueNemaDash15Dash30p string = "nema-15-30p" 1100 1101 // PowerPortTypeValueNemaDash15Dash50p captures enum value "nema-15-50p" 1102 PowerPortTypeValueNemaDash15Dash50p string = "nema-15-50p" 1103 1104 // PowerPortTypeValueNemaDash15Dash60p captures enum value "nema-15-60p" 1105 PowerPortTypeValueNemaDash15Dash60p string = "nema-15-60p" 1106 1107 // PowerPortTypeValueNemaDashL1Dash15p captures enum value "nema-l1-15p" 1108 PowerPortTypeValueNemaDashL1Dash15p string = "nema-l1-15p" 1109 1110 // PowerPortTypeValueNemaDashL5Dash15p captures enum value "nema-l5-15p" 1111 PowerPortTypeValueNemaDashL5Dash15p string = "nema-l5-15p" 1112 1113 // PowerPortTypeValueNemaDashL5Dash20p captures enum value "nema-l5-20p" 1114 PowerPortTypeValueNemaDashL5Dash20p string = "nema-l5-20p" 1115 1116 // PowerPortTypeValueNemaDashL5Dash30p captures enum value "nema-l5-30p" 1117 PowerPortTypeValueNemaDashL5Dash30p string = "nema-l5-30p" 1118 1119 // PowerPortTypeValueNemaDashL5Dash50p captures enum value "nema-l5-50p" 1120 PowerPortTypeValueNemaDashL5Dash50p string = "nema-l5-50p" 1121 1122 // PowerPortTypeValueNemaDashL6Dash15p captures enum value "nema-l6-15p" 1123 PowerPortTypeValueNemaDashL6Dash15p string = "nema-l6-15p" 1124 1125 // PowerPortTypeValueNemaDashL6Dash20p captures enum value "nema-l6-20p" 1126 PowerPortTypeValueNemaDashL6Dash20p string = "nema-l6-20p" 1127 1128 // PowerPortTypeValueNemaDashL6Dash30p captures enum value "nema-l6-30p" 1129 PowerPortTypeValueNemaDashL6Dash30p string = "nema-l6-30p" 1130 1131 // PowerPortTypeValueNemaDashL6Dash50p captures enum value "nema-l6-50p" 1132 PowerPortTypeValueNemaDashL6Dash50p string = "nema-l6-50p" 1133 1134 // PowerPortTypeValueNemaDashL10Dash30p captures enum value "nema-l10-30p" 1135 PowerPortTypeValueNemaDashL10Dash30p string = "nema-l10-30p" 1136 1137 // PowerPortTypeValueNemaDashL14Dash20p captures enum value "nema-l14-20p" 1138 PowerPortTypeValueNemaDashL14Dash20p string = "nema-l14-20p" 1139 1140 // PowerPortTypeValueNemaDashL14Dash30p captures enum value "nema-l14-30p" 1141 PowerPortTypeValueNemaDashL14Dash30p string = "nema-l14-30p" 1142 1143 // PowerPortTypeValueNemaDashL14Dash50p captures enum value "nema-l14-50p" 1144 PowerPortTypeValueNemaDashL14Dash50p string = "nema-l14-50p" 1145 1146 // PowerPortTypeValueNemaDashL14Dash60p captures enum value "nema-l14-60p" 1147 PowerPortTypeValueNemaDashL14Dash60p string = "nema-l14-60p" 1148 1149 // PowerPortTypeValueNemaDashL15Dash20p captures enum value "nema-l15-20p" 1150 PowerPortTypeValueNemaDashL15Dash20p string = "nema-l15-20p" 1151 1152 // PowerPortTypeValueNemaDashL15Dash30p captures enum value "nema-l15-30p" 1153 PowerPortTypeValueNemaDashL15Dash30p string = "nema-l15-30p" 1154 1155 // PowerPortTypeValueNemaDashL15Dash50p captures enum value "nema-l15-50p" 1156 PowerPortTypeValueNemaDashL15Dash50p string = "nema-l15-50p" 1157 1158 // PowerPortTypeValueNemaDashL15Dash60p captures enum value "nema-l15-60p" 1159 PowerPortTypeValueNemaDashL15Dash60p string = "nema-l15-60p" 1160 1161 // PowerPortTypeValueNemaDashL21Dash20p captures enum value "nema-l21-20p" 1162 PowerPortTypeValueNemaDashL21Dash20p string = "nema-l21-20p" 1163 1164 // PowerPortTypeValueNemaDashL21Dash30p captures enum value "nema-l21-30p" 1165 PowerPortTypeValueNemaDashL21Dash30p string = "nema-l21-30p" 1166 1167 // PowerPortTypeValueCs6361c captures enum value "cs6361c" 1168 PowerPortTypeValueCs6361c string = "cs6361c" 1169 1170 // PowerPortTypeValueCs6365c captures enum value "cs6365c" 1171 PowerPortTypeValueCs6365c string = "cs6365c" 1172 1173 // PowerPortTypeValueCs8165c captures enum value "cs8165c" 1174 PowerPortTypeValueCs8165c string = "cs8165c" 1175 1176 // PowerPortTypeValueCs8265c captures enum value "cs8265c" 1177 PowerPortTypeValueCs8265c string = "cs8265c" 1178 1179 // PowerPortTypeValueCs8365c captures enum value "cs8365c" 1180 PowerPortTypeValueCs8365c string = "cs8365c" 1181 1182 // PowerPortTypeValueCs8465c captures enum value "cs8465c" 1183 PowerPortTypeValueCs8465c string = "cs8465c" 1184 1185 // PowerPortTypeValueItaDashe captures enum value "ita-e" 1186 PowerPortTypeValueItaDashe string = "ita-e" 1187 1188 // PowerPortTypeValueItaDashf captures enum value "ita-f" 1189 PowerPortTypeValueItaDashf string = "ita-f" 1190 1191 // PowerPortTypeValueItaDashEf captures enum value "ita-ef" 1192 PowerPortTypeValueItaDashEf string = "ita-ef" 1193 1194 // PowerPortTypeValueItaDashg captures enum value "ita-g" 1195 PowerPortTypeValueItaDashg string = "ita-g" 1196 1197 // PowerPortTypeValueItaDashh captures enum value "ita-h" 1198 PowerPortTypeValueItaDashh string = "ita-h" 1199 1200 // PowerPortTypeValueItaDashi captures enum value "ita-i" 1201 PowerPortTypeValueItaDashi string = "ita-i" 1202 1203 // PowerPortTypeValueItaDashj captures enum value "ita-j" 1204 PowerPortTypeValueItaDashj string = "ita-j" 1205 1206 // PowerPortTypeValueItaDashk captures enum value "ita-k" 1207 PowerPortTypeValueItaDashk string = "ita-k" 1208 1209 // PowerPortTypeValueItaDashl captures enum value "ita-l" 1210 PowerPortTypeValueItaDashl string = "ita-l" 1211 1212 // PowerPortTypeValueItaDashm captures enum value "ita-m" 1213 PowerPortTypeValueItaDashm string = "ita-m" 1214 1215 // PowerPortTypeValueItaDashn captures enum value "ita-n" 1216 PowerPortTypeValueItaDashn string = "ita-n" 1217 1218 // PowerPortTypeValueItaDasho captures enum value "ita-o" 1219 PowerPortTypeValueItaDasho string = "ita-o" 1220 1221 // PowerPortTypeValueUsbDasha captures enum value "usb-a" 1222 PowerPortTypeValueUsbDasha string = "usb-a" 1223 1224 // PowerPortTypeValueUsbDashb captures enum value "usb-b" 1225 PowerPortTypeValueUsbDashb string = "usb-b" 1226 1227 // PowerPortTypeValueUsbDashc captures enum value "usb-c" 1228 PowerPortTypeValueUsbDashc string = "usb-c" 1229 1230 // PowerPortTypeValueUsbDashMiniDasha captures enum value "usb-mini-a" 1231 PowerPortTypeValueUsbDashMiniDasha string = "usb-mini-a" 1232 1233 // PowerPortTypeValueUsbDashMiniDashb captures enum value "usb-mini-b" 1234 PowerPortTypeValueUsbDashMiniDashb string = "usb-mini-b" 1235 1236 // PowerPortTypeValueUsbDashMicroDasha captures enum value "usb-micro-a" 1237 PowerPortTypeValueUsbDashMicroDasha string = "usb-micro-a" 1238 1239 // PowerPortTypeValueUsbDashMicroDashb captures enum value "usb-micro-b" 1240 PowerPortTypeValueUsbDashMicroDashb string = "usb-micro-b" 1241 1242 // PowerPortTypeValueUsbDash3Dashb captures enum value "usb-3-b" 1243 PowerPortTypeValueUsbDash3Dashb string = "usb-3-b" 1244 1245 // PowerPortTypeValueUsbDash3DashMicroDashb captures enum value "usb-3-micro-b" 1246 PowerPortTypeValueUsbDash3DashMicroDashb string = "usb-3-micro-b" 1247 1248 // PowerPortTypeValueDcDashTerminal captures enum value "dc-terminal" 1249 PowerPortTypeValueDcDashTerminal string = "dc-terminal" 1250 1251 // PowerPortTypeValueSafDashdDashGrid captures enum value "saf-d-grid" 1252 PowerPortTypeValueSafDashdDashGrid string = "saf-d-grid" 1253 1254 // PowerPortTypeValueHardwired captures enum value "hardwired" 1255 PowerPortTypeValueHardwired string = "hardwired" 1256 ) 1257 1258 // prop value enum 1259 func (m *PowerPortType) validateValueEnum(path, location string, value string) error { 1260 if err := validate.EnumCase(path, location, value, powerPortTypeTypeValuePropEnum, true); err != nil { 1261 return err 1262 } 1263 return nil 1264 } 1265 1266 func (m *PowerPortType) validateValue(formats strfmt.Registry) error { 1267 1268 if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil { 1269 return err 1270 } 1271 1272 // value enum 1273 if err := m.validateValueEnum("type"+"."+"value", "body", *m.Value); err != nil { 1274 return err 1275 } 1276 1277 return nil 1278 } 1279 1280 // ContextValidate validates this power port type based on context it is used 1281 func (m *PowerPortType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 1282 return nil 1283 } 1284 1285 // MarshalBinary interface implementation 1286 func (m *PowerPortType) MarshalBinary() ([]byte, error) { 1287 if m == nil { 1288 return nil, nil 1289 } 1290 return swag.WriteJSON(m) 1291 } 1292 1293 // UnmarshalBinary interface implementation 1294 func (m *PowerPortType) UnmarshalBinary(b []byte) error { 1295 var res PowerPortType 1296 if err := swag.ReadJSON(b, &res); err != nil { 1297 return err 1298 } 1299 *m = res 1300 return nil 1301 }