func GetHNSEndpointByID(endpointID string) (*HNSEndpoint, error) {
	return hns.GetHNSEndpointByID(endpointID)
}
GetHNSEndpointByID get the Endpoint by ID
package hcsshim
import (
	"github.com/Microsoft/hcsshim/internal/hns"
)
type HNSEndpoint = hns.HNSEndpoint
type HNSEndpointStats = hns.EndpointStats
type Namespace = hns.Namespace
type SystemType string
const (
	ContainerType      SystemType = "Container"
	VirtualMachineType SystemType = "VirtualMachine"
	HostType           SystemType = "Host"
)
type EndpointAttachDetachRequest = hns.EndpointAttachDetachRequest
type EndpointResquestResponse = hns.EndpointResquestResponse
func HNSEndpointRequest(method, path, request string) (*HNSEndpoint, error) {
	return hns.HNSEndpointRequest(method, path, request)
}
func HNSListEndpointRequest() ([]HNSEndpoint, error) {
	return hns.HNSListEndpointRequest()
}
func HotAttachEndpoint(containerID string, endpointID string) error {
	endpoint, err := GetHNSEndpointByID(endpointID)
	if err != nil {
		return err
	}
	isAttached, err := endpoint.IsAttached(containerID)
	if isAttached {
		return err
	}
	return modifyNetworkEndpoint(containerID, endpointID, Add)
}
func HotDetachEndpoint(containerID string, endpointID string) error {
	endpoint, err := GetHNSEndpointByID(endpointID)
	if err != nil {
		return err
	}
	isAttached, err := endpoint.IsAttached(containerID)
	if !isAttached {
		return err
	}
	return modifyNetworkEndpoint(containerID, endpointID, Remove)
}
func modifyContainer(id string, request *ResourceModificationRequestResponse) error {
	container, err := OpenContainer(id)
	if err != nil {
		if IsNotExist(err) {
			return ErrComputeSystemDoesNotExist
		}
		return getInnerError(err)
	}
	defer container.Close()
	err = container.Modify(request)
	if err != nil {
		if IsNotSupported(err) {
			return ErrPlatformNotSupported
		}
		return getInnerError(err)
	}
	return nil
}
func modifyNetworkEndpoint(containerID string, endpointID string, request RequestType) error {
	requestMessage := &ResourceModificationRequestResponse{
		Resource: Network,
		Request:  request,
		Data:     endpointID,
	}
	err := modifyContainer(containerID, requestMessage)
	if err != nil {
		return err
	}
	return nil
}