github.com/digitalocean/go-netbox@v0.0.2/netbox/models/power_port_template.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  
    27  	"github.com/go-openapi/errors"
    28  	"github.com/go-openapi/strfmt"
    29  	"github.com/go-openapi/swag"
    30  	"github.com/go-openapi/validate"
    31  )
    32  
    33  // PowerPortTemplate power port template
    34  //
    35  // swagger:model PowerPortTemplate
    36  type PowerPortTemplate struct {
    37  
    38  	// Allocated draw
    39  	//
    40  	// Allocated power draw (watts)
    41  	// Maximum: 32767
    42  	// Minimum: 1
    43  	AllocatedDraw *int64 `json:"allocated_draw,omitempty"`
    44  
    45  	// Created
    46  	// Read Only: true
    47  	// Format: date
    48  	Created strfmt.Date `json:"created,omitempty"`
    49  
    50  	// Description
    51  	// Max Length: 200
    52  	Description string `json:"description,omitempty"`
    53  
    54  	// device type
    55  	// Required: true
    56  	DeviceType *NestedDeviceType `json:"device_type"`
    57  
    58  	// Display
    59  	// Read Only: true
    60  	Display string `json:"display,omitempty"`
    61  
    62  	// Id
    63  	// Read Only: true
    64  	ID int64 `json:"id,omitempty"`
    65  
    66  	// Label
    67  	//
    68  	// Physical label
    69  	// Max Length: 64
    70  	Label string `json:"label,omitempty"`
    71  
    72  	// Last updated
    73  	// Read Only: true
    74  	// Format: date-time
    75  	LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
    76  
    77  	// Maximum draw
    78  	//
    79  	// Maximum power draw (watts)
    80  	// Maximum: 32767
    81  	// Minimum: 1
    82  	MaximumDraw *int64 `json:"maximum_draw,omitempty"`
    83  
    84  	// Name
    85  	// Required: true
    86  	// Max Length: 64
    87  	// Min Length: 1
    88  	Name *string `json:"name"`
    89  
    90  	// type
    91  	Type *PowerPortTemplateType `json:"type,omitempty"`
    92  
    93  	// Url
    94  	// Read Only: true
    95  	// Format: uri
    96  	URL strfmt.URI `json:"url,omitempty"`
    97  }
    98  
    99  // Validate validates this power port template
   100  func (m *PowerPortTemplate) Validate(formats strfmt.Registry) error {
   101  	var res []error
   102  
   103  	if err := m.validateAllocatedDraw(formats); err != nil {
   104  		res = append(res, err)
   105  	}
   106  
   107  	if err := m.validateCreated(formats); err != nil {
   108  		res = append(res, err)
   109  	}
   110  
   111  	if err := m.validateDescription(formats); err != nil {
   112  		res = append(res, err)
   113  	}
   114  
   115  	if err := m.validateDeviceType(formats); err != nil {
   116  		res = append(res, err)
   117  	}
   118  
   119  	if err := m.validateLabel(formats); err != nil {
   120  		res = append(res, err)
   121  	}
   122  
   123  	if err := m.validateLastUpdated(formats); err != nil {
   124  		res = append(res, err)
   125  	}
   126  
   127  	if err := m.validateMaximumDraw(formats); err != nil {
   128  		res = append(res, err)
   129  	}
   130  
   131  	if err := m.validateName(formats); err != nil {
   132  		res = append(res, err)
   133  	}
   134  
   135  	if err := m.validateType(formats); err != nil {
   136  		res = append(res, err)
   137  	}
   138  
   139  	if err := m.validateURL(formats); err != nil {
   140  		res = append(res, err)
   141  	}
   142  
   143  	if len(res) > 0 {
   144  		return errors.CompositeValidationError(res...)
   145  	}
   146  	return nil
   147  }
   148  
   149  func (m *PowerPortTemplate) validateAllocatedDraw(formats strfmt.Registry) error {
   150  	if swag.IsZero(m.AllocatedDraw) { // not required
   151  		return nil
   152  	}
   153  
   154  	if err := validate.MinimumInt("allocated_draw", "body", *m.AllocatedDraw, 1, false); err != nil {
   155  		return err
   156  	}
   157  
   158  	if err := validate.MaximumInt("allocated_draw", "body", *m.AllocatedDraw, 32767, false); err != nil {
   159  		return err
   160  	}
   161  
   162  	return nil
   163  }
   164  
   165  func (m *PowerPortTemplate) validateCreated(formats strfmt.Registry) error {
   166  	if swag.IsZero(m.Created) { // not required
   167  		return nil
   168  	}
   169  
   170  	if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil {
   171  		return err
   172  	}
   173  
   174  	return nil
   175  }
   176  
   177  func (m *PowerPortTemplate) validateDescription(formats strfmt.Registry) error {
   178  	if swag.IsZero(m.Description) { // not required
   179  		return nil
   180  	}
   181  
   182  	if err := validate.MaxLength("description", "body", m.Description, 200); err != nil {
   183  		return err
   184  	}
   185  
   186  	return nil
   187  }
   188  
   189  func (m *PowerPortTemplate) validateDeviceType(formats strfmt.Registry) error {
   190  
   191  	if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
   192  		return err
   193  	}
   194  
   195  	if m.DeviceType != nil {
   196  		if err := m.DeviceType.Validate(formats); err != nil {
   197  			if ve, ok := err.(*errors.Validation); ok {
   198  				return ve.ValidateName("device_type")
   199  			} else if ce, ok := err.(*errors.CompositeError); ok {
   200  				return ce.ValidateName("device_type")
   201  			}
   202  			return err
   203  		}
   204  	}
   205  
   206  	return nil
   207  }
   208  
   209  func (m *PowerPortTemplate) validateLabel(formats strfmt.Registry) error {
   210  	if swag.IsZero(m.Label) { // not required
   211  		return nil
   212  	}
   213  
   214  	if err := validate.MaxLength("label", "body", m.Label, 64); err != nil {
   215  		return err
   216  	}
   217  
   218  	return nil
   219  }
   220  
   221  func (m *PowerPortTemplate) validateLastUpdated(formats strfmt.Registry) error {
   222  	if swag.IsZero(m.LastUpdated) { // not required
   223  		return nil
   224  	}
   225  
   226  	if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil {
   227  		return err
   228  	}
   229  
   230  	return nil
   231  }
   232  
   233  func (m *PowerPortTemplate) validateMaximumDraw(formats strfmt.Registry) error {
   234  	if swag.IsZero(m.MaximumDraw) { // not required
   235  		return nil
   236  	}
   237  
   238  	if err := validate.MinimumInt("maximum_draw", "body", *m.MaximumDraw, 1, false); err != nil {
   239  		return err
   240  	}
   241  
   242  	if err := validate.MaximumInt("maximum_draw", "body", *m.MaximumDraw, 32767, false); err != nil {
   243  		return err
   244  	}
   245  
   246  	return nil
   247  }
   248  
   249  func (m *PowerPortTemplate) validateName(formats strfmt.Registry) error {
   250  
   251  	if err := validate.Required("name", "body", m.Name); err != nil {
   252  		return err
   253  	}
   254  
   255  	if err := validate.MinLength("name", "body", *m.Name, 1); err != nil {
   256  		return err
   257  	}
   258  
   259  	if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil {
   260  		return err
   261  	}
   262  
   263  	return nil
   264  }
   265  
   266  func (m *PowerPortTemplate) validateType(formats strfmt.Registry) error {
   267  	if swag.IsZero(m.Type) { // not required
   268  		return nil
   269  	}
   270  
   271  	if m.Type != nil {
   272  		if err := m.Type.Validate(formats); err != nil {
   273  			if ve, ok := err.(*errors.Validation); ok {
   274  				return ve.ValidateName("type")
   275  			} else if ce, ok := err.(*errors.CompositeError); ok {
   276  				return ce.ValidateName("type")
   277  			}
   278  			return err
   279  		}
   280  	}
   281  
   282  	return nil
   283  }
   284  
   285  func (m *PowerPortTemplate) validateURL(formats strfmt.Registry) error {
   286  	if swag.IsZero(m.URL) { // not required
   287  		return nil
   288  	}
   289  
   290  	if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil {
   291  		return err
   292  	}
   293  
   294  	return nil
   295  }
   296  
   297  // ContextValidate validate this power port template based on the context it is used
   298  func (m *PowerPortTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
   299  	var res []error
   300  
   301  	if err := m.contextValidateCreated(ctx, formats); err != nil {
   302  		res = append(res, err)
   303  	}
   304  
   305  	if err := m.contextValidateDeviceType(ctx, formats); err != nil {
   306  		res = append(res, err)
   307  	}
   308  
   309  	if err := m.contextValidateDisplay(ctx, formats); err != nil {
   310  		res = append(res, err)
   311  	}
   312  
   313  	if err := m.contextValidateID(ctx, formats); err != nil {
   314  		res = append(res, err)
   315  	}
   316  
   317  	if err := m.contextValidateLastUpdated(ctx, formats); err != nil {
   318  		res = append(res, err)
   319  	}
   320  
   321  	if err := m.contextValidateType(ctx, formats); err != nil {
   322  		res = append(res, err)
   323  	}
   324  
   325  	if err := m.contextValidateURL(ctx, formats); err != nil {
   326  		res = append(res, err)
   327  	}
   328  
   329  	if len(res) > 0 {
   330  		return errors.CompositeValidationError(res...)
   331  	}
   332  	return nil
   333  }
   334  
   335  func (m *PowerPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error {
   336  
   337  	if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil {
   338  		return err
   339  	}
   340  
   341  	return nil
   342  }
   343  
   344  func (m *PowerPortTemplate) contextValidateDeviceType(ctx context.Context, formats strfmt.Registry) error {
   345  
   346  	if m.DeviceType != nil {
   347  		if err := m.DeviceType.ContextValidate(ctx, formats); err != nil {
   348  			if ve, ok := err.(*errors.Validation); ok {
   349  				return ve.ValidateName("device_type")
   350  			} else if ce, ok := err.(*errors.CompositeError); ok {
   351  				return ce.ValidateName("device_type")
   352  			}
   353  			return err
   354  		}
   355  	}
   356  
   357  	return nil
   358  }
   359  
   360  func (m *PowerPortTemplate) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error {
   361  
   362  	if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil {
   363  		return err
   364  	}
   365  
   366  	return nil
   367  }
   368  
   369  func (m *PowerPortTemplate) contextValidateID(ctx context.Context, formats strfmt.Registry) error {
   370  
   371  	if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil {
   372  		return err
   373  	}
   374  
   375  	return nil
   376  }
   377  
   378  func (m *PowerPortTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error {
   379  
   380  	if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil {
   381  		return err
   382  	}
   383  
   384  	return nil
   385  }
   386  
   387  func (m *PowerPortTemplate) contextValidateType(ctx context.Context, formats strfmt.Registry) error {
   388  
   389  	if m.Type != nil {
   390  		if err := m.Type.ContextValidate(ctx, formats); err != nil {
   391  			if ve, ok := err.(*errors.Validation); ok {
   392  				return ve.ValidateName("type")
   393  			} else if ce, ok := err.(*errors.CompositeError); ok {
   394  				return ce.ValidateName("type")
   395  			}
   396  			return err
   397  		}
   398  	}
   399  
   400  	return nil
   401  }
   402  
   403  func (m *PowerPortTemplate) contextValidateURL(ctx context.Context, formats strfmt.Registry) error {
   404  
   405  	if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil {
   406  		return err
   407  	}
   408  
   409  	return nil
   410  }
   411  
   412  // MarshalBinary interface implementation
   413  func (m *PowerPortTemplate) MarshalBinary() ([]byte, error) {
   414  	if m == nil {
   415  		return nil, nil
   416  	}
   417  	return swag.WriteJSON(m)
   418  }
   419  
   420  // UnmarshalBinary interface implementation
   421  func (m *PowerPortTemplate) UnmarshalBinary(b []byte) error {
   422  	var res PowerPortTemplate
   423  	if err := swag.ReadJSON(b, &res); err != nil {
   424  		return err
   425  	}
   426  	*m = res
   427  	return nil
   428  }
   429  
   430  // PowerPortTemplateType Type
   431  //
   432  // swagger:model PowerPortTemplateType
   433  type PowerPortTemplateType struct {
   434  
   435  	// label
   436  	// Required: true
   437  	// 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]
   438  	Label *string `json:"label"`
   439  
   440  	// value
   441  	// Required: true
   442  	// 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]
   443  	Value *string `json:"value"`
   444  }
   445  
   446  // Validate validates this power port template type
   447  func (m *PowerPortTemplateType) Validate(formats strfmt.Registry) error {
   448  	var res []error
   449  
   450  	if err := m.validateLabel(formats); err != nil {
   451  		res = append(res, err)
   452  	}
   453  
   454  	if err := m.validateValue(formats); err != nil {
   455  		res = append(res, err)
   456  	}
   457  
   458  	if len(res) > 0 {
   459  		return errors.CompositeValidationError(res...)
   460  	}
   461  	return nil
   462  }
   463  
   464  var powerPortTemplateTypeTypeLabelPropEnum []interface{}
   465  
   466  func init() {
   467  	var res []string
   468  	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 {
   469  		panic(err)
   470  	}
   471  	for _, v := range res {
   472  		powerPortTemplateTypeTypeLabelPropEnum = append(powerPortTemplateTypeTypeLabelPropEnum, v)
   473  	}
   474  }
   475  
   476  const (
   477  
   478  	// PowerPortTemplateTypeLabelC6 captures enum value "C6"
   479  	PowerPortTemplateTypeLabelC6 string = "C6"
   480  
   481  	// PowerPortTemplateTypeLabelC8 captures enum value "C8"
   482  	PowerPortTemplateTypeLabelC8 string = "C8"
   483  
   484  	// PowerPortTemplateTypeLabelC14 captures enum value "C14"
   485  	PowerPortTemplateTypeLabelC14 string = "C14"
   486  
   487  	// PowerPortTemplateTypeLabelC16 captures enum value "C16"
   488  	PowerPortTemplateTypeLabelC16 string = "C16"
   489  
   490  	// PowerPortTemplateTypeLabelC20 captures enum value "C20"
   491  	PowerPortTemplateTypeLabelC20 string = "C20"
   492  
   493  	// PowerPortTemplateTypeLabelC22 captures enum value "C22"
   494  	PowerPortTemplateTypeLabelC22 string = "C22"
   495  
   496  	// PowerPortTemplateTypeLabelPPlusNPlusE4H captures enum value "P+N+E 4H"
   497  	PowerPortTemplateTypeLabelPPlusNPlusE4H string = "P+N+E 4H"
   498  
   499  	// PowerPortTemplateTypeLabelPPlusNPlusE6H captures enum value "P+N+E 6H"
   500  	PowerPortTemplateTypeLabelPPlusNPlusE6H string = "P+N+E 6H"
   501  
   502  	// PowerPortTemplateTypeLabelPPlusNPlusE9H captures enum value "P+N+E 9H"
   503  	PowerPortTemplateTypeLabelPPlusNPlusE9H string = "P+N+E 9H"
   504  
   505  	// PowerPortTemplateTypeLabelNr2PPlusE4H captures enum value "2P+E 4H"
   506  	PowerPortTemplateTypeLabelNr2PPlusE4H string = "2P+E 4H"
   507  
   508  	// PowerPortTemplateTypeLabelNr2PPlusE6H captures enum value "2P+E 6H"
   509  	PowerPortTemplateTypeLabelNr2PPlusE6H string = "2P+E 6H"
   510  
   511  	// PowerPortTemplateTypeLabelNr2PPlusE9H captures enum value "2P+E 9H"
   512  	PowerPortTemplateTypeLabelNr2PPlusE9H string = "2P+E 9H"
   513  
   514  	// PowerPortTemplateTypeLabelNr3PPlusE4H captures enum value "3P+E 4H"
   515  	PowerPortTemplateTypeLabelNr3PPlusE4H string = "3P+E 4H"
   516  
   517  	// PowerPortTemplateTypeLabelNr3PPlusE6H captures enum value "3P+E 6H"
   518  	PowerPortTemplateTypeLabelNr3PPlusE6H string = "3P+E 6H"
   519  
   520  	// PowerPortTemplateTypeLabelNr3PPlusE9H captures enum value "3P+E 9H"
   521  	PowerPortTemplateTypeLabelNr3PPlusE9H string = "3P+E 9H"
   522  
   523  	// PowerPortTemplateTypeLabelNr3PPlusNPlusE4H captures enum value "3P+N+E 4H"
   524  	PowerPortTemplateTypeLabelNr3PPlusNPlusE4H string = "3P+N+E 4H"
   525  
   526  	// PowerPortTemplateTypeLabelNr3PPlusNPlusE6H captures enum value "3P+N+E 6H"
   527  	PowerPortTemplateTypeLabelNr3PPlusNPlusE6H string = "3P+N+E 6H"
   528  
   529  	// PowerPortTemplateTypeLabelNr3PPlusNPlusE9H captures enum value "3P+N+E 9H"
   530  	PowerPortTemplateTypeLabelNr3PPlusNPlusE9H string = "3P+N+E 9H"
   531  
   532  	// PowerPortTemplateTypeLabelNEMA1Dash15P captures enum value "NEMA 1-15P"
   533  	PowerPortTemplateTypeLabelNEMA1Dash15P string = "NEMA 1-15P"
   534  
   535  	// PowerPortTemplateTypeLabelNEMA5Dash15P captures enum value "NEMA 5-15P"
   536  	PowerPortTemplateTypeLabelNEMA5Dash15P string = "NEMA 5-15P"
   537  
   538  	// PowerPortTemplateTypeLabelNEMA5Dash20P captures enum value "NEMA 5-20P"
   539  	PowerPortTemplateTypeLabelNEMA5Dash20P string = "NEMA 5-20P"
   540  
   541  	// PowerPortTemplateTypeLabelNEMA5Dash30P captures enum value "NEMA 5-30P"
   542  	PowerPortTemplateTypeLabelNEMA5Dash30P string = "NEMA 5-30P"
   543  
   544  	// PowerPortTemplateTypeLabelNEMA5Dash50P captures enum value "NEMA 5-50P"
   545  	PowerPortTemplateTypeLabelNEMA5Dash50P string = "NEMA 5-50P"
   546  
   547  	// PowerPortTemplateTypeLabelNEMA6Dash15P captures enum value "NEMA 6-15P"
   548  	PowerPortTemplateTypeLabelNEMA6Dash15P string = "NEMA 6-15P"
   549  
   550  	// PowerPortTemplateTypeLabelNEMA6Dash20P captures enum value "NEMA 6-20P"
   551  	PowerPortTemplateTypeLabelNEMA6Dash20P string = "NEMA 6-20P"
   552  
   553  	// PowerPortTemplateTypeLabelNEMA6Dash30P captures enum value "NEMA 6-30P"
   554  	PowerPortTemplateTypeLabelNEMA6Dash30P string = "NEMA 6-30P"
   555  
   556  	// PowerPortTemplateTypeLabelNEMA6Dash50P captures enum value "NEMA 6-50P"
   557  	PowerPortTemplateTypeLabelNEMA6Dash50P string = "NEMA 6-50P"
   558  
   559  	// PowerPortTemplateTypeLabelNEMA10Dash30P captures enum value "NEMA 10-30P"
   560  	PowerPortTemplateTypeLabelNEMA10Dash30P string = "NEMA 10-30P"
   561  
   562  	// PowerPortTemplateTypeLabelNEMA10Dash50P captures enum value "NEMA 10-50P"
   563  	PowerPortTemplateTypeLabelNEMA10Dash50P string = "NEMA 10-50P"
   564  
   565  	// PowerPortTemplateTypeLabelNEMA14Dash20P captures enum value "NEMA 14-20P"
   566  	PowerPortTemplateTypeLabelNEMA14Dash20P string = "NEMA 14-20P"
   567  
   568  	// PowerPortTemplateTypeLabelNEMA14Dash30P captures enum value "NEMA 14-30P"
   569  	PowerPortTemplateTypeLabelNEMA14Dash30P string = "NEMA 14-30P"
   570  
   571  	// PowerPortTemplateTypeLabelNEMA14Dash50P captures enum value "NEMA 14-50P"
   572  	PowerPortTemplateTypeLabelNEMA14Dash50P string = "NEMA 14-50P"
   573  
   574  	// PowerPortTemplateTypeLabelNEMA14Dash60P captures enum value "NEMA 14-60P"
   575  	PowerPortTemplateTypeLabelNEMA14Dash60P string = "NEMA 14-60P"
   576  
   577  	// PowerPortTemplateTypeLabelNEMA15Dash15P captures enum value "NEMA 15-15P"
   578  	PowerPortTemplateTypeLabelNEMA15Dash15P string = "NEMA 15-15P"
   579  
   580  	// PowerPortTemplateTypeLabelNEMA15Dash20P captures enum value "NEMA 15-20P"
   581  	PowerPortTemplateTypeLabelNEMA15Dash20P string = "NEMA 15-20P"
   582  
   583  	// PowerPortTemplateTypeLabelNEMA15Dash30P captures enum value "NEMA 15-30P"
   584  	PowerPortTemplateTypeLabelNEMA15Dash30P string = "NEMA 15-30P"
   585  
   586  	// PowerPortTemplateTypeLabelNEMA15Dash50P captures enum value "NEMA 15-50P"
   587  	PowerPortTemplateTypeLabelNEMA15Dash50P string = "NEMA 15-50P"
   588  
   589  	// PowerPortTemplateTypeLabelNEMA15Dash60P captures enum value "NEMA 15-60P"
   590  	PowerPortTemplateTypeLabelNEMA15Dash60P string = "NEMA 15-60P"
   591  
   592  	// PowerPortTemplateTypeLabelNEMAL1Dash15P captures enum value "NEMA L1-15P"
   593  	PowerPortTemplateTypeLabelNEMAL1Dash15P string = "NEMA L1-15P"
   594  
   595  	// PowerPortTemplateTypeLabelNEMAL5Dash15P captures enum value "NEMA L5-15P"
   596  	PowerPortTemplateTypeLabelNEMAL5Dash15P string = "NEMA L5-15P"
   597  
   598  	// PowerPortTemplateTypeLabelNEMAL5Dash20P captures enum value "NEMA L5-20P"
   599  	PowerPortTemplateTypeLabelNEMAL5Dash20P string = "NEMA L5-20P"
   600  
   601  	// PowerPortTemplateTypeLabelNEMAL5Dash30P captures enum value "NEMA L5-30P"
   602  	PowerPortTemplateTypeLabelNEMAL5Dash30P string = "NEMA L5-30P"
   603  
   604  	// PowerPortTemplateTypeLabelNEMAL5Dash50P captures enum value "NEMA L5-50P"
   605  	PowerPortTemplateTypeLabelNEMAL5Dash50P string = "NEMA L5-50P"
   606  
   607  	// PowerPortTemplateTypeLabelNEMAL6Dash15P captures enum value "NEMA L6-15P"
   608  	PowerPortTemplateTypeLabelNEMAL6Dash15P string = "NEMA L6-15P"
   609  
   610  	// PowerPortTemplateTypeLabelNEMAL6Dash20P captures enum value "NEMA L6-20P"
   611  	PowerPortTemplateTypeLabelNEMAL6Dash20P string = "NEMA L6-20P"
   612  
   613  	// PowerPortTemplateTypeLabelNEMAL6Dash30P captures enum value "NEMA L6-30P"
   614  	PowerPortTemplateTypeLabelNEMAL6Dash30P string = "NEMA L6-30P"
   615  
   616  	// PowerPortTemplateTypeLabelNEMAL6Dash50P captures enum value "NEMA L6-50P"
   617  	PowerPortTemplateTypeLabelNEMAL6Dash50P string = "NEMA L6-50P"
   618  
   619  	// PowerPortTemplateTypeLabelNEMAL10Dash30P captures enum value "NEMA L10-30P"
   620  	PowerPortTemplateTypeLabelNEMAL10Dash30P string = "NEMA L10-30P"
   621  
   622  	// PowerPortTemplateTypeLabelNEMAL14Dash20P captures enum value "NEMA L14-20P"
   623  	PowerPortTemplateTypeLabelNEMAL14Dash20P string = "NEMA L14-20P"
   624  
   625  	// PowerPortTemplateTypeLabelNEMAL14Dash30P captures enum value "NEMA L14-30P"
   626  	PowerPortTemplateTypeLabelNEMAL14Dash30P string = "NEMA L14-30P"
   627  
   628  	// PowerPortTemplateTypeLabelNEMAL14Dash50P captures enum value "NEMA L14-50P"
   629  	PowerPortTemplateTypeLabelNEMAL14Dash50P string = "NEMA L14-50P"
   630  
   631  	// PowerPortTemplateTypeLabelNEMAL14Dash60P captures enum value "NEMA L14-60P"
   632  	PowerPortTemplateTypeLabelNEMAL14Dash60P string = "NEMA L14-60P"
   633  
   634  	// PowerPortTemplateTypeLabelNEMAL15Dash20P captures enum value "NEMA L15-20P"
   635  	PowerPortTemplateTypeLabelNEMAL15Dash20P string = "NEMA L15-20P"
   636  
   637  	// PowerPortTemplateTypeLabelNEMAL15Dash30P captures enum value "NEMA L15-30P"
   638  	PowerPortTemplateTypeLabelNEMAL15Dash30P string = "NEMA L15-30P"
   639  
   640  	// PowerPortTemplateTypeLabelNEMAL15Dash50P captures enum value "NEMA L15-50P"
   641  	PowerPortTemplateTypeLabelNEMAL15Dash50P string = "NEMA L15-50P"
   642  
   643  	// PowerPortTemplateTypeLabelNEMAL15Dash60P captures enum value "NEMA L15-60P"
   644  	PowerPortTemplateTypeLabelNEMAL15Dash60P string = "NEMA L15-60P"
   645  
   646  	// PowerPortTemplateTypeLabelNEMAL21Dash20P captures enum value "NEMA L21-20P"
   647  	PowerPortTemplateTypeLabelNEMAL21Dash20P string = "NEMA L21-20P"
   648  
   649  	// PowerPortTemplateTypeLabelNEMAL21Dash30P captures enum value "NEMA L21-30P"
   650  	PowerPortTemplateTypeLabelNEMAL21Dash30P string = "NEMA L21-30P"
   651  
   652  	// PowerPortTemplateTypeLabelCS6361C captures enum value "CS6361C"
   653  	PowerPortTemplateTypeLabelCS6361C string = "CS6361C"
   654  
   655  	// PowerPortTemplateTypeLabelCS6365C captures enum value "CS6365C"
   656  	PowerPortTemplateTypeLabelCS6365C string = "CS6365C"
   657  
   658  	// PowerPortTemplateTypeLabelCS8165C captures enum value "CS8165C"
   659  	PowerPortTemplateTypeLabelCS8165C string = "CS8165C"
   660  
   661  	// PowerPortTemplateTypeLabelCS8265C captures enum value "CS8265C"
   662  	PowerPortTemplateTypeLabelCS8265C string = "CS8265C"
   663  
   664  	// PowerPortTemplateTypeLabelCS8365C captures enum value "CS8365C"
   665  	PowerPortTemplateTypeLabelCS8365C string = "CS8365C"
   666  
   667  	// PowerPortTemplateTypeLabelCS8465C captures enum value "CS8465C"
   668  	PowerPortTemplateTypeLabelCS8465C string = "CS8465C"
   669  
   670  	// PowerPortTemplateTypeLabelITATypeECEE75 captures enum value "ITA Type E (CEE 7/5)"
   671  	PowerPortTemplateTypeLabelITATypeECEE75 string = "ITA Type E (CEE 7/5)"
   672  
   673  	// PowerPortTemplateTypeLabelITATypeFCEE74 captures enum value "ITA Type F (CEE 7/4)"
   674  	PowerPortTemplateTypeLabelITATypeFCEE74 string = "ITA Type F (CEE 7/4)"
   675  
   676  	// PowerPortTemplateTypeLabelITATypeEFCEE77 captures enum value "ITA Type E/F (CEE 7/7)"
   677  	PowerPortTemplateTypeLabelITATypeEFCEE77 string = "ITA Type E/F (CEE 7/7)"
   678  
   679  	// PowerPortTemplateTypeLabelITATypeGBS1363 captures enum value "ITA Type G (BS 1363)"
   680  	PowerPortTemplateTypeLabelITATypeGBS1363 string = "ITA Type G (BS 1363)"
   681  
   682  	// PowerPortTemplateTypeLabelITATypeH captures enum value "ITA Type H"
   683  	PowerPortTemplateTypeLabelITATypeH string = "ITA Type H"
   684  
   685  	// PowerPortTemplateTypeLabelITATypeI captures enum value "ITA Type I"
   686  	PowerPortTemplateTypeLabelITATypeI string = "ITA Type I"
   687  
   688  	// PowerPortTemplateTypeLabelITATypeJ captures enum value "ITA Type J"
   689  	PowerPortTemplateTypeLabelITATypeJ string = "ITA Type J"
   690  
   691  	// PowerPortTemplateTypeLabelITATypeK captures enum value "ITA Type K"
   692  	PowerPortTemplateTypeLabelITATypeK string = "ITA Type K"
   693  
   694  	// PowerPortTemplateTypeLabelITATypeLCEI23Dash50 captures enum value "ITA Type L (CEI 23-50)"
   695  	PowerPortTemplateTypeLabelITATypeLCEI23Dash50 string = "ITA Type L (CEI 23-50)"
   696  
   697  	// PowerPortTemplateTypeLabelITATypeMBS546 captures enum value "ITA Type M (BS 546)"
   698  	PowerPortTemplateTypeLabelITATypeMBS546 string = "ITA Type M (BS 546)"
   699  
   700  	// PowerPortTemplateTypeLabelITATypeN captures enum value "ITA Type N"
   701  	PowerPortTemplateTypeLabelITATypeN string = "ITA Type N"
   702  
   703  	// PowerPortTemplateTypeLabelITATypeO captures enum value "ITA Type O"
   704  	PowerPortTemplateTypeLabelITATypeO string = "ITA Type O"
   705  
   706  	// PowerPortTemplateTypeLabelUSBTypeA captures enum value "USB Type A"
   707  	PowerPortTemplateTypeLabelUSBTypeA string = "USB Type A"
   708  
   709  	// PowerPortTemplateTypeLabelUSBTypeB captures enum value "USB Type B"
   710  	PowerPortTemplateTypeLabelUSBTypeB string = "USB Type B"
   711  
   712  	// PowerPortTemplateTypeLabelUSBTypeC captures enum value "USB Type C"
   713  	PowerPortTemplateTypeLabelUSBTypeC string = "USB Type C"
   714  
   715  	// PowerPortTemplateTypeLabelUSBMiniA captures enum value "USB Mini A"
   716  	PowerPortTemplateTypeLabelUSBMiniA string = "USB Mini A"
   717  
   718  	// PowerPortTemplateTypeLabelUSBMiniB captures enum value "USB Mini B"
   719  	PowerPortTemplateTypeLabelUSBMiniB string = "USB Mini B"
   720  
   721  	// PowerPortTemplateTypeLabelUSBMicroA captures enum value "USB Micro A"
   722  	PowerPortTemplateTypeLabelUSBMicroA string = "USB Micro A"
   723  
   724  	// PowerPortTemplateTypeLabelUSBMicroB captures enum value "USB Micro B"
   725  	PowerPortTemplateTypeLabelUSBMicroB string = "USB Micro B"
   726  
   727  	// PowerPortTemplateTypeLabelUSB3Dot0TypeB captures enum value "USB 3.0 Type B"
   728  	PowerPortTemplateTypeLabelUSB3Dot0TypeB string = "USB 3.0 Type B"
   729  
   730  	// PowerPortTemplateTypeLabelUSB3Dot0MicroB captures enum value "USB 3.0 Micro B"
   731  	PowerPortTemplateTypeLabelUSB3Dot0MicroB string = "USB 3.0 Micro B"
   732  
   733  	// PowerPortTemplateTypeLabelDCTerminal captures enum value "DC Terminal"
   734  	PowerPortTemplateTypeLabelDCTerminal string = "DC Terminal"
   735  
   736  	// PowerPortTemplateTypeLabelSafDashDDashGrid captures enum value "Saf-D-Grid"
   737  	PowerPortTemplateTypeLabelSafDashDDashGrid string = "Saf-D-Grid"
   738  
   739  	// PowerPortTemplateTypeLabelHardwired captures enum value "Hardwired"
   740  	PowerPortTemplateTypeLabelHardwired string = "Hardwired"
   741  )
   742  
   743  // prop value enum
   744  func (m *PowerPortTemplateType) validateLabelEnum(path, location string, value string) error {
   745  	if err := validate.EnumCase(path, location, value, powerPortTemplateTypeTypeLabelPropEnum, true); err != nil {
   746  		return err
   747  	}
   748  	return nil
   749  }
   750  
   751  func (m *PowerPortTemplateType) validateLabel(formats strfmt.Registry) error {
   752  
   753  	if err := validate.Required("type"+"."+"label", "body", m.Label); err != nil {
   754  		return err
   755  	}
   756  
   757  	// value enum
   758  	if err := m.validateLabelEnum("type"+"."+"label", "body", *m.Label); err != nil {
   759  		return err
   760  	}
   761  
   762  	return nil
   763  }
   764  
   765  var powerPortTemplateTypeTypeValuePropEnum []interface{}
   766  
   767  func init() {
   768  	var res []string
   769  	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 {
   770  		panic(err)
   771  	}
   772  	for _, v := range res {
   773  		powerPortTemplateTypeTypeValuePropEnum = append(powerPortTemplateTypeTypeValuePropEnum, v)
   774  	}
   775  }
   776  
   777  const (
   778  
   779  	// PowerPortTemplateTypeValueIecDash60320DashC6 captures enum value "iec-60320-c6"
   780  	PowerPortTemplateTypeValueIecDash60320DashC6 string = "iec-60320-c6"
   781  
   782  	// PowerPortTemplateTypeValueIecDash60320DashC8 captures enum value "iec-60320-c8"
   783  	PowerPortTemplateTypeValueIecDash60320DashC8 string = "iec-60320-c8"
   784  
   785  	// PowerPortTemplateTypeValueIecDash60320DashC14 captures enum value "iec-60320-c14"
   786  	PowerPortTemplateTypeValueIecDash60320DashC14 string = "iec-60320-c14"
   787  
   788  	// PowerPortTemplateTypeValueIecDash60320DashC16 captures enum value "iec-60320-c16"
   789  	PowerPortTemplateTypeValueIecDash60320DashC16 string = "iec-60320-c16"
   790  
   791  	// PowerPortTemplateTypeValueIecDash60320DashC20 captures enum value "iec-60320-c20"
   792  	PowerPortTemplateTypeValueIecDash60320DashC20 string = "iec-60320-c20"
   793  
   794  	// PowerPortTemplateTypeValueIecDash60320DashC22 captures enum value "iec-60320-c22"
   795  	PowerPortTemplateTypeValueIecDash60320DashC22 string = "iec-60320-c22"
   796  
   797  	// PowerPortTemplateTypeValueIecDash60309DashpDashnDasheDash4h captures enum value "iec-60309-p-n-e-4h"
   798  	PowerPortTemplateTypeValueIecDash60309DashpDashnDasheDash4h string = "iec-60309-p-n-e-4h"
   799  
   800  	// PowerPortTemplateTypeValueIecDash60309DashpDashnDasheDash6h captures enum value "iec-60309-p-n-e-6h"
   801  	PowerPortTemplateTypeValueIecDash60309DashpDashnDasheDash6h string = "iec-60309-p-n-e-6h"
   802  
   803  	// PowerPortTemplateTypeValueIecDash60309DashpDashnDasheDash9h captures enum value "iec-60309-p-n-e-9h"
   804  	PowerPortTemplateTypeValueIecDash60309DashpDashnDasheDash9h string = "iec-60309-p-n-e-9h"
   805  
   806  	// PowerPortTemplateTypeValueIecDash60309Dash2pDasheDash4h captures enum value "iec-60309-2p-e-4h"
   807  	PowerPortTemplateTypeValueIecDash60309Dash2pDasheDash4h string = "iec-60309-2p-e-4h"
   808  
   809  	// PowerPortTemplateTypeValueIecDash60309Dash2pDasheDash6h captures enum value "iec-60309-2p-e-6h"
   810  	PowerPortTemplateTypeValueIecDash60309Dash2pDasheDash6h string = "iec-60309-2p-e-6h"
   811  
   812  	// PowerPortTemplateTypeValueIecDash60309Dash2pDasheDash9h captures enum value "iec-60309-2p-e-9h"
   813  	PowerPortTemplateTypeValueIecDash60309Dash2pDasheDash9h string = "iec-60309-2p-e-9h"
   814  
   815  	// PowerPortTemplateTypeValueIecDash60309Dash3pDasheDash4h captures enum value "iec-60309-3p-e-4h"
   816  	PowerPortTemplateTypeValueIecDash60309Dash3pDasheDash4h string = "iec-60309-3p-e-4h"
   817  
   818  	// PowerPortTemplateTypeValueIecDash60309Dash3pDasheDash6h captures enum value "iec-60309-3p-e-6h"
   819  	PowerPortTemplateTypeValueIecDash60309Dash3pDasheDash6h string = "iec-60309-3p-e-6h"
   820  
   821  	// PowerPortTemplateTypeValueIecDash60309Dash3pDasheDash9h captures enum value "iec-60309-3p-e-9h"
   822  	PowerPortTemplateTypeValueIecDash60309Dash3pDasheDash9h string = "iec-60309-3p-e-9h"
   823  
   824  	// PowerPortTemplateTypeValueIecDash60309Dash3pDashnDasheDash4h captures enum value "iec-60309-3p-n-e-4h"
   825  	PowerPortTemplateTypeValueIecDash60309Dash3pDashnDasheDash4h string = "iec-60309-3p-n-e-4h"
   826  
   827  	// PowerPortTemplateTypeValueIecDash60309Dash3pDashnDasheDash6h captures enum value "iec-60309-3p-n-e-6h"
   828  	PowerPortTemplateTypeValueIecDash60309Dash3pDashnDasheDash6h string = "iec-60309-3p-n-e-6h"
   829  
   830  	// PowerPortTemplateTypeValueIecDash60309Dash3pDashnDasheDash9h captures enum value "iec-60309-3p-n-e-9h"
   831  	PowerPortTemplateTypeValueIecDash60309Dash3pDashnDasheDash9h string = "iec-60309-3p-n-e-9h"
   832  
   833  	// PowerPortTemplateTypeValueNemaDash1Dash15p captures enum value "nema-1-15p"
   834  	PowerPortTemplateTypeValueNemaDash1Dash15p string = "nema-1-15p"
   835  
   836  	// PowerPortTemplateTypeValueNemaDash5Dash15p captures enum value "nema-5-15p"
   837  	PowerPortTemplateTypeValueNemaDash5Dash15p string = "nema-5-15p"
   838  
   839  	// PowerPortTemplateTypeValueNemaDash5Dash20p captures enum value "nema-5-20p"
   840  	PowerPortTemplateTypeValueNemaDash5Dash20p string = "nema-5-20p"
   841  
   842  	// PowerPortTemplateTypeValueNemaDash5Dash30p captures enum value "nema-5-30p"
   843  	PowerPortTemplateTypeValueNemaDash5Dash30p string = "nema-5-30p"
   844  
   845  	// PowerPortTemplateTypeValueNemaDash5Dash50p captures enum value "nema-5-50p"
   846  	PowerPortTemplateTypeValueNemaDash5Dash50p string = "nema-5-50p"
   847  
   848  	// PowerPortTemplateTypeValueNemaDash6Dash15p captures enum value "nema-6-15p"
   849  	PowerPortTemplateTypeValueNemaDash6Dash15p string = "nema-6-15p"
   850  
   851  	// PowerPortTemplateTypeValueNemaDash6Dash20p captures enum value "nema-6-20p"
   852  	PowerPortTemplateTypeValueNemaDash6Dash20p string = "nema-6-20p"
   853  
   854  	// PowerPortTemplateTypeValueNemaDash6Dash30p captures enum value "nema-6-30p"
   855  	PowerPortTemplateTypeValueNemaDash6Dash30p string = "nema-6-30p"
   856  
   857  	// PowerPortTemplateTypeValueNemaDash6Dash50p captures enum value "nema-6-50p"
   858  	PowerPortTemplateTypeValueNemaDash6Dash50p string = "nema-6-50p"
   859  
   860  	// PowerPortTemplateTypeValueNemaDash10Dash30p captures enum value "nema-10-30p"
   861  	PowerPortTemplateTypeValueNemaDash10Dash30p string = "nema-10-30p"
   862  
   863  	// PowerPortTemplateTypeValueNemaDash10Dash50p captures enum value "nema-10-50p"
   864  	PowerPortTemplateTypeValueNemaDash10Dash50p string = "nema-10-50p"
   865  
   866  	// PowerPortTemplateTypeValueNemaDash14Dash20p captures enum value "nema-14-20p"
   867  	PowerPortTemplateTypeValueNemaDash14Dash20p string = "nema-14-20p"
   868  
   869  	// PowerPortTemplateTypeValueNemaDash14Dash30p captures enum value "nema-14-30p"
   870  	PowerPortTemplateTypeValueNemaDash14Dash30p string = "nema-14-30p"
   871  
   872  	// PowerPortTemplateTypeValueNemaDash14Dash50p captures enum value "nema-14-50p"
   873  	PowerPortTemplateTypeValueNemaDash14Dash50p string = "nema-14-50p"
   874  
   875  	// PowerPortTemplateTypeValueNemaDash14Dash60p captures enum value "nema-14-60p"
   876  	PowerPortTemplateTypeValueNemaDash14Dash60p string = "nema-14-60p"
   877  
   878  	// PowerPortTemplateTypeValueNemaDash15Dash15p captures enum value "nema-15-15p"
   879  	PowerPortTemplateTypeValueNemaDash15Dash15p string = "nema-15-15p"
   880  
   881  	// PowerPortTemplateTypeValueNemaDash15Dash20p captures enum value "nema-15-20p"
   882  	PowerPortTemplateTypeValueNemaDash15Dash20p string = "nema-15-20p"
   883  
   884  	// PowerPortTemplateTypeValueNemaDash15Dash30p captures enum value "nema-15-30p"
   885  	PowerPortTemplateTypeValueNemaDash15Dash30p string = "nema-15-30p"
   886  
   887  	// PowerPortTemplateTypeValueNemaDash15Dash50p captures enum value "nema-15-50p"
   888  	PowerPortTemplateTypeValueNemaDash15Dash50p string = "nema-15-50p"
   889  
   890  	// PowerPortTemplateTypeValueNemaDash15Dash60p captures enum value "nema-15-60p"
   891  	PowerPortTemplateTypeValueNemaDash15Dash60p string = "nema-15-60p"
   892  
   893  	// PowerPortTemplateTypeValueNemaDashL1Dash15p captures enum value "nema-l1-15p"
   894  	PowerPortTemplateTypeValueNemaDashL1Dash15p string = "nema-l1-15p"
   895  
   896  	// PowerPortTemplateTypeValueNemaDashL5Dash15p captures enum value "nema-l5-15p"
   897  	PowerPortTemplateTypeValueNemaDashL5Dash15p string = "nema-l5-15p"
   898  
   899  	// PowerPortTemplateTypeValueNemaDashL5Dash20p captures enum value "nema-l5-20p"
   900  	PowerPortTemplateTypeValueNemaDashL5Dash20p string = "nema-l5-20p"
   901  
   902  	// PowerPortTemplateTypeValueNemaDashL5Dash30p captures enum value "nema-l5-30p"
   903  	PowerPortTemplateTypeValueNemaDashL5Dash30p string = "nema-l5-30p"
   904  
   905  	// PowerPortTemplateTypeValueNemaDashL5Dash50p captures enum value "nema-l5-50p"
   906  	PowerPortTemplateTypeValueNemaDashL5Dash50p string = "nema-l5-50p"
   907  
   908  	// PowerPortTemplateTypeValueNemaDashL6Dash15p captures enum value "nema-l6-15p"
   909  	PowerPortTemplateTypeValueNemaDashL6Dash15p string = "nema-l6-15p"
   910  
   911  	// PowerPortTemplateTypeValueNemaDashL6Dash20p captures enum value "nema-l6-20p"
   912  	PowerPortTemplateTypeValueNemaDashL6Dash20p string = "nema-l6-20p"
   913  
   914  	// PowerPortTemplateTypeValueNemaDashL6Dash30p captures enum value "nema-l6-30p"
   915  	PowerPortTemplateTypeValueNemaDashL6Dash30p string = "nema-l6-30p"
   916  
   917  	// PowerPortTemplateTypeValueNemaDashL6Dash50p captures enum value "nema-l6-50p"
   918  	PowerPortTemplateTypeValueNemaDashL6Dash50p string = "nema-l6-50p"
   919  
   920  	// PowerPortTemplateTypeValueNemaDashL10Dash30p captures enum value "nema-l10-30p"
   921  	PowerPortTemplateTypeValueNemaDashL10Dash30p string = "nema-l10-30p"
   922  
   923  	// PowerPortTemplateTypeValueNemaDashL14Dash20p captures enum value "nema-l14-20p"
   924  	PowerPortTemplateTypeValueNemaDashL14Dash20p string = "nema-l14-20p"
   925  
   926  	// PowerPortTemplateTypeValueNemaDashL14Dash30p captures enum value "nema-l14-30p"
   927  	PowerPortTemplateTypeValueNemaDashL14Dash30p string = "nema-l14-30p"
   928  
   929  	// PowerPortTemplateTypeValueNemaDashL14Dash50p captures enum value "nema-l14-50p"
   930  	PowerPortTemplateTypeValueNemaDashL14Dash50p string = "nema-l14-50p"
   931  
   932  	// PowerPortTemplateTypeValueNemaDashL14Dash60p captures enum value "nema-l14-60p"
   933  	PowerPortTemplateTypeValueNemaDashL14Dash60p string = "nema-l14-60p"
   934  
   935  	// PowerPortTemplateTypeValueNemaDashL15Dash20p captures enum value "nema-l15-20p"
   936  	PowerPortTemplateTypeValueNemaDashL15Dash20p string = "nema-l15-20p"
   937  
   938  	// PowerPortTemplateTypeValueNemaDashL15Dash30p captures enum value "nema-l15-30p"
   939  	PowerPortTemplateTypeValueNemaDashL15Dash30p string = "nema-l15-30p"
   940  
   941  	// PowerPortTemplateTypeValueNemaDashL15Dash50p captures enum value "nema-l15-50p"
   942  	PowerPortTemplateTypeValueNemaDashL15Dash50p string = "nema-l15-50p"
   943  
   944  	// PowerPortTemplateTypeValueNemaDashL15Dash60p captures enum value "nema-l15-60p"
   945  	PowerPortTemplateTypeValueNemaDashL15Dash60p string = "nema-l15-60p"
   946  
   947  	// PowerPortTemplateTypeValueNemaDashL21Dash20p captures enum value "nema-l21-20p"
   948  	PowerPortTemplateTypeValueNemaDashL21Dash20p string = "nema-l21-20p"
   949  
   950  	// PowerPortTemplateTypeValueNemaDashL21Dash30p captures enum value "nema-l21-30p"
   951  	PowerPortTemplateTypeValueNemaDashL21Dash30p string = "nema-l21-30p"
   952  
   953  	// PowerPortTemplateTypeValueCs6361c captures enum value "cs6361c"
   954  	PowerPortTemplateTypeValueCs6361c string = "cs6361c"
   955  
   956  	// PowerPortTemplateTypeValueCs6365c captures enum value "cs6365c"
   957  	PowerPortTemplateTypeValueCs6365c string = "cs6365c"
   958  
   959  	// PowerPortTemplateTypeValueCs8165c captures enum value "cs8165c"
   960  	PowerPortTemplateTypeValueCs8165c string = "cs8165c"
   961  
   962  	// PowerPortTemplateTypeValueCs8265c captures enum value "cs8265c"
   963  	PowerPortTemplateTypeValueCs8265c string = "cs8265c"
   964  
   965  	// PowerPortTemplateTypeValueCs8365c captures enum value "cs8365c"
   966  	PowerPortTemplateTypeValueCs8365c string = "cs8365c"
   967  
   968  	// PowerPortTemplateTypeValueCs8465c captures enum value "cs8465c"
   969  	PowerPortTemplateTypeValueCs8465c string = "cs8465c"
   970  
   971  	// PowerPortTemplateTypeValueItaDashe captures enum value "ita-e"
   972  	PowerPortTemplateTypeValueItaDashe string = "ita-e"
   973  
   974  	// PowerPortTemplateTypeValueItaDashf captures enum value "ita-f"
   975  	PowerPortTemplateTypeValueItaDashf string = "ita-f"
   976  
   977  	// PowerPortTemplateTypeValueItaDashEf captures enum value "ita-ef"
   978  	PowerPortTemplateTypeValueItaDashEf string = "ita-ef"
   979  
   980  	// PowerPortTemplateTypeValueItaDashg captures enum value "ita-g"
   981  	PowerPortTemplateTypeValueItaDashg string = "ita-g"
   982  
   983  	// PowerPortTemplateTypeValueItaDashh captures enum value "ita-h"
   984  	PowerPortTemplateTypeValueItaDashh string = "ita-h"
   985  
   986  	// PowerPortTemplateTypeValueItaDashi captures enum value "ita-i"
   987  	PowerPortTemplateTypeValueItaDashi string = "ita-i"
   988  
   989  	// PowerPortTemplateTypeValueItaDashj captures enum value "ita-j"
   990  	PowerPortTemplateTypeValueItaDashj string = "ita-j"
   991  
   992  	// PowerPortTemplateTypeValueItaDashk captures enum value "ita-k"
   993  	PowerPortTemplateTypeValueItaDashk string = "ita-k"
   994  
   995  	// PowerPortTemplateTypeValueItaDashl captures enum value "ita-l"
   996  	PowerPortTemplateTypeValueItaDashl string = "ita-l"
   997  
   998  	// PowerPortTemplateTypeValueItaDashm captures enum value "ita-m"
   999  	PowerPortTemplateTypeValueItaDashm string = "ita-m"
  1000  
  1001  	// PowerPortTemplateTypeValueItaDashn captures enum value "ita-n"
  1002  	PowerPortTemplateTypeValueItaDashn string = "ita-n"
  1003  
  1004  	// PowerPortTemplateTypeValueItaDasho captures enum value "ita-o"
  1005  	PowerPortTemplateTypeValueItaDasho string = "ita-o"
  1006  
  1007  	// PowerPortTemplateTypeValueUsbDasha captures enum value "usb-a"
  1008  	PowerPortTemplateTypeValueUsbDasha string = "usb-a"
  1009  
  1010  	// PowerPortTemplateTypeValueUsbDashb captures enum value "usb-b"
  1011  	PowerPortTemplateTypeValueUsbDashb string = "usb-b"
  1012  
  1013  	// PowerPortTemplateTypeValueUsbDashc captures enum value "usb-c"
  1014  	PowerPortTemplateTypeValueUsbDashc string = "usb-c"
  1015  
  1016  	// PowerPortTemplateTypeValueUsbDashMiniDasha captures enum value "usb-mini-a"
  1017  	PowerPortTemplateTypeValueUsbDashMiniDasha string = "usb-mini-a"
  1018  
  1019  	// PowerPortTemplateTypeValueUsbDashMiniDashb captures enum value "usb-mini-b"
  1020  	PowerPortTemplateTypeValueUsbDashMiniDashb string = "usb-mini-b"
  1021  
  1022  	// PowerPortTemplateTypeValueUsbDashMicroDasha captures enum value "usb-micro-a"
  1023  	PowerPortTemplateTypeValueUsbDashMicroDasha string = "usb-micro-a"
  1024  
  1025  	// PowerPortTemplateTypeValueUsbDashMicroDashb captures enum value "usb-micro-b"
  1026  	PowerPortTemplateTypeValueUsbDashMicroDashb string = "usb-micro-b"
  1027  
  1028  	// PowerPortTemplateTypeValueUsbDash3Dashb captures enum value "usb-3-b"
  1029  	PowerPortTemplateTypeValueUsbDash3Dashb string = "usb-3-b"
  1030  
  1031  	// PowerPortTemplateTypeValueUsbDash3DashMicroDashb captures enum value "usb-3-micro-b"
  1032  	PowerPortTemplateTypeValueUsbDash3DashMicroDashb string = "usb-3-micro-b"
  1033  
  1034  	// PowerPortTemplateTypeValueDcDashTerminal captures enum value "dc-terminal"
  1035  	PowerPortTemplateTypeValueDcDashTerminal string = "dc-terminal"
  1036  
  1037  	// PowerPortTemplateTypeValueSafDashdDashGrid captures enum value "saf-d-grid"
  1038  	PowerPortTemplateTypeValueSafDashdDashGrid string = "saf-d-grid"
  1039  
  1040  	// PowerPortTemplateTypeValueHardwired captures enum value "hardwired"
  1041  	PowerPortTemplateTypeValueHardwired string = "hardwired"
  1042  )
  1043  
  1044  // prop value enum
  1045  func (m *PowerPortTemplateType) validateValueEnum(path, location string, value string) error {
  1046  	if err := validate.EnumCase(path, location, value, powerPortTemplateTypeTypeValuePropEnum, true); err != nil {
  1047  		return err
  1048  	}
  1049  	return nil
  1050  }
  1051  
  1052  func (m *PowerPortTemplateType) validateValue(formats strfmt.Registry) error {
  1053  
  1054  	if err := validate.Required("type"+"."+"value", "body", m.Value); err != nil {
  1055  		return err
  1056  	}
  1057  
  1058  	// value enum
  1059  	if err := m.validateValueEnum("type"+"."+"value", "body", *m.Value); err != nil {
  1060  		return err
  1061  	}
  1062  
  1063  	return nil
  1064  }
  1065  
  1066  // ContextValidate validates this power port template type based on context it is used
  1067  func (m *PowerPortTemplateType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
  1068  	return nil
  1069  }
  1070  
  1071  // MarshalBinary interface implementation
  1072  func (m *PowerPortTemplateType) MarshalBinary() ([]byte, error) {
  1073  	if m == nil {
  1074  		return nil, nil
  1075  	}
  1076  	return swag.WriteJSON(m)
  1077  }
  1078  
  1079  // UnmarshalBinary interface implementation
  1080  func (m *PowerPortTemplateType) UnmarshalBinary(b []byte) error {
  1081  	var res PowerPortTemplateType
  1082  	if err := swag.ReadJSON(b, &res); err != nil {
  1083  		return err
  1084  	}
  1085  	*m = res
  1086  	return nil
  1087  }