func (client *ArrayClient) getArrayItemNullHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := Error{raw: string(body)}
	if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil {
		return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp)
	}
	return runtime.NewResponseError(&errType, resp)
}
getArrayItemNullHandleError handles the GetArrayItemNull error response.
package arraygroup
import (
	"context"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"net/http"
	"time"
)
type ArrayClient struct {
	con *Connection
}
func NewArrayClient(con *Connection) *ArrayClient {
	return &ArrayClient{con: con}
}
func (client *ArrayClient) GetArrayEmpty(ctx context.Context, options *ArrayGetArrayEmptyOptions) (ArrayGetArrayEmptyResponse, error) {
	req, err := client.getArrayEmptyCreateRequest(ctx, options)
	if err != nil {
		return ArrayGetArrayEmptyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ArrayGetArrayEmptyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ArrayGetArrayEmptyResponse{}, client.getArrayEmptyHandleError(resp)
	}
	return client.getArrayEmptyHandleResponse(resp)
}
func (client *ArrayClient) getArrayEmptyCreateRequest(ctx context.Context, options *ArrayGetArrayEmptyOptions) (*policy.Request, error) {
	urlPath := "/array/array/empty"
	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 *ArrayClient) getArrayEmptyHandleResponse(resp *http.Response) (ArrayGetArrayEmptyResponse, error) {
	result := ArrayGetArrayEmptyResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.StringArrayArray); err != nil {
		return ArrayGetArrayEmptyResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *ArrayClient) getArrayEmptyHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := Error{raw: string(body)}
	if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil {
		return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp)
	}
	return runtime.NewResponseError(&errType, resp)
}
func (client *ArrayClient) GetArrayItemEmpty(ctx context.Context, options *ArrayGetArrayItemEmptyOptions) (ArrayGetArrayItemEmptyResponse, error) {
	req, err := client.getArrayItemEmptyCreateRequest(ctx, options)
	if err != nil {
		return ArrayGetArrayItemEmptyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ArrayGetArrayItemEmptyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ArrayGetArrayItemEmptyResponse{}, client.getArrayItemEmptyHandleError(resp)
	}
	return client.getArrayItemEmptyHandleResponse(resp)
}
func (client *ArrayClient) getArrayItemEmptyCreateRequest(ctx context.Context, options *ArrayGetArrayItemEmptyOptions) (*policy.Request, error) {
	urlPath := "/array/array/itemempty"
	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 *ArrayClient) getArrayItemEmptyHandleResponse(resp *http.Response) (ArrayGetArrayItemEmptyResponse, error) {
	result := ArrayGetArrayItemEmptyResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.StringArrayArray); err != nil {
		return ArrayGetArrayItemEmptyResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *ArrayClient) getArrayItemEmptyHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := Error{raw: string(body)}
	if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil {
		return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp)
	}
	return runtime.NewResponseError(&errType, resp)
}
func (client *ArrayClient) GetArrayItemNull(ctx context.Context, options *ArrayGetArrayItemNullOptions) (ArrayGetArrayItemNullResponse, error) {
	req, err := client.getArrayItemNullCreateRequest(ctx, options)
	if err != nil {
		return ArrayGetArrayItemNullResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ArrayGetArrayItemNullResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ArrayGetArrayItemNullResponse{}, client.getArrayItemNullHandleError(resp)
	}
	return client.getArrayItemNullHandleResponse(resp)
}
func (client *ArrayClient) getArrayItemNullCreateRequest(ctx context.Context, options *ArrayGetArrayItemNullOptions) (*policy.Request, error) {
	urlPath := "/array/array/itemnull"
	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 *ArrayClient) getArrayItemNullHandleResponse(resp *http.Response) (ArrayGetArrayItemNullResponse, error) {
	result := ArrayGetArrayItemNullResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.StringArrayArray); err != nil {
		return ArrayGetArrayItemNullResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}