func (client *LROsCustomHeaderClient) postAsyncRetrySucceededCreateRequest(ctx context.Context, options *LROsCustomHeaderBeginPostAsyncRetrySucceededOptions) (*policy.Request, error) {
	urlPath := "/lro/customheader/postasync/retry/succeeded"
	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
}
postAsyncRetrySucceededCreateRequest creates the PostAsyncRetrySucceeded request.
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 LROsCustomHeaderClient struct {
	con *Connection
}
func NewLROsCustomHeaderClient(con *Connection) *LROsCustomHeaderClient {
	return &LROsCustomHeaderClient{con: con}
}
func (client *LROsCustomHeaderClient) BeginPost202Retry200(ctx context.Context, options *LROsCustomHeaderBeginPost202Retry200Options) (LROsCustomHeaderPost202Retry200PollerResponse, error) {
	resp, err := client.post202Retry200(ctx, options)
	if err != nil {
		return LROsCustomHeaderPost202Retry200PollerResponse{}, err
	}
	result := LROsCustomHeaderPost202Retry200PollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROsCustomHeaderClient.Post202Retry200", "", resp, client.con.Pipeline(), client.post202Retry200HandleError)
	if err != nil {
		return LROsCustomHeaderPost202Retry200PollerResponse{}, err
	}
	result.Poller = &LROsCustomHeaderPost202Retry200Poller{
		pt: pt,
	}
	return result, nil
}
func (client *LROsCustomHeaderClient) post202Retry200(ctx context.Context, options *LROsCustomHeaderBeginPost202Retry200Options) (*http.Response, error) {
	req, err := client.post202Retry200CreateRequest(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.post202Retry200HandleError(resp)
	}
	return resp, nil
}
func (client *LROsCustomHeaderClient) post202Retry200CreateRequest(ctx context.Context, options *LROsCustomHeaderBeginPost202Retry200Options) (*policy.Request, error) {
	urlPath := "/lro/customheader/post/202/retry/200"
	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 *LROsCustomHeaderClient) post202Retry200HandleError(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 *LROsCustomHeaderClient) BeginPostAsyncRetrySucceeded(ctx context.Context, options *LROsCustomHeaderBeginPostAsyncRetrySucceededOptions) (LROsCustomHeaderPostAsyncRetrySucceededPollerResponse, error) {
	resp, err := client.postAsyncRetrySucceeded(ctx, options)
	if err != nil {
		return LROsCustomHeaderPostAsyncRetrySucceededPollerResponse{}, err
	}
	result := LROsCustomHeaderPostAsyncRetrySucceededPollerResponse{
		RawResponse: resp,
	}
	pt, err := armruntime.NewPoller("LROsCustomHeaderClient.PostAsyncRetrySucceeded", "", resp, client.con.Pipeline(), client.postAsyncRetrySucceededHandleError)
	if err != nil {
		return LROsCustomHeaderPostAsyncRetrySucceededPollerResponse{}, err
	}
	result.Poller = &LROsCustomHeaderPostAsyncRetrySucceededPoller{
		pt: pt,
	}
	return result, nil
}
func (client *LROsCustomHeaderClient) postAsyncRetrySucceeded(ctx context.Context, options *LROsCustomHeaderBeginPostAsyncRetrySucceededOptions) (*http.Response, error) {
	req, err := client.postAsyncRetrySucceededCreateRequest(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.postAsyncRetrySucceededHandleError(resp)
	}
	return resp, nil
}