code: func (e *Event) FromProto(c context.Context, p *api.Event) *Event {
  	blob, err := proto.Marshal(p)
  	if err != nil {
  		panic(err)
  	}
  	e.Package = PackageKey(c, p.Package)
  	e.Event = blob
  	e.Kind = p.Kind
  	e.Who = p.Who
  	e.When = google.TimeFromProto(p.When).Sub(EventsEpoch).Nanoseconds()
  	if p.Instance != "" {
  		e.Instance = p.Instance
  	} else {
  		e.Instance = NoInstance
  	}
  	e.Ref = p.Ref
  	e.Tag = p.Tag
  	return e
  }
docs: // FromProto fills in the entity based on the proto message.
  //
  // Panics if the proto can't be serialized. This should never happen.
  //
  // Returns the entity itself for easier chaining.