code: func ConvertPortBindings(portBindings []types.PortBinding) ([]json.RawMessage, error) {
  	var pbs []json.RawMessage
  
  	// Enumerate through the port bindings specified by the user and convert
  	// them into the internal structure matching the JSON blob that can be
  	// understood by the HCS.
  	for _, elem := range portBindings {
  		proto := strings.ToUpper(elem.Proto.String())
  		if proto != "TCP" && proto != "UDP" {
  			return nil, fmt.Errorf("invalid protocol %s", elem.Proto.String())
  		}
  
  		if elem.HostPort != elem.HostPortEnd {
  			return nil, fmt.Errorf("Windows does not support more than one host port in NAT settings")
  		}
  
  		if len(elem.HostIP) != 0 {
  			return nil, fmt.Errorf("Windows does not support host IP addresses in NAT settings")
  		}
  
  		encodedPolicy, err := json.Marshal(hcsshim.NatPolicy{
  			Type:         "NAT",
  			ExternalPort: elem.HostPort,
  			InternalPort: elem.Port,
  			Protocol:     elem.Proto.String(),
  		})
  
  		if err != nil {
  			return nil, err
  		}
  		pbs = append(pbs, encodedPolicy)
  	}
  	return pbs, nil
  }
docs: // ConvertPortBindings converts PortBindings to JSON for HNS request