code: func (m TaskManager) ValidateProtoMessage(c *validation.Context, msg proto.Message) {
  	cfg, ok := msg.(*messages.UrlFetchTask)
  	if !ok {
  		c.Errorf("wrong type %T, expecting *messages.UrlFetchTask", msg)
  		return
  	}
  	if cfg == nil {
  		c.Errorf("expecting a non-empty UrlFetchTask")
  		return
  	}
  
  	// Validate 'method' field.
  	// TODO(vadimsh): Add more methods (POST, PUT) when 'Body' is added.
  	goodMethods := map[string]bool{"GET": true}
  	if cfg.Method != "" && !goodMethods[cfg.Method] {
  		c.Errorf("unsupported HTTP method: %q", cfg.Method)
  	}
  
  	// Validate 'url' field.
  	if cfg.Url == "" {
  		c.Errorf("field 'url' is required")
  	} else {
  		u, err := url.Parse(cfg.Url)
  		if err != nil {
  			c.Errorf("invalid URL %q: %s", cfg.Url, err)
  		} else if !u.IsAbs() {
  			c.Errorf("not an absolute url: %q", cfg.Url)
  		}
  	}
  
  	// Validate 'timeout_sec' field. GAE task queue request deadline is 10 min, so
  	// limit URL fetch call duration to 8 min (giving 2 min to spare).
  	if cfg.TimeoutSec != 0 {
  		if cfg.TimeoutSec < 1 {
  			c.Errorf("minimum allowed 'timeout_sec' is 1 sec, got %d", cfg.TimeoutSec)
  		}
  		if cfg.TimeoutSec > 480 {
  			c.Errorf("maximum allowed 'timeout_sec' is 480 sec, got %d", cfg.TimeoutSec)
  		}
  	}
  }
docs: // ValidateProtoMessage is part of Manager interface.