func (client *HeaderClient) responseByteCreateRequest(ctx context.Context, scenario string, options *HeaderResponseByteOptions) (*policy.Request, error) {
	urlPath := "/header/response/prim/byte"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
responseByteCreateRequest creates the ResponseByte request.
package headergroup
import (
	"context"
	"encoding/base64"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"net/http"
	"strconv"
	"time"
)
type HeaderClient struct {
	con *Connection
}
func NewHeaderClient(con *Connection) *HeaderClient {
	return &HeaderClient{con: con}
}
func (client *HeaderClient) CustomRequestID(ctx context.Context, options *HeaderCustomRequestIDOptions) (HeaderCustomRequestIDResponse, error) {
	req, err := client.customRequestIDCreateRequest(ctx, options)
	if err != nil {
		return HeaderCustomRequestIDResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderCustomRequestIDResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderCustomRequestIDResponse{}, client.customRequestIDHandleError(resp)
	}
	return HeaderCustomRequestIDResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) customRequestIDCreateRequest(ctx context.Context, options *HeaderCustomRequestIDOptions) (*policy.Request, error) {
	urlPath := "/header/custom/x-ms-client-request-id/9C4D50EE-2D56-4CD3-8152-34347DC9F2B0"
	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")
	return req, nil
}
func (client *HeaderClient) customRequestIDHandleError(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 *HeaderClient) ParamBool(ctx context.Context, scenario string, value bool, options *HeaderParamBoolOptions) (HeaderParamBoolResponse, error) {
	req, err := client.paramBoolCreateRequest(ctx, scenario, value, options)
	if err != nil {
		return HeaderParamBoolResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamBoolResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamBoolResponse{}, client.paramBoolHandleError(resp)
	}
	return HeaderParamBoolResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramBoolCreateRequest(ctx context.Context, scenario string, value bool, options *HeaderParamBoolOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/bool"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("value", strconv.FormatBool(value))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramBoolHandleError(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 *HeaderClient) ParamByte(ctx context.Context, scenario string, value []byte, options *HeaderParamByteOptions) (HeaderParamByteResponse, error) {
	req, err := client.paramByteCreateRequest(ctx, scenario, value, options)
	if err != nil {
		return HeaderParamByteResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamByteResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamByteResponse{}, client.paramByteHandleError(resp)
	}
	return HeaderParamByteResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramByteCreateRequest(ctx context.Context, scenario string, value []byte, options *HeaderParamByteOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/byte"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("value", base64.StdEncoding.EncodeToString(value))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramByteHandleError(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 *HeaderClient) ParamDate(ctx context.Context, scenario string, value time.Time, options *HeaderParamDateOptions) (HeaderParamDateResponse, error) {
	req, err := client.paramDateCreateRequest(ctx, scenario, value, options)
	if err != nil {
		return HeaderParamDateResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamDateResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamDateResponse{}, client.paramDateHandleError(resp)
	}
	return HeaderParamDateResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramDateCreateRequest(ctx context.Context, scenario string, value time.Time, options *HeaderParamDateOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/date"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("value", value.Format("2006-01-02"))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramDateHandleError(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 *HeaderClient) ParamDatetime(ctx context.Context, scenario string, value time.Time, options *HeaderParamDatetimeOptions) (HeaderParamDatetimeResponse, error) {
	req, err := client.paramDatetimeCreateRequest(ctx, scenario, value, options)
	if err != nil {
		return HeaderParamDatetimeResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamDatetimeResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamDatetimeResponse{}, client.paramDatetimeHandleError(resp)
	}
	return HeaderParamDatetimeResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramDatetimeCreateRequest(ctx context.Context, scenario string, value time.Time, options *HeaderParamDatetimeOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/datetime"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("value", value.Format(time.RFC3339Nano))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramDatetimeHandleError(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 *HeaderClient) ParamDatetimeRFC1123(ctx context.Context, scenario string, options *HeaderParamDatetimeRFC1123Options) (HeaderParamDatetimeRFC1123Response, error) {
	req, err := client.paramDatetimeRFC1123CreateRequest(ctx, scenario, options)
	if err != nil {
		return HeaderParamDatetimeRFC1123Response{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamDatetimeRFC1123Response{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamDatetimeRFC1123Response{}, client.paramDatetimeRFC1123HandleError(resp)
	}
	return HeaderParamDatetimeRFC1123Response{RawResponse: resp}, nil
}
func (client *HeaderClient) paramDatetimeRFC1123CreateRequest(ctx context.Context, scenario string, options *HeaderParamDatetimeRFC1123Options) (*policy.Request, error) {
	urlPath := "/header/param/prim/datetimerfc1123"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	if options != nil && options.Value != nil {
		req.Raw().Header.Set("value", options.Value.Format(time.RFC1123))
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramDatetimeRFC1123HandleError(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 *HeaderClient) ParamDouble(ctx context.Context, scenario string, value float64, options *HeaderParamDoubleOptions) (HeaderParamDoubleResponse, error) {
	req, err := client.paramDoubleCreateRequest(ctx, scenario, value, options)
	if err != nil {
		return HeaderParamDoubleResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamDoubleResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamDoubleResponse{}, client.paramDoubleHandleError(resp)
	}
	return HeaderParamDoubleResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramDoubleCreateRequest(ctx context.Context, scenario string, value float64, options *HeaderParamDoubleOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/double"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("value", strconv.FormatFloat(value, 'f', -1, 64))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramDoubleHandleError(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 *HeaderClient) ParamDuration(ctx context.Context, scenario string, value string, options *HeaderParamDurationOptions) (HeaderParamDurationResponse, error) {
	req, err := client.paramDurationCreateRequest(ctx, scenario, value, options)
	if err != nil {
		return HeaderParamDurationResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamDurationResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamDurationResponse{}, client.paramDurationHandleError(resp)
	}
	return HeaderParamDurationResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramDurationCreateRequest(ctx context.Context, scenario string, value string, options *HeaderParamDurationOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/duration"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("value", value)
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramDurationHandleError(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 *HeaderClient) ParamEnum(ctx context.Context, scenario string, options *HeaderParamEnumOptions) (HeaderParamEnumResponse, error) {
	req, err := client.paramEnumCreateRequest(ctx, scenario, options)
	if err != nil {
		return HeaderParamEnumResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamEnumResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamEnumResponse{}, client.paramEnumHandleError(resp)
	}
	return HeaderParamEnumResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramEnumCreateRequest(ctx context.Context, scenario string, options *HeaderParamEnumOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/enum"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	if options != nil && options.Value != nil {
		req.Raw().Header.Set("value", string(*options.Value))
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramEnumHandleError(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 *HeaderClient) ParamExistingKey(ctx context.Context, userAgent string, options *HeaderParamExistingKeyOptions) (HeaderParamExistingKeyResponse, error) {
	req, err := client.paramExistingKeyCreateRequest(ctx, userAgent, options)
	if err != nil {
		return HeaderParamExistingKeyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamExistingKeyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamExistingKeyResponse{}, client.paramExistingKeyHandleError(resp)
	}
	return HeaderParamExistingKeyResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramExistingKeyCreateRequest(ctx context.Context, userAgent string, options *HeaderParamExistingKeyOptions) (*policy.Request, error) {
	urlPath := "/header/param/existingkey"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("User-Agent", userAgent)
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramExistingKeyHandleError(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 *HeaderClient) ParamFloat(ctx context.Context, scenario string, value float32, options *HeaderParamFloatOptions) (HeaderParamFloatResponse, error) {
	req, err := client.paramFloatCreateRequest(ctx, scenario, value, options)
	if err != nil {
		return HeaderParamFloatResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamFloatResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamFloatResponse{}, client.paramFloatHandleError(resp)
	}
	return HeaderParamFloatResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramFloatCreateRequest(ctx context.Context, scenario string, value float32, options *HeaderParamFloatOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/float"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("value", strconv.FormatFloat(float64(value), 'f', -1, 32))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramFloatHandleError(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 *HeaderClient) ParamInteger(ctx context.Context, scenario string, value int32, options *HeaderParamIntegerOptions) (HeaderParamIntegerResponse, error) {
	req, err := client.paramIntegerCreateRequest(ctx, scenario, value, options)
	if err != nil {
		return HeaderParamIntegerResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamIntegerResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamIntegerResponse{}, client.paramIntegerHandleError(resp)
	}
	return HeaderParamIntegerResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramIntegerCreateRequest(ctx context.Context, scenario string, value int32, options *HeaderParamIntegerOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/integer"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("value", strconv.FormatInt(int64(value), 10))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramIntegerHandleError(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 *HeaderClient) ParamLong(ctx context.Context, scenario string, value int64, options *HeaderParamLongOptions) (HeaderParamLongResponse, error) {
	req, err := client.paramLongCreateRequest(ctx, scenario, value, options)
	if err != nil {
		return HeaderParamLongResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamLongResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamLongResponse{}, client.paramLongHandleError(resp)
	}
	return HeaderParamLongResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramLongCreateRequest(ctx context.Context, scenario string, value int64, options *HeaderParamLongOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/long"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("value", strconv.FormatInt(value, 10))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramLongHandleError(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 *HeaderClient) ParamProtectedKey(ctx context.Context, contentType string, options *HeaderParamProtectedKeyOptions) (HeaderParamProtectedKeyResponse, error) {
	req, err := client.paramProtectedKeyCreateRequest(ctx, contentType, options)
	if err != nil {
		return HeaderParamProtectedKeyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamProtectedKeyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamProtectedKeyResponse{}, client.paramProtectedKeyHandleError(resp)
	}
	return HeaderParamProtectedKeyResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramProtectedKeyCreateRequest(ctx context.Context, contentType string, options *HeaderParamProtectedKeyOptions) (*policy.Request, error) {
	urlPath := "/header/param/protectedkey"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Content-Type", contentType)
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramProtectedKeyHandleError(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 *HeaderClient) ParamString(ctx context.Context, scenario string, options *HeaderParamStringOptions) (HeaderParamStringResponse, error) {
	req, err := client.paramStringCreateRequest(ctx, scenario, options)
	if err != nil {
		return HeaderParamStringResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderParamStringResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderParamStringResponse{}, client.paramStringHandleError(resp)
	}
	return HeaderParamStringResponse{RawResponse: resp}, nil
}
func (client *HeaderClient) paramStringCreateRequest(ctx context.Context, scenario string, options *HeaderParamStringOptions) (*policy.Request, error) {
	urlPath := "/header/param/prim/string"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	if options != nil && options.Value != nil {
		req.Raw().Header.Set("value", *options.Value)
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) paramStringHandleError(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 *HeaderClient) ResponseBool(ctx context.Context, scenario string, options *HeaderResponseBoolOptions) (HeaderResponseBoolResponse, error) {
	req, err := client.responseBoolCreateRequest(ctx, scenario, options)
	if err != nil {
		return HeaderResponseBoolResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderResponseBoolResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderResponseBoolResponse{}, client.responseBoolHandleError(resp)
	}
	return client.responseBoolHandleResponse(resp)
}
func (client *HeaderClient) responseBoolCreateRequest(ctx context.Context, scenario string, options *HeaderResponseBoolOptions) (*policy.Request, error) {
	urlPath := "/header/response/prim/bool"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("scenario", scenario)
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HeaderClient) responseBoolHandleResponse(resp *http.Response) (HeaderResponseBoolResponse, error) {
	result := HeaderResponseBoolResponse{RawResponse: resp}
	if val := resp.Header.Get("value"); val != "" {
		value, err := strconv.ParseBool(val)
		if err != nil {
			return HeaderResponseBoolResponse{}, err
		}
		result.Value = &value
	}
	return result, nil
}
func (client *HeaderClient) responseBoolHandleError(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 *HeaderClient) ResponseByte(ctx context.Context, scenario string, options *HeaderResponseByteOptions) (HeaderResponseByteResponse, error) {
	req, err := client.responseByteCreateRequest(ctx, scenario, options)
	if err != nil {
		return HeaderResponseByteResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HeaderResponseByteResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HeaderResponseByteResponse{}, client.responseByteHandleError(resp)
	}
	return client.responseByteHandleResponse(resp)
}