1.1.0
This commit is contained in:
@@ -12,12 +12,18 @@ type DeviceMigrateRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
|
||||
// Target stack ID to migrate to
|
||||
StackID uint64 `url:"stackId"`
|
||||
}
|
||||
|
||||
func (erq DeviceMigrateRequest) validate() error {
|
||||
if erq.NetID == 0 {
|
||||
return errors.New("validation-error: field NetID must be set")
|
||||
}
|
||||
if erq.StackID == 0 {
|
||||
return errors.New("validation-error: field StackID must be set")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user