code: func (t *TimePeriod) Validate(c *validation.Context) {
  	switch {
  	case t.GetDuration() != "":
  		c.Enter("duration")
  		t.Time.(*TimePeriod_Duration).Validate(c)
  		c.Exit()
  	case t.GetSeconds() < 0:
  		c.Errorf("seconds must be non-negative")
  	}
  }
docs: // Validate validates this time period.