func (client *LROSADsClient) deleteAsyncRelativeRetryNoStatusHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := CloudError{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)
}
deleteAsyncRelativeRetryNoStatusHandleError handles the DeleteAsyncRelativeRetryNoStatus error response.
package lrogroup
import (
	"context"
	"fmt"
	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"
)
type LROSADsClient struct {
	con *Connection
}
func NewLROSADsClient(con *Connection) *LROSADsClient {
	return &LROSADsClient{con: con}
}
func (client *LROSADsClient) BeginDelete202NonRetry400(ctx context.Context, options *LROSADsBeginDelete202NonRetry400Options) (LROSADsDelete202NonRetry400PollerResponse, error) {
	resp, err := client.delete202NonRetry400(ctx, options)
	if err != nil {
		return LROSADsDelete202NonRetry400PollerResponse{}, err
	}
	result := LROSADsDelete202NonRetry400PollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.Delete202NonRetry400", "", resp, client.con.Pipeline(), client.delete202NonRetry400HandleError)
	if err != nil {
		return LROSADsDelete202NonRetry400PollerResponse{}, err
	}
	result.Poller = &LROSADsDelete202NonRetry400Poller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) delete202NonRetry400(ctx context.Context, options *LROSADsBeginDelete202NonRetry400Options) (*http.Response, error) {
	req, err := client.delete202NonRetry400CreateRequest(ctx, options)
	if err != nil {
		return nil, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return nil, err
	}
	if !runtime.HasStatusCode(resp, http.StatusAccepted) {
		return nil, client.delete202NonRetry400HandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) delete202NonRetry400CreateRequest(ctx context.Context, options *LROSADsBeginDelete202NonRetry400Options) (*policy.Request, error) {
	urlPath := "/lro/nonretryerror/delete/202/retry/400"
	req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *LROSADsClient) delete202NonRetry400HandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := CloudError{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 *LROSADsClient) BeginDelete202RetryInvalidHeader(ctx context.Context, options *LROSADsBeginDelete202RetryInvalidHeaderOptions) (LROSADsDelete202RetryInvalidHeaderPollerResponse, error) {
	resp, err := client.delete202RetryInvalidHeader(ctx, options)
	if err != nil {
		return LROSADsDelete202RetryInvalidHeaderPollerResponse{}, err
	}
	result := LROSADsDelete202RetryInvalidHeaderPollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.Delete202RetryInvalidHeader", "", resp, client.con.Pipeline(), client.delete202RetryInvalidHeaderHandleError)
	if err != nil {
		return LROSADsDelete202RetryInvalidHeaderPollerResponse{}, err
	}
	result.Poller = &LROSADsDelete202RetryInvalidHeaderPoller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) delete202RetryInvalidHeader(ctx context.Context, options *LROSADsBeginDelete202RetryInvalidHeaderOptions) (*http.Response, error) {
	req, err := client.delete202RetryInvalidHeaderCreateRequest(ctx, options)
	if err != nil {
		return nil, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return nil, err
	}
	if !runtime.HasStatusCode(resp, http.StatusAccepted) {
		return nil, client.delete202RetryInvalidHeaderHandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) delete202RetryInvalidHeaderCreateRequest(ctx context.Context, options *LROSADsBeginDelete202RetryInvalidHeaderOptions) (*policy.Request, error) {
	urlPath := "/lro/error/delete/202/retry/invalidheader"
	req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *LROSADsClient) delete202RetryInvalidHeaderHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := CloudError{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 *LROSADsClient) BeginDelete204Succeeded(ctx context.Context, options *LROSADsBeginDelete204SucceededOptions) (LROSADsDelete204SucceededPollerResponse, error) {
	resp, err := client.delete204Succeeded(ctx, options)
	if err != nil {
		return LROSADsDelete204SucceededPollerResponse{}, err
	}
	result := LROSADsDelete204SucceededPollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.Delete204Succeeded", "", resp, client.con.Pipeline(), client.delete204SucceededHandleError)
	if err != nil {
		return LROSADsDelete204SucceededPollerResponse{}, err
	}
	result.Poller = &LROSADsDelete204SucceededPoller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) delete204Succeeded(ctx context.Context, options *LROSADsBeginDelete204SucceededOptions) (*http.Response, error) {
	req, err := client.delete204SucceededCreateRequest(ctx, options)
	if err != nil {
		return nil, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return nil, err
	}
	if !runtime.HasStatusCode(resp, http.StatusNoContent) {
		return nil, client.delete204SucceededHandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) delete204SucceededCreateRequest(ctx context.Context, options *LROSADsBeginDelete204SucceededOptions) (*policy.Request, error) {
	urlPath := "/lro/error/delete/204/nolocation"
	req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *LROSADsClient) delete204SucceededHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := CloudError{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 *LROSADsClient) BeginDeleteAsyncRelativeRetry400(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetry400Options) (LROSADsDeleteAsyncRelativeRetry400PollerResponse, error) {
	resp, err := client.deleteAsyncRelativeRetry400(ctx, options)
	if err != nil {
		return LROSADsDeleteAsyncRelativeRetry400PollerResponse{}, err
	}
	result := LROSADsDeleteAsyncRelativeRetry400PollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.DeleteAsyncRelativeRetry400", "", resp, client.con.Pipeline(), client.deleteAsyncRelativeRetry400HandleError)
	if err != nil {
		return LROSADsDeleteAsyncRelativeRetry400PollerResponse{}, err
	}
	result.Poller = &LROSADsDeleteAsyncRelativeRetry400Poller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetry400(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetry400Options) (*http.Response, error) {
	req, err := client.deleteAsyncRelativeRetry400CreateRequest(ctx, options)
	if err != nil {
		return nil, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return nil, err
	}
	if !runtime.HasStatusCode(resp, http.StatusAccepted) {
		return nil, client.deleteAsyncRelativeRetry400HandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetry400CreateRequest(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetry400Options) (*policy.Request, error) {
	urlPath := "/lro/nonretryerror/deleteasync/retry/400"
	req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetry400HandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := CloudError{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 *LROSADsClient) BeginDeleteAsyncRelativeRetryInvalidHeader(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetryInvalidHeaderOptions) (LROSADsDeleteAsyncRelativeRetryInvalidHeaderPollerResponse, error) {
	resp, err := client.deleteAsyncRelativeRetryInvalidHeader(ctx, options)
	if err != nil {
		return LROSADsDeleteAsyncRelativeRetryInvalidHeaderPollerResponse{}, err
	}
	result := LROSADsDeleteAsyncRelativeRetryInvalidHeaderPollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.DeleteAsyncRelativeRetryInvalidHeader", "", resp, client.con.Pipeline(), client.deleteAsyncRelativeRetryInvalidHeaderHandleError)
	if err != nil {
		return LROSADsDeleteAsyncRelativeRetryInvalidHeaderPollerResponse{}, err
	}
	result.Poller = &LROSADsDeleteAsyncRelativeRetryInvalidHeaderPoller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetryInvalidHeader(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetryInvalidHeaderOptions) (*http.Response, error) {
	req, err := client.deleteAsyncRelativeRetryInvalidHeaderCreateRequest(ctx, options)
	if err != nil {
		return nil, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return nil, err
	}
	if !runtime.HasStatusCode(resp, http.StatusAccepted) {
		return nil, client.deleteAsyncRelativeRetryInvalidHeaderHandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetryInvalidHeaderCreateRequest(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetryInvalidHeaderOptions) (*policy.Request, error) {
	urlPath := "/lro/error/deleteasync/retry/invalidheader"
	req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetryInvalidHeaderHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := CloudError{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 *LROSADsClient) BeginDeleteAsyncRelativeRetryInvalidJSONPolling(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetryInvalidJSONPollingOptions) (LROSADsDeleteAsyncRelativeRetryInvalidJSONPollingPollerResponse, error) {
	resp, err := client.deleteAsyncRelativeRetryInvalidJSONPolling(ctx, options)
	if err != nil {
		return LROSADsDeleteAsyncRelativeRetryInvalidJSONPollingPollerResponse{}, err
	}
	result := LROSADsDeleteAsyncRelativeRetryInvalidJSONPollingPollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.DeleteAsyncRelativeRetryInvalidJSONPolling", "", resp, client.con.Pipeline(), client.deleteAsyncRelativeRetryInvalidJSONPollingHandleError)
	if err != nil {
		return LROSADsDeleteAsyncRelativeRetryInvalidJSONPollingPollerResponse{}, err
	}
	result.Poller = &LROSADsDeleteAsyncRelativeRetryInvalidJSONPollingPoller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetryInvalidJSONPolling(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetryInvalidJSONPollingOptions) (*http.Response, error) {
	req, err := client.deleteAsyncRelativeRetryInvalidJSONPollingCreateRequest(ctx, options)
	if err != nil {
		return nil, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return nil, err
	}
	if !runtime.HasStatusCode(resp, http.StatusAccepted) {
		return nil, client.deleteAsyncRelativeRetryInvalidJSONPollingHandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetryInvalidJSONPollingCreateRequest(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetryInvalidJSONPollingOptions) (*policy.Request, error) {
	urlPath := "/lro/error/deleteasync/retry/invalidjsonpolling"
	req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetryInvalidJSONPollingHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := CloudError{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 *LROSADsClient) BeginDeleteAsyncRelativeRetryNoStatus(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetryNoStatusOptions) (LROSADsDeleteAsyncRelativeRetryNoStatusPollerResponse, error) {
	resp, err := client.deleteAsyncRelativeRetryNoStatus(ctx, options)
	if err != nil {
		return LROSADsDeleteAsyncRelativeRetryNoStatusPollerResponse{}, err
	}
	result := LROSADsDeleteAsyncRelativeRetryNoStatusPollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.DeleteAsyncRelativeRetryNoStatus", "", resp, client.con.Pipeline(), client.deleteAsyncRelativeRetryNoStatusHandleError)
	if err != nil {
		return LROSADsDeleteAsyncRelativeRetryNoStatusPollerResponse{}, err
	}
	result.Poller = &LROSADsDeleteAsyncRelativeRetryNoStatusPoller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetryNoStatus(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetryNoStatusOptions) (*http.Response, error) {
	req, err := client.deleteAsyncRelativeRetryNoStatusCreateRequest(ctx, options)
	if err != nil {
		return nil, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return nil, err
	}
	if !runtime.HasStatusCode(resp, http.StatusAccepted) {
		return nil, client.deleteAsyncRelativeRetryNoStatusHandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) deleteAsyncRelativeRetryNoStatusCreateRequest(ctx context.Context, options *LROSADsBeginDeleteAsyncRelativeRetryNoStatusOptions) (*policy.Request, error) {
	urlPath := "/lro/error/deleteasync/retry/nostatus"
	req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}