// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"
	"encoding/json"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// WorkspacePowerEdgeRouterDetails workspace power edge router details
//
// swagger:model WorkspacePowerEdgeRouterDetails
type WorkspacePowerEdgeRouterDetails struct {

	// The migration status of a Power Edge Router
	// Enum: [intializing migrating deleted completed]
	MigrationStatus string `json:"migrationStatus,omitempty"`

	// The state of a Power Edge Router
	// Required: true
	// Enum: [active error warning configuring removing inactive]
	State *string `json:"state"`

	// The Power Edge Router type
	// Required: true
	// Enum: [automated manual]
	Type *string `json:"type"`
}

// Validate validates this workspace power edge router details
func (m *WorkspacePowerEdgeRouterDetails) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateMigrationStatus(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateState(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateType(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

var workspacePowerEdgeRouterDetailsTypeMigrationStatusPropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["intializing","migrating","deleted","completed"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		workspacePowerEdgeRouterDetailsTypeMigrationStatusPropEnum = append(workspacePowerEdgeRouterDetailsTypeMigrationStatusPropEnum, v)
	}
}

const (

	// WorkspacePowerEdgeRouterDetailsMigrationStatusIntializing captures enum value "intializing"
	WorkspacePowerEdgeRouterDetailsMigrationStatusIntializing string = "intializing"

	// WorkspacePowerEdgeRouterDetailsMigrationStatusMigrating captures enum value "migrating"
	WorkspacePowerEdgeRouterDetailsMigrationStatusMigrating string = "migrating"

	// WorkspacePowerEdgeRouterDetailsMigrationStatusDeleted captures enum value "deleted"
	WorkspacePowerEdgeRouterDetailsMigrationStatusDeleted string = "deleted"

	// WorkspacePowerEdgeRouterDetailsMigrationStatusCompleted captures enum value "completed"
	WorkspacePowerEdgeRouterDetailsMigrationStatusCompleted string = "completed"
)

// prop value enum
func (m *WorkspacePowerEdgeRouterDetails) validateMigrationStatusEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, workspacePowerEdgeRouterDetailsTypeMigrationStatusPropEnum, true); err != nil {
		return err
	}
	return nil
}

func (m *WorkspacePowerEdgeRouterDetails) validateMigrationStatus(formats strfmt.Registry) error {
	if swag.IsZero(m.MigrationStatus) { // not required
		return nil
	}

	// value enum
	if err := m.validateMigrationStatusEnum("migrationStatus", "body", m.MigrationStatus); err != nil {
		return err
	}

	return nil
}

var workspacePowerEdgeRouterDetailsTypeStatePropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["active","error","warning","configuring","removing","inactive"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		workspacePowerEdgeRouterDetailsTypeStatePropEnum = append(workspacePowerEdgeRouterDetailsTypeStatePropEnum, v)
	}
}

const (

	// WorkspacePowerEdgeRouterDetailsStateActive captures enum value "active"
	WorkspacePowerEdgeRouterDetailsStateActive string = "active"

	// WorkspacePowerEdgeRouterDetailsStateError captures enum value "error"
	WorkspacePowerEdgeRouterDetailsStateError string = "error"

	// WorkspacePowerEdgeRouterDetailsStateWarning captures enum value "warning"
	WorkspacePowerEdgeRouterDetailsStateWarning string = "warning"

	// WorkspacePowerEdgeRouterDetailsStateConfiguring captures enum value "configuring"
	WorkspacePowerEdgeRouterDetailsStateConfiguring string = "configuring"

	// WorkspacePowerEdgeRouterDetailsStateRemoving captures enum value "removing"
	WorkspacePowerEdgeRouterDetailsStateRemoving string = "removing"

	// WorkspacePowerEdgeRouterDetailsStateInactive captures enum value "inactive"
	WorkspacePowerEdgeRouterDetailsStateInactive string = "inactive"
)

// prop value enum
func (m *WorkspacePowerEdgeRouterDetails) validateStateEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, workspacePowerEdgeRouterDetailsTypeStatePropEnum, true); err != nil {
		return err
	}
	return nil
}

func (m *WorkspacePowerEdgeRouterDetails) validateState(formats strfmt.Registry) error {

	if err := validate.Required("state", "body", m.State); err != nil {
		return err
	}

	// value enum
	if err := m.validateStateEnum("state", "body", *m.State); err != nil {
		return err
	}

	return nil
}

var workspacePowerEdgeRouterDetailsTypeTypePropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["automated","manual"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		workspacePowerEdgeRouterDetailsTypeTypePropEnum = append(workspacePowerEdgeRouterDetailsTypeTypePropEnum, v)
	}
}

const (

	// WorkspacePowerEdgeRouterDetailsTypeAutomated captures enum value "automated"
	WorkspacePowerEdgeRouterDetailsTypeAutomated string = "automated"

	// WorkspacePowerEdgeRouterDetailsTypeManual captures enum value "manual"
	WorkspacePowerEdgeRouterDetailsTypeManual string = "manual"
)

// prop value enum
func (m *WorkspacePowerEdgeRouterDetails) validateTypeEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, workspacePowerEdgeRouterDetailsTypeTypePropEnum, true); err != nil {
		return err
	}
	return nil
}

func (m *WorkspacePowerEdgeRouterDetails) validateType(formats strfmt.Registry) error {

	if err := validate.Required("type", "body", m.Type); err != nil {
		return err
	}

	// value enum
	if err := m.validateTypeEnum("type", "body", *m.Type); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this workspace power edge router details based on context it is used
func (m *WorkspacePowerEdgeRouterDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *WorkspacePowerEdgeRouterDetails) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *WorkspacePowerEdgeRouterDetails) UnmarshalBinary(b []byte) error {
	var res WorkspacePowerEdgeRouterDetails
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
