import { Enum } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { BodyStringClient } from "../bodyStringClient" ; import { EnumGetNotExpandableOptionalParams , EnumGetNotExpandableResponse , Colors , EnumPutNotExpandableOptionalParams , EnumGetReferencedOptionalParams , EnumGetReferencedResponse , EnumPutReferencedOptionalParams , EnumGetReferencedConstantOptionalParams , EnumGetReferencedConstantResponse , RefColorConstant , EnumPutReferencedConstantOptionalParams } from "../models" ; /** Class containing Enum operations. */ export class EnumImpl implements Enum { private readonly client : BodyStringClient ; param client constructor ( client ) { this . client = client ; } param options getNotExpandable ( options ? ) { return this . client . sendOperationRequest ( { options } , getNotExpandableOperationSpec ) ; } param stringBody param options putNotExpandable ( stringBody , options ? ) { return this . client . sendOperationRequest ( { stringBody , options } , putNotExpandableOperationSpec ) ; } param options getReferenced ( options ? ) { return this . client . sendOperationRequest ( { options } , getReferencedOperationSpec ) ; } param enumStringBody param options putReferenced ( enumStringBody , options ? ) { return this . client . sendOperationRequest ( { enumStringBody , options } , putReferencedOperationSpec ) ; } param options getReferencedConstant ( options ? ) { return this . client . sendOperationRequest ( { options } , getReferencedConstantOperationSpec ) ; } param enumStringBody param options putReferencedConstant ( enumStringBody , options ? ) { return this . client . sendOperationRequest ( { enumStringBody , options } , putReferencedConstantOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const getNotExpandableOperationSpec = { path : "/string/enum/notExpandable" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Enum" , allowedValues : [ "red color" , "green-color" , "blue_color" ] } } } , default : { bodyMapper : Mappers . ErrorModel } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept ] , serializer } ; const putNotExpandableOperationSpec = { path : "/string/enum/notExpandable" , httpMethod : "PUT" , responses : { 200 : { } , default : { bodyMapper : Mappers . ErrorModel } } , requestBody : Parameters . stringBody5 , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getReferencedOperationSpec = { path : "/string/enum/Referenced" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Enum" , allowedValues : [ "red color" , "green-color" , "blue_color" ] } } } , default : { bodyMapper : Mappers . ErrorModel } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept ] , serializer } ; const putReferencedOperationSpec = { path : "/string/enum/Referenced" , httpMethod : "PUT" , responses : { 200 : { } , default : { bodyMapper : Mappers . ErrorModel } } , requestBody : Parameters . enumStringBody , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getReferencedConstantOperationSpec = { path : "/string/enum/ReferencedConstant" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . RefColorConstant } , default : { bodyMapper : Mappers . ErrorModel } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept ] , serializer } ; const putReferencedConstantOperationSpec = { path : "/string/enum/ReferencedConstant" , httpMethod : "PUT" , responses : { 200 : { } , default : { bodyMapper : Mappers . ErrorModel } } , requestBody : Parameters . enumStringBody1 , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ;