Skip to content

Commit

Permalink
Upgrade after onfido-openapi-spec change dea7c46
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido authored and github-actions[bot] committed May 24, 2024
1 parent dedc522 commit 1d8024f
Show file tree
Hide file tree
Showing 4 changed files with 923 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/onfido/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.SdkTokenResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.Task.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.TaskItem.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.TimelineFileReference.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.TimelineFileReference1.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.UsDrivingLicenceBreakdown.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.UsDrivingLicenceBreakdownAddress.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.UsDrivingLicenceBreakdownAddressBreakdown.CustomTypeAdapterFactory());
Expand Down
273 changes: 269 additions & 4 deletions src/main/java/com/onfido/api/DefaultApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
import com.onfido.model.SdkTokenBuilder;
import com.onfido.model.Task;
import com.onfido.model.TaskItem;
import com.onfido.model.TimelineFileReference;
import java.util.UUID;
import com.onfido.model.WatchlistMonitor;
import com.onfido.model.WatchlistMonitorBuilder;
Expand Down Expand Up @@ -639,6 +640,133 @@ public okhttp3.Call createCheckAsync(CheckBuilder checkBuilder, final ApiCallbac
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for createTimelineFile
* @param workflowRunId The unique identifier of the Workflow Run. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> A Timeline File reference. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call createTimelineFileCall(UUID workflowRunId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };

// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}

Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/workflow_runs/{workflow_run_id}/timeline_file"
.replace("{" + "workflow_run_id" + "}", localVarApiClient.escapeString(workflowRunId.toString()));

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}

final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}

