func (client *PagingClient) getMultiplePagesFragmentNextLinkHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	if len(body) == 0 {
		return runtime.NewResponseError(errors.New(resp.Status), resp)
	}
	return runtime.NewResponseError(errors.New(string(body)), resp)
}
getMultiplePagesFragmentNextLinkHandleError handles the GetMultiplePagesFragmentNextLink error response.
package paginggroup
import (
	"context"
	"errors"
	armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"net/http"
	"net/url"
	"strconv"
	"strings"
)
type PagingClient struct {
	con *Connection
}
func NewPagingClient(con *Connection) *PagingClient {
	return &PagingClient{con: con}
}
func (client *PagingClient) FirstResponseEmpty(options *PagingFirstResponseEmptyOptions) *PagingFirstResponseEmptyPager {
	return &PagingFirstResponseEmptyPager{
		client: client,
		requester: func(ctx context.Context) (*policy.Request, error) {
			return client.firstResponseEmptyCreateRequest(ctx, options)
		},
		advancer: func(ctx context.Context, resp PagingFirstResponseEmptyResponse) (*policy.Request, error) {
			return runtime.NewRequest(ctx, http.MethodGet, *resp.ProductResultValue.NextLink)
		},
	}
}
func (client *PagingClient) firstResponseEmptyCreateRequest(ctx context.Context, options *PagingFirstResponseEmptyOptions) (*policy.Request, error) {
	urlPath := "/paging/firstResponseEmpty/1"
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *PagingClient) firstResponseEmptyHandleResponse(resp *http.Response) (PagingFirstResponseEmptyResponse, error) {
	result := PagingFirstResponseEmptyResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.ProductResultValue); err != nil {
		return PagingFirstResponseEmptyResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *PagingClient) firstResponseEmptyHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	if len(body) == 0 {
		return runtime.NewResponseError(errors.New(resp.Status), resp)
	}
	return runtime.NewResponseError(errors.New(string(body)), resp)
}
func (client *PagingClient) GetMultiplePages(options *PagingGetMultiplePagesOptions) *PagingGetMultiplePagesPager {
	return &PagingGetMultiplePagesPager{
		client: client,
		requester: func(ctx context.Context) (*policy.Request, error) {
			return client.getMultiplePagesCreateRequest(ctx, options)
		},
		advancer: func(ctx context.Context, resp PagingGetMultiplePagesResponse) (*policy.Request, error) {
			return runtime.NewRequest(ctx, http.MethodGet, *resp.ProductResult.NextLink)
		},
	}
}
func (client *PagingClient) getMultiplePagesCreateRequest(ctx context.Context, options *PagingGetMultiplePagesOptions) (*policy.Request, error) {
	urlPath := "/paging/multiple"
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	if options != nil && options.ClientRequestID != nil {
		req.Raw().Header.Set("client-request-id", *options.ClientRequestID)
	}
	if options != nil && options.Maxresults != nil {
		req.Raw().Header.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10))
	}
	if options != nil && options.Timeout != nil {
		req.Raw().Header.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10))
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *PagingClient) getMultiplePagesHandleResponse(resp *http.Response) (PagingGetMultiplePagesResponse, error) {
	result := PagingGetMultiplePagesResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.ProductResult); err != nil {
		return PagingGetMultiplePagesResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *PagingClient) getMultiplePagesHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	if len(body) == 0 {
		return runtime.NewResponseError(errors.New(resp.Status), resp)
	}
	return runtime.NewResponseError(errors.New(string(body)), resp)
}
func (client *PagingClient) GetMultiplePagesFailure(options *PagingGetMultiplePagesFailureOptions) *PagingGetMultiplePagesFailurePager {
	return &PagingGetMultiplePagesFailurePager{
		client: client,
		requester: func(ctx context.Context) (*policy.Request, error) {
			return client.getMultiplePagesFailureCreateRequest(ctx, options)
		},
		advancer: func(ctx context.Context, resp PagingGetMultiplePagesFailureResponse) (*policy.Request, error) {
			return runtime.NewRequest(ctx, http.MethodGet, *resp.ProductResult.NextLink)
		},
	}
}
func (client *PagingClient) getMultiplePagesFailureCreateRequest(ctx context.Context, options *PagingGetMultiplePagesFailureOptions) (*policy.Request, error) {
	urlPath := "/paging/multiple/failure"
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *PagingClient) getMultiplePagesFailureHandleResponse(resp *http.Response) (PagingGetMultiplePagesFailureResponse, error) {
	result := PagingGetMultiplePagesFailureResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.ProductResult); err != nil {
		return PagingGetMultiplePagesFailureResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *PagingClient) getMultiplePagesFailureHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	if len(body) == 0 {
		return runtime.NewResponseError(errors.New(resp.Status), resp)
	}
	return runtime.NewResponseError(errors.New(string(body)), resp)
}
func (client *PagingClient) GetMultiplePagesFailureURI(options *PagingGetMultiplePagesFailureURIOptions) *PagingGetMultiplePagesFailureURIPager {
	return &PagingGetMultiplePagesFailureURIPager{
		client: client,
		requester: func(ctx context.Context) (*policy.Request, error) {
			return client.getMultiplePagesFailureURICreateRequest(ctx, options)
		},
		advancer: func(ctx context.Context, resp PagingGetMultiplePagesFailureURIResponse) (*policy.Request, error) {
			return runtime.NewRequest(ctx, http.MethodGet, *resp.ProductResult.NextLink)
		},
	}
}
func (client *PagingClient) getMultiplePagesFailureURICreateRequest(ctx context.Context, options *PagingGetMultiplePagesFailureURIOptions) (*policy.Request, error) {
	urlPath := "/paging/multiple/failureuri"
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *PagingClient) getMultiplePagesFailureURIHandleResponse(resp *http.Response) (PagingGetMultiplePagesFailureURIResponse, error) {
	result := PagingGetMultiplePagesFailureURIResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.ProductResult); err != nil {
		return PagingGetMultiplePagesFailureURIResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *PagingClient) getMultiplePagesFailureURIHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	if len(body) == 0 {
		return runtime.NewResponseError(errors.New(resp.Status), resp)
	}
	return runtime.NewResponseError(errors.New(string(body)), resp)
}
func (client *PagingClient) GetMultiplePagesFragmentNextLink(apiVersion string, tenant string, options *PagingGetMultiplePagesFragmentNextLinkOptions) *PagingGetMultiplePagesFragmentNextLinkPager {
	return &PagingGetMultiplePagesFragmentNextLinkPager{
		client: client,
		requester: func(ctx context.Context) (*policy.Request, error) {
			return client.getMultiplePagesFragmentNextLinkCreateRequest(ctx, apiVersion, tenant, options)
		},
		advancer: func(ctx context.Context, resp PagingGetMultiplePagesFragmentNextLinkResponse) (*policy.Request, error) {
			return client.nextFragmentCreateRequest(ctx, apiVersion, tenant, *resp.ODataProductResult.ODataNextLink)
		},
	}
}
func (client *PagingClient) getMultiplePagesFragmentNextLinkCreateRequest(ctx context.Context, apiVersion string, tenant string, options *PagingGetMultiplePagesFragmentNextLinkOptions) (*policy.Request, error) {
	urlPath := "/paging/multiple/fragment/{tenant}"
	if tenant == "" {
		return nil, errors.New("parameter tenant cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{tenant}", url.PathEscape(tenant))
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	reqQP := req.Raw().URL.Query()
	reqQP.Set("api_version", apiVersion)
	req.Raw().URL.RawQuery = reqQP.Encode()
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *PagingClient) getMultiplePagesFragmentNextLinkHandleResponse(resp *http.Response) (PagingGetMultiplePagesFragmentNextLinkResponse, error) {
	result := PagingGetMultiplePagesFragmentNextLinkResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.ODataProductResult); err != nil {
		return PagingGetMultiplePagesFragmentNextLinkResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}