Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
120 changes: 113 additions & 7 deletions src/main/java/com/datadog/api/client/v2/api/OrgConnectionsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -321,6 +322,58 @@ public CompletableFuture<ApiResponse<Void>> 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.
*
Expand All @@ -330,7 +383,7 @@ public CompletableFuture<ApiResponse<Void>> deleteOrgConnectionsWithHttpInfoAsyn
* @throws ApiException if fails to make API call
*/
public OrgConnectionListResponse listOrgConnections() throws ApiException {
return listOrgConnectionsWithHttpInfo().getData();
return listOrgConnectionsWithHttpInfo(new ListOrgConnectionsOptionalParameters()).getData();
}

/**
Expand All @@ -341,7 +394,38 @@ public OrgConnectionListResponse listOrgConnections() throws ApiException {
* @return CompletableFuture&lt;OrgConnectionListResponse&gt;
*/
public CompletableFuture<OrgConnectionListResponse> listOrgConnectionsAsync() {
return listOrgConnectionsWithHttpInfoAsync()
return listOrgConnectionsWithHttpInfoAsync(new ListOrgConnectionsOptionalParameters())
.thenApply(
response -> {
return response.getData();
});
}

/**
* List Org Connections.
*
* <p>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.
*
* <p>See {@link #listOrgConnectionsWithHttpInfoAsync}.
*
* @param parameters Optional parameters for the request.
* @return CompletableFuture&lt;OrgConnectionListResponse&gt;
*/
public CompletableFuture<OrgConnectionListResponse> listOrgConnectionsAsync(
ListOrgConnectionsOptionalParameters parameters) {
return listOrgConnectionsWithHttpInfoAsync(parameters)
.thenApply(
response -> {
return response.getData();
Expand All @@ -351,6 +435,7 @@ public CompletableFuture<OrgConnectionListResponse> listOrgConnectionsAsync() {
/**
* Returns a list of org connections.
*
* @param parameters Optional parameters for the request.
* @return ApiResponse&lt;OrgConnectionListResponse&gt;
* @throws ApiException if fails to make API call
* @http.response.details
Expand All @@ -363,19 +448,29 @@ public CompletableFuture<OrgConnectionListResponse> listOrgConnectionsAsync() {
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
public ApiResponse<OrgConnectionListResponse> listOrgConnectionsWithHttpInfo()
throws ApiException {
public ApiResponse<OrgConnectionListResponse> 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<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

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<Pair>(),
localVarQueryParams,
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
Expand All @@ -396,23 +491,34 @@ public ApiResponse<OrgConnectionListResponse> listOrgConnectionsWithHttpInfo()
*
* <p>See {@link #listOrgConnectionsWithHttpInfo}.
*
* @param parameters Optional parameters for the request.
* @return CompletableFuture&lt;ApiResponse&lt;OrgConnectionListResponse&gt;&gt;
*/
public CompletableFuture<ApiResponse<OrgConnectionListResponse>>
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<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

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<Pair>(),
localVarQueryParams,
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
Expand Down