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 theWebApiFileResponseData
for the response.<U extends UserDefinedModel>
WebApiResponse.BuilderwithData
(U data) Sets theUserDefinedModel
containing the response data.withResponseStatus
(WebApiResponseStatus responseStatus) Sets theWebApiResponseStatus
for the response.
-
Method Details
-
withData
Sets theUserDefinedModel
containing 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 theWebApiFileResponseData
for the response.- Parameters:
data
- optional, the WebAPI file response data- Returns:
- this
WebApiResponse.Builder
-
withResponseStatus
Sets theWebApiResponseStatus
for 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
-