func CreateListEndpointsRequest() (request *ListEndpointsRequest) {
	request = &ListEndpointsRequest{
		RpcRequest: &requests.RpcRequest{},
	}
	request.InitWithApiInfo("Location", "2015-06-12", "ListEndpoints", "location", "openAPI")
	return
}
CreateListEndpointsRequest creates a request to invoke ListEndpoints API
package location
import (
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
func (client *Client) ListEndpoints(request *ListEndpointsRequest) (response *ListEndpointsResponse, err error) {
	response = CreateListEndpointsResponse()
	err = client.DoAction(request, response)
	return
}
func (client *Client) ListEndpointsWithChan(request *ListEndpointsRequest) (<-chan *ListEndpointsResponse, <-chan error) {
	responseChan := make(chan *ListEndpointsResponse, 1)
	errChan := make(chan error, 1)
	err := client.AddAsyncTask(func() {
		defer close(responseChan)
		defer close(errChan)
		response, err := client.ListEndpoints(request)
		if err != nil {
			errChan <- err
		} else {
			responseChan <- response
		}
	})
	if err != nil {
		errChan <- err
		close(responseChan)
		close(errChan)
	}
	return responseChan, errChan
}
func (client *Client) ListEndpointsWithCallback(request *ListEndpointsRequest, callback func(response *ListEndpointsResponse, err error)) <-chan int {
	result := make(chan int, 1)
	err := client.AddAsyncTask(func() {
		var response *ListEndpointsResponse
		var err error
		defer close(result)
		response, err = client.ListEndpoints(request)
		callback(response, err)
		result <- 1
	})
	if err != nil {
		defer close(result)
		callback(nil, err)
		result <- 0
	}
	return result
}
type ListEndpointsRequest struct {
	*requests.RpcRequest
	Namespace   string `position:"Query" name:"Namespace"`
	Id          string `position:"Query" name:"Id"`
	SerivceCode string `position:"Query" name:"SerivceCode"`
}
type ListEndpointsResponse struct {
	*responses.BaseResponse
	RequestId    string                      `json:"RequestId" xml:"RequestId"`
	Success      bool                        `json:"Success" xml:"Success"`
	EndpointList EndpointListInListEndpoints `json:"EndpointList" xml:"EndpointList"`
}