import { Byte } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { BodyByteClient } from "../bodyByteClient" ; import { ByteGetNullOptionalParams , ByteGetNullResponse , ByteGetEmptyOptionalParams , ByteGetEmptyResponse , ByteGetNonAsciiOptionalParams , ByteGetNonAsciiResponse , BytePutNonAsciiOptionalParams , ByteGetInvalidOptionalParams , ByteGetInvalidResponse } from "../models" ; /** Class containing Byte operations. */ export class ByteImpl implements Byte { private readonly client : BodyByteClient ; param client constructor ( client ) { this . client = client ; } param options getNull ( options ? ) { return this . client . sendOperationRequest ( { options } , getNullOperationSpec ) ; } param options getEmpty ( options ? ) { return this . client . sendOperationRequest ( { options } , getEmptyOperationSpec ) ; } param options getNonAscii ( options ? ) { return this . client . sendOperationRequest ( { options } , getNonAsciiOperationSpec ) ; } param byteBody param options putNonAscii ( byteBody , options ? ) { return this . client . sendOperationRequest ( { byteBody , options } , putNonAsciiOperationSpec ) ; } param options getInvalid ( options ? ) { return this . client . sendOperationRequest ( { options } , getInvalidOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const getNullOperationSpec = { path : "/byte/null" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "ByteArray" } } } , default : { bodyMapper : Mappers . ErrorModel } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept ] , serializer } ; const getEmptyOperationSpec = { path : "/byte/empty" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "ByteArray" } } } , default : { bodyMapper : Mappers . ErrorModel } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept ] , serializer } ; const getNonAsciiOperationSpec = { path : "/byte/nonAscii" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "ByteArray" } } } , default : { bodyMapper : Mappers . ErrorModel } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept ] , serializer } ; const putNonAsciiOperationSpec = { path : "/byte/nonAscii" , httpMethod : "PUT" , responses : { 200 : { } , default : { bodyMapper : Mappers . ErrorModel } } , requestBody : Parameters . byteBody , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const getInvalidOperationSpec = { path : "/byte/invalid" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "ByteArray" } } } , default : { bodyMapper : Mappers . ErrorModel } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept ] , serializer } ;