func (client *ExplicitClient) postRequiredIntegerHeaderHandleError(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)
}
postRequiredIntegerHeaderHandleError handles the PostRequiredIntegerHeader error response.
package optionalgroup
import (
	"context"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"io"
	"net/http"
	"strconv"
	"strings"
)
type ExplicitClient struct {
	con *Connection
}
func NewExplicitClient(con *Connection) *ExplicitClient {
	return &ExplicitClient{con: con}
}
func (client *ExplicitClient) PostOptionalArrayHeader(ctx context.Context, options *ExplicitPostOptionalArrayHeaderOptions) (ExplicitPostOptionalArrayHeaderResponse, error) {
	req, err := client.postOptionalArrayHeaderCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalArrayHeaderResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalArrayHeaderResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalArrayHeaderResponse{}, client.postOptionalArrayHeaderHandleError(resp)
	}
	return ExplicitPostOptionalArrayHeaderResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalArrayHeaderCreateRequest(ctx context.Context, options *ExplicitPostOptionalArrayHeaderOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/array/header"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	if options != nil && options.HeaderParameter != nil {
		req.Raw().Header.Set("headerParameter", strings.Join(options.HeaderParameter, ","))
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *ExplicitClient) postOptionalArrayHeaderHandleError(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 *ExplicitClient) PostOptionalArrayParameter(ctx context.Context, options *ExplicitPostOptionalArrayParameterOptions) (ExplicitPostOptionalArrayParameterResponse, error) {
	req, err := client.postOptionalArrayParameterCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalArrayParameterResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalArrayParameterResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalArrayParameterResponse{}, client.postOptionalArrayParameterHandleError(resp)
	}
	return ExplicitPostOptionalArrayParameterResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalArrayParameterCreateRequest(ctx context.Context, options *ExplicitPostOptionalArrayParameterOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/array/parameter"
	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.BodyParameter != nil {
		return req, runtime.MarshalAsJSON(req, options.BodyParameter)
	}
	return req, nil
}
func (client *ExplicitClient) postOptionalArrayParameterHandleError(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 *ExplicitClient) PostOptionalArrayProperty(ctx context.Context, options *ExplicitPostOptionalArrayPropertyOptions) (ExplicitPostOptionalArrayPropertyResponse, error) {
	req, err := client.postOptionalArrayPropertyCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalArrayPropertyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalArrayPropertyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalArrayPropertyResponse{}, client.postOptionalArrayPropertyHandleError(resp)
	}
	return ExplicitPostOptionalArrayPropertyResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalArrayPropertyCreateRequest(ctx context.Context, options *ExplicitPostOptionalArrayPropertyOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/array/property"
	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.BodyParameter != nil {
		return req, runtime.MarshalAsJSON(req, *options.BodyParameter)
	}
	return req, nil
}
func (client *ExplicitClient) postOptionalArrayPropertyHandleError(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 *ExplicitClient) PostOptionalClassParameter(ctx context.Context, options *ExplicitPostOptionalClassParameterOptions) (ExplicitPostOptionalClassParameterResponse, error) {
	req, err := client.postOptionalClassParameterCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalClassParameterResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalClassParameterResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalClassParameterResponse{}, client.postOptionalClassParameterHandleError(resp)
	}
	return ExplicitPostOptionalClassParameterResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalClassParameterCreateRequest(ctx context.Context, options *ExplicitPostOptionalClassParameterOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/class/parameter"
	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.BodyParameter != nil {
		return req, runtime.MarshalAsJSON(req, *options.BodyParameter)
	}
	return req, nil
}
func (client *ExplicitClient) postOptionalClassParameterHandleError(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 *ExplicitClient) PostOptionalClassProperty(ctx context.Context, options *ExplicitPostOptionalClassPropertyOptions) (ExplicitPostOptionalClassPropertyResponse, error) {
	req, err := client.postOptionalClassPropertyCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalClassPropertyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalClassPropertyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalClassPropertyResponse{}, client.postOptionalClassPropertyHandleError(resp)
	}
	return ExplicitPostOptionalClassPropertyResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalClassPropertyCreateRequest(ctx context.Context, options *ExplicitPostOptionalClassPropertyOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/class/property"
	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.BodyParameter != nil {
		return req, runtime.MarshalAsJSON(req, *options.BodyParameter)
	}
	return req, nil
}
func (client *ExplicitClient) postOptionalClassPropertyHandleError(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 *ExplicitClient) PostOptionalIntegerHeader(ctx context.Context, options *ExplicitPostOptionalIntegerHeaderOptions) (ExplicitPostOptionalIntegerHeaderResponse, error) {
	req, err := client.postOptionalIntegerHeaderCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalIntegerHeaderResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalIntegerHeaderResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalIntegerHeaderResponse{}, client.postOptionalIntegerHeaderHandleError(resp)
	}
	return ExplicitPostOptionalIntegerHeaderResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalIntegerHeaderCreateRequest(ctx context.Context, options *ExplicitPostOptionalIntegerHeaderOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/integer/header"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	if options != nil && options.HeaderParameter != nil {
		req.Raw().Header.Set("headerParameter", strconv.FormatInt(int64(*options.HeaderParameter), 10))
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *ExplicitClient) postOptionalIntegerHeaderHandleError(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 *ExplicitClient) PostOptionalIntegerParameter(ctx context.Context, options *ExplicitPostOptionalIntegerParameterOptions) (ExplicitPostOptionalIntegerParameterResponse, error) {
	req, err := client.postOptionalIntegerParameterCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalIntegerParameterResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalIntegerParameterResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalIntegerParameterResponse{}, client.postOptionalIntegerParameterHandleError(resp)
	}
	return ExplicitPostOptionalIntegerParameterResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalIntegerParameterCreateRequest(ctx context.Context, options *ExplicitPostOptionalIntegerParameterOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/integer/parameter"
	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.BodyParameter != nil {
		return req, runtime.MarshalAsJSON(req, *options.BodyParameter)
	}
	return req, nil
}
func (client *ExplicitClient) postOptionalIntegerParameterHandleError(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 *ExplicitClient) PostOptionalIntegerProperty(ctx context.Context, options *ExplicitPostOptionalIntegerPropertyOptions) (ExplicitPostOptionalIntegerPropertyResponse, error) {
	req, err := client.postOptionalIntegerPropertyCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalIntegerPropertyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalIntegerPropertyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalIntegerPropertyResponse{}, client.postOptionalIntegerPropertyHandleError(resp)
	}
	return ExplicitPostOptionalIntegerPropertyResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalIntegerPropertyCreateRequest(ctx context.Context, options *ExplicitPostOptionalIntegerPropertyOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/integer/property"
	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.BodyParameter != nil {
		return req, runtime.MarshalAsJSON(req, *options.BodyParameter)
	}
	return req, nil
}
func (client *ExplicitClient) postOptionalIntegerPropertyHandleError(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 *ExplicitClient) PostOptionalStringHeader(ctx context.Context, options *ExplicitPostOptionalStringHeaderOptions) (ExplicitPostOptionalStringHeaderResponse, error) {
	req, err := client.postOptionalStringHeaderCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalStringHeaderResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalStringHeaderResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalStringHeaderResponse{}, client.postOptionalStringHeaderHandleError(resp)
	}
	return ExplicitPostOptionalStringHeaderResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalStringHeaderCreateRequest(ctx context.Context, options *ExplicitPostOptionalStringHeaderOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/string/header"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	if options != nil && options.BodyParameter != nil {
		req.Raw().Header.Set("bodyParameter", *options.BodyParameter)
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *ExplicitClient) postOptionalStringHeaderHandleError(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 *ExplicitClient) PostOptionalStringParameter(ctx context.Context, options *ExplicitPostOptionalStringParameterOptions) (ExplicitPostOptionalStringParameterResponse, error) {
	req, err := client.postOptionalStringParameterCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalStringParameterResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalStringParameterResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalStringParameterResponse{}, client.postOptionalStringParameterHandleError(resp)
	}
	return ExplicitPostOptionalStringParameterResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalStringParameterCreateRequest(ctx context.Context, options *ExplicitPostOptionalStringParameterOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/string/parameter"
	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.BodyParameter != nil {
		return req, runtime.MarshalAsJSON(req, *options.BodyParameter)
	}
	return req, nil
}
func (client *ExplicitClient) postOptionalStringParameterHandleError(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 *ExplicitClient) PostOptionalStringProperty(ctx context.Context, options *ExplicitPostOptionalStringPropertyOptions) (ExplicitPostOptionalStringPropertyResponse, error) {
	req, err := client.postOptionalStringPropertyCreateRequest(ctx, options)
	if err != nil {
		return ExplicitPostOptionalStringPropertyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostOptionalStringPropertyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostOptionalStringPropertyResponse{}, client.postOptionalStringPropertyHandleError(resp)
	}
	return ExplicitPostOptionalStringPropertyResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postOptionalStringPropertyCreateRequest(ctx context.Context, options *ExplicitPostOptionalStringPropertyOptions) (*policy.Request, error) {
	urlPath := "/reqopt/optional/string/property"
	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.BodyParameter != nil {
		return req, runtime.MarshalAsJSON(req, *options.BodyParameter)
	}
	return req, nil
}
func (client *ExplicitClient) postOptionalStringPropertyHandleError(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 *ExplicitClient) PostRequiredArrayHeader(ctx context.Context, headerParameter []string, options *ExplicitPostRequiredArrayHeaderOptions) (ExplicitPostRequiredArrayHeaderResponse, error) {
	req, err := client.postRequiredArrayHeaderCreateRequest(ctx, headerParameter, options)
	if err != nil {
		return ExplicitPostRequiredArrayHeaderResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostRequiredArrayHeaderResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostRequiredArrayHeaderResponse{}, client.postRequiredArrayHeaderHandleError(resp)
	}
	return ExplicitPostRequiredArrayHeaderResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postRequiredArrayHeaderCreateRequest(ctx context.Context, headerParameter []string, options *ExplicitPostRequiredArrayHeaderOptions) (*policy.Request, error) {
	urlPath := "/reqopt/requied/array/header"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("headerParameter", strings.Join(headerParameter, ","))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *ExplicitClient) postRequiredArrayHeaderHandleError(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 *ExplicitClient) PostRequiredArrayParameter(ctx context.Context, bodyParameter []*string, options *ExplicitPostRequiredArrayParameterOptions) (ExplicitPostRequiredArrayParameterResponse, error) {
	req, err := client.postRequiredArrayParameterCreateRequest(ctx, bodyParameter, options)
	if err != nil {
		return ExplicitPostRequiredArrayParameterResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostRequiredArrayParameterResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostRequiredArrayParameterResponse{}, client.postRequiredArrayParameterHandleError(resp)
	}
	return ExplicitPostRequiredArrayParameterResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postRequiredArrayParameterCreateRequest(ctx context.Context, bodyParameter []*string, options *ExplicitPostRequiredArrayParameterOptions) (*policy.Request, error) {
	urlPath := "/reqopt/requied/array/parameter"
	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, runtime.MarshalAsJSON(req, bodyParameter)
}
func (client *ExplicitClient) postRequiredArrayParameterHandleError(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 *ExplicitClient) PostRequiredArrayProperty(ctx context.Context, bodyParameter ArrayWrapper, options *ExplicitPostRequiredArrayPropertyOptions) (ExplicitPostRequiredArrayPropertyResponse, error) {
	req, err := client.postRequiredArrayPropertyCreateRequest(ctx, bodyParameter, options)
	if err != nil {
		return ExplicitPostRequiredArrayPropertyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostRequiredArrayPropertyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostRequiredArrayPropertyResponse{}, client.postRequiredArrayPropertyHandleError(resp)
	}
	return ExplicitPostRequiredArrayPropertyResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postRequiredArrayPropertyCreateRequest(ctx context.Context, bodyParameter ArrayWrapper, options *ExplicitPostRequiredArrayPropertyOptions) (*policy.Request, error) {
	urlPath := "/reqopt/requied/array/property"
	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, runtime.MarshalAsJSON(req, bodyParameter)
}
func (client *ExplicitClient) postRequiredArrayPropertyHandleError(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 *ExplicitClient) PostRequiredClassParameter(ctx context.Context, bodyParameter Product, options *ExplicitPostRequiredClassParameterOptions) (ExplicitPostRequiredClassParameterResponse, error) {
	req, err := client.postRequiredClassParameterCreateRequest(ctx, bodyParameter, options)
	if err != nil {
		return ExplicitPostRequiredClassParameterResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostRequiredClassParameterResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostRequiredClassParameterResponse{}, client.postRequiredClassParameterHandleError(resp)
	}
	return ExplicitPostRequiredClassParameterResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postRequiredClassParameterCreateRequest(ctx context.Context, bodyParameter Product, options *ExplicitPostRequiredClassParameterOptions) (*policy.Request, error) {
	urlPath := "/reqopt/requied/class/parameter"
	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, runtime.MarshalAsJSON(req, bodyParameter)
}
func (client *ExplicitClient) postRequiredClassParameterHandleError(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 *ExplicitClient) PostRequiredClassProperty(ctx context.Context, bodyParameter ClassWrapper, options *ExplicitPostRequiredClassPropertyOptions) (ExplicitPostRequiredClassPropertyResponse, error) {
	req, err := client.postRequiredClassPropertyCreateRequest(ctx, bodyParameter, options)
	if err != nil {
		return ExplicitPostRequiredClassPropertyResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostRequiredClassPropertyResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostRequiredClassPropertyResponse{}, client.postRequiredClassPropertyHandleError(resp)
	}
	return ExplicitPostRequiredClassPropertyResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postRequiredClassPropertyCreateRequest(ctx context.Context, bodyParameter ClassWrapper, options *ExplicitPostRequiredClassPropertyOptions) (*policy.Request, error) {
	urlPath := "/reqopt/requied/class/property"
	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, runtime.MarshalAsJSON(req, bodyParameter)
}
func (client *ExplicitClient) postRequiredClassPropertyHandleError(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 *ExplicitClient) PostRequiredIntegerHeader(ctx context.Context, headerParameter int32, options *ExplicitPostRequiredIntegerHeaderOptions) (ExplicitPostRequiredIntegerHeaderResponse, error) {
	req, err := client.postRequiredIntegerHeaderCreateRequest(ctx, headerParameter, options)
	if err != nil {
		return ExplicitPostRequiredIntegerHeaderResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return ExplicitPostRequiredIntegerHeaderResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return ExplicitPostRequiredIntegerHeaderResponse{}, client.postRequiredIntegerHeaderHandleError(resp)
	}
	return ExplicitPostRequiredIntegerHeaderResponse{RawResponse: resp}, nil
}
func (client *ExplicitClient) postRequiredIntegerHeaderCreateRequest(ctx context.Context, headerParameter int32, options *ExplicitPostRequiredIntegerHeaderOptions) (*policy.Request, error) {
	urlPath := "/reqopt/requied/integer/header"
	req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("headerParameter", strconv.FormatInt(int64(headerParameter), 10))
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}