func (client *EnumClient) PutReferenced(ctx context.Context, enumStringBody Colors, options *EnumPutReferencedOptions) (EnumPutReferencedResponse, error) {
	req, err := client.putReferencedCreateRequest(ctx, enumStringBody, options)
	if err != nil {
		return EnumPutReferencedResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return EnumPutReferencedResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return EnumPutReferencedResponse{}, client.putReferencedHandleError(resp)
	}
	return EnumPutReferencedResponse{RawResponse: resp}, nil
}
PutReferenced - Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'
If the operation fails it returns the *Error error type.
package stringgroup
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 EnumClient struct {
	con *Connection
}
func NewEnumClient(con *Connection) *EnumClient {
	return &EnumClient{con: con}
}
func (client *EnumClient) GetNotExpandable(ctx context.Context, options *EnumGetNotExpandableOptions) (EnumGetNotExpandableResponse, error) {
	req, err := client.getNotExpandableCreateRequest(ctx, options)
	if err != nil {
		return EnumGetNotExpandableResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return EnumGetNotExpandableResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return EnumGetNotExpandableResponse{}, client.getNotExpandableHandleError(resp)
	}
	return client.getNotExpandableHandleResponse(resp)
}
func (client *EnumClient) getNotExpandableCreateRequest(ctx context.Context, options *EnumGetNotExpandableOptions) (*policy.Request, error) {
	urlPath := "/string/enum/notExpandable"
	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 *EnumClient) getNotExpandableHandleResponse(resp *http.Response) (EnumGetNotExpandableResponse, error) {
	result := EnumGetNotExpandableResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil {
		return EnumGetNotExpandableResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *EnumClient) getNotExpandableHandleError(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 *EnumClient) GetReferenced(ctx context.Context, options *EnumGetReferencedOptions) (EnumGetReferencedResponse, error) {
	req, err := client.getReferencedCreateRequest(ctx, options)
	if err != nil {
		return EnumGetReferencedResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return EnumGetReferencedResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return EnumGetReferencedResponse{}, client.getReferencedHandleError(resp)
	}
	return client.getReferencedHandleResponse(resp)
}
func (client *EnumClient) getReferencedCreateRequest(ctx context.Context, options *EnumGetReferencedOptions) (*policy.Request, error) {
	urlPath := "/string/enum/Referenced"
	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 *EnumClient) getReferencedHandleResponse(resp *http.Response) (EnumGetReferencedResponse, error) {
	result := EnumGetReferencedResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil {
		return EnumGetReferencedResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *EnumClient) getReferencedHandleError(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 *EnumClient) GetReferencedConstant(ctx context.Context, options *EnumGetReferencedConstantOptions) (EnumGetReferencedConstantResponse, error) {
	req, err := client.getReferencedConstantCreateRequest(ctx, options)
	if err != nil {
		return EnumGetReferencedConstantResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return EnumGetReferencedConstantResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return EnumGetReferencedConstantResponse{}, client.getReferencedConstantHandleError(resp)
	}
	return client.getReferencedConstantHandleResponse(resp)
}
func (client *EnumClient) getReferencedConstantCreateRequest(ctx context.Context, options *EnumGetReferencedConstantOptions) (*policy.Request, error) {
	urlPath := "/string/enum/ReferencedConstant"
	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 *EnumClient) getReferencedConstantHandleResponse(resp *http.Response) (EnumGetReferencedConstantResponse, error) {
	result := EnumGetReferencedConstantResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.RefColorConstant); err != nil {
		return EnumGetReferencedConstantResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}
func (client *EnumClient) getReferencedConstantHandleError(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 *EnumClient) PutNotExpandable(ctx context.Context, stringBody Colors, options *EnumPutNotExpandableOptions) (EnumPutNotExpandableResponse, error) {
	req, err := client.putNotExpandableCreateRequest(ctx, stringBody, options)
	if err != nil {
		return EnumPutNotExpandableResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return EnumPutNotExpandableResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return EnumPutNotExpandableResponse{}, client.putNotExpandableHandleError(resp)
	}
	return EnumPutNotExpandableResponse{RawResponse: resp}, nil
}
func (client *EnumClient) putNotExpandableCreateRequest(ctx context.Context, stringBody Colors, options *EnumPutNotExpandableOptions) (*policy.Request, error) {
	urlPath := "/string/enum/notExpandable"
	req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, runtime.MarshalAsJSON(req, stringBody)
}
func (client *EnumClient) putNotExpandableHandleError(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)
}