func (client *DatetimeClient) getLocalPositiveOffsetLowercaseMaxDateTimeHandleError(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)
}
getLocalPositiveOffsetLowercaseMaxDateTimeHandleError handles the GetLocalPositiveOffsetLowercaseMaxDateTime error response.
package datetimegroup
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 DatetimeClient struct {
	con *Connection
}
func NewDatetimeClient(con *Connection) *DatetimeClient {
	return &DatetimeClient{con: con}
}
func (client *DatetimeClient) GetInvalid(ctx context.Context, options *DatetimeGetInvalidOptions) (DatetimeGetInvalidResponse, error) {
	req, err := client.getInvalidCreateRequest(ctx, options)
	if err != nil {
		return DatetimeGetInvalidResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DatetimeGetInvalidResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DatetimeGetInvalidResponse{}, client.getInvalidHandleError(resp)
	}
	return client.getInvalidHandleResponse(resp)
}
func (client *DatetimeClient) getInvalidCreateRequest(ctx context.Context, options *DatetimeGetInvalidOptions) (*policy.Request, error) {
	urlPath := "/datetime/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 *DatetimeClient) getInvalidHandleResponse(resp *http.Response) (DatetimeGetInvalidResponse, error) {
	result := DatetimeGetInvalidResponse{RawResponse: resp}
	var aux *timeRFC3339
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DatetimeGetInvalidResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DatetimeClient) 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 *DatetimeClient) GetLocalNegativeOffsetLowercaseMaxDateTime(ctx context.Context, options *DatetimeGetLocalNegativeOffsetLowercaseMaxDateTimeOptions) (DatetimeGetLocalNegativeOffsetLowercaseMaxDateTimeResponse, error) {
	req, err := client.getLocalNegativeOffsetLowercaseMaxDateTimeCreateRequest(ctx, options)
	if err != nil {
		return DatetimeGetLocalNegativeOffsetLowercaseMaxDateTimeResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DatetimeGetLocalNegativeOffsetLowercaseMaxDateTimeResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DatetimeGetLocalNegativeOffsetLowercaseMaxDateTimeResponse{}, client.getLocalNegativeOffsetLowercaseMaxDateTimeHandleError(resp)
	}
	return client.getLocalNegativeOffsetLowercaseMaxDateTimeHandleResponse(resp)
}
func (client *DatetimeClient) getLocalNegativeOffsetLowercaseMaxDateTimeCreateRequest(ctx context.Context, options *DatetimeGetLocalNegativeOffsetLowercaseMaxDateTimeOptions) (*policy.Request, error) {
	urlPath := "/datetime/max/localnegativeoffset/lowercase"
	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 *DatetimeClient) getLocalNegativeOffsetLowercaseMaxDateTimeHandleResponse(resp *http.Response) (DatetimeGetLocalNegativeOffsetLowercaseMaxDateTimeResponse, error) {
	result := DatetimeGetLocalNegativeOffsetLowercaseMaxDateTimeResponse{RawResponse: resp}
	var aux *timeRFC3339
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DatetimeGetLocalNegativeOffsetLowercaseMaxDateTimeResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DatetimeClient) getLocalNegativeOffsetLowercaseMaxDateTimeHandleError(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 *DatetimeClient) GetLocalNegativeOffsetMinDateTime(ctx context.Context, options *DatetimeGetLocalNegativeOffsetMinDateTimeOptions) (DatetimeGetLocalNegativeOffsetMinDateTimeResponse, error) {
	req, err := client.getLocalNegativeOffsetMinDateTimeCreateRequest(ctx, options)
	if err != nil {
		return DatetimeGetLocalNegativeOffsetMinDateTimeResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DatetimeGetLocalNegativeOffsetMinDateTimeResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DatetimeGetLocalNegativeOffsetMinDateTimeResponse{}, client.getLocalNegativeOffsetMinDateTimeHandleError(resp)
	}
	return client.getLocalNegativeOffsetMinDateTimeHandleResponse(resp)
}
func (client *DatetimeClient) getLocalNegativeOffsetMinDateTimeCreateRequest(ctx context.Context, options *DatetimeGetLocalNegativeOffsetMinDateTimeOptions) (*policy.Request, error) {
	urlPath := "/datetime/min/localnegativeoffset"
	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 *DatetimeClient) getLocalNegativeOffsetMinDateTimeHandleResponse(resp *http.Response) (DatetimeGetLocalNegativeOffsetMinDateTimeResponse, error) {
	result := DatetimeGetLocalNegativeOffsetMinDateTimeResponse{RawResponse: resp}
	var aux *timeRFC3339
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DatetimeGetLocalNegativeOffsetMinDateTimeResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DatetimeClient) getLocalNegativeOffsetMinDateTimeHandleError(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 *DatetimeClient) GetLocalNegativeOffsetUppercaseMaxDateTime(ctx context.Context, options *DatetimeGetLocalNegativeOffsetUppercaseMaxDateTimeOptions) (DatetimeGetLocalNegativeOffsetUppercaseMaxDateTimeResponse, error) {
	req, err := client.getLocalNegativeOffsetUppercaseMaxDateTimeCreateRequest(ctx, options)
	if err != nil {
		return DatetimeGetLocalNegativeOffsetUppercaseMaxDateTimeResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DatetimeGetLocalNegativeOffsetUppercaseMaxDateTimeResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DatetimeGetLocalNegativeOffsetUppercaseMaxDateTimeResponse{}, client.getLocalNegativeOffsetUppercaseMaxDateTimeHandleError(resp)
	}
	return client.getLocalNegativeOffsetUppercaseMaxDateTimeHandleResponse(resp)
}
func (client *DatetimeClient) getLocalNegativeOffsetUppercaseMaxDateTimeCreateRequest(ctx context.Context, options *DatetimeGetLocalNegativeOffsetUppercaseMaxDateTimeOptions) (*policy.Request, error) {
	urlPath := "/datetime/max/localnegativeoffset/uppercase"
	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 *DatetimeClient) getLocalNegativeOffsetUppercaseMaxDateTimeHandleResponse(resp *http.Response) (DatetimeGetLocalNegativeOffsetUppercaseMaxDateTimeResponse, error) {
	result := DatetimeGetLocalNegativeOffsetUppercaseMaxDateTimeResponse{RawResponse: resp}
	var aux *timeRFC3339
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DatetimeGetLocalNegativeOffsetUppercaseMaxDateTimeResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DatetimeClient) getLocalNegativeOffsetUppercaseMaxDateTimeHandleError(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 *DatetimeClient) GetLocalNoOffsetMinDateTime(ctx context.Context, options *DatetimeGetLocalNoOffsetMinDateTimeOptions) (DatetimeGetLocalNoOffsetMinDateTimeResponse, error) {
	req, err := client.getLocalNoOffsetMinDateTimeCreateRequest(ctx, options)
	if err != nil {
		return DatetimeGetLocalNoOffsetMinDateTimeResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DatetimeGetLocalNoOffsetMinDateTimeResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DatetimeGetLocalNoOffsetMinDateTimeResponse{}, client.getLocalNoOffsetMinDateTimeHandleError(resp)
	}
	return client.getLocalNoOffsetMinDateTimeHandleResponse(resp)
}
func (client *DatetimeClient) getLocalNoOffsetMinDateTimeCreateRequest(ctx context.Context, options *DatetimeGetLocalNoOffsetMinDateTimeOptions) (*policy.Request, error) {
	urlPath := "/datetime/min/localnooffset"
	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 *DatetimeClient) getLocalNoOffsetMinDateTimeHandleResponse(resp *http.Response) (DatetimeGetLocalNoOffsetMinDateTimeResponse, error) {
	result := DatetimeGetLocalNoOffsetMinDateTimeResponse{RawResponse: resp}
	var aux *timeRFC3339
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DatetimeGetLocalNoOffsetMinDateTimeResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}
func (client *DatetimeClient) getLocalNoOffsetMinDateTimeHandleError(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 *DatetimeClient) GetLocalPositiveOffsetLowercaseMaxDateTime(ctx context.Context, options *DatetimeGetLocalPositiveOffsetLowercaseMaxDateTimeOptions) (DatetimeGetLocalPositiveOffsetLowercaseMaxDateTimeResponse, error) {
	req, err := client.getLocalPositiveOffsetLowercaseMaxDateTimeCreateRequest(ctx, options)
	if err != nil {
		return DatetimeGetLocalPositiveOffsetLowercaseMaxDateTimeResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return DatetimeGetLocalPositiveOffsetLowercaseMaxDateTimeResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return DatetimeGetLocalPositiveOffsetLowercaseMaxDateTimeResponse{}, client.getLocalPositiveOffsetLowercaseMaxDateTimeHandleError(resp)
	}
	return client.getLocalPositiveOffsetLowercaseMaxDateTimeHandleResponse(resp)
}
func (client *DatetimeClient) getLocalPositiveOffsetLowercaseMaxDateTimeCreateRequest(ctx context.Context, options *DatetimeGetLocalPositiveOffsetLowercaseMaxDateTimeOptions) (*policy.Request, error) {
	urlPath := "/datetime/max/localpositiveoffset/lowercase"
	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 *DatetimeClient) getLocalPositiveOffsetLowercaseMaxDateTimeHandleResponse(resp *http.Response) (DatetimeGetLocalPositiveOffsetLowercaseMaxDateTimeResponse, error) {
	result := DatetimeGetLocalPositiveOffsetLowercaseMaxDateTimeResponse{RawResponse: resp}
	var aux *timeRFC3339
	if err := runtime.UnmarshalAsJSON(resp, &aux); err != nil {
		return DatetimeGetLocalPositiveOffsetLowercaseMaxDateTimeResponse{}, runtime.NewResponseError(err, resp)
	}
	result.Value = (*time.Time)(aux)
	return result, nil
}