func (client *MultipleResponsesClient) get200Model204NoModelDefaultError200ValidHandleError(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)
}
get200Model204NoModelDefaultError200ValidHandleError handles the Get200Model204NoModelDefaultError200Valid error response.
package httpinfrastructuregroup
import (
	"context"
	"errors"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"net/http"
)
type MultipleResponsesClient struct {
	con *Connection
}
func NewMultipleResponsesClient(con *Connection) *MultipleResponsesClient {
	return &MultipleResponsesClient{con: con}
}
func (client *MultipleResponsesClient) Get200Model201ModelDefaultError200Valid(ctx context.Context, options *MultipleResponsesGet200Model201ModelDefaultError200ValidOptions) (MultipleResponsesGet200Model201ModelDefaultError200ValidResponse, error) {
	req, err := client.get200Model201ModelDefaultError200ValidCreateRequest(ctx, options)
	if err != nil {
		return MultipleResponsesGet200Model201ModelDefaultError200ValidResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return MultipleResponsesGet200Model201ModelDefaultError200ValidResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) {
		return MultipleResponsesGet200Model201ModelDefaultError200ValidResponse{}, client.get200Model201ModelDefaultError200ValidHandleError(resp)
	}
	return client.get200Model201ModelDefaultError200ValidHandleResponse(resp)
}
func (client *MultipleResponsesClient) get200Model201ModelDefaultError200ValidCreateRequest(ctx context.Context, options *MultipleResponsesGet200Model201ModelDefaultError200ValidOptions) (*policy.Request, error) {
	urlPath := "/http/payloads/200/A/201/B/default/Error/response/200/valid"
	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 *MultipleResponsesClient) get200Model201ModelDefaultError200ValidHandleResponse(resp *http.Response) (MultipleResponsesGet200Model201ModelDefaultError200ValidResponse, error) {
	result := MultipleResponsesGet200Model201ModelDefaultError200ValidResponse{RawResponse: resp}
	switch resp.StatusCode {
	case http.StatusOK:
		var val MyException
		if err := runtime.UnmarshalAsJSON(resp, &val); err != nil {
			return MultipleResponsesGet200Model201ModelDefaultError200ValidResponse{}, runtime.NewResponseError(err, resp)
		}
		result.Value = val
	case http.StatusCreated:
		var val B
		if err := runtime.UnmarshalAsJSON(resp, &val); err != nil {
			return MultipleResponsesGet200Model201ModelDefaultError200ValidResponse{}, runtime.NewResponseError(err, resp)
		}
		result.Value = val
	default:
		return MultipleResponsesGet200Model201ModelDefaultError200ValidResponse{}, fmt.Errorf("unhandled HTTP status code %d", resp.StatusCode)
	}
	return result, nil
}
func (client *MultipleResponsesClient) get200Model201ModelDefaultError200ValidHandleError(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 *MultipleResponsesClient) Get200Model201ModelDefaultError201Valid(ctx context.Context, options *MultipleResponsesGet200Model201ModelDefaultError201ValidOptions) (MultipleResponsesGet200Model201ModelDefaultError201ValidResponse, error) {
	req, err := client.get200Model201ModelDefaultError201ValidCreateRequest(ctx, options)
	if err != nil {
		return MultipleResponsesGet200Model201ModelDefaultError201ValidResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return MultipleResponsesGet200Model201ModelDefaultError201ValidResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) {
		return MultipleResponsesGet200Model201ModelDefaultError201ValidResponse{}, client.get200Model201ModelDefaultError201ValidHandleError(resp)
	}
	return client.get200Model201ModelDefaultError201ValidHandleResponse(resp)
}
func (client *MultipleResponsesClient) get200Model201ModelDefaultError201ValidCreateRequest(ctx context.Context, options *MultipleResponsesGet200Model201ModelDefaultError201ValidOptions) (*policy.Request, error) {
	urlPath := "/http/payloads/200/A/201/B/default/Error/response/201/valid"
	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 *MultipleResponsesClient) get200Model201ModelDefaultError201ValidHandleResponse(resp *http.Response) (MultipleResponsesGet200Model201ModelDefaultError201ValidResponse, error) {
	result := MultipleResponsesGet200Model201ModelDefaultError201ValidResponse{RawResponse: resp}
	switch resp.StatusCode {
	case http.StatusOK:
		var val MyException
		if err := runtime.UnmarshalAsJSON(resp, &val); err != nil {
			return MultipleResponsesGet200Model201ModelDefaultError201ValidResponse{}, runtime.NewResponseError(err, resp)
		}
		result.Value = val
	case http.StatusCreated:
		var val B
		if err := runtime.UnmarshalAsJSON(resp, &val); err != nil {
			return MultipleResponsesGet200Model201ModelDefaultError201ValidResponse{}, runtime.NewResponseError(err, resp)
		}
		result.Value = val
	default:
		return MultipleResponsesGet200Model201ModelDefaultError201ValidResponse{}, fmt.Errorf("unhandled HTTP status code %d", resp.StatusCode)
	}
	return result, nil
}
func (client *MultipleResponsesClient) get200Model201ModelDefaultError201ValidHandleError(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 *MultipleResponsesClient) Get200Model201ModelDefaultError400Valid(ctx context.Context, options *MultipleResponsesGet200Model201ModelDefaultError400ValidOptions) (MultipleResponsesGet200Model201ModelDefaultError400ValidResponse, error) {
	req, err := client.get200Model201ModelDefaultError400ValidCreateRequest(ctx, options)
	if err != nil {
		return MultipleResponsesGet200Model201ModelDefaultError400ValidResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return MultipleResponsesGet200Model201ModelDefaultError400ValidResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) {
		return MultipleResponsesGet200Model201ModelDefaultError400ValidResponse{}, client.get200Model201ModelDefaultError400ValidHandleError(resp)
	}
	return client.get200Model201ModelDefaultError400ValidHandleResponse(resp)
}
func (client *MultipleResponsesClient) get200Model201ModelDefaultError400ValidCreateRequest(ctx context.Context, options *MultipleResponsesGet200Model201ModelDefaultError400ValidOptions) (*policy.Request, error) {
	urlPath := "/http/payloads/200/A/201/B/default/Error/response/400/valid"
	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 *MultipleResponsesClient) get200Model201ModelDefaultError400ValidHandleResponse(resp *http.Response) (MultipleResponsesGet200Model201ModelDefaultError400ValidResponse, error) {
	result := MultipleResponsesGet200Model201ModelDefaultError400ValidResponse{RawResponse: resp}
	switch resp.StatusCode {
	case http.StatusOK:
		var val MyException
		if err := runtime.UnmarshalAsJSON(resp, &val); err != nil {
			return MultipleResponsesGet200Model201ModelDefaultError400ValidResponse{}, runtime.NewResponseError(err, resp)
		}
		result.Value = val
	case http.StatusCreated:
		var val B
		if err := runtime.UnmarshalAsJSON(resp, &val); err != nil {
			return MultipleResponsesGet200Model201ModelDefaultError400ValidResponse{}, runtime.NewResponseError(err, resp)
		}
		result.Value = val
	default:
		return MultipleResponsesGet200Model201ModelDefaultError400ValidResponse{}, fmt.Errorf("unhandled HTTP status code %d", resp.StatusCode)
	}
	return result, nil
}
func (client *MultipleResponsesClient) get200Model201ModelDefaultError400ValidHandleError(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 *MultipleResponsesClient) Get200Model204NoModelDefaultError200Valid(ctx context.Context, options *MultipleResponsesGet200Model204NoModelDefaultError200ValidOptions) (MultipleResponsesGet200Model204NoModelDefaultError200ValidResponse, error) {
	req, err := client.get200Model204NoModelDefaultError200ValidCreateRequest(ctx, options)
	if err != nil {
		return MultipleResponsesGet200Model204NoModelDefaultError200ValidResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return MultipleResponsesGet200Model204NoModelDefaultError200ValidResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) {
		return MultipleResponsesGet200Model204NoModelDefaultError200ValidResponse{}, client.get200Model204NoModelDefaultError200ValidHandleError(resp)
	}
	return client.get200Model204NoModelDefaultError200ValidHandleResponse(resp)
}
func (client *MultipleResponsesClient) get200Model204NoModelDefaultError200ValidCreateRequest(ctx context.Context, options *MultipleResponsesGet200Model204NoModelDefaultError200ValidOptions) (*policy.Request, error) {
	urlPath := "/http/payloads/200/A/204/none/default/Error/response/200/valid"
	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 *MultipleResponsesClient) get200Model204NoModelDefaultError200ValidHandleResponse(resp *http.Response) (MultipleResponsesGet200Model204NoModelDefaultError200ValidResponse, error) {
	result := MultipleResponsesGet200Model204NoModelDefaultError200ValidResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.MyException); err != nil {
		return MultipleResponsesGet200Model204NoModelDefaultError200ValidResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}