func (client *LROSADsClient) postAsyncRelativeRetry400HandleError(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)
}
postAsyncRelativeRetry400HandleError handles the PostAsyncRelativeRetry400 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
}
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)
}
func (client *LROSADsClient) BeginDeleteNonRetry400(ctx context.Context, options *LROSADsBeginDeleteNonRetry400Options) (LROSADsDeleteNonRetry400PollerResponse, error) {
	resp, err := client.deleteNonRetry400(ctx, options)
	if err != nil {
		return LROSADsDeleteNonRetry400PollerResponse{}, err
	}
	result := LROSADsDeleteNonRetry400PollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.DeleteNonRetry400", "", resp, client.con.Pipeline(), client.deleteNonRetry400HandleError)
	if err != nil {
		return LROSADsDeleteNonRetry400PollerResponse{}, err
	}
	result.Poller = &LROSADsDeleteNonRetry400Poller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) deleteNonRetry400(ctx context.Context, options *LROSADsBeginDeleteNonRetry400Options) (*http.Response, error) {
	req, err := client.deleteNonRetry400CreateRequest(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.deleteNonRetry400HandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) deleteNonRetry400CreateRequest(ctx context.Context, options *LROSADsBeginDeleteNonRetry400Options) (*policy.Request, error) {
	urlPath := "/lro/nonretryerror/delete/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) deleteNonRetry400HandleError(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) BeginPost202NoLocation(ctx context.Context, options *LROSADsBeginPost202NoLocationOptions) (LROSADsPost202NoLocationPollerResponse, error) {
	resp, err := client.post202NoLocation(ctx, options)
	if err != nil {
		return LROSADsPost202NoLocationPollerResponse{}, err
	}
	result := LROSADsPost202NoLocationPollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.Post202NoLocation", "", resp, client.con.Pipeline(), client.post202NoLocationHandleError)
	if err != nil {
		return LROSADsPost202NoLocationPollerResponse{}, err
	}
	result.Poller = &LROSADsPost202NoLocationPoller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) post202NoLocation(ctx context.Context, options *LROSADsBeginPost202NoLocationOptions) (*http.Response, error) {
	req, err := client.post202NoLocationCreateRequest(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.post202NoLocationHandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) post202NoLocationCreateRequest(ctx context.Context, options *LROSADsBeginPost202NoLocationOptions) (*policy.Request, error) {
	urlPath := "/lro/error/post/202/nolocation"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	if options != nil && options.Product != nil {
		return req, runtime.MarshalAsJSON(req, *options.Product)
	}
	return req, nil
}
func (client *LROSADsClient) post202NoLocationHandleError(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) BeginPost202NonRetry400(ctx context.Context, options *LROSADsBeginPost202NonRetry400Options) (LROSADsPost202NonRetry400PollerResponse, error) {
	resp, err := client.post202NonRetry400(ctx, options)
	if err != nil {
		return LROSADsPost202NonRetry400PollerResponse{}, err
	}
	result := LROSADsPost202NonRetry400PollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.Post202NonRetry400", "", resp, client.con.Pipeline(), client.post202NonRetry400HandleError)
	if err != nil {
		return LROSADsPost202NonRetry400PollerResponse{}, err
	}
	result.Poller = &LROSADsPost202NonRetry400Poller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) post202NonRetry400(ctx context.Context, options *LROSADsBeginPost202NonRetry400Options) (*http.Response, error) {
	req, err := client.post202NonRetry400CreateRequest(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.post202NonRetry400HandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) post202NonRetry400CreateRequest(ctx context.Context, options *LROSADsBeginPost202NonRetry400Options) (*policy.Request, error) {
	urlPath := "/lro/nonretryerror/post/202/retry/400"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	if options != nil && options.Product != nil {
		return req, runtime.MarshalAsJSON(req, *options.Product)
	}
	return req, nil
}
func (client *LROSADsClient) post202NonRetry400HandleError(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) BeginPost202RetryInvalidHeader(ctx context.Context, options *LROSADsBeginPost202RetryInvalidHeaderOptions) (LROSADsPost202RetryInvalidHeaderPollerResponse, error) {
	resp, err := client.post202RetryInvalidHeader(ctx, options)
	if err != nil {
		return LROSADsPost202RetryInvalidHeaderPollerResponse{}, err
	}
	result := LROSADsPost202RetryInvalidHeaderPollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.Post202RetryInvalidHeader", "", resp, client.con.Pipeline(), client.post202RetryInvalidHeaderHandleError)
	if err != nil {
		return LROSADsPost202RetryInvalidHeaderPollerResponse{}, err
	}
	result.Poller = &LROSADsPost202RetryInvalidHeaderPoller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) post202RetryInvalidHeader(ctx context.Context, options *LROSADsBeginPost202RetryInvalidHeaderOptions) (*http.Response, error) {
	req, err := client.post202RetryInvalidHeaderCreateRequest(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.post202RetryInvalidHeaderHandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) post202RetryInvalidHeaderCreateRequest(ctx context.Context, options *LROSADsBeginPost202RetryInvalidHeaderOptions) (*policy.Request, error) {
	urlPath := "/lro/error/post/202/retry/invalidheader"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	if options != nil && options.Product != nil {
		return req, runtime.MarshalAsJSON(req, *options.Product)
	}
	return req, nil
}
func (client *LROSADsClient) post202RetryInvalidHeaderHandleError(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) BeginPostAsyncRelativeRetry400(ctx context.Context, options *LROSADsBeginPostAsyncRelativeRetry400Options) (LROSADsPostAsyncRelativeRetry400PollerResponse, error) {
	resp, err := client.postAsyncRelativeRetry400(ctx, options)
	if err != nil {
		return LROSADsPostAsyncRelativeRetry400PollerResponse{}, err
	}
	result := LROSADsPostAsyncRelativeRetry400PollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROSADsClient.PostAsyncRelativeRetry400", "", resp, client.con.Pipeline(), client.postAsyncRelativeRetry400HandleError)
	if err != nil {
		return LROSADsPostAsyncRelativeRetry400PollerResponse{}, err
	}
	result.Poller = &LROSADsPostAsyncRelativeRetry400Poller{
		pt: pt,
	}
	return result, nil
}
func (client *LROSADsClient) postAsyncRelativeRetry400(ctx context.Context, options *LROSADsBeginPostAsyncRelativeRetry400Options) (*http.Response, error) {
	req, err := client.postAsyncRelativeRetry400CreateRequest(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.postAsyncRelativeRetry400HandleError(resp)
	}
	return resp, nil
}
func (client *LROSADsClient) postAsyncRelativeRetry400CreateRequest(ctx context.Context, options *LROSADsBeginPostAsyncRelativeRetry400Options) (*policy.Request, error) {
	urlPath := "/lro/nonretryerror/postasync/retry/400"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	if options != nil && options.Product != nil {
		return req, runtime.MarshalAsJSON(req, *options.Product)
	}
	return req, nil
}