String[] localVarAuthNames = new String[] { "Token" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@SuppressWarnings("rawtypes")
private okhttp3.Call createTimelineFileValidateBeforeCall(UUID workflowRunId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'workflowRunId' is set
if (workflowRunId == null) {
throw new ApiException("Missing the required parameter 'workflowRunId' when calling createTimelineFile(Async)");
}

return createTimelineFileCall(workflowRunId, _callback);

}

/**
* Create Timeline File for Workflow Run
* Triggers the generation of the Timeline File for the designated Workflow Run.
* @param workflowRunId The unique identifier of the Workflow Run. (required)
* @return TimelineFileReference
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> A Timeline File reference. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public TimelineFileReference createTimelineFile(UUID workflowRunId) throws ApiException {
ApiResponse<TimelineFileReference> localVarResp = createTimelineFileWithHttpInfo(workflowRunId);
return localVarResp.getData();
}

/**
* Create Timeline File for Workflow Run
* Triggers the generation of the Timeline File for the designated Workflow Run.
* @param workflowRunId The unique identifier of the Workflow Run. (required)
* @return ApiResponse&lt;TimelineFileReference&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> A Timeline File reference. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public ApiResponse<TimelineFileReference> createTimelineFileWithHttpInfo(UUID workflowRunId) throws ApiException {
okhttp3.Call localVarCall = createTimelineFileValidateBeforeCall(workflowRunId, null);
Type localVarReturnType = new TypeToken<TimelineFileReference>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}

/**
* Create Timeline File for Workflow Run (asynchronously)
* Triggers the generation of the Timeline File for the designated Workflow Run.
* @param workflowRunId The unique identifier of the Workflow Run. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> A Timeline File reference. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call createTimelineFileAsync(UUID workflowRunId, final ApiCallback<TimelineFileReference> _callback) throws ApiException {

okhttp3.Call localVarCall = createTimelineFileValidateBeforeCall(workflowRunId, _callback);
Type localVarReturnType = new TypeToken<TimelineFileReference>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for createWatchlistMonitor
* @param watchlistMonitorBuilder (required)
Expand Down Expand Up @@ -4079,6 +4207,143 @@ public okhttp3.Call findTaskAsync(UUID workflowRunId, String taskId, final ApiCa
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for findTimelineFile
* @param workflowRunId The unique identifier of the Workflow Run. (required)
* @param timelineFileId The unique identifier for the Timefile File. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 302 </td><td> Found </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call findTimelineFileCall(UUID workflowRunId, UUID timelineFileId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };

// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}

Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/workflow_runs/{workflow_run_id}/timeline_file/{timeline_file_id}"
.replace("{" + "workflow_run_id" + "}", localVarApiClient.escapeString(workflowRunId.toString()))
.replace("{" + "timeline_file_id" + "}", localVarApiClient.escapeString(timelineFileId.toString()));

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}

final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}

String[] localVarAuthNames = new String[] { "Token" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@SuppressWarnings("rawtypes")
private okhttp3.Call findTimelineFileValidateBeforeCall(UUID workflowRunId, UUID timelineFileId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'workflowRunId' is set
if (workflowRunId == null) {
throw new ApiException("Missing the required parameter 'workflowRunId' when calling findTimelineFile(Async)");
}

// verify the required parameter 'timelineFileId' is set
if (timelineFileId == null) {
throw new ApiException("Missing the required parameter 'timelineFileId' when calling findTimelineFile(Async)");
}

return findTimelineFileCall(workflowRunId, timelineFileId, _callback);

}

/**
* Retrieve Timeline File for Workflow Run
* Retrieves the Timeline File for the designated Workflow Run.
* @param workflowRunId The unique identifier of the Workflow Run. (required)
* @param timelineFileId The unique identifier for the Timefile File. (required)
* @return Error
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 302 </td><td> Found </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public Error findTimelineFile(UUID workflowRunId, UUID timelineFileId) throws ApiException {
ApiResponse<Error> localVarResp = findTimelineFileWithHttpInfo(workflowRunId, timelineFileId);
return localVarResp.getData();
}

/**
* Retrieve Timeline File for Workflow Run
* Retrieves the Timeline File for the designated Workflow Run.
* @param workflowRunId The unique identifier of the Workflow Run. (required)
* @param timelineFileId The unique identifier for the Timefile File. (required)
* @return ApiResponse&lt;Error&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 302 </td><td> Found </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public ApiResponse<Error> findTimelineFileWithHttpInfo(UUID workflowRunId, UUID timelineFileId) throws ApiException {
okhttp3.Call localVarCall = findTimelineFileValidateBeforeCall(workflowRunId, timelineFileId, null);
Type localVarReturnType = new TypeToken<Error>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}

/**
* Retrieve Timeline File for Workflow Run (asynchronously)
* Retrieves the Timeline File for the designated Workflow Run.
* @param workflowRunId The unique identifier of the Workflow Run. (required)
* @param timelineFileId The unique identifier for the Timefile File. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 302 </td><td> Found </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call findTimelineFileAsync(UUID workflowRunId, UUID timelineFileId, final ApiCallback<Error> _callback) throws ApiException {

okhttp3.Call localVarCall = findTimelineFileValidateBeforeCall(workflowRunId, timelineFileId, _callback);
Type localVarReturnType = new TypeToken<Error>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for findWatchlistMonitor
* @param monitorId The watchlist monitor&#39;s unique identifier. (required)
Expand Down Expand Up @@ -4469,7 +4734,7 @@ public okhttp3.Call findWorkflowRunAsync(UUID workflowRunId, final ApiCallback<W
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 201 </td><td> Created </td><td> * Location - Link to the newly generated report. <br> </td></tr>
<tr><td> 201 </td><td> Created </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
Expand Down Expand Up @@ -4537,7 +4802,7 @@ private okhttp3.Call forceReportCreationFromWatchlistMonitorValidateBeforeCall(U
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 201 </td><td> Created </td><td> * Location - Link to the newly generated report. <br> </td></tr>
<tr><td> 201 </td><td> Created </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
Expand All @@ -4554,7 +4819,7 @@ public void forceReportCreationFromWatchlistMonitor(UUID monitorId) throws ApiEx
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 201 </td><td> Created </td><td> * Location - Link to the newly generated report. <br> </td></tr>
<tr><td> 201 </td><td> Created </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
Expand All @@ -4573,7 +4838,7 @@ public ApiResponse<Void> forceReportCreationFromWatchlistMonitorWithHttpInfo(UUI
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 201 </td><td> Created </td><td> * Location - Link to the newly generated report. <br> </td></tr>
<tr><td> 201 </td><td> Created </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
Expand Down
Loading

0 comments on commit 1d8024f

Please sign in to comment.