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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2023-05-10 16:31:50.605206",
"spec_repo_commit": "b590b791"
"regenerated": "2023-05-11 14:31:20.850020",
"spec_repo_commit": "b6d2ec34"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-05-10 16:31:50.621369",
"spec_repo_commit": "b590b791"
"regenerated": "2023-05-11 14:31:20.865466",
"spec_repo_commit": "b6d2ec34"
}
}
}
9 changes: 9 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19603,6 +19603,15 @@ paths:
required: true
schema:
type: string
- description: Return the finding for a given snapshot of time (Unix ms).
example: 1678721573794
in: query
name: snapshot_timestamp
required: false
schema:
format: int64
minimum: 1
type: integer
responses:
'200':
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,23 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
new GenericType<SecurityMonitoringSignalTriageUpdateResponse>() {});
}

/** Manage optional parameters to getFinding. */
public static class GetFindingOptionalParameters {
private Long snapshotTimestamp;

/**
* Set snapshotTimestamp.
*
* @param snapshotTimestamp Return the finding for a given snapshot of time (Unix ms).
* (optional)
* @return GetFindingOptionalParameters
*/
public GetFindingOptionalParameters snapshotTimestamp(Long snapshotTimestamp) {
this.snapshotTimestamp = snapshotTimestamp;
return this;
}
}

/**
* Get a finding.
*
Expand All @@ -1144,7 +1161,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal
* @throws ApiException if fails to make API call
*/
public GetFindingResponse getFinding(String findingId) throws ApiException {
return getFindingWithHttpInfo(findingId).getData();
return getFindingWithHttpInfo(findingId, new GetFindingOptionalParameters()).getData();
}

/**
Expand All @@ -1156,7 +1173,40 @@ public GetFindingResponse getFinding(String findingId) throws ApiException {
* @return CompletableFuture&lt;GetFindingResponse&gt;
*/
public CompletableFuture<GetFindingResponse> getFindingAsync(String findingId) {
return getFindingWithHttpInfoAsync(findingId)
return getFindingWithHttpInfoAsync(findingId, new GetFindingOptionalParameters())
.thenApply(
response -> {
return response.getData();
});
}

/**
* Get a finding.
*
* <p>See {@link #getFindingWithHttpInfo}.
*
* @param findingId The ID of the finding. (required)
* @param parameters Optional parameters for the request.
* @return GetFindingResponse
* @throws ApiException if fails to make API call
*/
public GetFindingResponse getFinding(String findingId, GetFindingOptionalParameters parameters)
throws ApiException {
return getFindingWithHttpInfo(findingId, parameters).getData();
}

