code: func validateMachineForCreation(m *crimson.Machine) error {
  	switch {
  	case m == nil:
  		return status.Error(codes.InvalidArgument, "machine specification is required")
  	case m.Name == "":
  		return status.Error(codes.InvalidArgument, "machine name is required and must be non-empty")
  	case m.Platform == "":
  		return status.Error(codes.InvalidArgument, "platform is required and must be non-empty")
  	case m.Rack == "":
  		return status.Error(codes.InvalidArgument, "rack is required and must be non-empty")
  	case m.Datacenter != "":
  		return status.Error(codes.InvalidArgument, "datacenter must not be specified, use rack instead")
  	case m.State == common.State_STATE_UNSPECIFIED:
  		return status.Error(codes.InvalidArgument, "state is required")
  	default:
  		return nil
  	}
  }
docs: // validateMachineForCreation validates a machine for creation.