Package com.veeva.vault.sdk.api.webapi
Interface WebApiResponse.Builder
- Enclosing interface:
- WebApiResponse
public static interface WebApiResponse.Builder
Creates an instance of
WebApiResponse.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Validates and returns a completedWebApiResponse.withData(JsonObject data) Sets the JSON Object containing the response data.Sets theWebApiFileResponseDatafor the response.<U extends UserDefinedModel>
WebApiResponse.BuilderwithData(U data) Sets theUserDefinedModelcontaining the response data.withResponseStatus(WebApiResponseStatus responseStatus) Sets theWebApiResponseStatusfor the response.
-
Method Details
-
withData
Sets theUserDefinedModelcontaining the response data.- Type Parameters:
U- type of UserDefinedModel as response data- Parameters:
data- optional, the WebAPI UserDefinedModel response data- Returns:
- this
WebApiResponse.Builder
-
withData
Sets the JSON Object containing the response data.- Parameters:
data- optional, the WebAPI JsonObject response data- Returns:
- this
WebApiResponse.Builder
-
withData
Sets theWebApiFileResponseDatafor the response.- Parameters:
data- optional, the WebAPI file response data- Returns:
- this
WebApiResponse.Builder
-
withResponseStatus
Sets theWebApiResponseStatusfor the response.- Parameters:
responseStatus- required, the status of request- Returns:
- this
WebApiResponse.Builder
-
build
WebApiResponse build()Validates and returns a completedWebApiResponse.- Returns:
- a completed
WebApiResponse
-