/**
* Get a finding.
*
* <p>See {@link #getFindingWithHttpInfoAsync}.
*
* @param findingId The ID of the finding. (required)
* @param parameters Optional parameters for the request.
* @return CompletableFuture&lt;GetFindingResponse&gt;
*/
public CompletableFuture<GetFindingResponse> getFindingAsync(
String findingId, GetFindingOptionalParameters parameters) {
return getFindingWithHttpInfoAsync(findingId, parameters)
.thenApply(
response -> {
return response.getData();
Expand All @@ -1167,6 +1217,7 @@ public CompletableFuture<GetFindingResponse> getFindingAsync(String findingId) {
* Returns a single finding with message and resource configuration.
*
* @param findingId The ID of the finding. (required)
* @param parameters Optional parameters for the request.
* @return ApiResponse&lt;GetFindingResponse&gt;
* @throws ApiException if fails to make API call
* @http.response.details
Expand All @@ -1180,8 +1231,8 @@ public CompletableFuture<GetFindingResponse> getFindingAsync(String findingId) {
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
public ApiResponse<GetFindingResponse> getFindingWithHttpInfo(String findingId)
throws ApiException {
public ApiResponse<GetFindingResponse> getFindingWithHttpInfo(
String findingId, GetFindingOptionalParameters parameters) throws ApiException {
// Check if unstable operation is enabled
String operationId = "getFinding";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
Expand All @@ -1196,18 +1247,23 @@ public ApiResponse<GetFindingResponse> getFindingWithHttpInfo(String findingId)
throw new ApiException(
400, "Missing the required parameter 'findingId' when calling getFinding");
}
Long snapshotTimestamp = parameters.snapshotTimestamp;
// create path and map variables
String localVarPath =
"/api/v2/posture_management/findings/{finding_id}"
.replaceAll("\\{" + "finding_id" + "\\}", apiClient.escapeString(findingId.toString()));

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

localVarQueryParams.addAll(
apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp));

Invocation.Builder builder =
apiClient.createBuilder(
"v2.SecurityMonitoringApi.getFinding",
localVarPath,
new ArrayList<Pair>(),
localVarQueryParams,
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
Expand All @@ -1229,10 +1285,11 @@ public ApiResponse<GetFindingResponse> getFindingWithHttpInfo(String findingId)
* <p>See {@link #getFindingWithHttpInfo}.
*
* @param findingId The ID of the finding. (required)
* @param parameters Optional parameters for the request.
* @return CompletableFuture&lt;ApiResponse&lt;GetFindingResponse&gt;&gt;
*/
public CompletableFuture<ApiResponse<GetFindingResponse>> getFindingWithHttpInfoAsync(
String findingId) {
String findingId, GetFindingOptionalParameters parameters) {
// Check if unstable operation is enabled
String operationId = "getFinding";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
Expand All @@ -1253,20 +1310,25 @@ public CompletableFuture<ApiResponse<GetFindingResponse>> getFindingWithHttpInfo
400, "Missing the required parameter 'findingId' when calling getFinding"));
return result;
}
Long snapshotTimestamp = parameters.snapshotTimestamp;
// create path and map variables
String localVarPath =
"/api/v2/posture_management/findings/{finding_id}"
.replaceAll("\\{" + "finding_id" + "\\}", apiClient.escapeString(findingId.toString()));

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

localVarQueryParams.addAll(
apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp));

Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v2.SecurityMonitoringApi.getFinding",
localVarPath,
new ArrayList<Pair>(),
localVarQueryParams,
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"timeToLive": {
"unlimited": true
},
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31e"
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31d"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"timeToLive": {
"unlimited": true
},
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31d"
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31e"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"timeToLive": {
"unlimited": true
},
"id": "01611a93-5e74-0630-3c51-f707c3b51e78"
"id": "01611a93-5e74-0630-3c51-f707c3b51e7e"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"timeToLive": {
"unlimited": true
},
"id": "01611a93-5e74-0630-3c51-f707c3b51e7f"
"id": "01611a93-5e74-0630-3c51-f707c3b51e7b"
},
{
"httpRequest": {
Expand Down Expand Up @@ -53,7 +53,7 @@
"timeToLive": {
"unlimited": true
},
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15e"
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15b"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"timeToLive": {
"unlimited": true
},
"id": "01611a93-5e74-0630-3c51-f707c3b51e7d"
"id": "01611a93-5e74-0630-3c51-f707c3b51e80"
},
{
"httpRequest": {
Expand Down Expand Up @@ -53,7 +53,7 @@
"timeToLive": {
"unlimited": true
},
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15c"
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15f"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"timeToLive": {
"unlimited": true
},
"id": "01611a93-5e74-0630-3c51-f707c3b51e7c"
"id": "01611a93-5e74-0630-3c51-f707c3b51e7a"
},
{
"httpRequest": {
Expand Down Expand Up @@ -53,7 +53,7 @@
"timeToLive": {
"unlimited": true
},
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15b"
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15a"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"timeToLive": {
"unlimited": true
},
"id": "01611a93-5e74-0630-3c51-f707c3b51e80"
"id": "01611a93-5e74-0630-3c51-f707c3b51e81"
},
{
"httpRequest": {
Expand Down Expand Up @@ -53,7 +53,7 @@
"timeToLive": {
"unlimited": true
},
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed15f"
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed160"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"timeToLive": {
"unlimited": true
},
"id": "74945625-c01a-a598-e538-65a53ceb0687"
"id": "74945625-c01a-a598-e538-65a53ceb0685"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"timeToLive": {
"unlimited": true
},
"id": "74945625-c01a-a598-e538-65a53ceb0689"
"id": "74945625-c01a-a598-e538-65a53ceb0686"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"timeToLive": {
"unlimited": true
},
"id": "6a6c3737-1163-32b6-3162-f7d3bcb05a07"
"id": "6a6c3737-1163-32b6-3162-f7d3bcb05a06"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"timeToLive": {
"unlimited": true
},
"id": "ab2c08c1-60c7-9278-3246-d650bb892171"
"id": "ab2c08c1-60c7-9278-3246-d650bb892172"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"timeToLive": {
"unlimited": true
},
"id": "01611a93-5e74-0630-3c51-f707c3b51e81"
"id": "01611a93-5e74-0630-3c51-f707c3b51e82"
},
{
"httpRequest": {
Expand Down Expand Up @@ -53,7 +53,7 @@
"timeToLive": {
"unlimited": true
},
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed160"
"id": "33fa4a39-57ef-afdd-007a-0db82f7ed161"
},
{
"httpRequest": {
Expand All @@ -79,7 +79,7 @@
"timeToLive": {
"unlimited": true
},
"id": "01611a93-5e74-0630-3c51-f707c3b51e82"
"id": "01611a93-5e74-0630-3c51-f707c3b51e83"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"timeToLive": {
"unlimited": true
},
"id": "74945625-c01a-a598-e538-65a53ceb0685"
"id": "74945625-c01a-a598-e538-65a53ceb0689"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"timeToLive": {
"unlimited": true
},
"id": "ab2c08c1-60c7-9278-3246-d650bb892173"
"id": "ab2c08c1-60c7-9278-3246-d650bb89216c"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"timeToLive": {
"unlimited": true
},
"id": "ab2c08c1-60c7-9278-3246-d650bb892175"
"id": "ab2c08c1-60c7-9278-3246-d650bb892173"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"timeToLive": {
"unlimited": true
},
"id": "6a6c3737-1163-32b6-3162-f7d3bcb05a06"
"id": "6a6c3737-1163-32b6-3162-f7d3bcb05a07"
}
]
Loading