public static final class ApiResponse.Builder extends Object
ApiResponse.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ApiResponse |
build()
Builds a new
ApiResponse instance with the values set in this builder. |
ApiResponse.Builder |
errorMessage(String errorMessage)
Sets the error message for this response.
|
ApiResponse.Builder |
metadata(ResponseMetadata metadata)
Sets the metadata for this response.
|
ApiResponse.Builder |
results(List<QueryResult> results)
Sets the query results for this response.
|
ApiResponse.Builder |
statusCode(int statusCode)
Sets the status code for this response.
|
public ApiResponse.Builder metadata(ResponseMetadata metadata)
metadata - the response metadatapublic ApiResponse.Builder statusCode(int statusCode)
statusCode - the response status codepublic ApiResponse.Builder errorMessage(String errorMessage)
errorMessage - the response error message, or null for no errorpublic ApiResponse.Builder results(List<QueryResult> results)
results - the response query resultspublic ApiResponse build()
ApiResponse instance with the values set in this builder.Copyright © 2020. All rights reserved.