func (client *HTTPSuccessClient) delete204CreateRequest(ctx context.Context, options *HTTPSuccessDelete204Options) (*policy.Request, error) {
	urlPath := "/http/success/204"
	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, runtime.MarshalAsJSON(req, true)
}
delete204CreateRequest creates the Delete204 request.
package httpinfrastructuregroup
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"
)
type HTTPSuccessClient struct {
	con *Connection
}
func NewHTTPSuccessClient(con *Connection) *HTTPSuccessClient {
	return &HTTPSuccessClient{con: con}
}
func (client *HTTPSuccessClient) Delete200(ctx context.Context, options *HTTPSuccessDelete200Options) (HTTPSuccessDelete200Response, error) {
	req, err := client.delete200CreateRequest(ctx, options)
	if err != nil {
		return HTTPSuccessDelete200Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPSuccessDelete200Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HTTPSuccessDelete200Response{}, client.delete200HandleError(resp)
	}
	return HTTPSuccessDelete200Response{RawResponse: resp}, nil
}
func (client *HTTPSuccessClient) delete200CreateRequest(ctx context.Context, options *HTTPSuccessDelete200Options) (*policy.Request, error) {
	urlPath := "/http/success/200"
	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, runtime.MarshalAsJSON(req, true)
}
func (client *HTTPSuccessClient) delete200HandleError(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 *HTTPSuccessClient) Delete202(ctx context.Context, options *HTTPSuccessDelete202Options) (HTTPSuccessDelete202Response, error) {
	req, err := client.delete202CreateRequest(ctx, options)
	if err != nil {
		return HTTPSuccessDelete202Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPSuccessDelete202Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusAccepted) {
		return HTTPSuccessDelete202Response{}, client.delete202HandleError(resp)
	}
	return HTTPSuccessDelete202Response{RawResponse: resp}, nil
}
func (client *HTTPSuccessClient) delete202CreateRequest(ctx context.Context, options *HTTPSuccessDelete202Options) (*policy.Request, error) {
	urlPath := "/http/success/202"
	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, runtime.MarshalAsJSON(req, true)
}
func (client *HTTPSuccessClient) delete202HandleError(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 *HTTPSuccessClient) Delete204(ctx context.Context, options *HTTPSuccessDelete204Options) (HTTPSuccessDelete204Response, error) {
	req, err := client.delete204CreateRequest(ctx, options)
	if err != nil {
		return HTTPSuccessDelete204Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPSuccessDelete204Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusNoContent) {
		return HTTPSuccessDelete204Response{}, client.delete204HandleError(resp)
	}
	return HTTPSuccessDelete204Response{RawResponse: resp}, nil
}