code: func doEntityEventArgument(event types.BaseEvent, f func(types.ManagedObjectReference, *types.EntityEventArgument) bool) bool {
  	e := event.GetEvent()
  
  	if arg := e.Vm; arg != nil {
  		if f(arg.Vm, &arg.EntityEventArgument) {
  			return true
  		}
  	}
  
  	if arg := e.Host; arg != nil {
  		if f(arg.Host, &arg.EntityEventArgument) {
  			return true
  		}
  	}
  
  	if arg := e.ComputeResource; arg != nil {
  		if f(arg.ComputeResource, &arg.EntityEventArgument) {
  			return true
  		}
  	}
  
  	if arg := e.Ds; arg != nil {
  		if f(arg.Datastore, &arg.EntityEventArgument) {
  			return true
  		}
  	}
  
  	if arg := e.Net; arg != nil {
  		if f(arg.Network, &arg.EntityEventArgument) {
  			return true
  		}
  	}
  
  	if arg := e.Dvs; arg != nil {
  		if f(arg.Dvs, &arg.EntityEventArgument) {
  			return true
  		}
  	}
  
  	if arg := e.Datacenter; arg != nil {
  		if f(arg.Datacenter, &arg.EntityEventArgument) {
  			return true
  		}
  	}
  
  	return false
  }
docs: // doEntityEventArgument calls f for each entity argument in the event.
  // If f returns true, the iteration stops.