1212import jakarta .ws .rs .core .GenericType ;
1313import java .util .ArrayList ;
1414import java .util .HashMap ;
15+ import java .util .List ;
1516import java .util .Map ;
1617import java .util .UUID ;
1718import java .util .concurrent .CompletableFuture ;
@@ -321,6 +322,58 @@ public CompletableFuture<ApiResponse<Void>> deleteOrgConnectionsWithHttpInfoAsyn
321322 null );
322323 }
323324
325+ /** Manage optional parameters to listOrgConnections. */
326+ public static class ListOrgConnectionsOptionalParameters {
327+ private String sinkOrgId ;
328+ private String sourceOrgId ;
329+ private Long limit ;
330+ private Long offset ;
331+
332+ /**
333+ * Set sinkOrgId.
334+ *
335+ * @param sinkOrgId The Org ID of the sink org. (optional)
336+ * @return ListOrgConnectionsOptionalParameters
337+ */
338+ public ListOrgConnectionsOptionalParameters sinkOrgId (String sinkOrgId ) {
339+ this .sinkOrgId = sinkOrgId ;
340+ return this ;
341+ }
342+
343+ /**
344+ * Set sourceOrgId.
345+ *
346+ * @param sourceOrgId The Org ID of the source org. (optional)
347+ * @return ListOrgConnectionsOptionalParameters
348+ */
349+ public ListOrgConnectionsOptionalParameters sourceOrgId (String sourceOrgId ) {
350+ this .sourceOrgId = sourceOrgId ;
351+ return this ;
352+ }
353+
354+ /**
355+ * Set limit.
356+ *
357+ * @param limit The limit of number of entries you want to return. Default is 1000. (optional)
358+ * @return ListOrgConnectionsOptionalParameters
359+ */
360+ public ListOrgConnectionsOptionalParameters limit (Long limit ) {
361+ this .limit = limit ;
362+ return this ;
363+ }
364+
365+ /**
366+ * Set offset.
367+ *
368+ * @param offset The pagination offset which you want to query from. Default is 0. (optional)
369+ * @return ListOrgConnectionsOptionalParameters
370+ */
371+ public ListOrgConnectionsOptionalParameters offset (Long offset ) {
372+ this .offset = offset ;
373+ return this ;
374+ }
375+ }
376+
324377 /**
325378 * List Org Connections.
326379 *
@@ -330,7 +383,7 @@ public CompletableFuture<ApiResponse<Void>> deleteOrgConnectionsWithHttpInfoAsyn
330383 * @throws ApiException if fails to make API call
331384 */
332385 public OrgConnectionListResponse listOrgConnections () throws ApiException {
333- return listOrgConnectionsWithHttpInfo ().getData ();
386+ return listOrgConnectionsWithHttpInfo (new ListOrgConnectionsOptionalParameters () ).getData ();
334387 }
335388
336389 /**
@@ -341,7 +394,38 @@ public OrgConnectionListResponse listOrgConnections() throws ApiException {
341394 * @return CompletableFuture<OrgConnectionListResponse>
342395 */
343396 public CompletableFuture <OrgConnectionListResponse > listOrgConnectionsAsync () {
344- return listOrgConnectionsWithHttpInfoAsync ()
397+ return listOrgConnectionsWithHttpInfoAsync (new ListOrgConnectionsOptionalParameters ())
398+ .thenApply (
399+ response -> {
400+ return response .getData ();
401+ });
402+ }
403+
404+ /**
405+ * List Org Connections.
406+ *
407+ * <p>See {@link #listOrgConnectionsWithHttpInfo}.
408+ *
409+ * @param parameters Optional parameters for the request.
410+ * @return OrgConnectionListResponse
411+ * @throws ApiException if fails to make API call
412+ */
413+ public OrgConnectionListResponse listOrgConnections (
414+ ListOrgConnectionsOptionalParameters parameters ) throws ApiException {
415+ return listOrgConnectionsWithHttpInfo (parameters ).getData ();
416+ }
417+
418+ /**
419+ * List Org Connections.
420+ *
421+ * <p>See {@link #listOrgConnectionsWithHttpInfoAsync}.
422+ *
423+ * @param parameters Optional parameters for the request.
424+ * @return CompletableFuture<OrgConnectionListResponse>
425+ */
426+ public CompletableFuture <OrgConnectionListResponse > listOrgConnectionsAsync (
427+ ListOrgConnectionsOptionalParameters parameters ) {
428+ return listOrgConnectionsWithHttpInfoAsync (parameters )
345429 .thenApply (
346430 response -> {
347431 return response .getData ();
@@ -351,6 +435,7 @@ public CompletableFuture<OrgConnectionListResponse> listOrgConnectionsAsync() {
351435 /**
352436 * Returns a list of org connections.
353437 *
438+ * @param parameters Optional parameters for the request.
354439 * @return ApiResponse<OrgConnectionListResponse>
355440 * @throws ApiException if fails to make API call
356441 * @http.response.details
@@ -363,19 +448,29 @@ public CompletableFuture<OrgConnectionListResponse> listOrgConnectionsAsync() {
363448 * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
364449 * </table>
365450 */
366- public ApiResponse <OrgConnectionListResponse > listOrgConnectionsWithHttpInfo ()
367- throws ApiException {
451+ public ApiResponse <OrgConnectionListResponse > listOrgConnectionsWithHttpInfo (
452+ ListOrgConnectionsOptionalParameters parameters ) throws ApiException {
368453 Object localVarPostBody = null ;
454+ String sinkOrgId = parameters .sinkOrgId ;
455+ String sourceOrgId = parameters .sourceOrgId ;
456+ Long limit = parameters .limit ;
457+ Long offset = parameters .offset ;
369458 // create path and map variables
370459 String localVarPath = "/api/v2/org_connections" ;
371460
461+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
372462 Map <String , String > localVarHeaderParams = new HashMap <String , String >();
373463
464+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "sink_org_id" , sinkOrgId ));
465+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "source_org_id" , sourceOrgId ));
466+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "limit" , limit ));
467+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "offset" , offset ));
468+
374469 Invocation .Builder builder =
375470 apiClient .createBuilder (
376471 "v2.OrgConnectionsApi.listOrgConnections" ,
377472 localVarPath ,
378- new ArrayList < Pair >() ,
473+ localVarQueryParams ,
379474 localVarHeaderParams ,
380475 new HashMap <String , String >(),
381476 new String [] {"application/json" },
@@ -396,23 +491,34 @@ public ApiResponse<OrgConnectionListResponse> listOrgConnectionsWithHttpInfo()
396491 *
397492 * <p>See {@link #listOrgConnectionsWithHttpInfo}.
398493 *
494+ * @param parameters Optional parameters for the request.
399495 * @return CompletableFuture<ApiResponse<OrgConnectionListResponse>>
400496 */
401497 public CompletableFuture <ApiResponse <OrgConnectionListResponse >>
402- listOrgConnectionsWithHttpInfoAsync () {
498+ listOrgConnectionsWithHttpInfoAsync (ListOrgConnectionsOptionalParameters parameters ) {
403499 Object localVarPostBody = null ;
500+ String sinkOrgId = parameters .sinkOrgId ;
501+ String sourceOrgId = parameters .sourceOrgId ;
502+ Long limit = parameters .limit ;
503+ Long offset = parameters .offset ;
404504 // create path and map variables
405505 String localVarPath = "/api/v2/org_connections" ;
406506
507+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
407508 Map <String , String > localVarHeaderParams = new HashMap <String , String >();
408509
510+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "sink_org_id" , sinkOrgId ));
511+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "source_org_id" , sourceOrgId ));
512+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "limit" , limit ));
513+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "offset" , offset ));
514+
409515 Invocation .Builder builder ;
410516 try {
411517 builder =
412518 apiClient .createBuilder (
413519 "v2.OrgConnectionsApi.listOrgConnections" ,
414520 localVarPath ,
415- new ArrayList < Pair >() ,
521+ localVarQueryParams ,
416522 localVarHeaderParams ,
417523 new HashMap <String , String >(),
418524 new String [] {"application/json" },
0 commit comments