From a34ff3f4a4bfe5e811946f167828567085a41751 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 12 Sep 2025 20:06:16 +0000 Subject: [PATCH] Regenerate client from commit 9b77381 of spec repo --- .generator/schemas/v2/openapi.yaml | 33 +++++ .../api/client/v2/api/OrgConnectionsApi.java | 120 +++++++++++++++++- 2 files changed, 146 insertions(+), 7 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5c56fcb1aa7..42b12a3fb05 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -62417,6 +62417,39 @@ paths: get: description: Returns a list of org connections. operationId: ListOrgConnections + parameters: + - description: The Org ID of the sink org. + example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1 + in: query + name: sink_org_id + required: false + schema: + type: string + - description: The Org ID of the source org. + example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1 + in: query + name: source_org_id + required: false + schema: + type: string + - description: The limit of number of entries you want to return. Default is + 1000. + example: 1000 + in: query + name: limit + required: false + schema: + format: int64 + type: integer + - description: The pagination offset which you want to query from. Default is + 0. + example: 0 + in: query + name: offset + required: false + schema: + format: int64 + type: integer responses: '200': content: diff --git a/src/main/java/com/datadog/api/client/v2/api/OrgConnectionsApi.java b/src/main/java/com/datadog/api/client/v2/api/OrgConnectionsApi.java index a589da39420..670787e1561 100644 --- a/src/main/java/com/datadog/api/client/v2/api/OrgConnectionsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/OrgConnectionsApi.java @@ -12,6 +12,7 @@ import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -321,6 +322,58 @@ public CompletableFuture> deleteOrgConnectionsWithHttpInfoAsyn null); } + /** Manage optional parameters to listOrgConnections. */ + public static class ListOrgConnectionsOptionalParameters { + private String sinkOrgId; + private String sourceOrgId; + private Long limit; + private Long offset; + + /** + * Set sinkOrgId. + * + * @param sinkOrgId The Org ID of the sink org. (optional) + * @return ListOrgConnectionsOptionalParameters + */ + public ListOrgConnectionsOptionalParameters sinkOrgId(String sinkOrgId) { + this.sinkOrgId = sinkOrgId; + return this; + } + + /** + * Set sourceOrgId. + * + * @param sourceOrgId The Org ID of the source org. (optional) + * @return ListOrgConnectionsOptionalParameters + */ + public ListOrgConnectionsOptionalParameters sourceOrgId(String sourceOrgId) { + this.sourceOrgId = sourceOrgId; + return this; + } + + /** + * Set limit. + * + * @param limit The limit of number of entries you want to return. Default is 1000. (optional) + * @return ListOrgConnectionsOptionalParameters + */ + public ListOrgConnectionsOptionalParameters limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Set offset. + * + * @param offset The pagination offset which you want to query from. Default is 0. (optional) + * @return ListOrgConnectionsOptionalParameters + */ + public ListOrgConnectionsOptionalParameters offset(Long offset) { + this.offset = offset; + return this; + } + } + /** * List Org Connections. * @@ -330,7 +383,7 @@ public CompletableFuture> deleteOrgConnectionsWithHttpInfoAsyn * @throws ApiException if fails to make API call */ public OrgConnectionListResponse listOrgConnections() throws ApiException { - return listOrgConnectionsWithHttpInfo().getData(); + return listOrgConnectionsWithHttpInfo(new ListOrgConnectionsOptionalParameters()).getData(); } /** @@ -341,7 +394,38 @@ public OrgConnectionListResponse listOrgConnections() throws ApiException { * @return CompletableFuture<OrgConnectionListResponse> */ public CompletableFuture listOrgConnectionsAsync() { - return listOrgConnectionsWithHttpInfoAsync() + return listOrgConnectionsWithHttpInfoAsync(new ListOrgConnectionsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List Org Connections. + * + *

See {@link #listOrgConnectionsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return OrgConnectionListResponse + * @throws ApiException if fails to make API call + */ + public OrgConnectionListResponse listOrgConnections( + ListOrgConnectionsOptionalParameters parameters) throws ApiException { + return listOrgConnectionsWithHttpInfo(parameters).getData(); + } + + /** + * List Org Connections. + * + *

See {@link #listOrgConnectionsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<OrgConnectionListResponse> + */ + public CompletableFuture listOrgConnectionsAsync( + ListOrgConnectionsOptionalParameters parameters) { + return listOrgConnectionsWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -351,6 +435,7 @@ public CompletableFuture listOrgConnectionsAsync() { /** * Returns a list of org connections. * + * @param parameters Optional parameters for the request. * @return ApiResponse<OrgConnectionListResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -363,19 +448,29 @@ public CompletableFuture listOrgConnectionsAsync() { * 429 Too many requests - * */ - public ApiResponse listOrgConnectionsWithHttpInfo() - throws ApiException { + public ApiResponse listOrgConnectionsWithHttpInfo( + ListOrgConnectionsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; + String sinkOrgId = parameters.sinkOrgId; + String sourceOrgId = parameters.sourceOrgId; + Long limit = parameters.limit; + Long offset = parameters.offset; // create path and map variables String localVarPath = "/api/v2/org_connections"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sink_org_id", sinkOrgId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "source_org_id", sourceOrgId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); + Invocation.Builder builder = apiClient.createBuilder( "v2.OrgConnectionsApi.listOrgConnections", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -396,23 +491,34 @@ public ApiResponse listOrgConnectionsWithHttpInfo() * *

See {@link #listOrgConnectionsWithHttpInfo}. * + * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<OrgConnectionListResponse>> */ public CompletableFuture> - listOrgConnectionsWithHttpInfoAsync() { + listOrgConnectionsWithHttpInfoAsync(ListOrgConnectionsOptionalParameters parameters) { Object localVarPostBody = null; + String sinkOrgId = parameters.sinkOrgId; + String sourceOrgId = parameters.sourceOrgId; + Long limit = parameters.limit; + Long offset = parameters.offset; // create path and map variables String localVarPath = "/api/v2/org_connections"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sink_org_id", sinkOrgId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "source_org_id", sourceOrgId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( "v2.OrgConnectionsApi.listOrgConnections", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"},