func (client *DurationClient) getPositiveDurationHandleResponse(resp *http.Response) (DurationGetPositiveDurationResponse, error) {
	result := DurationGetPositiveDurationResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil {
		return DurationGetPositiveDurationResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
getPositiveDurationHandleResponse handles the GetPositiveDuration response.
package durationgroup
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 DurationClient struct {
	con *Connection
}
func NewDurationClient(con *Connection) *DurationClient {
	return &DurationClient{con: con}
}
func (client *DurationClient) GetInvalid(ctx context.Context, options *DurationGetInvalidOptions) (DurationGetInvalidResponse, error) {
	req, err := client.getInvalidCreateRequest(ctx, options)
	if err != nil {
		return DurationGetInvalidResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DurationGetInvalidResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DurationGetInvalidResponse{}, client.getInvalidHandleError(resp)
	}
	return client.getInvalidHandleResponse(resp)
}
func (client *DurationClient) getInvalidCreateRequest(ctx context.Context, options *DurationGetInvalidOptions) (*policy.Request, error) {
	urlPath := "/duration/invalid"
	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 *DurationClient) getInvalidHandleResponse(resp *http.Response) (DurationGetInvalidResponse, error) {
	result := DurationGetInvalidResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil {
		return DurationGetInvalidResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *DurationClient) getInvalidHandleError(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 *DurationClient) GetNull(ctx context.Context, options *DurationGetNullOptions) (DurationGetNullResponse, error) {
	req, err := client.getNullCreateRequest(ctx, options)
	if err != nil {
		return DurationGetNullResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DurationGetNullResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DurationGetNullResponse{}, client.getNullHandleError(resp)
	}
	return client.getNullHandleResponse(resp)
}
func (client *DurationClient) getNullCreateRequest(ctx context.Context, options *DurationGetNullOptions) (*policy.Request, error) {
	urlPath := "/duration/null"
	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 *DurationClient) getNullHandleResponse(resp *http.Response) (DurationGetNullResponse, error) {
	result := DurationGetNullResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil {
		return DurationGetNullResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *DurationClient) getNullHandleError(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 *DurationClient) GetPositiveDuration(ctx context.Context, options *DurationGetPositiveDurationOptions) (DurationGetPositiveDurationResponse, error) {
	req, err := client.getPositiveDurationCreateRequest(ctx, options)
	if err != nil {
		return DurationGetPositiveDurationResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DurationGetPositiveDurationResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DurationGetPositiveDurationResponse{}, client.getPositiveDurationHandleError(resp)
	}
	return client.getPositiveDurationHandleResponse(resp)
}
func (client *DurationClient) getPositiveDurationCreateRequest(ctx context.Context, options *DurationGetPositiveDurationOptions) (*policy.Request, error) {
	urlPath := "/duration/positiveduration"
	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
}