code: func (event *Event) UnmarshalJSON(data []byte) error {
  	var ccEvent struct {
  		Metadata internal.Metadata `json:"metadata"`
  		Entity   struct {
  			Type      string                 `json:"type,omitempty"`
  			ActorGUID string                 `json:"actor,omitempty"`
  			ActorType string                 `json:"actor_type,omitempty"`
  			ActorName string                 `json:"actor_name,omitempty"`
  			ActeeGUID string                 `json:"actee,omitempty"`
  			ActeeType string                 `json:"actee_type,omitempty"`
  			ActeeName string                 `json:"actee_name,omitempty"`
  			Timestamp *time.Time             `json:"timestamp"`
  			Metadata  map[string]interface{} `json:"metadata"`
  		} `json:"entity"`
  	}
  
  	err := cloudcontroller.DecodeJSON(data, &ccEvent)
  	if err != nil {
  		return err
  	}
  
  	event.GUID = ccEvent.Metadata.GUID
  	event.Type = constant.EventType(ccEvent.Entity.Type)
  	event.ActorGUID = ccEvent.Entity.ActorGUID
  	event.ActorType = ccEvent.Entity.ActorType
  	event.ActorName = ccEvent.Entity.ActorName
  	event.ActeeGUID = ccEvent.Entity.ActeeGUID
  	event.ActeeType = ccEvent.Entity.ActeeType
  	event.ActeeName = ccEvent.Entity.ActeeName
  	if ccEvent.Entity.Timestamp != nil {
  		event.Timestamp = *ccEvent.Entity.Timestamp
  	}
  	event.Metadata = ccEvent.Entity.Metadata
  
  	return nil
  }
docs: // UnmarshalJSON helps unmarshal a Cloud Controller Event response.