func (client *DateClient) getUnderflowDateHandleResponse(resp *http.Response) (DateGetUnderflowDateResponse, error) {
	result := DateGetUnderflowDateResponse{RawResponse: resp}
	var aux *dateType
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DateGetUnderflowDateResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
getUnderflowDateHandleResponse handles the GetUnderflowDate response.
package dategroup
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"
	"time"
)
type DateClient struct {
	con *Connection
}
func NewDateClient(con *Connection) *DateClient {
	return &DateClient{con: con}
}
func (client *DateClient) GetInvalidDate(ctx context.Context, options *DateGetInvalidDateOptions) (DateGetInvalidDateResponse, error) {
	req, err := client.getInvalidDateCreateRequest(ctx, options)
	if err != nil {
		return DateGetInvalidDateResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DateGetInvalidDateResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DateGetInvalidDateResponse{}, client.getInvalidDateHandleError(resp)
	}
	return client.getInvalidDateHandleResponse(resp)
}
func (client *DateClient) getInvalidDateCreateRequest(ctx context.Context, options *DateGetInvalidDateOptions) (*policy.Request, error) {
	urlPath := "/date/invaliddate"
	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 *DateClient) getInvalidDateHandleResponse(resp *http.Response) (DateGetInvalidDateResponse, error) {
	result := DateGetInvalidDateResponse{RawResponse: resp}
	var aux *dateType
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DateGetInvalidDateResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DateClient) getInvalidDateHandleError(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 *DateClient) GetMaxDate(ctx context.Context, options *DateGetMaxDateOptions) (DateGetMaxDateResponse, error) {
	req, err := client.getMaxDateCreateRequest(ctx, options)
	if err != nil {
		return DateGetMaxDateResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DateGetMaxDateResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DateGetMaxDateResponse{}, client.getMaxDateHandleError(resp)
	}
	return client.getMaxDateHandleResponse(resp)
}
func (client *DateClient) getMaxDateCreateRequest(ctx context.Context, options *DateGetMaxDateOptions) (*policy.Request, error) {
	urlPath := "/date/max"
	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 *DateClient) getMaxDateHandleResponse(resp *http.Response) (DateGetMaxDateResponse, error) {
	result := DateGetMaxDateResponse{RawResponse: resp}
	var aux *dateType
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DateGetMaxDateResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DateClient) getMaxDateHandleError(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 *DateClient) GetMinDate(ctx context.Context, options *DateGetMinDateOptions) (DateGetMinDateResponse, error) {
	req, err := client.getMinDateCreateRequest(ctx, options)
	if err != nil {
		return DateGetMinDateResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DateGetMinDateResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DateGetMinDateResponse{}, client.getMinDateHandleError(resp)
	}
	return client.getMinDateHandleResponse(resp)
}
func (client *DateClient) getMinDateCreateRequest(ctx context.Context, options *DateGetMinDateOptions) (*policy.Request, error) {
	urlPath := "/date/min"
	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 *DateClient) getMinDateHandleResponse(resp *http.Response) (DateGetMinDateResponse, error) {
	result := DateGetMinDateResponse{RawResponse: resp}
	var aux *dateType
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DateGetMinDateResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DateClient) getMinDateHandleError(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 *DateClient) GetNull(ctx context.Context, options *DateGetNullOptions) (DateGetNullResponse, error) {
	req, err := client.getNullCreateRequest(ctx, options)
	if err != nil {
		return DateGetNullResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DateGetNullResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DateGetNullResponse{}, client.getNullHandleError(resp)
	}
	return client.getNullHandleResponse(resp)
}
func (client *DateClient) getNullCreateRequest(ctx context.Context, options *DateGetNullOptions) (*policy.Request, error) {
	urlPath := "/date/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 *DateClient) getNullHandleResponse(resp *http.Response) (DateGetNullResponse, error) {
	result := DateGetNullResponse{RawResponse: resp}
	var aux *dateType
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DateGetNullResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DateClient) 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 *DateClient) GetOverflowDate(ctx context.Context, options *DateGetOverflowDateOptions) (DateGetOverflowDateResponse, error) {
	req, err := client.getOverflowDateCreateRequest(ctx, options)
	if err != nil {
		return DateGetOverflowDateResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DateGetOverflowDateResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DateGetOverflowDateResponse{}, client.getOverflowDateHandleError(resp)
	}
	return client.getOverflowDateHandleResponse(resp)
}
func (client *DateClient) getOverflowDateCreateRequest(ctx context.Context, options *DateGetOverflowDateOptions) (*policy.Request, error) {
	urlPath := "/date/overflowdate"
	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 *DateClient) getOverflowDateHandleResponse(resp *http.Response) (DateGetOverflowDateResponse, error) {
	result := DateGetOverflowDateResponse{RawResponse: resp}
	var aux *dateType
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DateGetOverflowDateResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DateClient) getOverflowDateHandleError(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 *DateClient) GetUnderflowDate(ctx context.Context, options *DateGetUnderflowDateOptions) (DateGetUnderflowDateResponse, error) {
	req, err := client.getUnderflowDateCreateRequest(ctx, options)
	if err != nil {
		return DateGetUnderflowDateResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DateGetUnderflowDateResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DateGetUnderflowDateResponse{}, client.getUnderflowDateHandleError(resp)
	}
	return client.getUnderflowDateHandleResponse(resp)
}
func (client *DateClient) getUnderflowDateCreateRequest(ctx context.Context, options *DateGetUnderflowDateOptions) (*policy.Request, error) {
	urlPath := "/date/underflowdate"
	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
}