code: func buildNetworkResource(nw libnetwork.Network) *networkResource {
  	r := &networkResource{}
  	if nw != nil {
  		r.Name = nw.Name()
  		r.ID = nw.ID()
  		r.Type = nw.Type()
  		epl := nw.Endpoints()
  		r.Endpoints = make([]*endpointResource, 0, len(epl))
  		for _, e := range epl {
  			epr := buildEndpointResource(e)
  			r.Endpoints = append(r.Endpoints, epr)
  		}
  	}
  	return r
  }
docs: /*****************
   Resource Builders
  ******************/