Skip to content
Open
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
226 changes: 50 additions & 176 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions examples/v2/incidents/CreateIncidentAttachment.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public static void main(String[] args) {
defaultClient.setUnstableOperationEnabled("v2.createIncidentAttachment", true);
IncidentsApi apiInstance = new IncidentsApi(defaultClient);

// there is a valid "incident" in the system
String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID");

CreateAttachmentRequest body =
new CreateAttachmentRequest()
.data(
Expand All @@ -26,14 +29,13 @@ public static void main(String[] args) {
.attachment(
new CreateAttachmentRequestDataAttributesAttachment()
.documentUrl(
"https://app.datadoghq.com/notebook/123/Postmortem-IR-123")
.title("Postmortem-IR-123"))
"https://app.datadoghq.com/notebook/ExampleIncident/Example-Incident")
.title("Example-Incident"))
.attachmentType(AttachmentDataAttributesAttachmentType.POSTMORTEM))
.id("00000000-0000-0000-0000-000000000000")
.type(IncidentAttachmentType.INCIDENT_ATTACHMENTS));

try {
Attachment result = apiInstance.createIncidentAttachment("incident_id", body);
Attachment result = apiInstance.createIncidentAttachment(INCIDENT_DATA_ID, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentsApi#createIncidentAttachment");
Expand Down
8 changes: 7 additions & 1 deletion examples/v2/incidents/DeleteIncidentAttachment.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ public static void main(String[] args) {
defaultClient.setUnstableOperationEnabled("v2.deleteIncidentAttachment", true);
IncidentsApi apiInstance = new IncidentsApi(defaultClient);

// there is a valid "incident" in the system
String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID");

// there is a valid "incident_attachment" in the system
String INCIDENT_ATTACHMENT_DATA_ID = System.getenv("INCIDENT_ATTACHMENT_DATA_ID");

try {
apiInstance.deleteIncidentAttachment("incident_id", "00000000-0000-0000-0000-000000000002");
apiInstance.deleteIncidentAttachment(INCIDENT_DATA_ID, INCIDENT_ATTACHMENT_DATA_ID);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentsApi#deleteIncidentAttachment");
System.err.println("Status code: " + e.getCode());
Expand Down
5 changes: 4 additions & 1 deletion examples/v2/incidents/ListIncidentAttachments.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ public static void main(String[] args) {
defaultClient.setUnstableOperationEnabled("v2.listIncidentAttachments", true);
IncidentsApi apiInstance = new IncidentsApi(defaultClient);

// there is a valid "incident" in the system
String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID");

try {
AttachmentArray result = apiInstance.listIncidentAttachments("incident_id");
AttachmentArray result = apiInstance.listIncidentAttachments(INCIDENT_DATA_ID);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentsApi#listIncidentAttachments");
Expand Down
14 changes: 10 additions & 4 deletions examples/v2/incidents/UpdateIncidentAttachment.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public static void main(String[] args) {
defaultClient.setUnstableOperationEnabled("v2.updateIncidentAttachment", true);
IncidentsApi apiInstance = new IncidentsApi(defaultClient);

// there is a valid "incident" in the system
String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID");

// there is a valid "incident_attachment" in the system
String INCIDENT_ATTACHMENT_DATA_ID = System.getenv("INCIDENT_ATTACHMENT_DATA_ID");

PatchAttachmentRequest body =
new PatchAttachmentRequest()
.data(
Expand All @@ -25,14 +31,14 @@ public static void main(String[] args) {
.attachment(
new PatchAttachmentRequestDataAttributesAttachment()
.documentUrl(
"https://app.datadoghq.com/notebook/124/Postmortem-IR-124")
.title("Postmortem-IR-124")))
"https://app.datadoghq.com/notebook/124/Example-Incident")
.title("Example-Incident")))
.id(INCIDENT_ATTACHMENT_DATA_ID)
.type(IncidentAttachmentType.INCIDENT_ATTACHMENTS));

try {
Attachment result =
apiInstance.updateIncidentAttachment(
"incident_id", "00000000-0000-0000-0000-000000000002", body);
apiInstance.updateIncidentAttachment(INCIDENT_DATA_ID, INCIDENT_ATTACHMENT_DATA_ID, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentsApi#updateIncidentAttachment");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SecurityMonitoringApi;
import com.datadog.api.client.v2.model.SecurityMonitoringPaginatedSuppressionsResponse;
import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionsResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

try {
SecurityMonitoringPaginatedSuppressionsResponse result =
SecurityMonitoringSuppressionsResponse result =
apiInstance.listSecurityMonitoringSuppressions();
System.out.println(result);
} catch (ApiException e) {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

20 changes: 10 additions & 10 deletions src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,7 @@ public CompletableFuture<ApiResponse<Void>> deleteIncidentWithHttpInfoAsync(Stri
* @param attachmentId The ID of the attachment. (required)
* @throws ApiException if fails to make API call
*/
public void deleteIncidentAttachment(String incidentId, Object attachmentId) throws ApiException {
public void deleteIncidentAttachment(String incidentId, String attachmentId) throws ApiException {
deleteIncidentAttachmentWithHttpInfo(incidentId, attachmentId);
}

Expand All @@ -1907,7 +1907,7 @@ public void deleteIncidentAttachment(String incidentId, Object attachmentId) thr
* @return CompletableFuture
*/
public CompletableFuture<Void> deleteIncidentAttachmentAsync(
String incidentId, Object attachmentId) {
String incidentId, String attachmentId) {
return deleteIncidentAttachmentWithHttpInfoAsync(incidentId, attachmentId)
.thenApply(
response -> {
Expand All @@ -1932,7 +1932,7 @@ public CompletableFuture<Void> deleteIncidentAttachmentAsync(
* </table>
*/
public ApiResponse<Void> deleteIncidentAttachmentWithHttpInfo(
String incidentId, Object attachmentId) throws ApiException {
String incidentId, String attachmentId) throws ApiException {
// Check if unstable operation is enabled
String operationId = "deleteIncidentAttachment";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
Expand Down Expand Up @@ -1994,7 +1994,7 @@ public ApiResponse<Void> deleteIncidentAttachmentWithHttpInfo(
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
*/
public CompletableFuture<ApiResponse<Void>> deleteIncidentAttachmentWithHttpInfoAsync(
String incidentId, Object attachmentId) {
String incidentId, String attachmentId) {
// Check if unstable operation is enabled
String operationId = "deleteIncidentAttachment";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
Expand Down Expand Up @@ -6619,7 +6619,7 @@ public UpdateIncidentAttachmentOptionalParameters include(String include) {
* @throws ApiException if fails to make API call
*/
public Attachment updateIncidentAttachment(
String incidentId, Object attachmentId, PatchAttachmentRequest body) throws ApiException {
String incidentId, String attachmentId, PatchAttachmentRequest body) throws ApiException {
return updateIncidentAttachmentWithHttpInfo(
incidentId, attachmentId, body, new UpdateIncidentAttachmentOptionalParameters())
.getData();
Expand All @@ -6636,7 +6636,7 @@ incidentId, attachmentId, body, new UpdateIncidentAttachmentOptionalParameters()
* @return CompletableFuture&lt;Attachment&gt;
*/
public CompletableFuture<Attachment> updateIncidentAttachmentAsync(
String incidentId, Object attachmentId, PatchAttachmentRequest body) {
String incidentId, String attachmentId, PatchAttachmentRequest body) {
return updateIncidentAttachmentWithHttpInfoAsync(
incidentId, attachmentId, body, new UpdateIncidentAttachmentOptionalParameters())
.thenApply(
Expand All @@ -6659,7 +6659,7 @@ incidentId, attachmentId, body, new UpdateIncidentAttachmentOptionalParameters()
*/
public Attachment updateIncidentAttachment(
String incidentId,
Object attachmentId,
String attachmentId,
PatchAttachmentRequest body,
UpdateIncidentAttachmentOptionalParameters parameters)
throws ApiException {
Expand All @@ -6680,7 +6680,7 @@ public Attachment updateIncidentAttachment(
*/
public CompletableFuture<Attachment> updateIncidentAttachmentAsync(
String incidentId,
Object attachmentId,
String attachmentId,
PatchAttachmentRequest body,
UpdateIncidentAttachmentOptionalParameters parameters) {
return updateIncidentAttachmentWithHttpInfoAsync(incidentId, attachmentId, body, parameters)
Expand Down Expand Up @@ -6710,7 +6710,7 @@ public CompletableFuture<Attachment> updateIncidentAttachmentAsync(
*/
public ApiResponse<Attachment> updateIncidentAttachmentWithHttpInfo(
String incidentId,
Object attachmentId,
String attachmentId,
PatchAttachmentRequest body,
UpdateIncidentAttachmentOptionalParameters parameters)
throws ApiException {
Expand Down Expand Up @@ -6788,7 +6788,7 @@ public ApiResponse<Attachment> updateIncidentAttachmentWithHttpInfo(
*/
public CompletableFuture<ApiResponse<Attachment>> updateIncidentAttachmentWithHttpInfoAsync(
String incidentId,
Object attachmentId,
String attachmentId,
PatchAttachmentRequest body,
UpdateIncidentAttachmentOptionalParameters parameters) {
// Check if unstable operation is enabled
Expand Down
Loading
Loading