code: func (c *ConnectProxyConfig) ToAPI() *api.AgentServiceConnectProxyConfig {
  	return &api.AgentServiceConnectProxyConfig{
  		DestinationServiceName: c.DestinationServiceName,
  		DestinationServiceID:   c.DestinationServiceID,
  		LocalServiceAddress:    c.LocalServiceAddress,
  		LocalServicePort:       c.LocalServicePort,
  		Config:                 c.Config,
  		Upstreams:              c.Upstreams.ToAPI(),
  	}
  }
docs: // ToAPI returns the api struct with the same fields. We have duplicates to
  // avoid the api package depending on this one which imports a ton of Consul's
  // core which you don't want if you are just trying to use our client in your
  // app.