func (client *HTTPRedirectsClient) Patch307(ctx context.Context, options *HTTPRedirectsPatch307Options) (HTTPRedirectsPatch307Response, error) {
	req, err := client.patch307CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsPatch307Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsPatch307Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HTTPRedirectsPatch307Response{}, client.patch307HandleError(resp)
	}
	return HTTPRedirectsPatch307Response{RawResponse: resp}, nil
}
Patch307 - Patch redirected with 307, resulting in a 200 after redirect
If the operation fails it returns the *Error error type.
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 HTTPRedirectsClient struct {
	con *Connection
}
func NewHTTPRedirectsClient(con *Connection) *HTTPRedirectsClient {
	return &HTTPRedirectsClient{con: con}
}
func (client *HTTPRedirectsClient) Delete307(ctx context.Context, options *HTTPRedirectsDelete307Options) (HTTPRedirectsDelete307Response, error) {
	req, err := client.delete307CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsDelete307Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsDelete307Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HTTPRedirectsDelete307Response{}, client.delete307HandleError(resp)
	}
	return HTTPRedirectsDelete307Response{RawResponse: resp}, nil
}
func (client *HTTPRedirectsClient) delete307CreateRequest(ctx context.Context, options *HTTPRedirectsDelete307Options) (*policy.Request, error) {
	urlPath := "/http/redirect/307"
	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 *HTTPRedirectsClient) delete307HandleError(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 *HTTPRedirectsClient) Get300(ctx context.Context, options *HTTPRedirectsGet300Options) (HTTPRedirectsGet300Response, error) {
	req, err := client.get300CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsGet300Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsGet300Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusMultipleChoices) {
		return HTTPRedirectsGet300Response{}, client.get300HandleError(resp)
	}
	return client.get300HandleResponse(resp)
}
func (client *HTTPRedirectsClient) get300CreateRequest(ctx context.Context, options *HTTPRedirectsGet300Options) (*policy.Request, error) {
	urlPath := "/http/redirect/300"
	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 *HTTPRedirectsClient) get300HandleResponse(resp *http.Response) (HTTPRedirectsGet300Response, error) {
	result := HTTPRedirectsGet300Response{RawResponse: resp}
	if val := resp.Header.Get("Location"); val != "" {
		result.Location = &val
	}
	if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil {
		return HTTPRedirectsGet300Response{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *HTTPRedirectsClient) get300HandleError(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 *HTTPRedirectsClient) Get301(ctx context.Context, options *HTTPRedirectsGet301Options) (HTTPRedirectsGet301Response, error) {
	req, err := client.get301CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsGet301Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsGet301Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HTTPRedirectsGet301Response{}, client.get301HandleError(resp)
	}
	return HTTPRedirectsGet301Response{RawResponse: resp}, nil
}
func (client *HTTPRedirectsClient) get301CreateRequest(ctx context.Context, options *HTTPRedirectsGet301Options) (*policy.Request, error) {
	urlPath := "/http/redirect/301"
	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 *HTTPRedirectsClient) get301HandleError(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 *HTTPRedirectsClient) Get302(ctx context.Context, options *HTTPRedirectsGet302Options) (HTTPRedirectsGet302Response, error) {
	req, err := client.get302CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsGet302Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsGet302Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HTTPRedirectsGet302Response{}, client.get302HandleError(resp)
	}
	return HTTPRedirectsGet302Response{RawResponse: resp}, nil
}
func (client *HTTPRedirectsClient) get302CreateRequest(ctx context.Context, options *HTTPRedirectsGet302Options) (*policy.Request, error) {
	urlPath := "/http/redirect/302"
	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 *HTTPRedirectsClient) get302HandleError(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 *HTTPRedirectsClient) Get307(ctx context.Context, options *HTTPRedirectsGet307Options) (HTTPRedirectsGet307Response, error) {
	req, err := client.get307CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsGet307Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsGet307Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HTTPRedirectsGet307Response{}, client.get307HandleError(resp)
	}
	return HTTPRedirectsGet307Response{RawResponse: resp}, nil
}
func (client *HTTPRedirectsClient) get307CreateRequest(ctx context.Context, options *HTTPRedirectsGet307Options) (*policy.Request, error) {
	urlPath := "/http/redirect/307"
	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 *HTTPRedirectsClient) get307HandleError(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 *HTTPRedirectsClient) Head300(ctx context.Context, options *HTTPRedirectsHead300Options) (HTTPRedirectsHead300Response, error) {
	req, err := client.head300CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsHead300Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsHead300Response{}, err
	}
	return client.head300HandleResponse(resp)
}
func (client *HTTPRedirectsClient) head300CreateRequest(ctx context.Context, options *HTTPRedirectsHead300Options) (*policy.Request, error) {
	urlPath := "/http/redirect/300"
	req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HTTPRedirectsClient) head300HandleResponse(resp *http.Response) (HTTPRedirectsHead300Response, error) {
	result := HTTPRedirectsHead300Response{RawResponse: resp}
	if val := resp.Header.Get("Location"); val != "" {
		result.Location = &val
	}
	if resp.StatusCode >= 200 && resp.StatusCode < 300 {
		result.Success = true
	}
	return result, nil
}
func (client *HTTPRedirectsClient) Head301(ctx context.Context, options *HTTPRedirectsHead301Options) (HTTPRedirectsHead301Response, error) {
	req, err := client.head301CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsHead301Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsHead301Response{}, err
	}
	result := HTTPRedirectsHead301Response{RawResponse: resp}
	if resp.StatusCode >= 200 && resp.StatusCode < 300 {
		result.Success = true
	}
	return result, nil
}
func (client *HTTPRedirectsClient) head301CreateRequest(ctx context.Context, options *HTTPRedirectsHead301Options) (*policy.Request, error) {
	urlPath := "/http/redirect/301"
	req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HTTPRedirectsClient) Head302(ctx context.Context, options *HTTPRedirectsHead302Options) (HTTPRedirectsHead302Response, error) {
	req, err := client.head302CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsHead302Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsHead302Response{}, err
	}
	result := HTTPRedirectsHead302Response{RawResponse: resp}
	if resp.StatusCode >= 200 && resp.StatusCode < 300 {
		result.Success = true
	}
	return result, nil
}
func (client *HTTPRedirectsClient) head302CreateRequest(ctx context.Context, options *HTTPRedirectsHead302Options) (*policy.Request, error) {
	urlPath := "/http/redirect/302"
	req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HTTPRedirectsClient) Head307(ctx context.Context, options *HTTPRedirectsHead307Options) (HTTPRedirectsHead307Response, error) {
	req, err := client.head307CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsHead307Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsHead307Response{}, err
	}
	result := HTTPRedirectsHead307Response{RawResponse: resp}
	if resp.StatusCode >= 200 && resp.StatusCode < 300 {
		result.Success = true
	}
	return result, nil
}
func (client *HTTPRedirectsClient) head307CreateRequest(ctx context.Context, options *HTTPRedirectsHead307Options) (*policy.Request, error) {
	urlPath := "/http/redirect/307"
	req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HTTPRedirectsClient) Options307(ctx context.Context, options *HTTPRedirectsOptions307Options) (HTTPRedirectsOptions307Response, error) {
	req, err := client.options307CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsOptions307Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsOptions307Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HTTPRedirectsOptions307Response{}, client.options307HandleError(resp)
	}
	return HTTPRedirectsOptions307Response{RawResponse: resp}, nil
}
func (client *HTTPRedirectsClient) options307CreateRequest(ctx context.Context, options *HTTPRedirectsOptions307Options) (*policy.Request, error) {
	urlPath := "/http/redirect/307"
	req, err := runtime.NewRequest(ctx, http.MethodOptions, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HTTPRedirectsClient) options307HandleError(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 *HTTPRedirectsClient) Patch302(ctx context.Context, options *HTTPRedirectsPatch302Options) (HTTPRedirectsPatch302Response, error) {
	req, err := client.patch302CreateRequest(ctx, options)
	if err != nil {
		return HTTPRedirectsPatch302Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPRedirectsPatch302Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusFound) {
		return HTTPRedirectsPatch302Response{}, client.patch302HandleError(resp)
	}
	return client.patch302HandleResponse(resp)
}
func (client *HTTPRedirectsClient) patch302CreateRequest(ctx context.Context, options *HTTPRedirectsPatch302Options) (*policy.Request, error) {
	urlPath := "/http/redirect/302"
	req, err := runtime.NewRequest(ctx, http.MethodPatch, 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 *HTTPRedirectsClient) patch302HandleResponse(resp *http.Response) (HTTPRedirectsPatch302Response, error) {
	result := HTTPRedirectsPatch302Response{RawResponse: resp}
	if val := resp.Header.Get("Location"); val != "" {
		result.Location = &val
	}
	return result, nil
}
func (client *HTTPRedirectsClient) patch302HandleError(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)
}