11// smithy-typescript generated code
22import { GetNumbersCommandInput , GetNumbersCommandOutput } from "../commands/GetNumbersCommand" ;
33import { TradeEventStreamCommandInput , TradeEventStreamCommandOutput } from "../commands/TradeEventStreamCommand" ;
4- import { XYZServiceServiceException as __BaseException } from "../models/XYZServiceServiceException " ;
4+ import { XYZServiceSyntheticServiceException as __BaseException } from "../models/XYZServiceSyntheticServiceException " ;
55import {
66 Alpha ,
77 CodedThrottlingError ,
@@ -12,6 +12,7 @@ import {
1212 RetryableError ,
1313 TradeEvents ,
1414 Unit ,
15+ XYZServiceServiceException ,
1516} from "../models/models_0" ;
1617import {
1718 dateToTag as __dateToTag ,
@@ -138,6 +139,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
138139 case "RetryableError" :
139140 case "org.xyz.v1#RetryableError" :
140141 throw await de_RetryableErrorRes ( parsedOutput , context ) ;
142+ case "XYZServiceServiceException" :
143+ case "org.xyz.v1#XYZServiceServiceException" :
144+ throw await de_XYZServiceServiceExceptionRes ( parsedOutput , context ) ;
141145 default :
142146 const parsedBody = parsedOutput . body ;
143147 return throwDefaultError ( {
@@ -206,6 +210,22 @@ const de_RetryableErrorRes = async (parsedOutput: any, context: __SerdeContext):
206210 return __decorateServiceException ( exception , body ) ;
207211} ;
208212
213+ /**
214+ * deserializeRpcv2cborXYZServiceServiceExceptionRes
215+ */
216+ const de_XYZServiceServiceExceptionRes = async (
217+ parsedOutput : any ,
218+ context : __SerdeContext
219+ ) : Promise < XYZServiceServiceException > => {
220+ const body = parsedOutput . body ;
221+ const deserialized : any = _json ( body ) ;
222+ const exception = new XYZServiceServiceException ( {
223+ $metadata : deserializeMetadata ( parsedOutput ) ,
224+ ...deserialized ,
225+ } ) ;
226+ return __decorateServiceException ( exception , body ) ;
227+ } ;
228+
209229/**
210230 * serializeRpcv2cborTradeEvents
211231 */
@@ -331,6 +351,8 @@ const de_GetNumbersResponse = (output: any, context: __SerdeContext): GetNumbers
331351
332352// de_RetryableError omitted.
333353
354+ // de_XYZServiceServiceException omitted.
355+
334356// de_Unit omitted.
335357
336358const deserializeMetadata = ( output : __HttpResponse ) : __ResponseMetadata => ( {
0 commit comments