code: func parseInterface(r api.CreateEndpointResponse) (*api.Interface, error) {
  	var outIf *api.Interface
  
  	inIf := r.Interface
  	if inIf != nil {
  		var err error
  		outIf = &api.Interface{}
  		if inIf.Address != "" {
  			if outIf.Address, err = types.ParseCIDR(inIf.Address); err != nil {
  				return nil, err
  			}
  		}
  		if inIf.AddressIPv6 != "" {
  			if outIf.AddressIPv6, err = types.ParseCIDR(inIf.AddressIPv6); err != nil {
  				return nil, err
  			}
  		}
  		if inIf.MacAddress != "" {
  			if outIf.MacAddress, err = net.ParseMAC(inIf.MacAddress); err != nil {
  				return nil, err
  			}
  		}
  	}
  
  	return outIf, nil
  }
docs: // parseInterfaces validates all the parameters of an Interface and returns them.