Class ResponseBase
java.lang.Object
com.alibaba.dashscope.types.common.ResponseBase
- Direct Known Subclasses:
AppCompletion,ChatCompletion,ChatCompletionChunk,DecisionResult,DeletionStatus,Deployment,DeploymentList,DesignedVoice,DesignedVoiceList,EmbeddingResponse,FileList,FileObject,FineTune,FineTuneList,Job,JobLogs,JobStatus,Model,ModelList,MultimodalChatChunk,MultimodalChatCompletion,MultimodalEmbeddingResponse,Page,Phrase,PhraseList,RerankResponse,TokenCount,Vocabulary,VocabularyList,Voice,VoiceList
Base of every 3.0 response (design §3): the server envelope flattened — requestId, statusCode,
code, message, headers — plus
isError() for raiseOnError(false) mode (2.x
return-value style).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfillEnvelope(String requestId, int statusCode, String code, String message, Map<String, String> headers) Envelope fill is SDK-internal wiring (transport → response); users must not call it.getCode()Business error code; null/absent on success.intHTTP status of the exchange (200 also for the 200-with-business-code error layer).booleanisError()true when the response carries a business error code (raiseOnError=false mode).
-
Constructor Details
-
ResponseBase
public ResponseBase()
-
-
Method Details
-
fillEnvelope
public void fillEnvelope(String requestId, int statusCode, String code, String message, Map<String, String> headers) Envelope fill is SDK-internal wiring (transport → response); users must not call it. -
getRequestId
-
getStatusCode
public int getStatusCode()HTTP status of the exchange (200 also for the 200-with-business-code error layer). -
getCode
Business error code; null/absent on success. -
getMessage
-
getHeaders
-
isError
public boolean isError()true when the response carries a business error code (raiseOnError=false mode).
-