From 649e0d589017c98fc24170d7386be6cf35d175fe Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 29 May 2026 09:28:14 +0000 Subject: [PATCH] Regenerate client from commit aa8cef7 of spec repo --- .generator/schemas/v2/openapi.yaml | 4356 +++++ .../v2/incidents/PatchIncidentImpact.java | 47 + .../v2/incidents/UpdateIncidentImpact.java | 47 + .../com/datadog/api/client/ApiClient.java | 37 + .../api/client/v2/api/IncidentsApi.java | 15900 +++++++++++----- ...entAIPostmortemDataAttributesResponse.java | 315 + .../IncidentAIPostmortemDataResponse.java | 214 + .../model/IncidentAIPostmortemResponse.java | 147 + .../IncidentAIPostmortemResponseType.java | 58 + ...entConfigurationDataAttributesRequest.java | 240 + ...ntConfigurationDataAttributesResponse.java | 336 + .../IncidentConfigurationDataRequest.java | 181 + .../IncidentConfigurationDataResponse.java | 242 + ...nfigurationPatchDataAttributesRequest.java | 243 + ...IncidentConfigurationPatchDataRequest.java | 210 + .../IncidentConfigurationPatchRequest.java | 148 + .../IncidentConfigurationRelationships.java | 170 + .../model/IncidentConfigurationRequest.java | 147 + .../model/IncidentConfigurationResponse.java | 168 + .../v2/model/IncidentConfigurationType.java | 57 + ...CreateOnCallPageDataAttributesRequest.java | 297 + .../IncidentCreateOnCallPageDataRequest.java | 185 + .../IncidentCreateOnCallPageRequest.java | 148 + ...PageFromIncidentDataAttributesRequest.java | 332 + ...dentCreatePageFromIncidentDataRequest.java | 186 + ...IncidentCreatePageFromIncidentRequest.java | 149 + .../IncidentCreatePageFromIncidentType.java | 58 + ...hatConfigurationDataAttributesRequest.java | 249 + ...atConfigurationDataAttributesResponse.java | 315 + ...entGoogleChatConfigurationDataRequest.java | 220 + ...ntGoogleChatConfigurationDataResponse.java | 247 + ...nfigurationPatchDataAttributesRequest.java | 239 + ...ogleChatConfigurationPatchDataRequest.java | 216 + ...ntGoogleChatConfigurationPatchRequest.java | 151 + ...tGoogleChatConfigurationRelationships.java | 205 + ...ChatConfigurationRelationshipsRequest.java | 157 + ...ncidentGoogleChatConfigurationRequest.java | 149 + ...cidentGoogleChatConfigurationResponse.java | 171 + .../IncidentGoogleChatConfigurationType.java | 59 + ...eetConfigurationDataAttributesRequest.java | 188 + ...etConfigurationDataAttributesResponse.java | 249 + ...entGoogleMeetConfigurationDataRequest.java | 220 + ...ntGoogleMeetConfigurationDataResponse.java | 247 + ...nfigurationPatchDataAttributesRequest.java | 182 + ...ogleMeetConfigurationPatchDataRequest.java | 216 + ...ntGoogleMeetConfigurationPatchRequest.java | 151 + ...tGoogleMeetConfigurationRelationships.java | 205 + ...MeetConfigurationRelationshipsRequest.java | 157 + ...ncidentGoogleMeetConfigurationRequest.java | 149 + ...cidentGoogleMeetConfigurationResponse.java | 171 + .../IncidentGoogleMeetConfigurationType.java | 59 + .../v2/model/IncidentImpactFieldChoice.java | 201 + ...identImpactFieldDataAttributesRequest.java | 292 + ...dentImpactFieldDataAttributesResponse.java | 292 + .../model/IncidentImpactFieldDataRequest.java | 216 + .../IncidentImpactFieldDataResponse.java | 242 + .../IncidentImpactFieldRelationships.java | 198 + ...cidentImpactFieldRelationshipsRequest.java | 150 + .../v2/model/IncidentImpactFieldRequest.java | 147 + .../v2/model/IncidentImpactFieldResponse.java | 168 + .../v2/model/IncidentImpactFieldType.java | 57 + .../model/IncidentImpactFieldValueType.java | 70 + .../model/IncidentImpactFieldsResponse.java | 176 + ...cidentOnCallPageDataAttributesRequest.java | 195 + .../model/IncidentOnCallPageDataRequest.java | 208 + .../model/IncidentOnCallPageLinkRequest.java | 147 + .../v2/model/IncidentOnCallPageTarget.java | 173 + .../v2/model/IncidentOnCallPageType.java | 55 + ...dentOrgSettingsDataAttributesResponse.java | 211 + .../IncidentOrgSettingsDataResponse.java | 242 + .../IncidentOrgSettingsListResponse.java | 157 + .../IncidentOrgSettingsRelationships.java | 138 + .../v2/model/IncidentOrgSettingsResponse.java | 147 + .../v2/model/IncidentOrgSettingsType.java | 57 + .../v2/model/IncidentPageRoleReference.java | 180 + .../client/v2/model/IncidentPageRoleType.java | 58 + .../client/v2/model/IncidentPageTarget.java | 178 + .../v2/model/IncidentPageTargetType.java | 59 + .../model/IncidentPageUUIDDataResponse.java | 180 + .../v2/model/IncidentPageUUIDResponse.java | 146 + .../client/v2/model/IncidentPageUUIDType.java | 54 + ...cidentResponderDataAttributesResponse.java | 375 + .../model/IncidentResponderDataRequest.java | 183 + .../model/IncidentResponderDataResponse.java | 240 + .../model/IncidentResponderRelationships.java | 236 + ...IncidentResponderRelationshipsRequest.java | 148 + .../v2/model/IncidentResponderRequest.java | 146 + .../v2/model/IncidentResponderResponse.java | 168 + ...sponderRoleAssignmentRelationshipData.java | 179 + ...tResponderRoleAssignmentsRelationship.java | 155 + .../v2/model/IncidentResponderType.java | 56 + .../IncidentResponderUserRelationship.java | 148 + ...IncidentResponderUserRelationshipData.java | 176 + .../v2/model/IncidentRespondersResponse.java | 176 + .../v2/model/IncidentRuleCondition.java | 180 + .../IncidentRuleDataAttributesRequest.java | 453 + .../IncidentRuleDataAttributesResponse.java | 629 + .../v2/model/IncidentRuleDataRequest.java | 181 + .../v2/model/IncidentRuleDataResponse.java | 210 + .../v2/model/IncidentRuleExecutionType.java | 57 + ...ncidentRulePatchDataAttributesRequest.java | 267 + .../model/IncidentRulePatchDataRequest.java | 209 + .../v2/model/IncidentRulePatchRequest.java | 146 + .../v2/model/IncidentRuleQueryCondition.java | 186 + .../client/v2/model/IncidentRuleRequest.java | 145 + .../client/v2/model/IncidentRuleResponse.java | 145 + .../v2/model/IncidentRuleResponseType.java | 57 + .../v2/model/IncidentRuleTaskIDType.java | 92 + .../v2/model/IncidentRuleTriggerType.java | 63 + .../api/client/v2/model/IncidentRuleType.java | 54 + .../v2/model/IncidentRulesResponse.java | 155 + ...ServiceNowRecordDataAttributesRequest.java | 242 + .../IncidentServiceNowRecordDataRequest.java | 185 + .../IncidentServiceNowRecordPromptType.java | 59 + .../IncidentServiceNowRecordRequest.java | 148 + ...imestampOverrideDataAttributesRequest.java | 189 + ...mestampOverrideDataAttributesResponse.java | 321 + .../IncidentTimestampOverrideDataRequest.java | 185 + ...IncidentTimestampOverrideDataResponse.java | 243 + ...ampOverridePatchDataAttributesRequest.java | 180 + ...dentTimestampOverridePatchDataRequest.java | 212 + ...IncidentTimestampOverridePatchRequest.java | 149 + ...ncidentTimestampOverrideRelationships.java | 170 + .../IncidentTimestampOverrideRequest.java | 148 + .../IncidentTimestampOverrideResponse.java | 169 + .../model/IncidentTimestampOverrideType.java | 57 + .../IncidentTimestampOverridesResponse.java | 178 + .../v2/model/IncidentTimestampType.java | 58 + ...tUserDefinedRoleDataAttributesRequest.java | 219 + ...UserDefinedRoleDataAttributesResponse.java | 277 + .../IncidentUserDefinedRoleDataRequest.java | 216 + .../IncidentUserDefinedRoleDataResponse.java | 242 + ...erDefinedRoleIncidentTypeRelationship.java | 152 + ...finedRoleIncidentTypeRelationshipData.java | 181 + .../IncidentUserDefinedRoleIncludedItem.java | 285 + ...DefinedRolePatchDataAttributesRequest.java | 210 + ...cidentUserDefinedRolePatchDataRequest.java | 211 + .../IncidentUserDefinedRolePatchRequest.java | 148 + .../model/IncidentUserDefinedRolePolicy.java | 144 + ...ntUserDefinedRoleRelationshipsRequest.java | 152 + ...tUserDefinedRoleRelationshipsResponse.java | 205 + .../model/IncidentUserDefinedRoleRequest.java | 148 + .../IncidentUserDefinedRoleResponse.java | 193 + .../v2/model/IncidentUserDefinedRoleType.java | 57 + .../IncidentUserDefinedRolesResponse.java | 201 + .../api/client/v2/api/incidents.feature | 60 + .../com/datadog/api/client/v2/api/undo.json | 12 + 147 files changed, 41356 insertions(+), 4449 deletions(-) create mode 100644 examples/v2/incidents/PatchIncidentImpact.java create mode 100644 examples/v2/incidents/UpdateIncidentImpact.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemResponseType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRelationshipsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRelationshipsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldChoice.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRelationshipsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldValueType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageLinkRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageTarget.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentPageRoleReference.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentPageRoleType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentPageTarget.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentPageTargetType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderRelationshipsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderRoleAssignmentRelationshipData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderRoleAssignmentsRelationship.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderUserRelationship.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentResponderUserRelationshipData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRespondersResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleCondition.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleQueryCondition.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleResponseType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleTaskIDType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleTriggerType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRuleType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentRulesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordPromptType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTimestampType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncidentTypeRelationship.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncidentTypeRelationshipData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncludedItem.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePolicy.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRelationshipsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRelationshipsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolesResponse.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b2e0e022c91..fba8f21df2d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -675,6 +675,22 @@ components: required: true schema: type: string + IncidentGoogleChatConfigurationIDPathParameter: + description: The UUID of the Google Chat configuration. + in: path + name: id + required: true + schema: + format: uuid + type: string + IncidentGoogleMeetConfigurationIDPathParameter: + description: The UUID of the Google Meet configuration. + in: path + name: id + required: true + schema: + format: uuid + type: string IncidentIDPathParameter: description: The UUID of the incident. in: path @@ -682,6 +698,14 @@ components: required: true schema: type: string + IncidentImpactFieldIDPathParameter: + description: The UUID of the impact field. + in: path + name: field_id + required: true + schema: + format: uuid + type: string IncidentImpactIDPathParameter: description: The UUID of the incident impact. in: path @@ -774,6 +798,30 @@ components: schema: example: "created_by_user,incident_type" type: string + IncidentOrgSettingsTypeIDPathParameter: + description: The UUID of the incident type. + in: path + name: incident_type_id + required: true + schema: + format: uuid + type: string + IncidentResponderIDPathParameter: + description: The UUID of the incident responder. + in: path + name: responder_id + required: true + schema: + format: uuid + type: string + IncidentRuleIDPathParameter: + description: The UUID of the incident rule. + in: path + name: rule_id + required: true + schema: + format: uuid + type: string IncidentSearchIncludeQueryParameter: description: Specifies which types of related objects should be included in the response. in: query @@ -822,6 +870,14 @@ components: schema: example: "ExampleServiceName" type: string + IncidentTimestampOverrideIDPathParameter: + description: The UUID of the timestamp override. + in: path + name: id + required: true + schema: + format: uuid + type: string IncidentTodoIDPathParameter: description: The UUID of the incident todo. in: path @@ -851,6 +907,15 @@ components: schema: example: "00000000-0000-0000-0000-000000000000" type: string + IncidentUserDefinedRoleIDPathParameter: + description: The UUID of the incident user-defined role. + in: path + name: role_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000002" + format: uuid + type: string Include: description: Include relationship data. explode: true @@ -38599,6 +38664,71 @@ components: type: string x-mimetype: application/xml type: object + IncidentAIPostmortemDataAttributesResponse: + description: Attributes of an AI-generated incident postmortem. + properties: + action_items: + description: Action items to prevent recurrence. + example: "1. Improve failover testing. 2. Add more monitoring alerts." + type: string + customer_impact: + description: The impact of the incident on customers. + example: "5% of users experienced timeouts for 30 minutes." + type: string + executive_summary: + description: An executive summary of the incident. + example: "A database failover caused a 30-minute service outage affecting 5% of users." + type: string + key_insights: + description: Key insights from the incident. + example: "The auto-failover mechanism was slower than expected under high load." + type: string + key_timeline: + description: Key timeline events during the incident. + example: "10:00 - Alert fired. 10:05 - On-call engineer paged. 10:30 - Issue resolved." + type: string + lessons_learned: + description: Lessons learned from the incident. + example: "We need to test the failover process under realistic load conditions." + type: string + system_overview: + description: An overview of the affected systems. + example: "The primary database cluster experienced a failover event." + type: string + type: object + IncidentAIPostmortemDataResponse: + description: AI postmortem data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentAIPostmortemDataAttributesResponse" + id: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentAIPostmortemResponseType" + required: + - id + - type + - attributes + type: object + IncidentAIPostmortemResponse: + description: Response with an AI-generated incident postmortem. + properties: + data: + $ref: "#/components/schemas/IncidentAIPostmortemDataResponse" + required: + - data + type: object + IncidentAIPostmortemResponseType: + description: AI postmortem response resource type. + enum: + - get_incident_ai_postmortem_response + example: get_incident_ai_postmortem_response + type: string + x-enum-varnames: + - GET_INCIDENT_AI_POSTMORTEM_RESPONSE IncidentAttachmentType: default: incident_attachments description: The incident attachment resource type. @@ -38608,6 +38738,175 @@ components: type: string x-enum-varnames: - INCIDENT_ATTACHMENTS + IncidentConfigurationDataAttributesRequest: + description: Attributes for creating an incident configuration. + properties: + execute_integrations: + description: Whether to execute integrations for this incident. + example: true + type: boolean + execute_notification_rules: + description: Whether to execute notification rules for this incident. + example: true + type: boolean + include_in_analytics: + description: Whether to include this incident in analytics. + example: true + type: boolean + include_in_search: + description: Whether to include this incident in search results. + example: true + type: boolean + type: object + IncidentConfigurationDataAttributesResponse: + description: Attributes of an incident configuration in a response. + properties: + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + execute_integrations: + description: Whether integrations are executed for this incident. + example: true + type: boolean + execute_notification_rules: + description: Whether notification rules are executed for this incident. + example: true + type: boolean + incident_id: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + type: string + include_in_analytics: + description: Whether this incident is included in analytics. + example: true + type: boolean + include_in_search: + description: Whether this incident is included in search results. + example: true + type: boolean + modified_at: + description: Timestamp when the configuration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + required: + - incident_id + - created_at + - modified_at + type: object + IncidentConfigurationDataRequest: + description: Incident configuration data in a create request. + properties: + attributes: + $ref: "#/components/schemas/IncidentConfigurationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentConfigurationType" + required: + - type + type: object + IncidentConfigurationDataResponse: + description: Incident configuration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentConfigurationDataAttributesResponse" + id: + description: The incident configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentConfigurationRelationships" + type: + $ref: "#/components/schemas/IncidentConfigurationType" + required: + - id + - type + - attributes + type: object + IncidentConfigurationPatchDataAttributesRequest: + description: Attributes for patching an incident configuration. All fields are optional. + properties: + execute_integrations: + description: Whether to execute integrations for this incident. + example: true + type: boolean + execute_notification_rules: + description: Whether to execute notification rules for this incident. + example: true + type: boolean + include_in_analytics: + description: Whether to include this incident in analytics. + example: true + type: boolean + include_in_search: + description: Whether to include this incident in search results. + example: true + type: boolean + type: object + IncidentConfigurationPatchDataRequest: + description: Incident configuration data in a patch request. + properties: + attributes: + $ref: "#/components/schemas/IncidentConfigurationPatchDataAttributesRequest" + id: + description: The incident configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentConfigurationType" + required: + - id + - type + type: object + IncidentConfigurationPatchRequest: + description: Request payload for patching an incident configuration. + properties: + data: + $ref: "#/components/schemas/IncidentConfigurationPatchDataRequest" + required: + - data + type: object + IncidentConfigurationRelationships: + description: Relationships for an incident configuration. + properties: + created_by_user: + $ref: "#/components/schemas/RelationshipToUser" + last_modified_by_user: + $ref: "#/components/schemas/RelationshipToUser" + type: object + IncidentConfigurationRequest: + description: Request payload for creating an incident configuration. + properties: + data: + $ref: "#/components/schemas/IncidentConfigurationDataRequest" + required: + - data + type: object + IncidentConfigurationResponse: + description: Response with an incident configuration. + properties: + data: + $ref: "#/components/schemas/IncidentConfigurationDataResponse" + included: + description: Included related resources. + items: + $ref: "#/components/schemas/IncidentUserData" + readOnly: true + type: array + required: + - data + type: object + IncidentConfigurationType: + description: Incident configuration resource type. + enum: + - incidents_configurations + example: incidents_configurations + type: string + x-enum-varnames: + - INCIDENTS_CONFIGURATIONS IncidentCreateAttributes: description: The incident's attributes for a create request. properties: @@ -38665,6 +38964,117 @@ components: - type - attributes type: object + IncidentCreateOnCallPageDataAttributesRequest: + description: Attributes for creating an on-call page from an incident. + properties: + description: + description: The description of the page. + example: A critical incident affecting production systems. + type: string + role: + $ref: "#/components/schemas/IncidentPageRoleReference" + services: + description: List of affected services. + example: + - web-store + items: + type: string + type: array + tags: + description: List of tags for the page. + example: + - env:prod + items: + type: string + type: array + target: + $ref: "#/components/schemas/IncidentPageTarget" + title: + description: The title of the page. + example: Production outage - SEV-1 + type: string + type: object + IncidentCreateOnCallPageDataRequest: + description: On-call page data in a create request. + properties: + attributes: + $ref: "#/components/schemas/IncidentCreateOnCallPageDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentCreatePageFromIncidentType" + required: + - type + - attributes + type: object + IncidentCreateOnCallPageRequest: + description: Request payload for creating an on-call page from an incident. + properties: + data: + $ref: "#/components/schemas/IncidentCreateOnCallPageDataRequest" + required: + - data + type: object + IncidentCreatePageFromIncidentDataAttributesRequest: + description: Attributes for creating a page from an incident. + properties: + description: + description: The description of the page. + example: A critical incident affecting production systems. + type: string + incident_public_id: + description: The public ID of the incident. + example: "12345" + type: string + role: + $ref: "#/components/schemas/IncidentPageRoleReference" + services: + description: List of affected services. + example: + - web-store + - checkout + items: + type: string + type: array + tags: + description: List of tags for the page. + example: + - env:prod + items: + type: string + type: array + target: + $ref: "#/components/schemas/IncidentPageTarget" + title: + description: The title of the page. + example: Production outage - SEV-1 + type: string + type: object + IncidentCreatePageFromIncidentDataRequest: + description: Page data in a create request. + properties: + attributes: + $ref: "#/components/schemas/IncidentCreatePageFromIncidentDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentCreatePageFromIncidentType" + required: + - type + - attributes + type: object + IncidentCreatePageFromIncidentRequest: + description: Request payload for creating a page from an incident. + properties: + data: + $ref: "#/components/schemas/IncidentCreatePageFromIncidentDataRequest" + required: + - data + type: object + IncidentCreatePageFromIncidentType: + description: Resource type for a page creation request. + enum: + - page + example: page + type: string + x-enum-varnames: + - PAGE IncidentCreateRelationships: description: The relationships the incident will have with other resources once created. properties: @@ -38738,6 +39148,351 @@ components: - TEXTARRAY - METRICTAG - AUTOCOMPLETE + IncidentGoogleChatConfigurationDataAttributesRequest: + description: Attributes for creating a Google Chat configuration. + properties: + domain_id: + description: The Google Chat domain ID. + example: my-domain + type: string + space_name_template: + description: The template for the Google Chat space name. + example: "{{incident.title}}" + type: string + space_target_audience_id: + description: The target audience ID for the Google Chat space. + example: "123456789" + type: string + space_time_zone: + description: The time zone for the Google Chat space. + example: America/New_York + type: string + required: + - domain_id + - space_name_template + - space_time_zone + - space_target_audience_id + type: object + IncidentGoogleChatConfigurationDataAttributesResponse: + description: Attributes of a Google Chat configuration. + properties: + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + domain_id: + description: The Google Chat domain ID. + example: my-domain + type: string + modified_at: + description: Timestamp when the configuration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + space_name_template: + description: The template for the Google Chat space name. + example: "{{incident.title}}" + type: string + space_target_audience_id: + description: The target audience ID for the Google Chat space. + example: "123456789" + type: string + space_time_zone: + description: The time zone for the Google Chat space. + example: America/New_York + type: string + required: + - domain_id + - space_name_template + - space_time_zone + - space_target_audience_id + - created_at + - modified_at + type: object + IncidentGoogleChatConfigurationDataRequest: + description: Google Chat configuration data in a create request. + properties: + attributes: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationRelationshipsRequest" + type: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationType" + required: + - type + - attributes + - relationships + type: object + IncidentGoogleChatConfigurationDataResponse: + description: Google Chat configuration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationDataAttributesResponse" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationRelationships" + type: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationType" + required: + - id + - type + - attributes + type: object + IncidentGoogleChatConfigurationPatchDataAttributesRequest: + description: Attributes for patching a Google Chat configuration. All fields are optional. + properties: + domain_id: + description: The Google Chat domain ID. + example: my-domain + type: string + space_name_template: + description: The template for the Google Chat space name. + example: "{{incident.title}}" + type: string + space_target_audience_id: + description: The target audience ID for the Google Chat space. + example: "123456789" + type: string + space_time_zone: + description: The time zone for the Google Chat space. + example: America/New_York + type: string + type: object + IncidentGoogleChatConfigurationPatchDataRequest: + description: Google Chat configuration data in a patch request. + properties: + attributes: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationPatchDataAttributesRequest" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationType" + required: + - id + - type + type: object + IncidentGoogleChatConfigurationPatchRequest: + description: Request payload for patching a Google Chat configuration. + properties: + data: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationPatchDataRequest" + required: + - data + type: object + IncidentGoogleChatConfigurationRelationships: + description: Relationships for a Google Chat configuration. + properties: + created_by_user: + $ref: "#/components/schemas/RelationshipToUser" + incident_type: + $ref: "#/components/schemas/RelationshipToIncidentType" + last_modified_by_user: + $ref: "#/components/schemas/RelationshipToUser" + type: object + IncidentGoogleChatConfigurationRelationshipsRequest: + description: Relationships for a Google Chat configuration create request. + properties: + incident_type: + $ref: "#/components/schemas/RelationshipToIncidentType" + required: + - incident_type + type: object + IncidentGoogleChatConfigurationRequest: + description: Request payload for creating a Google Chat configuration. + properties: + data: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationDataRequest" + required: + - data + type: object + IncidentGoogleChatConfigurationResponse: + description: Response with a Google Chat configuration. + properties: + data: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationDataResponse" + included: + description: Included related resources. + items: + $ref: "#/components/schemas/IncidentUserData" + readOnly: true + type: array + required: + - data + type: object + IncidentGoogleChatConfigurationType: + description: Google Chat configuration resource type. + enum: + - google_chat_configurations + example: google_chat_configurations + type: string + x-enum-varnames: + - GOOGLE_CHAT_CONFIGURATIONS + IncidentGoogleMeetConfigurationDataAttributesRequest: + description: Attributes for creating a Google Meet configuration. + properties: + allow_manual_meeting_creation: + description: Whether to allow manual meeting creation. + example: true + type: boolean + auto_summarize: + description: Whether to auto-summarize meetings. + example: false + type: boolean + required: + - allow_manual_meeting_creation + - auto_summarize + type: object + IncidentGoogleMeetConfigurationDataAttributesResponse: + description: Attributes of a Google Meet configuration. + properties: + allow_manual_meeting_creation: + description: Whether manual meeting creation is allowed. + example: true + type: boolean + auto_summarize: + description: Whether meetings are auto-summarized. + example: false + type: boolean + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + modified_at: + description: Timestamp when the configuration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + required: + - allow_manual_meeting_creation + - auto_summarize + - modified_at + type: object + IncidentGoogleMeetConfigurationDataRequest: + description: Google Meet configuration data in a create request. + properties: + attributes: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationRelationshipsRequest" + type: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationType" + required: + - type + - attributes + - relationships + type: object + IncidentGoogleMeetConfigurationDataResponse: + description: Google Meet configuration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationDataAttributesResponse" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationRelationships" + type: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationType" + required: + - id + - type + - attributes + type: object + IncidentGoogleMeetConfigurationPatchDataAttributesRequest: + description: Attributes for patching a Google Meet configuration. All fields are optional. + properties: + allow_manual_meeting_creation: + description: Whether to allow manual meeting creation. + example: true + type: boolean + auto_summarize: + description: Whether to auto-summarize meetings. + example: false + type: boolean + type: object + IncidentGoogleMeetConfigurationPatchDataRequest: + description: Google Meet configuration data in a patch request. + properties: + attributes: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationPatchDataAttributesRequest" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationType" + required: + - id + - type + type: object + IncidentGoogleMeetConfigurationPatchRequest: + description: Request payload for patching a Google Meet configuration. + properties: + data: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationPatchDataRequest" + required: + - data + type: object + IncidentGoogleMeetConfigurationRelationships: + description: Relationships for a Google Meet configuration. + properties: + created_by_user: + $ref: "#/components/schemas/RelationshipToUser" + incident_type: + $ref: "#/components/schemas/RelationshipToIncidentType" + last_modified_by_user: + $ref: "#/components/schemas/RelationshipToUser" + type: object + IncidentGoogleMeetConfigurationRelationshipsRequest: + description: Relationships for a Google Meet configuration create request. + properties: + incident_type: + $ref: "#/components/schemas/RelationshipToIncidentType" + required: + - incident_type + type: object + IncidentGoogleMeetConfigurationRequest: + description: Request payload for creating a Google Meet configuration. + properties: + data: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationDataRequest" + required: + - data + type: object + IncidentGoogleMeetConfigurationResponse: + description: Response with a Google Meet configuration. + properties: + data: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationDataResponse" + included: + description: Included related resources. + items: + $ref: "#/components/schemas/IncidentUserData" + readOnly: true + type: array + required: + - data + type: object + IncidentGoogleMeetConfigurationType: + description: Google Meet configuration resource type. + enum: + - google_meet_configurations + example: google_meet_configurations + type: string + x-enum-varnames: + - GOOGLE_MEET_CONFIGURATIONS IncidentHandleAttributesFields: description: Dynamic fields associated with the handle example: @@ -39015,12 +39770,205 @@ components: required: - data type: object + IncidentImpactFieldChoice: + description: A choice option for a dropdown or multiselect impact field. + properties: + description: + description: The description of the choice. + example: Affects all customers + type: string + display_name: + description: The display name of the choice. + example: Critical + type: string + value: + description: The value of the choice. + example: critical + type: string + required: + - value + - display_name + type: object + IncidentImpactFieldDataAttributesRequest: + description: Attributes for creating an impact field. + properties: + display_name: + description: The display name of the impact field. + example: Customer Impact Scope + type: string + field_choices: + description: The choices for dropdown or multiselect fields. + items: + $ref: "#/components/schemas/IncidentImpactFieldChoice" + type: array + field_type: + $ref: "#/components/schemas/IncidentImpactFieldValueType" + name: + description: The normalized name of the impact field (used as identifier). + example: customer_impact_scope + type: string + tag_key: + description: The tag key associated with the field (for metrictag type). + example: env + nullable: true + type: string + required: + - name + - display_name + - field_type + type: object + IncidentImpactFieldDataAttributesResponse: + description: Attributes of an impact field in a response. + properties: + display_name: + description: The display name of the impact field. + example: Customer Impact Scope + type: string + field_choices: + description: The choices for dropdown or multiselect fields. + items: + $ref: "#/components/schemas/IncidentImpactFieldChoice" + type: array + field_type: + $ref: "#/components/schemas/IncidentImpactFieldValueType" + name: + description: The normalized name of the impact field. + example: customer_impact_scope + type: string + tag_key: + description: The tag key associated with the field. + example: env + nullable: true + type: string + required: + - name + - display_name + - field_type + type: object + IncidentImpactFieldDataRequest: + description: Impact field data in a create request. + properties: + attributes: + $ref: "#/components/schemas/IncidentImpactFieldDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentImpactFieldRelationshipsRequest" + type: + $ref: "#/components/schemas/IncidentImpactFieldType" + required: + - type + - attributes + - relationships + type: object + IncidentImpactFieldDataResponse: + description: Impact field data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentImpactFieldDataAttributesResponse" + id: + description: The impact field identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentImpactFieldRelationships" + type: + $ref: "#/components/schemas/IncidentImpactFieldType" + required: + - id + - type + - attributes + type: object + IncidentImpactFieldRelationships: + description: Relationships for an impact field. + properties: + created_by_user: + $ref: "#/components/schemas/RelationshipToUser" + incident_type: + $ref: "#/components/schemas/RelationshipToIncidentType" + last_modified_by_user: + $ref: "#/components/schemas/RelationshipToUser" + type: object + IncidentImpactFieldRelationshipsRequest: + description: Relationships for an impact field create request. + properties: + incident_type: + $ref: "#/components/schemas/RelationshipToIncidentType" + required: + - incident_type + type: object + IncidentImpactFieldRequest: + description: Request payload for creating an impact field. + properties: + data: + $ref: "#/components/schemas/IncidentImpactFieldDataRequest" + required: + - data + type: object + IncidentImpactFieldResponse: + description: Response with a single impact field. + properties: + data: + $ref: "#/components/schemas/IncidentImpactFieldDataResponse" + included: + description: Included related resources. + items: + $ref: "#/components/schemas/IncidentUserData" + readOnly: true + type: array + required: + - data + type: object + IncidentImpactFieldType: + description: Impact field resource type. + enum: + - impact_fields + example: impact_fields + type: string + x-enum-varnames: + - IMPACT_FIELDS + IncidentImpactFieldValueType: + description: The type of an impact field. + enum: + - dropdown + - text + - textarray + - metrictag + - number + - datetime + - multiselect + example: dropdown + type: string + x-enum-varnames: + - DROPDOWN + - TEXT + - TEXTARRAY + - METRICTAG + - NUMBER + - DATETIME + - MULTISELECT IncidentImpactFieldsObject: additionalProperties: {} description: An object mapping impact field names to field values. example: {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]} nullable: true type: object + IncidentImpactFieldsResponse: + description: Response with a list of impact fields. + properties: + data: + description: List of impact fields. + items: + $ref: "#/components/schemas/IncidentImpactFieldDataResponse" + type: array + included: + description: Included related resources. + items: + $ref: "#/components/schemas/IncidentUserData" + readOnly: true + type: array + required: + - data + type: object IncidentImpactRelatedObject: description: A reference to a resource related to an incident impact. enum: @@ -40074,6 +41022,226 @@ components: - id - type type: object + IncidentOnCallPageDataAttributesRequest: + description: Attributes for linking a page to an incident. + properties: + key: + description: The key of the on-call page. + example: PAGE-12345 + type: string + page_target: + $ref: "#/components/schemas/IncidentOnCallPageTarget" + team_id: + description: The team ID associated with the page (deprecated, use page_target instead). + example: team-abc-123 + type: string + type: object + IncidentOnCallPageDataRequest: + description: On-call page data in a link request. + properties: + attributes: + $ref: "#/components/schemas/IncidentOnCallPageDataAttributesRequest" + id: + description: The ID of the on-call page to link. + example: PAGE-12345 + type: string + type: + $ref: "#/components/schemas/IncidentOnCallPageType" + required: + - id + - type + type: object + IncidentOnCallPageLinkRequest: + description: Request payload for linking an on-call page to an incident. + properties: + data: + $ref: "#/components/schemas/IncidentOnCallPageDataRequest" + required: + - data + type: object + IncidentOnCallPageTarget: + description: The target of an on-call page. + properties: + identifier: + description: The identifier of the page target. + example: my-oncall-team + type: string + type: + description: The type of the page target. + example: team_handle + type: string + required: + - type + - identifier + type: object + IncidentOnCallPageType: + description: On-call page resource type. + enum: + - page + example: page + type: string + x-enum-varnames: + - PAGE + IncidentOrgSettingsDataAttributesResponse: + description: Attributes of an incident org settings resource in a response. + properties: + created: + description: Timestamp when the settings were created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + modified: + description: Timestamp when the settings were last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + settings: + $ref: "#/components/schemas/IncidentOrgSettingsMeta" + required: + - created + - modified + - settings + type: object + IncidentOrgSettingsDataResponse: + description: Incident org settings data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentOrgSettingsDataAttributesResponse" + id: + description: The org settings identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentOrgSettingsRelationships" + type: + $ref: "#/components/schemas/IncidentOrgSettingsType" + required: + - id + - type + - attributes + type: object + IncidentOrgSettingsListResponse: + description: Response with a list of incident org settings resources. + properties: + data: + description: List of incident org settings resources. + items: + $ref: "#/components/schemas/IncidentOrgSettingsDataResponse" + type: array + required: + - data + type: object + IncidentOrgSettingsMeta: + additionalProperties: {} + description: The settings configuration for an incident org settings resource. + example: + allow_anonymous_incident_declaration: false + allow_guest_incident_declaration: false + pagerduty_paging: true + private_incidents_by_default: false + type: object + IncidentOrgSettingsRelationships: + description: Relationships for an incident org settings resource. + properties: + incident_type: + $ref: "#/components/schemas/RelationshipToIncidentType" + type: object + IncidentOrgSettingsResponse: + description: Response with a single incident org settings resource. + properties: + data: + $ref: "#/components/schemas/IncidentOrgSettingsDataResponse" + required: + - data + type: object + IncidentOrgSettingsType: + description: Incident org settings resource type. + enum: + - incident_org_settings + example: incident_org_settings + type: string + x-enum-varnames: + - INCIDENT_ORG_SETTINGS + IncidentPageRoleReference: + description: A reference to an incident role for a page. + properties: + id: + description: The role identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentPageRoleType" + required: + - type + - id + type: object + IncidentPageRoleType: + description: The type of incident role for a page. + enum: + - incident_user_defined_roles + - incident_reserved_roles + example: incident_user_defined_roles + type: string + x-enum-varnames: + - INCIDENT_USER_DEFINED_ROLES + - INCIDENT_RESERVED_ROLES + IncidentPageTarget: + description: The target recipient for a page. + properties: + identifier: + description: The identifier of the target (handle, UUID, or user UUID). + example: my-team-handle + type: string + type: + $ref: "#/components/schemas/IncidentPageTargetType" + required: + - type + - identifier + type: object + IncidentPageTargetType: + description: The type of target for a page request. + enum: + - team_handle + - team_uuid + - user_uuid + example: team_uuid + type: string + x-enum-varnames: + - TEAM_HANDLE + - TEAM_UUID + - USER_UUID + IncidentPageUUIDDataResponse: + description: Page UUID data in a response. + properties: + id: + description: The UUID of the created page. + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentPageUUIDType" + required: + - id + - type + type: object + IncidentPageUUIDResponse: + description: Response with a page UUID. + properties: + data: + $ref: "#/components/schemas/IncidentPageUUIDDataResponse" + required: + - data + type: object + IncidentPageUUIDType: + description: Resource type for a page UUID response. + enum: + - page_uuid + example: page_uuid + type: string + x-enum-varnames: + - PAGE_UUID IncidentPostmortemType: default: incident_postmortems description: Incident postmortem resource type. @@ -40113,6 +41281,195 @@ components: type: string x-enum-varnames: - INCIDENTS + IncidentResponderDataAttributesResponse: + description: Attributes of an incident responder in a response. + properties: + created: + description: Timestamp when the responder was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + external_id: + description: The external ID of the responder. + example: + nullable: true + type: string + external_source: + description: The external source of the responder. + example: + nullable: true + type: string + is_billable: + description: Whether this responder counts toward billing. + example: true + type: boolean + last_active: + description: Timestamp when the responder was last active. + example: "2024-01-01T00:00:00.000Z" + format: date-time + nullable: true + type: string + meta: + additionalProperties: {} + description: Additional metadata for the responder. + nullable: true + type: object + modified: + description: Timestamp when the responder was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + required: + - created + - modified + - is_billable + type: object + IncidentResponderDataRequest: + description: Incident responder data in a create request. + properties: + relationships: + $ref: "#/components/schemas/IncidentResponderRelationshipsRequest" + type: + $ref: "#/components/schemas/IncidentResponderType" + required: + - type + - relationships + type: object + IncidentResponderDataResponse: + description: Incident responder data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentResponderDataAttributesResponse" + id: + description: The responder identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentResponderRelationships" + type: + $ref: "#/components/schemas/IncidentResponderType" + required: + - id + - type + - attributes + type: object + IncidentResponderRelationships: + description: Relationships for an incident responder. + properties: + created_by: + $ref: "#/components/schemas/RelationshipToUser" + last_modified_by: + $ref: "#/components/schemas/RelationshipToUser" + role_assignments: + $ref: "#/components/schemas/IncidentResponderRoleAssignmentsRelationship" + user: + $ref: "#/components/schemas/NullableRelationshipToUser" + type: object + IncidentResponderRelationshipsRequest: + description: Relationships for creating an incident responder. + properties: + user: + $ref: "#/components/schemas/IncidentResponderUserRelationship" + required: + - user + type: object + IncidentResponderRequest: + description: Request payload for creating an incident responder. + properties: + data: + $ref: "#/components/schemas/IncidentResponderDataRequest" + required: + - data + type: object + IncidentResponderResponse: + description: Response with a single incident responder. + properties: + data: + $ref: "#/components/schemas/IncidentResponderDataResponse" + included: + description: Included related resources. + items: + $ref: "#/components/schemas/IncidentUserData" + readOnly: true + type: array + required: + - data + type: object + IncidentResponderRoleAssignmentRelationshipData: + description: A single role assignment relationship data object. + properties: + id: + description: The role assignment identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The role assignment resource type. + example: incident_role_assignments + type: string + required: + - id + - type + type: object + IncidentResponderRoleAssignmentsRelationship: + description: Relationship to role assignments for a responder. + properties: + data: + description: List of role assignment relationship data. + items: + $ref: "#/components/schemas/IncidentResponderRoleAssignmentRelationshipData" + type: array + type: object + IncidentResponderType: + description: Incident responder resource type. + enum: + - incident_responders + example: incident_responders + type: string + x-enum-varnames: + - INCIDENT_RESPONDERS + IncidentResponderUserRelationship: + description: Relationship to a user for a responder create request. + properties: + data: + $ref: "#/components/schemas/IncidentResponderUserRelationshipData" + required: + - data + type: object + IncidentResponderUserRelationshipData: + description: A user relationship data object for creating a responder. + properties: + id: + description: The user identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The user resource type. + example: users + type: string + required: + - id + - type + type: object + IncidentRespondersResponse: + description: Response with a list of incident responders. + properties: + data: + description: List of incident responders. + items: + $ref: "#/components/schemas/IncidentResponderDataResponse" + type: array + included: + description: Included related resources. + items: + $ref: "#/components/schemas/IncidentUserData" + readOnly: true + type: array + required: + - data + type: object IncidentRespondersType: description: The incident responders type. enum: @@ -40348,6 +41705,332 @@ components: user_defined_fields: $ref: "#/components/schemas/RelationshipToIncidentUserDefinedFields" type: object + IncidentRuleCondition: + description: A condition for an incident rule. + properties: + field: + description: The field to match on. + example: severity + type: string + values: + description: The values to match. + example: + - SEV-1 + - SEV-2 + items: + type: string + type: array + required: + - field + - values + type: object + IncidentRuleDataAttributesRequest: + description: Attributes for creating an incident rule. + properties: + condition: + $ref: "#/components/schemas/IncidentRuleQueryCondition" + condition_table_type: + description: "The condition table type. 1 = raw query." + example: 1 + type: integer + conditions: + description: List of field-based conditions. + items: + $ref: "#/components/schemas/IncidentRuleCondition" + type: array + enabled: + description: Whether the rule is enabled. + example: true + type: boolean + execution_type: + $ref: "#/components/schemas/IncidentRuleExecutionType" + incident_type_uuid: + description: The UUID of the incident type this rule applies to. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + nullable: true + type: string + match_any_condition: + description: Whether any condition (OR logic) should match instead of all (AND logic). + example: false + type: boolean + task_id: + $ref: "#/components/schemas/IncidentRuleTaskIDType" + task_payload: + description: The JSON-encoded payload for the task. + example: "{}" + type: string + trigger: + $ref: "#/components/schemas/IncidentRuleTriggerType" + required: + - execution_type + - condition_table_type + - condition + - task_id + - task_payload + - enabled + type: object + IncidentRuleDataAttributesResponse: + description: Attributes of an incident rule in a response. + properties: + condition: + $ref: "#/components/schemas/IncidentRuleQueryCondition" + condition_table_type: + description: The condition table type. + example: 1 + type: integer + conditions: + description: List of field-based conditions. + items: + $ref: "#/components/schemas/IncidentRuleCondition" + type: array + created: + description: Timestamp when the rule was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + created_by_uuid: + description: UUID of the user who created the rule. + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + deleted: + description: Timestamp when the rule was deleted. + example: + format: date-time + nullable: true + type: string + enabled: + description: Whether the rule is enabled. + example: true + type: boolean + execution_type: + description: The execution type of the rule. + example: 1 + type: integer + incident_settings_association_uuid: + description: The incident settings association UUID. + example: + format: uuid + nullable: true + type: string + match_any_condition: + description: Whether any condition should match. + example: false + type: boolean + modified: + description: Timestamp when the rule was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + modified_by_uuid: + description: UUID of the user who last modified the rule. + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + org_id: + description: The organization ID. + example: 123456 + format: int64 + type: integer + task_id: + description: The task ID. + example: notify-incident-handles-job + nullable: true + type: string + task_payload: + description: The JSON-encoded task payload. + example: "{}" + nullable: true + type: string + trigger: + description: The trigger event for the rule. + example: incident_created_trigger + type: string + type: object + IncidentRuleDataRequest: + description: Incident rule data in a create request. + properties: + attributes: + $ref: "#/components/schemas/IncidentRuleDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentRuleType" + required: + - type + - attributes + type: object + IncidentRuleDataResponse: + description: Incident rule data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentRuleDataAttributesResponse" + id: + description: The rule identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentRuleResponseType" + required: + - id + - type + - attributes + type: object + IncidentRuleExecutionType: + description: The execution type of an incident rule. + enum: + - 1 + - 2 + example: 1 + format: int64 + type: integer + x-enum-varnames: + - SINGLE_EXECUTION + - MULTI_EXECUTION + IncidentRulePatchDataAttributesRequest: + description: Attributes for patching an incident rule. All fields are optional. + properties: + condition: + $ref: "#/components/schemas/IncidentRuleQueryCondition" + conditions: + description: List of field-based conditions. + items: + $ref: "#/components/schemas/IncidentRuleCondition" + type: array + enabled: + description: Whether the rule is enabled. + example: true + type: boolean + task_payload: + description: The JSON-encoded payload for the task. + example: "{}" + type: string + trigger: + $ref: "#/components/schemas/IncidentRuleTriggerType" + type: object + IncidentRulePatchDataRequest: + description: Incident rule data in a patch request. + properties: + attributes: + $ref: "#/components/schemas/IncidentRulePatchDataAttributesRequest" + id: + description: The rule identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentRuleType" + required: + - id + - type + type: object + IncidentRulePatchRequest: + description: Request payload for patching an incident rule. + properties: + data: + $ref: "#/components/schemas/IncidentRulePatchDataRequest" + required: + - data + type: object + IncidentRuleQueryCondition: + description: A query-based condition for an incident rule. + properties: + normalized_query: + description: The normalized query string. + example: "severity:SEV-1" + nullable: true + type: string + raw_query: + description: The raw query string. + example: "severity:SEV-1" + nullable: true + type: string + type: object + IncidentRuleRequest: + description: Request payload for creating an incident rule. + properties: + data: + $ref: "#/components/schemas/IncidentRuleDataRequest" + required: + - data + type: object + IncidentRuleResponse: + description: Response with a single incident rule. + properties: + data: + $ref: "#/components/schemas/IncidentRuleDataResponse" + required: + - data + type: object + IncidentRuleResponseType: + description: Incident rule response resource type. + enum: + - incidents_rules + example: incidents_rules + type: string + x-enum-varnames: + - INCIDENTS_RULES + IncidentRuleTaskIDType: + description: The task ID for an incident rule. + enum: + - jira-create-issue-job + - notify-incident-handles-job + - servicenow-create-incident-job + - slack-create-channel-job + - zoom-create-meeting-job + - google-meet-create-meeting-job + - workflow-automation-job + - ms-teams-create-meeting-job + - google-chat-create-space-job + - zoom-suppress-summarization-job + - ms-teams-suppress-summarization-job + - google-meet-suppress-summarization-job + example: notify-incident-handles-job + type: string + x-enum-varnames: + - JIRA_CREATE_ISSUE_JOB + - NOTIFY_INCIDENT_HANDLES_JOB + - SERVICENOW_CREATE_INCIDENT_JOB + - SLACK_CREATE_CHANNEL_JOB + - ZOOM_CREATE_MEETING_JOB + - GOOGLE_MEET_CREATE_MEETING_JOB + - WORKFLOW_AUTOMATION_JOB + - MS_TEAMS_CREATE_MEETING_JOB + - GOOGLE_CHAT_CREATE_SPACE_JOB + - ZOOM_SUPPRESS_SUMMARIZATION_JOB + - MS_TEAMS_SUPPRESS_SUMMARIZATION_JOB + - GOOGLE_MEET_SUPPRESS_SUMMARIZATION_JOB + IncidentRuleTriggerType: + description: The trigger event for an incident rule. + enum: + - incident_saved_trigger + - incident_created_trigger + - incident_modified_trigger + example: incident_created_trigger + type: string + x-enum-varnames: + - INCIDENT_SAVED_TRIGGER + - INCIDENT_CREATED_TRIGGER + - INCIDENT_MODIFIED_TRIGGER + IncidentRuleType: + description: Incident rule resource type. + enum: + - incident_rules + example: incident_rules + type: string + x-enum-varnames: + - INCIDENT_RULES + IncidentRulesResponse: + description: Response with a list of incident rules. + properties: + data: + description: List of incident rules. + items: + $ref: "#/components/schemas/IncidentRuleDataResponse" + type: array + required: + - data + type: object IncidentSearchResponse: description: Response with incidents and facets. properties: @@ -40604,6 +42287,57 @@ components: description: An object related to an incident service which is present in the included payload. oneOf: - $ref: "#/components/schemas/User" + IncidentServiceNowRecordDataAttributesRequest: + description: Attributes for creating a ServiceNow record for an incident. + properties: + assignment_group: + description: The ServiceNow assignment group. + example: IT Support + type: string + configuration_item_mapping: + description: The ServiceNow configuration item mapping. + example: my-service + type: string + instance_name: + description: The ServiceNow instance name. + example: my-instance + type: string + record_id: + description: An existing ServiceNow record ID (Sys ID) to link instead of creating a new record. + example: abc123def456 + type: string + required: + - instance_name + - assignment_group + - configuration_item_mapping + type: object + IncidentServiceNowRecordDataRequest: + description: ServiceNow record data in a create request. + properties: + attributes: + $ref: "#/components/schemas/IncidentServiceNowRecordDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentServiceNowRecordPromptType" + required: + - type + - attributes + type: object + IncidentServiceNowRecordPromptType: + description: ServiceNow record prompt resource type. + enum: + - incident_servicenow_record_prompt + example: incident_servicenow_record_prompt + type: string + x-enum-varnames: + - INCIDENT_SERVICENOW_RECORD_PROMPT + IncidentServiceNowRecordRequest: + description: Request payload for creating a ServiceNow record for an incident. + properties: + data: + $ref: "#/components/schemas/IncidentServiceNowRecordDataRequest" + required: + - data + type: object IncidentServiceRelationships: description: The incident service's relationships. properties: @@ -40783,6 +42517,191 @@ components: nullable: false type: string type: object + IncidentTimestampOverrideDataAttributesRequest: + description: Attributes for creating a timestamp override. + properties: + timestamp_type: + $ref: "#/components/schemas/IncidentTimestampType" + timestamp_value: + description: The overridden timestamp value. + example: "2024-01-01T10:00:00.000Z" + format: date-time + type: string + required: + - timestamp_type + - timestamp_value + type: object + IncidentTimestampOverrideDataAttributesResponse: + description: Attributes of a timestamp override in a response. + properties: + created_at: + description: Timestamp when the override was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + deleted_at: + description: Timestamp when the override was deleted. + example: + format: date-time + nullable: true + type: string + incident_id: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + type: string + modified_at: + description: Timestamp when the override was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + timestamp_type: + $ref: "#/components/schemas/IncidentTimestampType" + timestamp_value: + description: The overridden timestamp value. + example: "2024-01-01T10:00:00.000Z" + format: date-time + type: string + required: + - incident_id + - timestamp_type + - timestamp_value + - created_at + - modified_at + type: object + IncidentTimestampOverrideDataRequest: + description: Timestamp override data in a create request. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimestampOverrideDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentTimestampOverrideType" + required: + - type + - attributes + type: object + IncidentTimestampOverrideDataResponse: + description: Timestamp override data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimestampOverrideDataAttributesResponse" + id: + description: The timestamp override identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentTimestampOverrideRelationships" + type: + $ref: "#/components/schemas/IncidentTimestampOverrideType" + required: + - id + - type + - attributes + type: object + IncidentTimestampOverridePatchDataAttributesRequest: + description: Attributes for patching a timestamp override. All fields are optional. + properties: + timestamp_type: + $ref: "#/components/schemas/IncidentTimestampType" + timestamp_value: + description: The overridden timestamp value. + example: "2024-01-01T10:00:00.000Z" + format: date-time + type: string + type: object + IncidentTimestampOverridePatchDataRequest: + description: Timestamp override data in a patch request. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimestampOverridePatchDataAttributesRequest" + id: + description: The timestamp override identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentTimestampOverrideType" + required: + - id + - type + type: object + IncidentTimestampOverridePatchRequest: + description: Request payload for patching a timestamp override. + properties: + data: + $ref: "#/components/schemas/IncidentTimestampOverridePatchDataRequest" + required: + - data + type: object + IncidentTimestampOverrideRelationships: + description: Relationships for a timestamp override. + properties: + created_by_user: + $ref: "#/components/schemas/RelationshipToUser" + last_modified_by_user: + $ref: "#/components/schemas/RelationshipToUser" + type: object + IncidentTimestampOverrideRequest: + description: Request payload for creating a timestamp override. + properties: + data: + $ref: "#/components/schemas/IncidentTimestampOverrideDataRequest" + required: + - data + type: object + IncidentTimestampOverrideResponse: + description: Response with a single timestamp override. + properties: + data: + $ref: "#/components/schemas/IncidentTimestampOverrideDataResponse" + included: + description: Included related resources. + items: + $ref: "#/components/schemas/IncidentUserData" + readOnly: true + type: array + required: + - data + type: object + IncidentTimestampOverrideType: + description: Incident timestamp override resource type. + enum: + - incidents_timestamp_overrides + example: incidents_timestamp_overrides + type: string + x-enum-varnames: + - INCIDENTS_TIMESTAMP_OVERRIDES + IncidentTimestampOverridesResponse: + description: Response with a list of timestamp overrides. + properties: + data: + description: List of timestamp overrides. + items: + $ref: "#/components/schemas/IncidentTimestampOverrideDataResponse" + type: array + included: + description: Included related resources. + items: + $ref: "#/components/schemas/IncidentUserData" + readOnly: true + type: array + required: + - data + type: object + IncidentTimestampType: + description: The type of timestamp to override. + enum: + - created + - detected + - resolved + - declared + example: detected + type: string + x-enum-varnames: + - CREATED + - DETECTED + - RESOLVED + - DECLARED IncidentTodoAnonymousAssignee: description: Anonymous assignee entity. properties: @@ -41731,6 +43650,229 @@ components: - display_name - value type: object + IncidentUserDefinedRoleDataAttributesRequest: + description: Attributes for creating an incident user-defined role. + properties: + description: + description: A description of the user-defined role. + example: "The technical lead for the incident." + nullable: true + type: string + name: + description: The name of the user-defined role. + example: "Tech Lead" + type: string + policy: + $ref: "#/components/schemas/IncidentUserDefinedRolePolicy" + required: + - name + - policy + type: object + IncidentUserDefinedRoleDataAttributesResponse: + description: Attributes of an incident user-defined role. + properties: + created: + description: Timestamp when the role was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + description: + description: A description of the user-defined role. + example: "The technical lead for the incident." + nullable: true + type: string + modified: + description: Timestamp when the role was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + name: + description: The name of the user-defined role. + example: "Tech Lead" + type: string + policy: + $ref: "#/components/schemas/IncidentUserDefinedRolePolicy" + required: + - name + - policy + - created + - modified + type: object + IncidentUserDefinedRoleDataRequest: + description: Data for creating an incident user-defined role. + properties: + attributes: + $ref: "#/components/schemas/IncidentUserDefinedRoleDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentUserDefinedRoleRelationshipsRequest" + type: + $ref: "#/components/schemas/IncidentUserDefinedRoleType" + required: + - type + - attributes + - relationships + type: object + IncidentUserDefinedRoleDataResponse: + description: Data for an incident user-defined role response. + properties: + attributes: + $ref: "#/components/schemas/IncidentUserDefinedRoleDataAttributesResponse" + id: + description: The ID of the user-defined role. + example: "00000000-0000-0000-0000-000000000002" + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentUserDefinedRoleRelationshipsResponse" + type: + $ref: "#/components/schemas/IncidentUserDefinedRoleType" + required: + - id + - type + - attributes + type: object + IncidentUserDefinedRoleIncidentTypeRelationship: + description: Relationship to an incident type for a user-defined role. + properties: + data: + $ref: "#/components/schemas/IncidentUserDefinedRoleIncidentTypeRelationshipData" + required: + - data + type: object + IncidentUserDefinedRoleIncidentTypeRelationshipData: + description: Data for the incident type relationship of a user-defined role. + properties: + id: + description: The ID of the incident type. + example: "00000000-0000-0000-0000-000000000001" + format: uuid + type: string + type: + description: The type of the resource. + example: "incident_types" + type: string + required: + - id + - type + type: object + IncidentUserDefinedRoleIncludedItem: + description: A single included resource in a user-defined role response. + oneOf: + - $ref: "#/components/schemas/IncidentUserData" + - $ref: "#/components/schemas/IncidentTypeObject" + IncidentUserDefinedRoleIncludedResponse: + description: Included resources for an incident user-defined role response. + items: + $ref: "#/components/schemas/IncidentUserDefinedRoleIncludedItem" + type: array + IncidentUserDefinedRolePatchDataAttributesRequest: + description: Attributes for updating an incident user-defined role. + properties: + description: + description: A description of the user-defined role. + example: "The technical lead for the incident." + nullable: true + type: string + name: + description: The name of the user-defined role. + example: "Tech Lead" + type: string + policy: + $ref: "#/components/schemas/IncidentUserDefinedRolePolicy" + type: object + IncidentUserDefinedRolePatchDataRequest: + description: Data for updating an incident user-defined role. + properties: + attributes: + $ref: "#/components/schemas/IncidentUserDefinedRolePatchDataAttributesRequest" + id: + description: The ID of the user-defined role to update. + example: "00000000-0000-0000-0000-000000000002" + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentUserDefinedRoleType" + required: + - id + - type + type: object + IncidentUserDefinedRolePatchRequest: + description: Request for updating an incident user-defined role. + properties: + data: + $ref: "#/components/schemas/IncidentUserDefinedRolePatchDataRequest" + required: + - data + type: object + IncidentUserDefinedRolePolicy: + description: Policy configuration for a user-defined role. + properties: + is_single: + description: Whether this role can only be assigned to one responder at a time. + example: true + type: boolean + required: + - is_single + type: object + IncidentUserDefinedRoleRelationshipsRequest: + description: Relationships for creating a user-defined role. + properties: + incident_type: + $ref: "#/components/schemas/IncidentUserDefinedRoleIncidentTypeRelationship" + required: + - incident_type + type: object + IncidentUserDefinedRoleRelationshipsResponse: + description: Relationships of a user-defined role response. + properties: + created_by_user: + $ref: "#/components/schemas/RelationshipToUser" + incident_type: + $ref: "#/components/schemas/IncidentUserDefinedRoleIncidentTypeRelationship" + last_modified_by_user: + $ref: "#/components/schemas/RelationshipToUser" + type: object + IncidentUserDefinedRoleRequest: + description: Request for creating an incident user-defined role. + properties: + data: + $ref: "#/components/schemas/IncidentUserDefinedRoleDataRequest" + required: + - data + type: object + IncidentUserDefinedRoleResponse: + description: Response with a single incident user-defined role. + properties: + data: + $ref: "#/components/schemas/IncidentUserDefinedRoleDataResponse" + included: + $ref: "#/components/schemas/IncidentUserDefinedRoleIncludedResponse" + required: + - data + type: object + IncidentUserDefinedRoleType: + description: Incident user-defined role resource type. + enum: + - incident_user_defined_roles + example: incident_user_defined_roles + type: string + x-enum-varnames: + - INCIDENT_USER_DEFINED_ROLES + IncidentUserDefinedRolesDataResponse: + description: List of incident user-defined role data objects. + items: + $ref: "#/components/schemas/IncidentUserDefinedRoleDataResponse" + type: array + IncidentUserDefinedRolesResponse: + description: Response with a list of incident user-defined roles. + properties: + data: + $ref: "#/components/schemas/IncidentUserDefinedRolesDataResponse" + included: + $ref: "#/components/schemas/IncidentUserDefinedRoleIncludedResponse" + required: + - data + type: object IncidentsResponse: description: Response with a list of incidents. properties: @@ -120478,6 +122620,491 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/google-chat-configurations: + post: + description: Create a Google Chat configuration for incidents. + operationId: CreateIncidentGoogleChatConfiguration + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + domain_id: my-domain + space_name_template: "{{incident.title}}" + space_target_audience_id: "123456789" + space_time_zone: America/New_York + relationships: + incident_type: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_types + type: google_chat_configurations + schema: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationRequest" + description: Google Chat configuration payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + domain_id: my-domain + modified_at: "2024-01-01T00:00:00.000Z" + space_name_template: "{{incident.title}}" + space_target_audience_id: "123456789" + space_time_zone: America/New_York + id: 00000000-0000-0000-0000-000000000001 + type: google_chat_configurations + schema: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident Google Chat configuration + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/google-chat-configurations/{id}: + patch: + description: Update a Google Chat configuration for incidents. + operationId: UpdateIncidentGoogleChatConfiguration + parameters: + - $ref: "#/components/parameters/IncidentGoogleChatConfigurationIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + domain_id: updated-domain + id: 00000000-0000-0000-0000-000000000001 + type: google_chat_configurations + schema: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationPatchRequest" + description: Google Chat configuration patch payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + domain_id: updated-domain + modified_at: "2024-01-02T00:00:00.000Z" + space_name_template: "{{incident.title}}" + space_target_audience_id: "123456789" + space_time_zone: America/New_York + id: 00000000-0000-0000-0000-000000000001 + type: google_chat_configurations + schema: + $ref: "#/components/schemas/IncidentGoogleChatConfigurationResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident Google Chat configuration + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/google-meet-configurations: + post: + description: Create a Google Meet configuration for incidents. + operationId: CreateIncidentGoogleMeetConfiguration + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + allow_manual_meeting_creation: true + auto_summarize: false + relationships: + incident_type: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_types + type: google_meet_configurations + schema: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationRequest" + description: Google Meet configuration payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + allow_manual_meeting_creation: true + auto_summarize: false + created_at: "2024-01-01T00:00:00.000Z" + modified_at: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000001 + type: google_meet_configurations + schema: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident Google Meet configuration + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/google-meet-configurations/{id}: + patch: + description: Update a Google Meet configuration for incidents. + operationId: UpdateIncidentGoogleMeetConfiguration + parameters: + - $ref: "#/components/parameters/IncidentGoogleMeetConfigurationIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + auto_summarize: true + id: 00000000-0000-0000-0000-000000000001 + type: google_meet_configurations + schema: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationPatchRequest" + description: Google Meet configuration patch payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + allow_manual_meeting_creation: true + auto_summarize: true + created_at: "2024-01-01T00:00:00.000Z" + modified_at: "2024-01-02T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000001 + type: google_meet_configurations + schema: + $ref: "#/components/schemas/IncidentGoogleMeetConfigurationResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident Google Meet configuration + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/impact-fields: + get: + description: List all impact fields for incidents. + operationId: ListIncidentImpactFields + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentImpactFieldsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: List incident impact fields + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_settings_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create an impact field for incidents. + operationId: CreateIncidentImpactField + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + display_name: Customer Impact Scope + field_choices: + - description: Affects all customers + display_name: All Customers + value: all_customers + - description: Affects some customers + display_name: Some Customers + value: some_customers + field_type: dropdown + name: customer_impact_scope + relationships: + incident_type: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_types + type: impact_fields + schema: + $ref: "#/components/schemas/IncidentImpactFieldRequest" + description: Impact field payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + display_name: Customer Impact Scope + field_choices: + - description: Affects all customers + display_name: All Customers + value: all_customers + field_type: dropdown + name: customer_impact_scope + id: 00000000-0000-0000-0000-000000000001 + type: impact_fields + schema: + $ref: "#/components/schemas/IncidentImpactFieldResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident impact field + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/impact-fields/{field_id}: + delete: + description: Delete an impact field for incidents. + operationId: DeleteIncidentImpactField + parameters: + - $ref: "#/components/parameters/IncidentImpactFieldIDPathParameter" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Delete an incident impact field + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Update an impact field for incidents. + operationId: UpdateIncidentImpactField + parameters: + - $ref: "#/components/parameters/IncidentImpactFieldIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + display_name: Customer Impact Scope Updated + field_type: dropdown + name: customer_impact_scope + relationships: + incident_type: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_types + type: impact_fields + schema: + $ref: "#/components/schemas/IncidentImpactFieldRequest" + description: Impact field update payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + display_name: Customer Impact Scope Updated + field_type: dropdown + name: customer_impact_scope + id: 00000000-0000-0000-0000-000000000001 + type: impact_fields + schema: + $ref: "#/components/schemas/IncidentImpactFieldResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident impact field + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/config/notification-rules: get: description: Lists all notification rules for the organization. Optionally filter by incident type. @@ -121321,6 +123948,302 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/rules: + get: + description: List all incident rules. + operationId: ListIncidentRules + parameters: + - description: Filter rules by task ID. + in: query + name: "filter[task_id]" + required: false + schema: + example: notify-incident-handles-job + type: string + - description: Filter rules by trigger. + in: query + name: "filter[trigger]" + required: false + schema: + example: incident_created_trigger + type: string + - description: Filter rules by incident type UUID. + in: query + name: incidentTypeUUID + required: false + schema: + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRulesResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: List incident rules + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_settings_read + - incident_notification_settings_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create an incident rule. + operationId: CreateIncidentRule + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + condition: + raw_query: "severity:SEV-1" + condition_table_type: 1 + enabled: true + execution_type: 1 + task_id: notify-incident-handles-job + task_payload: "{}" + trigger: incident_created_trigger + type: incident_rules + schema: + $ref: "#/components/schemas/IncidentRuleRequest" + description: Incident rule payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + condition: + raw_query: "severity:SEV-1" + condition_table_type: 1 + created: "2024-01-01T00:00:00.000Z" + enabled: true + execution_type: 1 + modified: "2024-01-01T00:00:00.000Z" + task_id: notify-incident-handles-job + task_payload: "{}" + trigger: incident_created_trigger + id: 00000000-0000-0000-0000-000000000001 + type: incidents_rules + schema: + $ref: "#/components/schemas/IncidentRuleResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident rule + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_settings_write + - incident_notification_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/rules/{rule_id}: + delete: + description: Delete an incident rule. + operationId: DeleteIncidentRule + parameters: + - $ref: "#/components/parameters/IncidentRuleIDPathParameter" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Delete an incident rule + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_settings_write + - incident_notification_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a single incident rule by ID. + operationId: GetIncidentRule + parameters: + - $ref: "#/components/parameters/IncidentRuleIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + condition: + raw_query: "severity:SEV-1" + condition_table_type: 1 + created: "2024-01-01T00:00:00.000Z" + enabled: true + execution_type: 1 + modified: "2024-01-01T00:00:00.000Z" + task_id: notify-incident-handles-job + task_payload: "{}" + trigger: incident_created_trigger + id: 00000000-0000-0000-0000-000000000001 + type: incidents_rules + schema: + $ref: "#/components/schemas/IncidentRuleResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: Get an incident rule + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_settings_read + - incident_notification_settings_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update an incident rule. + operationId: UpdateIncidentRule + parameters: + - $ref: "#/components/parameters/IncidentRuleIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: false + id: 00000000-0000-0000-0000-000000000001 + type: incident_rules + schema: + $ref: "#/components/schemas/IncidentRulePatchRequest" + description: Incident rule patch payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + condition: + raw_query: "severity:SEV-1" + condition_table_type: 1 + created: "2024-01-01T00:00:00.000Z" + enabled: false + execution_type: 1 + modified: "2024-01-02T00:00:00.000Z" + task_id: notify-incident-handles-job + task_payload: "{}" + trigger: incident_created_trigger + id: 00000000-0000-0000-0000-000000000001 + type: incidents_rules + schema: + $ref: "#/components/schemas/IncidentRuleResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident rule + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_settings_write + - incident_notification_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/config/types: get: description: Get all incident types. @@ -121433,6 +124356,74 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/types/org-settings: + get: + description: List org settings for all incident types. + operationId: ListOrgSettings + parameters: + - description: Maximum number of results to return. + in: query + name: "page[size]" + required: false + schema: + example: 10 + type: integer + - description: The offset for pagination. + in: query + name: "page[offset]" + required: false + schema: + example: 0 + type: integer + - description: Whether to include deleted records. + in: query + name: include-deleted + required: false + schema: + example: false + type: boolean + - description: Comma-separated list of related resources to include in the response. + in: query + name: include + required: false + schema: + example: incident_type + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentOrgSettingsListResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident type org settings + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_settings_read + - incident_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/config/types/{incident_type_id}: delete: description: Delete an incident type. @@ -121583,6 +124574,66 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/types/{incident_type_id}/org-settings: + get: + description: Get the org settings for a specific incident type. + operationId: GetOrgSettingsByIncidentType + parameters: + - $ref: "#/components/parameters/IncidentOrgSettingsTypeIDPathParameter" + - description: Comma-separated list of related resources to include in the response. + in: query + name: include + required: false + schema: + example: incident_type + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + modified: "2024-01-01T00:00:00.000Z" + settings: + allow_anonymous_incident_declaration: false + allow_guest_incident_declaration: false + pagerduty_paging: true + private_incidents_by_default: false + id: 00000000-0000-0000-0000-000000000001 + type: incident_org_settings + schema: + $ref: "#/components/schemas/IncidentOrgSettingsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get org settings by incident type + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_settings_read + - incident_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/config/user-defined-fields: get: description: Get a list of all incident user-defined fields. @@ -122060,6 +125111,303 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/user-defined-roles: + get: + description: List all user-defined roles for incidents. + operationId: ListIncidentUserDefinedRoles + parameters: + - description: Filter roles by incident type UUID. + in: query + name: filter[incident-type] + required: false + schema: + example: "00000000-0000-0000-0000-000000000001" + format: uuid + type: string + - description: Comma-separated list of related resources to include in the response. + in: query + name: include + required: false + schema: + example: "created_by_user,last_modified_by_user,incident_type" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created: "2024-01-01T00:00:00.000Z" + description: "The technical lead for the incident." + modified: "2024-01-01T00:00:00.000Z" + name: "Tech Lead" + policy: + is_single: true + id: "00000000-0000-0000-0000-000000000002" + type: incident_user_defined_roles + schema: + $ref: "#/components/schemas/IncidentUserDefinedRolesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: List incident user-defined roles + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a new user-defined role for incidents. + operationId: CreateIncidentUserDefinedRole + parameters: + - description: Comma-separated list of related resources to include in the response. + in: query + name: include + required: false + schema: + example: "created_by_user,last_modified_by_user,incident_type" + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: "The technical lead for the incident." + name: "Tech Lead" + policy: + is_single: true + relationships: + incident_type: + data: + id: "00000000-0000-0000-0000-000000000001" + type: incident_types + type: incident_user_defined_roles + schema: + $ref: "#/components/schemas/IncidentUserDefinedRoleRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + description: "The technical lead for the incident." + modified: "2024-01-01T00:00:00.000Z" + name: "Tech Lead" + policy: + is_single: true + id: "00000000-0000-0000-0000-000000000002" + type: incident_user_defined_roles + schema: + $ref: "#/components/schemas/IncidentUserDefinedRoleResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident user-defined role + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/user-defined-roles/{role_id}: + delete: + description: Delete an existing user-defined role for incidents. + operationId: DeleteIncidentUserDefinedRole + parameters: + - $ref: "#/components/parameters/IncidentUserDefinedRoleIDPathParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Delete an incident user-defined role + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Retrieve a single user-defined role for incidents. + operationId: GetIncidentUserDefinedRole + parameters: + - $ref: "#/components/parameters/IncidentUserDefinedRoleIDPathParameter" + - description: Comma-separated list of related resources to include in the response. + in: query + name: include + required: false + schema: + example: "created_by_user,last_modified_by_user,incident_type" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + description: "The technical lead for the incident." + modified: "2024-01-01T00:00:00.000Z" + name: "Tech Lead" + policy: + is_single: true + id: "00000000-0000-0000-0000-000000000002" + type: incident_user_defined_roles + schema: + $ref: "#/components/schemas/IncidentUserDefinedRoleResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: Get an incident user-defined role + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update an existing user-defined role for incidents. + operationId: UpdateIncidentUserDefinedRole + parameters: + - $ref: "#/components/parameters/IncidentUserDefinedRoleIDPathParameter" + - description: Comma-separated list of related resources to include in the response. + in: query + name: include + required: false + schema: + example: "created_by_user,last_modified_by_user,incident_type" + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + name: "Updated Tech Lead" + id: "00000000-0000-0000-0000-000000000002" + type: incident_user_defined_roles + schema: + $ref: "#/components/schemas/IncidentUserDefinedRolePatchRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + modified: "2024-01-02T00:00:00.000Z" + name: "Updated Tech Lead" + policy: + is_single: true + id: "00000000-0000-0000-0000-000000000002" + type: incident_user_defined_roles + schema: + $ref: "#/components/schemas/IncidentUserDefinedRoleResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident user-defined role + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/import: post: description: |- @@ -122394,6 +125742,57 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/ai/postmortem: + post: + description: Generate an AI postmortem for an incident. + operationId: GetIncidentAIPostmortem + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + action_items: "1. Improve failover testing." + customer_impact: "5% of users experienced timeouts for 30 minutes." + executive_summary: "A database failover caused a 30-minute service outage." + key_timeline: "10:00 - Alert fired. 10:30 - Issue resolved." + lessons_learned: "We need to test the failover process under realistic load." + system_overview: "The primary database cluster experienced a failover event." + id: 00000000-0000-0000-0000-000000000000 + type: get_incident_ai_postmortem_response + schema: + $ref: "#/components/schemas/IncidentAIPostmortemResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Get an AI-generated incident postmortem + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/{incident_id}/attachments: get: description: List incident attachments. @@ -122689,6 +126088,211 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/cases/page: + post: + description: Create a page from an incident using the Cases service. + operationId: CreatePageFromIncident + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: A critical incident affecting production systems. + services: + - web-store + tags: + - env:prod + target: + identifier: my-oncall-team + type: team_handle + title: Production outage - SEV-1 + type: page + schema: + $ref: "#/components/schemas/IncidentCreatePageFromIncidentRequest" + description: Page creation payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + id: 00000000-0000-0000-0000-000000000001 + type: page_uuid + schema: + $ref: "#/components/schemas/IncidentPageUUIDResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create a page from an incident + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - oncall_page + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/configurations: + patch: + description: Update a configuration for an incident. + operationId: UpdateIncidentConfiguration + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + include_in_search: false + id: 00000000-0000-0000-0000-000000000001 + type: incidents_configurations + schema: + $ref: "#/components/schemas/IncidentConfigurationPatchRequest" + description: Incident configuration patch payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + execute_integrations: true + execute_notification_rules: true + incident_id: 00000000-0000-0000-0000-000000000000 + include_in_analytics: true + include_in_search: false + modified_at: "2024-01-02T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000001 + type: incidents_configurations + schema: + $ref: "#/components/schemas/IncidentConfigurationResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident configuration + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a configuration for an incident. + operationId: CreateIncidentConfiguration + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + execute_integrations: true + execute_notification_rules: true + include_in_analytics: true + include_in_search: true + type: incidents_configurations + schema: + $ref: "#/components/schemas/IncidentConfigurationRequest" + description: Incident configuration payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + execute_integrations: true + execute_notification_rules: true + incident_id: 00000000-0000-0000-0000-000000000000 + include_in_analytics: true + include_in_search: true + modified_at: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000001 + type: incidents_configurations + schema: + $ref: "#/components/schemas/IncidentConfigurationResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident configuration + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/{incident_id}/impacts: get: description: Get all impacts for an incident. @@ -122832,6 +126436,273 @@ paths: operator: OR permissions: - incident_write + patch: + description: Partially update an incident impact. + operationId: PatchIncidentImpact + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentImpactIDPathParameter" + - $ref: "#/components/parameters/IncidentImpactIncludeQueryParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: Patched service impact description + type: incident_impacts + schema: + $ref: "#/components/schemas/IncidentImpactCreateRequest" + description: Incident impact patch payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + description: Patched service impact description + start_at: "2025-08-28T13:17:00Z" + id: 00000000-0000-0000-0000-000000000002 + type: incident_impacts + schema: + $ref: "#/components/schemas/IncidentImpactResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Patch an incident impact + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Update an incident impact. + operationId: UpdateIncidentImpact + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentImpactIDPathParameter" + - $ref: "#/components/parameters/IncidentImpactIncludeQueryParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: Updated service impact description + end_at: "2025-08-29T13:17:00Z" + start_at: "2025-08-28T13:17:00Z" + type: incident_impacts + schema: + $ref: "#/components/schemas/IncidentImpactCreateRequest" + description: Incident impact payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + description: Updated service impact description + end_at: "2025-08-29T13:17:00Z" + start_at: "2025-08-28T13:17:00Z" + id: 00000000-0000-0000-0000-000000000002 + type: incident_impacts + schema: + $ref: "#/components/schemas/IncidentImpactResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident impact + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/page: + post: + description: Create an on-call page directly from an incident. + operationId: CreateOnCallPageFromIncident + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: A critical incident affecting production systems. + services: + - web-store + target: + identifier: my-oncall-team + type: team_handle + title: Production outage - SEV-1 + type: page + schema: + $ref: "#/components/schemas/IncidentCreateOnCallPageRequest" + description: On-call page creation payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + id: 00000000-0000-0000-0000-000000000001 + type: page_uuid + schema: + $ref: "#/components/schemas/IncidentPageUUIDResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an on-call page from an incident + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - oncall_page + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/pages/link: + post: + description: Link an existing on-call page to an incident. + operationId: LinkPageToIncident + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + key: PAGE-12345 + page_target: + identifier: my-oncall-team + type: team_handle + id: PAGE-12345 + type: page + schema: + $ref: "#/components/schemas/IncidentOnCallPageLinkRequest" + description: On-call page link payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + integration_type: 1 + status: 1 + id: 00000000-0000-0000-0000-000000000001 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentIntegrationMetadataResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict - page already linked to incident + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Link a page to an incident + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/{incident_id}/relationships/integrations: get: description: Get all integration metadata for an incident. @@ -123370,6 +127241,491 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/responders: + get: + description: List all responders for an incident. + operationId: ListIncidentResponders + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRespondersResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident responders + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Add a responder to an incident. + operationId: CreateIncidentResponder + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + relationships: + user: + data: + id: 00000000-0000-0000-0000-000000000001 + type: users + type: incident_responders + schema: + $ref: "#/components/schemas/IncidentResponderRequest" + description: Incident responder payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + is_billable: true + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000002 + type: incident_responders + schema: + $ref: "#/components/schemas/IncidentResponderResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident responder + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/responders/{responder_id}: + delete: + description: Remove a responder from an incident. + operationId: DeleteIncidentResponder + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentResponderIDPathParameter" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident responder + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a single responder for an incident. + operationId: GetIncidentResponder + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentResponderIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + is_billable: true + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000002 + type: incident_responders + schema: + $ref: "#/components/schemas/IncidentResponderResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get an incident responder + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/servicenow-records: + post: + description: Create a ServiceNow record for an incident. + operationId: CreateIncidentServiceNowRecord + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + assignment_group: IT Support + configuration_item_mapping: my-service + instance_name: my-instance + type: incident_servicenow_record_prompt + schema: + $ref: "#/components/schemas/IncidentServiceNowRecordRequest" + description: ServiceNow record payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + incident_id: 00000000-0000-0000-0000-000000000000 + integration_type: 0 + metadata: + records: + - instance_name: my-instance + record_num: INC0001234 + redirect_url: https://my-instance.service-now.com/nav_to.do?uri=incident.do?sys_id=abc123 + status: 1 + id: 00000000-0000-0000-0000-000000000001 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentIntegrationMetadataResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident ServiceNow record + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/timestamp-overrides: + get: + description: List all timestamp overrides for an incident. + operationId: ListTimestampOverrides + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTimestampOverridesResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident timestamp overrides + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a timestamp override for an incident. + operationId: CreateTimestampOverride + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + timestamp_type: detected + timestamp_value: "2024-01-01T10:00:00.000Z" + type: incidents_timestamp_overrides + schema: + $ref: "#/components/schemas/IncidentTimestampOverrideRequest" + description: Timestamp override payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified_at: "2024-01-01T00:00:00.000Z" + timestamp_type: detected + timestamp_value: "2024-01-01T10:00:00.000Z" + id: 00000000-0000-0000-0000-000000000001 + type: incidents_timestamp_overrides + schema: + $ref: "#/components/schemas/IncidentTimestampOverrideResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident timestamp override + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/timestamp-overrides/{id}: + delete: + description: Delete a timestamp override for an incident. + operationId: DeleteTimestampOverride + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimestampOverrideIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + deleted_at: "2024-01-03T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified_at: "2024-01-01T00:00:00.000Z" + timestamp_type: detected + timestamp_value: "2024-01-01T10:00:00.000Z" + id: 00000000-0000-0000-0000-000000000001 + type: incidents_timestamp_overrides + schema: + $ref: "#/components/schemas/IncidentTimestampOverrideResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident timestamp override + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a timestamp override for an incident. + operationId: UpdateTimestampOverride + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimestampOverrideIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + timestamp_value: "2024-01-01T11:00:00.000Z" + id: 00000000-0000-0000-0000-000000000001 + type: incidents_timestamp_overrides + schema: + $ref: "#/components/schemas/IncidentTimestampOverridePatchRequest" + description: Timestamp override patch payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified_at: "2024-01-02T00:00:00.000Z" + timestamp_type: detected + timestamp_value: "2024-01-01T11:00:00.000Z" + id: 00000000-0000-0000-0000-000000000001 + type: incidents_timestamp_overrides + schema: + $ref: "#/components/schemas/IncidentTimestampOverrideResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident timestamp override + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - incident_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/integration/aws/accounts: get: description: Get a list of AWS Account Integration Configs. diff --git a/examples/v2/incidents/PatchIncidentImpact.java b/examples/v2/incidents/PatchIncidentImpact.java new file mode 100644 index 00000000000..d21810d63e5 --- /dev/null +++ b/examples/v2/incidents/PatchIncidentImpact.java @@ -0,0 +1,47 @@ +// Patch an incident impact returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentImpactCreateAttributes; +import com.datadog.api.client.v2.model.IncidentImpactCreateData; +import com.datadog.api.client.v2.model.IncidentImpactCreateRequest; +import com.datadog.api.client.v2.model.IncidentImpactResponse; +import com.datadog.api.client.v2.model.IncidentImpactType; +import java.time.OffsetDateTime; +import java.util.Map; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.patchIncidentImpact", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentImpactCreateRequest body = + new IncidentImpactCreateRequest() + .data( + new IncidentImpactCreateData() + .attributes( + new IncidentImpactCreateAttributes() + .description("Service was unavailable for external users") + .endAt(OffsetDateTime.parse("2025-08-29T13:17:00Z")) + .fields( + Map.ofEntries( + Map.entry("customers_impacted", "all"), + Map.entry("products_impacted", "['shopping', 'marketing']"))) + .startAt(OffsetDateTime.parse("2025-08-28T13:17:00Z"))) + .type(IncidentImpactType.INCIDENT_IMPACTS)); + + try { + IncidentImpactResponse result = + apiInstance.patchIncidentImpact("incident_id", "impact_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#patchIncidentImpact"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/incidents/UpdateIncidentImpact.java b/examples/v2/incidents/UpdateIncidentImpact.java new file mode 100644 index 00000000000..e1f040bc4a8 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentImpact.java @@ -0,0 +1,47 @@ +// Update an incident impact returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentImpactCreateAttributes; +import com.datadog.api.client.v2.model.IncidentImpactCreateData; +import com.datadog.api.client.v2.model.IncidentImpactCreateRequest; +import com.datadog.api.client.v2.model.IncidentImpactResponse; +import com.datadog.api.client.v2.model.IncidentImpactType; +import java.time.OffsetDateTime; +import java.util.Map; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateIncidentImpact", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentImpactCreateRequest body = + new IncidentImpactCreateRequest() + .data( + new IncidentImpactCreateData() + .attributes( + new IncidentImpactCreateAttributes() + .description("Service was unavailable for external users") + .endAt(OffsetDateTime.parse("2025-08-29T13:17:00Z")) + .fields( + Map.ofEntries( + Map.entry("customers_impacted", "all"), + Map.entry("products_impacted", "['shopping', 'marketing']"))) + .startAt(OffsetDateTime.parse("2025-08-28T13:17:00Z"))) + .type(IncidentImpactType.INCIDENT_IMPACTS)); + + try { + IncidentImpactResponse result = + apiInstance.updateIncidentImpact("incident_id", "impact_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#updateIncidentImpact"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index c26c644775a..c3e0c477568 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -999,56 +999,93 @@ public class ApiClient { put("v2.createGlobalIncidentHandle", false); put("v2.createIncident", false); put("v2.createIncidentAttachment", false); + put("v2.createIncidentConfiguration", false); + put("v2.createIncidentGoogleChatConfiguration", false); + put("v2.createIncidentGoogleMeetConfiguration", false); + put("v2.createIncidentImpactField", false); put("v2.createIncidentIntegration", false); put("v2.createIncidentNotificationRule", false); put("v2.createIncidentNotificationTemplate", false); put("v2.createIncidentPostmortemAttachment", false); put("v2.createIncidentPostmortemTemplate", false); + put("v2.createIncidentResponder", false); + put("v2.createIncidentRule", false); + put("v2.createIncidentServiceNowRecord", false); put("v2.createIncidentTodo", false); put("v2.createIncidentType", false); put("v2.createIncidentUserDefinedField", false); + put("v2.createIncidentUserDefinedRole", false); + put("v2.createOnCallPageFromIncident", false); + put("v2.createPageFromIncident", false); + put("v2.createTimestampOverride", false); put("v2.deleteGlobalIncidentHandle", false); put("v2.deleteIncident", false); put("v2.deleteIncidentAttachment", false); + put("v2.deleteIncidentImpactField", false); put("v2.deleteIncidentIntegration", false); put("v2.deleteIncidentNotificationRule", false); put("v2.deleteIncidentNotificationTemplate", false); put("v2.deleteIncidentPostmortemTemplate", false); + put("v2.deleteIncidentResponder", false); + put("v2.deleteIncidentRule", false); put("v2.deleteIncidentTodo", false); put("v2.deleteIncidentType", false); put("v2.deleteIncidentUserDefinedField", false); + put("v2.deleteIncidentUserDefinedRole", false); + put("v2.deleteTimestampOverride", false); put("v2.getGlobalIncidentSettings", false); put("v2.getIncident", false); + put("v2.getIncidentAIPostmortem", false); put("v2.getIncidentIntegration", false); put("v2.getIncidentNotificationRule", false); put("v2.getIncidentNotificationTemplate", false); put("v2.getIncidentPostmortemTemplate", false); + put("v2.getIncidentResponder", false); + put("v2.getIncidentRule", false); put("v2.getIncidentTodo", false); put("v2.getIncidentType", false); put("v2.getIncidentUserDefinedField", false); + put("v2.getIncidentUserDefinedRole", false); + put("v2.getOrgSettingsByIncidentType", false); put("v2.importIncident", false); + put("v2.linkPageToIncident", false); put("v2.listGlobalIncidentHandles", false); put("v2.listIncidentAttachments", false); + put("v2.listIncidentImpactFields", false); put("v2.listIncidentIntegrations", false); put("v2.listIncidentNotificationRules", false); put("v2.listIncidentNotificationTemplates", false); put("v2.listIncidentPostmortemTemplates", false); + put("v2.listIncidentResponders", false); + put("v2.listIncidentRules", false); put("v2.listIncidents", false); put("v2.listIncidentTodos", false); put("v2.listIncidentTypes", false); put("v2.listIncidentUserDefinedFields", false); + put("v2.listIncidentUserDefinedRoles", false); + put("v2.listOrgSettings", false); + put("v2.listTimestampOverrides", false); + put("v2.patchIncidentImpact", false); put("v2.searchIncidents", false); put("v2.updateGlobalIncidentHandle", false); put("v2.updateGlobalIncidentSettings", false); put("v2.updateIncident", false); put("v2.updateIncidentAttachment", false); + put("v2.updateIncidentConfiguration", false); + put("v2.updateIncidentGoogleChatConfiguration", false); + put("v2.updateIncidentGoogleMeetConfiguration", false); + put("v2.updateIncidentImpact", false); + put("v2.updateIncidentImpactField", false); put("v2.updateIncidentIntegration", false); put("v2.updateIncidentNotificationRule", false); put("v2.updateIncidentNotificationTemplate", false); put("v2.updateIncidentPostmortemTemplate", false); + put("v2.updateIncidentRule", false); put("v2.updateIncidentTodo", false); put("v2.updateIncidentType", false); put("v2.updateIncidentUserDefinedField", false); + put("v2.updateIncidentUserDefinedRole", false); + put("v2.updateTimestampOverride", false); put("v2.createAWSAccountCCMConfig", false); put("v2.deleteAWSAccountCCMConfig", false); put("v2.getAWSAccountCCMConfig", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java b/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java index c44e3983ac1..5341f1a9a22 100644 --- a/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java @@ -12,11 +12,26 @@ import com.datadog.api.client.v2.model.CreateIncidentNotificationTemplateRequest; import com.datadog.api.client.v2.model.GlobalIncidentSettingsRequest; import com.datadog.api.client.v2.model.GlobalIncidentSettingsResponse; +import com.datadog.api.client.v2.model.IncidentAIPostmortemResponse; +import com.datadog.api.client.v2.model.IncidentConfigurationPatchRequest; +import com.datadog.api.client.v2.model.IncidentConfigurationRequest; +import com.datadog.api.client.v2.model.IncidentConfigurationResponse; +import com.datadog.api.client.v2.model.IncidentCreateOnCallPageRequest; +import com.datadog.api.client.v2.model.IncidentCreatePageFromIncidentRequest; import com.datadog.api.client.v2.model.IncidentCreateRequest; +import com.datadog.api.client.v2.model.IncidentGoogleChatConfigurationPatchRequest; +import com.datadog.api.client.v2.model.IncidentGoogleChatConfigurationRequest; +import com.datadog.api.client.v2.model.IncidentGoogleChatConfigurationResponse; +import com.datadog.api.client.v2.model.IncidentGoogleMeetConfigurationPatchRequest; +import com.datadog.api.client.v2.model.IncidentGoogleMeetConfigurationRequest; +import com.datadog.api.client.v2.model.IncidentGoogleMeetConfigurationResponse; import com.datadog.api.client.v2.model.IncidentHandleRequest; import com.datadog.api.client.v2.model.IncidentHandleResponse; import com.datadog.api.client.v2.model.IncidentHandlesResponse; import com.datadog.api.client.v2.model.IncidentImpactCreateRequest; +import com.datadog.api.client.v2.model.IncidentImpactFieldRequest; +import com.datadog.api.client.v2.model.IncidentImpactFieldResponse; +import com.datadog.api.client.v2.model.IncidentImpactFieldsResponse; import com.datadog.api.client.v2.model.IncidentImpactRelatedObject; import com.datadog.api.client.v2.model.IncidentImpactResponse; import com.datadog.api.client.v2.model.IncidentImpactsResponse; @@ -31,12 +46,28 @@ import com.datadog.api.client.v2.model.IncidentNotificationRuleArray; import com.datadog.api.client.v2.model.IncidentNotificationTemplate; import com.datadog.api.client.v2.model.IncidentNotificationTemplateArray; +import com.datadog.api.client.v2.model.IncidentOnCallPageLinkRequest; +import com.datadog.api.client.v2.model.IncidentOrgSettingsListResponse; +import com.datadog.api.client.v2.model.IncidentOrgSettingsResponse; +import com.datadog.api.client.v2.model.IncidentPageUUIDResponse; import com.datadog.api.client.v2.model.IncidentRelatedObject; +import com.datadog.api.client.v2.model.IncidentResponderRequest; +import com.datadog.api.client.v2.model.IncidentResponderResponse; +import com.datadog.api.client.v2.model.IncidentRespondersResponse; import com.datadog.api.client.v2.model.IncidentResponse; import com.datadog.api.client.v2.model.IncidentResponseData; +import com.datadog.api.client.v2.model.IncidentRulePatchRequest; +import com.datadog.api.client.v2.model.IncidentRuleRequest; +import com.datadog.api.client.v2.model.IncidentRuleResponse; +import com.datadog.api.client.v2.model.IncidentRulesResponse; import com.datadog.api.client.v2.model.IncidentSearchResponse; import com.datadog.api.client.v2.model.IncidentSearchResponseIncidentsData; import com.datadog.api.client.v2.model.IncidentSearchSortOrder; +import com.datadog.api.client.v2.model.IncidentServiceNowRecordRequest; +import com.datadog.api.client.v2.model.IncidentTimestampOverridePatchRequest; +import com.datadog.api.client.v2.model.IncidentTimestampOverrideRequest; +import com.datadog.api.client.v2.model.IncidentTimestampOverrideResponse; +import com.datadog.api.client.v2.model.IncidentTimestampOverridesResponse; import com.datadog.api.client.v2.model.IncidentTodoCreateRequest; import com.datadog.api.client.v2.model.IncidentTodoListResponse; import com.datadog.api.client.v2.model.IncidentTodoPatchRequest; @@ -50,6 +81,10 @@ import com.datadog.api.client.v2.model.IncidentUserDefinedFieldListResponse; import com.datadog.api.client.v2.model.IncidentUserDefinedFieldResponse; import com.datadog.api.client.v2.model.IncidentUserDefinedFieldUpdateRequest; +import com.datadog.api.client.v2.model.IncidentUserDefinedRolePatchRequest; +import com.datadog.api.client.v2.model.IncidentUserDefinedRoleRequest; +import com.datadog.api.client.v2.model.IncidentUserDefinedRoleResponse; +import com.datadog.api.client.v2.model.IncidentUserDefinedRolesResponse; import com.datadog.api.client.v2.model.IncidentsResponse; import com.datadog.api.client.v2.model.PatchAttachmentRequest; import com.datadog.api.client.v2.model.PatchIncidentNotificationTemplateRequest; @@ -716,94 +751,33 @@ public CompletableFuture> createIncidentAttachmentWithHt new GenericType() {}); } - /** Manage optional parameters to createIncidentImpact. */ - public static class CreateIncidentImpactOptionalParameters { - private List include; - - /** - * Set include. - * - * @param include Specifies which related resources should be included in the response. - * (optional) - * @return CreateIncidentImpactOptionalParameters - */ - public CreateIncidentImpactOptionalParameters include( - List include) { - this.include = include; - return this; - } - } - - /** - * Create an incident impact. - * - *

See {@link #createIncidentImpactWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident impact payload. (required) - * @return IncidentImpactResponse - * @throws ApiException if fails to make API call - */ - public IncidentImpactResponse createIncidentImpact( - String incidentId, IncidentImpactCreateRequest body) throws ApiException { - return createIncidentImpactWithHttpInfo( - incidentId, body, new CreateIncidentImpactOptionalParameters()) - .getData(); - } - - /** - * Create an incident impact. - * - *

See {@link #createIncidentImpactWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident impact payload. (required) - * @return CompletableFuture<IncidentImpactResponse> - */ - public CompletableFuture createIncidentImpactAsync( - String incidentId, IncidentImpactCreateRequest body) { - return createIncidentImpactWithHttpInfoAsync( - incidentId, body, new CreateIncidentImpactOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - /** - * Create an incident impact. + * Create an incident configuration. * - *

See {@link #createIncidentImpactWithHttpInfo}. + *

See {@link #createIncidentConfigurationWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident impact payload. (required) - * @param parameters Optional parameters for the request. - * @return IncidentImpactResponse + * @param body Incident configuration payload. (required) + * @return IncidentConfigurationResponse * @throws ApiException if fails to make API call */ - public IncidentImpactResponse createIncidentImpact( - String incidentId, - IncidentImpactCreateRequest body, - CreateIncidentImpactOptionalParameters parameters) - throws ApiException { - return createIncidentImpactWithHttpInfo(incidentId, body, parameters).getData(); + public IncidentConfigurationResponse createIncidentConfiguration( + String incidentId, IncidentConfigurationRequest body) throws ApiException { + return createIncidentConfigurationWithHttpInfo(incidentId, body).getData(); } /** - * Create an incident impact. + * Create an incident configuration. * - *

See {@link #createIncidentImpactWithHttpInfoAsync}. + *

See {@link #createIncidentConfigurationWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident impact payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentImpactResponse> + * @param body Incident configuration payload. (required) + * @return CompletableFuture<IncidentConfigurationResponse> */ - public CompletableFuture createIncidentImpactAsync( - String incidentId, - IncidentImpactCreateRequest body, - CreateIncidentImpactOptionalParameters parameters) { - return createIncidentImpactWithHttpInfoAsync(incidentId, body, parameters) + public CompletableFuture createIncidentConfigurationAsync( + String incidentId, IncidentConfigurationRequest body) { + return createIncidentConfigurationWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -811,18 +785,17 @@ public CompletableFuture createIncidentImpactAsync( } /** - * Create an impact for an incident. + * Create a configuration for an incident. * * @param incidentId The UUID of the incident. (required) - * @param body Incident impact payload. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentImpactResponse> + * @param body Incident configuration payload. (required) + * @return ApiResponse<IncidentConfigurationResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -830,41 +803,42 @@ public CompletableFuture createIncidentImpactAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse createIncidentImpactWithHttpInfo( - String incidentId, - IncidentImpactCreateRequest body, - CreateIncidentImpactOptionalParameters parameters) - throws ApiException { + public ApiResponse createIncidentConfigurationWithHttpInfo( + String incidentId, IncidentConfigurationRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createIncidentConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling createIncidentImpact"); + 400, + "Missing the required parameter 'incidentId' when calling createIncidentConfiguration"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentImpact"); + 400, "Missing the required parameter 'body' when calling createIncidentConfiguration"); } - List include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/impacts" + "/api/v2/incidents/{incident_id}/configurations" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentImpact", + "v2.IncidentsApi.createIncidentConfiguration", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -877,69 +851,78 @@ public ApiResponse createIncidentImpactWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident impact. + * Create an incident configuration. * - *

See {@link #createIncidentImpactWithHttpInfo}. + *

See {@link #createIncidentConfigurationWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident impact payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentImpactResponse>> + * @param body Incident configuration payload. (required) + * @return CompletableFuture<ApiResponse<IncidentConfigurationResponse>> */ - public CompletableFuture> - createIncidentImpactWithHttpInfoAsync( - String incidentId, - IncidentImpactCreateRequest body, - CreateIncidentImpactOptionalParameters parameters) { + public CompletableFuture> + createIncidentConfigurationWithHttpInfoAsync( + String incidentId, IncidentConfigurationRequest body) { + // Check if unstable operation is enabled + String operationId = "createIncidentConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentId' when calling createIncidentImpact")); + "Missing the required parameter 'incidentId' when calling" + + " createIncidentConfiguration")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentImpact")); + 400, + "Missing the required parameter 'body' when calling createIncidentConfiguration")); return result; } - List include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/impacts" + "/api/v2/incidents/{incident_id}/configurations" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentImpact", + "v2.IncidentsApi.createIncidentConfiguration", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -951,36 +934,34 @@ public ApiResponse createIncidentImpactWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident integration metadata. + * Create an incident Google Chat configuration. * - *

See {@link #createIncidentIntegrationWithHttpInfo}. + *

See {@link #createIncidentGoogleChatConfigurationWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident integration metadata payload. (required) - * @return IncidentIntegrationMetadataResponse + * @param body Google Chat configuration payload. (required) + * @return IncidentGoogleChatConfigurationResponse * @throws ApiException if fails to make API call */ - public IncidentIntegrationMetadataResponse createIncidentIntegration( - String incidentId, IncidentIntegrationMetadataCreateRequest body) throws ApiException { - return createIncidentIntegrationWithHttpInfo(incidentId, body).getData(); + public IncidentGoogleChatConfigurationResponse createIncidentGoogleChatConfiguration( + IncidentGoogleChatConfigurationRequest body) throws ApiException { + return createIncidentGoogleChatConfigurationWithHttpInfo(body).getData(); } /** - * Create an incident integration metadata. + * Create an incident Google Chat configuration. * - *

See {@link #createIncidentIntegrationWithHttpInfoAsync}. + *

See {@link #createIncidentGoogleChatConfigurationWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident integration metadata payload. (required) - * @return CompletableFuture<IncidentIntegrationMetadataResponse> + * @param body Google Chat configuration payload. (required) + * @return CompletableFuture<IncidentGoogleChatConfigurationResponse> */ - public CompletableFuture createIncidentIntegrationAsync( - String incidentId, IncidentIntegrationMetadataCreateRequest body) { - return createIncidentIntegrationWithHttpInfoAsync(incidentId, body) + public CompletableFuture + createIncidentGoogleChatConfigurationAsync(IncidentGoogleChatConfigurationRequest body) { + return createIncidentGoogleChatConfigurationWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -988,28 +969,27 @@ public CompletableFuture createIncidentInte } /** - * Create an incident integration metadata. + * Create a Google Chat configuration for incidents. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident integration metadata payload. (required) - * @return ApiResponse<IncidentIntegrationMetadataResponse> + * @param body Google Chat configuration payload. (required) + * @return ApiResponse<IncidentGoogleChatConfigurationResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * - * * *
Response details
Status Code Description Response Headers
201 CREATED -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse createIncidentIntegrationWithHttpInfo( - String incidentId, IncidentIntegrationMetadataCreateRequest body) throws ApiException { + public ApiResponse + createIncidentGoogleChatConfigurationWithHttpInfo(IncidentGoogleChatConfigurationRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentIntegration"; + String operationId = "createIncidentGoogleChatConfiguration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1017,29 +997,21 @@ public ApiResponse createIncidentIntegratio } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling createIncidentIntegration"); - } - // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentIntegration"); + 400, + "Missing the required parameter 'body' when calling" + + " createIncidentGoogleChatConfiguration"); } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/config/google-chat-configurations"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentIntegration", + "v2.IncidentsApi.createIncidentGoogleChatConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1054,27 +1026,26 @@ public ApiResponse createIncidentIntegratio localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident integration metadata. + * Create an incident Google Chat configuration. * - *

See {@link #createIncidentIntegrationWithHttpInfo}. + *

See {@link #createIncidentGoogleChatConfigurationWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident integration metadata payload. (required) - * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> + * @param body Google Chat configuration payload. (required) + * @return CompletableFuture<ApiResponse<IncidentGoogleChatConfigurationResponse>> */ - public CompletableFuture> - createIncidentIntegrationWithHttpInfoAsync( - String incidentId, IncidentIntegrationMetadataCreateRequest body) { + public CompletableFuture> + createIncidentGoogleChatConfigurationWithHttpInfoAsync( + IncidentGoogleChatConfigurationRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentIntegration"; + String operationId = "createIncidentGoogleChatConfiguration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -1082,32 +1053,19 @@ public ApiResponse createIncidentIntegratio } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling" - + " createIncidentIntegration")); - return result; - } - // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentIntegration")); + 400, + "Missing the required parameter 'body' when calling" + + " createIncidentGoogleChatConfiguration")); return result; } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/config/google-chat-configurations"; Map localVarHeaderParams = new HashMap(); @@ -1115,7 +1073,7 @@ public ApiResponse createIncidentIntegratio try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentIntegration", + "v2.IncidentsApi.createIncidentGoogleChatConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1123,7 +1081,7 @@ public ApiResponse createIncidentIntegratio new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -1136,34 +1094,34 @@ public ApiResponse createIncidentIntegratio localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident notification rule. + * Create an incident Google Meet configuration. * - *

See {@link #createIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createIncidentGoogleMeetConfigurationWithHttpInfo}. * - * @param body (required) - * @return IncidentNotificationRule + * @param body Google Meet configuration payload. (required) + * @return IncidentGoogleMeetConfigurationResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationRule createIncidentNotificationRule( - CreateIncidentNotificationRuleRequest body) throws ApiException { - return createIncidentNotificationRuleWithHttpInfo(body).getData(); + public IncidentGoogleMeetConfigurationResponse createIncidentGoogleMeetConfiguration( + IncidentGoogleMeetConfigurationRequest body) throws ApiException { + return createIncidentGoogleMeetConfigurationWithHttpInfo(body).getData(); } /** - * Create an incident notification rule. + * Create an incident Google Meet configuration. * - *

See {@link #createIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #createIncidentGoogleMeetConfigurationWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<IncidentNotificationRule> + * @param body Google Meet configuration payload. (required) + * @return CompletableFuture<IncidentGoogleMeetConfigurationResponse> */ - public CompletableFuture createIncidentNotificationRuleAsync( - CreateIncidentNotificationRuleRequest body) { - return createIncidentNotificationRuleWithHttpInfoAsync(body) + public CompletableFuture + createIncidentGoogleMeetConfigurationAsync(IncidentGoogleMeetConfigurationRequest body) { + return createIncidentGoogleMeetConfigurationWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -1171,10 +1129,10 @@ public CompletableFuture createIncidentNotificationRul } /** - * Creates a new notification rule. + * Create a Google Meet configuration for incidents. * - * @param body (required) - * @return ApiResponse<IncidentNotificationRule> + * @param body Google Meet configuration payload. (required) + * @return ApiResponse<IncidentGoogleMeetConfigurationResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1184,14 +1142,14 @@ public CompletableFuture createIncidentNotificationRul * * * - * * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse createIncidentNotificationRuleWithHttpInfo( - CreateIncidentNotificationRuleRequest body) throws ApiException { + public ApiResponse + createIncidentGoogleMeetConfigurationWithHttpInfo(IncidentGoogleMeetConfigurationRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentNotificationRule"; + String operationId = "createIncidentGoogleMeetConfiguration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1202,16 +1160,18 @@ public ApiResponse createIncidentNotificationRuleWithH // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentNotificationRule"); + 400, + "Missing the required parameter 'body' when calling" + + " createIncidentGoogleMeetConfiguration"); } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-rules"; + String localVarPath = "/api/v2/incidents/config/google-meet-configurations"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentNotificationRule", + "v2.IncidentsApi.createIncidentGoogleMeetConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1226,25 +1186,27 @@ public ApiResponse createIncidentNotificationRuleWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident notification rule. + * Create an incident Google Meet configuration. * - *

See {@link #createIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createIncidentGoogleMeetConfigurationWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> + * @param body Google Meet configuration payload. (required) + * @return CompletableFuture<ApiResponse<IncidentGoogleMeetConfigurationResponse>> */ - public CompletableFuture> - createIncidentNotificationRuleWithHttpInfoAsync(CreateIncidentNotificationRuleRequest body) { + public CompletableFuture> + createIncidentGoogleMeetConfigurationWithHttpInfoAsync( + IncidentGoogleMeetConfigurationRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentNotificationRule"; + String operationId = "createIncidentGoogleMeetConfiguration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -1253,15 +1215,17 @@ public ApiResponse createIncidentNotificationRuleWithH // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling createIncidentNotificationRule")); + "Missing the required parameter 'body' when calling" + + " createIncidentGoogleMeetConfiguration")); return result; } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-rules"; + String localVarPath = "/api/v2/incidents/config/google-meet-configurations"; Map localVarHeaderParams = new HashMap(); @@ -1269,7 +1233,7 @@ public ApiResponse createIncidentNotificationRuleWithH try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentNotificationRule", + "v2.IncidentsApi.createIncidentGoogleMeetConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1277,7 +1241,8 @@ public ApiResponse createIncidentNotificationRuleWithH new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1289,34 +1254,57 @@ public ApiResponse createIncidentNotificationRuleWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to createIncidentImpact. */ + public static class CreateIncidentImpactOptionalParameters { + private List include; + + /** + * Set include. + * + * @param include Specifies which related resources should be included in the response. + * (optional) + * @return CreateIncidentImpactOptionalParameters + */ + public CreateIncidentImpactOptionalParameters include( + List include) { + this.include = include; + return this; + } } /** - * Create incident notification template. + * Create an incident impact. * - *

See {@link #createIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #createIncidentImpactWithHttpInfo}. * - * @param body (required) - * @return IncidentNotificationTemplate + * @param incidentId The UUID of the incident. (required) + * @param body Incident impact payload. (required) + * @return IncidentImpactResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationTemplate createIncidentNotificationTemplate( - CreateIncidentNotificationTemplateRequest body) throws ApiException { - return createIncidentNotificationTemplateWithHttpInfo(body).getData(); + public IncidentImpactResponse createIncidentImpact( + String incidentId, IncidentImpactCreateRequest body) throws ApiException { + return createIncidentImpactWithHttpInfo( + incidentId, body, new CreateIncidentImpactOptionalParameters()) + .getData(); } /** - * Create incident notification template. + * Create an incident impact. * - *

See {@link #createIncidentNotificationTemplateWithHttpInfoAsync}. + *

See {@link #createIncidentImpactWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<IncidentNotificationTemplate> + * @param incidentId The UUID of the incident. (required) + * @param body Incident impact payload. (required) + * @return CompletableFuture<IncidentImpactResponse> */ - public CompletableFuture createIncidentNotificationTemplateAsync( - CreateIncidentNotificationTemplateRequest body) { - return createIncidentNotificationTemplateWithHttpInfoAsync(body) + public CompletableFuture createIncidentImpactAsync( + String incidentId, IncidentImpactCreateRequest body) { + return createIncidentImpactWithHttpInfoAsync( + incidentId, body, new CreateIncidentImpactOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -1324,16 +1312,58 @@ public CompletableFuture createIncidentNotificatio } /** - * Creates a new notification template. + * Create an incident impact. * - * @param body (required) - * @return ApiResponse<IncidentNotificationTemplate> + *

See {@link #createIncidentImpactWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident impact payload. (required) + * @param parameters Optional parameters for the request. + * @return IncidentImpactResponse + * @throws ApiException if fails to make API call + */ + public IncidentImpactResponse createIncidentImpact( + String incidentId, + IncidentImpactCreateRequest body, + CreateIncidentImpactOptionalParameters parameters) + throws ApiException { + return createIncidentImpactWithHttpInfo(incidentId, body, parameters).getData(); + } + + /** + * Create an incident impact. + * + *

See {@link #createIncidentImpactWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident impact payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentImpactResponse> + */ + public CompletableFuture createIncidentImpactAsync( + String incidentId, + IncidentImpactCreateRequest body, + CreateIncidentImpactOptionalParameters parameters) { + return createIncidentImpactWithHttpInfoAsync(incidentId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an impact for an incident. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident impact payload. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentImpactResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -1341,33 +1371,41 @@ public CompletableFuture createIncidentNotificatio * *
Response details
Status Code Description Response Headers
201 Created -
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse createIncidentNotificationTemplateWithHttpInfo( - CreateIncidentNotificationTemplateRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "createIncidentNotificationTemplate"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse createIncidentImpactWithHttpInfo( + String incidentId, + IncidentImpactCreateRequest body, + CreateIncidentImpactOptionalParameters parameters) + throws ApiException { Object localVarPostBody = body; + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling createIncidentImpact"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createIncidentNotificationTemplate"); + 400, "Missing the required parameter 'body' when calling createIncidentImpact"); } + List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentNotificationTemplate", + "v2.IncidentsApi.createIncidentImpact", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -1380,63 +1418,69 @@ public ApiResponse createIncidentNotificationTempl localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create incident notification template. + * Create an incident impact. * - *

See {@link #createIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #createIncidentImpactWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> + * @param incidentId The UUID of the incident. (required) + * @param body Incident impact payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentImpactResponse>> */ - public CompletableFuture> - createIncidentNotificationTemplateWithHttpInfoAsync( - CreateIncidentNotificationTemplateRequest body) { - // Check if unstable operation is enabled - String operationId = "createIncidentNotificationTemplate"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); + public CompletableFuture> + createIncidentImpactWithHttpInfoAsync( + String incidentId, + IncidentImpactCreateRequest body, + CreateIncidentImpactOptionalParameters parameters) { + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling createIncidentImpact")); return result; } - Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createIncidentNotificationTemplate")); + 400, "Missing the required parameter 'body' when calling createIncidentImpact")); return result; } + List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentNotificationTemplate", + "v2.IncidentsApi.createIncidentImpact", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1448,36 +1492,34 @@ public ApiResponse createIncidentNotificationTempl localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create postmortem attachment. + * Create an incident impact field. * - *

See {@link #createIncidentPostmortemAttachmentWithHttpInfo}. + *

See {@link #createIncidentImpactFieldWithHttpInfo}. * - * @param incidentId The ID of the incident (required) - * @param body (required) - * @return Attachment + * @param body Impact field payload. (required) + * @return IncidentImpactFieldResponse * @throws ApiException if fails to make API call */ - public Attachment createIncidentPostmortemAttachment( - String incidentId, PostmortemAttachmentRequest body) throws ApiException { - return createIncidentPostmortemAttachmentWithHttpInfo(incidentId, body).getData(); + public IncidentImpactFieldResponse createIncidentImpactField(IncidentImpactFieldRequest body) + throws ApiException { + return createIncidentImpactFieldWithHttpInfo(body).getData(); } /** - * Create postmortem attachment. + * Create an incident impact field. * - *

See {@link #createIncidentPostmortemAttachmentWithHttpInfoAsync}. + *

See {@link #createIncidentImpactFieldWithHttpInfoAsync}. * - * @param incidentId The ID of the incident (required) - * @param body (required) - * @return CompletableFuture<Attachment> + * @param body Impact field payload. (required) + * @return CompletableFuture<IncidentImpactFieldResponse> */ - public CompletableFuture createIncidentPostmortemAttachmentAsync( - String incidentId, PostmortemAttachmentRequest body) { - return createIncidentPostmortemAttachmentWithHttpInfoAsync(incidentId, body) + public CompletableFuture createIncidentImpactFieldAsync( + IncidentImpactFieldRequest body) { + return createIncidentImpactFieldWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -1485,15 +1527,10 @@ public CompletableFuture createIncidentPostmortemAttachmentAsync( } /** - * Create a postmortem attachment for an incident. - * - *

The endpoint accepts markdown for notebooks created in Confluence or Google Docs. - * Postmortems created from notebooks need to be formatted using frontend notebook cells, in - * addition to markdown format. + * Create an impact field for incidents. * - * @param incidentId The ID of the incident (required) - * @param body (required) - * @return ApiResponse<Attachment> + * @param body Impact field payload. (required) + * @return ApiResponse<IncidentImpactFieldResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1501,13 +1538,15 @@ public CompletableFuture createIncidentPostmortemAttachmentAsync( * * * + * + * * *
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse createIncidentPostmortemAttachmentWithHttpInfo( - String incidentId, PostmortemAttachmentRequest body) throws ApiException { + public ApiResponse createIncidentImpactFieldWithHttpInfo( + IncidentImpactFieldRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentPostmortemAttachment"; + String operationId = "createIncidentImpactField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1515,37 +1554,25 @@ public ApiResponse createIncidentPostmortemAttachmentWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling" - + " createIncidentPostmortemAttachment"); - } - // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createIncidentPostmortemAttachment"); + 400, "Missing the required parameter 'body' when calling createIncidentImpactField"); } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments/postmortems" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/config/impact-fields"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentPostmortemAttachment", + "v2.IncidentsApi.createIncidentImpactField", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "POST", builder, @@ -1554,59 +1581,43 @@ public ApiResponse createIncidentPostmortemAttachmentWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create postmortem attachment. + * Create an incident impact field. * - *

See {@link #createIncidentPostmortemAttachmentWithHttpInfo}. + *

See {@link #createIncidentImpactFieldWithHttpInfo}. * - * @param incidentId The ID of the incident (required) - * @param body (required) - * @return CompletableFuture<ApiResponse<Attachment>> + * @param body Impact field payload. (required) + * @return CompletableFuture<ApiResponse<IncidentImpactFieldResponse>> */ - public CompletableFuture> - createIncidentPostmortemAttachmentWithHttpInfoAsync( - String incidentId, PostmortemAttachmentRequest body) { + public CompletableFuture> + createIncidentImpactFieldWithHttpInfoAsync(IncidentImpactFieldRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentPostmortemAttachment"; + String operationId = "createIncidentImpactField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling" - + " createIncidentPostmortemAttachment")); - return result; - } - // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createIncidentPostmortemAttachment")); + 400, "Missing the required parameter 'body' when calling createIncidentImpactField")); return result; } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments/postmortems" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/config/impact-fields"; Map localVarHeaderParams = new HashMap(); @@ -1614,15 +1625,16 @@ public ApiResponse createIncidentPostmortemAttachmentWithHttpInfo( try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentPostmortemAttachment", + "v2.IncidentsApi.createIncidentImpactField", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1634,34 +1646,36 @@ public ApiResponse createIncidentPostmortemAttachmentWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create postmortem template. + * Create an incident integration metadata. * - *

See {@link #createIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #createIncidentIntegrationWithHttpInfo}. * - * @param body (required) - * @return PostmortemTemplateResponse + * @param incidentId The UUID of the incident. (required) + * @param body Incident integration metadata payload. (required) + * @return IncidentIntegrationMetadataResponse * @throws ApiException if fails to make API call */ - public PostmortemTemplateResponse createIncidentPostmortemTemplate(PostmortemTemplateRequest body) - throws ApiException { - return createIncidentPostmortemTemplateWithHttpInfo(body).getData(); + public IncidentIntegrationMetadataResponse createIncidentIntegration( + String incidentId, IncidentIntegrationMetadataCreateRequest body) throws ApiException { + return createIncidentIntegrationWithHttpInfo(incidentId, body).getData(); } /** - * Create postmortem template. + * Create an incident integration metadata. * - *

See {@link #createIncidentPostmortemTemplateWithHttpInfoAsync}. + *

See {@link #createIncidentIntegrationWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<PostmortemTemplateResponse> + * @param incidentId The UUID of the incident. (required) + * @param body Incident integration metadata payload. (required) + * @return CompletableFuture<IncidentIntegrationMetadataResponse> */ - public CompletableFuture createIncidentPostmortemTemplateAsync( - PostmortemTemplateRequest body) { - return createIncidentPostmortemTemplateWithHttpInfoAsync(body) + public CompletableFuture createIncidentIntegrationAsync( + String incidentId, IncidentIntegrationMetadataCreateRequest body) { + return createIncidentIntegrationWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -1669,25 +1683,28 @@ public CompletableFuture createIncidentPostmortemTem } /** - * Create a new postmortem template for incidents. + * Create an incident integration metadata. * - * @param body (required) - * @return ApiResponse<PostmortemTemplateResponse> + * @param incidentId The UUID of the incident. (required) + * @param body Incident integration metadata payload. (required) + * @return ApiResponse<IncidentIntegrationMetadataResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * + * * + * * *
Response details
Status Code Description Response Headers
201 Created -
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse createIncidentPostmortemTemplateWithHttpInfo( - PostmortemTemplateRequest body) throws ApiException { + public ApiResponse createIncidentIntegrationWithHttpInfo( + String incidentId, IncidentIntegrationMetadataCreateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentPostmortemTemplate"; + String operationId = "createIncidentIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1695,26 +1712,35 @@ public ApiResponse createIncidentPostmortemTemplateW } Object localVarPostBody = body; + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling createIncidentIntegration"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createIncidentPostmortemTemplate"); + 400, "Missing the required parameter 'body' when calling createIncidentIntegration"); } // create path and map variables - String localVarPath = "/api/v2/incidents/config/postmortem-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentPostmortemTemplate", + "v2.IncidentsApi.createIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "POST", builder, @@ -1723,43 +1749,60 @@ public ApiResponse createIncidentPostmortemTemplateW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create postmortem template. + * Create an incident integration metadata. * - *

See {@link #createIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #createIncidentIntegrationWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<PostmortemTemplateResponse>> + * @param incidentId The UUID of the incident. (required) + * @param body Incident integration metadata payload. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> */ - public CompletableFuture> - createIncidentPostmortemTemplateWithHttpInfoAsync(PostmortemTemplateRequest body) { + public CompletableFuture> + createIncidentIntegrationWithHttpInfoAsync( + String incidentId, IncidentIntegrationMetadataCreateRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentPostmortemTemplate"; + String operationId = "createIncidentIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling" + + " createIncidentIntegration")); + return result; + } + // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createIncidentPostmortemTemplate")); + 400, "Missing the required parameter 'body' when calling createIncidentIntegration")); return result; } // create path and map variables - String localVarPath = "/api/v2/incidents/config/postmortem-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1767,15 +1810,16 @@ public ApiResponse createIncidentPostmortemTemplateW try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentPostmortemTemplate", + "v2.IncidentsApi.createIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1787,36 +1831,34 @@ public ApiResponse createIncidentPostmortemTemplateW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident todo. + * Create an incident notification rule. * - *

See {@link #createIncidentTodoWithHttpInfo}. + *

See {@link #createIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident todo payload. (required) - * @return IncidentTodoResponse + * @param body (required) + * @return IncidentNotificationRule * @throws ApiException if fails to make API call */ - public IncidentTodoResponse createIncidentTodo(String incidentId, IncidentTodoCreateRequest body) - throws ApiException { - return createIncidentTodoWithHttpInfo(incidentId, body).getData(); + public IncidentNotificationRule createIncidentNotificationRule( + CreateIncidentNotificationRuleRequest body) throws ApiException { + return createIncidentNotificationRuleWithHttpInfo(body).getData(); } /** - * Create an incident todo. + * Create an incident notification rule. * - *

See {@link #createIncidentTodoWithHttpInfoAsync}. + *

See {@link #createIncidentNotificationRuleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident todo payload. (required) - * @return CompletableFuture<IncidentTodoResponse> + * @param body (required) + * @return CompletableFuture<IncidentNotificationRule> */ - public CompletableFuture createIncidentTodoAsync( - String incidentId, IncidentTodoCreateRequest body) { - return createIncidentTodoWithHttpInfoAsync(incidentId, body) + public CompletableFuture createIncidentNotificationRuleAsync( + CreateIncidentNotificationRuleRequest body) { + return createIncidentNotificationRuleWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -1824,17 +1866,16 @@ public CompletableFuture createIncidentTodoAsync( } /** - * Create an incident todo. + * Creates a new notification rule. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident todo payload. (required) - * @return ApiResponse<IncidentTodoResponse> + * @param body (required) + * @return ApiResponse<IncidentNotificationRule> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -1842,10 +1883,10 @@ public CompletableFuture createIncidentTodoAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse createIncidentTodoWithHttpInfo( - String incidentId, IncidentTodoCreateRequest body) throws ApiException { + public ApiResponse createIncidentNotificationRuleWithHttpInfo( + CreateIncidentNotificationRuleRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentTodo"; + String operationId = "createIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1853,28 +1894,19 @@ public ApiResponse createIncidentTodoWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling createIncidentTodo"); - } - // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentTodo"); + 400, "Missing the required parameter 'body' when calling createIncidentNotificationRule"); } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/config/notification-rules"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentTodo", + "v2.IncidentsApi.createIncidentNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1889,54 +1921,42 @@ public ApiResponse createIncidentTodoWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident todo. + * Create an incident notification rule. * - *

See {@link #createIncidentTodoWithHttpInfo}. + *

See {@link #createIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident todo payload. (required) - * @return CompletableFuture<ApiResponse<IncidentTodoResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> */ - public CompletableFuture> createIncidentTodoWithHttpInfoAsync( - String incidentId, IncidentTodoCreateRequest body) { + public CompletableFuture> + createIncidentNotificationRuleWithHttpInfoAsync(CreateIncidentNotificationRuleRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentTodo"; + String operationId = "createIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'incidentId' when calling createIncidentTodo")); - return result; - } - // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentTodo")); + 400, + "Missing the required parameter 'body' when calling createIncidentNotificationRule")); return result; } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/config/notification-rules"; Map localVarHeaderParams = new HashMap(); @@ -1944,7 +1964,7 @@ public CompletableFuture> createIncidentTodoWi try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentTodo", + "v2.IncidentsApi.createIncidentNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1952,7 +1972,7 @@ public CompletableFuture> createIncidentTodoWi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1964,34 +1984,34 @@ public CompletableFuture> createIncidentTodoWi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident type. + * Create incident notification template. * - *

See {@link #createIncidentTypeWithHttpInfo}. + *

See {@link #createIncidentNotificationTemplateWithHttpInfo}. * - * @param body Incident type payload. (required) - * @return IncidentTypeResponse + * @param body (required) + * @return IncidentNotificationTemplate * @throws ApiException if fails to make API call */ - public IncidentTypeResponse createIncidentType(IncidentTypeCreateRequest body) - throws ApiException { - return createIncidentTypeWithHttpInfo(body).getData(); + public IncidentNotificationTemplate createIncidentNotificationTemplate( + CreateIncidentNotificationTemplateRequest body) throws ApiException { + return createIncidentNotificationTemplateWithHttpInfo(body).getData(); } /** - * Create an incident type. + * Create incident notification template. * - *

See {@link #createIncidentTypeWithHttpInfoAsync}. + *

See {@link #createIncidentNotificationTemplateWithHttpInfoAsync}. * - * @param body Incident type payload. (required) - * @return CompletableFuture<IncidentTypeResponse> + * @param body (required) + * @return CompletableFuture<IncidentNotificationTemplate> */ - public CompletableFuture createIncidentTypeAsync( - IncidentTypeCreateRequest body) { - return createIncidentTypeWithHttpInfoAsync(body) + public CompletableFuture createIncidentNotificationTemplateAsync( + CreateIncidentNotificationTemplateRequest body) { + return createIncidentNotificationTemplateWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -1999,16 +2019,16 @@ public CompletableFuture createIncidentTypeAsync( } /** - * Create an incident type. + * Creates a new notification template. * - * @param body Incident type payload. (required) - * @return ApiResponse<IncidentTypeResponse> + * @param body (required) + * @return ApiResponse<IncidentNotificationTemplate> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -2016,10 +2036,10 @@ public CompletableFuture createIncidentTypeAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse createIncidentTypeWithHttpInfo( - IncidentTypeCreateRequest body) throws ApiException { + public ApiResponse createIncidentNotificationTemplateWithHttpInfo( + CreateIncidentNotificationTemplateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentType"; + String operationId = "createIncidentNotificationTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -2030,16 +2050,17 @@ public ApiResponse createIncidentTypeWithHttpInfo( // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentType"); + 400, + "Missing the required parameter 'body' when calling createIncidentNotificationTemplate"); } // create path and map variables - String localVarPath = "/api/v2/incidents/config/types"; + String localVarPath = "/api/v2/incidents/config/notification-templates"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentType", + "v2.IncidentsApi.createIncidentNotificationTemplate", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2054,25 +2075,27 @@ public ApiResponse createIncidentTypeWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident type. + * Create incident notification template. * - *

See {@link #createIncidentTypeWithHttpInfo}. + *

See {@link #createIncidentNotificationTemplateWithHttpInfo}. * - * @param body Incident type payload. (required) - * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> */ - public CompletableFuture> createIncidentTypeWithHttpInfoAsync( - IncidentTypeCreateRequest body) { + public CompletableFuture> + createIncidentNotificationTemplateWithHttpInfoAsync( + CreateIncidentNotificationTemplateRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentType"; + String operationId = "createIncidentNotificationTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -2081,14 +2104,17 @@ public CompletableFuture> createIncidentTypeWi // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentType")); + 400, + "Missing the required parameter 'body' when calling" + + " createIncidentNotificationTemplate")); return result; } // create path and map variables - String localVarPath = "/api/v2/incidents/config/types"; + String localVarPath = "/api/v2/incidents/config/notification-templates"; Map localVarHeaderParams = new HashMap(); @@ -2096,7 +2122,7 @@ public CompletableFuture> createIncidentTypeWi try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentType", + "v2.IncidentsApi.createIncidentNotificationTemplate", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2104,7 +2130,8 @@ public CompletableFuture> createIncidentTypeWi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -2116,54 +2143,36 @@ public CompletableFuture> createIncidentTypeWi localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to createIncidentUserDefinedField. */ - public static class CreateIncidentUserDefinedFieldOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of related resources to include. Supported values are - * "last_modified_by_user", "created_by_user", and "incident_type". (optional) - * @return CreateIncidentUserDefinedFieldOptionalParameters - */ - public CreateIncidentUserDefinedFieldOptionalParameters include(String include) { - this.include = include; - return this; - } + new GenericType() {}); } /** - * Create an incident user-defined field. + * Create postmortem attachment. * - *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #createIncidentPostmortemAttachmentWithHttpInfo}. * - * @param body Incident user-defined field payload. (required) - * @return IncidentUserDefinedFieldResponse + * @param incidentId The ID of the incident (required) + * @param body (required) + * @return Attachment * @throws ApiException if fails to make API call */ - public IncidentUserDefinedFieldResponse createIncidentUserDefinedField( - IncidentUserDefinedFieldCreateRequest body) throws ApiException { - return createIncidentUserDefinedFieldWithHttpInfo( - body, new CreateIncidentUserDefinedFieldOptionalParameters()) - .getData(); + public Attachment createIncidentPostmortemAttachment( + String incidentId, PostmortemAttachmentRequest body) throws ApiException { + return createIncidentPostmortemAttachmentWithHttpInfo(incidentId, body).getData(); } /** - * Create an incident user-defined field. + * Create postmortem attachment. * - *

See {@link #createIncidentUserDefinedFieldWithHttpInfoAsync}. + *

See {@link #createIncidentPostmortemAttachmentWithHttpInfoAsync}. * - * @param body Incident user-defined field payload. (required) - * @return CompletableFuture<IncidentUserDefinedFieldResponse> + * @param incidentId The ID of the incident (required) + * @param body (required) + * @return CompletableFuture<Attachment> */ - public CompletableFuture createIncidentUserDefinedFieldAsync( - IncidentUserDefinedFieldCreateRequest body) { - return createIncidentUserDefinedFieldWithHttpInfoAsync( - body, new CreateIncidentUserDefinedFieldOptionalParameters()) + public CompletableFuture createIncidentPostmortemAttachmentAsync( + String incidentId, PostmortemAttachmentRequest body) { + return createIncidentPostmortemAttachmentWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -2171,66 +2180,29 @@ body, new CreateIncidentUserDefinedFieldOptionalParameters()) } /** - * Create an incident user-defined field. - * - *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. - * - * @param body Incident user-defined field payload. (required) - * @param parameters Optional parameters for the request. - * @return IncidentUserDefinedFieldResponse - * @throws ApiException if fails to make API call - */ - public IncidentUserDefinedFieldResponse createIncidentUserDefinedField( - IncidentUserDefinedFieldCreateRequest body, - CreateIncidentUserDefinedFieldOptionalParameters parameters) - throws ApiException { - return createIncidentUserDefinedFieldWithHttpInfo(body, parameters).getData(); - } - - /** - * Create an incident user-defined field. - * - *

See {@link #createIncidentUserDefinedFieldWithHttpInfoAsync}. + * Create a postmortem attachment for an incident. * - * @param body Incident user-defined field payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentUserDefinedFieldResponse> - */ - public CompletableFuture createIncidentUserDefinedFieldAsync( - IncidentUserDefinedFieldCreateRequest body, - CreateIncidentUserDefinedFieldOptionalParameters parameters) { - return createIncidentUserDefinedFieldWithHttpInfoAsync(body, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Create an incident user-defined field. + *

The endpoint accepts markdown for notebooks created in Confluence or Google Docs. + * Postmortems created from notebooks need to be formatted using frontend notebook cells, in + * addition to markdown format. * - * @param body Incident user-defined field payload. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentUserDefinedFieldResponse> + * @param incidentId The ID of the incident (required) + * @param body (required) + * @return ApiResponse<Attachment> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * - * * *
Response details
Status Code Description Response Headers
201 CREATED -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse createIncidentUserDefinedFieldWithHttpInfo( - IncidentUserDefinedFieldCreateRequest body, - CreateIncidentUserDefinedFieldOptionalParameters parameters) - throws ApiException { + public ApiResponse createIncidentPostmortemAttachmentWithHttpInfo( + String incidentId, PostmortemAttachmentRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentUserDefinedField"; + String operationId = "createIncidentPostmortemAttachment"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -2238,29 +2210,37 @@ public ApiResponse createIncidentUserDefinedFi } Object localVarPostBody = body; + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling" + + " createIncidentPostmortemAttachment"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentUserDefinedField"); + 400, + "Missing the required parameter 'body' when calling createIncidentPostmortemAttachment"); } - String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/user-defined-fields"; + String localVarPath = + "/api/v2/incidents/{incident_id}/attachments/postmortems" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentUserDefinedField", + "v2.IncidentsApi.createIncidentPostmortemAttachment", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( "POST", builder, @@ -2269,68 +2249,75 @@ public ApiResponse createIncidentUserDefinedFi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident user-defined field. + * Create postmortem attachment. * - *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #createIncidentPostmortemAttachmentWithHttpInfo}. * - * @param body Incident user-defined field payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldResponse>> + * @param incidentId The ID of the incident (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<Attachment>> */ - public CompletableFuture> - createIncidentUserDefinedFieldWithHttpInfoAsync( - IncidentUserDefinedFieldCreateRequest body, - CreateIncidentUserDefinedFieldOptionalParameters parameters) { + public CompletableFuture> + createIncidentPostmortemAttachmentWithHttpInfoAsync( + String incidentId, PostmortemAttachmentRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentUserDefinedField"; + String operationId = "createIncidentPostmortemAttachment"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling createIncidentUserDefinedField")); + "Missing the required parameter 'incidentId' when calling" + + " createIncidentPostmortemAttachment")); return result; } - String include = parameters.include; - // create path and map variables - String localVarPath = "/api/v2/incidents/config/user-defined-fields"; - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " createIncidentPostmortemAttachment")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/attachments/postmortems" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Map localVarHeaderParams = new HashMap(); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentUserDefinedField", + "v2.IncidentsApi.createIncidentPostmortemAttachment", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -2342,29 +2329,34 @@ public ApiResponse createIncidentUserDefinedFi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Delete global incident handle. + * Create postmortem template. * - *

See {@link #deleteGlobalIncidentHandleWithHttpInfo}. + *

See {@link #createIncidentPostmortemTemplateWithHttpInfo}. * + * @param body (required) + * @return PostmortemTemplateResponse * @throws ApiException if fails to make API call */ - public void deleteGlobalIncidentHandle() throws ApiException { - deleteGlobalIncidentHandleWithHttpInfo(); + public PostmortemTemplateResponse createIncidentPostmortemTemplate(PostmortemTemplateRequest body) + throws ApiException { + return createIncidentPostmortemTemplateWithHttpInfo(body).getData(); } /** - * Delete global incident handle. + * Create postmortem template. * - *

See {@link #deleteGlobalIncidentHandleWithHttpInfoAsync}. + *

See {@link #createIncidentPostmortemTemplateWithHttpInfoAsync}. * - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<PostmortemTemplateResponse> */ - public CompletableFuture deleteGlobalIncidentHandleAsync() { - return deleteGlobalIncidentHandleWithHttpInfoAsync() + public CompletableFuture createIncidentPostmortemTemplateAsync( + PostmortemTemplateRequest body) { + return createIncidentPostmortemTemplateWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -2372,74 +2364,97 @@ public CompletableFuture deleteGlobalIncidentHandleAsync() { } /** - * Delete a global incident handle. + * Create a new postmortem template for incidents. * - * @return ApiResponse<Void> + * @param body (required) + * @return ApiResponse<PostmortemTemplateResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * + * * *
Response details
Status Code Description Response Headers
204 No Content -
201 Created -
400 Bad Request -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteGlobalIncidentHandleWithHttpInfo() throws ApiException { + public ApiResponse createIncidentPostmortemTemplateWithHttpInfo( + PostmortemTemplateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteGlobalIncidentHandle"; + String operationId = "createIncidentPostmortemTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling createIncidentPostmortemTemplate"); + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = "/api/v2/incidents/config/postmortem-templates"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteGlobalIncidentHandle", + "v2.IncidentsApi.createIncidentPostmortemTemplate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete global incident handle. + * Create postmortem template. * - *

See {@link #deleteGlobalIncidentHandleWithHttpInfo}. + *

See {@link #createIncidentPostmortemTemplateWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @return CompletableFuture<ApiResponse<PostmortemTemplateResponse>> */ - public CompletableFuture> deleteGlobalIncidentHandleWithHttpInfoAsync() { + public CompletableFuture> + createIncidentPostmortemTemplateWithHttpInfoAsync(PostmortemTemplateRequest body) { // Check if unstable operation is enabled - String operationId = "deleteGlobalIncidentHandle"; + String operationId = "createIncidentPostmortemTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " createIncidentPostmortemTemplate")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = "/api/v2/incidents/config/postmortem-templates"; Map localVarHeaderParams = new HashMap(); @@ -2447,51 +2462,56 @@ public CompletableFuture> deleteGlobalIncidentHandleWithHttpIn try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteGlobalIncidentHandle", + "v2.IncidentsApi.createIncidentPostmortemTemplate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an existing incident. + * Create an incident responder. * - *

See {@link #deleteIncidentWithHttpInfo}. + *

See {@link #createIncidentResponderWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) + * @param body Incident responder payload. (required) + * @return IncidentResponderResponse * @throws ApiException if fails to make API call */ - public void deleteIncident(String incidentId) throws ApiException { - deleteIncidentWithHttpInfo(incidentId); + public IncidentResponderResponse createIncidentResponder( + String incidentId, IncidentResponderRequest body) throws ApiException { + return createIncidentResponderWithHttpInfo(incidentId, body).getData(); } /** - * Delete an existing incident. + * Create an incident responder. * - *

See {@link #deleteIncidentWithHttpInfoAsync}. + *

See {@link #createIncidentResponderWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture + * @param body Incident responder payload. (required) + * @return CompletableFuture<IncidentResponderResponse> */ - public CompletableFuture deleteIncidentAsync(String incidentId) { - return deleteIncidentWithHttpInfoAsync(incidentId) + public CompletableFuture createIncidentResponderAsync( + String incidentId, IncidentResponderRequest body) { + return createIncidentResponderWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -2499,16 +2519,17 @@ public CompletableFuture deleteIncidentAsync(String incidentId) { } /** - * Deletes an existing incident from the users organization. + * Add a responder to an incident. * * @param incidentId The UUID of the incident. (required) - * @return ApiResponse<Void> + * @param body Incident responder payload. (required) + * @return ApiResponse<IncidentResponderResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -2516,24 +2537,31 @@ public CompletableFuture deleteIncidentAsync(String incidentId) { * *
Response details
Status Code Description Response Headers
204 OK -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentWithHttpInfo(String incidentId) throws ApiException { + public ApiResponse createIncidentResponderWithHttpInfo( + String incidentId, IncidentResponderRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncident"; + String operationId = "createIncidentResponder"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling deleteIncident"); + 400, "Missing the required parameter 'incidentId' when calling createIncidentResponder"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createIncidentResponder"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}" + "/api/v2/incidents/{incident_id}/responders" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); @@ -2541,56 +2569,68 @@ public ApiResponse deleteIncidentWithHttpInfo(String incidentId) throws Ap Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncident", + "v2.IncidentsApi.createIncidentResponder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an existing incident. + * Create an incident responder. * - *

See {@link #deleteIncidentWithHttpInfo}. + *

See {@link #createIncidentResponderWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body Incident responder payload. (required) + * @return CompletableFuture<ApiResponse<IncidentResponderResponse>> */ - public CompletableFuture> deleteIncidentWithHttpInfoAsync(String incidentId) { + public CompletableFuture> + createIncidentResponderWithHttpInfoAsync(String incidentId, IncidentResponderRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncident"; + String operationId = "createIncidentResponder"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentId' when calling deleteIncident")); + 400, + "Missing the required parameter 'incidentId' when calling createIncidentResponder")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createIncidentResponder")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}" + "/api/v2/incidents/{incident_id}/responders" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); @@ -2600,54 +2640,52 @@ public CompletableFuture> deleteIncidentWithHttpInfoAsync(Stri try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncident", + "v2.IncidentsApi.createIncidentResponder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete incident attachment. + * Create an incident rule. * - *

See {@link #deleteIncidentAttachmentWithHttpInfo}. + *

See {@link #createIncidentRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param body Incident rule payload. (required) + * @return IncidentRuleResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentAttachment(String incidentId, String attachmentId) throws ApiException { - deleteIncidentAttachmentWithHttpInfo(incidentId, attachmentId); + public IncidentRuleResponse createIncidentRule(IncidentRuleRequest body) throws ApiException { + return createIncidentRuleWithHttpInfo(body).getData(); } /** - * Delete incident attachment. + * Create an incident rule. * - *

See {@link #deleteIncidentAttachmentWithHttpInfoAsync}. + *

See {@link #createIncidentRuleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) - * @return CompletableFuture + * @param body Incident rule payload. (required) + * @return CompletableFuture<IncidentRuleResponse> */ - public CompletableFuture deleteIncidentAttachmentAsync( - String incidentId, String attachmentId) { - return deleteIncidentAttachmentWithHttpInfoAsync(incidentId, attachmentId) + public CompletableFuture createIncidentRuleAsync(IncidentRuleRequest body) { + return createIncidentRuleWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -2655,124 +2693,95 @@ public CompletableFuture deleteIncidentAttachmentAsync( } /** - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) - * @return ApiResponse<Void> + * Create an incident rule. + * + * @param body Incident rule payload. (required) + * @return ApiResponse<IncidentRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * + * * - * * *
Response details
Status Code Description Response Headers
204 No Content -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteIncidentAttachmentWithHttpInfo( - String incidentId, String attachmentId) throws ApiException { + public ApiResponse createIncidentRuleWithHttpInfo(IncidentRuleRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentAttachment"; + String operationId = "createIncidentRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; - - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling deleteIncidentAttachment"); - } + Object localVarPostBody = body; - // verify the required parameter 'attachmentId' is set - if (attachmentId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'attachmentId' when calling deleteIncidentAttachment"); + 400, "Missing the required parameter 'body' when calling createIncidentRule"); } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll( - "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + String localVarPath = "/api/v2/incidents/config/rules"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentAttachment", + "v2.IncidentsApi.createIncidentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete incident attachment. + * Create an incident rule. * - *

See {@link #deleteIncidentAttachmentWithHttpInfo}. + *

See {@link #createIncidentRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body Incident rule payload. (required) + * @return CompletableFuture<ApiResponse<IncidentRuleResponse>> */ - public CompletableFuture> deleteIncidentAttachmentWithHttpInfoAsync( - String incidentId, String attachmentId) { + public CompletableFuture> createIncidentRuleWithHttpInfoAsync( + IncidentRuleRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentAttachment"; + String operationId = "createIncidentRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling deleteIncidentAttachment")); - return result; - } - - // verify the required parameter 'attachmentId' is set - if (attachmentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'attachmentId' when calling" - + " deleteIncidentAttachment")); + 400, "Missing the required parameter 'body' when calling createIncidentRule")); return result; } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll( - "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + String localVarPath = "/api/v2/incidents/config/rules"; Map localVarHeaderParams = new HashMap(); @@ -2780,53 +2789,56 @@ public CompletableFuture> deleteIncidentAttachmentWithHttpInfo try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentAttachment", + "v2.IncidentsApi.createIncidentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident impact. + * Create an incident ServiceNow record. * - *

See {@link #deleteIncidentImpactWithHttpInfo}. + *

See {@link #createIncidentServiceNowRecordWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param impactId The UUID of the incident impact. (required) + * @param body ServiceNow record payload. (required) + * @return IncidentIntegrationMetadataResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentImpact(String incidentId, String impactId) throws ApiException { - deleteIncidentImpactWithHttpInfo(incidentId, impactId); + public IncidentIntegrationMetadataResponse createIncidentServiceNowRecord( + String incidentId, IncidentServiceNowRecordRequest body) throws ApiException { + return createIncidentServiceNowRecordWithHttpInfo(incidentId, body).getData(); } /** - * Delete an incident impact. + * Create an incident ServiceNow record. * - *

See {@link #deleteIncidentImpactWithHttpInfoAsync}. + *

See {@link #createIncidentServiceNowRecordWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param impactId The UUID of the incident impact. (required) - * @return CompletableFuture + * @param body ServiceNow record payload. (required) + * @return CompletableFuture<IncidentIntegrationMetadataResponse> */ - public CompletableFuture deleteIncidentImpactAsync(String incidentId, String impactId) { - return deleteIncidentImpactWithHttpInfoAsync(incidentId, impactId) + public CompletableFuture createIncidentServiceNowRecordAsync( + String incidentId, IncidentServiceNowRecordRequest body) { + return createIncidentServiceNowRecordWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -2834,104 +2846,129 @@ public CompletableFuture deleteIncidentImpactAsync(String incidentId, Stri } /** - * Delete an incident impact. + * Create a ServiceNow record for an incident. * * @param incidentId The UUID of the incident. (required) - * @param impactId The UUID of the incident impact. (required) - * @return ApiResponse<Void> + * @param body ServiceNow record payload. (required) + * @return ApiResponse<IncidentIntegrationMetadataResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * + * * * * * *
Response details
Status Code Description Response Headers
204 No Content -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteIncidentImpactWithHttpInfo(String incidentId, String impactId) - throws ApiException { - Object localVarPostBody = null; + public ApiResponse + createIncidentServiceNowRecordWithHttpInfo( + String incidentId, IncidentServiceNowRecordRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createIncidentServiceNowRecord"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling deleteIncidentImpact"); + 400, + "Missing the required parameter 'incidentId' when calling" + + " createIncidentServiceNowRecord"); } - // verify the required parameter 'impactId' is set - if (impactId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'impactId' when calling deleteIncidentImpact"); + 400, "Missing the required parameter 'body' when calling createIncidentServiceNowRecord"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + "/api/v2/incidents/{incident_id}/servicenow-records" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "impact_id" + "\\}", apiClient.escapeString(impactId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentImpact", + "v2.IncidentsApi.createIncidentServiceNowRecord", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident impact. + * Create an incident ServiceNow record. * - *

See {@link #deleteIncidentImpactWithHttpInfo}. + *

See {@link #createIncidentServiceNowRecordWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param impactId The UUID of the incident impact. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body ServiceNow record payload. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> */ - public CompletableFuture> deleteIncidentImpactWithHttpInfoAsync( - String incidentId, String impactId) { - Object localVarPostBody = null; + public CompletableFuture> + createIncidentServiceNowRecordWithHttpInfoAsync( + String incidentId, IncidentServiceNowRecordRequest body) { + // Check if unstable operation is enabled + String operationId = "createIncidentServiceNowRecord"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentId' when calling deleteIncidentImpact")); + "Missing the required parameter 'incidentId' when calling" + + " createIncidentServiceNowRecord")); return result; } - // verify the required parameter 'impactId' is set - if (impactId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'impactId' when calling deleteIncidentImpact")); + 400, + "Missing the required parameter 'body' when calling createIncidentServiceNowRecord")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + "/api/v2/incidents/{incident_id}/servicenow-records" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "impact_id" + "\\}", apiClient.escapeString(impactId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -2939,55 +2976,57 @@ public CompletableFuture> deleteIncidentImpactWithHttpInfoAsyn try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentImpact", + "v2.IncidentsApi.createIncidentServiceNowRecord", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident integration metadata. + * Create an incident todo. * - *

See {@link #deleteIncidentIntegrationWithHttpInfo}. + *

See {@link #createIncidentTodoWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @param body Incident todo payload. (required) + * @return IncidentTodoResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentIntegration(String incidentId, String integrationMetadataId) + public IncidentTodoResponse createIncidentTodo(String incidentId, IncidentTodoCreateRequest body) throws ApiException { - deleteIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId); + return createIncidentTodoWithHttpInfo(incidentId, body).getData(); } /** - * Delete an incident integration metadata. + * Create an incident todo. * - *

See {@link #deleteIncidentIntegrationWithHttpInfoAsync}. + *

See {@link #createIncidentTodoWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return CompletableFuture + * @param body Incident todo payload. (required) + * @return CompletableFuture<IncidentTodoResponse> */ - public CompletableFuture deleteIncidentIntegrationAsync( - String incidentId, String integrationMetadataId) { - return deleteIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId) + public CompletableFuture createIncidentTodoAsync( + String incidentId, IncidentTodoCreateRequest body) { + return createIncidentTodoWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -2995,17 +3034,17 @@ public CompletableFuture deleteIncidentIntegrationAsync( } /** - * Delete an incident integration metadata. + * Create an incident todo. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return ApiResponse<Void> + * @param body Incident todo payload. (required) + * @return ApiResponse<IncidentTodoResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -3013,114 +3052,101 @@ public CompletableFuture deleteIncidentIntegrationAsync( * *
Response details
Status Code Description Response Headers
204 OK -
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentIntegrationWithHttpInfo( - String incidentId, String integrationMetadataId) throws ApiException { + public ApiResponse createIncidentTodoWithHttpInfo( + String incidentId, IncidentTodoCreateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentIntegration"; + String operationId = "createIncidentTodo"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling deleteIncidentIntegration"); + 400, "Missing the required parameter 'incidentId' when calling createIncidentTodo"); } - // verify the required parameter 'integrationMetadataId' is set - if (integrationMetadataId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'integrationMetadataId' when calling" - + " deleteIncidentIntegration"); + 400, "Missing the required parameter 'body' when calling createIncidentTodo"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + "/api/v2/incidents/{incident_id}/relationships/todos" .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentIntegration", + "v2.IncidentsApi.createIncidentTodo", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident integration metadata. + * Create an incident todo. * - *

See {@link #deleteIncidentIntegrationWithHttpInfo}. + *

See {@link #createIncidentTodoWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body Incident todo payload. (required) + * @return CompletableFuture<ApiResponse<IncidentTodoResponse>> */ - public CompletableFuture> deleteIncidentIntegrationWithHttpInfoAsync( - String incidentId, String integrationMetadataId) { + public CompletableFuture> createIncidentTodoWithHttpInfoAsync( + String incidentId, IncidentTodoCreateRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentIntegration"; + String operationId = "createIncidentTodo"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling" - + " deleteIncidentIntegration")); + 400, "Missing the required parameter 'incidentId' when calling createIncidentTodo")); return result; } - // verify the required parameter 'integrationMetadataId' is set - if (integrationMetadataId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'integrationMetadataId' when calling" - + " deleteIncidentIntegration")); + 400, "Missing the required parameter 'body' when calling createIncidentTodo")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + "/api/v2/incidents/{incident_id}/relationships/todos" .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -3128,103 +3154,54 @@ public CompletableFuture> deleteIncidentIntegrationWithHttpInf try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentIntegration", + "v2.IncidentsApi.createIncidentTodo", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); - } - - /** Manage optional parameters to deleteIncidentNotificationRule. */ - public static class DeleteIncidentNotificationRuleOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of resources to include. Supported values: - * created_by_user, last_modified_by_user, incident_type, - * notification_template (optional) - * @return DeleteIncidentNotificationRuleOptionalParameters - */ - public DeleteIncidentNotificationRuleOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * Delete an incident notification rule. - * - *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. - * - * @param id The ID of the notification rule. (required) - * @throws ApiException if fails to make API call - */ - public void deleteIncidentNotificationRule(UUID id) throws ApiException { - deleteIncidentNotificationRuleWithHttpInfo( - id, new DeleteIncidentNotificationRuleOptionalParameters()); - } - - /** - * Delete an incident notification rule. - * - *

See {@link #deleteIncidentNotificationRuleWithHttpInfoAsync}. - * - * @param id The ID of the notification rule. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteIncidentNotificationRuleAsync(UUID id) { - return deleteIncidentNotificationRuleWithHttpInfoAsync( - id, new DeleteIncidentNotificationRuleOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Delete an incident notification rule. + * Create an incident type. * - *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createIncidentTypeWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. + * @param body Incident type payload. (required) + * @return IncidentTypeResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentNotificationRule( - UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) throws ApiException { - deleteIncidentNotificationRuleWithHttpInfo(id, parameters); + public IncidentTypeResponse createIncidentType(IncidentTypeCreateRequest body) + throws ApiException { + return createIncidentTypeWithHttpInfo(body).getData(); } /** - * Delete an incident notification rule. + * Create an incident type. * - *

See {@link #deleteIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #createIncidentTypeWithHttpInfoAsync}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture + * @param body Incident type payload. (required) + * @return CompletableFuture<IncidentTypeResponse> */ - public CompletableFuture deleteIncidentNotificationRuleAsync( - UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) { - return deleteIncidentNotificationRuleWithHttpInfoAsync(id, parameters) + public CompletableFuture createIncidentTypeAsync( + IncidentTypeCreateRequest body) { + return createIncidentTypeWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -3232,17 +3209,16 @@ public CompletableFuture deleteIncidentNotificationRuleAsync( } /** - * Deletes a notification rule by its ID. + * Create an incident type. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<Void> + * @param body Incident type payload. (required) + * @return ApiResponse<IncidentTypeResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -3250,165 +3226,154 @@ public CompletableFuture deleteIncidentNotificationRuleAsync( * *
Response details
Status Code Description Response Headers
204 No Content -
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentNotificationRuleWithHttpInfo( - UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) throws ApiException { + public ApiResponse createIncidentTypeWithHttpInfo( + IncidentTypeCreateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentNotificationRule"; + String operationId = "createIncidentType"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'id' when calling deleteIncidentNotificationRule"); + 400, "Missing the required parameter 'body' when calling createIncidentType"); } - String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/config/notification-rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/incidents/config/types"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentNotificationRule", + "v2.IncidentsApi.createIncidentType", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident notification rule. + * Create an incident type. * - *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createIncidentTypeWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<Void>> + * @param body Incident type payload. (required) + * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> */ - public CompletableFuture> deleteIncidentNotificationRuleWithHttpInfoAsync( - UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) { + public CompletableFuture> createIncidentTypeWithHttpInfoAsync( + IncidentTypeCreateRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentNotificationRule"; + String operationId = "createIncidentType"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'id' when calling deleteIncidentNotificationRule")); + 400, "Missing the required parameter 'body' when calling createIncidentType")); return result; } - String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/config/notification-rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/incidents/config/types"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentNotificationRule", + "v2.IncidentsApi.createIncidentType", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } - /** Manage optional parameters to deleteIncidentNotificationTemplate. */ - public static class DeleteIncidentNotificationTemplateOptionalParameters { + /** Manage optional parameters to createIncidentUserDefinedField. */ + public static class CreateIncidentUserDefinedFieldOptionalParameters { private String include; /** * Set include. * - * @param include Comma-separated list of relationships to include. Supported values: - * created_by_user, last_modified_by_user, incident_type - * (optional) - * @return DeleteIncidentNotificationTemplateOptionalParameters + * @param include Comma-separated list of related resources to include. Supported values are + * "last_modified_by_user", "created_by_user", and "incident_type". (optional) + * @return CreateIncidentUserDefinedFieldOptionalParameters */ - public DeleteIncidentNotificationTemplateOptionalParameters include(String include) { + public CreateIncidentUserDefinedFieldOptionalParameters include(String include) { this.include = include; return this; } } /** - * Delete a notification template. + * Create an incident user-defined field. * - *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. * - * @param id The ID of the notification template. (required) + * @param body Incident user-defined field payload. (required) + * @return IncidentUserDefinedFieldResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentNotificationTemplate(UUID id) throws ApiException { - deleteIncidentNotificationTemplateWithHttpInfo( - id, new DeleteIncidentNotificationTemplateOptionalParameters()); + public IncidentUserDefinedFieldResponse createIncidentUserDefinedField( + IncidentUserDefinedFieldCreateRequest body) throws ApiException { + return createIncidentUserDefinedFieldWithHttpInfo( + body, new CreateIncidentUserDefinedFieldOptionalParameters()) + .getData(); } /** - * Delete a notification template. + * Create an incident user-defined field. * - *

See {@link #deleteIncidentNotificationTemplateWithHttpInfoAsync}. + *

See {@link #createIncidentUserDefinedFieldWithHttpInfoAsync}. * - * @param id The ID of the notification template. (required) - * @return CompletableFuture + * @param body Incident user-defined field payload. (required) + * @return CompletableFuture<IncidentUserDefinedFieldResponse> */ - public CompletableFuture deleteIncidentNotificationTemplateAsync(UUID id) { - return deleteIncidentNotificationTemplateWithHttpInfoAsync( - id, new DeleteIncidentNotificationTemplateOptionalParameters()) + public CompletableFuture createIncidentUserDefinedFieldAsync( + IncidentUserDefinedFieldCreateRequest body) { + return createIncidentUserDefinedFieldWithHttpInfoAsync( + body, new CreateIncidentUserDefinedFieldOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -3416,32 +3381,35 @@ id, new DeleteIncidentNotificationTemplateOptionalParameters()) } /** - * Delete a notification template. + * Create an incident user-defined field. * - *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. * - * @param id The ID of the notification template. (required) + * @param body Incident user-defined field payload. (required) * @param parameters Optional parameters for the request. + * @return IncidentUserDefinedFieldResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentNotificationTemplate( - UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) + public IncidentUserDefinedFieldResponse createIncidentUserDefinedField( + IncidentUserDefinedFieldCreateRequest body, + CreateIncidentUserDefinedFieldOptionalParameters parameters) throws ApiException { - deleteIncidentNotificationTemplateWithHttpInfo(id, parameters); + return createIncidentUserDefinedFieldWithHttpInfo(body, parameters).getData(); } /** - * Delete a notification template. + * Create an incident user-defined field. * - *

See {@link #deleteIncidentNotificationTemplateWithHttpInfoAsync}. + *

See {@link #createIncidentUserDefinedFieldWithHttpInfoAsync}. * - * @param id The ID of the notification template. (required) + * @param body Incident user-defined field payload. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture + * @return CompletableFuture<IncidentUserDefinedFieldResponse> */ - public CompletableFuture deleteIncidentNotificationTemplateAsync( - UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) { - return deleteIncidentNotificationTemplateWithHttpInfoAsync(id, parameters) + public CompletableFuture createIncidentUserDefinedFieldAsync( + IncidentUserDefinedFieldCreateRequest body, + CreateIncidentUserDefinedFieldOptionalParameters parameters) { + return createIncidentUserDefinedFieldWithHttpInfoAsync(body, parameters) .thenApply( response -> { return response.getData(); @@ -3449,17 +3417,17 @@ public CompletableFuture deleteIncidentNotificationTemplateAsync( } /** - * Deletes a notification template by its ID. + * Create an incident user-defined field. * - * @param id The ID of the notification template. (required) + * @param body Incident user-defined field payload. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<Void> + * @return ApiResponse<IncidentUserDefinedFieldResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -3467,29 +3435,27 @@ public CompletableFuture deleteIncidentNotificationTemplateAsync( * *
Response details
Status Code Description Response Headers
204 No Content -
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentNotificationTemplateWithHttpInfo( - UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) + public ApiResponse createIncidentUserDefinedFieldWithHttpInfo( + IncidentUserDefinedFieldCreateRequest body, + CreateIncidentUserDefinedFieldOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentNotificationTemplate"; + String operationId = "createIncidentUserDefinedField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'id' when calling deleteIncidentNotificationTemplate"); + 400, "Missing the required parameter 'body' when calling createIncidentUserDefinedField"); } String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/config/notification-templates/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/incidents/config/user-defined-fields"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -3498,62 +3464,63 @@ public ApiResponse deleteIncidentNotificationTemplateWithHttpInfo( Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentNotificationTemplate", + "v2.IncidentsApi.createIncidentUserDefinedField", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete a notification template. + * Create an incident user-defined field. * - *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. * - * @param id The ID of the notification template. (required) + * @param body Incident user-defined field payload. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<Void>> + * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldResponse>> */ - public CompletableFuture> deleteIncidentNotificationTemplateWithHttpInfoAsync( - UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) { + public CompletableFuture> + createIncidentUserDefinedFieldWithHttpInfoAsync( + IncidentUserDefinedFieldCreateRequest body, + CreateIncidentUserDefinedFieldOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "deleteIncidentNotificationTemplate"; + String operationId = "createIncidentUserDefinedField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'id' when calling" - + " deleteIncidentNotificationTemplate")); + "Missing the required parameter 'body' when calling createIncidentUserDefinedField")); return result; } String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/config/notification-templates/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/incidents/config/user-defined-fields"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -3564,51 +3531,75 @@ public CompletableFuture> deleteIncidentNotificationTemplateWi try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentNotificationTemplate", + "v2.IncidentsApi.createIncidentUserDefinedField", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); + } + + /** Manage optional parameters to createIncidentUserDefinedRole. */ + public static class CreateIncidentUserDefinedRoleOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include in the response. + * (optional) + * @return CreateIncidentUserDefinedRoleOptionalParameters + */ + public CreateIncidentUserDefinedRoleOptionalParameters include(String include) { + this.include = include; + return this; + } } /** - * Delete postmortem template. + * Create an incident user-defined role. * - *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #createIncidentUserDefinedRoleWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) + * @param body (required) + * @return IncidentUserDefinedRoleResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentPostmortemTemplate(String templateId) throws ApiException { - deleteIncidentPostmortemTemplateWithHttpInfo(templateId); + public IncidentUserDefinedRoleResponse createIncidentUserDefinedRole( + IncidentUserDefinedRoleRequest body) throws ApiException { + return createIncidentUserDefinedRoleWithHttpInfo( + body, new CreateIncidentUserDefinedRoleOptionalParameters()) + .getData(); } /** - * Delete postmortem template. + * Create an incident user-defined role. * - *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfoAsync}. + *

See {@link #createIncidentUserDefinedRoleWithHttpInfoAsync}. * - * @param templateId The ID of the postmortem template (required) - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<IncidentUserDefinedRoleResponse> */ - public CompletableFuture deleteIncidentPostmortemTemplateAsync(String templateId) { - return deleteIncidentPostmortemTemplateWithHttpInfoAsync(templateId) + public CompletableFuture createIncidentUserDefinedRoleAsync( + IncidentUserDefinedRoleRequest body) { + return createIncidentUserDefinedRoleWithHttpInfoAsync( + body, new CreateIncidentUserDefinedRoleOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -3616,158 +3607,205 @@ public CompletableFuture deleteIncidentPostmortemTemplateAsync(String temp } /** - * Delete a postmortem template. + * Create an incident user-defined role. * - * @param templateId The ID of the postmortem template (required) - * @return ApiResponse<Void> + *

See {@link #createIncidentUserDefinedRoleWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return IncidentUserDefinedRoleResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedRoleResponse createIncidentUserDefinedRole( + IncidentUserDefinedRoleRequest body, + CreateIncidentUserDefinedRoleOptionalParameters parameters) + throws ApiException { + return createIncidentUserDefinedRoleWithHttpInfo(body, parameters).getData(); + } + + /** + * Create an incident user-defined role. + * + *

See {@link #createIncidentUserDefinedRoleWithHttpInfoAsync}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentUserDefinedRoleResponse> + */ + public CompletableFuture createIncidentUserDefinedRoleAsync( + IncidentUserDefinedRoleRequest body, + CreateIncidentUserDefinedRoleOptionalParameters parameters) { + return createIncidentUserDefinedRoleWithHttpInfoAsync(body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new user-defined role for incidents. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentUserDefinedRoleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * * *
Response details
Status Code Description Response Headers
204 No Content -
201 Created -
400 Bad Request -
404 Not Found -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentPostmortemTemplateWithHttpInfo(String templateId) + public ApiResponse createIncidentUserDefinedRoleWithHttpInfo( + IncidentUserDefinedRoleRequest body, + CreateIncidentUserDefinedRoleOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentPostmortemTemplate"; + String operationId = "createIncidentUserDefinedRole"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'templateId' is set - if (templateId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling" - + " deleteIncidentPostmortemTemplate"); + 400, "Missing the required parameter 'body' when calling createIncidentUserDefinedRole"); } + String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" - .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + String localVarPath = "/api/v2/incidents/config/user-defined-roles"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentPostmortemTemplate", + "v2.IncidentsApi.createIncidentUserDefinedRole", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete postmortem template. + * Create an incident user-defined role. * - *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #createIncidentUserDefinedRoleWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentUserDefinedRoleResponse>> */ - public CompletableFuture> deleteIncidentPostmortemTemplateWithHttpInfoAsync( - String templateId) { + public CompletableFuture> + createIncidentUserDefinedRoleWithHttpInfoAsync( + IncidentUserDefinedRoleRequest body, + CreateIncidentUserDefinedRoleOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "deleteIncidentPostmortemTemplate"; + String operationId = "createIncidentUserDefinedRole"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'templateId' is set - if (templateId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'templateId' when calling" - + " deleteIncidentPostmortemTemplate")); + "Missing the required parameter 'body' when calling createIncidentUserDefinedRole")); return result; } + String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" - .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + String localVarPath = "/api/v2/incidents/config/user-defined-roles"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentPostmortemTemplate", + "v2.IncidentsApi.createIncidentUserDefinedRole", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident todo. + * Create an on-call page from an incident. * - *

See {@link #deleteIncidentTodoWithHttpInfo}. + *

See {@link #createOnCallPageFromIncidentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) + * @param body On-call page creation payload. (required) + * @return IncidentPageUUIDResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentTodo(String incidentId, String todoId) throws ApiException { - deleteIncidentTodoWithHttpInfo(incidentId, todoId); + public IncidentPageUUIDResponse createOnCallPageFromIncident( + String incidentId, IncidentCreateOnCallPageRequest body) throws ApiException { + return createOnCallPageFromIncidentWithHttpInfo(incidentId, body).getData(); } /** - * Delete an incident todo. + * Create an on-call page from an incident. * - *

See {@link #deleteIncidentTodoWithHttpInfoAsync}. + *

See {@link #createOnCallPageFromIncidentWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return CompletableFuture + * @param body On-call page creation payload. (required) + * @return CompletableFuture<IncidentPageUUIDResponse> */ - public CompletableFuture deleteIncidentTodoAsync(String incidentId, String todoId) { - return deleteIncidentTodoWithHttpInfoAsync(incidentId, todoId) + public CompletableFuture createOnCallPageFromIncidentAsync( + String incidentId, IncidentCreateOnCallPageRequest body) { + return createOnCallPageFromIncidentWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -3775,17 +3813,17 @@ public CompletableFuture deleteIncidentTodoAsync(String incidentId, String } /** - * Delete an incident todo. + * Create an on-call page directly from an incident. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return ApiResponse<Void> + * @param body On-call page creation payload. (required) + * @return ApiResponse<IncidentPageUUIDResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -3793,103 +3831,106 @@ public CompletableFuture deleteIncidentTodoAsync(String incidentId, String * *
Response details
Status Code Description Response Headers
204 OK -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentTodoWithHttpInfo(String incidentId, String todoId) - throws ApiException { + public ApiResponse createOnCallPageFromIncidentWithHttpInfo( + String incidentId, IncidentCreateOnCallPageRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentTodo"; + String operationId = "createOnCallPageFromIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling deleteIncidentTodo"); + 400, + "Missing the required parameter 'incidentId' when calling createOnCallPageFromIncident"); } - // verify the required parameter 'todoId' is set - if (todoId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'todoId' when calling deleteIncidentTodo"); + 400, "Missing the required parameter 'body' when calling createOnCallPageFromIncident"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + "/api/v2/incidents/{incident_id}/page" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentTodo", + "v2.IncidentsApi.createOnCallPageFromIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident todo. + * Create an on-call page from an incident. * - *

See {@link #deleteIncidentTodoWithHttpInfo}. + *

See {@link #createOnCallPageFromIncidentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body On-call page creation payload. (required) + * @return CompletableFuture<ApiResponse<IncidentPageUUIDResponse>> */ - public CompletableFuture> deleteIncidentTodoWithHttpInfoAsync( - String incidentId, String todoId) { + public CompletableFuture> + createOnCallPageFromIncidentWithHttpInfoAsync( + String incidentId, IncidentCreateOnCallPageRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentTodo"; + String operationId = "createOnCallPageFromIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentId' when calling deleteIncidentTodo")); + 400, + "Missing the required parameter 'incidentId' when calling" + + " createOnCallPageFromIncident")); return result; } - // verify the required parameter 'todoId' is set - if (todoId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'todoId' when calling deleteIncidentTodo")); + 400, + "Missing the required parameter 'body' when calling createOnCallPageFromIncident")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + "/api/v2/incidents/{incident_id}/page" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -3897,51 +3938,56 @@ public CompletableFuture> deleteIncidentTodoWithHttpInfoAsync( try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentTodo", + "v2.IncidentsApi.createOnCallPageFromIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident type. + * Create a page from an incident. * - *

See {@link #deleteIncidentTypeWithHttpInfo}. + *

See {@link #createPageFromIncidentWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) + * @param incidentId The UUID of the incident. (required) + * @param body Page creation payload. (required) + * @return IncidentPageUUIDResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentType(String incidentTypeId) throws ApiException { - deleteIncidentTypeWithHttpInfo(incidentTypeId); + public IncidentPageUUIDResponse createPageFromIncident( + String incidentId, IncidentCreatePageFromIncidentRequest body) throws ApiException { + return createPageFromIncidentWithHttpInfo(incidentId, body).getData(); } /** - * Delete an incident type. + * Create a page from an incident. * - *

See {@link #deleteIncidentTypeWithHttpInfoAsync}. + *

See {@link #createPageFromIncidentWithHttpInfoAsync}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return CompletableFuture + * @param incidentId The UUID of the incident. (required) + * @param body Page creation payload. (required) + * @return CompletableFuture<IncidentPageUUIDResponse> */ - public CompletableFuture deleteIncidentTypeAsync(String incidentTypeId) { - return deleteIncidentTypeWithHttpInfoAsync(incidentTypeId) + public CompletableFuture createPageFromIncidentAsync( + String incidentId, IncidentCreatePageFromIncidentRequest body) { + return createPageFromIncidentWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -3949,16 +3995,17 @@ public CompletableFuture deleteIncidentTypeAsync(String incidentTypeId) { } /** - * Delete an incident type. + * Create a page from an incident using the Cases service. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return ApiResponse<Void> + * @param incidentId The UUID of the incident. (required) + * @param body Page creation payload. (required) + * @return ApiResponse<IncidentPageUUIDResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -3966,88 +4013,103 @@ public CompletableFuture deleteIncidentTypeAsync(String incidentTypeId) { * *
Response details
Status Code Description Response Headers
204 OK -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentTypeWithHttpInfo(String incidentTypeId) - throws ApiException { + public ApiResponse createPageFromIncidentWithHttpInfo( + String incidentId, IncidentCreatePageFromIncidentRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentType"; + String operationId = "createPageFromIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'incidentTypeId' is set - if (incidentTypeId == null) { + // verify the required parameter 'incidentId' is set + if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentTypeId' when calling deleteIncidentType"); + 400, "Missing the required parameter 'incidentId' when calling createPageFromIncident"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createPageFromIncident"); } // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/{incident_id}/cases/page" .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentType", + "v2.IncidentsApi.createPageFromIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident type. + * Create a page from an incident. * - *

See {@link #deleteIncidentTypeWithHttpInfo}. + *

See {@link #createPageFromIncidentWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param incidentId The UUID of the incident. (required) + * @param body Page creation payload. (required) + * @return CompletableFuture<ApiResponse<IncidentPageUUIDResponse>> */ - public CompletableFuture> deleteIncidentTypeWithHttpInfoAsync( - String incidentTypeId) { + public CompletableFuture> + createPageFromIncidentWithHttpInfoAsync( + String incidentId, IncidentCreatePageFromIncidentRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentType"; + String operationId = "createPageFromIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'incidentTypeId' is set - if (incidentTypeId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentTypeId' when calling deleteIncidentType")); + "Missing the required parameter 'incidentId' when calling createPageFromIncident")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createPageFromIncident")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/{incident_id}/cases/page" .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -4055,51 +4117,56 @@ public CompletableFuture> deleteIncidentTypeWithHttpInfoAsync( try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentType", + "v2.IncidentsApi.createPageFromIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident user-defined field. + * Create an incident timestamp override. * - *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #createTimestampOverrideWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) + * @param incidentId The UUID of the incident. (required) + * @param body Timestamp override payload. (required) + * @return IncidentTimestampOverrideResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentUserDefinedField(String fieldId) throws ApiException { - deleteIncidentUserDefinedFieldWithHttpInfo(fieldId); + public IncidentTimestampOverrideResponse createTimestampOverride( + String incidentId, IncidentTimestampOverrideRequest body) throws ApiException { + return createTimestampOverrideWithHttpInfo(incidentId, body).getData(); } /** - * Delete an incident user-defined field. + * Create an incident timestamp override. * - *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfoAsync}. + *

See {@link #createTimestampOverrideWithHttpInfoAsync}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @return CompletableFuture + * @param incidentId The UUID of the incident. (required) + * @param body Timestamp override payload. (required) + * @return CompletableFuture<IncidentTimestampOverrideResponse> */ - public CompletableFuture deleteIncidentUserDefinedFieldAsync(String fieldId) { - return deleteIncidentUserDefinedFieldWithHttpInfoAsync(fieldId) + public CompletableFuture createTimestampOverrideAsync( + String incidentId, IncidentTimestampOverrideRequest body) { + return createTimestampOverrideWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -4107,16 +4174,17 @@ public CompletableFuture deleteIncidentUserDefinedFieldAsync(String fieldI } /** - * Delete an incident user-defined field. + * Create a timestamp override for an incident. * - * @param fieldId The ID of the incident user-defined field. (required) - * @return ApiResponse<Void> + * @param incidentId The UUID of the incident. (required) + * @param body Timestamp override payload. (required) + * @return ApiResponse<IncidentTimestampOverrideResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -4124,86 +4192,106 @@ public CompletableFuture deleteIncidentUserDefinedFieldAsync(String fieldI * *
Response details
Status Code Description Response Headers
204 No Content -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentUserDefinedFieldWithHttpInfo(String fieldId) - throws ApiException { + public ApiResponse createTimestampOverrideWithHttpInfo( + String incidentId, IncidentTimestampOverrideRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentUserDefinedField"; + String operationId = "createTimestampOverride"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'fieldId' is set - if (fieldId == null) { + // verify the required parameter 'incidentId' is set + if (incidentId == null) { throw new ApiException( - 400, - "Missing the required parameter 'fieldId' when calling deleteIncidentUserDefinedField"); + 400, "Missing the required parameter 'incidentId' when calling createTimestampOverride"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createTimestampOverride"); } // create path and map variables String localVarPath = - "/api/v2/incidents/config/user-defined-fields/{field_id}" - .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + "/api/v2/incidents/{incident_id}/timestamp-overrides" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentUserDefinedField", + "v2.IncidentsApi.createTimestampOverride", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an incident user-defined field. + * Create an incident timestamp override. * - *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #createTimestampOverrideWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param incidentId The UUID of the incident. (required) + * @param body Timestamp override payload. (required) + * @return CompletableFuture<ApiResponse<IncidentTimestampOverrideResponse>> */ - public CompletableFuture> deleteIncidentUserDefinedFieldWithHttpInfoAsync( - String fieldId) { + public CompletableFuture> + createTimestampOverrideWithHttpInfoAsync( + String incidentId, IncidentTimestampOverrideRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentUserDefinedField"; + String operationId = "createTimestampOverride"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'fieldId' is set - if (fieldId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'fieldId' when calling" - + " deleteIncidentUserDefinedField")); + "Missing the required parameter 'incidentId' when calling createTimestampOverride")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createTimestampOverride")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/config/user-defined-fields/{field_id}" - .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + "/api/v2/incidents/{incident_id}/timestamp-overrides" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -4211,50 +4299,50 @@ public CompletableFuture> deleteIncidentUserDefinedFieldWithHt try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentUserDefinedField", + "v2.IncidentsApi.createTimestampOverride", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Get global incident settings. + * Delete global incident handle. * - *

See {@link #getGlobalIncidentSettingsWithHttpInfo}. + *

See {@link #deleteGlobalIncidentHandleWithHttpInfo}. * - * @return GlobalIncidentSettingsResponse * @throws ApiException if fails to make API call */ - public GlobalIncidentSettingsResponse getGlobalIncidentSettings() throws ApiException { - return getGlobalIncidentSettingsWithHttpInfo().getData(); + public void deleteGlobalIncidentHandle() throws ApiException { + deleteGlobalIncidentHandleWithHttpInfo(); } /** - * Get global incident settings. + * Delete global incident handle. * - *

See {@link #getGlobalIncidentSettingsWithHttpInfoAsync}. + *

See {@link #deleteGlobalIncidentHandleWithHttpInfoAsync}. * - * @return CompletableFuture<GlobalIncidentSettingsResponse> + * @return CompletableFuture */ - public CompletableFuture getGlobalIncidentSettingsAsync() { - return getGlobalIncidentSettingsWithHttpInfoAsync() + public CompletableFuture deleteGlobalIncidentHandleAsync() { + return deleteGlobalIncidentHandleWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -4262,23 +4350,22 @@ public CompletableFuture getGlobalIncidentSettin } /** - * Retrieve global incident settings for the organization. + * Delete a global incident handle. * - * @return ApiResponse<GlobalIncidentSettingsResponse> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
429 Too many requests -
*/ - public ApiResponse getGlobalIncidentSettingsWithHttpInfo() - throws ApiException { + public ApiResponse deleteGlobalIncidentHandleWithHttpInfo() throws ApiException { // Check if unstable operation is enabled - String operationId = "getGlobalIncidentSettings"; + String operationId = "deleteGlobalIncidentHandle"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -4286,53 +4373,51 @@ public ApiResponse getGlobalIncidentSettingsWith } Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/settings"; + String localVarPath = "/api/v2/incidents/config/global/incident-handles"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getGlobalIncidentSettings", + "v2.IncidentsApi.deleteGlobalIncidentHandle", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get global incident settings. + * Delete global incident handle. * - *

See {@link #getGlobalIncidentSettingsWithHttpInfo}. + *

See {@link #deleteGlobalIncidentHandleWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<GlobalIncidentSettingsResponse>> + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getGlobalIncidentSettingsWithHttpInfoAsync() { + public CompletableFuture> deleteGlobalIncidentHandleWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "getGlobalIncidentSettings"; + String operationId = "deleteGlobalIncidentHandle"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/settings"; + String localVarPath = "/api/v2/incidents/config/global/incident-handles"; Map localVarHeaderParams = new HashMap(); @@ -4340,103 +4425,51 @@ public ApiResponse getGlobalIncidentSettingsWith try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getGlobalIncidentSettings", + "v2.IncidentsApi.deleteGlobalIncidentHandle", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getIncident. */ - public static class GetIncidentOptionalParameters { - private List include; - - /** - * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) - * @return GetIncidentOptionalParameters - */ - public GetIncidentOptionalParameters include(List include) { - this.include = include; - return this; - } - } - - /** - * Get the details of an incident. - * - *

See {@link #getIncidentWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @return IncidentResponse - * @throws ApiException if fails to make API call - */ - public IncidentResponse getIncident(String incidentId) throws ApiException { - return getIncidentWithHttpInfo(incidentId, new GetIncidentOptionalParameters()).getData(); - } - - /** - * Get the details of an incident. - * - *

See {@link #getIncidentWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentResponse> - */ - public CompletableFuture getIncidentAsync(String incidentId) { - return getIncidentWithHttpInfoAsync(incidentId, new GetIncidentOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + null); } /** - * Get the details of an incident. + * Delete an existing incident. * - *

See {@link #getIncidentWithHttpInfo}. + *

See {@link #deleteIncidentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return IncidentResponse * @throws ApiException if fails to make API call */ - public IncidentResponse getIncident(String incidentId, GetIncidentOptionalParameters parameters) - throws ApiException { - return getIncidentWithHttpInfo(incidentId, parameters).getData(); + public void deleteIncident(String incidentId) throws ApiException { + deleteIncidentWithHttpInfo(incidentId); } /** - * Get the details of an incident. + * Delete an existing incident. * - *

See {@link #getIncidentWithHttpInfoAsync}. + *

See {@link #deleteIncidentWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentResponse> + * @return CompletableFuture */ - public CompletableFuture getIncidentAsync( - String incidentId, GetIncidentOptionalParameters parameters) { - return getIncidentWithHttpInfoAsync(incidentId, parameters) + public CompletableFuture deleteIncidentAsync(String incidentId) { + return deleteIncidentWithHttpInfoAsync(incidentId) .thenApply( response -> { return response.getData(); @@ -4444,17 +4477,16 @@ public CompletableFuture getIncidentAsync( } /** - * Get the details of an incident by incident_id. + * Deletes an existing incident from the users organization. * * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentResponse> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -4462,10 +4494,9 @@ public CompletableFuture getIncidentAsync( * *
Response details
Status Code Description Response Headers
200 OK -
204 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse getIncidentWithHttpInfo( - String incidentId, GetIncidentOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentWithHttpInfo(String incidentId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncident"; + String operationId = "deleteIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -4476,57 +4507,51 @@ public ApiResponse getIncidentWithHttpInfo( // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncident"); + 400, "Missing the required parameter 'incidentId' when calling deleteIncident"); } - List include = parameters.include; // create path and map variables String localVarPath = "/api/v2/incidents/{incident_id}" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncident", + "v2.IncidentsApi.deleteIncident", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get the details of an incident. + * Delete an existing incident. * - *

See {@link #getIncidentWithHttpInfo}. + *

See {@link #deleteIncidentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentResponse>> + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> getIncidentWithHttpInfoAsync( - String incidentId, GetIncidentOptionalParameters parameters) { + public CompletableFuture> deleteIncidentWithHttpInfoAsync(String incidentId) { // Check if unstable operation is enabled - String operationId = "getIncident"; + String operationId = "deleteIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -4535,78 +4560,72 @@ public CompletableFuture> getIncidentWithHttpInfoA // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncident")); + 400, "Missing the required parameter 'incidentId' when calling deleteIncident")); return result; } - List include = parameters.include; // create path and map variables String localVarPath = "/api/v2/incidents/{incident_id}" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncident", + "v2.IncidentsApi.deleteIncident", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get incident integration metadata details. + * Delete incident attachment. * - *

See {@link #getIncidentIntegrationWithHttpInfo}. + *

See {@link #deleteIncidentAttachmentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return IncidentIntegrationMetadataResponse + * @param attachmentId The ID of the attachment. (required) * @throws ApiException if fails to make API call */ - public IncidentIntegrationMetadataResponse getIncidentIntegration( - String incidentId, String integrationMetadataId) throws ApiException { - return getIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId).getData(); + public void deleteIncidentAttachment(String incidentId, String attachmentId) throws ApiException { + deleteIncidentAttachmentWithHttpInfo(incidentId, attachmentId); } /** - * Get incident integration metadata details. + * Delete incident attachment. * - *

See {@link #getIncidentIntegrationWithHttpInfoAsync}. + *

See {@link #deleteIncidentAttachmentWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return CompletableFuture<IncidentIntegrationMetadataResponse> + * @param attachmentId The ID of the attachment. (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentIntegrationAsync( - String incidentId, String integrationMetadataId) { - return getIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId) + public CompletableFuture deleteIncidentAttachmentAsync( + String incidentId, String attachmentId) { + return deleteIncidentAttachmentWithHttpInfoAsync(incidentId, attachmentId) .thenApply( response -> { return response.getData(); @@ -4614,28 +4633,25 @@ public CompletableFuture getIncidentIntegra } /** - * Get incident integration metadata details. - * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return ApiResponse<IncidentIntegrationMetadataResponse> + * @param attachmentId The ID of the attachment. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * * * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getIncidentIntegrationWithHttpInfo( - String incidentId, String integrationMetadataId) throws ApiException { + public ApiResponse deleteIncidentAttachmentWithHttpInfo( + String incidentId, String attachmentId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentIntegration"; + String operationId = "deleteIncidentAttachment"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -4646,65 +4662,62 @@ public ApiResponse getIncidentIntegrationWi // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncidentIntegration"); + 400, "Missing the required parameter 'incidentId' when calling deleteIncidentAttachment"); } - // verify the required parameter 'integrationMetadataId' is set - if (integrationMetadataId == null) { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { throw new ApiException( 400, - "Missing the required parameter 'integrationMetadataId' when calling" - + " getIncidentIntegration"); + "Missing the required parameter 'attachmentId' when calling deleteIncidentAttachment"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentIntegration", + "v2.IncidentsApi.deleteIncidentAttachment", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get incident integration metadata details. + * Delete incident attachment. * - *

See {@link #getIncidentIntegrationWithHttpInfo}. + *

See {@link #deleteIncidentAttachmentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> + * @param attachmentId The ID of the attachment. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getIncidentIntegrationWithHttpInfoAsync(String incidentId, String integrationMetadataId) { + public CompletableFuture> deleteIncidentAttachmentWithHttpInfoAsync( + String incidentId, String attachmentId) { // Check if unstable operation is enabled - String operationId = "getIncidentIntegration"; + String operationId = "deleteIncidentAttachment"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -4713,34 +4726,31 @@ public ApiResponse getIncidentIntegrationWi // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentId' when calling getIncidentIntegration")); + "Missing the required parameter 'incidentId' when calling deleteIncidentAttachment")); return result; } - // verify the required parameter 'integrationMetadataId' is set - if (integrationMetadataId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'integrationMetadataId' when calling" - + " getIncidentIntegration")); + "Missing the required parameter 'attachmentId' when calling" + + " deleteIncidentAttachment")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -4748,74 +4758,53 @@ public ApiResponse getIncidentIntegrationWi try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentIntegration", + "v2.IncidentsApi.deleteIncidentAttachment", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getIncidentNotificationRule. */ - public static class GetIncidentNotificationRuleOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of resources to include. Supported values: - * created_by_user, last_modified_by_user, incident_type, - * notification_template (optional) - * @return GetIncidentNotificationRuleOptionalParameters - */ - public GetIncidentNotificationRuleOptionalParameters include(String include) { - this.include = include; - return this; - } + null); } /** - * Get an incident notification rule. + * Delete an incident impact. * - *

See {@link #getIncidentNotificationRuleWithHttpInfo}. + *

See {@link #deleteIncidentImpactWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @return IncidentNotificationRule + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) * @throws ApiException if fails to make API call */ - public IncidentNotificationRule getIncidentNotificationRule(UUID id) throws ApiException { - return getIncidentNotificationRuleWithHttpInfo( - id, new GetIncidentNotificationRuleOptionalParameters()) - .getData(); + public void deleteIncidentImpact(String incidentId, String impactId) throws ApiException { + deleteIncidentImpactWithHttpInfo(incidentId, impactId); } /** - * Get an incident notification rule. + * Delete an incident impact. * - *

See {@link #getIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #deleteIncidentImpactWithHttpInfoAsync}. * - * @param id The ID of the notification rule. (required) - * @return CompletableFuture<IncidentNotificationRule> + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentNotificationRuleAsync(UUID id) { - return getIncidentNotificationRuleWithHttpInfoAsync( - id, new GetIncidentNotificationRuleOptionalParameters()) + public CompletableFuture deleteIncidentImpactAsync(String incidentId, String impactId) { + return deleteIncidentImpactWithHttpInfoAsync(incidentId, impactId) .thenApply( response -> { return response.getData(); @@ -4823,32 +4812,156 @@ id, new GetIncidentNotificationRuleOptionalParameters()) } /** - * Get an incident notification rule. + * Delete an incident impact. * - *

See {@link #getIncidentNotificationRuleWithHttpInfo}. + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteIncidentImpactWithHttpInfo(String incidentId, String impactId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling deleteIncidentImpact"); + } + + // verify the required parameter 'impactId' is set + if (impactId == null) { + throw new ApiException( + 400, "Missing the required parameter 'impactId' when calling deleteIncidentImpact"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "impact_id" + "\\}", apiClient.escapeString(impactId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.deleteIncidentImpact", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an incident impact. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return IncidentNotificationRule + *

See {@link #deleteIncidentImpactWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteIncidentImpactWithHttpInfoAsync( + String incidentId, String impactId) { + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling deleteIncidentImpact")); + return result; + } + + // verify the required parameter 'impactId' is set + if (impactId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'impactId' when calling deleteIncidentImpact")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "impact_id" + "\\}", apiClient.escapeString(impactId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.deleteIncidentImpact", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an incident impact field. + * + *

See {@link #deleteIncidentImpactFieldWithHttpInfo}. + * + * @param fieldId The UUID of the impact field. (required) * @throws ApiException if fails to make API call */ - public IncidentNotificationRule getIncidentNotificationRule( - UUID id, GetIncidentNotificationRuleOptionalParameters parameters) throws ApiException { - return getIncidentNotificationRuleWithHttpInfo(id, parameters).getData(); + public void deleteIncidentImpactField(UUID fieldId) throws ApiException { + deleteIncidentImpactFieldWithHttpInfo(fieldId); } /** - * Get an incident notification rule. + * Delete an incident impact field. * - *

See {@link #getIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #deleteIncidentImpactFieldWithHttpInfoAsync}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationRule> + * @param fieldId The UUID of the impact field. (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentNotificationRuleAsync( - UUID id, GetIncidentNotificationRuleOptionalParameters parameters) { - return getIncidentNotificationRuleWithHttpInfoAsync(id, parameters) + public CompletableFuture deleteIncidentImpactFieldAsync(UUID fieldId) { + return deleteIncidentImpactFieldWithHttpInfoAsync(fieldId) .thenApply( response -> { return response.getData(); @@ -4856,17 +4969,16 @@ public CompletableFuture getIncidentNotificationRuleAs } /** - * Retrieves a specific notification rule by its ID. + * Delete an impact field for incidents. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationRule> + * @param fieldId The UUID of the impact field. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -4874,10 +4986,9 @@ public CompletableFuture getIncidentNotificationRuleAs * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse getIncidentNotificationRuleWithHttpInfo( - UUID id, GetIncidentNotificationRuleOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentImpactFieldWithHttpInfo(UUID fieldId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentNotificationRule"; + String operationId = "deleteIncidentImpactField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -4885,190 +4996,129 @@ public ApiResponse getIncidentNotificationRuleWithHttp } Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'fieldId' is set + if (fieldId == null) { throw new ApiException( - 400, "Missing the required parameter 'id' when calling getIncidentNotificationRule"); + 400, "Missing the required parameter 'fieldId' when calling deleteIncidentImpactField"); } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/config/impact-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentNotificationRule", + "v2.IncidentsApi.deleteIncidentImpactField", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get an incident notification rule. + * Delete an incident impact field. * - *

See {@link #getIncidentNotificationRuleWithHttpInfo}. + *

See {@link #deleteIncidentImpactFieldWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> + * @param fieldId The UUID of the impact field. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getIncidentNotificationRuleWithHttpInfoAsync( - UUID id, GetIncidentNotificationRuleOptionalParameters parameters) { + public CompletableFuture> deleteIncidentImpactFieldWithHttpInfoAsync( + UUID fieldId) { // Check if unstable operation is enabled - String operationId = "getIncidentNotificationRule"; + String operationId = "deleteIncidentImpactField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'fieldId' is set + if (fieldId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'id' when calling getIncidentNotificationRule")); + 400, + "Missing the required parameter 'fieldId' when calling deleteIncidentImpactField")); return result; } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/config/impact-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentNotificationRule", + "v2.IncidentsApi.deleteIncidentImpactField", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getIncidentNotificationTemplate. */ - public static class GetIncidentNotificationTemplateOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of relationships to include. Supported values: - * created_by_user, last_modified_by_user, incident_type - * (optional) - * @return GetIncidentNotificationTemplateOptionalParameters - */ - public GetIncidentNotificationTemplateOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * Get incident notification template. - * - *

See {@link #getIncidentNotificationTemplateWithHttpInfo}. - * - * @param id The ID of the notification template. (required) - * @return IncidentNotificationTemplate - * @throws ApiException if fails to make API call - */ - public IncidentNotificationTemplate getIncidentNotificationTemplate(UUID id) throws ApiException { - return getIncidentNotificationTemplateWithHttpInfo( - id, new GetIncidentNotificationTemplateOptionalParameters()) - .getData(); - } - - /** - * Get incident notification template. - * - *

See {@link #getIncidentNotificationTemplateWithHttpInfoAsync}. - * - * @param id The ID of the notification template. (required) - * @return CompletableFuture<IncidentNotificationTemplate> - */ - public CompletableFuture getIncidentNotificationTemplateAsync( - UUID id) { - return getIncidentNotificationTemplateWithHttpInfoAsync( - id, new GetIncidentNotificationTemplateOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + null); } /** - * Get incident notification template. + * Delete an incident integration metadata. * - *

See {@link #getIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #deleteIncidentIntegrationWithHttpInfo}. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return IncidentNotificationTemplate + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) * @throws ApiException if fails to make API call */ - public IncidentNotificationTemplate getIncidentNotificationTemplate( - UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { - return getIncidentNotificationTemplateWithHttpInfo(id, parameters).getData(); + public void deleteIncidentIntegration(String incidentId, String integrationMetadataId) + throws ApiException { + deleteIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId); } /** - * Get incident notification template. + * Delete an incident integration metadata. * - *

See {@link #getIncidentNotificationTemplateWithHttpInfoAsync}. + *

See {@link #deleteIncidentIntegrationWithHttpInfoAsync}. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationTemplate> + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentNotificationTemplateAsync( - UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) { - return getIncidentNotificationTemplateWithHttpInfoAsync(id, parameters) + public CompletableFuture deleteIncidentIntegrationAsync( + String incidentId, String integrationMetadataId) { + return deleteIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId) .thenApply( response -> { return response.getData(); @@ -5076,17 +5126,17 @@ public CompletableFuture getIncidentNotificationTe } /** - * Retrieves a specific notification template by its ID. + * Delete an incident integration metadata. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationTemplate> + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -5094,10 +5144,10 @@ public CompletableFuture getIncidentNotificationTe * *
Response details
Status Code Description Response Headers
200 OK -
204 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse getIncidentNotificationTemplateWithHttpInfo( - UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentIntegrationWithHttpInfo( + String incidentId, String integrationMetadataId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentNotificationTemplate"; + String operationId = "deleteIncidentIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5105,141 +5155,175 @@ public ApiResponse getIncidentNotificationTemplate } Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'incidentId' is set + if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'id' when calling getIncidentNotificationTemplate"); + 400, + "Missing the required parameter 'incidentId' when calling deleteIncidentIntegration"); + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integrationMetadataId' when calling" + + " deleteIncidentIntegration"); } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-templates/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "integration_metadata_id" + "\\}", + apiClient.escapeString(integrationMetadataId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentNotificationTemplate", + "v2.IncidentsApi.deleteIncidentIntegration", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get incident notification template. + * Delete an incident integration metadata. * - *

See {@link #getIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #deleteIncidentIntegrationWithHttpInfo}. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getIncidentNotificationTemplateWithHttpInfoAsync( - UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) { + public CompletableFuture> deleteIncidentIntegrationWithHttpInfoAsync( + String incidentId, String integrationMetadataId) { // Check if unstable operation is enabled - String operationId = "getIncidentNotificationTemplate"; + String operationId = "deleteIncidentIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'id' when calling getIncidentNotificationTemplate")); + "Missing the required parameter 'incidentId' when calling" + + " deleteIncidentIntegration")); + return result; + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integrationMetadataId' when calling" + + " deleteIncidentIntegration")); return result; } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-templates/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "integration_metadata_id" + "\\}", + apiClient.escapeString(integrationMetadataId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentNotificationTemplate", + "v2.IncidentsApi.deleteIncidentIntegration", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); + } + + /** Manage optional parameters to deleteIncidentNotificationRule. */ + public static class DeleteIncidentNotificationRuleOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of resources to include. Supported values: + * created_by_user, last_modified_by_user, incident_type, + * notification_template (optional) + * @return DeleteIncidentNotificationRuleOptionalParameters + */ + public DeleteIncidentNotificationRuleOptionalParameters include(String include) { + this.include = include; + return this; + } } /** - * Get postmortem template. + * Delete an incident notification rule. * - *

See {@link #getIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) - * @return PostmortemTemplateResponse + * @param id The ID of the notification rule. (required) * @throws ApiException if fails to make API call */ - public PostmortemTemplateResponse getIncidentPostmortemTemplate(String templateId) - throws ApiException { - return getIncidentPostmortemTemplateWithHttpInfo(templateId).getData(); + public void deleteIncidentNotificationRule(UUID id) throws ApiException { + deleteIncidentNotificationRuleWithHttpInfo( + id, new DeleteIncidentNotificationRuleOptionalParameters()); } /** - * Get postmortem template. + * Delete an incident notification rule. * - *

See {@link #getIncidentPostmortemTemplateWithHttpInfoAsync}. + *

See {@link #deleteIncidentNotificationRuleWithHttpInfoAsync}. * - * @param templateId The ID of the postmortem template (required) - * @return CompletableFuture<PostmortemTemplateResponse> + * @param id The ID of the notification rule. (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentPostmortemTemplateAsync( - String templateId) { - return getIncidentPostmortemTemplateWithHttpInfoAsync(templateId) + public CompletableFuture deleteIncidentNotificationRuleAsync(UUID id) { + return deleteIncidentNotificationRuleWithHttpInfoAsync( + id, new DeleteIncidentNotificationRuleOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -5247,25 +5331,60 @@ public CompletableFuture getIncidentPostmortemTempla } /** - * Retrieve details of a specific postmortem template. + * Delete an incident notification rule. * - * @param templateId The ID of the postmortem template (required) - * @return ApiResponse<PostmortemTemplateResponse> + *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. + * + * @param id The ID of the notification rule. (required) + * @param parameters Optional parameters for the request. * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * + */ + public void deleteIncidentNotificationRule( + UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) throws ApiException { + deleteIncidentNotificationRuleWithHttpInfo(id, parameters); + } + + /** + * Delete an incident notification rule. + * + *

See {@link #deleteIncidentNotificationRuleWithHttpInfoAsync}. + * + * @param id The ID of the notification rule. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture + */ + public CompletableFuture deleteIncidentNotificationRuleAsync( + UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) { + return deleteIncidentNotificationRuleWithHttpInfoAsync(id, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Deletes a notification rule by its ID. + * + * @param id The ID of the notification rule. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + *

Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ * + * + * + * + * + * + * + * *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getIncidentPostmortemTemplateWithHttpInfo( - String templateId) throws ApiException { + public ApiResponse deleteIncidentNotificationRuleWithHttpInfo( + UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentPostmortemTemplate"; + String operationId = "deleteIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5273,134 +5392,187 @@ public ApiResponse getIncidentPostmortemTemplateWith } Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == null) { + // verify the required parameter 'id' is set + if (id == null) { throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling getIncidentPostmortemTemplate"); + 400, "Missing the required parameter 'id' when calling deleteIncidentNotificationRule"); } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" - .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + "/api/v2/incidents/config/notification-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentPostmortemTemplate", + "v2.IncidentsApi.deleteIncidentNotificationRule", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get postmortem template. + * Delete an incident notification rule. * - *

See {@link #getIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) - * @return CompletableFuture<ApiResponse<PostmortemTemplateResponse>> + * @param id The ID of the notification rule. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getIncidentPostmortemTemplateWithHttpInfoAsync(String templateId) { + public CompletableFuture> deleteIncidentNotificationRuleWithHttpInfoAsync( + UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getIncidentPostmortemTemplate"; + String operationId = "deleteIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'templateId' when calling" - + " getIncidentPostmortemTemplate")); + "Missing the required parameter 'id' when calling deleteIncidentNotificationRule")); return result; } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" - .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + "/api/v2/incidents/config/notification-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentPostmortemTemplate", + "v2.IncidentsApi.deleteIncidentNotificationRule", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); + } + + /** Manage optional parameters to deleteIncidentNotificationTemplate. */ + public static class DeleteIncidentNotificationTemplateOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of relationships to include. Supported values: + * created_by_user, last_modified_by_user, incident_type + * (optional) + * @return DeleteIncidentNotificationTemplateOptionalParameters + */ + public DeleteIncidentNotificationTemplateOptionalParameters include(String include) { + this.include = include; + return this; + } } /** - * Get incident todo details. + * Delete a notification template. * - *

See {@link #getIncidentTodoWithHttpInfo}. + *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return IncidentTodoResponse + * @param id The ID of the notification template. (required) * @throws ApiException if fails to make API call */ - public IncidentTodoResponse getIncidentTodo(String incidentId, String todoId) + public void deleteIncidentNotificationTemplate(UUID id) throws ApiException { + deleteIncidentNotificationTemplateWithHttpInfo( + id, new DeleteIncidentNotificationTemplateOptionalParameters()); + } + + /** + * Delete a notification template. + * + *

See {@link #deleteIncidentNotificationTemplateWithHttpInfoAsync}. + * + * @param id The ID of the notification template. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteIncidentNotificationTemplateAsync(UUID id) { + return deleteIncidentNotificationTemplateWithHttpInfoAsync( + id, new DeleteIncidentNotificationTemplateOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a notification template. + * + *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. + * + * @param id The ID of the notification template. (required) + * @param parameters Optional parameters for the request. + * @throws ApiException if fails to make API call + */ + public void deleteIncidentNotificationTemplate( + UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { - return getIncidentTodoWithHttpInfo(incidentId, todoId).getData(); + deleteIncidentNotificationTemplateWithHttpInfo(id, parameters); } /** - * Get incident todo details. + * Delete a notification template. * - *

See {@link #getIncidentTodoWithHttpInfoAsync}. + *

See {@link #deleteIncidentNotificationTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return CompletableFuture<IncidentTodoResponse> + * @param id The ID of the notification template. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture */ - public CompletableFuture getIncidentTodoAsync( - String incidentId, String todoId) { - return getIncidentTodoWithHttpInfoAsync(incidentId, todoId) + public CompletableFuture deleteIncidentNotificationTemplateAsync( + UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) { + return deleteIncidentNotificationTemplateWithHttpInfoAsync(id, parameters) .thenApply( response -> { return response.getData(); @@ -5408,17 +5580,17 @@ public CompletableFuture getIncidentTodoAsync( } /** - * Get incident todo details. + * Deletes a notification template by its ID. * - * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return ApiResponse<IncidentTodoResponse> + * @param id The ID of the notification template. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -5426,10 +5598,11 @@ public CompletableFuture getIncidentTodoAsync( * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse getIncidentTodoWithHttpInfo( - String incidentId, String todoId) throws ApiException { + public ApiResponse deleteIncidentNotificationTemplateWithHttpInfo( + UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentTodo"; + String operationId = "deleteIncidentNotificationTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5437,145 +5610,136 @@ public ApiResponse getIncidentTodoWithHttpInfo( } Object localVarPostBody = null; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncidentTodo"); - } - - // verify the required parameter 'todoId' is set - if (todoId == null) { + // verify the required parameter 'id' is set + if (id == null) { throw new ApiException( - 400, "Missing the required parameter 'todoId' when calling getIncidentTodo"); + 400, + "Missing the required parameter 'id' when calling deleteIncidentNotificationTemplate"); } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + "/api/v2/incidents/config/notification-templates/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentTodo", + "v2.IncidentsApi.deleteIncidentNotificationTemplate", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get incident todo details. + * Delete a notification template. * - *

See {@link #getIncidentTodoWithHttpInfo}. + *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return CompletableFuture<ApiResponse<IncidentTodoResponse>> + * @param id The ID of the notification template. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> getIncidentTodoWithHttpInfoAsync( - String incidentId, String todoId) { + public CompletableFuture> deleteIncidentNotificationTemplateWithHttpInfoAsync( + UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getIncidentTodo"; + String operationId = "deleteIncidentNotificationTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncidentTodo")); - return result; - } - - // verify the required parameter 'todoId' is set - if (todoId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'todoId' when calling getIncidentTodo")); + 400, + "Missing the required parameter 'id' when calling" + + " deleteIncidentNotificationTemplate")); return result; } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + "/api/v2/incidents/config/notification-templates/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentTodo", + "v2.IncidentsApi.deleteIncidentNotificationTemplate", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get incident type details. + * Delete postmortem template. * - *

See {@link #getIncidentTypeWithHttpInfo}. + *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return IncidentTypeResponse + * @param templateId The ID of the postmortem template (required) * @throws ApiException if fails to make API call */ - public IncidentTypeResponse getIncidentType(String incidentTypeId) throws ApiException { - return getIncidentTypeWithHttpInfo(incidentTypeId).getData(); + public void deleteIncidentPostmortemTemplate(String templateId) throws ApiException { + deleteIncidentPostmortemTemplateWithHttpInfo(templateId); } /** - * Get incident type details. + * Delete postmortem template. * - *

See {@link #getIncidentTypeWithHttpInfoAsync}. + *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfoAsync}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return CompletableFuture<IncidentTypeResponse> + * @param templateId The ID of the postmortem template (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentTypeAsync(String incidentTypeId) { - return getIncidentTypeWithHttpInfoAsync(incidentTypeId) + public CompletableFuture deleteIncidentPostmortemTemplateAsync(String templateId) { + return deleteIncidentPostmortemTemplateWithHttpInfoAsync(templateId) .thenApply( response -> { return response.getData(); @@ -5583,27 +5747,25 @@ public CompletableFuture getIncidentTypeAsync(String incid } /** - * Get incident type details. + * Delete a postmortem template. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return ApiResponse<IncidentTypeResponse> + * @param templateId The ID of the postmortem template (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getIncidentTypeWithHttpInfo(String incidentTypeId) + public ApiResponse deleteIncidentPostmortemTemplateWithHttpInfo(String templateId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentType"; + String operationId = "deleteIncidentPostmortemTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5611,76 +5773,78 @@ public ApiResponse getIncidentTypeWithHttpInfo(String inci } Object localVarPostBody = null; - // verify the required parameter 'incidentTypeId' is set - if (incidentTypeId == null) { + // verify the required parameter 'templateId' is set + if (templateId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentTypeId' when calling getIncidentType"); + 400, + "Missing the required parameter 'templateId' when calling" + + " deleteIncidentPostmortemTemplate"); } // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/config/postmortem-templates/{template_id}" .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentType", + "v2.IncidentsApi.deleteIncidentPostmortemTemplate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get incident type details. + * Delete postmortem template. * - *

See {@link #getIncidentTypeWithHttpInfo}. + *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> + * @param templateId The ID of the postmortem template (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> getIncidentTypeWithHttpInfoAsync( - String incidentTypeId) { + public CompletableFuture> deleteIncidentPostmortemTemplateWithHttpInfoAsync( + String templateId) { // Check if unstable operation is enabled - String operationId = "getIncidentType"; + String operationId = "deleteIncidentPostmortemTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'incidentTypeId' is set - if (incidentTypeId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'templateId' is set + if (templateId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentTypeId' when calling getIncidentType")); + 400, + "Missing the required parameter 'templateId' when calling" + + " deleteIncidentPostmortemTemplate")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/config/postmortem-templates/{template_id}" .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); Map localVarHeaderParams = new HashMap(); @@ -5688,108 +5852,53 @@ public CompletableFuture> getIncidentTypeWithH try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentType", + "v2.IncidentsApi.deleteIncidentPostmortemTemplate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getIncidentUserDefinedField. */ - public static class GetIncidentUserDefinedFieldOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of related resources to include. Supported values are - * "last_modified_by_user", "created_by_user", and "incident_type". (optional) - * @return GetIncidentUserDefinedFieldOptionalParameters - */ - public GetIncidentUserDefinedFieldOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * Get an incident user-defined field. - * - *

See {@link #getIncidentUserDefinedFieldWithHttpInfo}. - * - * @param fieldId The ID of the incident user-defined field. (required) - * @return IncidentUserDefinedFieldResponse - * @throws ApiException if fails to make API call - */ - public IncidentUserDefinedFieldResponse getIncidentUserDefinedField(String fieldId) - throws ApiException { - return getIncidentUserDefinedFieldWithHttpInfo( - fieldId, new GetIncidentUserDefinedFieldOptionalParameters()) - .getData(); - } - - /** - * Get an incident user-defined field. - * - *

See {@link #getIncidentUserDefinedFieldWithHttpInfoAsync}. - * - * @param fieldId The ID of the incident user-defined field. (required) - * @return CompletableFuture<IncidentUserDefinedFieldResponse> - */ - public CompletableFuture getIncidentUserDefinedFieldAsync( - String fieldId) { - return getIncidentUserDefinedFieldWithHttpInfoAsync( - fieldId, new GetIncidentUserDefinedFieldOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + null); } /** - * Get an incident user-defined field. + * Delete an incident responder. * - *

See {@link #getIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #deleteIncidentResponderWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param parameters Optional parameters for the request. - * @return IncidentUserDefinedFieldResponse + * @param incidentId The UUID of the incident. (required) + * @param responderId The UUID of the incident responder. (required) * @throws ApiException if fails to make API call */ - public IncidentUserDefinedFieldResponse getIncidentUserDefinedField( - String fieldId, GetIncidentUserDefinedFieldOptionalParameters parameters) - throws ApiException { - return getIncidentUserDefinedFieldWithHttpInfo(fieldId, parameters).getData(); + public void deleteIncidentResponder(String incidentId, UUID responderId) throws ApiException { + deleteIncidentResponderWithHttpInfo(incidentId, responderId); } /** - * Get an incident user-defined field. + * Delete an incident responder. * - *

See {@link #getIncidentUserDefinedFieldWithHttpInfoAsync}. + *

See {@link #deleteIncidentResponderWithHttpInfoAsync}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentUserDefinedFieldResponse> + * @param incidentId The UUID of the incident. (required) + * @param responderId The UUID of the incident responder. (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentUserDefinedFieldAsync( - String fieldId, GetIncidentUserDefinedFieldOptionalParameters parameters) { - return getIncidentUserDefinedFieldWithHttpInfoAsync(fieldId, parameters) + public CompletableFuture deleteIncidentResponderAsync(String incidentId, UUID responderId) { + return deleteIncidentResponderWithHttpInfoAsync(incidentId, responderId) .thenApply( response -> { return response.getData(); @@ -5797,28 +5906,28 @@ public CompletableFuture getIncidentUserDefine } /** - * Get details of an incident user-defined field. + * Remove a responder from an incident. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentUserDefinedFieldResponse> + * @param incidentId The UUID of the incident. (required) + * @param responderId The UUID of the incident responder. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * + * * * * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getIncidentUserDefinedFieldWithHttpInfo( - String fieldId, GetIncidentUserDefinedFieldOptionalParameters parameters) + public ApiResponse deleteIncidentResponderWithHttpInfo(String incidentId, UUID responderId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentUserDefinedField"; + String operationId = "deleteIncidentResponder"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5826,189 +5935,148 @@ public ApiResponse getIncidentUserDefinedField } Object localVarPostBody = null; - // verify the required parameter 'fieldId' is set - if (fieldId == null) { + // verify the required parameter 'incidentId' is set + if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'fieldId' when calling getIncidentUserDefinedField"); + 400, "Missing the required parameter 'incidentId' when calling deleteIncidentResponder"); + } + + // verify the required parameter 'responderId' is set + if (responderId == null) { + throw new ApiException( + 400, "Missing the required parameter 'responderId' when calling deleteIncidentResponder"); } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/user-defined-fields/{field_id}" - .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + "/api/v2/incidents/{incident_id}/responders/{responder_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "responder_id" + "\\}", apiClient.escapeString(responderId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentUserDefinedField", + "v2.IncidentsApi.deleteIncidentResponder", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get an incident user-defined field. + * Delete an incident responder. * - *

See {@link #getIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #deleteIncidentResponderWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldResponse>> + * @param incidentId The UUID of the incident. (required) + * @param responderId The UUID of the incident responder. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getIncidentUserDefinedFieldWithHttpInfoAsync( - String fieldId, GetIncidentUserDefinedFieldOptionalParameters parameters) { + public CompletableFuture> deleteIncidentResponderWithHttpInfoAsync( + String incidentId, UUID responderId) { // Check if unstable operation is enabled - String operationId = "getIncidentUserDefinedField"; + String operationId = "deleteIncidentResponder"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'fieldId' is set - if (fieldId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'fieldId' when calling getIncidentUserDefinedField")); + "Missing the required parameter 'incidentId' when calling deleteIncidentResponder")); + return result; + } + + // verify the required parameter 'responderId' is set + if (responderId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'responderId' when calling deleteIncidentResponder")); return result; } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/user-defined-fields/{field_id}" - .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + "/api/v2/incidents/{incident_id}/responders/{responder_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "responder_id" + "\\}", apiClient.escapeString(responderId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentUserDefinedField", + "v2.IncidentsApi.deleteIncidentResponder", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to importIncident. */ - public static class ImportIncidentOptionalParameters { - private List include; - - /** - * Set include. - * - * @param include Specifies which related object types to include in the response when importing - * an incident. (optional) - * @return ImportIncidentOptionalParameters - */ - public ImportIncidentOptionalParameters include(List include) { - this.include = include; - return this; - } - } - - /** - * Import an incident. - * - *

See {@link #importIncidentWithHttpInfo}. - * - * @param body Incident import payload. (required) - * @return IncidentImportResponse - * @throws ApiException if fails to make API call - */ - public IncidentImportResponse importIncident(IncidentImportRequest body) throws ApiException { - return importIncidentWithHttpInfo(body, new ImportIncidentOptionalParameters()).getData(); - } - - /** - * Import an incident. - * - *

See {@link #importIncidentWithHttpInfoAsync}. - * - * @param body Incident import payload. (required) - * @return CompletableFuture<IncidentImportResponse> - */ - public CompletableFuture importIncidentAsync(IncidentImportRequest body) { - return importIncidentWithHttpInfoAsync(body, new ImportIncidentOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + null); } /** - * Import an incident. + * Delete an incident rule. * - *

See {@link #importIncidentWithHttpInfo}. + *

See {@link #deleteIncidentRuleWithHttpInfo}. * - * @param body Incident import payload. (required) - * @param parameters Optional parameters for the request. - * @return IncidentImportResponse + * @param ruleId The UUID of the incident rule. (required) * @throws ApiException if fails to make API call */ - public IncidentImportResponse importIncident( - IncidentImportRequest body, ImportIncidentOptionalParameters parameters) throws ApiException { - return importIncidentWithHttpInfo(body, parameters).getData(); + public void deleteIncidentRule(UUID ruleId) throws ApiException { + deleteIncidentRuleWithHttpInfo(ruleId); } /** - * Import an incident. + * Delete an incident rule. * - *

See {@link #importIncidentWithHttpInfoAsync}. + *

See {@link #deleteIncidentRuleWithHttpInfoAsync}. * - * @param body Incident import payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentImportResponse> + * @param ruleId The UUID of the incident rule. (required) + * @return CompletableFuture */ - public CompletableFuture importIncidentAsync( - IncidentImportRequest body, ImportIncidentOptionalParameters parameters) { - return importIncidentWithHttpInfoAsync(body, parameters) + public CompletableFuture deleteIncidentRuleAsync(UUID ruleId) { + return deleteIncidentRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -6016,19 +6084,16 @@ public CompletableFuture importIncidentAsync( } /** - * Import an incident from an external system. This endpoint allows you to create incidents with - * historical data such as custom timestamps for detection, declaration, and resolution. Imported - * incidents do not execute integrations or notification rules. + * Delete an incident rule. * - * @param body Incident import payload. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentImportResponse> + * @param ruleId The UUID of the incident rule. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -6036,158 +6101,135 @@ public CompletableFuture importIncidentAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse importIncidentWithHttpInfo( - IncidentImportRequest body, ImportIncidentOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentRuleWithHttpInfo(UUID ruleId) throws ApiException { // Check if unstable operation is enabled - String operationId = "importIncident"; + String operationId = "deleteIncidentRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = body; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling importIncident"); + 400, "Missing the required parameter 'ruleId' when calling deleteIncidentRule"); } - List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/import"; + String localVarPath = + "/api/v2/incidents/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.importIncident", + "v2.IncidentsApi.deleteIncidentRule", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "POST", + "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Import an incident. + * Delete an incident rule. * - *

See {@link #importIncidentWithHttpInfo}. + *

See {@link #deleteIncidentRuleWithHttpInfo}. * - * @param body Incident import payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentImportResponse>> + * @param ruleId The UUID of the incident rule. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> importIncidentWithHttpInfoAsync( - IncidentImportRequest body, ImportIncidentOptionalParameters parameters) { + public CompletableFuture> deleteIncidentRuleWithHttpInfoAsync(UUID ruleId) { // Check if unstable operation is enabled - String operationId = "importIncident"; + String operationId = "deleteIncidentRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = body; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling importIncident")); + 400, "Missing the required parameter 'ruleId' when calling deleteIncidentRule")); return result; } - List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/import"; + String localVarPath = + "/api/v2/incidents/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.importIncident", + "v2.IncidentsApi.deleteIncidentRule", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listGlobalIncidentHandles. */ - public static class ListGlobalIncidentHandlesOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of related resources to include in the response - * (optional) - * @return ListGlobalIncidentHandlesOptionalParameters - */ - public ListGlobalIncidentHandlesOptionalParameters include(String include) { - this.include = include; - return this; - } + null); } /** - * List global incident handles. + * Delete an incident todo. * - *

See {@link #listGlobalIncidentHandlesWithHttpInfo}. + *

See {@link #deleteIncidentTodoWithHttpInfo}. * - * @return IncidentHandlesResponse + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) * @throws ApiException if fails to make API call */ - public IncidentHandlesResponse listGlobalIncidentHandles() throws ApiException { - return listGlobalIncidentHandlesWithHttpInfo(new ListGlobalIncidentHandlesOptionalParameters()) - .getData(); + public void deleteIncidentTodo(String incidentId, String todoId) throws ApiException { + deleteIncidentTodoWithHttpInfo(incidentId, todoId); } /** - * List global incident handles. + * Delete an incident todo. * - *

See {@link #listGlobalIncidentHandlesWithHttpInfoAsync}. + *

See {@link #deleteIncidentTodoWithHttpInfoAsync}. * - * @return CompletableFuture<IncidentHandlesResponse> + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @return CompletableFuture */ - public CompletableFuture listGlobalIncidentHandlesAsync() { - return listGlobalIncidentHandlesWithHttpInfoAsync( - new ListGlobalIncidentHandlesOptionalParameters()) + public CompletableFuture deleteIncidentTodoAsync(String incidentId, String todoId) { + return deleteIncidentTodoWithHttpInfoAsync(incidentId, todoId) .thenApply( response -> { return response.getData(); @@ -6195,238 +6237,173 @@ public CompletableFuture listGlobalIncidentHandlesAsync } /** - * List global incident handles. - * - *

See {@link #listGlobalIncidentHandlesWithHttpInfo}. + * Delete an incident todo. * - * @param parameters Optional parameters for the request. - * @return IncidentHandlesResponse - * @throws ApiException if fails to make API call - */ - public IncidentHandlesResponse listGlobalIncidentHandles( - ListGlobalIncidentHandlesOptionalParameters parameters) throws ApiException { - return listGlobalIncidentHandlesWithHttpInfo(parameters).getData(); - } - - /** - * List global incident handles. - * - *

See {@link #listGlobalIncidentHandlesWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentHandlesResponse> - */ - public CompletableFuture listGlobalIncidentHandlesAsync( - ListGlobalIncidentHandlesOptionalParameters parameters) { - return listGlobalIncidentHandlesWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Retrieve a list of global incident handles. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentHandlesResponse> + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * + * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
204 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listGlobalIncidentHandlesWithHttpInfo( - ListGlobalIncidentHandlesOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentTodoWithHttpInfo(String incidentId, String todoId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listGlobalIncidentHandles"; + String operationId = "deleteIncidentTodo"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String include = parameters.include; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling deleteIncidentTodo"); + } + + // verify the required parameter 'todoId' is set + if (todoId == null) { + throw new ApiException( + 400, "Missing the required parameter 'todoId' when calling deleteIncidentTodo"); + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listGlobalIncidentHandles", + "v2.IncidentsApi.deleteIncidentTodo", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * List global incident handles. + * Delete an incident todo. * - *

See {@link #listGlobalIncidentHandlesWithHttpInfo}. + *

See {@link #deleteIncidentTodoWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentHandlesResponse>> + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listGlobalIncidentHandlesWithHttpInfoAsync( - ListGlobalIncidentHandlesOptionalParameters parameters) { + public CompletableFuture> deleteIncidentTodoWithHttpInfoAsync( + String incidentId, String todoId) { // Check if unstable operation is enabled - String operationId = "listGlobalIncidentHandles"; + String operationId = "deleteIncidentTodo"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String include = parameters.include; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'incidentId' when calling deleteIncidentTodo")); + return result; + } + + // verify the required parameter 'todoId' is set + if (todoId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'todoId' when calling deleteIncidentTodo")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listGlobalIncidentHandles", + "v2.IncidentsApi.deleteIncidentTodo", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listIncidentAttachments. */ - public static class ListIncidentAttachmentsOptionalParameters { - private String filterAttachmentType; - private String include; - - /** - * Set filterAttachmentType. - * - * @param filterAttachmentType Filter attachments by type. Supported values are 1 ( - * postmortem) and 2 (link). (optional) - * @return ListIncidentAttachmentsOptionalParameters - */ - public ListIncidentAttachmentsOptionalParameters filterAttachmentType( - String filterAttachmentType) { - this.filterAttachmentType = filterAttachmentType; - return this; - } - - /** - * Set include. - * - * @param include Resource to include in the response. Supported value: - * last_modified_by_user. (optional) - * @return ListIncidentAttachmentsOptionalParameters - */ - public ListIncidentAttachmentsOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * List incident attachments. - * - *

See {@link #listIncidentAttachmentsWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @return AttachmentArray - * @throws ApiException if fails to make API call - */ - public AttachmentArray listIncidentAttachments(String incidentId) throws ApiException { - return listIncidentAttachmentsWithHttpInfo( - incidentId, new ListIncidentAttachmentsOptionalParameters()) - .getData(); - } - - /** - * List incident attachments. - * - *

See {@link #listIncidentAttachmentsWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<AttachmentArray> - */ - public CompletableFuture listIncidentAttachmentsAsync(String incidentId) { - return listIncidentAttachmentsWithHttpInfoAsync( - incidentId, new ListIncidentAttachmentsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + null); } /** - * List incident attachments. + * Delete an incident type. * - *

See {@link #listIncidentAttachmentsWithHttpInfo}. + *

See {@link #deleteIncidentTypeWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return AttachmentArray + * @param incidentTypeId The UUID of the incident type. (required) * @throws ApiException if fails to make API call */ - public AttachmentArray listIncidentAttachments( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) throws ApiException { - return listIncidentAttachmentsWithHttpInfo(incidentId, parameters).getData(); + public void deleteIncidentType(String incidentTypeId) throws ApiException { + deleteIncidentTypeWithHttpInfo(incidentTypeId); } /** - * List incident attachments. + * Delete an incident type. * - *

See {@link #listIncidentAttachmentsWithHttpInfoAsync}. + *

See {@link #deleteIncidentTypeWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<AttachmentArray> + * @param incidentTypeId The UUID of the incident type. (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentAttachmentsAsync( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { - return listIncidentAttachmentsWithHttpInfoAsync(incidentId, parameters) + public CompletableFuture deleteIncidentTypeAsync(String incidentTypeId) { + return deleteIncidentTypeWithHttpInfoAsync(incidentTypeId) .thenApply( response -> { return response.getData(); @@ -6434,25 +6411,27 @@ public CompletableFuture listIncidentAttachmentsAsync( } /** - * List incident attachments. + * Delete an incident type. * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<AttachmentArray> + * @param incidentTypeId The UUID of the incident type. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * + * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
204 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listIncidentAttachmentsWithHttpInfo( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentTypeWithHttpInfo(String incidentTypeId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentAttachments"; + String operationId = "deleteIncidentType"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6460,196 +6439,129 @@ public ApiResponse listIncidentAttachmentsWithHttpInfo( } Object localVarPostBody = null; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { + // verify the required parameter 'incidentTypeId' is set + if (incidentTypeId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentAttachments"); + 400, "Missing the required parameter 'incidentTypeId' when calling deleteIncidentType"); } - String filterAttachmentType = parameters.filterAttachmentType; - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/attachments" + "/api/v2/incidents/config/types/{incident_type_id}" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "\\{" + "incident_type_id" + "\\}", + apiClient.escapeString(incidentTypeId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[attachment_type]", filterAttachmentType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentAttachments", + "v2.IncidentsApi.deleteIncidentType", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * List incident attachments. + * Delete an incident type. * - *

See {@link #listIncidentAttachmentsWithHttpInfo}. + *

See {@link #deleteIncidentTypeWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<AttachmentArray>> + * @param incidentTypeId The UUID of the incident type. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> listIncidentAttachmentsWithHttpInfoAsync( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { + public CompletableFuture> deleteIncidentTypeWithHttpInfoAsync( + String incidentTypeId) { // Check if unstable operation is enabled - String operationId = "listIncidentAttachments"; + String operationId = "deleteIncidentType"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'incidentTypeId' is set + if (incidentTypeId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentId' when calling listIncidentAttachments")); + "Missing the required parameter 'incidentTypeId' when calling deleteIncidentType")); return result; } - String filterAttachmentType = parameters.filterAttachmentType; - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/attachments" + "/api/v2/incidents/config/types/{incident_type_id}" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "\\{" + "incident_type_id" + "\\}", + apiClient.escapeString(incidentTypeId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[attachment_type]", filterAttachmentType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentAttachments", + "v2.IncidentsApi.deleteIncidentType", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listIncidentImpacts. */ - public static class ListIncidentImpactsOptionalParameters { - private List include; - - /** - * Set include. - * - * @param include Specifies which related resources should be included in the response. - * (optional) - * @return ListIncidentImpactsOptionalParameters - */ - public ListIncidentImpactsOptionalParameters include( - List include) { - this.include = include; - return this; - } - } - - /** - * List an incident's impacts. - * - *

See {@link #listIncidentImpactsWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @return IncidentImpactsResponse - * @throws ApiException if fails to make API call - */ - public IncidentImpactsResponse listIncidentImpacts(String incidentId) throws ApiException { - return listIncidentImpactsWithHttpInfo(incidentId, new ListIncidentImpactsOptionalParameters()) - .getData(); - } - - /** - * List an incident's impacts. - * - *

See {@link #listIncidentImpactsWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentImpactsResponse> - */ - public CompletableFuture listIncidentImpactsAsync(String incidentId) { - return listIncidentImpactsWithHttpInfoAsync( - incidentId, new ListIncidentImpactsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + null); } /** - * List an incident's impacts. + * Delete an incident user-defined field. * - *

See {@link #listIncidentImpactsWithHttpInfo}. + *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return IncidentImpactsResponse + * @param fieldId The ID of the incident user-defined field. (required) * @throws ApiException if fails to make API call */ - public IncidentImpactsResponse listIncidentImpacts( - String incidentId, ListIncidentImpactsOptionalParameters parameters) throws ApiException { - return listIncidentImpactsWithHttpInfo(incidentId, parameters).getData(); + public void deleteIncidentUserDefinedField(String fieldId) throws ApiException { + deleteIncidentUserDefinedFieldWithHttpInfo(fieldId); } /** - * List an incident's impacts. + * Delete an incident user-defined field. * - *

See {@link #listIncidentImpactsWithHttpInfoAsync}. + *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentImpactsResponse> + * @param fieldId The ID of the incident user-defined field. (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentImpactsAsync( - String incidentId, ListIncidentImpactsOptionalParameters parameters) { - return listIncidentImpactsWithHttpInfoAsync(incidentId, parameters) + public CompletableFuture deleteIncidentUserDefinedFieldAsync(String fieldId) { + return deleteIncidentUserDefinedFieldWithHttpInfoAsync(fieldId) .thenApply( response -> { return response.getData(); @@ -6657,17 +6569,16 @@ public CompletableFuture listIncidentImpactsAsync( } /** - * Get all impacts for an incident. + * Delete an incident user-defined field. * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentImpactsResponse> + * @param fieldId The ID of the incident user-defined field. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -6675,133 +6586,138 @@ public CompletableFuture listIncidentImpactsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse listIncidentImpactsWithHttpInfo( - String incidentId, ListIncidentImpactsOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentUserDefinedFieldWithHttpInfo(String fieldId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteIncidentUserDefinedField"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { + // verify the required parameter 'fieldId' is set + if (fieldId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentImpacts"); + 400, + "Missing the required parameter 'fieldId' when calling deleteIncidentUserDefinedField"); } - List include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/impacts" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "/api/v2/incidents/config/user-defined-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentImpacts", + "v2.IncidentsApi.deleteIncidentUserDefinedField", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * List an incident's impacts. + * Delete an incident user-defined field. * - *

See {@link #listIncidentImpactsWithHttpInfo}. + *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentImpactsResponse>> + * @param fieldId The ID of the incident user-defined field. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listIncidentImpactsWithHttpInfoAsync( - String incidentId, ListIncidentImpactsOptionalParameters parameters) { + public CompletableFuture> deleteIncidentUserDefinedFieldWithHttpInfoAsync( + String fieldId) { + // Check if unstable operation is enabled + String operationId = "deleteIncidentUserDefinedField"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'fieldId' is set + if (fieldId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentImpacts")); + 400, + "Missing the required parameter 'fieldId' when calling" + + " deleteIncidentUserDefinedField")); return result; } - List include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/impacts" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "/api/v2/incidents/config/user-defined-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentImpacts", + "v2.IncidentsApi.deleteIncidentUserDefinedField", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get a list of an incident's integration metadata. + * Delete an incident user-defined role. * - *

See {@link #listIncidentIntegrationsWithHttpInfo}. + *

See {@link #deleteIncidentUserDefinedRoleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @return IncidentIntegrationMetadataListResponse + * @param roleId The UUID of the incident user-defined role. (required) * @throws ApiException if fails to make API call */ - public IncidentIntegrationMetadataListResponse listIncidentIntegrations(String incidentId) - throws ApiException { - return listIncidentIntegrationsWithHttpInfo(incidentId).getData(); + public void deleteIncidentUserDefinedRole(UUID roleId) throws ApiException { + deleteIncidentUserDefinedRoleWithHttpInfo(roleId); } /** - * Get a list of an incident's integration metadata. + * Delete an incident user-defined role. * - *

See {@link #listIncidentIntegrationsWithHttpInfoAsync}. + *

See {@link #deleteIncidentUserDefinedRoleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentIntegrationMetadataListResponse> + * @param roleId The UUID of the incident user-defined role. (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentIntegrationsAsync( - String incidentId) { - return listIncidentIntegrationsWithHttpInfoAsync(incidentId) + public CompletableFuture deleteIncidentUserDefinedRoleAsync(UUID roleId) { + return deleteIncidentUserDefinedRoleWithHttpInfoAsync(roleId) .thenApply( response -> { return response.getData(); @@ -6809,27 +6725,25 @@ public CompletableFuture listIncidentIn } /** - * Get all integration metadata for an incident. + * Delete an existing user-defined role for incidents. * - * @param incidentId The UUID of the incident. (required) - * @return ApiResponse<IncidentIntegrationMetadataListResponse> + * @param roleId The UUID of the incident user-defined role. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listIncidentIntegrationsWithHttpInfo( - String incidentId) throws ApiException { + public ApiResponse deleteIncidentUserDefinedRoleWithHttpInfo(UUID roleId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentIntegrations"; + String operationId = "deleteIncidentUserDefinedRole"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6837,77 +6751,75 @@ public ApiResponse listIncidentIntegrat } Object localVarPostBody = null; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { + // verify the required parameter 'roleId' is set + if (roleId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentIntegrations"); + 400, + "Missing the required parameter 'roleId' when calling deleteIncidentUserDefinedRole"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "/api/v2/incidents/config/user-defined-roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentIntegrations", + "v2.IncidentsApi.deleteIncidentUserDefinedRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get a list of an incident's integration metadata. + * Delete an incident user-defined role. * - *

See {@link #listIncidentIntegrationsWithHttpInfo}. + *

See {@link #deleteIncidentUserDefinedRoleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataListResponse>> + * @param roleId The UUID of the incident user-defined role. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listIncidentIntegrationsWithHttpInfoAsync(String incidentId) { + public CompletableFuture> deleteIncidentUserDefinedRoleWithHttpInfoAsync( + UUID roleId) { // Check if unstable operation is enabled - String operationId = "listIncidentIntegrations"; + String operationId = "deleteIncidentUserDefinedRole"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'roleId' is set + if (roleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentId' when calling listIncidentIntegrations")); + "Missing the required parameter 'roleId' when calling" + + " deleteIncidentUserDefinedRole")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "/api/v2/incidents/config/user-defined-roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -6915,103 +6827,56 @@ public ApiResponse listIncidentIntegrat try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentIntegrations", + "v2.IncidentsApi.deleteIncidentUserDefinedRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listIncidentNotificationRules. */ - public static class ListIncidentNotificationRulesOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of resources to include. Supported values: - * created_by_user, last_modified_by_user, incident_type, - * notification_template (optional) - * @return ListIncidentNotificationRulesOptionalParameters - */ - public ListIncidentNotificationRulesOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * List incident notification rules. - * - *

See {@link #listIncidentNotificationRulesWithHttpInfo}. - * - * @return IncidentNotificationRuleArray - * @throws ApiException if fails to make API call - */ - public IncidentNotificationRuleArray listIncidentNotificationRules() throws ApiException { - return listIncidentNotificationRulesWithHttpInfo( - new ListIncidentNotificationRulesOptionalParameters()) - .getData(); - } - - /** - * List incident notification rules. - * - *

See {@link #listIncidentNotificationRulesWithHttpInfoAsync}. - * - * @return CompletableFuture<IncidentNotificationRuleArray> - */ - public CompletableFuture listIncidentNotificationRulesAsync() { - return listIncidentNotificationRulesWithHttpInfoAsync( - new ListIncidentNotificationRulesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + null); } /** - * List incident notification rules. + * Delete an incident timestamp override. * - *

See {@link #listIncidentNotificationRulesWithHttpInfo}. + *

See {@link #deleteTimestampOverrideWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return IncidentNotificationRuleArray + * @param incidentId The UUID of the incident. (required) + * @param id The UUID of the timestamp override. (required) + * @return IncidentTimestampOverrideResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationRuleArray listIncidentNotificationRules( - ListIncidentNotificationRulesOptionalParameters parameters) throws ApiException { - return listIncidentNotificationRulesWithHttpInfo(parameters).getData(); + public IncidentTimestampOverrideResponse deleteTimestampOverride(String incidentId, UUID id) + throws ApiException { + return deleteTimestampOverrideWithHttpInfo(incidentId, id).getData(); } /** - * List incident notification rules. + * Delete an incident timestamp override. * - *

See {@link #listIncidentNotificationRulesWithHttpInfoAsync}. + *

See {@link #deleteTimestampOverrideWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationRuleArray> + * @param incidentId The UUID of the incident. (required) + * @param id The UUID of the timestamp override. (required) + * @return CompletableFuture<IncidentTimestampOverrideResponse> */ - public CompletableFuture listIncidentNotificationRulesAsync( - ListIncidentNotificationRulesOptionalParameters parameters) { - return listIncidentNotificationRulesWithHttpInfoAsync(parameters) + public CompletableFuture deleteTimestampOverrideAsync( + String incidentId, UUID id) { + return deleteTimestampOverrideWithHttpInfoAsync(incidentId, id) .thenApply( response -> { return response.getData(); @@ -7019,10 +6884,11 @@ public CompletableFuture listIncidentNotification } /** - * Lists all notification rules for the organization. Optionally filter by incident type. + * Delete a timestamp override for an incident. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationRuleArray> + * @param incidentId The UUID of the incident. (required) + * @param id The UUID of the timestamp override. (required) + * @return ApiResponse<IncidentTimestampOverrideResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7036,161 +6902,159 @@ public CompletableFuture listIncidentNotification * *
429 Too many requests -
*/ - public ApiResponse listIncidentNotificationRulesWithHttpInfo( - ListIncidentNotificationRulesOptionalParameters parameters) throws ApiException { + public ApiResponse deleteTimestampOverrideWithHttpInfo( + String incidentId, UUID id) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentNotificationRules"; + String operationId = "deleteTimestampOverride"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String include = parameters.include; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling deleteTimestampOverride"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling deleteTimestampOverride"); + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-rules"; + String localVarPath = + "/api/v2/incidents/{incident_id}/timestamp-overrides/{id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentNotificationRules", + "v2.IncidentsApi.deleteTimestampOverride", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List incident notification rules. + * Delete an incident timestamp override. * - *

See {@link #listIncidentNotificationRulesWithHttpInfo}. + *

See {@link #deleteTimestampOverrideWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationRuleArray>> + * @param incidentId The UUID of the incident. (required) + * @param id The UUID of the timestamp override. (required) + * @return CompletableFuture<ApiResponse<IncidentTimestampOverrideResponse>> */ - public CompletableFuture> - listIncidentNotificationRulesWithHttpInfoAsync( - ListIncidentNotificationRulesOptionalParameters parameters) { + public CompletableFuture> + deleteTimestampOverrideWithHttpInfoAsync(String incidentId, UUID id) { // Check if unstable operation is enabled - String operationId = "listIncidentNotificationRules"; + String operationId = "deleteTimestampOverride"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String include = parameters.include; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling deleteTimestampOverride")); + return result; + } + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling deleteTimestampOverride")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-rules"; + String localVarPath = + "/api/v2/incidents/{incident_id}/timestamp-overrides/{id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentNotificationRules", + "v2.IncidentsApi.deleteTimestampOverride", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listIncidentNotificationTemplates. */ - public static class ListIncidentNotificationTemplatesOptionalParameters { - private UUID filterIncidentType; - private String include; - - /** - * Set filterIncidentType. - * - * @param filterIncidentType Optional incident type ID filter. (optional) - * @return ListIncidentNotificationTemplatesOptionalParameters - */ - public ListIncidentNotificationTemplatesOptionalParameters filterIncidentType( - UUID filterIncidentType) { - this.filterIncidentType = filterIncidentType; - return this; - } - - /** - * Set include. - * - * @param include Comma-separated list of relationships to include. Supported values: - * created_by_user, last_modified_by_user, incident_type - * (optional) - * @return ListIncidentNotificationTemplatesOptionalParameters - */ - public ListIncidentNotificationTemplatesOptionalParameters include(String include) { - this.include = include; - return this; - } + new GenericType() {}); } /** - * List incident notification templates. + * Get global incident settings. * - *

See {@link #listIncidentNotificationTemplatesWithHttpInfo}. + *

See {@link #getGlobalIncidentSettingsWithHttpInfo}. * - * @return IncidentNotificationTemplateArray + * @return GlobalIncidentSettingsResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationTemplateArray listIncidentNotificationTemplates() throws ApiException { - return listIncidentNotificationTemplatesWithHttpInfo( - new ListIncidentNotificationTemplatesOptionalParameters()) - .getData(); + public GlobalIncidentSettingsResponse getGlobalIncidentSettings() throws ApiException { + return getGlobalIncidentSettingsWithHttpInfo().getData(); } /** - * List incident notification templates. + * Get global incident settings. * - *

See {@link #listIncidentNotificationTemplatesWithHttpInfoAsync}. + *

See {@link #getGlobalIncidentSettingsWithHttpInfoAsync}. * - * @return CompletableFuture<IncidentNotificationTemplateArray> + * @return CompletableFuture<GlobalIncidentSettingsResponse> */ - public CompletableFuture - listIncidentNotificationTemplatesAsync() { - return listIncidentNotificationTemplatesWithHttpInfoAsync( - new ListIncidentNotificationTemplatesOptionalParameters()) + public CompletableFuture getGlobalIncidentSettingsAsync() { + return getGlobalIncidentSettingsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -7198,42 +7062,9 @@ public IncidentNotificationTemplateArray listIncidentNotificationTemplates() thr } /** - * List incident notification templates. - * - *

See {@link #listIncidentNotificationTemplatesWithHttpInfo}. + * Retrieve global incident settings for the organization. * - * @param parameters Optional parameters for the request. - * @return IncidentNotificationTemplateArray - * @throws ApiException if fails to make API call - */ - public IncidentNotificationTemplateArray listIncidentNotificationTemplates( - ListIncidentNotificationTemplatesOptionalParameters parameters) throws ApiException { - return listIncidentNotificationTemplatesWithHttpInfo(parameters).getData(); - } - - /** - * List incident notification templates. - * - *

See {@link #listIncidentNotificationTemplatesWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationTemplateArray> - */ - public CompletableFuture - listIncidentNotificationTemplatesAsync( - ListIncidentNotificationTemplatesOptionalParameters parameters) { - return listIncidentNotificationTemplatesWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Lists all notification templates. Optionally filter by incident type. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationTemplateArray> + * @return ApiResponse<GlobalIncidentSettingsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7241,44 +7072,33 @@ public IncidentNotificationTemplateArray listIncidentNotificationTemplates( * * * - * - * - * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - listIncidentNotificationTemplatesWithHttpInfo( - ListIncidentNotificationTemplatesOptionalParameters parameters) throws ApiException { + public ApiResponse getGlobalIncidentSettingsWithHttpInfo() + throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentNotificationTemplates"; + String operationId = "getGlobalIncidentSettings"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - UUID filterIncidentType = parameters.filterIncidentType; - String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-templates"; + String localVarPath = "/api/v2/incidents/config/global/settings"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentNotificationTemplates", + "v2.IncidentsApi.getGlobalIncidentSettings", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( "GET", builder, @@ -7287,57 +7107,48 @@ public IncidentNotificationTemplateArray listIncidentNotificationTemplates( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List incident notification templates. + * Get global incident settings. * - *

See {@link #listIncidentNotificationTemplatesWithHttpInfo}. + *

See {@link #getGlobalIncidentSettingsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationTemplateArray>> + * @return CompletableFuture<ApiResponse<GlobalIncidentSettingsResponse>> */ - public CompletableFuture> - listIncidentNotificationTemplatesWithHttpInfoAsync( - ListIncidentNotificationTemplatesOptionalParameters parameters) { + public CompletableFuture> + getGlobalIncidentSettingsWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "listIncidentNotificationTemplates"; + String operationId = "getGlobalIncidentSettings"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - UUID filterIncidentType = parameters.filterIncidentType; - String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-templates"; + String localVarPath = "/api/v2/incidents/config/global/settings"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentNotificationTemplates", + "v2.IncidentsApi.getGlobalIncidentSettings", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -7350,30 +7161,49 @@ public IncidentNotificationTemplateArray listIncidentNotificationTemplates( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to getIncident. */ + public static class GetIncidentOptionalParameters { + private List include; + + /** + * Set include. + * + * @param include Specifies which types of related objects should be included in the response. + * (optional) + * @return GetIncidentOptionalParameters + */ + public GetIncidentOptionalParameters include(List include) { + this.include = include; + return this; + } } /** - * List postmortem templates. + * Get the details of an incident. * - *

See {@link #listIncidentPostmortemTemplatesWithHttpInfo}. + *

See {@link #getIncidentWithHttpInfo}. * - * @return PostmortemTemplatesResponse + * @param incidentId The UUID of the incident. (required) + * @return IncidentResponse * @throws ApiException if fails to make API call */ - public PostmortemTemplatesResponse listIncidentPostmortemTemplates() throws ApiException { - return listIncidentPostmortemTemplatesWithHttpInfo().getData(); + public IncidentResponse getIncident(String incidentId) throws ApiException { + return getIncidentWithHttpInfo(incidentId, new GetIncidentOptionalParameters()).getData(); } /** - * List postmortem templates. + * Get the details of an incident. * - *

See {@link #listIncidentPostmortemTemplatesWithHttpInfoAsync}. + *

See {@link #getIncidentWithHttpInfoAsync}. * - * @return CompletableFuture<PostmortemTemplatesResponse> + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentResponse> */ - public CompletableFuture listIncidentPostmortemTemplatesAsync() { - return listIncidentPostmortemTemplatesWithHttpInfoAsync() + public CompletableFuture getIncidentAsync(String incidentId) { + return getIncidentWithHttpInfoAsync(incidentId, new GetIncidentOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -7381,9 +7211,44 @@ public CompletableFuture listIncidentPostmortemTemp } /** - * Retrieve a list of all postmortem templates for incidents. + * Get the details of an incident. * - * @return ApiResponse<PostmortemTemplatesResponse> + *

See {@link #getIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return IncidentResponse + * @throws ApiException if fails to make API call + */ + public IncidentResponse getIncident(String incidentId, GetIncidentOptionalParameters parameters) + throws ApiException { + return getIncidentWithHttpInfo(incidentId, parameters).getData(); + } + + /** + * Get the details of an incident. + * + *

See {@link #getIncidentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentResponse> + */ + public CompletableFuture getIncidentAsync( + String incidentId, GetIncidentOptionalParameters parameters) { + return getIncidentWithHttpInfoAsync(incidentId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the details of an incident by incident_id. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7391,33 +7256,49 @@ public CompletableFuture listIncidentPostmortemTemp * * * + * + * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listIncidentPostmortemTemplatesWithHttpInfo() - throws ApiException { + public ApiResponse getIncidentWithHttpInfo( + String incidentId, GetIncidentOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentPostmortemTemplates"; + String operationId = "getIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling getIncident"); + } + List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/postmortem-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentPostmortemTemplates", + "v2.IncidentsApi.getIncident", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "GET", builder, @@ -7426,49 +7307,65 @@ public ApiResponse listIncidentPostmortemTemplatesW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List postmortem templates. + * Get the details of an incident. * - *

See {@link #listIncidentPostmortemTemplatesWithHttpInfo}. + *

See {@link #getIncidentWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<PostmortemTemplatesResponse>> + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentResponse>> */ - public CompletableFuture> - listIncidentPostmortemTemplatesWithHttpInfoAsync() { + public CompletableFuture> getIncidentWithHttpInfoAsync( + String incidentId, GetIncidentOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listIncidentPostmortemTemplates"; + String operationId = "getIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'incidentId' when calling getIncident")); + return result; + } + List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/postmortem-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentPostmortemTemplates", + "v2.IncidentsApi.getIncident", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -7480,104 +7377,34 @@ public ApiResponse listIncidentPostmortemTemplatesW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listIncidents. */ - public static class ListIncidentsOptionalParameters { - private List include; - private Long pageSize; - private Long pageOffset; - - /** - * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) - * @return ListIncidentsOptionalParameters - */ - public ListIncidentsOptionalParameters include(List include) { - this.include = include; - return this; - } - - /** - * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default - * to 10) - * @return ListIncidentsOptionalParameters - */ - public ListIncidentsOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageOffset. - * - * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, - * default to 0) - * @return ListIncidentsOptionalParameters - */ - public ListIncidentsOptionalParameters pageOffset(Long pageOffset) { - this.pageOffset = pageOffset; - return this; - } - } - - /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfo}. - * - * @return IncidentsResponse - * @throws ApiException if fails to make API call - */ - public IncidentsResponse listIncidents() throws ApiException { - return listIncidentsWithHttpInfo(new ListIncidentsOptionalParameters()).getData(); - } - - /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfoAsync}. - * - * @return CompletableFuture<IncidentsResponse> - */ - public CompletableFuture listIncidentsAsync() { - return listIncidentsWithHttpInfoAsync(new ListIncidentsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } + /** + * Get an AI-generated incident postmortem. + * + *

See {@link #getIncidentAIPostmortemWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentAIPostmortemResponse + * @throws ApiException if fails to make API call + */ + public IncidentAIPostmortemResponse getIncidentAIPostmortem(String incidentId) + throws ApiException { + return getIncidentAIPostmortemWithHttpInfo(incidentId).getData(); + } /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return IncidentsResponse - * @throws ApiException if fails to make API call - */ - public IncidentsResponse listIncidents(ListIncidentsOptionalParameters parameters) - throws ApiException { - return listIncidentsWithHttpInfo(parameters).getData(); - } - - /** - * Get a list of incidents. + * Get an AI-generated incident postmortem. * - *

See {@link #listIncidentsWithHttpInfoAsync}. + *

See {@link #getIncidentAIPostmortemWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentsResponse> + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentAIPostmortemResponse> */ - public CompletableFuture listIncidentsAsync( - ListIncidentsOptionalParameters parameters) { - return listIncidentsWithHttpInfoAsync(parameters) + public CompletableFuture getIncidentAIPostmortemAsync( + String incidentId) { + return getIncidentAIPostmortemWithHttpInfoAsync(incidentId) .thenApply( response -> { return response.getData(); @@ -7585,64 +7412,10 @@ public CompletableFuture listIncidentsAsync( } /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfo}. - * - * @return PaginationIterable<IncidentResponseData> - */ - public PaginationIterable listIncidentsWithPagination() { - ListIncidentsOptionalParameters parameters = new ListIncidentsOptionalParameters(); - return listIncidentsWithPagination(parameters); - } - - /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfo}. - * - * @return IncidentsResponse - */ - public PaginationIterable listIncidentsWithPagination( - ListIncidentsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = ""; - String valueSetterPath = "pageOffset"; - Boolean valueSetterParamOptional = true; - Long limit; - - if (parameters.pageSize == null) { - limit = 10l; - parameters.pageSize(limit); - } else { - limit = parameters.pageSize; - } - - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "listIncidents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - true, - false, - limit, - args, - 0); - - return iterator; - } - - /** - * Get all incidents for the user's organization. + * Generate an AI postmortem for an incident. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentsResponse> + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentAIPostmortemResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7656,133 +7429,146 @@ public PaginationIterable listIncidentsWithPagination( * *
429 Too many requests -
*/ - public ApiResponse listIncidentsWithHttpInfo( - ListIncidentsOptionalParameters parameters) throws ApiException { + public ApiResponse getIncidentAIPostmortemWithHttpInfo( + String incidentId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidents"; + String operationId = "getIncidentAIPostmortem"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - List include = parameters.include; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling getIncidentAIPostmortem"); + } // create path and map variables - String localVarPath = "/api/v2/incidents"; + String localVarPath = + "/api/v2/incidents/{incident_id}/ai/postmortem" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidents", + "v2.IncidentsApi.getIncidentAIPostmortem", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a list of incidents. + * Get an AI-generated incident postmortem. * - *

See {@link #listIncidentsWithHttpInfo}. + *

See {@link #getIncidentAIPostmortemWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentsResponse>> + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentAIPostmortemResponse>> */ - public CompletableFuture> listIncidentsWithHttpInfoAsync( - ListIncidentsOptionalParameters parameters) { + public CompletableFuture> + getIncidentAIPostmortemWithHttpInfoAsync(String incidentId) { // Check if unstable operation is enabled - String operationId = "listIncidents"; + String operationId = "getIncidentAIPostmortem"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - List include = parameters.include; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling getIncidentAIPostmortem")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents"; + String localVarPath = + "/api/v2/incidents/{incident_id}/ai/postmortem" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidents", + "v2.IncidentsApi.getIncidentAIPostmortem", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "POST", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a list of an incident's todos. + * Get incident integration metadata details. * - *

See {@link #listIncidentTodosWithHttpInfo}. + *

See {@link #getIncidentIntegrationWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @return IncidentTodoListResponse + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return IncidentIntegrationMetadataResponse * @throws ApiException if fails to make API call */ - public IncidentTodoListResponse listIncidentTodos(String incidentId) throws ApiException { - return listIncidentTodosWithHttpInfo(incidentId).getData(); + public IncidentIntegrationMetadataResponse getIncidentIntegration( + String incidentId, String integrationMetadataId) throws ApiException { + return getIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId).getData(); } /** - * Get a list of an incident's todos. + * Get incident integration metadata details. * - *

See {@link #listIncidentTodosWithHttpInfoAsync}. + *

See {@link #getIncidentIntegrationWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentTodoListResponse> + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture<IncidentIntegrationMetadataResponse> */ - public CompletableFuture listIncidentTodosAsync(String incidentId) { - return listIncidentTodosWithHttpInfoAsync(incidentId) + public CompletableFuture getIncidentIntegrationAsync( + String incidentId, String integrationMetadataId) { + return getIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId) .thenApply( response -> { return response.getData(); @@ -7790,10 +7576,11 @@ public CompletableFuture listIncidentTodosAsync(String } /** - * Get all todos for an incident. + * Get incident integration metadata details. * * @param incidentId The UUID of the incident. (required) - * @return ApiResponse<IncidentTodoListResponse> + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return ApiResponse<IncidentIntegrationMetadataResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7807,10 +7594,10 @@ public CompletableFuture listIncidentTodosAsync(String * *
429 Too many requests -
*/ - public ApiResponse listIncidentTodosWithHttpInfo(String incidentId) - throws ApiException { + public ApiResponse getIncidentIntegrationWithHttpInfo( + String incidentId, String integrationMetadataId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentTodos"; + String operationId = "getIncidentIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -7821,19 +7608,30 @@ public ApiResponse listIncidentTodosWithHttpInfo(Strin // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentTodos"); + 400, "Missing the required parameter 'incidentId' when calling getIncidentIntegration"); + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integrationMetadataId' when calling" + + " getIncidentIntegration"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos" + "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "integration_metadata_id" + "\\}", + apiClient.escapeString(integrationMetadataId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentTodos", + "v2.IncidentsApi.getIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7848,25 +7646,27 @@ public ApiResponse listIncidentTodosWithHttpInfo(Strin localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a list of an incident's todos. + * Get incident integration metadata details. * - *

See {@link #listIncidentTodosWithHttpInfo}. + *

See {@link #getIncidentIntegrationWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<ApiResponse<IncidentTodoListResponse>> + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> */ - public CompletableFuture> - listIncidentTodosWithHttpInfoAsync(String incidentId) { + public CompletableFuture> + getIncidentIntegrationWithHttpInfoAsync(String incidentId, String integrationMetadataId) { // Check if unstable operation is enabled - String operationId = "listIncidentTodos"; + String operationId = "getIncidentIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -7875,17 +7675,34 @@ public ApiResponse listIncidentTodosWithHttpInfo(Strin // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentTodos")); + 400, + "Missing the required parameter 'incidentId' when calling getIncidentIntegration")); + return result; + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integrationMetadataId' when calling" + + " getIncidentIntegration")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos" + "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "integration_metadata_id" + "\\}", + apiClient.escapeString(integrationMetadataId.toString())); Map localVarHeaderParams = new HashMap(); @@ -7893,7 +7710,7 @@ public ApiResponse listIncidentTodosWithHttpInfo(Strin try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentTodos", + "v2.IncidentsApi.getIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7901,7 +7718,8 @@ public ApiResponse listIncidentTodosWithHttpInfo(Strin new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -7913,47 +7731,53 @@ public ApiResponse listIncidentTodosWithHttpInfo(Strin localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listIncidentTypes. */ - public static class ListIncidentTypesOptionalParameters { - private Boolean includeDeleted; + /** Manage optional parameters to getIncidentNotificationRule. */ + public static class GetIncidentNotificationRuleOptionalParameters { + private String include; /** - * Set includeDeleted. + * Set include. * - * @param includeDeleted Include deleted incident types in the response. (optional, default to - * false) - * @return ListIncidentTypesOptionalParameters + * @param include Comma-separated list of resources to include. Supported values: + * created_by_user, last_modified_by_user, incident_type, + * notification_template (optional) + * @return GetIncidentNotificationRuleOptionalParameters */ - public ListIncidentTypesOptionalParameters includeDeleted(Boolean includeDeleted) { - this.includeDeleted = includeDeleted; + public GetIncidentNotificationRuleOptionalParameters include(String include) { + this.include = include; return this; } } /** - * Get a list of incident types. + * Get an incident notification rule. * - *

See {@link #listIncidentTypesWithHttpInfo}. + *

See {@link #getIncidentNotificationRuleWithHttpInfo}. * - * @return IncidentTypeListResponse + * @param id The ID of the notification rule. (required) + * @return IncidentNotificationRule * @throws ApiException if fails to make API call */ - public IncidentTypeListResponse listIncidentTypes() throws ApiException { - return listIncidentTypesWithHttpInfo(new ListIncidentTypesOptionalParameters()).getData(); + public IncidentNotificationRule getIncidentNotificationRule(UUID id) throws ApiException { + return getIncidentNotificationRuleWithHttpInfo( + id, new GetIncidentNotificationRuleOptionalParameters()) + .getData(); } /** - * Get a list of incident types. + * Get an incident notification rule. * - *

See {@link #listIncidentTypesWithHttpInfoAsync}. + *

See {@link #getIncidentNotificationRuleWithHttpInfoAsync}. * - * @return CompletableFuture<IncidentTypeListResponse> + * @param id The ID of the notification rule. (required) + * @return CompletableFuture<IncidentNotificationRule> */ - public CompletableFuture listIncidentTypesAsync() { - return listIncidentTypesWithHttpInfoAsync(new ListIncidentTypesOptionalParameters()) + public CompletableFuture getIncidentNotificationRuleAsync(UUID id) { + return getIncidentNotificationRuleWithHttpInfoAsync( + id, new GetIncidentNotificationRuleOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -7961,30 +7785,32 @@ public CompletableFuture listIncidentTypesAsync() { } /** - * Get a list of incident types. + * Get an incident notification rule. * - *

See {@link #listIncidentTypesWithHttpInfo}. + *

See {@link #getIncidentNotificationRuleWithHttpInfo}. * + * @param id The ID of the notification rule. (required) * @param parameters Optional parameters for the request. - * @return IncidentTypeListResponse + * @return IncidentNotificationRule * @throws ApiException if fails to make API call */ - public IncidentTypeListResponse listIncidentTypes(ListIncidentTypesOptionalParameters parameters) - throws ApiException { - return listIncidentTypesWithHttpInfo(parameters).getData(); + public IncidentNotificationRule getIncidentNotificationRule( + UUID id, GetIncidentNotificationRuleOptionalParameters parameters) throws ApiException { + return getIncidentNotificationRuleWithHttpInfo(id, parameters).getData(); } /** - * Get a list of incident types. + * Get an incident notification rule. * - *

See {@link #listIncidentTypesWithHttpInfoAsync}. + *

See {@link #getIncidentNotificationRuleWithHttpInfoAsync}. * + * @param id The ID of the notification rule. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentTypeListResponse> + * @return CompletableFuture<IncidentNotificationRule> */ - public CompletableFuture listIncidentTypesAsync( - ListIncidentTypesOptionalParameters parameters) { - return listIncidentTypesWithHttpInfoAsync(parameters) + public CompletableFuture getIncidentNotificationRuleAsync( + UUID id, GetIncidentNotificationRuleOptionalParameters parameters) { + return getIncidentNotificationRuleWithHttpInfoAsync(id, parameters) .thenApply( response -> { return response.getData(); @@ -7992,10 +7818,11 @@ public CompletableFuture listIncidentTypesAsync( } /** - * Get all incident types. + * Retrieves a specific notification rule by its ID. * + * @param id The ID of the notification rule. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentTypeListResponse> + * @return ApiResponse<IncidentNotificationRule> * @throws ApiException if fails to make API call * @http.response.details * @@ -8005,31 +7832,40 @@ public CompletableFuture listIncidentTypesAsync( * * * + * * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listIncidentTypesWithHttpInfo( - ListIncidentTypesOptionalParameters parameters) throws ApiException { + public ApiResponse getIncidentNotificationRuleWithHttpInfo( + UUID id, GetIncidentNotificationRuleOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentTypes"; + String operationId = "getIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - Boolean includeDeleted = parameters.includeDeleted; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getIncidentNotificationRule"); + } + String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/types"; + String localVarPath = + "/api/v2/incidents/config/notification-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_deleted", includeDeleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentTypes", + "v2.IncidentsApi.getIncidentNotificationRule", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8044,44 +7880,57 @@ public ApiResponse listIncidentTypesWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a list of incident types. + * Get an incident notification rule. * - *

See {@link #listIncidentTypesWithHttpInfo}. + *

See {@link #getIncidentNotificationRuleWithHttpInfo}. * + * @param id The ID of the notification rule. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentTypeListResponse>> + * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> */ - public CompletableFuture> - listIncidentTypesWithHttpInfoAsync(ListIncidentTypesOptionalParameters parameters) { + public CompletableFuture> + getIncidentNotificationRuleWithHttpInfoAsync( + UUID id, GetIncidentNotificationRuleOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listIncidentTypes"; + String operationId = "getIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - Boolean includeDeleted = parameters.includeDeleted; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling getIncidentNotificationRule")); + return result; + } + String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/types"; + String localVarPath = + "/api/v2/incidents/config/notification-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_deleted", includeDeleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentTypes", + "v2.IncidentsApi.getIncidentNotificationRule", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8089,7 +7938,7 @@ public ApiResponse listIncidentTypesWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -8101,103 +7950,54 @@ public ApiResponse listIncidentTypesWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listIncidentUserDefinedFields. */ - public static class ListIncidentUserDefinedFieldsOptionalParameters { - private Long pageSize; - private Long pageNumber; - private Boolean includeDeleted; - private String filterIncidentType; + /** Manage optional parameters to getIncidentNotificationTemplate. */ + public static class GetIncidentNotificationTemplateOptionalParameters { private String include; /** - * Set pageSize. - * - * @param pageSize The number of results to return per page. Must be between 0 and 1000. - * (optional, default to 1000) - * @return ListIncidentUserDefinedFieldsOptionalParameters - */ - public ListIncidentUserDefinedFieldsOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageNumber. + * Set include. * - * @param pageNumber The page number to retrieve, starting at 0. (optional, default to 0) - * @return ListIncidentUserDefinedFieldsOptionalParameters + * @param include Comma-separated list of relationships to include. Supported values: + * created_by_user, last_modified_by_user, incident_type + * (optional) + * @return GetIncidentNotificationTemplateOptionalParameters */ - public ListIncidentUserDefinedFieldsOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; + public GetIncidentNotificationTemplateOptionalParameters include(String include) { + this.include = include; return this; } + } - /** - * Set includeDeleted. - * - * @param includeDeleted When true, include soft-deleted fields in the response. (optional, - * default to false) - * @return ListIncidentUserDefinedFieldsOptionalParameters - */ - public ListIncidentUserDefinedFieldsOptionalParameters includeDeleted(Boolean includeDeleted) { - this.includeDeleted = includeDeleted; - return this; - } - - /** - * Set filterIncidentType. - * - * @param filterIncidentType Filter results to fields associated with the given incident type - * UUID. (optional) - * @return ListIncidentUserDefinedFieldsOptionalParameters - */ - public ListIncidentUserDefinedFieldsOptionalParameters filterIncidentType( - String filterIncidentType) { - this.filterIncidentType = filterIncidentType; - return this; - } - - /** - * Set include. - * - * @param include Comma-separated list of related resources to include. Supported values are - * "last_modified_by_user", "created_by_user", and "incident_type". (optional) - * @return ListIncidentUserDefinedFieldsOptionalParameters - */ - public ListIncidentUserDefinedFieldsOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * Get a list of incident user-defined fields. - * - *

See {@link #listIncidentUserDefinedFieldsWithHttpInfo}. - * - * @return IncidentUserDefinedFieldListResponse - * @throws ApiException if fails to make API call - */ - public IncidentUserDefinedFieldListResponse listIncidentUserDefinedFields() throws ApiException { - return listIncidentUserDefinedFieldsWithHttpInfo( - new ListIncidentUserDefinedFieldsOptionalParameters()) - .getData(); - } + /** + * Get incident notification template. + * + *

See {@link #getIncidentNotificationTemplateWithHttpInfo}. + * + * @param id The ID of the notification template. (required) + * @return IncidentNotificationTemplate + * @throws ApiException if fails to make API call + */ + public IncidentNotificationTemplate getIncidentNotificationTemplate(UUID id) throws ApiException { + return getIncidentNotificationTemplateWithHttpInfo( + id, new GetIncidentNotificationTemplateOptionalParameters()) + .getData(); + } /** - * Get a list of incident user-defined fields. + * Get incident notification template. * - *

See {@link #listIncidentUserDefinedFieldsWithHttpInfoAsync}. + *

See {@link #getIncidentNotificationTemplateWithHttpInfoAsync}. * - * @return CompletableFuture<IncidentUserDefinedFieldListResponse> + * @param id The ID of the notification template. (required) + * @return CompletableFuture<IncidentNotificationTemplate> */ - public CompletableFuture - listIncidentUserDefinedFieldsAsync() { - return listIncidentUserDefinedFieldsWithHttpInfoAsync( - new ListIncidentUserDefinedFieldsOptionalParameters()) + public CompletableFuture getIncidentNotificationTemplateAsync( + UUID id) { + return getIncidentNotificationTemplateWithHttpInfoAsync( + id, new GetIncidentNotificationTemplateOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -8205,30 +8005,32 @@ public IncidentUserDefinedFieldListResponse listIncidentUserDefinedFields() thro } /** - * Get a list of incident user-defined fields. + * Get incident notification template. * - *

See {@link #listIncidentUserDefinedFieldsWithHttpInfo}. + *

See {@link #getIncidentNotificationTemplateWithHttpInfo}. * + * @param id The ID of the notification template. (required) * @param parameters Optional parameters for the request. - * @return IncidentUserDefinedFieldListResponse + * @return IncidentNotificationTemplate * @throws ApiException if fails to make API call */ - public IncidentUserDefinedFieldListResponse listIncidentUserDefinedFields( - ListIncidentUserDefinedFieldsOptionalParameters parameters) throws ApiException { - return listIncidentUserDefinedFieldsWithHttpInfo(parameters).getData(); + public IncidentNotificationTemplate getIncidentNotificationTemplate( + UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { + return getIncidentNotificationTemplateWithHttpInfo(id, parameters).getData(); } /** - * Get a list of incident user-defined fields. + * Get incident notification template. * - *

See {@link #listIncidentUserDefinedFieldsWithHttpInfoAsync}. + *

See {@link #getIncidentNotificationTemplateWithHttpInfoAsync}. * + * @param id The ID of the notification template. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentUserDefinedFieldListResponse> + * @return CompletableFuture<IncidentNotificationTemplate> */ - public CompletableFuture listIncidentUserDefinedFieldsAsync( - ListIncidentUserDefinedFieldsOptionalParameters parameters) { - return listIncidentUserDefinedFieldsWithHttpInfoAsync(parameters) + public CompletableFuture getIncidentNotificationTemplateAsync( + UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) { + return getIncidentNotificationTemplateWithHttpInfoAsync(id, parameters) .thenApply( response -> { return response.getData(); @@ -8236,10 +8038,11 @@ public CompletableFuture listIncidentUserD } /** - * Get a list of all incident user-defined fields. + * Retrieves a specific notification template by its ID. * + * @param id The ID of the notification template. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentUserDefinedFieldListResponse> + * @return ApiResponse<IncidentNotificationTemplate> * @throws ApiException if fails to make API call * @http.response.details * @@ -8249,41 +8052,40 @@ public CompletableFuture listIncidentUserD * * * + * * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - listIncidentUserDefinedFieldsWithHttpInfo( - ListIncidentUserDefinedFieldsOptionalParameters parameters) throws ApiException { + public ApiResponse getIncidentNotificationTemplateWithHttpInfo( + UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentUserDefinedFields"; + String operationId = "getIncidentNotificationTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; - Boolean includeDeleted = parameters.includeDeleted; - String filterIncidentType = parameters.filterIncidentType; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getIncidentNotificationTemplate"); + } String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/user-defined-fields"; + String localVarPath = + "/api/v2/incidents/config/notification-templates/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include-deleted", includeDeleted)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentUserDefinedFields", + "v2.IncidentsApi.getIncidentNotificationTemplate", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8298,55 +8100,60 @@ public CompletableFuture listIncidentUserD localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a list of incident user-defined fields. + * Get incident notification template. * - *

See {@link #listIncidentUserDefinedFieldsWithHttpInfo}. + *

See {@link #getIncidentNotificationTemplateWithHttpInfo}. * + * @param id The ID of the notification template. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldListResponse>> + * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> */ - public CompletableFuture> - listIncidentUserDefinedFieldsWithHttpInfoAsync( - ListIncidentUserDefinedFieldsOptionalParameters parameters) { + public CompletableFuture> + getIncidentNotificationTemplateWithHttpInfoAsync( + UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listIncidentUserDefinedFields"; + String operationId = "getIncidentNotificationTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; - Boolean includeDeleted = parameters.includeDeleted; - String filterIncidentType = parameters.filterIncidentType; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling getIncidentNotificationTemplate")); + return result; + } String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/user-defined-fields"; + String localVarPath = + "/api/v2/incidents/config/notification-templates/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include-deleted", includeDeleted)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentUserDefinedFields", + "v2.IncidentsApi.getIncidentNotificationTemplate", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8354,7 +8161,7 @@ public CompletableFuture listIncidentUserD new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -8367,93 +8174,7394 @@ public CompletableFuture listIncidentUserD localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to searchIncidents. */ - public static class SearchIncidentsOptionalParameters { - private IncidentRelatedObject include; - private IncidentSearchSortOrder sort; - private Long pageSize; - private Long pageOffset; + /** + * Get postmortem template. + * + *

See {@link #getIncidentPostmortemTemplateWithHttpInfo}. + * + * @param templateId The ID of the postmortem template (required) + * @return PostmortemTemplateResponse + * @throws ApiException if fails to make API call + */ + public PostmortemTemplateResponse getIncidentPostmortemTemplate(String templateId) + throws ApiException { + return getIncidentPostmortemTemplateWithHttpInfo(templateId).getData(); + } - /** - * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) - * @return SearchIncidentsOptionalParameters - */ - public SearchIncidentsOptionalParameters include(IncidentRelatedObject include) { - this.include = include; - return this; + /** + * Get postmortem template. + * + *

See {@link #getIncidentPostmortemTemplateWithHttpInfoAsync}. + * + * @param templateId The ID of the postmortem template (required) + * @return CompletableFuture<PostmortemTemplateResponse> + */ + public CompletableFuture getIncidentPostmortemTemplateAsync( + String templateId) { + return getIncidentPostmortemTemplateWithHttpInfoAsync(templateId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve details of a specific postmortem template. + * + * @param templateId The ID of the postmortem template (required) + * @return ApiResponse<PostmortemTemplateResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getIncidentPostmortemTemplateWithHttpInfo( + String templateId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentPostmortemTemplate"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = null; - /** - * Set sort. - * - * @param sort Specifies the order of returned incidents. (optional) - * @return SearchIncidentsOptionalParameters - */ - public SearchIncidentsOptionalParameters sort(IncidentSearchSortOrder sort) { - this.sort = sort; - return this; + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'templateId' when calling getIncidentPostmortemTemplate"); } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/postmortem-templates/{template_id}" + .replaceAll( + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); - /** - * Set pageSize. + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentPostmortemTemplate", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get postmortem template. + * + *

See {@link #getIncidentPostmortemTemplateWithHttpInfo}. + * + * @param templateId The ID of the postmortem template (required) + * @return CompletableFuture<ApiResponse<PostmortemTemplateResponse>> + */ + public CompletableFuture> + getIncidentPostmortemTemplateWithHttpInfoAsync(String templateId) { + // Check if unstable operation is enabled + String operationId = "getIncidentPostmortemTemplate"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'templateId' when calling" + + " getIncidentPostmortemTemplate")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/postmortem-templates/{template_id}" + .replaceAll( + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentPostmortemTemplate", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an incident responder. + * + *

See {@link #getIncidentResponderWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param responderId The UUID of the incident responder. (required) + * @return IncidentResponderResponse + * @throws ApiException if fails to make API call + */ + public IncidentResponderResponse getIncidentResponder(String incidentId, UUID responderId) + throws ApiException { + return getIncidentResponderWithHttpInfo(incidentId, responderId).getData(); + } + + /** + * Get an incident responder. + * + *

See {@link #getIncidentResponderWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param responderId The UUID of the incident responder. (required) + * @return CompletableFuture<IncidentResponderResponse> + */ + public CompletableFuture getIncidentResponderAsync( + String incidentId, UUID responderId) { + return getIncidentResponderWithHttpInfoAsync(incidentId, responderId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single responder for an incident. + * + * @param incidentId The UUID of the incident. (required) + * @param responderId The UUID of the incident responder. (required) + * @return ApiResponse<IncidentResponderResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getIncidentResponderWithHttpInfo( + String incidentId, UUID responderId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentResponder"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling getIncidentResponder"); + } + + // verify the required parameter 'responderId' is set + if (responderId == null) { + throw new ApiException( + 400, "Missing the required parameter 'responderId' when calling getIncidentResponder"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/responders/{responder_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "responder_id" + "\\}", apiClient.escapeString(responderId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentResponder", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an incident responder. + * + *

See {@link #getIncidentResponderWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param responderId The UUID of the incident responder. (required) + * @return CompletableFuture<ApiResponse<IncidentResponderResponse>> + */ + public CompletableFuture> + getIncidentResponderWithHttpInfoAsync(String incidentId, UUID responderId) { + // Check if unstable operation is enabled + String operationId = "getIncidentResponder"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling getIncidentResponder")); + return result; + } + + // verify the required parameter 'responderId' is set + if (responderId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'responderId' when calling getIncidentResponder")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/responders/{responder_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "responder_id" + "\\}", apiClient.escapeString(responderId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentResponder", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an incident rule. + * + *

See {@link #getIncidentRuleWithHttpInfo}. + * + * @param ruleId The UUID of the incident rule. (required) + * @return IncidentRuleResponse + * @throws ApiException if fails to make API call + */ + public IncidentRuleResponse getIncidentRule(UUID ruleId) throws ApiException { + return getIncidentRuleWithHttpInfo(ruleId).getData(); + } + + /** + * Get an incident rule. + * + *

See {@link #getIncidentRuleWithHttpInfoAsync}. + * + * @param ruleId The UUID of the incident rule. (required) + * @return CompletableFuture<IncidentRuleResponse> + */ + public CompletableFuture getIncidentRuleAsync(UUID ruleId) { + return getIncidentRuleWithHttpInfoAsync(ruleId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single incident rule by ID. + * + * @param ruleId The UUID of the incident rule. (required) + * @return ApiResponse<IncidentRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getIncidentRuleWithHttpInfo(UUID ruleId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'ruleId' when calling getIncidentRule"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an incident rule. + * + *

See {@link #getIncidentRuleWithHttpInfo}. + * + * @param ruleId The UUID of the incident rule. (required) + * @return CompletableFuture<ApiResponse<IncidentRuleResponse>> + */ + public CompletableFuture> getIncidentRuleWithHttpInfoAsync( + UUID ruleId) { + // Check if unstable operation is enabled + String operationId = "getIncidentRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'ruleId' when calling getIncidentRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get incident todo details. + * + *

See {@link #getIncidentTodoWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @return IncidentTodoResponse + * @throws ApiException if fails to make API call + */ + public IncidentTodoResponse getIncidentTodo(String incidentId, String todoId) + throws ApiException { + return getIncidentTodoWithHttpInfo(incidentId, todoId).getData(); + } + + /** + * Get incident todo details. + * + *

See {@link #getIncidentTodoWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @return CompletableFuture<IncidentTodoResponse> + */ + public CompletableFuture getIncidentTodoAsync( + String incidentId, String todoId) { + return getIncidentTodoWithHttpInfoAsync(incidentId, todoId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get incident todo details. + * + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @return ApiResponse<IncidentTodoResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getIncidentTodoWithHttpInfo( + String incidentId, String todoId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentTodo"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling getIncidentTodo"); + } + + // verify the required parameter 'todoId' is set + if (todoId == null) { + throw new ApiException( + 400, "Missing the required parameter 'todoId' when calling getIncidentTodo"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentTodo", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get incident todo details. + * + *

See {@link #getIncidentTodoWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @return CompletableFuture<ApiResponse<IncidentTodoResponse>> + */ + public CompletableFuture> getIncidentTodoWithHttpInfoAsync( + String incidentId, String todoId) { + // Check if unstable operation is enabled + String operationId = "getIncidentTodo"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'incidentId' when calling getIncidentTodo")); + return result; + } + + // verify the required parameter 'todoId' is set + if (todoId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'todoId' when calling getIncidentTodo")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentTodo", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get incident type details. + * + *

See {@link #getIncidentTypeWithHttpInfo}. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @return IncidentTypeResponse + * @throws ApiException if fails to make API call + */ + public IncidentTypeResponse getIncidentType(String incidentTypeId) throws ApiException { + return getIncidentTypeWithHttpInfo(incidentTypeId).getData(); + } + + /** + * Get incident type details. + * + *

See {@link #getIncidentTypeWithHttpInfoAsync}. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @return CompletableFuture<IncidentTypeResponse> + */ + public CompletableFuture getIncidentTypeAsync(String incidentTypeId) { + return getIncidentTypeWithHttpInfoAsync(incidentTypeId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get incident type details. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @return ApiResponse<IncidentTypeResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getIncidentTypeWithHttpInfo(String incidentTypeId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentType"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentTypeId' is set + if (incidentTypeId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentTypeId' when calling getIncidentType"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/types/{incident_type_id}" + .replaceAll( + "\\{" + "incident_type_id" + "\\}", + apiClient.escapeString(incidentTypeId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentType", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get incident type details. + * + *

See {@link #getIncidentTypeWithHttpInfo}. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> + */ + public CompletableFuture> getIncidentTypeWithHttpInfoAsync( + String incidentTypeId) { + // Check if unstable operation is enabled + String operationId = "getIncidentType"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentTypeId' is set + if (incidentTypeId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'incidentTypeId' when calling getIncidentType")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/types/{incident_type_id}" + .replaceAll( + "\\{" + "incident_type_id" + "\\}", + apiClient.escapeString(incidentTypeId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentType", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to getIncidentUserDefinedField. */ + public static class GetIncidentUserDefinedFieldOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include. Supported values are + * "last_modified_by_user", "created_by_user", and "incident_type". (optional) + * @return GetIncidentUserDefinedFieldOptionalParameters + */ + public GetIncidentUserDefinedFieldOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Get an incident user-defined field. + * + *

See {@link #getIncidentUserDefinedFieldWithHttpInfo}. + * + * @param fieldId The ID of the incident user-defined field. (required) + * @return IncidentUserDefinedFieldResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedFieldResponse getIncidentUserDefinedField(String fieldId) + throws ApiException { + return getIncidentUserDefinedFieldWithHttpInfo( + fieldId, new GetIncidentUserDefinedFieldOptionalParameters()) + .getData(); + } + + /** + * Get an incident user-defined field. + * + *

See {@link #getIncidentUserDefinedFieldWithHttpInfoAsync}. + * + * @param fieldId The ID of the incident user-defined field. (required) + * @return CompletableFuture<IncidentUserDefinedFieldResponse> + */ + public CompletableFuture getIncidentUserDefinedFieldAsync( + String fieldId) { + return getIncidentUserDefinedFieldWithHttpInfoAsync( + fieldId, new GetIncidentUserDefinedFieldOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an incident user-defined field. + * + *

See {@link #getIncidentUserDefinedFieldWithHttpInfo}. + * + * @param fieldId The ID of the incident user-defined field. (required) + * @param parameters Optional parameters for the request. + * @return IncidentUserDefinedFieldResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedFieldResponse getIncidentUserDefinedField( + String fieldId, GetIncidentUserDefinedFieldOptionalParameters parameters) + throws ApiException { + return getIncidentUserDefinedFieldWithHttpInfo(fieldId, parameters).getData(); + } + + /** + * Get an incident user-defined field. + * + *

See {@link #getIncidentUserDefinedFieldWithHttpInfoAsync}. + * + * @param fieldId The ID of the incident user-defined field. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentUserDefinedFieldResponse> + */ + public CompletableFuture getIncidentUserDefinedFieldAsync( + String fieldId, GetIncidentUserDefinedFieldOptionalParameters parameters) { + return getIncidentUserDefinedFieldWithHttpInfoAsync(fieldId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get details of an incident user-defined field. + * + * @param fieldId The ID of the incident user-defined field. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentUserDefinedFieldResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getIncidentUserDefinedFieldWithHttpInfo( + String fieldId, GetIncidentUserDefinedFieldOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentUserDefinedField"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'fieldId' is set + if (fieldId == null) { + throw new ApiException( + 400, "Missing the required parameter 'fieldId' when calling getIncidentUserDefinedField"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/user-defined-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentUserDefinedField", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an incident user-defined field. + * + *

See {@link #getIncidentUserDefinedFieldWithHttpInfo}. + * + * @param fieldId The ID of the incident user-defined field. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldResponse>> + */ + public CompletableFuture> + getIncidentUserDefinedFieldWithHttpInfoAsync( + String fieldId, GetIncidentUserDefinedFieldOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getIncidentUserDefinedField"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'fieldId' is set + if (fieldId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'fieldId' when calling getIncidentUserDefinedField")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/user-defined-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentUserDefinedField", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to getIncidentUserDefinedRole. */ + public static class GetIncidentUserDefinedRoleOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include in the response. + * (optional) + * @return GetIncidentUserDefinedRoleOptionalParameters + */ + public GetIncidentUserDefinedRoleOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Get an incident user-defined role. + * + *

See {@link #getIncidentUserDefinedRoleWithHttpInfo}. + * + * @param roleId The UUID of the incident user-defined role. (required) + * @return IncidentUserDefinedRoleResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedRoleResponse getIncidentUserDefinedRole(UUID roleId) + throws ApiException { + return getIncidentUserDefinedRoleWithHttpInfo( + roleId, new GetIncidentUserDefinedRoleOptionalParameters()) + .getData(); + } + + /** + * Get an incident user-defined role. + * + *

See {@link #getIncidentUserDefinedRoleWithHttpInfoAsync}. + * + * @param roleId The UUID of the incident user-defined role. (required) + * @return CompletableFuture<IncidentUserDefinedRoleResponse> + */ + public CompletableFuture getIncidentUserDefinedRoleAsync( + UUID roleId) { + return getIncidentUserDefinedRoleWithHttpInfoAsync( + roleId, new GetIncidentUserDefinedRoleOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an incident user-defined role. + * + *

See {@link #getIncidentUserDefinedRoleWithHttpInfo}. + * + * @param roleId The UUID of the incident user-defined role. (required) + * @param parameters Optional parameters for the request. + * @return IncidentUserDefinedRoleResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedRoleResponse getIncidentUserDefinedRole( + UUID roleId, GetIncidentUserDefinedRoleOptionalParameters parameters) throws ApiException { + return getIncidentUserDefinedRoleWithHttpInfo(roleId, parameters).getData(); + } + + /** + * Get an incident user-defined role. + * + *

See {@link #getIncidentUserDefinedRoleWithHttpInfoAsync}. + * + * @param roleId The UUID of the incident user-defined role. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentUserDefinedRoleResponse> + */ + public CompletableFuture getIncidentUserDefinedRoleAsync( + UUID roleId, GetIncidentUserDefinedRoleOptionalParameters parameters) { + return getIncidentUserDefinedRoleWithHttpInfoAsync(roleId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a single user-defined role for incidents. + * + * @param roleId The UUID of the incident user-defined role. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentUserDefinedRoleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getIncidentUserDefinedRoleWithHttpInfo( + UUID roleId, GetIncidentUserDefinedRoleOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentUserDefinedRole"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'roleId' is set + if (roleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'roleId' when calling getIncidentUserDefinedRole"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/user-defined-roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentUserDefinedRole", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an incident user-defined role. + * + *

See {@link #getIncidentUserDefinedRoleWithHttpInfo}. + * + * @param roleId The UUID of the incident user-defined role. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentUserDefinedRoleResponse>> + */ + public CompletableFuture> + getIncidentUserDefinedRoleWithHttpInfoAsync( + UUID roleId, GetIncidentUserDefinedRoleOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getIncidentUserDefinedRole"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'roleId' is set + if (roleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'roleId' when calling getIncidentUserDefinedRole")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/user-defined-roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentUserDefinedRole", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to getOrgSettingsByIncidentType. */ + public static class GetOrgSettingsByIncidentTypeOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include in the response. + * (optional) + * @return GetOrgSettingsByIncidentTypeOptionalParameters + */ + public GetOrgSettingsByIncidentTypeOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Get org settings by incident type. + * + *

See {@link #getOrgSettingsByIncidentTypeWithHttpInfo}. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @return IncidentOrgSettingsResponse + * @throws ApiException if fails to make API call + */ + public IncidentOrgSettingsResponse getOrgSettingsByIncidentType(UUID incidentTypeId) + throws ApiException { + return getOrgSettingsByIncidentTypeWithHttpInfo( + incidentTypeId, new GetOrgSettingsByIncidentTypeOptionalParameters()) + .getData(); + } + + /** + * Get org settings by incident type. + * + *

See {@link #getOrgSettingsByIncidentTypeWithHttpInfoAsync}. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @return CompletableFuture<IncidentOrgSettingsResponse> + */ + public CompletableFuture getOrgSettingsByIncidentTypeAsync( + UUID incidentTypeId) { + return getOrgSettingsByIncidentTypeWithHttpInfoAsync( + incidentTypeId, new GetOrgSettingsByIncidentTypeOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get org settings by incident type. + * + *

See {@link #getOrgSettingsByIncidentTypeWithHttpInfo}. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @param parameters Optional parameters for the request. + * @return IncidentOrgSettingsResponse + * @throws ApiException if fails to make API call + */ + public IncidentOrgSettingsResponse getOrgSettingsByIncidentType( + UUID incidentTypeId, GetOrgSettingsByIncidentTypeOptionalParameters parameters) + throws ApiException { + return getOrgSettingsByIncidentTypeWithHttpInfo(incidentTypeId, parameters).getData(); + } + + /** + * Get org settings by incident type. + * + *

See {@link #getOrgSettingsByIncidentTypeWithHttpInfoAsync}. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentOrgSettingsResponse> + */ + public CompletableFuture getOrgSettingsByIncidentTypeAsync( + UUID incidentTypeId, GetOrgSettingsByIncidentTypeOptionalParameters parameters) { + return getOrgSettingsByIncidentTypeWithHttpInfoAsync(incidentTypeId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the org settings for a specific incident type. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentOrgSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getOrgSettingsByIncidentTypeWithHttpInfo( + UUID incidentTypeId, GetOrgSettingsByIncidentTypeOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getOrgSettingsByIncidentType"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentTypeId' is set + if (incidentTypeId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'incidentTypeId' when calling" + + " getOrgSettingsByIncidentType"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/types/{incident_type_id}/org-settings" + .replaceAll( + "\\{" + "incident_type_id" + "\\}", + apiClient.escapeString(incidentTypeId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getOrgSettingsByIncidentType", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get org settings by incident type. + * + *

See {@link #getOrgSettingsByIncidentTypeWithHttpInfo}. + * + * @param incidentTypeId The UUID of the incident type. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentOrgSettingsResponse>> + */ + public CompletableFuture> + getOrgSettingsByIncidentTypeWithHttpInfoAsync( + UUID incidentTypeId, GetOrgSettingsByIncidentTypeOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getOrgSettingsByIncidentType"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentTypeId' is set + if (incidentTypeId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentTypeId' when calling" + + " getOrgSettingsByIncidentType")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/types/{incident_type_id}/org-settings" + .replaceAll( + "\\{" + "incident_type_id" + "\\}", + apiClient.escapeString(incidentTypeId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getOrgSettingsByIncidentType", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to importIncident. */ + public static class ImportIncidentOptionalParameters { + private List include; + + /** + * Set include. + * + * @param include Specifies which related object types to include in the response when importing + * an incident. (optional) + * @return ImportIncidentOptionalParameters + */ + public ImportIncidentOptionalParameters include(List include) { + this.include = include; + return this; + } + } + + /** + * Import an incident. + * + *

See {@link #importIncidentWithHttpInfo}. + * + * @param body Incident import payload. (required) + * @return IncidentImportResponse + * @throws ApiException if fails to make API call + */ + public IncidentImportResponse importIncident(IncidentImportRequest body) throws ApiException { + return importIncidentWithHttpInfo(body, new ImportIncidentOptionalParameters()).getData(); + } + + /** + * Import an incident. + * + *

See {@link #importIncidentWithHttpInfoAsync}. + * + * @param body Incident import payload. (required) + * @return CompletableFuture<IncidentImportResponse> + */ + public CompletableFuture importIncidentAsync(IncidentImportRequest body) { + return importIncidentWithHttpInfoAsync(body, new ImportIncidentOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Import an incident. + * + *

See {@link #importIncidentWithHttpInfo}. + * + * @param body Incident import payload. (required) + * @param parameters Optional parameters for the request. + * @return IncidentImportResponse + * @throws ApiException if fails to make API call + */ + public IncidentImportResponse importIncident( + IncidentImportRequest body, ImportIncidentOptionalParameters parameters) throws ApiException { + return importIncidentWithHttpInfo(body, parameters).getData(); + } + + /** + * Import an incident. + * + *

See {@link #importIncidentWithHttpInfoAsync}. + * + * @param body Incident import payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentImportResponse> + */ + public CompletableFuture importIncidentAsync( + IncidentImportRequest body, ImportIncidentOptionalParameters parameters) { + return importIncidentWithHttpInfoAsync(body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Import an incident from an external system. This endpoint allows you to create incidents with + * historical data such as custom timestamps for detection, declaration, and resolution. Imported + * incidents do not execute integrations or notification rules. + * + * @param body Incident import payload. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentImportResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse importIncidentWithHttpInfo( + IncidentImportRequest body, ImportIncidentOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "importIncident"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling importIncident"); + } + List include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/import"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.importIncident", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Import an incident. + * + *

See {@link #importIncidentWithHttpInfo}. + * + * @param body Incident import payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentImportResponse>> + */ + public CompletableFuture> importIncidentWithHttpInfoAsync( + IncidentImportRequest body, ImportIncidentOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "importIncident"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling importIncident")); + return result; + } + List include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/import"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.importIncident", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Link a page to an incident. + * + *

See {@link #linkPageToIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body On-call page link payload. (required) + * @return IncidentIntegrationMetadataResponse + * @throws ApiException if fails to make API call + */ + public IncidentIntegrationMetadataResponse linkPageToIncident( + String incidentId, IncidentOnCallPageLinkRequest body) throws ApiException { + return linkPageToIncidentWithHttpInfo(incidentId, body).getData(); + } + + /** + * Link a page to an incident. + * + *

See {@link #linkPageToIncidentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body On-call page link payload. (required) + * @return CompletableFuture<IncidentIntegrationMetadataResponse> + */ + public CompletableFuture linkPageToIncidentAsync( + String incidentId, IncidentOnCallPageLinkRequest body) { + return linkPageToIncidentWithHttpInfoAsync(incidentId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Link an existing on-call page to an incident. + * + * @param incidentId The UUID of the incident. (required) + * @param body On-call page link payload. (required) + * @return ApiResponse<IncidentIntegrationMetadataResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict - page already linked to incident -
429 Too many requests -
+ */ + public ApiResponse linkPageToIncidentWithHttpInfo( + String incidentId, IncidentOnCallPageLinkRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "linkPageToIncident"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling linkPageToIncident"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling linkPageToIncident"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/pages/link" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.linkPageToIncident", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Link a page to an incident. + * + *

See {@link #linkPageToIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body On-call page link payload. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> + */ + public CompletableFuture> + linkPageToIncidentWithHttpInfoAsync(String incidentId, IncidentOnCallPageLinkRequest body) { + // Check if unstable operation is enabled + String operationId = "linkPageToIncident"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'incidentId' when calling linkPageToIncident")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling linkPageToIncident")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/pages/link" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.linkPageToIncident", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listGlobalIncidentHandles. */ + public static class ListGlobalIncidentHandlesOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include in the response + * (optional) + * @return ListGlobalIncidentHandlesOptionalParameters + */ + public ListGlobalIncidentHandlesOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * List global incident handles. + * + *

See {@link #listGlobalIncidentHandlesWithHttpInfo}. + * + * @return IncidentHandlesResponse + * @throws ApiException if fails to make API call + */ + public IncidentHandlesResponse listGlobalIncidentHandles() throws ApiException { + return listGlobalIncidentHandlesWithHttpInfo(new ListGlobalIncidentHandlesOptionalParameters()) + .getData(); + } + + /** + * List global incident handles. + * + *

See {@link #listGlobalIncidentHandlesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentHandlesResponse> + */ + public CompletableFuture listGlobalIncidentHandlesAsync() { + return listGlobalIncidentHandlesWithHttpInfoAsync( + new ListGlobalIncidentHandlesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List global incident handles. + * + *

See {@link #listGlobalIncidentHandlesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentHandlesResponse + * @throws ApiException if fails to make API call + */ + public IncidentHandlesResponse listGlobalIncidentHandles( + ListGlobalIncidentHandlesOptionalParameters parameters) throws ApiException { + return listGlobalIncidentHandlesWithHttpInfo(parameters).getData(); + } + + /** + * List global incident handles. + * + *

See {@link #listGlobalIncidentHandlesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentHandlesResponse> + */ + public CompletableFuture listGlobalIncidentHandlesAsync( + ListGlobalIncidentHandlesOptionalParameters parameters) { + return listGlobalIncidentHandlesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a list of global incident handles. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentHandlesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse listGlobalIncidentHandlesWithHttpInfo( + ListGlobalIncidentHandlesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listGlobalIncidentHandles"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listGlobalIncidentHandles", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List global incident handles. + * + *

See {@link #listGlobalIncidentHandlesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentHandlesResponse>> + */ + public CompletableFuture> + listGlobalIncidentHandlesWithHttpInfoAsync( + ListGlobalIncidentHandlesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listGlobalIncidentHandles"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listGlobalIncidentHandles", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listIncidentAttachments. */ + public static class ListIncidentAttachmentsOptionalParameters { + private String filterAttachmentType; + private String include; + + /** + * Set filterAttachmentType. + * + * @param filterAttachmentType Filter attachments by type. Supported values are 1 ( + * postmortem) and 2 (link). (optional) + * @return ListIncidentAttachmentsOptionalParameters + */ + public ListIncidentAttachmentsOptionalParameters filterAttachmentType( + String filterAttachmentType) { + this.filterAttachmentType = filterAttachmentType; + return this; + } + + /** + * Set include. + * + * @param include Resource to include in the response. Supported value: + * last_modified_by_user. (optional) + * @return ListIncidentAttachmentsOptionalParameters + */ + public ListIncidentAttachmentsOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * List incident attachments. + * + *

See {@link #listIncidentAttachmentsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return AttachmentArray + * @throws ApiException if fails to make API call + */ + public AttachmentArray listIncidentAttachments(String incidentId) throws ApiException { + return listIncidentAttachmentsWithHttpInfo( + incidentId, new ListIncidentAttachmentsOptionalParameters()) + .getData(); + } + + /** + * List incident attachments. + * + *

See {@link #listIncidentAttachmentsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<AttachmentArray> + */ + public CompletableFuture listIncidentAttachmentsAsync(String incidentId) { + return listIncidentAttachmentsWithHttpInfoAsync( + incidentId, new ListIncidentAttachmentsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident attachments. + * + *

See {@link #listIncidentAttachmentsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return AttachmentArray + * @throws ApiException if fails to make API call + */ + public AttachmentArray listIncidentAttachments( + String incidentId, ListIncidentAttachmentsOptionalParameters parameters) throws ApiException { + return listIncidentAttachmentsWithHttpInfo(incidentId, parameters).getData(); + } + + /** + * List incident attachments. + * + *

See {@link #listIncidentAttachmentsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AttachmentArray> + */ + public CompletableFuture listIncidentAttachmentsAsync( + String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { + return listIncidentAttachmentsWithHttpInfoAsync(incidentId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident attachments. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<AttachmentArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse listIncidentAttachmentsWithHttpInfo( + String incidentId, ListIncidentAttachmentsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentAttachments"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling listIncidentAttachments"); + } + String filterAttachmentType = parameters.filterAttachmentType; + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/attachments" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[attachment_type]", filterAttachmentType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentAttachments", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident attachments. + * + *

See {@link #listIncidentAttachmentsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<AttachmentArray>> + */ + public CompletableFuture> listIncidentAttachmentsWithHttpInfoAsync( + String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentAttachments"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling listIncidentAttachments")); + return result; + } + String filterAttachmentType = parameters.filterAttachmentType; + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/attachments" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[attachment_type]", filterAttachmentType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentAttachments", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident impact fields. + * + *

See {@link #listIncidentImpactFieldsWithHttpInfo}. + * + * @return IncidentImpactFieldsResponse + * @throws ApiException if fails to make API call + */ + public IncidentImpactFieldsResponse listIncidentImpactFields() throws ApiException { + return listIncidentImpactFieldsWithHttpInfo().getData(); + } + + /** + * List incident impact fields. + * + *

See {@link #listIncidentImpactFieldsWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentImpactFieldsResponse> + */ + public CompletableFuture listIncidentImpactFieldsAsync() { + return listIncidentImpactFieldsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all impact fields for incidents. + * + * @return ApiResponse<IncidentImpactFieldsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listIncidentImpactFieldsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentImpactFields"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/impact-fields"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentImpactFields", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident impact fields. + * + *

See {@link #listIncidentImpactFieldsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<IncidentImpactFieldsResponse>> + */ + public CompletableFuture> + listIncidentImpactFieldsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listIncidentImpactFields"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/impact-fields"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentImpactFields", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listIncidentImpacts. */ + public static class ListIncidentImpactsOptionalParameters { + private List include; + + /** + * Set include. + * + * @param include Specifies which related resources should be included in the response. + * (optional) + * @return ListIncidentImpactsOptionalParameters + */ + public ListIncidentImpactsOptionalParameters include( + List include) { + this.include = include; + return this; + } + } + + /** + * List an incident's impacts. + * + *

See {@link #listIncidentImpactsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentImpactsResponse + * @throws ApiException if fails to make API call + */ + public IncidentImpactsResponse listIncidentImpacts(String incidentId) throws ApiException { + return listIncidentImpactsWithHttpInfo(incidentId, new ListIncidentImpactsOptionalParameters()) + .getData(); + } + + /** + * List an incident's impacts. + * + *

See {@link #listIncidentImpactsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentImpactsResponse> + */ + public CompletableFuture listIncidentImpactsAsync(String incidentId) { + return listIncidentImpactsWithHttpInfoAsync( + incidentId, new ListIncidentImpactsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List an incident's impacts. + * + *

See {@link #listIncidentImpactsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return IncidentImpactsResponse + * @throws ApiException if fails to make API call + */ + public IncidentImpactsResponse listIncidentImpacts( + String incidentId, ListIncidentImpactsOptionalParameters parameters) throws ApiException { + return listIncidentImpactsWithHttpInfo(incidentId, parameters).getData(); + } + + /** + * List an incident's impacts. + * + *

See {@link #listIncidentImpactsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentImpactsResponse> + */ + public CompletableFuture listIncidentImpactsAsync( + String incidentId, ListIncidentImpactsOptionalParameters parameters) { + return listIncidentImpactsWithHttpInfoAsync(incidentId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get all impacts for an incident. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentImpactsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listIncidentImpactsWithHttpInfo( + String incidentId, ListIncidentImpactsOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling listIncidentImpacts"); + } + List include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentImpacts", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List an incident's impacts. + * + *

See {@link #listIncidentImpactsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentImpactsResponse>> + */ + public CompletableFuture> + listIncidentImpactsWithHttpInfoAsync( + String incidentId, ListIncidentImpactsOptionalParameters parameters) { + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'incidentId' when calling listIncidentImpacts")); + return result; + } + List include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentImpacts", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a list of an incident's integration metadata. + * + *

See {@link #listIncidentIntegrationsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentIntegrationMetadataListResponse + * @throws ApiException if fails to make API call + */ + public IncidentIntegrationMetadataListResponse listIncidentIntegrations(String incidentId) + throws ApiException { + return listIncidentIntegrationsWithHttpInfo(incidentId).getData(); + } + + /** + * Get a list of an incident's integration metadata. + * + *

See {@link #listIncidentIntegrationsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentIntegrationMetadataListResponse> + */ + public CompletableFuture listIncidentIntegrationsAsync( + String incidentId) { + return listIncidentIntegrationsWithHttpInfoAsync(incidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get all integration metadata for an incident. + * + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentIntegrationMetadataListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listIncidentIntegrationsWithHttpInfo( + String incidentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentIntegrations"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling listIncidentIntegrations"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentIntegrations", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a list of an incident's integration metadata. + * + *

See {@link #listIncidentIntegrationsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataListResponse>> + */ + public CompletableFuture> + listIncidentIntegrationsWithHttpInfoAsync(String incidentId) { + // Check if unstable operation is enabled + String operationId = "listIncidentIntegrations"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling listIncidentIntegrations")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentIntegrations", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listIncidentNotificationRules. */ + public static class ListIncidentNotificationRulesOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of resources to include. Supported values: + * created_by_user, last_modified_by_user, incident_type, + * notification_template (optional) + * @return ListIncidentNotificationRulesOptionalParameters + */ + public ListIncidentNotificationRulesOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * List incident notification rules. + * + *

See {@link #listIncidentNotificationRulesWithHttpInfo}. + * + * @return IncidentNotificationRuleArray + * @throws ApiException if fails to make API call + */ + public IncidentNotificationRuleArray listIncidentNotificationRules() throws ApiException { + return listIncidentNotificationRulesWithHttpInfo( + new ListIncidentNotificationRulesOptionalParameters()) + .getData(); + } + + /** + * List incident notification rules. + * + *

See {@link #listIncidentNotificationRulesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentNotificationRuleArray> + */ + public CompletableFuture listIncidentNotificationRulesAsync() { + return listIncidentNotificationRulesWithHttpInfoAsync( + new ListIncidentNotificationRulesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident notification rules. + * + *

See {@link #listIncidentNotificationRulesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentNotificationRuleArray + * @throws ApiException if fails to make API call + */ + public IncidentNotificationRuleArray listIncidentNotificationRules( + ListIncidentNotificationRulesOptionalParameters parameters) throws ApiException { + return listIncidentNotificationRulesWithHttpInfo(parameters).getData(); + } + + /** + * List incident notification rules. + * + *

See {@link #listIncidentNotificationRulesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentNotificationRuleArray> + */ + public CompletableFuture listIncidentNotificationRulesAsync( + ListIncidentNotificationRulesOptionalParameters parameters) { + return listIncidentNotificationRulesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Lists all notification rules for the organization. Optionally filter by incident type. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentNotificationRuleArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listIncidentNotificationRulesWithHttpInfo( + ListIncidentNotificationRulesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentNotificationRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/notification-rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentNotificationRules", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident notification rules. + * + *

See {@link #listIncidentNotificationRulesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentNotificationRuleArray>> + */ + public CompletableFuture> + listIncidentNotificationRulesWithHttpInfoAsync( + ListIncidentNotificationRulesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentNotificationRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/notification-rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentNotificationRules", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listIncidentNotificationTemplates. */ + public static class ListIncidentNotificationTemplatesOptionalParameters { + private UUID filterIncidentType; + private String include; + + /** + * Set filterIncidentType. + * + * @param filterIncidentType Optional incident type ID filter. (optional) + * @return ListIncidentNotificationTemplatesOptionalParameters + */ + public ListIncidentNotificationTemplatesOptionalParameters filterIncidentType( + UUID filterIncidentType) { + this.filterIncidentType = filterIncidentType; + return this; + } + + /** + * Set include. + * + * @param include Comma-separated list of relationships to include. Supported values: + * created_by_user, last_modified_by_user, incident_type + * (optional) + * @return ListIncidentNotificationTemplatesOptionalParameters + */ + public ListIncidentNotificationTemplatesOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * List incident notification templates. + * + *

See {@link #listIncidentNotificationTemplatesWithHttpInfo}. + * + * @return IncidentNotificationTemplateArray + * @throws ApiException if fails to make API call + */ + public IncidentNotificationTemplateArray listIncidentNotificationTemplates() throws ApiException { + return listIncidentNotificationTemplatesWithHttpInfo( + new ListIncidentNotificationTemplatesOptionalParameters()) + .getData(); + } + + /** + * List incident notification templates. + * + *

See {@link #listIncidentNotificationTemplatesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentNotificationTemplateArray> + */ + public CompletableFuture + listIncidentNotificationTemplatesAsync() { + return listIncidentNotificationTemplatesWithHttpInfoAsync( + new ListIncidentNotificationTemplatesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident notification templates. + * + *

See {@link #listIncidentNotificationTemplatesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentNotificationTemplateArray + * @throws ApiException if fails to make API call + */ + public IncidentNotificationTemplateArray listIncidentNotificationTemplates( + ListIncidentNotificationTemplatesOptionalParameters parameters) throws ApiException { + return listIncidentNotificationTemplatesWithHttpInfo(parameters).getData(); + } + + /** + * List incident notification templates. + * + *

See {@link #listIncidentNotificationTemplatesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentNotificationTemplateArray> + */ + public CompletableFuture + listIncidentNotificationTemplatesAsync( + ListIncidentNotificationTemplatesOptionalParameters parameters) { + return listIncidentNotificationTemplatesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Lists all notification templates. Optionally filter by incident type. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentNotificationTemplateArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + listIncidentNotificationTemplatesWithHttpInfo( + ListIncidentNotificationTemplatesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentNotificationTemplates"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + UUID filterIncidentType = parameters.filterIncidentType; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/notification-templates"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentNotificationTemplates", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident notification templates. + * + *

See {@link #listIncidentNotificationTemplatesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentNotificationTemplateArray>> + */ + public CompletableFuture> + listIncidentNotificationTemplatesWithHttpInfoAsync( + ListIncidentNotificationTemplatesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentNotificationTemplates"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + UUID filterIncidentType = parameters.filterIncidentType; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/notification-templates"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentNotificationTemplates", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List postmortem templates. + * + *

See {@link #listIncidentPostmortemTemplatesWithHttpInfo}. + * + * @return PostmortemTemplatesResponse + * @throws ApiException if fails to make API call + */ + public PostmortemTemplatesResponse listIncidentPostmortemTemplates() throws ApiException { + return listIncidentPostmortemTemplatesWithHttpInfo().getData(); + } + + /** + * List postmortem templates. + * + *

See {@link #listIncidentPostmortemTemplatesWithHttpInfoAsync}. + * + * @return CompletableFuture<PostmortemTemplatesResponse> + */ + public CompletableFuture listIncidentPostmortemTemplatesAsync() { + return listIncidentPostmortemTemplatesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a list of all postmortem templates for incidents. + * + * @return ApiResponse<PostmortemTemplatesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse listIncidentPostmortemTemplatesWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentPostmortemTemplates"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/postmortem-templates"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentPostmortemTemplates", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List postmortem templates. + * + *

See {@link #listIncidentPostmortemTemplatesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<PostmortemTemplatesResponse>> + */ + public CompletableFuture> + listIncidentPostmortemTemplatesWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listIncidentPostmortemTemplates"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/postmortem-templates"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentPostmortemTemplates", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident responders. + * + *

See {@link #listIncidentRespondersWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentRespondersResponse + * @throws ApiException if fails to make API call + */ + public IncidentRespondersResponse listIncidentResponders(String incidentId) throws ApiException { + return listIncidentRespondersWithHttpInfo(incidentId).getData(); + } + + /** + * List incident responders. + * + *

See {@link #listIncidentRespondersWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentRespondersResponse> + */ + public CompletableFuture listIncidentRespondersAsync( + String incidentId) { + return listIncidentRespondersWithHttpInfoAsync(incidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all responders for an incident. + * + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentRespondersResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listIncidentRespondersWithHttpInfo( + String incidentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentResponders"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling listIncidentResponders"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/responders" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentResponders", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident responders. + * + *

See {@link #listIncidentRespondersWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentRespondersResponse>> + */ + public CompletableFuture> + listIncidentRespondersWithHttpInfoAsync(String incidentId) { + // Check if unstable operation is enabled + String operationId = "listIncidentResponders"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling listIncidentResponders")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/responders" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentResponders", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listIncidentRules. */ + public static class ListIncidentRulesOptionalParameters { + private String filterTaskId; + private String filterTrigger; + private UUID incidentTypeUuid; + + /** + * Set filterTaskId. + * + * @param filterTaskId Filter rules by task ID. (optional) + * @return ListIncidentRulesOptionalParameters + */ + public ListIncidentRulesOptionalParameters filterTaskId(String filterTaskId) { + this.filterTaskId = filterTaskId; + return this; + } + + /** + * Set filterTrigger. + * + * @param filterTrigger Filter rules by trigger. (optional) + * @return ListIncidentRulesOptionalParameters + */ + public ListIncidentRulesOptionalParameters filterTrigger(String filterTrigger) { + this.filterTrigger = filterTrigger; + return this; + } + + /** + * Set incidentTypeUuid. + * + * @param incidentTypeUuid Filter rules by incident type UUID. (optional) + * @return ListIncidentRulesOptionalParameters + */ + public ListIncidentRulesOptionalParameters incidentTypeUuid(UUID incidentTypeUuid) { + this.incidentTypeUuid = incidentTypeUuid; + return this; + } + } + + /** + * List incident rules. + * + *

See {@link #listIncidentRulesWithHttpInfo}. + * + * @return IncidentRulesResponse + * @throws ApiException if fails to make API call + */ + public IncidentRulesResponse listIncidentRules() throws ApiException { + return listIncidentRulesWithHttpInfo(new ListIncidentRulesOptionalParameters()).getData(); + } + + /** + * List incident rules. + * + *

See {@link #listIncidentRulesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentRulesResponse> + */ + public CompletableFuture listIncidentRulesAsync() { + return listIncidentRulesWithHttpInfoAsync(new ListIncidentRulesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident rules. + * + *

See {@link #listIncidentRulesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentRulesResponse + * @throws ApiException if fails to make API call + */ + public IncidentRulesResponse listIncidentRules(ListIncidentRulesOptionalParameters parameters) + throws ApiException { + return listIncidentRulesWithHttpInfo(parameters).getData(); + } + + /** + * List incident rules. + * + *

See {@link #listIncidentRulesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentRulesResponse> + */ + public CompletableFuture listIncidentRulesAsync( + ListIncidentRulesOptionalParameters parameters) { + return listIncidentRulesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all incident rules. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentRulesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listIncidentRulesWithHttpInfo( + ListIncidentRulesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String filterTaskId = parameters.filterTaskId; + String filterTrigger = parameters.filterTrigger; + UUID incidentTypeUuid = parameters.incidentTypeUuid; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[task_id]", filterTaskId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[trigger]", filterTrigger)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "incidentTypeUUID", incidentTypeUuid)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentRules", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident rules. + * + *

See {@link #listIncidentRulesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentRulesResponse>> + */ + public CompletableFuture> listIncidentRulesWithHttpInfoAsync( + ListIncidentRulesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String filterTaskId = parameters.filterTaskId; + String filterTrigger = parameters.filterTrigger; + UUID incidentTypeUuid = parameters.incidentTypeUuid; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[task_id]", filterTaskId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[trigger]", filterTrigger)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "incidentTypeUUID", incidentTypeUuid)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentRules", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listIncidents. */ + public static class ListIncidentsOptionalParameters { + private List include; + private Long pageSize; + private Long pageOffset; + + /** + * Set include. + * + * @param include Specifies which types of related objects should be included in the response. + * (optional) + * @return ListIncidentsOptionalParameters + */ + public ListIncidentsOptionalParameters include(List include) { + this.include = include; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default + * to 10) + * @return ListIncidentsOptionalParameters + */ + public ListIncidentsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageOffset. + * + * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, + * default to 0) + * @return ListIncidentsOptionalParameters + */ + public ListIncidentsOptionalParameters pageOffset(Long pageOffset) { + this.pageOffset = pageOffset; + return this; + } + } + + /** + * Get a list of incidents. + * + *

See {@link #listIncidentsWithHttpInfo}. + * + * @return IncidentsResponse + * @throws ApiException if fails to make API call + */ + public IncidentsResponse listIncidents() throws ApiException { + return listIncidentsWithHttpInfo(new ListIncidentsOptionalParameters()).getData(); + } + + /** + * Get a list of incidents. + * + *

See {@link #listIncidentsWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentsResponse> + */ + public CompletableFuture listIncidentsAsync() { + return listIncidentsWithHttpInfoAsync(new ListIncidentsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of incidents. + * + *

See {@link #listIncidentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentsResponse + * @throws ApiException if fails to make API call + */ + public IncidentsResponse listIncidents(ListIncidentsOptionalParameters parameters) + throws ApiException { + return listIncidentsWithHttpInfo(parameters).getData(); + } + + /** + * Get a list of incidents. + * + *

See {@link #listIncidentsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentsResponse> + */ + public CompletableFuture listIncidentsAsync( + ListIncidentsOptionalParameters parameters) { + return listIncidentsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of incidents. + * + *

See {@link #listIncidentsWithHttpInfo}. + * + * @return PaginationIterable<IncidentResponseData> + */ + public PaginationIterable listIncidentsWithPagination() { + ListIncidentsOptionalParameters parameters = new ListIncidentsOptionalParameters(); + return listIncidentsWithPagination(parameters); + } + + /** + * Get a list of incidents. + * + *

See {@link #listIncidentsWithHttpInfo}. + * + * @return IncidentsResponse + */ + public PaginationIterable listIncidentsWithPagination( + ListIncidentsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = ""; + String valueSetterPath = "pageOffset"; + Boolean valueSetterParamOptional = true; + Long limit; + + if (parameters.pageSize == null) { + limit = 10l; + parameters.pageSize(limit); + } else { + limit = parameters.pageSize; + } + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = + new PaginationIterable( + this, + "listIncidents", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + false, + limit, + args, + 0); + + return iterator; + } + + /** + * Get all incidents for the user's organization. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listIncidentsWithHttpInfo( + ListIncidentsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidents"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + List include = parameters.include; + Long pageSize = parameters.pageSize; + Long pageOffset = parameters.pageOffset; + // create path and map variables + String localVarPath = "/api/v2/incidents"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidents", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a list of incidents. + * + *

See {@link #listIncidentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentsResponse>> + */ + public CompletableFuture> listIncidentsWithHttpInfoAsync( + ListIncidentsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidents"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + List include = parameters.include; + Long pageSize = parameters.pageSize; + Long pageOffset = parameters.pageOffset; + // create path and map variables + String localVarPath = "/api/v2/incidents"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidents", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a list of an incident's todos. + * + *

See {@link #listIncidentTodosWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentTodoListResponse + * @throws ApiException if fails to make API call + */ + public IncidentTodoListResponse listIncidentTodos(String incidentId) throws ApiException { + return listIncidentTodosWithHttpInfo(incidentId).getData(); + } + + /** + * Get a list of an incident's todos. + * + *

See {@link #listIncidentTodosWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentTodoListResponse> + */ + public CompletableFuture listIncidentTodosAsync(String incidentId) { + return listIncidentTodosWithHttpInfoAsync(incidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get all todos for an incident. + * + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentTodoListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listIncidentTodosWithHttpInfo(String incidentId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentTodos"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling listIncidentTodos"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/todos" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentTodos", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a list of an incident's todos. + * + *

See {@link #listIncidentTodosWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentTodoListResponse>> + */ + public CompletableFuture> + listIncidentTodosWithHttpInfoAsync(String incidentId) { + // Check if unstable operation is enabled + String operationId = "listIncidentTodos"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'incidentId' when calling listIncidentTodos")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/todos" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentTodos", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listIncidentTypes. */ + public static class ListIncidentTypesOptionalParameters { + private Boolean includeDeleted; + + /** + * Set includeDeleted. + * + * @param includeDeleted Include deleted incident types in the response. (optional, default to + * false) + * @return ListIncidentTypesOptionalParameters + */ + public ListIncidentTypesOptionalParameters includeDeleted(Boolean includeDeleted) { + this.includeDeleted = includeDeleted; + return this; + } + } + + /** + * Get a list of incident types. + * + *

See {@link #listIncidentTypesWithHttpInfo}. + * + * @return IncidentTypeListResponse + * @throws ApiException if fails to make API call + */ + public IncidentTypeListResponse listIncidentTypes() throws ApiException { + return listIncidentTypesWithHttpInfo(new ListIncidentTypesOptionalParameters()).getData(); + } + + /** + * Get a list of incident types. + * + *

See {@link #listIncidentTypesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentTypeListResponse> + */ + public CompletableFuture listIncidentTypesAsync() { + return listIncidentTypesWithHttpInfoAsync(new ListIncidentTypesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of incident types. + * + *

See {@link #listIncidentTypesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentTypeListResponse + * @throws ApiException if fails to make API call + */ + public IncidentTypeListResponse listIncidentTypes(ListIncidentTypesOptionalParameters parameters) + throws ApiException { + return listIncidentTypesWithHttpInfo(parameters).getData(); + } + + /** + * Get a list of incident types. + * + *

See {@link #listIncidentTypesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentTypeListResponse> + */ + public CompletableFuture listIncidentTypesAsync( + ListIncidentTypesOptionalParameters parameters) { + return listIncidentTypesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get all incident types. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentTypeListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listIncidentTypesWithHttpInfo( + ListIncidentTypesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentTypes"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + Boolean includeDeleted = parameters.includeDeleted; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/types"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_deleted", includeDeleted)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentTypes", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a list of incident types. + * + *

See {@link #listIncidentTypesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentTypeListResponse>> + */ + public CompletableFuture> + listIncidentTypesWithHttpInfoAsync(ListIncidentTypesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentTypes"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Boolean includeDeleted = parameters.includeDeleted; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/types"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_deleted", includeDeleted)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentTypes", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listIncidentUserDefinedFields. */ + public static class ListIncidentUserDefinedFieldsOptionalParameters { + private Long pageSize; + private Long pageNumber; + private Boolean includeDeleted; + private String filterIncidentType; + private String include; + + /** + * Set pageSize. + * + * @param pageSize The number of results to return per page. Must be between 0 and 1000. + * (optional, default to 1000) + * @return ListIncidentUserDefinedFieldsOptionalParameters + */ + public ListIncidentUserDefinedFieldsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber The page number to retrieve, starting at 0. (optional, default to 0) + * @return ListIncidentUserDefinedFieldsOptionalParameters + */ + public ListIncidentUserDefinedFieldsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set includeDeleted. + * + * @param includeDeleted When true, include soft-deleted fields in the response. (optional, + * default to false) + * @return ListIncidentUserDefinedFieldsOptionalParameters + */ + public ListIncidentUserDefinedFieldsOptionalParameters includeDeleted(Boolean includeDeleted) { + this.includeDeleted = includeDeleted; + return this; + } + + /** + * Set filterIncidentType. + * + * @param filterIncidentType Filter results to fields associated with the given incident type + * UUID. (optional) + * @return ListIncidentUserDefinedFieldsOptionalParameters + */ + public ListIncidentUserDefinedFieldsOptionalParameters filterIncidentType( + String filterIncidentType) { + this.filterIncidentType = filterIncidentType; + return this; + } + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include. Supported values are + * "last_modified_by_user", "created_by_user", and "incident_type". (optional) + * @return ListIncidentUserDefinedFieldsOptionalParameters + */ + public ListIncidentUserDefinedFieldsOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Get a list of incident user-defined fields. + * + *

See {@link #listIncidentUserDefinedFieldsWithHttpInfo}. + * + * @return IncidentUserDefinedFieldListResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedFieldListResponse listIncidentUserDefinedFields() throws ApiException { + return listIncidentUserDefinedFieldsWithHttpInfo( + new ListIncidentUserDefinedFieldsOptionalParameters()) + .getData(); + } + + /** + * Get a list of incident user-defined fields. + * + *

See {@link #listIncidentUserDefinedFieldsWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentUserDefinedFieldListResponse> + */ + public CompletableFuture + listIncidentUserDefinedFieldsAsync() { + return listIncidentUserDefinedFieldsWithHttpInfoAsync( + new ListIncidentUserDefinedFieldsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of incident user-defined fields. + * + *

See {@link #listIncidentUserDefinedFieldsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentUserDefinedFieldListResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedFieldListResponse listIncidentUserDefinedFields( + ListIncidentUserDefinedFieldsOptionalParameters parameters) throws ApiException { + return listIncidentUserDefinedFieldsWithHttpInfo(parameters).getData(); + } + + /** + * Get a list of incident user-defined fields. + * + *

See {@link #listIncidentUserDefinedFieldsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentUserDefinedFieldListResponse> + */ + public CompletableFuture listIncidentUserDefinedFieldsAsync( + ListIncidentUserDefinedFieldsOptionalParameters parameters) { + return listIncidentUserDefinedFieldsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of all incident user-defined fields. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentUserDefinedFieldListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse + listIncidentUserDefinedFieldsWithHttpInfo( + ListIncidentUserDefinedFieldsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentUserDefinedFields"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + Boolean includeDeleted = parameters.includeDeleted; + String filterIncidentType = parameters.filterIncidentType; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/user-defined-fields"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include-deleted", includeDeleted)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentUserDefinedFields", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a list of incident user-defined fields. + * + *

See {@link #listIncidentUserDefinedFieldsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldListResponse>> + */ + public CompletableFuture> + listIncidentUserDefinedFieldsWithHttpInfoAsync( + ListIncidentUserDefinedFieldsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentUserDefinedFields"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + Boolean includeDeleted = parameters.includeDeleted; + String filterIncidentType = parameters.filterIncidentType; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/user-defined-fields"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include-deleted", includeDeleted)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentUserDefinedFields", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listIncidentUserDefinedRoles. */ + public static class ListIncidentUserDefinedRolesOptionalParameters { + private UUID filterIncidentType; + private String include; + + /** + * Set filterIncidentType. + * + * @param filterIncidentType Filter roles by incident type UUID. (optional) + * @return ListIncidentUserDefinedRolesOptionalParameters + */ + public ListIncidentUserDefinedRolesOptionalParameters filterIncidentType( + UUID filterIncidentType) { + this.filterIncidentType = filterIncidentType; + return this; + } + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include in the response. + * (optional) + * @return ListIncidentUserDefinedRolesOptionalParameters + */ + public ListIncidentUserDefinedRolesOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * List incident user-defined roles. + * + *

See {@link #listIncidentUserDefinedRolesWithHttpInfo}. + * + * @return IncidentUserDefinedRolesResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedRolesResponse listIncidentUserDefinedRoles() throws ApiException { + return listIncidentUserDefinedRolesWithHttpInfo( + new ListIncidentUserDefinedRolesOptionalParameters()) + .getData(); + } + + /** + * List incident user-defined roles. + * + *

See {@link #listIncidentUserDefinedRolesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentUserDefinedRolesResponse> + */ + public CompletableFuture listIncidentUserDefinedRolesAsync() { + return listIncidentUserDefinedRolesWithHttpInfoAsync( + new ListIncidentUserDefinedRolesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident user-defined roles. + * + *

See {@link #listIncidentUserDefinedRolesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentUserDefinedRolesResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedRolesResponse listIncidentUserDefinedRoles( + ListIncidentUserDefinedRolesOptionalParameters parameters) throws ApiException { + return listIncidentUserDefinedRolesWithHttpInfo(parameters).getData(); + } + + /** + * List incident user-defined roles. + * + *

See {@link #listIncidentUserDefinedRolesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentUserDefinedRolesResponse> + */ + public CompletableFuture listIncidentUserDefinedRolesAsync( + ListIncidentUserDefinedRolesOptionalParameters parameters) { + return listIncidentUserDefinedRolesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all user-defined roles for incidents. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentUserDefinedRolesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse listIncidentUserDefinedRolesWithHttpInfo( + ListIncidentUserDefinedRolesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentUserDefinedRoles"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + UUID filterIncidentType = parameters.filterIncidentType; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/user-defined-roles"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentUserDefinedRoles", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident user-defined roles. + * + *

See {@link #listIncidentUserDefinedRolesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentUserDefinedRolesResponse>> + */ + public CompletableFuture> + listIncidentUserDefinedRolesWithHttpInfoAsync( + ListIncidentUserDefinedRolesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentUserDefinedRoles"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + UUID filterIncidentType = parameters.filterIncidentType; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/user-defined-roles"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentUserDefinedRoles", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listOrgSettings. */ + public static class ListOrgSettingsOptionalParameters { + private Integer pageSize; + private Integer pageOffset; + private Boolean includeDeleted; + private String include; + + /** + * Set pageSize. + * + * @param pageSize Maximum number of results to return. (optional) + * @return ListOrgSettingsOptionalParameters + */ + public ListOrgSettingsOptionalParameters pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageOffset. + * + * @param pageOffset The offset for pagination. (optional) + * @return ListOrgSettingsOptionalParameters + */ + public ListOrgSettingsOptionalParameters pageOffset(Integer pageOffset) { + this.pageOffset = pageOffset; + return this; + } + + /** + * Set includeDeleted. + * + * @param includeDeleted Whether to include deleted records. (optional) + * @return ListOrgSettingsOptionalParameters + */ + public ListOrgSettingsOptionalParameters includeDeleted(Boolean includeDeleted) { + this.includeDeleted = includeDeleted; + return this; + } + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include in the response. + * (optional) + * @return ListOrgSettingsOptionalParameters + */ + public ListOrgSettingsOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * List incident type org settings. + * + *

See {@link #listOrgSettingsWithHttpInfo}. + * + * @return IncidentOrgSettingsListResponse + * @throws ApiException if fails to make API call + */ + public IncidentOrgSettingsListResponse listOrgSettings() throws ApiException { + return listOrgSettingsWithHttpInfo(new ListOrgSettingsOptionalParameters()).getData(); + } + + /** + * List incident type org settings. + * + *

See {@link #listOrgSettingsWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentOrgSettingsListResponse> + */ + public CompletableFuture listOrgSettingsAsync() { + return listOrgSettingsWithHttpInfoAsync(new ListOrgSettingsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident type org settings. + * + *

See {@link #listOrgSettingsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentOrgSettingsListResponse + * @throws ApiException if fails to make API call + */ + public IncidentOrgSettingsListResponse listOrgSettings( + ListOrgSettingsOptionalParameters parameters) throws ApiException { + return listOrgSettingsWithHttpInfo(parameters).getData(); + } + + /** + * List incident type org settings. + * + *

See {@link #listOrgSettingsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentOrgSettingsListResponse> + */ + public CompletableFuture listOrgSettingsAsync( + ListOrgSettingsOptionalParameters parameters) { + return listOrgSettingsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List org settings for all incident types. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentOrgSettingsListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listOrgSettingsWithHttpInfo( + ListOrgSettingsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listOrgSettings"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + Integer pageSize = parameters.pageSize; + Integer pageOffset = parameters.pageOffset; + Boolean includeDeleted = parameters.includeDeleted; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/types/org-settings"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include-deleted", includeDeleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listOrgSettings", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident type org settings. + * + *

See {@link #listOrgSettingsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentOrgSettingsListResponse>> + */ + public CompletableFuture> + listOrgSettingsWithHttpInfoAsync(ListOrgSettingsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listOrgSettings"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Integer pageSize = parameters.pageSize; + Integer pageOffset = parameters.pageOffset; + Boolean includeDeleted = parameters.includeDeleted; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/types/org-settings"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include-deleted", includeDeleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listOrgSettings", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident timestamp overrides. + * + *

See {@link #listTimestampOverridesWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentTimestampOverridesResponse + * @throws ApiException if fails to make API call + */ + public IncidentTimestampOverridesResponse listTimestampOverrides(String incidentId) + throws ApiException { + return listTimestampOverridesWithHttpInfo(incidentId).getData(); + } + + /** + * List incident timestamp overrides. + * + *

See {@link #listTimestampOverridesWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentTimestampOverridesResponse> + */ + public CompletableFuture listTimestampOverridesAsync( + String incidentId) { + return listTimestampOverridesWithHttpInfoAsync(incidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all timestamp overrides for an incident. + * + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentTimestampOverridesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listTimestampOverridesWithHttpInfo( + String incidentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listTimestampOverrides"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling listTimestampOverrides"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/timestamp-overrides" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listTimestampOverrides", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List incident timestamp overrides. + * + *

See {@link #listTimestampOverridesWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentTimestampOverridesResponse>> + */ + public CompletableFuture> + listTimestampOverridesWithHttpInfoAsync(String incidentId) { + // Check if unstable operation is enabled + String operationId = "listTimestampOverrides"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling listTimestampOverrides")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/timestamp-overrides" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listTimestampOverrides", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to patchIncidentImpact. */ + public static class PatchIncidentImpactOptionalParameters { + private List include; + + /** + * Set include. + * + * @param include Specifies which related resources should be included in the response. + * (optional) + * @return PatchIncidentImpactOptionalParameters + */ + public PatchIncidentImpactOptionalParameters include( + List include) { + this.include = include; + return this; + } + } + + /** + * Patch an incident impact. + * + *

See {@link #patchIncidentImpactWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact patch payload. (required) + * @return IncidentImpactResponse + * @throws ApiException if fails to make API call + */ + public IncidentImpactResponse patchIncidentImpact( + String incidentId, String impactId, IncidentImpactCreateRequest body) throws ApiException { + return patchIncidentImpactWithHttpInfo( + incidentId, impactId, body, new PatchIncidentImpactOptionalParameters()) + .getData(); + } + + /** + * Patch an incident impact. + * + *

See {@link #patchIncidentImpactWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact patch payload. (required) + * @return CompletableFuture<IncidentImpactResponse> + */ + public CompletableFuture patchIncidentImpactAsync( + String incidentId, String impactId, IncidentImpactCreateRequest body) { + return patchIncidentImpactWithHttpInfoAsync( + incidentId, impactId, body, new PatchIncidentImpactOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Patch an incident impact. + * + *

See {@link #patchIncidentImpactWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact patch payload. (required) + * @param parameters Optional parameters for the request. + * @return IncidentImpactResponse + * @throws ApiException if fails to make API call + */ + public IncidentImpactResponse patchIncidentImpact( + String incidentId, + String impactId, + IncidentImpactCreateRequest body, + PatchIncidentImpactOptionalParameters parameters) + throws ApiException { + return patchIncidentImpactWithHttpInfo(incidentId, impactId, body, parameters).getData(); + } + + /** + * Patch an incident impact. + * + *

See {@link #patchIncidentImpactWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact patch payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentImpactResponse> + */ + public CompletableFuture patchIncidentImpactAsync( + String incidentId, + String impactId, + IncidentImpactCreateRequest body, + PatchIncidentImpactOptionalParameters parameters) { + return patchIncidentImpactWithHttpInfoAsync(incidentId, impactId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Partially update an incident impact. + * + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact patch payload. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentImpactResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse patchIncidentImpactWithHttpInfo( + String incidentId, + String impactId, + IncidentImpactCreateRequest body, + PatchIncidentImpactOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "patchIncidentImpact"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling patchIncidentImpact"); + } + + // verify the required parameter 'impactId' is set + if (impactId == null) { + throw new ApiException( + 400, "Missing the required parameter 'impactId' when calling patchIncidentImpact"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling patchIncidentImpact"); + } + List include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "impact_id" + "\\}", apiClient.escapeString(impactId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.patchIncidentImpact", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Patch an incident impact. + * + *

See {@link #patchIncidentImpactWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact patch payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentImpactResponse>> + */ + public CompletableFuture> + patchIncidentImpactWithHttpInfoAsync( + String incidentId, + String impactId, + IncidentImpactCreateRequest body, + PatchIncidentImpactOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "patchIncidentImpact"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'incidentId' when calling patchIncidentImpact")); + return result; + } + + // verify the required parameter 'impactId' is set + if (impactId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'impactId' when calling patchIncidentImpact")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling patchIncidentImpact")); + return result; + } + List include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "impact_id" + "\\}", apiClient.escapeString(impactId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.patchIncidentImpact", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to searchIncidents. */ + public static class SearchIncidentsOptionalParameters { + private IncidentRelatedObject include; + private IncidentSearchSortOrder sort; + private Long pageSize; + private Long pageOffset; + + /** + * Set include. + * + * @param include Specifies which types of related objects should be included in the response. + * (optional) + * @return SearchIncidentsOptionalParameters + */ + public SearchIncidentsOptionalParameters include(IncidentRelatedObject include) { + this.include = include; + return this; + } + + /** + * Set sort. + * + * @param sort Specifies the order of returned incidents. (optional) + * @return SearchIncidentsOptionalParameters + */ + public SearchIncidentsOptionalParameters sort(IncidentSearchSortOrder sort) { + this.sort = sort; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default + * to 10) + * @return SearchIncidentsOptionalParameters + */ + public SearchIncidentsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageOffset. + * + * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, + * default to 0) + * @return SearchIncidentsOptionalParameters + */ + public SearchIncidentsOptionalParameters pageOffset(Long pageOffset) { + this.pageOffset = pageOffset; + return this; + } + } + + /** + * Search for incidents. + * + *

See {@link #searchIncidentsWithHttpInfo}. + * + * @param query Specifies which incidents should be returned. The query can contain any number of + * incident facets joined by ANDs, along with multiple values for each of those + * facets joined by ORs. For example: + * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @return IncidentSearchResponse + * @throws ApiException if fails to make API call + */ + public IncidentSearchResponse searchIncidents(String query) throws ApiException { + return searchIncidentsWithHttpInfo(query, new SearchIncidentsOptionalParameters()).getData(); + } + + /** + * Search for incidents. + * + *

See {@link #searchIncidentsWithHttpInfoAsync}. + * + * @param query Specifies which incidents should be returned. The query can contain any number of + * incident facets joined by ANDs, along with multiple values for each of those + * facets joined by ORs. For example: + * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @return CompletableFuture<IncidentSearchResponse> + */ + public CompletableFuture searchIncidentsAsync(String query) { + return searchIncidentsWithHttpInfoAsync(query, new SearchIncidentsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search for incidents. + * + *

See {@link #searchIncidentsWithHttpInfo}. + * + * @param query Specifies which incidents should be returned. The query can contain any number of + * incident facets joined by ANDs, along with multiple values for each of those + * facets joined by ORs. For example: + * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @param parameters Optional parameters for the request. + * @return IncidentSearchResponse + * @throws ApiException if fails to make API call + */ + public IncidentSearchResponse searchIncidents( + String query, SearchIncidentsOptionalParameters parameters) throws ApiException { + return searchIncidentsWithHttpInfo(query, parameters).getData(); + } + + /** + * Search for incidents. + * + *

See {@link #searchIncidentsWithHttpInfoAsync}. + * + * @param query Specifies which incidents should be returned. The query can contain any number of + * incident facets joined by ANDs, along with multiple values for each of those + * facets joined by ORs. For example: + * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentSearchResponse> + */ + public CompletableFuture searchIncidentsAsync( + String query, SearchIncidentsOptionalParameters parameters) { + return searchIncidentsWithHttpInfoAsync(query, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search for incidents. + * + *

See {@link #searchIncidentsWithHttpInfo}. + * + * @param query Specifies which incidents should be returned. The query can contain any number of + * incident facets joined by ANDs, along with multiple values for each of those + * facets joined by ORs. For example: + * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @return PaginationIterable<IncidentSearchResponseIncidentsData> + */ + public PaginationIterable searchIncidentsWithPagination( + String query) { + SearchIncidentsOptionalParameters parameters = new SearchIncidentsOptionalParameters(); + return searchIncidentsWithPagination(query, parameters); + } + + /** + * Search for incidents. + * + *

See {@link #searchIncidentsWithHttpInfo}. + * + * @param query Specifies which incidents should be returned. The query can contain any number of + * incident facets joined by ANDs, along with multiple values for each of those + * facets joined by ORs. For example: + * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @return IncidentSearchResponse + */ + public PaginationIterable searchIncidentsWithPagination( + String query, SearchIncidentsOptionalParameters parameters) { + String resultsPath = "getData.getAttributes.getIncidents"; + String valueGetterPath = ""; + String valueSetterPath = "pageOffset"; + Boolean valueSetterParamOptional = true; + Long limit; + + if (parameters.pageSize == null) { + limit = 10l; + parameters.pageSize(limit); + } else { + limit = parameters.pageSize; + } + + LinkedHashMap args = new LinkedHashMap(); + args.put("query", query); + args.put("optionalParams", parameters); + + PaginationIterable iterator = + new PaginationIterable( + this, + "searchIncidents", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + false, + limit, + args, + 0); + + return iterator; + } + + /** + * Search for incidents matching a certain query. + * + * @param query Specifies which incidents should be returned. The query can contain any number of + * incident facets joined by ANDs, along with multiple values for each of those + * facets joined by ORs. For example: + * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentSearchResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse searchIncidentsWithHttpInfo( + String query, SearchIncidentsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "searchIncidents"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'query' is set + if (query == null) { + throw new ApiException( + 400, "Missing the required parameter 'query' when calling searchIncidents"); + } + IncidentRelatedObject include = parameters.include; + IncidentSearchSortOrder sort = parameters.sort; + Long pageSize = parameters.pageSize; + Long pageOffset = parameters.pageOffset; + // create path and map variables + String localVarPath = "/api/v2/incidents/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.searchIncidents", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Search for incidents. + * + *

See {@link #searchIncidentsWithHttpInfo}. + * + * @param query Specifies which incidents should be returned. The query can contain any number of + * incident facets joined by ANDs, along with multiple values for each of those + * facets joined by ORs. For example: + * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentSearchResponse>> + */ + public CompletableFuture> searchIncidentsWithHttpInfoAsync( + String query, SearchIncidentsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "searchIncidents"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'query' is set + if (query == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'query' when calling searchIncidents")); + return result; + } + IncidentRelatedObject include = parameters.include; + IncidentSearchSortOrder sort = parameters.sort; + Long pageSize = parameters.pageSize; + Long pageOffset = parameters.pageOffset; + // create path and map variables + String localVarPath = "/api/v2/incidents/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.searchIncidents", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to updateGlobalIncidentHandle. */ + public static class UpdateGlobalIncidentHandleOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include in the response + * (optional) + * @return UpdateGlobalIncidentHandleOptionalParameters + */ + public UpdateGlobalIncidentHandleOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Update global incident handle. + * + *

See {@link #updateGlobalIncidentHandleWithHttpInfo}. + * + * @param body (required) + * @return IncidentHandleResponse + * @throws ApiException if fails to make API call + */ + public IncidentHandleResponse updateGlobalIncidentHandle(IncidentHandleRequest body) + throws ApiException { + return updateGlobalIncidentHandleWithHttpInfo( + body, new UpdateGlobalIncidentHandleOptionalParameters()) + .getData(); + } + + /** + * Update global incident handle. + * + *

See {@link #updateGlobalIncidentHandleWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<IncidentHandleResponse> + */ + public CompletableFuture updateGlobalIncidentHandleAsync( + IncidentHandleRequest body) { + return updateGlobalIncidentHandleWithHttpInfoAsync( + body, new UpdateGlobalIncidentHandleOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update global incident handle. + * + *

See {@link #updateGlobalIncidentHandleWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return IncidentHandleResponse + * @throws ApiException if fails to make API call + */ + public IncidentHandleResponse updateGlobalIncidentHandle( + IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) + throws ApiException { + return updateGlobalIncidentHandleWithHttpInfo(body, parameters).getData(); + } + + /** + * Update global incident handle. + * + *

See {@link #updateGlobalIncidentHandleWithHttpInfoAsync}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentHandleResponse> + */ + public CompletableFuture updateGlobalIncidentHandleAsync( + IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) { + return updateGlobalIncidentHandleWithHttpInfoAsync(body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing global incident handle. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentHandleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse updateGlobalIncidentHandleWithHttpInfo( + IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateGlobalIncidentHandle"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateGlobalIncidentHandle"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateGlobalIncidentHandle", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update global incident handle. + * + *

See {@link #updateGlobalIncidentHandleWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentHandleResponse>> + */ + public CompletableFuture> + updateGlobalIncidentHandleWithHttpInfoAsync( + IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "updateGlobalIncidentHandle"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling updateGlobalIncidentHandle")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateGlobalIncidentHandle", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update global incident settings. + * + *

See {@link #updateGlobalIncidentSettingsWithHttpInfo}. + * + * @param body (required) + * @return GlobalIncidentSettingsResponse + * @throws ApiException if fails to make API call + */ + public GlobalIncidentSettingsResponse updateGlobalIncidentSettings( + GlobalIncidentSettingsRequest body) throws ApiException { + return updateGlobalIncidentSettingsWithHttpInfo(body).getData(); + } + + /** + * Update global incident settings. + * + *

See {@link #updateGlobalIncidentSettingsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<GlobalIncidentSettingsResponse> + */ + public CompletableFuture updateGlobalIncidentSettingsAsync( + GlobalIncidentSettingsRequest body) { + return updateGlobalIncidentSettingsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update global incident settings for the organization. + * + * @param body (required) + * @return ApiResponse<GlobalIncidentSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse updateGlobalIncidentSettingsWithHttpInfo( + GlobalIncidentSettingsRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateGlobalIncidentSettings"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateGlobalIncidentSettings"); + } + // create path and map variables + String localVarPath = "/api/v2/incidents/config/global/settings"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateGlobalIncidentSettings", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update global incident settings. + * + *

See {@link #updateGlobalIncidentSettingsWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<GlobalIncidentSettingsResponse>> + */ + public CompletableFuture> + updateGlobalIncidentSettingsWithHttpInfoAsync(GlobalIncidentSettingsRequest body) { + // Check if unstable operation is enabled + String operationId = "updateGlobalIncidentSettings"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling updateGlobalIncidentSettings")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/incidents/config/global/settings"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateGlobalIncidentSettings", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to updateIncident. */ + public static class UpdateIncidentOptionalParameters { + private List include; + + /** + * Set include. + * + * @param include Specifies which types of related objects should be included in the response. + * (optional) + * @return UpdateIncidentOptionalParameters + */ + public UpdateIncidentOptionalParameters include(List include) { + this.include = include; + return this; + } + } + + /** + * Update an existing incident. + * + *

See {@link #updateIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @return IncidentResponse + * @throws ApiException if fails to make API call + */ + public IncidentResponse updateIncident(String incidentId, IncidentUpdateRequest body) + throws ApiException { + return updateIncidentWithHttpInfo(incidentId, body, new UpdateIncidentOptionalParameters()) + .getData(); + } + + /** + * Update an existing incident. + * + *

See {@link #updateIncidentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @return CompletableFuture<IncidentResponse> + */ + public CompletableFuture updateIncidentAsync( + String incidentId, IncidentUpdateRequest body) { + return updateIncidentWithHttpInfoAsync(incidentId, body, new UpdateIncidentOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing incident. + * + *

See {@link #updateIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @param parameters Optional parameters for the request. + * @return IncidentResponse + * @throws ApiException if fails to make API call + */ + public IncidentResponse updateIncident( + String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) + throws ApiException { + return updateIncidentWithHttpInfo(incidentId, body, parameters).getData(); + } + + /** + * Update an existing incident. + * + *

See {@link #updateIncidentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentResponse> + */ + public CompletableFuture updateIncidentAsync( + String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { + return updateIncidentWithHttpInfoAsync(incidentId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Updates an incident. Provide only the attributes that should be updated as this request is a + * partial update. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateIncidentWithHttpInfo( + String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateIncident"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling updateIncident"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncident"); + } + List include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncident", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an existing incident. + * + *

See {@link #updateIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentResponse>> + */ + public CompletableFuture> updateIncidentWithHttpInfoAsync( + String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "updateIncident"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'incidentId' when calling updateIncident")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncident")); + return result; + } + List include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncident", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to updateIncidentAttachment. */ + public static class UpdateIncidentAttachmentOptionalParameters { + private String include; + + /** + * Set include. * - * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default - * to 10) - * @return SearchIncidentsOptionalParameters + * @param include Resource to include in the response. Supported value: + * last_modified_by_user. (optional) + * @return UpdateIncidentAttachmentOptionalParameters */ - public SearchIncidentsOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; + public UpdateIncidentAttachmentOptionalParameters include(String include) { + this.include = include; return this; } + } + + /** + * Update incident attachment. + * + *

See {@link #updateIncidentAttachmentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param attachmentId The ID of the attachment. (required) + * @param body (required) + * @return Attachment + * @throws ApiException if fails to make API call + */ + public Attachment updateIncidentAttachment( + String incidentId, String attachmentId, PatchAttachmentRequest body) throws ApiException { + return updateIncidentAttachmentWithHttpInfo( + incidentId, attachmentId, body, new UpdateIncidentAttachmentOptionalParameters()) + .getData(); + } + + /** + * Update incident attachment. + * + *

See {@link #updateIncidentAttachmentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param attachmentId The ID of the attachment. (required) + * @param body (required) + * @return CompletableFuture<Attachment> + */ + public CompletableFuture updateIncidentAttachmentAsync( + String incidentId, String attachmentId, PatchAttachmentRequest body) { + return updateIncidentAttachmentWithHttpInfoAsync( + incidentId, attachmentId, body, new UpdateIncidentAttachmentOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update incident attachment. + * + *

See {@link #updateIncidentAttachmentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param attachmentId The ID of the attachment. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return Attachment + * @throws ApiException if fails to make API call + */ + public Attachment updateIncidentAttachment( + String incidentId, + String attachmentId, + PatchAttachmentRequest body, + UpdateIncidentAttachmentOptionalParameters parameters) + throws ApiException { + return updateIncidentAttachmentWithHttpInfo(incidentId, attachmentId, body, parameters) + .getData(); + } + + /** + * Update incident attachment. + * + *

See {@link #updateIncidentAttachmentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param attachmentId The ID of the attachment. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<Attachment> + */ + public CompletableFuture updateIncidentAttachmentAsync( + String incidentId, + String attachmentId, + PatchAttachmentRequest body, + UpdateIncidentAttachmentOptionalParameters parameters) { + return updateIncidentAttachmentWithHttpInfoAsync(incidentId, attachmentId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param incidentId The UUID of the incident. (required) + * @param attachmentId The ID of the attachment. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Attachment> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateIncidentAttachmentWithHttpInfo( + String incidentId, + String attachmentId, + PatchAttachmentRequest body, + UpdateIncidentAttachmentOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateIncidentAttachment"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling updateIncidentAttachment"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'attachmentId' when calling updateIncidentAttachment"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncidentAttachment"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentAttachment", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update incident attachment. + * + *

See {@link #updateIncidentAttachmentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param attachmentId The ID of the attachment. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Attachment>> + */ + public CompletableFuture> updateIncidentAttachmentWithHttpInfoAsync( + String incidentId, + String attachmentId, + PatchAttachmentRequest body, + UpdateIncidentAttachmentOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "updateIncidentAttachment"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling updateIncidentAttachment")); + return result; + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'attachmentId' when calling" + + " updateIncidentAttachment")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncidentAttachment")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentAttachment", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an incident configuration. + * + *

See {@link #updateIncidentConfigurationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident configuration patch payload. (required) + * @return IncidentConfigurationResponse + * @throws ApiException if fails to make API call + */ + public IncidentConfigurationResponse updateIncidentConfiguration( + String incidentId, IncidentConfigurationPatchRequest body) throws ApiException { + return updateIncidentConfigurationWithHttpInfo(incidentId, body).getData(); + } + + /** + * Update an incident configuration. + * + *

See {@link #updateIncidentConfigurationWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident configuration patch payload. (required) + * @return CompletableFuture<IncidentConfigurationResponse> + */ + public CompletableFuture updateIncidentConfigurationAsync( + String incidentId, IncidentConfigurationPatchRequest body) { + return updateIncidentConfigurationWithHttpInfoAsync(incidentId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a configuration for an incident. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident configuration patch payload. (required) + * @return ApiResponse<IncidentConfigurationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateIncidentConfigurationWithHttpInfo( + String incidentId, IncidentConfigurationPatchRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateIncidentConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling updateIncidentConfiguration"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncidentConfiguration"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/configurations" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentConfiguration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an incident configuration. + * + *

See {@link #updateIncidentConfigurationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident configuration patch payload. (required) + * @return CompletableFuture<ApiResponse<IncidentConfigurationResponse>> + */ + public CompletableFuture> + updateIncidentConfigurationWithHttpInfoAsync( + String incidentId, IncidentConfigurationPatchRequest body) { + // Check if unstable operation is enabled + String operationId = "updateIncidentConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling" + + " updateIncidentConfiguration")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling updateIncidentConfiguration")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/configurations" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentConfiguration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an incident Google Chat configuration. + * + *

See {@link #updateIncidentGoogleChatConfigurationWithHttpInfo}. + * + * @param id The UUID of the Google Chat configuration. (required) + * @param body Google Chat configuration patch payload. (required) + * @return IncidentGoogleChatConfigurationResponse + * @throws ApiException if fails to make API call + */ + public IncidentGoogleChatConfigurationResponse updateIncidentGoogleChatConfiguration( + UUID id, IncidentGoogleChatConfigurationPatchRequest body) throws ApiException { + return updateIncidentGoogleChatConfigurationWithHttpInfo(id, body).getData(); + } + + /** + * Update an incident Google Chat configuration. + * + *

See {@link #updateIncidentGoogleChatConfigurationWithHttpInfoAsync}. + * + * @param id The UUID of the Google Chat configuration. (required) + * @param body Google Chat configuration patch payload. (required) + * @return CompletableFuture<IncidentGoogleChatConfigurationResponse> + */ + public CompletableFuture + updateIncidentGoogleChatConfigurationAsync( + UUID id, IncidentGoogleChatConfigurationPatchRequest body) { + return updateIncidentGoogleChatConfigurationWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a Google Chat configuration for incidents. + * + * @param id The UUID of the Google Chat configuration. (required) + * @param body Google Chat configuration patch payload. (required) + * @return ApiResponse<IncidentGoogleChatConfigurationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + updateIncidentGoogleChatConfigurationWithHttpInfo( + UUID id, IncidentGoogleChatConfigurationPatchRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateIncidentGoogleChatConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling updateIncidentGoogleChatConfiguration"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " updateIncidentGoogleChatConfiguration"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/google-chat-configurations/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentGoogleChatConfiguration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an incident Google Chat configuration. + * + *

See {@link #updateIncidentGoogleChatConfigurationWithHttpInfo}. + * + * @param id The UUID of the Google Chat configuration. (required) + * @param body Google Chat configuration patch payload. (required) + * @return CompletableFuture<ApiResponse<IncidentGoogleChatConfigurationResponse>> + */ + public CompletableFuture> + updateIncidentGoogleChatConfigurationWithHttpInfoAsync( + UUID id, IncidentGoogleChatConfigurationPatchRequest body) { + // Check if unstable operation is enabled + String operationId = "updateIncidentGoogleChatConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " updateIncidentGoogleChatConfiguration")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " updateIncidentGoogleChatConfiguration")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/google-chat-configurations/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentGoogleChatConfiguration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an incident Google Meet configuration. + * + *

See {@link #updateIncidentGoogleMeetConfigurationWithHttpInfo}. + * + * @param id The UUID of the Google Meet configuration. (required) + * @param body Google Meet configuration patch payload. (required) + * @return IncidentGoogleMeetConfigurationResponse + * @throws ApiException if fails to make API call + */ + public IncidentGoogleMeetConfigurationResponse updateIncidentGoogleMeetConfiguration( + UUID id, IncidentGoogleMeetConfigurationPatchRequest body) throws ApiException { + return updateIncidentGoogleMeetConfigurationWithHttpInfo(id, body).getData(); + } + + /** + * Update an incident Google Meet configuration. + * + *

See {@link #updateIncidentGoogleMeetConfigurationWithHttpInfoAsync}. + * + * @param id The UUID of the Google Meet configuration. (required) + * @param body Google Meet configuration patch payload. (required) + * @return CompletableFuture<IncidentGoogleMeetConfigurationResponse> + */ + public CompletableFuture + updateIncidentGoogleMeetConfigurationAsync( + UUID id, IncidentGoogleMeetConfigurationPatchRequest body) { + return updateIncidentGoogleMeetConfigurationWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a Google Meet configuration for incidents. + * + * @param id The UUID of the Google Meet configuration. (required) + * @param body Google Meet configuration patch payload. (required) + * @return ApiResponse<IncidentGoogleMeetConfigurationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + updateIncidentGoogleMeetConfigurationWithHttpInfo( + UUID id, IncidentGoogleMeetConfigurationPatchRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateIncidentGoogleMeetConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling updateIncidentGoogleMeetConfiguration"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " updateIncidentGoogleMeetConfiguration"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/google-meet-configurations/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentGoogleMeetConfiguration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an incident Google Meet configuration. + * + *

See {@link #updateIncidentGoogleMeetConfigurationWithHttpInfo}. + * + * @param id The UUID of the Google Meet configuration. (required) + * @param body Google Meet configuration patch payload. (required) + * @return CompletableFuture<ApiResponse<IncidentGoogleMeetConfigurationResponse>> + */ + public CompletableFuture> + updateIncidentGoogleMeetConfigurationWithHttpInfoAsync( + UUID id, IncidentGoogleMeetConfigurationPatchRequest body) { + // Check if unstable operation is enabled + String operationId = "updateIncidentGoogleMeetConfiguration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " updateIncidentGoogleMeetConfiguration")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " updateIncidentGoogleMeetConfiguration")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/google-meet-configurations/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentGoogleMeetConfiguration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to updateIncidentImpact. */ + public static class UpdateIncidentImpactOptionalParameters { + private List include; /** - * Set pageOffset. + * Set include. * - * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, - * default to 0) - * @return SearchIncidentsOptionalParameters + * @param include Specifies which related resources should be included in the response. + * (optional) + * @return UpdateIncidentImpactOptionalParameters */ - public SearchIncidentsOptionalParameters pageOffset(Long pageOffset) { - this.pageOffset = pageOffset; + public UpdateIncidentImpactOptionalParameters include( + List include) { + this.include = include; return this; } } /** - * Search for incidents. + * Update an incident impact. * - *

See {@link #searchIncidentsWithHttpInfo}. + *

See {@link #updateIncidentImpactWithHttpInfo}. * - * @param query Specifies which incidents should be returned. The query can contain any number of - * incident facets joined by ANDs, along with multiple values for each of those - * facets joined by ORs. For example: - * state:active AND severity:(SEV-2 OR SEV-1). (required) - * @return IncidentSearchResponse + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact payload. (required) + * @return IncidentImpactResponse * @throws ApiException if fails to make API call */ - public IncidentSearchResponse searchIncidents(String query) throws ApiException { - return searchIncidentsWithHttpInfo(query, new SearchIncidentsOptionalParameters()).getData(); + public IncidentImpactResponse updateIncidentImpact( + String incidentId, String impactId, IncidentImpactCreateRequest body) throws ApiException { + return updateIncidentImpactWithHttpInfo( + incidentId, impactId, body, new UpdateIncidentImpactOptionalParameters()) + .getData(); } /** - * Search for incidents. + * Update an incident impact. * - *

See {@link #searchIncidentsWithHttpInfoAsync}. + *

See {@link #updateIncidentImpactWithHttpInfoAsync}. * - * @param query Specifies which incidents should be returned. The query can contain any number of - * incident facets joined by ANDs, along with multiple values for each of those - * facets joined by ORs. For example: - * state:active AND severity:(SEV-2 OR SEV-1). (required) - * @return CompletableFuture<IncidentSearchResponse> + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact payload. (required) + * @return CompletableFuture<IncidentImpactResponse> */ - public CompletableFuture searchIncidentsAsync(String query) { - return searchIncidentsWithHttpInfoAsync(query, new SearchIncidentsOptionalParameters()) + public CompletableFuture updateIncidentImpactAsync( + String incidentId, String impactId, IncidentImpactCreateRequest body) { + return updateIncidentImpactWithHttpInfoAsync( + incidentId, impactId, body, new UpdateIncidentImpactOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -8461,38 +15569,43 @@ public CompletableFuture searchIncidentsAsync(String que } /** - * Search for incidents. + * Update an incident impact. * - *

See {@link #searchIncidentsWithHttpInfo}. + *

See {@link #updateIncidentImpactWithHttpInfo}. * - * @param query Specifies which incidents should be returned. The query can contain any number of - * incident facets joined by ANDs, along with multiple values for each of those - * facets joined by ORs. For example: - * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact payload. (required) * @param parameters Optional parameters for the request. - * @return IncidentSearchResponse + * @return IncidentImpactResponse * @throws ApiException if fails to make API call */ - public IncidentSearchResponse searchIncidents( - String query, SearchIncidentsOptionalParameters parameters) throws ApiException { - return searchIncidentsWithHttpInfo(query, parameters).getData(); + public IncidentImpactResponse updateIncidentImpact( + String incidentId, + String impactId, + IncidentImpactCreateRequest body, + UpdateIncidentImpactOptionalParameters parameters) + throws ApiException { + return updateIncidentImpactWithHttpInfo(incidentId, impactId, body, parameters).getData(); } /** - * Search for incidents. + * Update an incident impact. * - *

See {@link #searchIncidentsWithHttpInfoAsync}. + *

See {@link #updateIncidentImpactWithHttpInfoAsync}. * - * @param query Specifies which incidents should be returned. The query can contain any number of - * incident facets joined by ANDs, along with multiple values for each of those - * facets joined by ORs. For example: - * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact payload. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentSearchResponse> + * @return CompletableFuture<IncidentImpactResponse> */ - public CompletableFuture searchIncidentsAsync( - String query, SearchIncidentsOptionalParameters parameters) { - return searchIncidentsWithHttpInfoAsync(query, parameters) + public CompletableFuture updateIncidentImpactAsync( + String incidentId, + String impactId, + IncidentImpactCreateRequest body, + UpdateIncidentImpactOptionalParameters parameters) { + return updateIncidentImpactWithHttpInfoAsync(incidentId, impactId, body, parameters) .thenApply( response -> { return response.getData(); @@ -8500,78 +15613,13 @@ public CompletableFuture searchIncidentsAsync( } /** - * Search for incidents. - * - *

See {@link #searchIncidentsWithHttpInfo}. - * - * @param query Specifies which incidents should be returned. The query can contain any number of - * incident facets joined by ANDs, along with multiple values for each of those - * facets joined by ORs. For example: - * state:active AND severity:(SEV-2 OR SEV-1). (required) - * @return PaginationIterable<IncidentSearchResponseIncidentsData> - */ - public PaginationIterable searchIncidentsWithPagination( - String query) { - SearchIncidentsOptionalParameters parameters = new SearchIncidentsOptionalParameters(); - return searchIncidentsWithPagination(query, parameters); - } - - /** - * Search for incidents. - * - *

See {@link #searchIncidentsWithHttpInfo}. - * - * @param query Specifies which incidents should be returned. The query can contain any number of - * incident facets joined by ANDs, along with multiple values for each of those - * facets joined by ORs. For example: - * state:active AND severity:(SEV-2 OR SEV-1). (required) - * @return IncidentSearchResponse - */ - public PaginationIterable searchIncidentsWithPagination( - String query, SearchIncidentsOptionalParameters parameters) { - String resultsPath = "getData.getAttributes.getIncidents"; - String valueGetterPath = ""; - String valueSetterPath = "pageOffset"; - Boolean valueSetterParamOptional = true; - Long limit; - - if (parameters.pageSize == null) { - limit = 10l; - parameters.pageSize(limit); - } else { - limit = parameters.pageSize; - } - - LinkedHashMap args = new LinkedHashMap(); - args.put("query", query); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "searchIncidents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - true, - false, - limit, - args, - 0); - - return iterator; - } - - /** - * Search for incidents matching a certain query. + * Update an incident impact. * - * @param query Specifies which incidents should be returned. The query can contain any number of - * incident facets joined by ANDs, along with multiple values for each of those - * facets joined by ORs. For example: - * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact payload. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentSearchResponse> + * @return ApiResponse<IncidentImpactResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -8585,41 +15633,54 @@ public PaginationIterable searchIncidentsWi * *
429 Too many requests -
*/ - public ApiResponse searchIncidentsWithHttpInfo( - String query, SearchIncidentsOptionalParameters parameters) throws ApiException { + public ApiResponse updateIncidentImpactWithHttpInfo( + String incidentId, + String impactId, + IncidentImpactCreateRequest body, + UpdateIncidentImpactOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "searchIncidents"; + String operationId = "updateIncidentImpact"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'query' is set - if (query == null) { + // verify the required parameter 'incidentId' is set + if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'query' when calling searchIncidents"); + 400, "Missing the required parameter 'incidentId' when calling updateIncidentImpact"); } - IncidentRelatedObject include = parameters.include; - IncidentSearchSortOrder sort = parameters.sort; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; + + // verify the required parameter 'impactId' is set + if (impactId == null) { + throw new ApiException( + 400, "Missing the required parameter 'impactId' when calling updateIncidentImpact"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncidentImpact"); + } + List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/search"; + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "impact_id" + "\\}", apiClient.escapeString(impactId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.searchIncidents", + "v2.IncidentsApi.updateIncidentImpact", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8627,71 +15688,90 @@ public ApiResponse searchIncidentsWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "PUT", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Search for incidents. + * Update an incident impact. * - *

See {@link #searchIncidentsWithHttpInfo}. + *

See {@link #updateIncidentImpactWithHttpInfo}. * - * @param query Specifies which incidents should be returned. The query can contain any number of - * incident facets joined by ANDs, along with multiple values for each of those - * facets joined by ORs. For example: - * state:active AND severity:(SEV-2 OR SEV-1). (required) + * @param incidentId The UUID of the incident. (required) + * @param impactId The UUID of the incident impact. (required) + * @param body Incident impact payload. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentSearchResponse>> + * @return CompletableFuture<ApiResponse<IncidentImpactResponse>> */ - public CompletableFuture> searchIncidentsWithHttpInfoAsync( - String query, SearchIncidentsOptionalParameters parameters) { + public CompletableFuture> + updateIncidentImpactWithHttpInfoAsync( + String incidentId, + String impactId, + IncidentImpactCreateRequest body, + UpdateIncidentImpactOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "searchIncidents"; + String operationId = "updateIncidentImpact"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'query' is set - if (query == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'query' when calling searchIncidents")); + 400, + "Missing the required parameter 'incidentId' when calling updateIncidentImpact")); return result; } - IncidentRelatedObject include = parameters.include; - IncidentSearchSortOrder sort = parameters.sort; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; + + // verify the required parameter 'impactId' is set + if (impactId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'impactId' when calling updateIncidentImpact")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncidentImpact")); + return result; + } + List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/search"; + String localVarPath = + "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "impact_id" + "\\}", apiClient.escapeString(impactId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.searchIncidents", + "v2.IncidentsApi.updateIncidentImpact", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8699,100 +15779,48 @@ public CompletableFuture> searchIncidentsWit new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "PUT", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to updateGlobalIncidentHandle. */ - public static class UpdateGlobalIncidentHandleOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of related resources to include in the response - * (optional) - * @return UpdateGlobalIncidentHandleOptionalParameters - */ - public UpdateGlobalIncidentHandleOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * Update global incident handle. - * - *

See {@link #updateGlobalIncidentHandleWithHttpInfo}. - * - * @param body (required) - * @return IncidentHandleResponse - * @throws ApiException if fails to make API call - */ - public IncidentHandleResponse updateGlobalIncidentHandle(IncidentHandleRequest body) - throws ApiException { - return updateGlobalIncidentHandleWithHttpInfo( - body, new UpdateGlobalIncidentHandleOptionalParameters()) - .getData(); - } - - /** - * Update global incident handle. - * - *

See {@link #updateGlobalIncidentHandleWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<IncidentHandleResponse> - */ - public CompletableFuture updateGlobalIncidentHandleAsync( - IncidentHandleRequest body) { - return updateGlobalIncidentHandleWithHttpInfoAsync( - body, new UpdateGlobalIncidentHandleOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Update global incident handle. + * Update an incident impact field. * - *

See {@link #updateGlobalIncidentHandleWithHttpInfo}. + *

See {@link #updateIncidentImpactFieldWithHttpInfo}. * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return IncidentHandleResponse + * @param fieldId The UUID of the impact field. (required) + * @param body Impact field update payload. (required) + * @return IncidentImpactFieldResponse * @throws ApiException if fails to make API call */ - public IncidentHandleResponse updateGlobalIncidentHandle( - IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) - throws ApiException { - return updateGlobalIncidentHandleWithHttpInfo(body, parameters).getData(); + public IncidentImpactFieldResponse updateIncidentImpactField( + UUID fieldId, IncidentImpactFieldRequest body) throws ApiException { + return updateIncidentImpactFieldWithHttpInfo(fieldId, body).getData(); } /** - * Update global incident handle. + * Update an incident impact field. * - *

See {@link #updateGlobalIncidentHandleWithHttpInfoAsync}. + *

See {@link #updateIncidentImpactFieldWithHttpInfoAsync}. * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentHandleResponse> + * @param fieldId The UUID of the impact field. (required) + * @param body Impact field update payload. (required) + * @return CompletableFuture<IncidentImpactFieldResponse> */ - public CompletableFuture updateGlobalIncidentHandleAsync( - IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) { - return updateGlobalIncidentHandleWithHttpInfoAsync(body, parameters) + public CompletableFuture updateIncidentImpactFieldAsync( + UUID fieldId, IncidentImpactFieldRequest body) { + return updateIncidentImpactFieldWithHttpInfoAsync(fieldId, body) .thenApply( response -> { return response.getData(); @@ -8800,11 +15828,11 @@ public CompletableFuture updateGlobalIncidentHandleAsync } /** - * Update an existing global incident handle. + * Update an impact field for incidents. * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentHandleResponse> + * @param fieldId The UUID of the impact field. (required) + * @param body Impact field update payload. (required) + * @return ApiResponse<IncidentImpactFieldResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -8812,14 +15840,16 @@ public CompletableFuture updateGlobalIncidentHandleAsync * * * + * + * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse updateGlobalIncidentHandleWithHttpInfo( - IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) - throws ApiException { + public ApiResponse updateIncidentImpactFieldWithHttpInfo( + UUID fieldId, IncidentImpactFieldRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateGlobalIncidentHandle"; + String operationId = "updateIncidentImpactField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8827,29 +15857,33 @@ public ApiResponse updateGlobalIncidentHandleWithHttpInf } Object localVarPostBody = body; + // verify the required parameter 'fieldId' is set + if (fieldId == null) { + throw new ApiException( + 400, "Missing the required parameter 'fieldId' when calling updateIncidentImpactField"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateGlobalIncidentHandle"); + 400, "Missing the required parameter 'body' when calling updateIncidentImpactField"); } - String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/config/impact-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateGlobalIncidentHandle", + "v2.IncidentsApi.updateIncidentImpactField", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "PUT", builder, @@ -8858,64 +15892,74 @@ public ApiResponse updateGlobalIncidentHandleWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update global incident handle. + * Update an incident impact field. * - *

See {@link #updateGlobalIncidentHandleWithHttpInfo}. + *

See {@link #updateIncidentImpactFieldWithHttpInfo}. * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentHandleResponse>> + * @param fieldId The UUID of the impact field. (required) + * @param body Impact field update payload. (required) + * @return CompletableFuture<ApiResponse<IncidentImpactFieldResponse>> */ - public CompletableFuture> - updateGlobalIncidentHandleWithHttpInfoAsync( - IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) { + public CompletableFuture> + updateIncidentImpactFieldWithHttpInfoAsync(UUID fieldId, IncidentImpactFieldRequest body) { // Check if unstable operation is enabled - String operationId = "updateGlobalIncidentHandle"; + String operationId = "updateIncidentImpactField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; + // verify the required parameter 'fieldId' is set + if (fieldId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'fieldId' when calling updateIncidentImpactField")); + return result; + } + // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling updateGlobalIncidentHandle")); + 400, "Missing the required parameter 'body' when calling updateIncidentImpactField")); return result; } - String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/config/impact-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateGlobalIncidentHandle", + "v2.IncidentsApi.updateIncidentImpactField", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -8927,34 +15971,41 @@ public ApiResponse updateGlobalIncidentHandleWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update global incident settings. + * Update an existing incident integration metadata. * - *

See {@link #updateGlobalIncidentSettingsWithHttpInfo}. + *

See {@link #updateIncidentIntegrationWithHttpInfo}. * - * @param body (required) - * @return GlobalIncidentSettingsResponse + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @param body Incident integration metadata payload. (required) + * @return IncidentIntegrationMetadataResponse * @throws ApiException if fails to make API call */ - public GlobalIncidentSettingsResponse updateGlobalIncidentSettings( - GlobalIncidentSettingsRequest body) throws ApiException { - return updateGlobalIncidentSettingsWithHttpInfo(body).getData(); + public IncidentIntegrationMetadataResponse updateIncidentIntegration( + String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) + throws ApiException { + return updateIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId, body).getData(); } /** - * Update global incident settings. + * Update an existing incident integration metadata. * - *

See {@link #updateGlobalIncidentSettingsWithHttpInfoAsync}. + *

See {@link #updateIncidentIntegrationWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<GlobalIncidentSettingsResponse> + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @param body Incident integration metadata payload. (required) + * @return CompletableFuture<IncidentIntegrationMetadataResponse> */ - public CompletableFuture updateGlobalIncidentSettingsAsync( - GlobalIncidentSettingsRequest body) { - return updateGlobalIncidentSettingsWithHttpInfoAsync(body) + public CompletableFuture updateIncidentIntegrationAsync( + String incidentId, + String integrationMetadataId, + IncidentIntegrationMetadataPatchRequest body) { + return updateIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId, body) .thenApply( response -> { return response.getData(); @@ -8962,10 +16013,12 @@ public CompletableFuture updateGlobalIncidentSet } /** - * Update global incident settings for the organization. + * Update an existing incident integration metadata. * - * @param body (required) - * @return ApiResponse<GlobalIncidentSettingsResponse> + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @param body Incident integration metadata payload. (required) + * @return ApiResponse<IncidentIntegrationMetadataResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -8973,13 +16026,17 @@ public CompletableFuture updateGlobalIncidentSet * * * + * + * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse updateGlobalIncidentSettingsWithHttpInfo( - GlobalIncidentSettingsRequest body) throws ApiException { + public ApiResponse updateIncidentIntegrationWithHttpInfo( + String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateGlobalIncidentSettings"; + String operationId = "updateIncidentIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8987,25 +16044,46 @@ public ApiResponse updateGlobalIncidentSettingsW } Object localVarPostBody = body; + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling updateIncidentIntegration"); + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integrationMetadataId' when calling" + + " updateIncidentIntegration"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateGlobalIncidentSettings"); + 400, "Missing the required parameter 'body' when calling updateIncidentIntegration"); } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/settings"; + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "integration_metadata_id" + "\\}", + apiClient.escapeString(integrationMetadataId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateGlobalIncidentSettings", + "v2.IncidentsApi.updateIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "PATCH", builder, @@ -9014,44 +16092,78 @@ public ApiResponse updateGlobalIncidentSettingsW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update global incident settings. + * Update an existing incident integration metadata. * - *

See {@link #updateGlobalIncidentSettingsWithHttpInfo}. + *

See {@link #updateIncidentIntegrationWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<GlobalIncidentSettingsResponse>> + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @param body Incident integration metadata payload. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> */ - public CompletableFuture> - updateGlobalIncidentSettingsWithHttpInfoAsync(GlobalIncidentSettingsRequest body) { + public CompletableFuture> + updateIncidentIntegrationWithHttpInfoAsync( + String incidentId, + String integrationMetadataId, + IncidentIntegrationMetadataPatchRequest body) { // Check if unstable operation is enabled - String operationId = "updateGlobalIncidentSettings"; + String operationId = "updateIncidentIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling" + + " updateIncidentIntegration")); + return result; + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integrationMetadataId' when calling" + + " updateIncidentIntegration")); return result; } - Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling updateGlobalIncidentSettings")); + 400, "Missing the required parameter 'body' when calling updateIncidentIntegration")); return result; } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/settings"; + String localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "integration_metadata_id" + "\\}", + apiClient.escapeString(integrationMetadataId.toString())); Map localVarHeaderParams = new HashMap(); @@ -9059,15 +16171,15 @@ public ApiResponse updateGlobalIncidentSettingsW try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateGlobalIncidentSettings", + "v2.IncidentsApi.updateIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -9080,54 +16192,57 @@ public ApiResponse updateGlobalIncidentSettingsW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to updateIncident. */ - public static class UpdateIncidentOptionalParameters { - private List include; + /** Manage optional parameters to updateIncidentNotificationRule. */ + public static class UpdateIncidentNotificationRuleOptionalParameters { + private String include; /** * Set include. * - * @param include Specifies which types of related objects should be included in the response. - * (optional) - * @return UpdateIncidentOptionalParameters + * @param include Comma-separated list of resources to include. Supported values: + * created_by_user, last_modified_by_user, incident_type, + * notification_template (optional) + * @return UpdateIncidentNotificationRuleOptionalParameters */ - public UpdateIncidentOptionalParameters include(List include) { + public UpdateIncidentNotificationRuleOptionalParameters include(String include) { this.include = include; return this; } } /** - * Update an existing incident. + * Update an incident notification rule. * - *

See {@link #updateIncidentWithHttpInfo}. + *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) - * @return IncidentResponse + * @param id The ID of the notification rule. (required) + * @param body (required) + * @return IncidentNotificationRule * @throws ApiException if fails to make API call */ - public IncidentResponse updateIncident(String incidentId, IncidentUpdateRequest body) - throws ApiException { - return updateIncidentWithHttpInfo(incidentId, body, new UpdateIncidentOptionalParameters()) + public IncidentNotificationRule updateIncidentNotificationRule( + UUID id, PutIncidentNotificationRuleRequest body) throws ApiException { + return updateIncidentNotificationRuleWithHttpInfo( + id, body, new UpdateIncidentNotificationRuleOptionalParameters()) .getData(); } /** - * Update an existing incident. + * Update an incident notification rule. * - *

See {@link #updateIncidentWithHttpInfoAsync}. + *

See {@link #updateIncidentNotificationRuleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) - * @return CompletableFuture<IncidentResponse> + * @param id The ID of the notification rule. (required) + * @param body (required) + * @return CompletableFuture<IncidentNotificationRule> */ - public CompletableFuture updateIncidentAsync( - String incidentId, IncidentUpdateRequest body) { - return updateIncidentWithHttpInfoAsync(incidentId, body, new UpdateIncidentOptionalParameters()) + public CompletableFuture updateIncidentNotificationRuleAsync( + UUID id, PutIncidentNotificationRuleRequest body) { + return updateIncidentNotificationRuleWithHttpInfoAsync( + id, body, new UpdateIncidentNotificationRuleOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -9135,35 +16250,39 @@ public CompletableFuture updateIncidentAsync( } /** - * Update an existing incident. + * Update an incident notification rule. * - *

See {@link #updateIncidentWithHttpInfo}. + *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) + * @param id The ID of the notification rule. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return IncidentResponse + * @return IncidentNotificationRule * @throws ApiException if fails to make API call */ - public IncidentResponse updateIncident( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) + public IncidentNotificationRule updateIncidentNotificationRule( + UUID id, + PutIncidentNotificationRuleRequest body, + UpdateIncidentNotificationRuleOptionalParameters parameters) throws ApiException { - return updateIncidentWithHttpInfo(incidentId, body, parameters).getData(); + return updateIncidentNotificationRuleWithHttpInfo(id, body, parameters).getData(); } /** - * Update an existing incident. + * Update an incident notification rule. * - *

See {@link #updateIncidentWithHttpInfoAsync}. + *

See {@link #updateIncidentNotificationRuleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) + * @param id The ID of the notification rule. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentResponse> + * @return CompletableFuture<IncidentNotificationRule> */ - public CompletableFuture updateIncidentAsync( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { - return updateIncidentWithHttpInfoAsync(incidentId, body, parameters) + public CompletableFuture updateIncidentNotificationRuleAsync( + UUID id, + PutIncidentNotificationRuleRequest body, + UpdateIncidentNotificationRuleOptionalParameters parameters) { + return updateIncidentNotificationRuleWithHttpInfoAsync(id, body, parameters) .thenApply( response -> { return response.getData(); @@ -9171,13 +16290,12 @@ public CompletableFuture updateIncidentAsync( } /** - * Updates an incident. Provide only the attributes that should be updated as this request is a - * partial update. + * Updates an existing notification rule with a complete replacement. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) + * @param id The ID of the notification rule. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentResponse> + * @return ApiResponse<IncidentNotificationRule> * @throws ApiException if fails to make API call * @http.response.details * @@ -9191,11 +16309,13 @@ public CompletableFuture updateIncidentAsync( * *
429 Too many requests -
*/ - public ApiResponse updateIncidentWithHttpInfo( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) + public ApiResponse updateIncidentNotificationRuleWithHttpInfo( + UUID id, + PutIncidentNotificationRuleRequest body, + UpdateIncidentNotificationRuleOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncident"; + String operationId = "updateIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9203,32 +16323,31 @@ public ApiResponse updateIncidentWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { + // verify the required parameter 'id' is set + if (id == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling updateIncident"); + 400, "Missing the required parameter 'id' when calling updateIncidentNotificationRule"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncident"); + 400, "Missing the required parameter 'body' when calling updateIncidentNotificationRule"); } - List include = parameters.include; + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "/api/v2/incidents/config/notification-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncident", + "v2.IncidentsApi.updateIncidentNotificationRule", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -9236,74 +16355,78 @@ public ApiResponse updateIncidentWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an existing incident. + * Update an incident notification rule. * - *

See {@link #updateIncidentWithHttpInfo}. + *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) + * @param id The ID of the notification rule. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentResponse>> + * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> */ - public CompletableFuture> updateIncidentWithHttpInfoAsync( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { + public CompletableFuture> + updateIncidentNotificationRuleWithHttpInfoAsync( + UUID id, + PutIncidentNotificationRuleRequest body, + UpdateIncidentNotificationRuleOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateIncident"; + String operationId = "updateIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentId' when calling updateIncident")); + 400, + "Missing the required parameter 'id' when calling updateIncidentNotificationRule")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncident")); + 400, + "Missing the required parameter 'body' when calling updateIncidentNotificationRule")); return result; } - List include = parameters.include; + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "/api/v2/incidents/config/notification-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncident", + "v2.IncidentsApi.updateIncidentNotificationRule", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -9311,70 +16434,69 @@ public CompletableFuture> updateIncidentWithHttpIn new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to updateIncidentAttachment. */ - public static class UpdateIncidentAttachmentOptionalParameters { + /** Manage optional parameters to updateIncidentNotificationTemplate. */ + public static class UpdateIncidentNotificationTemplateOptionalParameters { private String include; /** * Set include. * - * @param include Resource to include in the response. Supported value: - * last_modified_by_user. (optional) - * @return UpdateIncidentAttachmentOptionalParameters + * @param include Comma-separated list of relationships to include. Supported values: + * created_by_user, last_modified_by_user, incident_type + * (optional) + * @return UpdateIncidentNotificationTemplateOptionalParameters */ - public UpdateIncidentAttachmentOptionalParameters include(String include) { + public UpdateIncidentNotificationTemplateOptionalParameters include(String include) { this.include = include; return this; } } /** - * Update incident attachment. + * Update incident notification template. * - *

See {@link #updateIncidentAttachmentWithHttpInfo}. + *

See {@link #updateIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param id The ID of the notification template. (required) * @param body (required) - * @return Attachment + * @return IncidentNotificationTemplate * @throws ApiException if fails to make API call */ - public Attachment updateIncidentAttachment( - String incidentId, String attachmentId, PatchAttachmentRequest body) throws ApiException { - return updateIncidentAttachmentWithHttpInfo( - incidentId, attachmentId, body, new UpdateIncidentAttachmentOptionalParameters()) + public IncidentNotificationTemplate updateIncidentNotificationTemplate( + UUID id, PatchIncidentNotificationTemplateRequest body) throws ApiException { + return updateIncidentNotificationTemplateWithHttpInfo( + id, body, new UpdateIncidentNotificationTemplateOptionalParameters()) .getData(); } /** - * Update incident attachment. + * Update incident notification template. * - *

See {@link #updateIncidentAttachmentWithHttpInfoAsync}. + *

See {@link #updateIncidentNotificationTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param id The ID of the notification template. (required) * @param body (required) - * @return CompletableFuture<Attachment> + * @return CompletableFuture<IncidentNotificationTemplate> */ - public CompletableFuture updateIncidentAttachmentAsync( - String incidentId, String attachmentId, PatchAttachmentRequest body) { - return updateIncidentAttachmentWithHttpInfoAsync( - incidentId, attachmentId, body, new UpdateIncidentAttachmentOptionalParameters()) + public CompletableFuture updateIncidentNotificationTemplateAsync( + UUID id, PatchIncidentNotificationTemplateRequest body) { + return updateIncidentNotificationTemplateWithHttpInfoAsync( + id, body, new UpdateIncidentNotificationTemplateOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -9382,44 +16504,39 @@ incidentId, attachmentId, body, new UpdateIncidentAttachmentOptionalParameters() } /** - * Update incident attachment. + * Update incident notification template. * - *

See {@link #updateIncidentAttachmentWithHttpInfo}. + *

See {@link #updateIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param id The ID of the notification template. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return Attachment + * @return IncidentNotificationTemplate * @throws ApiException if fails to make API call */ - public Attachment updateIncidentAttachment( - String incidentId, - String attachmentId, - PatchAttachmentRequest body, - UpdateIncidentAttachmentOptionalParameters parameters) + public IncidentNotificationTemplate updateIncidentNotificationTemplate( + UUID id, + PatchIncidentNotificationTemplateRequest body, + UpdateIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { - return updateIncidentAttachmentWithHttpInfo(incidentId, attachmentId, body, parameters) - .getData(); + return updateIncidentNotificationTemplateWithHttpInfo(id, body, parameters).getData(); } /** - * Update incident attachment. + * Update incident notification template. * - *

See {@link #updateIncidentAttachmentWithHttpInfoAsync}. + *

See {@link #updateIncidentNotificationTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param id The ID of the notification template. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<Attachment> + * @return CompletableFuture<IncidentNotificationTemplate> */ - public CompletableFuture updateIncidentAttachmentAsync( - String incidentId, - String attachmentId, - PatchAttachmentRequest body, - UpdateIncidentAttachmentOptionalParameters parameters) { - return updateIncidentAttachmentWithHttpInfoAsync(incidentId, attachmentId, body, parameters) + public CompletableFuture updateIncidentNotificationTemplateAsync( + UUID id, + PatchIncidentNotificationTemplateRequest body, + UpdateIncidentNotificationTemplateOptionalParameters parameters) { + return updateIncidentNotificationTemplateWithHttpInfoAsync(id, body, parameters) .thenApply( response -> { return response.getData(); @@ -9427,11 +16544,12 @@ public CompletableFuture updateIncidentAttachmentAsync( } /** - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * Updates an existing notification template's attributes. + * + * @param id The ID of the notification template. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<Attachment> + * @return ApiResponse<IncidentNotificationTemplate> * @throws ApiException if fails to make API call * @http.response.details * @@ -9439,19 +16557,19 @@ public CompletableFuture updateIncidentAttachmentAsync( * * * + * * * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse updateIncidentAttachmentWithHttpInfo( - String incidentId, - String attachmentId, - PatchAttachmentRequest body, - UpdateIncidentAttachmentOptionalParameters parameters) + public ApiResponse updateIncidentNotificationTemplateWithHttpInfo( + UUID id, + PatchIncidentNotificationTemplateRequest body, + UpdateIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentAttachment"; + String operationId = "updateIncidentNotificationTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9459,32 +16577,24 @@ public ApiResponse updateIncidentAttachmentWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling updateIncidentAttachment"); - } - - // verify the required parameter 'attachmentId' is set - if (attachmentId == null) { + // verify the required parameter 'id' is set + if (id == null) { throw new ApiException( 400, - "Missing the required parameter 'attachmentId' when calling updateIncidentAttachment"); + "Missing the required parameter 'id' when calling updateIncidentNotificationTemplate"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentAttachment"); + 400, + "Missing the required parameter 'body' when calling updateIncidentNotificationTemplate"); } String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll( - "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + "/api/v2/incidents/config/notification-templates/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -9493,7 +16603,7 @@ public ApiResponse updateIncidentAttachmentWithHttpInfo( Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentAttachment", + "v2.IncidentsApi.updateIncidentNotificationTemplate", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -9508,74 +16618,65 @@ public ApiResponse updateIncidentAttachmentWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update incident attachment. + * Update incident notification template. * - *

See {@link #updateIncidentAttachmentWithHttpInfo}. + *

See {@link #updateIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param id The ID of the notification template. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<Attachment>> + * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> */ - public CompletableFuture> updateIncidentAttachmentWithHttpInfoAsync( - String incidentId, - String attachmentId, - PatchAttachmentRequest body, - UpdateIncidentAttachmentOptionalParameters parameters) { + public CompletableFuture> + updateIncidentNotificationTemplateWithHttpInfoAsync( + UUID id, + PatchIncidentNotificationTemplateRequest body, + UpdateIncidentNotificationTemplateOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateIncidentAttachment"; + String operationId = "updateIncidentNotificationTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling updateIncidentAttachment")); - return result; - } - - // verify the required parameter 'attachmentId' is set - if (attachmentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'attachmentId' when calling" - + " updateIncidentAttachment")); + "Missing the required parameter 'id' when calling" + + " updateIncidentNotificationTemplate")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentAttachment")); + 400, + "Missing the required parameter 'body' when calling" + + " updateIncidentNotificationTemplate")); return result; } String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll( - "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + "/api/v2/incidents/config/notification-templates/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -9586,7 +16687,7 @@ public CompletableFuture> updateIncidentAttachmentWithHt try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentAttachment", + "v2.IncidentsApi.updateIncidentNotificationTemplate", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -9594,7 +16695,8 @@ public CompletableFuture> updateIncidentAttachmentWithHt new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -9606,41 +16708,36 @@ public CompletableFuture> updateIncidentAttachmentWithHt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an existing incident integration metadata. + * Update postmortem template. * - *

See {@link #updateIncidentIntegrationWithHttpInfo}. + *

See {@link #updateIncidentPostmortemTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @param body Incident integration metadata payload. (required) - * @return IncidentIntegrationMetadataResponse + * @param templateId The ID of the postmortem template (required) + * @param body (required) + * @return PostmortemTemplateResponse * @throws ApiException if fails to make API call */ - public IncidentIntegrationMetadataResponse updateIncidentIntegration( - String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) - throws ApiException { - return updateIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId, body).getData(); + public PostmortemTemplateResponse updateIncidentPostmortemTemplate( + String templateId, PostmortemTemplateRequest body) throws ApiException { + return updateIncidentPostmortemTemplateWithHttpInfo(templateId, body).getData(); } /** - * Update an existing incident integration metadata. + * Update postmortem template. * - *

See {@link #updateIncidentIntegrationWithHttpInfoAsync}. + *

See {@link #updateIncidentPostmortemTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @param body Incident integration metadata payload. (required) - * @return CompletableFuture<IncidentIntegrationMetadataResponse> + * @param templateId The ID of the postmortem template (required) + * @param body (required) + * @return CompletableFuture<PostmortemTemplateResponse> */ - public CompletableFuture updateIncidentIntegrationAsync( - String incidentId, - String integrationMetadataId, - IncidentIntegrationMetadataPatchRequest body) { - return updateIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId, body) + public CompletableFuture updateIncidentPostmortemTemplateAsync( + String templateId, PostmortemTemplateRequest body) { + return updateIncidentPostmortemTemplateWithHttpInfoAsync(templateId, body) .thenApply( response -> { return response.getData(); @@ -9648,12 +16745,11 @@ public CompletableFuture updateIncidentInte } /** - * Update an existing incident integration metadata. + * Update an existing postmortem template. * - * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @param body Incident integration metadata payload. (required) - * @return ApiResponse<IncidentIntegrationMetadataResponse> + * @param templateId The ID of the postmortem template (required) + * @param body (required) + * @return ApiResponse<PostmortemTemplateResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -9661,17 +16757,14 @@ public CompletableFuture updateIncidentInte * * * - * - * * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse updateIncidentIntegrationWithHttpInfo( - String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) - throws ApiException { + public ApiResponse updateIncidentPostmortemTemplateWithHttpInfo( + String templateId, PostmortemTemplateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentIntegration"; + String operationId = "updateIncidentPostmortemTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9679,46 +16772,37 @@ public ApiResponse updateIncidentIntegratio } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling updateIncidentIntegration"); - } - - // verify the required parameter 'integrationMetadataId' is set - if (integrationMetadataId == null) { + // verify the required parameter 'templateId' is set + if (templateId == null) { throw new ApiException( 400, - "Missing the required parameter 'integrationMetadataId' when calling" - + " updateIncidentIntegration"); + "Missing the required parameter 'templateId' when calling" + + " updateIncidentPostmortemTemplate"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentIntegration"); + 400, + "Missing the required parameter 'body' when calling updateIncidentPostmortemTemplate"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + "/api/v2/incidents/config/postmortem-templates/{template_id}" .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentIntegration", + "v2.IncidentsApi.updateIncidentPostmortemTemplate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( "PATCH", builder, @@ -9727,78 +16811,59 @@ public ApiResponse updateIncidentIntegratio localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an existing incident integration metadata. + * Update postmortem template. * - *

See {@link #updateIncidentIntegrationWithHttpInfo}. + *

See {@link #updateIncidentPostmortemTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @param body Incident integration metadata payload. (required) - * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> + * @param templateId The ID of the postmortem template (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<PostmortemTemplateResponse>> */ - public CompletableFuture> - updateIncidentIntegrationWithHttpInfoAsync( - String incidentId, - String integrationMetadataId, - IncidentIntegrationMetadataPatchRequest body) { + public CompletableFuture> + updateIncidentPostmortemTemplateWithHttpInfoAsync( + String templateId, PostmortemTemplateRequest body) { // Check if unstable operation is enabled - String operationId = "updateIncidentIntegration"; + String operationId = "updateIncidentPostmortemTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling" - + " updateIncidentIntegration")); - return result; - } - - // verify the required parameter 'integrationMetadataId' is set - if (integrationMetadataId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'templateId' is set + if (templateId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'integrationMetadataId' when calling" - + " updateIncidentIntegration")); + "Missing the required parameter 'templateId' when calling" + + " updateIncidentPostmortemTemplate")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentIntegration")); + 400, + "Missing the required parameter 'body' when calling" + + " updateIncidentPostmortemTemplate")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + "/api/v2/incidents/config/postmortem-templates/{template_id}" .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); Map localVarHeaderParams = new HashMap(); @@ -9806,16 +16871,15 @@ public ApiResponse updateIncidentIntegratio try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentIntegration", + "v2.IncidentsApi.updateIncidentPostmortemTemplate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -9827,97 +16891,36 @@ public ApiResponse updateIncidentIntegratio localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to updateIncidentNotificationRule. */ - public static class UpdateIncidentNotificationRuleOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of resources to include. Supported values: - * created_by_user, last_modified_by_user, incident_type, - * notification_template (optional) - * @return UpdateIncidentNotificationRuleOptionalParameters - */ - public UpdateIncidentNotificationRuleOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * Update an incident notification rule. - * - *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. - * - * @param id The ID of the notification rule. (required) - * @param body (required) - * @return IncidentNotificationRule - * @throws ApiException if fails to make API call - */ - public IncidentNotificationRule updateIncidentNotificationRule( - UUID id, PutIncidentNotificationRuleRequest body) throws ApiException { - return updateIncidentNotificationRuleWithHttpInfo( - id, body, new UpdateIncidentNotificationRuleOptionalParameters()) - .getData(); - } - - /** - * Update an incident notification rule. - * - *

See {@link #updateIncidentNotificationRuleWithHttpInfoAsync}. - * - * @param id The ID of the notification rule. (required) - * @param body (required) - * @return CompletableFuture<IncidentNotificationRule> - */ - public CompletableFuture updateIncidentNotificationRuleAsync( - UUID id, PutIncidentNotificationRuleRequest body) { - return updateIncidentNotificationRuleWithHttpInfoAsync( - id, body, new UpdateIncidentNotificationRuleOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Update an incident notification rule. + * Update an incident rule. * - *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. + *

See {@link #updateIncidentRuleWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @param body (required) - * @param parameters Optional parameters for the request. - * @return IncidentNotificationRule + * @param ruleId The UUID of the incident rule. (required) + * @param body Incident rule patch payload. (required) + * @return IncidentRuleResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationRule updateIncidentNotificationRule( - UUID id, - PutIncidentNotificationRuleRequest body, - UpdateIncidentNotificationRuleOptionalParameters parameters) + public IncidentRuleResponse updateIncidentRule(UUID ruleId, IncidentRulePatchRequest body) throws ApiException { - return updateIncidentNotificationRuleWithHttpInfo(id, body, parameters).getData(); + return updateIncidentRuleWithHttpInfo(ruleId, body).getData(); } /** - * Update an incident notification rule. + * Update an incident rule. * - *

See {@link #updateIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #updateIncidentRuleWithHttpInfoAsync}. * - * @param id The ID of the notification rule. (required) - * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationRule> + * @param ruleId The UUID of the incident rule. (required) + * @param body Incident rule patch payload. (required) + * @return CompletableFuture<IncidentRuleResponse> */ - public CompletableFuture updateIncidentNotificationRuleAsync( - UUID id, - PutIncidentNotificationRuleRequest body, - UpdateIncidentNotificationRuleOptionalParameters parameters) { - return updateIncidentNotificationRuleWithHttpInfoAsync(id, body, parameters) + public CompletableFuture updateIncidentRuleAsync( + UUID ruleId, IncidentRulePatchRequest body) { + return updateIncidentRuleWithHttpInfoAsync(ruleId, body) .thenApply( response -> { return response.getData(); @@ -9925,12 +16928,11 @@ public CompletableFuture updateIncidentNotificationRul } /** - * Updates an existing notification rule with a complete replacement. + * Update an incident rule. * - * @param id The ID of the notification rule. (required) - * @param body (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationRule> + * @param ruleId The UUID of the incident rule. (required) + * @param body Incident rule patch payload. (required) + * @return ApiResponse<IncidentRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -9944,13 +16946,10 @@ public CompletableFuture updateIncidentNotificationRul * *
429 Too many requests -
*/ - public ApiResponse updateIncidentNotificationRuleWithHttpInfo( - UUID id, - PutIncidentNotificationRuleRequest body, - UpdateIncidentNotificationRuleOptionalParameters parameters) - throws ApiException { + public ApiResponse updateIncidentRuleWithHttpInfo( + UUID ruleId, IncidentRulePatchRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentNotificationRule"; + String operationId = "updateIncidentRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9958,220 +16957,147 @@ public ApiResponse updateIncidentNotificationRuleWithH } Object localVarPostBody = body; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( - 400, "Missing the required parameter 'id' when calling updateIncidentNotificationRule"); + 400, "Missing the required parameter 'ruleId' when calling updateIncidentRule"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentNotificationRule"); + 400, "Missing the required parameter 'body' when calling updateIncidentRule"); } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentNotificationRule", + "v2.IncidentsApi.updateIncidentRule", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an incident notification rule. + * Update an incident rule. * - *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. + *

See {@link #updateIncidentRuleWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> + * @param ruleId The UUID of the incident rule. (required) + * @param body Incident rule patch payload. (required) + * @return CompletableFuture<ApiResponse<IncidentRuleResponse>> */ - public CompletableFuture> - updateIncidentNotificationRuleWithHttpInfoAsync( - UUID id, - PutIncidentNotificationRuleRequest body, - UpdateIncidentNotificationRuleOptionalParameters parameters) { + public CompletableFuture> updateIncidentRuleWithHttpInfoAsync( + UUID ruleId, IncidentRulePatchRequest body) { // Check if unstable operation is enabled - String operationId = "updateIncidentNotificationRule"; + String operationId = "updateIncidentRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'id' when calling updateIncidentNotificationRule")); + 400, "Missing the required parameter 'ruleId' when calling updateIncidentRule")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling updateIncidentNotificationRule")); + 400, "Missing the required parameter 'body' when calling updateIncidentRule")); return result; } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentNotificationRule", + "v2.IncidentsApi.updateIncidentRule", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to updateIncidentNotificationTemplate. */ - public static class UpdateIncidentNotificationTemplateOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of relationships to include. Supported values: - * created_by_user, last_modified_by_user, incident_type - * (optional) - * @return UpdateIncidentNotificationTemplateOptionalParameters - */ - public UpdateIncidentNotificationTemplateOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * Update incident notification template. - * - *

See {@link #updateIncidentNotificationTemplateWithHttpInfo}. - * - * @param id The ID of the notification template. (required) - * @param body (required) - * @return IncidentNotificationTemplate - * @throws ApiException if fails to make API call - */ - public IncidentNotificationTemplate updateIncidentNotificationTemplate( - UUID id, PatchIncidentNotificationTemplateRequest body) throws ApiException { - return updateIncidentNotificationTemplateWithHttpInfo( - id, body, new UpdateIncidentNotificationTemplateOptionalParameters()) - .getData(); - } - - /** - * Update incident notification template. - * - *

See {@link #updateIncidentNotificationTemplateWithHttpInfoAsync}. - * - * @param id The ID of the notification template. (required) - * @param body (required) - * @return CompletableFuture<IncidentNotificationTemplate> - */ - public CompletableFuture updateIncidentNotificationTemplateAsync( - UUID id, PatchIncidentNotificationTemplateRequest body) { - return updateIncidentNotificationTemplateWithHttpInfoAsync( - id, body, new UpdateIncidentNotificationTemplateOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Update incident notification template. + * Update an incident todo. * - *

See {@link #updateIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #updateIncidentTodoWithHttpInfo}. * - * @param id The ID of the notification template. (required) - * @param body (required) - * @param parameters Optional parameters for the request. - * @return IncidentNotificationTemplate + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @param body Incident todo payload. (required) + * @return IncidentTodoResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationTemplate updateIncidentNotificationTemplate( - UUID id, - PatchIncidentNotificationTemplateRequest body, - UpdateIncidentNotificationTemplateOptionalParameters parameters) - throws ApiException { - return updateIncidentNotificationTemplateWithHttpInfo(id, body, parameters).getData(); + public IncidentTodoResponse updateIncidentTodo( + String incidentId, String todoId, IncidentTodoPatchRequest body) throws ApiException { + return updateIncidentTodoWithHttpInfo(incidentId, todoId, body).getData(); } /** - * Update incident notification template. + * Update an incident todo. * - *

See {@link #updateIncidentNotificationTemplateWithHttpInfoAsync}. + *

See {@link #updateIncidentTodoWithHttpInfoAsync}. * - * @param id The ID of the notification template. (required) - * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationTemplate> + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @param body Incident todo payload. (required) + * @return CompletableFuture<IncidentTodoResponse> */ - public CompletableFuture updateIncidentNotificationTemplateAsync( - UUID id, - PatchIncidentNotificationTemplateRequest body, - UpdateIncidentNotificationTemplateOptionalParameters parameters) { - return updateIncidentNotificationTemplateWithHttpInfoAsync(id, body, parameters) + public CompletableFuture updateIncidentTodoAsync( + String incidentId, String todoId, IncidentTodoPatchRequest body) { + return updateIncidentTodoWithHttpInfoAsync(incidentId, todoId, body) .thenApply( response -> { return response.getData(); @@ -10179,12 +17105,12 @@ public CompletableFuture updateIncidentNotificatio } /** - * Updates an existing notification template's attributes. + * Update an incident todo. * - * @param id The ID of the notification template. (required) - * @param body (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationTemplate> + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @param body Incident todo payload. (required) + * @return ApiResponse<IncidentTodoResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10198,13 +17124,10 @@ public CompletableFuture updateIncidentNotificatio * *
429 Too many requests -
*/ - public ApiResponse updateIncidentNotificationTemplateWithHttpInfo( - UUID id, - PatchIncidentNotificationTemplateRequest body, - UpdateIncidentNotificationTemplateOptionalParameters parameters) - throws ApiException { + public ApiResponse updateIncidentTodoWithHttpInfo( + String incidentId, String todoId, IncidentTodoPatchRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentNotificationTemplate"; + String operationId = "updateIncidentTodo"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10212,35 +17135,37 @@ public ApiResponse updateIncidentNotificationTempl } Object localVarPostBody = body; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'incidentId' is set + if (incidentId == null) { throw new ApiException( - 400, - "Missing the required parameter 'id' when calling updateIncidentNotificationTemplate"); + 400, "Missing the required parameter 'incidentId' when calling updateIncidentTodo"); + } + + // verify the required parameter 'todoId' is set + if (todoId == null) { + throw new ApiException( + 400, "Missing the required parameter 'todoId' when calling updateIncidentTodo"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling updateIncidentNotificationTemplate"); + 400, "Missing the required parameter 'body' when calling updateIncidentTodo"); } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-templates/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentNotificationTemplate", + "v2.IncidentsApi.updateIncidentTodo", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -10253,85 +17178,81 @@ public ApiResponse updateIncidentNotificationTempl localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update incident notification template. + * Update an incident todo. * - *

See {@link #updateIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #updateIncidentTodoWithHttpInfo}. * - * @param id The ID of the notification template. (required) - * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @param body Incident todo payload. (required) + * @return CompletableFuture<ApiResponse<IncidentTodoResponse>> */ - public CompletableFuture> - updateIncidentNotificationTemplateWithHttpInfoAsync( - UUID id, - PatchIncidentNotificationTemplateRequest body, - UpdateIncidentNotificationTemplateOptionalParameters parameters) { + public CompletableFuture> updateIncidentTodoWithHttpInfoAsync( + String incidentId, String todoId, IncidentTodoPatchRequest body) { // Check if unstable operation is enabled - String operationId = "updateIncidentNotificationTemplate"; + String operationId = "updateIncidentTodo"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'id' when calling" - + " updateIncidentNotificationTemplate")); + 400, "Missing the required parameter 'incidentId' when calling updateIncidentTodo")); + return result; + } + + // verify the required parameter 'todoId' is set + if (todoId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'todoId' when calling updateIncidentTodo")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " updateIncidentNotificationTemplate")); + 400, "Missing the required parameter 'body' when calling updateIncidentTodo")); return result; } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-templates/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentNotificationTemplate", + "v2.IncidentsApi.updateIncidentTodo", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -10343,36 +17264,36 @@ public ApiResponse updateIncidentNotificationTempl localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update postmortem template. + * Update an incident type. * - *

See {@link #updateIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #updateIncidentTypeWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) - * @param body (required) - * @return PostmortemTemplateResponse + * @param incidentTypeId The UUID of the incident type. (required) + * @param body Incident type payload. (required) + * @return IncidentTypeResponse * @throws ApiException if fails to make API call */ - public PostmortemTemplateResponse updateIncidentPostmortemTemplate( - String templateId, PostmortemTemplateRequest body) throws ApiException { - return updateIncidentPostmortemTemplateWithHttpInfo(templateId, body).getData(); + public IncidentTypeResponse updateIncidentType( + String incidentTypeId, IncidentTypePatchRequest body) throws ApiException { + return updateIncidentTypeWithHttpInfo(incidentTypeId, body).getData(); } /** - * Update postmortem template. + * Update an incident type. * - *

See {@link #updateIncidentPostmortemTemplateWithHttpInfoAsync}. + *

See {@link #updateIncidentTypeWithHttpInfoAsync}. * - * @param templateId The ID of the postmortem template (required) - * @param body (required) - * @return CompletableFuture<PostmortemTemplateResponse> + * @param incidentTypeId The UUID of the incident type. (required) + * @param body Incident type payload. (required) + * @return CompletableFuture<IncidentTypeResponse> */ - public CompletableFuture updateIncidentPostmortemTemplateAsync( - String templateId, PostmortemTemplateRequest body) { - return updateIncidentPostmortemTemplateWithHttpInfoAsync(templateId, body) + public CompletableFuture updateIncidentTypeAsync( + String incidentTypeId, IncidentTypePatchRequest body) { + return updateIncidentTypeWithHttpInfoAsync(incidentTypeId, body) .thenApply( response -> { return response.getData(); @@ -10380,11 +17301,11 @@ public CompletableFuture updateIncidentPostmortemTem } /** - * Update an existing postmortem template. + * Update an incident type. * - * @param templateId The ID of the postmortem template (required) - * @param body (required) - * @return ApiResponse<PostmortemTemplateResponse> + * @param incidentTypeId The UUID of the incident type. (required) + * @param body Incident type payload. (required) + * @return ApiResponse<IncidentTypeResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10392,14 +17313,16 @@ public CompletableFuture updateIncidentPostmortemTem * * * + * + * * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse updateIncidentPostmortemTemplateWithHttpInfo( - String templateId, PostmortemTemplateRequest body) throws ApiException { + public ApiResponse updateIncidentTypeWithHttpInfo( + String incidentTypeId, IncidentTypePatchRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentPostmortemTemplate"; + String operationId = "updateIncidentType"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10407,37 +17330,35 @@ public ApiResponse updateIncidentPostmortemTemplateW } Object localVarPostBody = body; - // verify the required parameter 'templateId' is set - if (templateId == null) { + // verify the required parameter 'incidentTypeId' is set + if (incidentTypeId == null) { throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling" - + " updateIncidentPostmortemTemplate"); + 400, "Missing the required parameter 'incidentTypeId' when calling updateIncidentType"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling updateIncidentPostmortemTemplate"); + 400, "Missing the required parameter 'body' when calling updateIncidentType"); } // create path and map variables String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" + "/api/v2/incidents/config/types/{incident_type_id}" .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + "\\{" + "incident_type_id" + "\\}", + apiClient.escapeString(incidentTypeId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentPostmortemTemplate", + "v2.IncidentsApi.updateIncidentType", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "PATCH", builder, @@ -10446,59 +17367,56 @@ public ApiResponse updateIncidentPostmortemTemplateW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update postmortem template. + * Update an incident type. * - *

See {@link #updateIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #updateIncidentTypeWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) - * @param body (required) - * @return CompletableFuture<ApiResponse<PostmortemTemplateResponse>> + * @param incidentTypeId The UUID of the incident type. (required) + * @param body Incident type payload. (required) + * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> */ - public CompletableFuture> - updateIncidentPostmortemTemplateWithHttpInfoAsync( - String templateId, PostmortemTemplateRequest body) { + public CompletableFuture> updateIncidentTypeWithHttpInfoAsync( + String incidentTypeId, IncidentTypePatchRequest body) { // Check if unstable operation is enabled - String operationId = "updateIncidentPostmortemTemplate"; + String operationId = "updateIncidentType"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'templateId' is set - if (templateId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'incidentTypeId' is set + if (incidentTypeId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'templateId' when calling" - + " updateIncidentPostmortemTemplate")); + 400, + "Missing the required parameter 'incidentTypeId' when calling updateIncidentType")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " updateIncidentPostmortemTemplate")); + 400, "Missing the required parameter 'body' when calling updateIncidentType")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" + "/api/v2/incidents/config/types/{incident_type_id}" .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + "\\{" + "incident_type_id" + "\\}", + apiClient.escapeString(incidentTypeId.toString())); Map localVarHeaderParams = new HashMap(); @@ -10506,15 +17424,15 @@ public ApiResponse updateIncidentPostmortemTemplateW try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentPostmortemTemplate", + "v2.IncidentsApi.updateIncidentType", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -10526,38 +17444,56 @@ public ApiResponse updateIncidentPostmortemTemplateW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to updateIncidentUserDefinedField. */ + public static class UpdateIncidentUserDefinedFieldOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include. Supported values are + * "last_modified_by_user", "created_by_user", and "incident_type". (optional) + * @return UpdateIncidentUserDefinedFieldOptionalParameters + */ + public UpdateIncidentUserDefinedFieldOptionalParameters include(String include) { + this.include = include; + return this; + } } /** - * Update an incident todo. + * Update an incident user-defined field. * - *

See {@link #updateIncidentTodoWithHttpInfo}. + *

See {@link #updateIncidentUserDefinedFieldWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @param body Incident todo payload. (required) - * @return IncidentTodoResponse + * @param fieldId The ID of the incident user-defined field. (required) + * @param body Incident user-defined field update payload. (required) + * @return IncidentUserDefinedFieldResponse * @throws ApiException if fails to make API call */ - public IncidentTodoResponse updateIncidentTodo( - String incidentId, String todoId, IncidentTodoPatchRequest body) throws ApiException { - return updateIncidentTodoWithHttpInfo(incidentId, todoId, body).getData(); + public IncidentUserDefinedFieldResponse updateIncidentUserDefinedField( + String fieldId, IncidentUserDefinedFieldUpdateRequest body) throws ApiException { + return updateIncidentUserDefinedFieldWithHttpInfo( + fieldId, body, new UpdateIncidentUserDefinedFieldOptionalParameters()) + .getData(); } /** - * Update an incident todo. + * Update an incident user-defined field. * - *

See {@link #updateIncidentTodoWithHttpInfoAsync}. + *

See {@link #updateIncidentUserDefinedFieldWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @param body Incident todo payload. (required) - * @return CompletableFuture<IncidentTodoResponse> + * @param fieldId The ID of the incident user-defined field. (required) + * @param body Incident user-defined field update payload. (required) + * @return CompletableFuture<IncidentUserDefinedFieldResponse> */ - public CompletableFuture updateIncidentTodoAsync( - String incidentId, String todoId, IncidentTodoPatchRequest body) { - return updateIncidentTodoWithHttpInfoAsync(incidentId, todoId, body) + public CompletableFuture updateIncidentUserDefinedFieldAsync( + String fieldId, IncidentUserDefinedFieldUpdateRequest body) { + return updateIncidentUserDefinedFieldWithHttpInfoAsync( + fieldId, body, new UpdateIncidentUserDefinedFieldOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -10565,12 +17501,52 @@ public CompletableFuture updateIncidentTodoAsync( } /** - * Update an incident todo. + * Update an incident user-defined field. * - * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @param body Incident todo payload. (required) - * @return ApiResponse<IncidentTodoResponse> + *

See {@link #updateIncidentUserDefinedFieldWithHttpInfo}. + * + * @param fieldId The ID of the incident user-defined field. (required) + * @param body Incident user-defined field update payload. (required) + * @param parameters Optional parameters for the request. + * @return IncidentUserDefinedFieldResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedFieldResponse updateIncidentUserDefinedField( + String fieldId, + IncidentUserDefinedFieldUpdateRequest body, + UpdateIncidentUserDefinedFieldOptionalParameters parameters) + throws ApiException { + return updateIncidentUserDefinedFieldWithHttpInfo(fieldId, body, parameters).getData(); + } + + /** + * Update an incident user-defined field. + * + *

See {@link #updateIncidentUserDefinedFieldWithHttpInfoAsync}. + * + * @param fieldId The ID of the incident user-defined field. (required) + * @param body Incident user-defined field update payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentUserDefinedFieldResponse> + */ + public CompletableFuture updateIncidentUserDefinedFieldAsync( + String fieldId, + IncidentUserDefinedFieldUpdateRequest body, + UpdateIncidentUserDefinedFieldOptionalParameters parameters) { + return updateIncidentUserDefinedFieldWithHttpInfoAsync(fieldId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an incident user-defined field. + * + * @param fieldId The ID of the incident user-defined field. (required) + * @param body Incident user-defined field update payload. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentUserDefinedFieldResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10584,10 +17560,13 @@ public CompletableFuture updateIncidentTodoAsync( * *
429 Too many requests -
*/ - public ApiResponse updateIncidentTodoWithHttpInfo( - String incidentId, String todoId, IncidentTodoPatchRequest body) throws ApiException { + public ApiResponse updateIncidentUserDefinedFieldWithHttpInfo( + String fieldId, + IncidentUserDefinedFieldUpdateRequest body, + UpdateIncidentUserDefinedFieldOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentTodo"; + String operationId = "updateIncidentUserDefinedField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10595,37 +17574,34 @@ public ApiResponse updateIncidentTodoWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling updateIncidentTodo"); - } - - // verify the required parameter 'todoId' is set - if (todoId == null) { + // verify the required parameter 'fieldId' is set + if (fieldId == null) { throw new ApiException( - 400, "Missing the required parameter 'todoId' when calling updateIncidentTodo"); + 400, + "Missing the required parameter 'fieldId' when calling updateIncidentUserDefinedField"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentTodo"); + 400, "Missing the required parameter 'body' when calling updateIncidentUserDefinedField"); } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + "/api/v2/incidents/config/user-defined-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentTodo", + "v2.IncidentsApi.updateIncidentUserDefinedField", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -10638,81 +17614,84 @@ public ApiResponse updateIncidentTodoWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an incident todo. + * Update an incident user-defined field. * - *

See {@link #updateIncidentTodoWithHttpInfo}. + *

See {@link #updateIncidentUserDefinedFieldWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @param body Incident todo payload. (required) - * @return CompletableFuture<ApiResponse<IncidentTodoResponse>> + * @param fieldId The ID of the incident user-defined field. (required) + * @param body Incident user-defined field update payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldResponse>> */ - public CompletableFuture> updateIncidentTodoWithHttpInfoAsync( - String incidentId, String todoId, IncidentTodoPatchRequest body) { + public CompletableFuture> + updateIncidentUserDefinedFieldWithHttpInfoAsync( + String fieldId, + IncidentUserDefinedFieldUpdateRequest body, + UpdateIncidentUserDefinedFieldOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateIncidentTodo"; + String operationId = "updateIncidentUserDefinedField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'incidentId' when calling updateIncidentTodo")); - return result; - } - - // verify the required parameter 'todoId' is set - if (todoId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'fieldId' is set + if (fieldId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'todoId' when calling updateIncidentTodo")); + 400, + "Missing the required parameter 'fieldId' when calling" + + " updateIncidentUserDefinedField")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentTodo")); + 400, + "Missing the required parameter 'body' when calling updateIncidentUserDefinedField")); return result; } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + "/api/v2/incidents/config/user-defined-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentTodo", + "v2.IncidentsApi.updateIncidentUserDefinedField", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -10724,36 +17703,96 @@ public CompletableFuture> updateIncidentTodoWi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to updateIncidentUserDefinedRole. */ + public static class UpdateIncidentUserDefinedRoleOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include in the response. + * (optional) + * @return UpdateIncidentUserDefinedRoleOptionalParameters + */ + public UpdateIncidentUserDefinedRoleOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Update an incident user-defined role. + * + *

See {@link #updateIncidentUserDefinedRoleWithHttpInfo}. + * + * @param roleId The UUID of the incident user-defined role. (required) + * @param body (required) + * @return IncidentUserDefinedRoleResponse + * @throws ApiException if fails to make API call + */ + public IncidentUserDefinedRoleResponse updateIncidentUserDefinedRole( + UUID roleId, IncidentUserDefinedRolePatchRequest body) throws ApiException { + return updateIncidentUserDefinedRoleWithHttpInfo( + roleId, body, new UpdateIncidentUserDefinedRoleOptionalParameters()) + .getData(); + } + + /** + * Update an incident user-defined role. + * + *

See {@link #updateIncidentUserDefinedRoleWithHttpInfoAsync}. + * + * @param roleId The UUID of the incident user-defined role. (required) + * @param body (required) + * @return CompletableFuture<IncidentUserDefinedRoleResponse> + */ + public CompletableFuture updateIncidentUserDefinedRoleAsync( + UUID roleId, IncidentUserDefinedRolePatchRequest body) { + return updateIncidentUserDefinedRoleWithHttpInfoAsync( + roleId, body, new UpdateIncidentUserDefinedRoleOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); } /** - * Update an incident type. + * Update an incident user-defined role. * - *

See {@link #updateIncidentTypeWithHttpInfo}. + *

See {@link #updateIncidentUserDefinedRoleWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @param body Incident type payload. (required) - * @return IncidentTypeResponse + * @param roleId The UUID of the incident user-defined role. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return IncidentUserDefinedRoleResponse * @throws ApiException if fails to make API call */ - public IncidentTypeResponse updateIncidentType( - String incidentTypeId, IncidentTypePatchRequest body) throws ApiException { - return updateIncidentTypeWithHttpInfo(incidentTypeId, body).getData(); + public IncidentUserDefinedRoleResponse updateIncidentUserDefinedRole( + UUID roleId, + IncidentUserDefinedRolePatchRequest body, + UpdateIncidentUserDefinedRoleOptionalParameters parameters) + throws ApiException { + return updateIncidentUserDefinedRoleWithHttpInfo(roleId, body, parameters).getData(); } /** - * Update an incident type. + * Update an incident user-defined role. * - *

See {@link #updateIncidentTypeWithHttpInfoAsync}. + *

See {@link #updateIncidentUserDefinedRoleWithHttpInfoAsync}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @param body Incident type payload. (required) - * @return CompletableFuture<IncidentTypeResponse> + * @param roleId The UUID of the incident user-defined role. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentUserDefinedRoleResponse> */ - public CompletableFuture updateIncidentTypeAsync( - String incidentTypeId, IncidentTypePatchRequest body) { - return updateIncidentTypeWithHttpInfoAsync(incidentTypeId, body) + public CompletableFuture updateIncidentUserDefinedRoleAsync( + UUID roleId, + IncidentUserDefinedRolePatchRequest body, + UpdateIncidentUserDefinedRoleOptionalParameters parameters) { + return updateIncidentUserDefinedRoleWithHttpInfoAsync(roleId, body, parameters) .thenApply( response -> { return response.getData(); @@ -10761,11 +17800,12 @@ public CompletableFuture updateIncidentTypeAsync( } /** - * Update an incident type. + * Update an existing user-defined role for incidents. * - * @param incidentTypeId The UUID of the incident type. (required) - * @param body Incident type payload. (required) - * @return ApiResponse<IncidentTypeResponse> + * @param roleId The UUID of the incident user-defined role. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentUserDefinedRoleResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10773,16 +17813,17 @@ public CompletableFuture updateIncidentTypeAsync( * * * - * - * * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse updateIncidentTypeWithHttpInfo( - String incidentTypeId, IncidentTypePatchRequest body) throws ApiException { + public ApiResponse updateIncidentUserDefinedRoleWithHttpInfo( + UUID roleId, + IncidentUserDefinedRolePatchRequest body, + UpdateIncidentUserDefinedRoleOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentType"; + String operationId = "updateIncidentUserDefinedRole"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10790,31 +17831,34 @@ public ApiResponse updateIncidentTypeWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'incidentTypeId' is set - if (incidentTypeId == null) { + // verify the required parameter 'roleId' is set + if (roleId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentTypeId' when calling updateIncidentType"); + 400, + "Missing the required parameter 'roleId' when calling updateIncidentUserDefinedRole"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentType"); + 400, "Missing the required parameter 'body' when calling updateIncidentUserDefinedRole"); } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" - .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "/api/v2/incidents/config/user-defined-roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentType", + "v2.IncidentsApi.updateIncidentUserDefinedRole", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -10827,72 +17871,84 @@ public ApiResponse updateIncidentTypeWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an incident type. + * Update an incident user-defined role. * - *

See {@link #updateIncidentTypeWithHttpInfo}. + *

See {@link #updateIncidentUserDefinedRoleWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @param body Incident type payload. (required) - * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> + * @param roleId The UUID of the incident user-defined role. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentUserDefinedRoleResponse>> */ - public CompletableFuture> updateIncidentTypeWithHttpInfoAsync( - String incidentTypeId, IncidentTypePatchRequest body) { + public CompletableFuture> + updateIncidentUserDefinedRoleWithHttpInfoAsync( + UUID roleId, + IncidentUserDefinedRolePatchRequest body, + UpdateIncidentUserDefinedRoleOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateIncidentType"; + String operationId = "updateIncidentUserDefinedRole"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'incidentTypeId' is set - if (incidentTypeId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'roleId' is set + if (roleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentTypeId' when calling updateIncidentType")); + "Missing the required parameter 'roleId' when calling" + + " updateIncidentUserDefinedRole")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentType")); + 400, + "Missing the required parameter 'body' when calling updateIncidentUserDefinedRole")); return result; } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" - .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "/api/v2/incidents/config/user-defined-roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentType", + "v2.IncidentsApi.updateIncidentUserDefinedRole", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -10904,96 +17960,38 @@ public CompletableFuture> updateIncidentTypeWi localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to updateIncidentUserDefinedField. */ - public static class UpdateIncidentUserDefinedFieldOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of related resources to include. Supported values are - * "last_modified_by_user", "created_by_user", and "incident_type". (optional) - * @return UpdateIncidentUserDefinedFieldOptionalParameters - */ - public UpdateIncidentUserDefinedFieldOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * Update an incident user-defined field. - * - *

See {@link #updateIncidentUserDefinedFieldWithHttpInfo}. - * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) - * @return IncidentUserDefinedFieldResponse - * @throws ApiException if fails to make API call - */ - public IncidentUserDefinedFieldResponse updateIncidentUserDefinedField( - String fieldId, IncidentUserDefinedFieldUpdateRequest body) throws ApiException { - return updateIncidentUserDefinedFieldWithHttpInfo( - fieldId, body, new UpdateIncidentUserDefinedFieldOptionalParameters()) - .getData(); - } - - /** - * Update an incident user-defined field. - * - *

See {@link #updateIncidentUserDefinedFieldWithHttpInfoAsync}. - * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) - * @return CompletableFuture<IncidentUserDefinedFieldResponse> - */ - public CompletableFuture updateIncidentUserDefinedFieldAsync( - String fieldId, IncidentUserDefinedFieldUpdateRequest body) { - return updateIncidentUserDefinedFieldWithHttpInfoAsync( - fieldId, body, new UpdateIncidentUserDefinedFieldOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Update an incident user-defined field. + * Update an incident timestamp override. * - *

See {@link #updateIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #updateTimestampOverrideWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) - * @param parameters Optional parameters for the request. - * @return IncidentUserDefinedFieldResponse + * @param incidentId The UUID of the incident. (required) + * @param id The UUID of the timestamp override. (required) + * @param body Timestamp override patch payload. (required) + * @return IncidentTimestampOverrideResponse * @throws ApiException if fails to make API call */ - public IncidentUserDefinedFieldResponse updateIncidentUserDefinedField( - String fieldId, - IncidentUserDefinedFieldUpdateRequest body, - UpdateIncidentUserDefinedFieldOptionalParameters parameters) - throws ApiException { - return updateIncidentUserDefinedFieldWithHttpInfo(fieldId, body, parameters).getData(); + public IncidentTimestampOverrideResponse updateTimestampOverride( + String incidentId, UUID id, IncidentTimestampOverridePatchRequest body) throws ApiException { + return updateTimestampOverrideWithHttpInfo(incidentId, id, body).getData(); } /** - * Update an incident user-defined field. + * Update an incident timestamp override. * - *

See {@link #updateIncidentUserDefinedFieldWithHttpInfoAsync}. + *

See {@link #updateTimestampOverrideWithHttpInfoAsync}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentUserDefinedFieldResponse> + * @param incidentId The UUID of the incident. (required) + * @param id The UUID of the timestamp override. (required) + * @param body Timestamp override patch payload. (required) + * @return CompletableFuture<IncidentTimestampOverrideResponse> */ - public CompletableFuture updateIncidentUserDefinedFieldAsync( - String fieldId, - IncidentUserDefinedFieldUpdateRequest body, - UpdateIncidentUserDefinedFieldOptionalParameters parameters) { - return updateIncidentUserDefinedFieldWithHttpInfoAsync(fieldId, body, parameters) + public CompletableFuture updateTimestampOverrideAsync( + String incidentId, UUID id, IncidentTimestampOverridePatchRequest body) { + return updateTimestampOverrideWithHttpInfoAsync(incidentId, id, body) .thenApply( response -> { return response.getData(); @@ -11001,12 +17999,12 @@ public CompletableFuture updateIncidentUserDef } /** - * Update an incident user-defined field. + * Update a timestamp override for an incident. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentUserDefinedFieldResponse> + * @param incidentId The UUID of the incident. (required) + * @param id The UUID of the timestamp override. (required) + * @param body Timestamp override patch payload. (required) + * @return ApiResponse<IncidentTimestampOverrideResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -11020,13 +18018,10 @@ public CompletableFuture updateIncidentUserDef * *
429 Too many requests -
*/ - public ApiResponse updateIncidentUserDefinedFieldWithHttpInfo( - String fieldId, - IncidentUserDefinedFieldUpdateRequest body, - UpdateIncidentUserDefinedFieldOptionalParameters parameters) - throws ApiException { + public ApiResponse updateTimestampOverrideWithHttpInfo( + String incidentId, UUID id, IncidentTimestampOverridePatchRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentUserDefinedField"; + String operationId = "updateTimestampOverride"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -11034,34 +18029,37 @@ public ApiResponse updateIncidentUserDefinedFi } Object localVarPostBody = body; - // verify the required parameter 'fieldId' is set - if (fieldId == null) { + // verify the required parameter 'incidentId' is set + if (incidentId == null) { throw new ApiException( - 400, - "Missing the required parameter 'fieldId' when calling updateIncidentUserDefinedField"); + 400, "Missing the required parameter 'incidentId' when calling updateTimestampOverride"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling updateTimestampOverride"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentUserDefinedField"); + 400, "Missing the required parameter 'body' when calling updateTimestampOverride"); } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/user-defined-fields/{field_id}" - .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + "/api/v2/incidents/{incident_id}/timestamp-overrides/{id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentUserDefinedField", + "v2.IncidentsApi.updateTimestampOverride", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -11074,30 +18072,28 @@ public ApiResponse updateIncidentUserDefinedFi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an incident user-defined field. + * Update an incident timestamp override. * - *

See {@link #updateIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #updateTimestampOverrideWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldResponse>> + * @param incidentId The UUID of the incident. (required) + * @param id The UUID of the timestamp override. (required) + * @param body Timestamp override patch payload. (required) + * @return CompletableFuture<ApiResponse<IncidentTimestampOverrideResponse>> */ - public CompletableFuture> - updateIncidentUserDefinedFieldWithHttpInfoAsync( - String fieldId, - IncidentUserDefinedFieldUpdateRequest body, - UpdateIncidentUserDefinedFieldOptionalParameters parameters) { + public CompletableFuture> + updateTimestampOverrideWithHttpInfoAsync( + String incidentId, UUID id, IncidentTimestampOverridePatchRequest body) { // Check if unstable operation is enabled - String operationId = "updateIncidentUserDefinedField"; + String operationId = "updateTimestampOverride"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -11105,52 +18101,58 @@ public ApiResponse updateIncidentUserDefinedFi } Object localVarPostBody = body; - // verify the required parameter 'fieldId' is set - if (fieldId == null) { - CompletableFuture> result = + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'fieldId' when calling" - + " updateIncidentUserDefinedField")); + "Missing the required parameter 'incidentId' when calling updateTimestampOverride")); + return result; + } + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling updateTimestampOverride")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling updateIncidentUserDefinedField")); + 400, "Missing the required parameter 'body' when calling updateTimestampOverride")); return result; } - String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/user-defined-fields/{field_id}" - .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + "/api/v2/incidents/{incident_id}/timestamp-overrides/{id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentUserDefinedField", + "v2.IncidentsApi.updateTimestampOverride", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -11163,6 +18165,6 @@ public ApiResponse updateIncidentUserDefinedFi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemDataAttributesResponse.java new file mode 100644 index 00000000000..c41e50f2642 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemDataAttributesResponse.java @@ -0,0 +1,315 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an AI-generated incident postmortem. */ +@JsonPropertyOrder({ + IncidentAIPostmortemDataAttributesResponse.JSON_PROPERTY_ACTION_ITEMS, + IncidentAIPostmortemDataAttributesResponse.JSON_PROPERTY_CUSTOMER_IMPACT, + IncidentAIPostmortemDataAttributesResponse.JSON_PROPERTY_EXECUTIVE_SUMMARY, + IncidentAIPostmortemDataAttributesResponse.JSON_PROPERTY_KEY_INSIGHTS, + IncidentAIPostmortemDataAttributesResponse.JSON_PROPERTY_KEY_TIMELINE, + IncidentAIPostmortemDataAttributesResponse.JSON_PROPERTY_LESSONS_LEARNED, + IncidentAIPostmortemDataAttributesResponse.JSON_PROPERTY_SYSTEM_OVERVIEW +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentAIPostmortemDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACTION_ITEMS = "action_items"; + private String actionItems; + + public static final String JSON_PROPERTY_CUSTOMER_IMPACT = "customer_impact"; + private String customerImpact; + + public static final String JSON_PROPERTY_EXECUTIVE_SUMMARY = "executive_summary"; + private String executiveSummary; + + public static final String JSON_PROPERTY_KEY_INSIGHTS = "key_insights"; + private String keyInsights; + + public static final String JSON_PROPERTY_KEY_TIMELINE = "key_timeline"; + private String keyTimeline; + + public static final String JSON_PROPERTY_LESSONS_LEARNED = "lessons_learned"; + private String lessonsLearned; + + public static final String JSON_PROPERTY_SYSTEM_OVERVIEW = "system_overview"; + private String systemOverview; + + public IncidentAIPostmortemDataAttributesResponse actionItems(String actionItems) { + this.actionItems = actionItems; + return this; + } + + /** + * Action items to prevent recurrence. + * + * @return actionItems + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTION_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getActionItems() { + return actionItems; + } + + public void setActionItems(String actionItems) { + this.actionItems = actionItems; + } + + public IncidentAIPostmortemDataAttributesResponse customerImpact(String customerImpact) { + this.customerImpact = customerImpact; + return this; + } + + /** + * The impact of the incident on customers. + * + * @return customerImpact + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomerImpact() { + return customerImpact; + } + + public void setCustomerImpact(String customerImpact) { + this.customerImpact = customerImpact; + } + + public IncidentAIPostmortemDataAttributesResponse executiveSummary(String executiveSummary) { + this.executiveSummary = executiveSummary; + return this; + } + + /** + * An executive summary of the incident. + * + * @return executiveSummary + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTIVE_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExecutiveSummary() { + return executiveSummary; + } + + public void setExecutiveSummary(String executiveSummary) { + this.executiveSummary = executiveSummary; + } + + public IncidentAIPostmortemDataAttributesResponse keyInsights(String keyInsights) { + this.keyInsights = keyInsights; + return this; + } + + /** + * Key insights from the incident. + * + * @return keyInsights + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY_INSIGHTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKeyInsights() { + return keyInsights; + } + + public void setKeyInsights(String keyInsights) { + this.keyInsights = keyInsights; + } + + public IncidentAIPostmortemDataAttributesResponse keyTimeline(String keyTimeline) { + this.keyTimeline = keyTimeline; + return this; + } + + /** + * Key timeline events during the incident. + * + * @return keyTimeline + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY_TIMELINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKeyTimeline() { + return keyTimeline; + } + + public void setKeyTimeline(String keyTimeline) { + this.keyTimeline = keyTimeline; + } + + public IncidentAIPostmortemDataAttributesResponse lessonsLearned(String lessonsLearned) { + this.lessonsLearned = lessonsLearned; + return this; + } + + /** + * Lessons learned from the incident. + * + * @return lessonsLearned + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LESSONS_LEARNED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLessonsLearned() { + return lessonsLearned; + } + + public void setLessonsLearned(String lessonsLearned) { + this.lessonsLearned = lessonsLearned; + } + + public IncidentAIPostmortemDataAttributesResponse systemOverview(String systemOverview) { + this.systemOverview = systemOverview; + return this; + } + + /** + * An overview of the affected systems. + * + * @return systemOverview + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYSTEM_OVERVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSystemOverview() { + return systemOverview; + } + + public void setSystemOverview(String systemOverview) { + this.systemOverview = systemOverview; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentAIPostmortemDataAttributesResponse + */ + @JsonAnySetter + public IncidentAIPostmortemDataAttributesResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentAIPostmortemDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentAIPostmortemDataAttributesResponse incidentAiPostmortemDataAttributesResponse = + (IncidentAIPostmortemDataAttributesResponse) o; + return Objects.equals(this.actionItems, incidentAiPostmortemDataAttributesResponse.actionItems) + && Objects.equals( + this.customerImpact, incidentAiPostmortemDataAttributesResponse.customerImpact) + && Objects.equals( + this.executiveSummary, incidentAiPostmortemDataAttributesResponse.executiveSummary) + && Objects.equals(this.keyInsights, incidentAiPostmortemDataAttributesResponse.keyInsights) + && Objects.equals(this.keyTimeline, incidentAiPostmortemDataAttributesResponse.keyTimeline) + && Objects.equals( + this.lessonsLearned, incidentAiPostmortemDataAttributesResponse.lessonsLearned) + && Objects.equals( + this.systemOverview, incidentAiPostmortemDataAttributesResponse.systemOverview) + && Objects.equals( + this.additionalProperties, + incidentAiPostmortemDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + actionItems, + customerImpact, + executiveSummary, + keyInsights, + keyTimeline, + lessonsLearned, + systemOverview, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentAIPostmortemDataAttributesResponse {\n"); + sb.append(" actionItems: ").append(toIndentedString(actionItems)).append("\n"); + sb.append(" customerImpact: ").append(toIndentedString(customerImpact)).append("\n"); + sb.append(" executiveSummary: ").append(toIndentedString(executiveSummary)).append("\n"); + sb.append(" keyInsights: ").append(toIndentedString(keyInsights)).append("\n"); + sb.append(" keyTimeline: ").append(toIndentedString(keyTimeline)).append("\n"); + sb.append(" lessonsLearned: ").append(toIndentedString(lessonsLearned)).append("\n"); + sb.append(" systemOverview: ").append(toIndentedString(systemOverview)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemDataResponse.java new file mode 100644 index 00000000000..99a2ec4b372 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemDataResponse.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** AI postmortem data in a response. */ +@JsonPropertyOrder({ + IncidentAIPostmortemDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentAIPostmortemDataResponse.JSON_PROPERTY_ID, + IncidentAIPostmortemDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentAIPostmortemDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentAIPostmortemDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentAIPostmortemResponseType type; + + public IncidentAIPostmortemDataResponse() {} + + @JsonCreator + public IncidentAIPostmortemDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentAIPostmortemDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentAIPostmortemResponseType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentAIPostmortemDataResponse attributes( + IncidentAIPostmortemDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an AI-generated incident postmortem. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentAIPostmortemDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentAIPostmortemDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentAIPostmortemDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The incident identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentAIPostmortemDataResponse type(IncidentAIPostmortemResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AI postmortem response resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentAIPostmortemResponseType getType() { + return type; + } + + public void setType(IncidentAIPostmortemResponseType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentAIPostmortemDataResponse + */ + @JsonAnySetter + public IncidentAIPostmortemDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentAIPostmortemDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentAIPostmortemDataResponse incidentAiPostmortemDataResponse = + (IncidentAIPostmortemDataResponse) o; + return Objects.equals(this.attributes, incidentAiPostmortemDataResponse.attributes) + && Objects.equals(this.id, incidentAiPostmortemDataResponse.id) + && Objects.equals(this.type, incidentAiPostmortemDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentAiPostmortemDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentAIPostmortemDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemResponse.java new file mode 100644 index 00000000000..d8e27904c58 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response with an AI-generated incident postmortem. */ +@JsonPropertyOrder({IncidentAIPostmortemResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentAIPostmortemResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentAIPostmortemDataResponse data; + + public IncidentAIPostmortemResponse() {} + + @JsonCreator + public IncidentAIPostmortemResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentAIPostmortemDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentAIPostmortemResponse data(IncidentAIPostmortemDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AI postmortem data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentAIPostmortemDataResponse getData() { + return data; + } + + public void setData(IncidentAIPostmortemDataResponse data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentAIPostmortemResponse + */ + @JsonAnySetter + public IncidentAIPostmortemResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentAIPostmortemResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentAIPostmortemResponse incidentAiPostmortemResponse = (IncidentAIPostmortemResponse) o; + return Objects.equals(this.data, incidentAiPostmortemResponse.data) + && Objects.equals( + this.additionalProperties, incidentAiPostmortemResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentAIPostmortemResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemResponseType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemResponseType.java new file mode 100644 index 00000000000..5de154b12ee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAIPostmortemResponseType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** AI postmortem response resource type. */ +@JsonSerialize( + using = IncidentAIPostmortemResponseType.IncidentAIPostmortemResponseTypeSerializer.class) +public class IncidentAIPostmortemResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("get_incident_ai_postmortem_response")); + + public static final IncidentAIPostmortemResponseType GET_INCIDENT_AI_POSTMORTEM_RESPONSE = + new IncidentAIPostmortemResponseType("get_incident_ai_postmortem_response"); + + IncidentAIPostmortemResponseType(String value) { + super(value, allowedValues); + } + + public static class IncidentAIPostmortemResponseTypeSerializer + extends StdSerializer { + public IncidentAIPostmortemResponseTypeSerializer(Class t) { + super(t); + } + + public IncidentAIPostmortemResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentAIPostmortemResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentAIPostmortemResponseType fromValue(String value) { + return new IncidentAIPostmortemResponseType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataAttributesRequest.java new file mode 100644 index 00000000000..2dac1779e93 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataAttributesRequest.java @@ -0,0 +1,240 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating an incident configuration. */ +@JsonPropertyOrder({ + IncidentConfigurationDataAttributesRequest.JSON_PROPERTY_EXECUTE_INTEGRATIONS, + IncidentConfigurationDataAttributesRequest.JSON_PROPERTY_EXECUTE_NOTIFICATION_RULES, + IncidentConfigurationDataAttributesRequest.JSON_PROPERTY_INCLUDE_IN_ANALYTICS, + IncidentConfigurationDataAttributesRequest.JSON_PROPERTY_INCLUDE_IN_SEARCH +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXECUTE_INTEGRATIONS = "execute_integrations"; + private Boolean executeIntegrations; + + public static final String JSON_PROPERTY_EXECUTE_NOTIFICATION_RULES = + "execute_notification_rules"; + private Boolean executeNotificationRules; + + public static final String JSON_PROPERTY_INCLUDE_IN_ANALYTICS = "include_in_analytics"; + private Boolean includeInAnalytics; + + public static final String JSON_PROPERTY_INCLUDE_IN_SEARCH = "include_in_search"; + private Boolean includeInSearch; + + public IncidentConfigurationDataAttributesRequest executeIntegrations( + Boolean executeIntegrations) { + this.executeIntegrations = executeIntegrations; + return this; + } + + /** + * Whether to execute integrations for this incident. + * + * @return executeIntegrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTE_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExecuteIntegrations() { + return executeIntegrations; + } + + public void setExecuteIntegrations(Boolean executeIntegrations) { + this.executeIntegrations = executeIntegrations; + } + + public IncidentConfigurationDataAttributesRequest executeNotificationRules( + Boolean executeNotificationRules) { + this.executeNotificationRules = executeNotificationRules; + return this; + } + + /** + * Whether to execute notification rules for this incident. + * + * @return executeNotificationRules + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTE_NOTIFICATION_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExecuteNotificationRules() { + return executeNotificationRules; + } + + public void setExecuteNotificationRules(Boolean executeNotificationRules) { + this.executeNotificationRules = executeNotificationRules; + } + + public IncidentConfigurationDataAttributesRequest includeInAnalytics(Boolean includeInAnalytics) { + this.includeInAnalytics = includeInAnalytics; + return this; + } + + /** + * Whether to include this incident in analytics. + * + * @return includeInAnalytics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_IN_ANALYTICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeInAnalytics() { + return includeInAnalytics; + } + + public void setIncludeInAnalytics(Boolean includeInAnalytics) { + this.includeInAnalytics = includeInAnalytics; + } + + public IncidentConfigurationDataAttributesRequest includeInSearch(Boolean includeInSearch) { + this.includeInSearch = includeInSearch; + return this; + } + + /** + * Whether to include this incident in search results. + * + * @return includeInSearch + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_IN_SEARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeInSearch() { + return includeInSearch; + } + + public void setIncludeInSearch(Boolean includeInSearch) { + this.includeInSearch = includeInSearch; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationDataAttributesRequest + */ + @JsonAnySetter + public IncidentConfigurationDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationDataAttributesRequest incidentConfigurationDataAttributesRequest = + (IncidentConfigurationDataAttributesRequest) o; + return Objects.equals( + this.executeIntegrations, + incidentConfigurationDataAttributesRequest.executeIntegrations) + && Objects.equals( + this.executeNotificationRules, + incidentConfigurationDataAttributesRequest.executeNotificationRules) + && Objects.equals( + this.includeInAnalytics, incidentConfigurationDataAttributesRequest.includeInAnalytics) + && Objects.equals( + this.includeInSearch, incidentConfigurationDataAttributesRequest.includeInSearch) + && Objects.equals( + this.additionalProperties, + incidentConfigurationDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + executeIntegrations, + executeNotificationRules, + includeInAnalytics, + includeInSearch, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationDataAttributesRequest {\n"); + sb.append(" executeIntegrations: ") + .append(toIndentedString(executeIntegrations)) + .append("\n"); + sb.append(" executeNotificationRules: ") + .append(toIndentedString(executeNotificationRules)) + .append("\n"); + sb.append(" includeInAnalytics: ").append(toIndentedString(includeInAnalytics)).append("\n"); + sb.append(" includeInSearch: ").append(toIndentedString(includeInSearch)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataAttributesResponse.java new file mode 100644 index 00000000000..c388969316d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataAttributesResponse.java @@ -0,0 +1,336 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an incident configuration in a response. */ +@JsonPropertyOrder({ + IncidentConfigurationDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + IncidentConfigurationDataAttributesResponse.JSON_PROPERTY_EXECUTE_INTEGRATIONS, + IncidentConfigurationDataAttributesResponse.JSON_PROPERTY_EXECUTE_NOTIFICATION_RULES, + IncidentConfigurationDataAttributesResponse.JSON_PROPERTY_INCIDENT_ID, + IncidentConfigurationDataAttributesResponse.JSON_PROPERTY_INCLUDE_IN_ANALYTICS, + IncidentConfigurationDataAttributesResponse.JSON_PROPERTY_INCLUDE_IN_SEARCH, + IncidentConfigurationDataAttributesResponse.JSON_PROPERTY_MODIFIED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EXECUTE_INTEGRATIONS = "execute_integrations"; + private Boolean executeIntegrations; + + public static final String JSON_PROPERTY_EXECUTE_NOTIFICATION_RULES = + "execute_notification_rules"; + private Boolean executeNotificationRules; + + public static final String JSON_PROPERTY_INCIDENT_ID = "incident_id"; + private String incidentId; + + public static final String JSON_PROPERTY_INCLUDE_IN_ANALYTICS = "include_in_analytics"; + private Boolean includeInAnalytics; + + public static final String JSON_PROPERTY_INCLUDE_IN_SEARCH = "include_in_search"; + private Boolean includeInSearch; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public IncidentConfigurationDataAttributesResponse() {} + + @JsonCreator + public IncidentConfigurationDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_ID) String incidentId, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt) { + this.createdAt = createdAt; + this.incidentId = incidentId; + this.modifiedAt = modifiedAt; + } + + public IncidentConfigurationDataAttributesResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the configuration was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public IncidentConfigurationDataAttributesResponse executeIntegrations( + Boolean executeIntegrations) { + this.executeIntegrations = executeIntegrations; + return this; + } + + /** + * Whether integrations are executed for this incident. + * + * @return executeIntegrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTE_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExecuteIntegrations() { + return executeIntegrations; + } + + public void setExecuteIntegrations(Boolean executeIntegrations) { + this.executeIntegrations = executeIntegrations; + } + + public IncidentConfigurationDataAttributesResponse executeNotificationRules( + Boolean executeNotificationRules) { + this.executeNotificationRules = executeNotificationRules; + return this; + } + + /** + * Whether notification rules are executed for this incident. + * + * @return executeNotificationRules + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTE_NOTIFICATION_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExecuteNotificationRules() { + return executeNotificationRules; + } + + public void setExecuteNotificationRules(Boolean executeNotificationRules) { + this.executeNotificationRules = executeNotificationRules; + } + + public IncidentConfigurationDataAttributesResponse incidentId(String incidentId) { + this.incidentId = incidentId; + return this; + } + + /** + * The incident identifier. + * + * @return incidentId + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIncidentId() { + return incidentId; + } + + public void setIncidentId(String incidentId) { + this.incidentId = incidentId; + } + + public IncidentConfigurationDataAttributesResponse includeInAnalytics( + Boolean includeInAnalytics) { + this.includeInAnalytics = includeInAnalytics; + return this; + } + + /** + * Whether this incident is included in analytics. + * + * @return includeInAnalytics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_IN_ANALYTICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeInAnalytics() { + return includeInAnalytics; + } + + public void setIncludeInAnalytics(Boolean includeInAnalytics) { + this.includeInAnalytics = includeInAnalytics; + } + + public IncidentConfigurationDataAttributesResponse includeInSearch(Boolean includeInSearch) { + this.includeInSearch = includeInSearch; + return this; + } + + /** + * Whether this incident is included in search results. + * + * @return includeInSearch + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_IN_SEARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeInSearch() { + return includeInSearch; + } + + public void setIncludeInSearch(Boolean includeInSearch) { + this.includeInSearch = includeInSearch; + } + + public IncidentConfigurationDataAttributesResponse modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Timestamp when the configuration was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationDataAttributesResponse + */ + @JsonAnySetter + public IncidentConfigurationDataAttributesResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationDataAttributesResponse incidentConfigurationDataAttributesResponse = + (IncidentConfigurationDataAttributesResponse) o; + return Objects.equals(this.createdAt, incidentConfigurationDataAttributesResponse.createdAt) + && Objects.equals( + this.executeIntegrations, + incidentConfigurationDataAttributesResponse.executeIntegrations) + && Objects.equals( + this.executeNotificationRules, + incidentConfigurationDataAttributesResponse.executeNotificationRules) + && Objects.equals(this.incidentId, incidentConfigurationDataAttributesResponse.incidentId) + && Objects.equals( + this.includeInAnalytics, incidentConfigurationDataAttributesResponse.includeInAnalytics) + && Objects.equals( + this.includeInSearch, incidentConfigurationDataAttributesResponse.includeInSearch) + && Objects.equals(this.modifiedAt, incidentConfigurationDataAttributesResponse.modifiedAt) + && Objects.equals( + this.additionalProperties, + incidentConfigurationDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + executeIntegrations, + executeNotificationRules, + incidentId, + includeInAnalytics, + includeInSearch, + modifiedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationDataAttributesResponse {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" executeIntegrations: ") + .append(toIndentedString(executeIntegrations)) + .append("\n"); + sb.append(" executeNotificationRules: ") + .append(toIndentedString(executeNotificationRules)) + .append("\n"); + sb.append(" incidentId: ").append(toIndentedString(incidentId)).append("\n"); + sb.append(" includeInAnalytics: ").append(toIndentedString(includeInAnalytics)).append("\n"); + sb.append(" includeInSearch: ").append(toIndentedString(includeInSearch)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataRequest.java new file mode 100644 index 00000000000..741700c7545 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataRequest.java @@ -0,0 +1,181 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Incident configuration data in a create request. */ +@JsonPropertyOrder({ + IncidentConfigurationDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentConfigurationDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentConfigurationDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentConfigurationType type; + + public IncidentConfigurationDataRequest() {} + + @JsonCreator + public IncidentConfigurationDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentConfigurationDataRequest attributes( + IncidentConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating an incident configuration. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentConfigurationDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentConfigurationDataRequest type(IncidentConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentConfigurationType getType() { + return type; + } + + public void setType(IncidentConfigurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationDataRequest + */ + @JsonAnySetter + public IncidentConfigurationDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationDataRequest incidentConfigurationDataRequest = + (IncidentConfigurationDataRequest) o; + return Objects.equals(this.attributes, incidentConfigurationDataRequest.attributes) + && Objects.equals(this.type, incidentConfigurationDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentConfigurationDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataResponse.java new file mode 100644 index 00000000000..046c79c646e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationDataResponse.java @@ -0,0 +1,242 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Incident configuration data in a response. */ +@JsonPropertyOrder({ + IncidentConfigurationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentConfigurationDataResponse.JSON_PROPERTY_ID, + IncidentConfigurationDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentConfigurationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentConfigurationDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentConfigurationRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentConfigurationType type; + + public IncidentConfigurationDataResponse() {} + + @JsonCreator + public IncidentConfigurationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentConfigurationDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentConfigurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentConfigurationDataResponse attributes( + IncidentConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an incident configuration in a response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentConfigurationDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentConfigurationDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The incident configuration identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentConfigurationDataResponse relationships( + IncidentConfigurationRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for an incident configuration. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentConfigurationRelationships getRelationships() { + return relationships; + } + + public void setRelationships(IncidentConfigurationRelationships relationships) { + this.relationships = relationships; + } + + public IncidentConfigurationDataResponse type(IncidentConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentConfigurationType getType() { + return type; + } + + public void setType(IncidentConfigurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationDataResponse + */ + @JsonAnySetter + public IncidentConfigurationDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationDataResponse incidentConfigurationDataResponse = + (IncidentConfigurationDataResponse) o; + return Objects.equals(this.attributes, incidentConfigurationDataResponse.attributes) + && Objects.equals(this.id, incidentConfigurationDataResponse.id) + && Objects.equals(this.relationships, incidentConfigurationDataResponse.relationships) + && Objects.equals(this.type, incidentConfigurationDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentConfigurationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchDataAttributesRequest.java new file mode 100644 index 00000000000..fcce992619e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchDataAttributesRequest.java @@ -0,0 +1,243 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for patching an incident configuration. All fields are optional. */ +@JsonPropertyOrder({ + IncidentConfigurationPatchDataAttributesRequest.JSON_PROPERTY_EXECUTE_INTEGRATIONS, + IncidentConfigurationPatchDataAttributesRequest.JSON_PROPERTY_EXECUTE_NOTIFICATION_RULES, + IncidentConfigurationPatchDataAttributesRequest.JSON_PROPERTY_INCLUDE_IN_ANALYTICS, + IncidentConfigurationPatchDataAttributesRequest.JSON_PROPERTY_INCLUDE_IN_SEARCH +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationPatchDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXECUTE_INTEGRATIONS = "execute_integrations"; + private Boolean executeIntegrations; + + public static final String JSON_PROPERTY_EXECUTE_NOTIFICATION_RULES = + "execute_notification_rules"; + private Boolean executeNotificationRules; + + public static final String JSON_PROPERTY_INCLUDE_IN_ANALYTICS = "include_in_analytics"; + private Boolean includeInAnalytics; + + public static final String JSON_PROPERTY_INCLUDE_IN_SEARCH = "include_in_search"; + private Boolean includeInSearch; + + public IncidentConfigurationPatchDataAttributesRequest executeIntegrations( + Boolean executeIntegrations) { + this.executeIntegrations = executeIntegrations; + return this; + } + + /** + * Whether to execute integrations for this incident. + * + * @return executeIntegrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTE_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExecuteIntegrations() { + return executeIntegrations; + } + + public void setExecuteIntegrations(Boolean executeIntegrations) { + this.executeIntegrations = executeIntegrations; + } + + public IncidentConfigurationPatchDataAttributesRequest executeNotificationRules( + Boolean executeNotificationRules) { + this.executeNotificationRules = executeNotificationRules; + return this; + } + + /** + * Whether to execute notification rules for this incident. + * + * @return executeNotificationRules + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTE_NOTIFICATION_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExecuteNotificationRules() { + return executeNotificationRules; + } + + public void setExecuteNotificationRules(Boolean executeNotificationRules) { + this.executeNotificationRules = executeNotificationRules; + } + + public IncidentConfigurationPatchDataAttributesRequest includeInAnalytics( + Boolean includeInAnalytics) { + this.includeInAnalytics = includeInAnalytics; + return this; + } + + /** + * Whether to include this incident in analytics. + * + * @return includeInAnalytics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_IN_ANALYTICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeInAnalytics() { + return includeInAnalytics; + } + + public void setIncludeInAnalytics(Boolean includeInAnalytics) { + this.includeInAnalytics = includeInAnalytics; + } + + public IncidentConfigurationPatchDataAttributesRequest includeInSearch(Boolean includeInSearch) { + this.includeInSearch = includeInSearch; + return this; + } + + /** + * Whether to include this incident in search results. + * + * @return includeInSearch + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_IN_SEARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeInSearch() { + return includeInSearch; + } + + public void setIncludeInSearch(Boolean includeInSearch) { + this.includeInSearch = includeInSearch; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationPatchDataAttributesRequest + */ + @JsonAnySetter + public IncidentConfigurationPatchDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationPatchDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationPatchDataAttributesRequest + incidentConfigurationPatchDataAttributesRequest = + (IncidentConfigurationPatchDataAttributesRequest) o; + return Objects.equals( + this.executeIntegrations, + incidentConfigurationPatchDataAttributesRequest.executeIntegrations) + && Objects.equals( + this.executeNotificationRules, + incidentConfigurationPatchDataAttributesRequest.executeNotificationRules) + && Objects.equals( + this.includeInAnalytics, + incidentConfigurationPatchDataAttributesRequest.includeInAnalytics) + && Objects.equals( + this.includeInSearch, incidentConfigurationPatchDataAttributesRequest.includeInSearch) + && Objects.equals( + this.additionalProperties, + incidentConfigurationPatchDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + executeIntegrations, + executeNotificationRules, + includeInAnalytics, + includeInSearch, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationPatchDataAttributesRequest {\n"); + sb.append(" executeIntegrations: ") + .append(toIndentedString(executeIntegrations)) + .append("\n"); + sb.append(" executeNotificationRules: ") + .append(toIndentedString(executeNotificationRules)) + .append("\n"); + sb.append(" includeInAnalytics: ").append(toIndentedString(includeInAnalytics)).append("\n"); + sb.append(" includeInSearch: ").append(toIndentedString(includeInSearch)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchDataRequest.java new file mode 100644 index 00000000000..e2b39f6e7aa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchDataRequest.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Incident configuration data in a patch request. */ +@JsonPropertyOrder({ + IncidentConfigurationPatchDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentConfigurationPatchDataRequest.JSON_PROPERTY_ID, + IncidentConfigurationPatchDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationPatchDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentConfigurationPatchDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentConfigurationType type; + + public IncidentConfigurationPatchDataRequest() {} + + @JsonCreator + public IncidentConfigurationPatchDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentConfigurationType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentConfigurationPatchDataRequest attributes( + IncidentConfigurationPatchDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for patching an incident configuration. All fields are optional. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentConfigurationPatchDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentConfigurationPatchDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentConfigurationPatchDataRequest id(UUID id) { + this.id = id; + return this; + } + + /** + * The incident configuration identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentConfigurationPatchDataRequest type(IncidentConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentConfigurationType getType() { + return type; + } + + public void setType(IncidentConfigurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationPatchDataRequest + */ + @JsonAnySetter + public IncidentConfigurationPatchDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationPatchDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationPatchDataRequest incidentConfigurationPatchDataRequest = + (IncidentConfigurationPatchDataRequest) o; + return Objects.equals(this.attributes, incidentConfigurationPatchDataRequest.attributes) + && Objects.equals(this.id, incidentConfigurationPatchDataRequest.id) + && Objects.equals(this.type, incidentConfigurationPatchDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentConfigurationPatchDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationPatchDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchRequest.java new file mode 100644 index 00000000000..1e6611c4830 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationPatchRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for patching an incident configuration. */ +@JsonPropertyOrder({IncidentConfigurationPatchRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationPatchRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentConfigurationPatchDataRequest data; + + public IncidentConfigurationPatchRequest() {} + + @JsonCreator + public IncidentConfigurationPatchRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentConfigurationPatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentConfigurationPatchRequest data(IncidentConfigurationPatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident configuration data in a patch request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentConfigurationPatchDataRequest getData() { + return data; + } + + public void setData(IncidentConfigurationPatchDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationPatchRequest + */ + @JsonAnySetter + public IncidentConfigurationPatchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationPatchRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationPatchRequest incidentConfigurationPatchRequest = + (IncidentConfigurationPatchRequest) o; + return Objects.equals(this.data, incidentConfigurationPatchRequest.data) + && Objects.equals( + this.additionalProperties, incidentConfigurationPatchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationPatchRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationRelationships.java new file mode 100644 index 00000000000..3a288b7ddd9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationRelationships.java @@ -0,0 +1,170 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for an incident configuration. */ +@JsonPropertyOrder({ + IncidentConfigurationRelationships.JSON_PROPERTY_CREATED_BY_USER, + IncidentConfigurationRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private RelationshipToUser createdByUser; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private RelationshipToUser lastModifiedByUser; + + public IncidentConfigurationRelationships createdByUser(RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + } + + public IncidentConfigurationRelationships lastModifiedByUser( + RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser(RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationRelationships + */ + @JsonAnySetter + public IncidentConfigurationRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationRelationships incidentConfigurationRelationships = + (IncidentConfigurationRelationships) o; + return Objects.equals(this.createdByUser, incidentConfigurationRelationships.createdByUser) + && Objects.equals( + this.lastModifiedByUser, incidentConfigurationRelationships.lastModifiedByUser) + && Objects.equals( + this.additionalProperties, incidentConfigurationRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, lastModifiedByUser, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationRequest.java new file mode 100644 index 00000000000..1396ada99ed --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating an incident configuration. */ +@JsonPropertyOrder({IncidentConfigurationRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentConfigurationDataRequest data; + + public IncidentConfigurationRequest() {} + + @JsonCreator + public IncidentConfigurationRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentConfigurationRequest data(IncidentConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident configuration data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentConfigurationDataRequest getData() { + return data; + } + + public void setData(IncidentConfigurationDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationRequest + */ + @JsonAnySetter + public IncidentConfigurationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationRequest incidentConfigurationRequest = (IncidentConfigurationRequest) o; + return Objects.equals(this.data, incidentConfigurationRequest.data) + && Objects.equals( + this.additionalProperties, incidentConfigurationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationResponse.java new file mode 100644 index 00000000000..a53ec1f8bad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationResponse.java @@ -0,0 +1,168 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with an incident configuration. */ +@JsonPropertyOrder({ + IncidentConfigurationResponse.JSON_PROPERTY_DATA, + IncidentConfigurationResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentConfigurationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentConfigurationDataResponse data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentConfigurationResponse() {} + + @JsonCreator + public IncidentConfigurationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentConfigurationResponse data(IncidentConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident configuration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentConfigurationDataResponse getData() { + return data; + } + + public void setData(IncidentConfigurationDataResponse data) { + this.data = data; + } + + /** + * Included related resources. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentConfigurationResponse + */ + @JsonAnySetter + public IncidentConfigurationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentConfigurationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentConfigurationResponse incidentConfigurationResponse = (IncidentConfigurationResponse) o; + return Objects.equals(this.data, incidentConfigurationResponse.data) + && Objects.equals(this.included, incidentConfigurationResponse.included) + && Objects.equals( + this.additionalProperties, incidentConfigurationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentConfigurationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationType.java new file mode 100644 index 00000000000..6ebeb001a25 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentConfigurationType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Incident configuration resource type. */ +@JsonSerialize(using = IncidentConfigurationType.IncidentConfigurationTypeSerializer.class) +public class IncidentConfigurationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incidents_configurations")); + + public static final IncidentConfigurationType INCIDENTS_CONFIGURATIONS = + new IncidentConfigurationType("incidents_configurations"); + + IncidentConfigurationType(String value) { + super(value, allowedValues); + } + + public static class IncidentConfigurationTypeSerializer + extends StdSerializer { + public IncidentConfigurationTypeSerializer(Class t) { + super(t); + } + + public IncidentConfigurationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentConfigurationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentConfigurationType fromValue(String value) { + return new IncidentConfigurationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageDataAttributesRequest.java new file mode 100644 index 00000000000..ada4c5d784b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageDataAttributesRequest.java @@ -0,0 +1,297 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating an on-call page from an incident. */ +@JsonPropertyOrder({ + IncidentCreateOnCallPageDataAttributesRequest.JSON_PROPERTY_DESCRIPTION, + IncidentCreateOnCallPageDataAttributesRequest.JSON_PROPERTY_ROLE, + IncidentCreateOnCallPageDataAttributesRequest.JSON_PROPERTY_SERVICES, + IncidentCreateOnCallPageDataAttributesRequest.JSON_PROPERTY_TAGS, + IncidentCreateOnCallPageDataAttributesRequest.JSON_PROPERTY_TARGET, + IncidentCreateOnCallPageDataAttributesRequest.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreateOnCallPageDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ROLE = "role"; + private IncidentPageRoleReference role; + + public static final String JSON_PROPERTY_SERVICES = "services"; + private List services = null; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TARGET = "target"; + private IncidentPageTarget target; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public IncidentCreateOnCallPageDataAttributesRequest description(String description) { + this.description = description; + return this; + } + + /** + * The description of the page. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public IncidentCreateOnCallPageDataAttributesRequest role(IncidentPageRoleReference role) { + this.role = role; + this.unparsed |= role.unparsed; + return this; + } + + /** + * A reference to an incident role for a page. + * + * @return role + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentPageRoleReference getRole() { + return role; + } + + public void setRole(IncidentPageRoleReference role) { + this.role = role; + } + + public IncidentCreateOnCallPageDataAttributesRequest services(List services) { + this.services = services; + return this; + } + + public IncidentCreateOnCallPageDataAttributesRequest addServicesItem(String servicesItem) { + if (this.services == null) { + this.services = new ArrayList<>(); + } + this.services.add(servicesItem); + return this; + } + + /** + * List of affected services. + * + * @return services + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } + + public IncidentCreateOnCallPageDataAttributesRequest tags(List tags) { + this.tags = tags; + return this; + } + + public IncidentCreateOnCallPageDataAttributesRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * List of tags for the page. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public IncidentCreateOnCallPageDataAttributesRequest target(IncidentPageTarget target) { + this.target = target; + this.unparsed |= target.unparsed; + return this; + } + + /** + * The target recipient for a page. + * + * @return target + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentPageTarget getTarget() { + return target; + } + + public void setTarget(IncidentPageTarget target) { + this.target = target; + } + + public IncidentCreateOnCallPageDataAttributesRequest title(String title) { + this.title = title; + return this; + } + + /** + * The title of the page. + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentCreateOnCallPageDataAttributesRequest + */ + @JsonAnySetter + public IncidentCreateOnCallPageDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentCreateOnCallPageDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreateOnCallPageDataAttributesRequest incidentCreateOnCallPageDataAttributesRequest = + (IncidentCreateOnCallPageDataAttributesRequest) o; + return Objects.equals( + this.description, incidentCreateOnCallPageDataAttributesRequest.description) + && Objects.equals(this.role, incidentCreateOnCallPageDataAttributesRequest.role) + && Objects.equals(this.services, incidentCreateOnCallPageDataAttributesRequest.services) + && Objects.equals(this.tags, incidentCreateOnCallPageDataAttributesRequest.tags) + && Objects.equals(this.target, incidentCreateOnCallPageDataAttributesRequest.target) + && Objects.equals(this.title, incidentCreateOnCallPageDataAttributesRequest.title) + && Objects.equals( + this.additionalProperties, + incidentCreateOnCallPageDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, role, services, tags, target, title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreateOnCallPageDataAttributesRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" services: ").append(toIndentedString(services)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageDataRequest.java new file mode 100644 index 00000000000..1bd710e473b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageDataRequest.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** On-call page data in a create request. */ +@JsonPropertyOrder({ + IncidentCreateOnCallPageDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentCreateOnCallPageDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreateOnCallPageDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentCreateOnCallPageDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentCreatePageFromIncidentType type; + + public IncidentCreateOnCallPageDataRequest() {} + + @JsonCreator + public IncidentCreateOnCallPageDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentCreateOnCallPageDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentCreatePageFromIncidentType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentCreateOnCallPageDataRequest attributes( + IncidentCreateOnCallPageDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating an on-call page from an incident. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCreateOnCallPageDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentCreateOnCallPageDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentCreateOnCallPageDataRequest type(IncidentCreatePageFromIncidentType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for a page creation request. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCreatePageFromIncidentType getType() { + return type; + } + + public void setType(IncidentCreatePageFromIncidentType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentCreateOnCallPageDataRequest + */ + @JsonAnySetter + public IncidentCreateOnCallPageDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentCreateOnCallPageDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreateOnCallPageDataRequest incidentCreateOnCallPageDataRequest = + (IncidentCreateOnCallPageDataRequest) o; + return Objects.equals(this.attributes, incidentCreateOnCallPageDataRequest.attributes) + && Objects.equals(this.type, incidentCreateOnCallPageDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentCreateOnCallPageDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreateOnCallPageDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageRequest.java new file mode 100644 index 00000000000..e5e4d8b75f4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateOnCallPageRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating an on-call page from an incident. */ +@JsonPropertyOrder({IncidentCreateOnCallPageRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreateOnCallPageRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentCreateOnCallPageDataRequest data; + + public IncidentCreateOnCallPageRequest() {} + + @JsonCreator + public IncidentCreateOnCallPageRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentCreateOnCallPageDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentCreateOnCallPageRequest data(IncidentCreateOnCallPageDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * On-call page data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCreateOnCallPageDataRequest getData() { + return data; + } + + public void setData(IncidentCreateOnCallPageDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentCreateOnCallPageRequest + */ + @JsonAnySetter + public IncidentCreateOnCallPageRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentCreateOnCallPageRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreateOnCallPageRequest incidentCreateOnCallPageRequest = + (IncidentCreateOnCallPageRequest) o; + return Objects.equals(this.data, incidentCreateOnCallPageRequest.data) + && Objects.equals( + this.additionalProperties, incidentCreateOnCallPageRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreateOnCallPageRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentDataAttributesRequest.java new file mode 100644 index 00000000000..7c65cd7e04b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentDataAttributesRequest.java @@ -0,0 +1,332 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating a page from an incident. */ +@JsonPropertyOrder({ + IncidentCreatePageFromIncidentDataAttributesRequest.JSON_PROPERTY_DESCRIPTION, + IncidentCreatePageFromIncidentDataAttributesRequest.JSON_PROPERTY_INCIDENT_PUBLIC_ID, + IncidentCreatePageFromIncidentDataAttributesRequest.JSON_PROPERTY_ROLE, + IncidentCreatePageFromIncidentDataAttributesRequest.JSON_PROPERTY_SERVICES, + IncidentCreatePageFromIncidentDataAttributesRequest.JSON_PROPERTY_TAGS, + IncidentCreatePageFromIncidentDataAttributesRequest.JSON_PROPERTY_TARGET, + IncidentCreatePageFromIncidentDataAttributesRequest.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreatePageFromIncidentDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INCIDENT_PUBLIC_ID = "incident_public_id"; + private String incidentPublicId; + + public static final String JSON_PROPERTY_ROLE = "role"; + private IncidentPageRoleReference role; + + public static final String JSON_PROPERTY_SERVICES = "services"; + private List services = null; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TARGET = "target"; + private IncidentPageTarget target; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public IncidentCreatePageFromIncidentDataAttributesRequest description(String description) { + this.description = description; + return this; + } + + /** + * The description of the page. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public IncidentCreatePageFromIncidentDataAttributesRequest incidentPublicId( + String incidentPublicId) { + this.incidentPublicId = incidentPublicId; + return this; + } + + /** + * The public ID of the incident. + * + * @return incidentPublicId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_PUBLIC_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIncidentPublicId() { + return incidentPublicId; + } + + public void setIncidentPublicId(String incidentPublicId) { + this.incidentPublicId = incidentPublicId; + } + + public IncidentCreatePageFromIncidentDataAttributesRequest role(IncidentPageRoleReference role) { + this.role = role; + this.unparsed |= role.unparsed; + return this; + } + + /** + * A reference to an incident role for a page. + * + * @return role + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentPageRoleReference getRole() { + return role; + } + + public void setRole(IncidentPageRoleReference role) { + this.role = role; + } + + public IncidentCreatePageFromIncidentDataAttributesRequest services(List services) { + this.services = services; + return this; + } + + public IncidentCreatePageFromIncidentDataAttributesRequest addServicesItem(String servicesItem) { + if (this.services == null) { + this.services = new ArrayList<>(); + } + this.services.add(servicesItem); + return this; + } + + /** + * List of affected services. + * + * @return services + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } + + public IncidentCreatePageFromIncidentDataAttributesRequest tags(List tags) { + this.tags = tags; + return this; + } + + public IncidentCreatePageFromIncidentDataAttributesRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * List of tags for the page. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public IncidentCreatePageFromIncidentDataAttributesRequest target(IncidentPageTarget target) { + this.target = target; + this.unparsed |= target.unparsed; + return this; + } + + /** + * The target recipient for a page. + * + * @return target + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentPageTarget getTarget() { + return target; + } + + public void setTarget(IncidentPageTarget target) { + this.target = target; + } + + public IncidentCreatePageFromIncidentDataAttributesRequest title(String title) { + this.title = title; + return this; + } + + /** + * The title of the page. + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentCreatePageFromIncidentDataAttributesRequest + */ + @JsonAnySetter + public IncidentCreatePageFromIncidentDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentCreatePageFromIncidentDataAttributesRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreatePageFromIncidentDataAttributesRequest + incidentCreatePageFromIncidentDataAttributesRequest = + (IncidentCreatePageFromIncidentDataAttributesRequest) o; + return Objects.equals( + this.description, incidentCreatePageFromIncidentDataAttributesRequest.description) + && Objects.equals( + this.incidentPublicId, + incidentCreatePageFromIncidentDataAttributesRequest.incidentPublicId) + && Objects.equals(this.role, incidentCreatePageFromIncidentDataAttributesRequest.role) + && Objects.equals( + this.services, incidentCreatePageFromIncidentDataAttributesRequest.services) + && Objects.equals(this.tags, incidentCreatePageFromIncidentDataAttributesRequest.tags) + && Objects.equals(this.target, incidentCreatePageFromIncidentDataAttributesRequest.target) + && Objects.equals(this.title, incidentCreatePageFromIncidentDataAttributesRequest.title) + && Objects.equals( + this.additionalProperties, + incidentCreatePageFromIncidentDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + description, incidentPublicId, role, services, tags, target, title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreatePageFromIncidentDataAttributesRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" incidentPublicId: ").append(toIndentedString(incidentPublicId)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" services: ").append(toIndentedString(services)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentDataRequest.java new file mode 100644 index 00000000000..80ecc1ac242 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentDataRequest.java @@ -0,0 +1,186 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Page data in a create request. */ +@JsonPropertyOrder({ + IncidentCreatePageFromIncidentDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentCreatePageFromIncidentDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreatePageFromIncidentDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentCreatePageFromIncidentDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentCreatePageFromIncidentType type; + + public IncidentCreatePageFromIncidentDataRequest() {} + + @JsonCreator + public IncidentCreatePageFromIncidentDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentCreatePageFromIncidentDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentCreatePageFromIncidentType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentCreatePageFromIncidentDataRequest attributes( + IncidentCreatePageFromIncidentDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a page from an incident. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCreatePageFromIncidentDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentCreatePageFromIncidentDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentCreatePageFromIncidentDataRequest type(IncidentCreatePageFromIncidentType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for a page creation request. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCreatePageFromIncidentType getType() { + return type; + } + + public void setType(IncidentCreatePageFromIncidentType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentCreatePageFromIncidentDataRequest + */ + @JsonAnySetter + public IncidentCreatePageFromIncidentDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentCreatePageFromIncidentDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreatePageFromIncidentDataRequest incidentCreatePageFromIncidentDataRequest = + (IncidentCreatePageFromIncidentDataRequest) o; + return Objects.equals(this.attributes, incidentCreatePageFromIncidentDataRequest.attributes) + && Objects.equals(this.type, incidentCreatePageFromIncidentDataRequest.type) + && Objects.equals( + this.additionalProperties, + incidentCreatePageFromIncidentDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreatePageFromIncidentDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentRequest.java new file mode 100644 index 00000000000..95dde833dca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating a page from an incident. */ +@JsonPropertyOrder({IncidentCreatePageFromIncidentRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreatePageFromIncidentRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentCreatePageFromIncidentDataRequest data; + + public IncidentCreatePageFromIncidentRequest() {} + + @JsonCreator + public IncidentCreatePageFromIncidentRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentCreatePageFromIncidentDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentCreatePageFromIncidentRequest data( + IncidentCreatePageFromIncidentDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Page data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCreatePageFromIncidentDataRequest getData() { + return data; + } + + public void setData(IncidentCreatePageFromIncidentDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentCreatePageFromIncidentRequest + */ + @JsonAnySetter + public IncidentCreatePageFromIncidentRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentCreatePageFromIncidentRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreatePageFromIncidentRequest incidentCreatePageFromIncidentRequest = + (IncidentCreatePageFromIncidentRequest) o; + return Objects.equals(this.data, incidentCreatePageFromIncidentRequest.data) + && Objects.equals( + this.additionalProperties, incidentCreatePageFromIncidentRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreatePageFromIncidentRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentType.java new file mode 100644 index 00000000000..f72a5c8bf79 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreatePageFromIncidentType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type for a page creation request. */ +@JsonSerialize( + using = IncidentCreatePageFromIncidentType.IncidentCreatePageFromIncidentTypeSerializer.class) +public class IncidentCreatePageFromIncidentType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("page")); + + public static final IncidentCreatePageFromIncidentType PAGE = + new IncidentCreatePageFromIncidentType("page"); + + IncidentCreatePageFromIncidentType(String value) { + super(value, allowedValues); + } + + public static class IncidentCreatePageFromIncidentTypeSerializer + extends StdSerializer { + public IncidentCreatePageFromIncidentTypeSerializer( + Class t) { + super(t); + } + + public IncidentCreatePageFromIncidentTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentCreatePageFromIncidentType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentCreatePageFromIncidentType fromValue(String value) { + return new IncidentCreatePageFromIncidentType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataAttributesRequest.java new file mode 100644 index 00000000000..af69fb13bd3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataAttributesRequest.java @@ -0,0 +1,249 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating a Google Chat configuration. */ +@JsonPropertyOrder({ + IncidentGoogleChatConfigurationDataAttributesRequest.JSON_PROPERTY_DOMAIN_ID, + IncidentGoogleChatConfigurationDataAttributesRequest.JSON_PROPERTY_SPACE_NAME_TEMPLATE, + IncidentGoogleChatConfigurationDataAttributesRequest.JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID, + IncidentGoogleChatConfigurationDataAttributesRequest.JSON_PROPERTY_SPACE_TIME_ZONE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN_ID = "domain_id"; + private String domainId; + + public static final String JSON_PROPERTY_SPACE_NAME_TEMPLATE = "space_name_template"; + private String spaceNameTemplate; + + public static final String JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID = "space_target_audience_id"; + private String spaceTargetAudienceId; + + public static final String JSON_PROPERTY_SPACE_TIME_ZONE = "space_time_zone"; + private String spaceTimeZone; + + public IncidentGoogleChatConfigurationDataAttributesRequest() {} + + @JsonCreator + public IncidentGoogleChatConfigurationDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN_ID) String domainId, + @JsonProperty(required = true, value = JSON_PROPERTY_SPACE_NAME_TEMPLATE) + String spaceNameTemplate, + @JsonProperty(required = true, value = JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID) + String spaceTargetAudienceId, + @JsonProperty(required = true, value = JSON_PROPERTY_SPACE_TIME_ZONE) String spaceTimeZone) { + this.domainId = domainId; + this.spaceNameTemplate = spaceNameTemplate; + this.spaceTargetAudienceId = spaceTargetAudienceId; + this.spaceTimeZone = spaceTimeZone; + } + + public IncidentGoogleChatConfigurationDataAttributesRequest domainId(String domainId) { + this.domainId = domainId; + return this; + } + + /** + * The Google Chat domain ID. + * + * @return domainId + */ + @JsonProperty(JSON_PROPERTY_DOMAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public IncidentGoogleChatConfigurationDataAttributesRequest spaceNameTemplate( + String spaceNameTemplate) { + this.spaceNameTemplate = spaceNameTemplate; + return this; + } + + /** + * The template for the Google Chat space name. + * + * @return spaceNameTemplate + */ + @JsonProperty(JSON_PROPERTY_SPACE_NAME_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpaceNameTemplate() { + return spaceNameTemplate; + } + + public void setSpaceNameTemplate(String spaceNameTemplate) { + this.spaceNameTemplate = spaceNameTemplate; + } + + public IncidentGoogleChatConfigurationDataAttributesRequest spaceTargetAudienceId( + String spaceTargetAudienceId) { + this.spaceTargetAudienceId = spaceTargetAudienceId; + return this; + } + + /** + * The target audience ID for the Google Chat space. + * + * @return spaceTargetAudienceId + */ + @JsonProperty(JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpaceTargetAudienceId() { + return spaceTargetAudienceId; + } + + public void setSpaceTargetAudienceId(String spaceTargetAudienceId) { + this.spaceTargetAudienceId = spaceTargetAudienceId; + } + + public IncidentGoogleChatConfigurationDataAttributesRequest spaceTimeZone(String spaceTimeZone) { + this.spaceTimeZone = spaceTimeZone; + return this; + } + + /** + * The time zone for the Google Chat space. + * + * @return spaceTimeZone + */ + @JsonProperty(JSON_PROPERTY_SPACE_TIME_ZONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpaceTimeZone() { + return spaceTimeZone; + } + + public void setSpaceTimeZone(String spaceTimeZone) { + this.spaceTimeZone = spaceTimeZone; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationDataAttributesRequest + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentGoogleChatConfigurationDataAttributesRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationDataAttributesRequest + incidentGoogleChatConfigurationDataAttributesRequest = + (IncidentGoogleChatConfigurationDataAttributesRequest) o; + return Objects.equals( + this.domainId, incidentGoogleChatConfigurationDataAttributesRequest.domainId) + && Objects.equals( + this.spaceNameTemplate, + incidentGoogleChatConfigurationDataAttributesRequest.spaceNameTemplate) + && Objects.equals( + this.spaceTargetAudienceId, + incidentGoogleChatConfigurationDataAttributesRequest.spaceTargetAudienceId) + && Objects.equals( + this.spaceTimeZone, incidentGoogleChatConfigurationDataAttributesRequest.spaceTimeZone) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + domainId, spaceNameTemplate, spaceTargetAudienceId, spaceTimeZone, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationDataAttributesRequest {\n"); + sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n"); + sb.append(" spaceNameTemplate: ").append(toIndentedString(spaceNameTemplate)).append("\n"); + sb.append(" spaceTargetAudienceId: ") + .append(toIndentedString(spaceTargetAudienceId)) + .append("\n"); + sb.append(" spaceTimeZone: ").append(toIndentedString(spaceTimeZone)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataAttributesResponse.java new file mode 100644 index 00000000000..e9c0b229fc3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataAttributesResponse.java @@ -0,0 +1,315 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Google Chat configuration. */ +@JsonPropertyOrder({ + IncidentGoogleChatConfigurationDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + IncidentGoogleChatConfigurationDataAttributesResponse.JSON_PROPERTY_DOMAIN_ID, + IncidentGoogleChatConfigurationDataAttributesResponse.JSON_PROPERTY_MODIFIED_AT, + IncidentGoogleChatConfigurationDataAttributesResponse.JSON_PROPERTY_SPACE_NAME_TEMPLATE, + IncidentGoogleChatConfigurationDataAttributesResponse.JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID, + IncidentGoogleChatConfigurationDataAttributesResponse.JSON_PROPERTY_SPACE_TIME_ZONE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DOMAIN_ID = "domain_id"; + private String domainId; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_SPACE_NAME_TEMPLATE = "space_name_template"; + private String spaceNameTemplate; + + public static final String JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID = "space_target_audience_id"; + private String spaceTargetAudienceId; + + public static final String JSON_PROPERTY_SPACE_TIME_ZONE = "space_time_zone"; + private String spaceTimeZone; + + public IncidentGoogleChatConfigurationDataAttributesResponse() {} + + @JsonCreator + public IncidentGoogleChatConfigurationDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN_ID) String domainId, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_SPACE_NAME_TEMPLATE) + String spaceNameTemplate, + @JsonProperty(required = true, value = JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID) + String spaceTargetAudienceId, + @JsonProperty(required = true, value = JSON_PROPERTY_SPACE_TIME_ZONE) String spaceTimeZone) { + this.createdAt = createdAt; + this.domainId = domainId; + this.modifiedAt = modifiedAt; + this.spaceNameTemplate = spaceNameTemplate; + this.spaceTargetAudienceId = spaceTargetAudienceId; + this.spaceTimeZone = spaceTimeZone; + } + + public IncidentGoogleChatConfigurationDataAttributesResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the configuration was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public IncidentGoogleChatConfigurationDataAttributesResponse domainId(String domainId) { + this.domainId = domainId; + return this; + } + + /** + * The Google Chat domain ID. + * + * @return domainId + */ + @JsonProperty(JSON_PROPERTY_DOMAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public IncidentGoogleChatConfigurationDataAttributesResponse modifiedAt( + OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Timestamp when the configuration was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public IncidentGoogleChatConfigurationDataAttributesResponse spaceNameTemplate( + String spaceNameTemplate) { + this.spaceNameTemplate = spaceNameTemplate; + return this; + } + + /** + * The template for the Google Chat space name. + * + * @return spaceNameTemplate + */ + @JsonProperty(JSON_PROPERTY_SPACE_NAME_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpaceNameTemplate() { + return spaceNameTemplate; + } + + public void setSpaceNameTemplate(String spaceNameTemplate) { + this.spaceNameTemplate = spaceNameTemplate; + } + + public IncidentGoogleChatConfigurationDataAttributesResponse spaceTargetAudienceId( + String spaceTargetAudienceId) { + this.spaceTargetAudienceId = spaceTargetAudienceId; + return this; + } + + /** + * The target audience ID for the Google Chat space. + * + * @return spaceTargetAudienceId + */ + @JsonProperty(JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpaceTargetAudienceId() { + return spaceTargetAudienceId; + } + + public void setSpaceTargetAudienceId(String spaceTargetAudienceId) { + this.spaceTargetAudienceId = spaceTargetAudienceId; + } + + public IncidentGoogleChatConfigurationDataAttributesResponse spaceTimeZone(String spaceTimeZone) { + this.spaceTimeZone = spaceTimeZone; + return this; + } + + /** + * The time zone for the Google Chat space. + * + * @return spaceTimeZone + */ + @JsonProperty(JSON_PROPERTY_SPACE_TIME_ZONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpaceTimeZone() { + return spaceTimeZone; + } + + public void setSpaceTimeZone(String spaceTimeZone) { + this.spaceTimeZone = spaceTimeZone; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationDataAttributesResponse + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationDataAttributesResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentGoogleChatConfigurationDataAttributesResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationDataAttributesResponse + incidentGoogleChatConfigurationDataAttributesResponse = + (IncidentGoogleChatConfigurationDataAttributesResponse) o; + return Objects.equals( + this.createdAt, incidentGoogleChatConfigurationDataAttributesResponse.createdAt) + && Objects.equals( + this.domainId, incidentGoogleChatConfigurationDataAttributesResponse.domainId) + && Objects.equals( + this.modifiedAt, incidentGoogleChatConfigurationDataAttributesResponse.modifiedAt) + && Objects.equals( + this.spaceNameTemplate, + incidentGoogleChatConfigurationDataAttributesResponse.spaceNameTemplate) + && Objects.equals( + this.spaceTargetAudienceId, + incidentGoogleChatConfigurationDataAttributesResponse.spaceTargetAudienceId) + && Objects.equals( + this.spaceTimeZone, incidentGoogleChatConfigurationDataAttributesResponse.spaceTimeZone) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + domainId, + modifiedAt, + spaceNameTemplate, + spaceTargetAudienceId, + spaceTimeZone, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationDataAttributesResponse {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" spaceNameTemplate: ").append(toIndentedString(spaceNameTemplate)).append("\n"); + sb.append(" spaceTargetAudienceId: ") + .append(toIndentedString(spaceTargetAudienceId)) + .append("\n"); + sb.append(" spaceTimeZone: ").append(toIndentedString(spaceTimeZone)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataRequest.java new file mode 100644 index 00000000000..ab7d2313b2d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataRequest.java @@ -0,0 +1,220 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Google Chat configuration data in a create request. */ +@JsonPropertyOrder({ + IncidentGoogleChatConfigurationDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentGoogleChatConfigurationDataRequest.JSON_PROPERTY_RELATIONSHIPS, + IncidentGoogleChatConfigurationDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentGoogleChatConfigurationDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentGoogleChatConfigurationRelationshipsRequest relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentGoogleChatConfigurationType type; + + public IncidentGoogleChatConfigurationDataRequest() {} + + @JsonCreator + public IncidentGoogleChatConfigurationDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentGoogleChatConfigurationDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + IncidentGoogleChatConfigurationRelationshipsRequest relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentGoogleChatConfigurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentGoogleChatConfigurationDataRequest attributes( + IncidentGoogleChatConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a Google Chat configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleChatConfigurationDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentGoogleChatConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentGoogleChatConfigurationDataRequest relationships( + IncidentGoogleChatConfigurationRelationshipsRequest relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for a Google Chat configuration create request. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleChatConfigurationRelationshipsRequest getRelationships() { + return relationships; + } + + public void setRelationships(IncidentGoogleChatConfigurationRelationshipsRequest relationships) { + this.relationships = relationships; + } + + public IncidentGoogleChatConfigurationDataRequest type(IncidentGoogleChatConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleChatConfigurationType getType() { + return type; + } + + public void setType(IncidentGoogleChatConfigurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationDataRequest + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationDataRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleChatConfigurationDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationDataRequest incidentGoogleChatConfigurationDataRequest = + (IncidentGoogleChatConfigurationDataRequest) o; + return Objects.equals(this.attributes, incidentGoogleChatConfigurationDataRequest.attributes) + && Objects.equals( + this.relationships, incidentGoogleChatConfigurationDataRequest.relationships) + && Objects.equals(this.type, incidentGoogleChatConfigurationDataRequest.type) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataResponse.java new file mode 100644 index 00000000000..4e236de4cc9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationDataResponse.java @@ -0,0 +1,247 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Google Chat configuration data in a response. */ +@JsonPropertyOrder({ + IncidentGoogleChatConfigurationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentGoogleChatConfigurationDataResponse.JSON_PROPERTY_ID, + IncidentGoogleChatConfigurationDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentGoogleChatConfigurationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentGoogleChatConfigurationDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentGoogleChatConfigurationRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentGoogleChatConfigurationType type; + + public IncidentGoogleChatConfigurationDataResponse() {} + + @JsonCreator + public IncidentGoogleChatConfigurationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentGoogleChatConfigurationDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentGoogleChatConfigurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentGoogleChatConfigurationDataResponse attributes( + IncidentGoogleChatConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Google Chat configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleChatConfigurationDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentGoogleChatConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentGoogleChatConfigurationDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The configuration identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentGoogleChatConfigurationDataResponse relationships( + IncidentGoogleChatConfigurationRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for a Google Chat configuration. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentGoogleChatConfigurationRelationships getRelationships() { + return relationships; + } + + public void setRelationships(IncidentGoogleChatConfigurationRelationships relationships) { + this.relationships = relationships; + } + + public IncidentGoogleChatConfigurationDataResponse type( + IncidentGoogleChatConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleChatConfigurationType getType() { + return type; + } + + public void setType(IncidentGoogleChatConfigurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationDataResponse + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationDataResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleChatConfigurationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationDataResponse incidentGoogleChatConfigurationDataResponse = + (IncidentGoogleChatConfigurationDataResponse) o; + return Objects.equals(this.attributes, incidentGoogleChatConfigurationDataResponse.attributes) + && Objects.equals(this.id, incidentGoogleChatConfigurationDataResponse.id) + && Objects.equals( + this.relationships, incidentGoogleChatConfigurationDataResponse.relationships) + && Objects.equals(this.type, incidentGoogleChatConfigurationDataResponse.type) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchDataAttributesRequest.java new file mode 100644 index 00000000000..1af345ff5d3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchDataAttributesRequest.java @@ -0,0 +1,239 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for patching a Google Chat configuration. All fields are optional. */ +@JsonPropertyOrder({ + IncidentGoogleChatConfigurationPatchDataAttributesRequest.JSON_PROPERTY_DOMAIN_ID, + IncidentGoogleChatConfigurationPatchDataAttributesRequest.JSON_PROPERTY_SPACE_NAME_TEMPLATE, + IncidentGoogleChatConfigurationPatchDataAttributesRequest.JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID, + IncidentGoogleChatConfigurationPatchDataAttributesRequest.JSON_PROPERTY_SPACE_TIME_ZONE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationPatchDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN_ID = "domain_id"; + private String domainId; + + public static final String JSON_PROPERTY_SPACE_NAME_TEMPLATE = "space_name_template"; + private String spaceNameTemplate; + + public static final String JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID = "space_target_audience_id"; + private String spaceTargetAudienceId; + + public static final String JSON_PROPERTY_SPACE_TIME_ZONE = "space_time_zone"; + private String spaceTimeZone; + + public IncidentGoogleChatConfigurationPatchDataAttributesRequest domainId(String domainId) { + this.domainId = domainId; + return this; + } + + /** + * The Google Chat domain ID. + * + * @return domainId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public IncidentGoogleChatConfigurationPatchDataAttributesRequest spaceNameTemplate( + String spaceNameTemplate) { + this.spaceNameTemplate = spaceNameTemplate; + return this; + } + + /** + * The template for the Google Chat space name. + * + * @return spaceNameTemplate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPACE_NAME_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSpaceNameTemplate() { + return spaceNameTemplate; + } + + public void setSpaceNameTemplate(String spaceNameTemplate) { + this.spaceNameTemplate = spaceNameTemplate; + } + + public IncidentGoogleChatConfigurationPatchDataAttributesRequest spaceTargetAudienceId( + String spaceTargetAudienceId) { + this.spaceTargetAudienceId = spaceTargetAudienceId; + return this; + } + + /** + * The target audience ID for the Google Chat space. + * + * @return spaceTargetAudienceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPACE_TARGET_AUDIENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSpaceTargetAudienceId() { + return spaceTargetAudienceId; + } + + public void setSpaceTargetAudienceId(String spaceTargetAudienceId) { + this.spaceTargetAudienceId = spaceTargetAudienceId; + } + + public IncidentGoogleChatConfigurationPatchDataAttributesRequest spaceTimeZone( + String spaceTimeZone) { + this.spaceTimeZone = spaceTimeZone; + return this; + } + + /** + * The time zone for the Google Chat space. + * + * @return spaceTimeZone + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPACE_TIME_ZONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSpaceTimeZone() { + return spaceTimeZone; + } + + public void setSpaceTimeZone(String spaceTimeZone) { + this.spaceTimeZone = spaceTimeZone; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationPatchDataAttributesRequest + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationPatchDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentGoogleChatConfigurationPatchDataAttributesRequest object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationPatchDataAttributesRequest + incidentGoogleChatConfigurationPatchDataAttributesRequest = + (IncidentGoogleChatConfigurationPatchDataAttributesRequest) o; + return Objects.equals( + this.domainId, incidentGoogleChatConfigurationPatchDataAttributesRequest.domainId) + && Objects.equals( + this.spaceNameTemplate, + incidentGoogleChatConfigurationPatchDataAttributesRequest.spaceNameTemplate) + && Objects.equals( + this.spaceTargetAudienceId, + incidentGoogleChatConfigurationPatchDataAttributesRequest.spaceTargetAudienceId) + && Objects.equals( + this.spaceTimeZone, + incidentGoogleChatConfigurationPatchDataAttributesRequest.spaceTimeZone) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationPatchDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + domainId, spaceNameTemplate, spaceTargetAudienceId, spaceTimeZone, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationPatchDataAttributesRequest {\n"); + sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n"); + sb.append(" spaceNameTemplate: ").append(toIndentedString(spaceNameTemplate)).append("\n"); + sb.append(" spaceTargetAudienceId: ") + .append(toIndentedString(spaceTargetAudienceId)) + .append("\n"); + sb.append(" spaceTimeZone: ").append(toIndentedString(spaceTimeZone)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchDataRequest.java new file mode 100644 index 00000000000..bdb9ac8294b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchDataRequest.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Google Chat configuration data in a patch request. */ +@JsonPropertyOrder({ + IncidentGoogleChatConfigurationPatchDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentGoogleChatConfigurationPatchDataRequest.JSON_PROPERTY_ID, + IncidentGoogleChatConfigurationPatchDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationPatchDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentGoogleChatConfigurationPatchDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentGoogleChatConfigurationType type; + + public IncidentGoogleChatConfigurationPatchDataRequest() {} + + @JsonCreator + public IncidentGoogleChatConfigurationPatchDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentGoogleChatConfigurationType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentGoogleChatConfigurationPatchDataRequest attributes( + IncidentGoogleChatConfigurationPatchDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for patching a Google Chat configuration. All fields are optional. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentGoogleChatConfigurationPatchDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentGoogleChatConfigurationPatchDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentGoogleChatConfigurationPatchDataRequest id(UUID id) { + this.id = id; + return this; + } + + /** + * The configuration identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentGoogleChatConfigurationPatchDataRequest type( + IncidentGoogleChatConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleChatConfigurationType getType() { + return type; + } + + public void setType(IncidentGoogleChatConfigurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationPatchDataRequest + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationPatchDataRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleChatConfigurationPatchDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationPatchDataRequest + incidentGoogleChatConfigurationPatchDataRequest = + (IncidentGoogleChatConfigurationPatchDataRequest) o; + return Objects.equals( + this.attributes, incidentGoogleChatConfigurationPatchDataRequest.attributes) + && Objects.equals(this.id, incidentGoogleChatConfigurationPatchDataRequest.id) + && Objects.equals(this.type, incidentGoogleChatConfigurationPatchDataRequest.type) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationPatchDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationPatchDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchRequest.java new file mode 100644 index 00000000000..1b0aca7d968 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationPatchRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for patching a Google Chat configuration. */ +@JsonPropertyOrder({IncidentGoogleChatConfigurationPatchRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationPatchRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentGoogleChatConfigurationPatchDataRequest data; + + public IncidentGoogleChatConfigurationPatchRequest() {} + + @JsonCreator + public IncidentGoogleChatConfigurationPatchRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentGoogleChatConfigurationPatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentGoogleChatConfigurationPatchRequest data( + IncidentGoogleChatConfigurationPatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Chat configuration data in a patch request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleChatConfigurationPatchDataRequest getData() { + return data; + } + + public void setData(IncidentGoogleChatConfigurationPatchDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationPatchRequest + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationPatchRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleChatConfigurationPatchRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationPatchRequest incidentGoogleChatConfigurationPatchRequest = + (IncidentGoogleChatConfigurationPatchRequest) o; + return Objects.equals(this.data, incidentGoogleChatConfigurationPatchRequest.data) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationPatchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationPatchRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRelationships.java new file mode 100644 index 00000000000..32386822e9e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRelationships.java @@ -0,0 +1,205 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for a Google Chat configuration. */ +@JsonPropertyOrder({ + IncidentGoogleChatConfigurationRelationships.JSON_PROPERTY_CREATED_BY_USER, + IncidentGoogleChatConfigurationRelationships.JSON_PROPERTY_INCIDENT_TYPE, + IncidentGoogleChatConfigurationRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private RelationshipToUser createdByUser; + + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private RelationshipToIncidentType incidentType; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private RelationshipToUser lastModifiedByUser; + + public IncidentGoogleChatConfigurationRelationships createdByUser( + RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + } + + public IncidentGoogleChatConfigurationRelationships incidentType( + RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + return this; + } + + /** + * Relationship to an incident type. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToIncidentType getIncidentType() { + return incidentType; + } + + public void setIncidentType(RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + } + + public IncidentGoogleChatConfigurationRelationships lastModifiedByUser( + RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser(RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationRelationships + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationRelationships putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleChatConfigurationRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationRelationships incidentGoogleChatConfigurationRelationships = + (IncidentGoogleChatConfigurationRelationships) o; + return Objects.equals( + this.createdByUser, incidentGoogleChatConfigurationRelationships.createdByUser) + && Objects.equals( + this.incidentType, incidentGoogleChatConfigurationRelationships.incidentType) + && Objects.equals( + this.lastModifiedByUser, + incidentGoogleChatConfigurationRelationships.lastModifiedByUser) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, incidentType, lastModifiedByUser, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRelationshipsRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRelationshipsRequest.java new file mode 100644 index 00000000000..811d225e6b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRelationshipsRequest.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for a Google Chat configuration create request. */ +@JsonPropertyOrder({ + IncidentGoogleChatConfigurationRelationshipsRequest.JSON_PROPERTY_INCIDENT_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationRelationshipsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private RelationshipToIncidentType incidentType; + + public IncidentGoogleChatConfigurationRelationshipsRequest() {} + + @JsonCreator + public IncidentGoogleChatConfigurationRelationshipsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_TYPE) + RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + } + + public IncidentGoogleChatConfigurationRelationshipsRequest incidentType( + RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + return this; + } + + /** + * Relationship to an incident type. + * + * @return incidentType + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RelationshipToIncidentType getIncidentType() { + return incidentType; + } + + public void setIncidentType(RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationRelationshipsRequest + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationRelationshipsRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentGoogleChatConfigurationRelationshipsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationRelationshipsRequest + incidentGoogleChatConfigurationRelationshipsRequest = + (IncidentGoogleChatConfigurationRelationshipsRequest) o; + return Objects.equals( + this.incidentType, incidentGoogleChatConfigurationRelationshipsRequest.incidentType) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationRelationshipsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationRelationshipsRequest {\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRequest.java new file mode 100644 index 00000000000..e6d1fc5e850 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating a Google Chat configuration. */ +@JsonPropertyOrder({IncidentGoogleChatConfigurationRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentGoogleChatConfigurationDataRequest data; + + public IncidentGoogleChatConfigurationRequest() {} + + @JsonCreator + public IncidentGoogleChatConfigurationRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentGoogleChatConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentGoogleChatConfigurationRequest data( + IncidentGoogleChatConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Chat configuration data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleChatConfigurationDataRequest getData() { + return data; + } + + public void setData(IncidentGoogleChatConfigurationDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationRequest + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleChatConfigurationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationRequest incidentGoogleChatConfigurationRequest = + (IncidentGoogleChatConfigurationRequest) o; + return Objects.equals(this.data, incidentGoogleChatConfigurationRequest.data) + && Objects.equals( + this.additionalProperties, incidentGoogleChatConfigurationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationResponse.java new file mode 100644 index 00000000000..3fff88674cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationResponse.java @@ -0,0 +1,171 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a Google Chat configuration. */ +@JsonPropertyOrder({ + IncidentGoogleChatConfigurationResponse.JSON_PROPERTY_DATA, + IncidentGoogleChatConfigurationResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleChatConfigurationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentGoogleChatConfigurationDataResponse data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentGoogleChatConfigurationResponse() {} + + @JsonCreator + public IncidentGoogleChatConfigurationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentGoogleChatConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentGoogleChatConfigurationResponse data( + IncidentGoogleChatConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Chat configuration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleChatConfigurationDataResponse getData() { + return data; + } + + public void setData(IncidentGoogleChatConfigurationDataResponse data) { + this.data = data; + } + + /** + * Included related resources. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleChatConfigurationResponse + */ + @JsonAnySetter + public IncidentGoogleChatConfigurationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleChatConfigurationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleChatConfigurationResponse incidentGoogleChatConfigurationResponse = + (IncidentGoogleChatConfigurationResponse) o; + return Objects.equals(this.data, incidentGoogleChatConfigurationResponse.data) + && Objects.equals(this.included, incidentGoogleChatConfigurationResponse.included) + && Objects.equals( + this.additionalProperties, + incidentGoogleChatConfigurationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleChatConfigurationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationType.java new file mode 100644 index 00000000000..ca74f2a23f0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleChatConfigurationType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Google Chat configuration resource type. */ +@JsonSerialize( + using = IncidentGoogleChatConfigurationType.IncidentGoogleChatConfigurationTypeSerializer.class) +public class IncidentGoogleChatConfigurationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("google_chat_configurations")); + + public static final IncidentGoogleChatConfigurationType GOOGLE_CHAT_CONFIGURATIONS = + new IncidentGoogleChatConfigurationType("google_chat_configurations"); + + IncidentGoogleChatConfigurationType(String value) { + super(value, allowedValues); + } + + public static class IncidentGoogleChatConfigurationTypeSerializer + extends StdSerializer { + public IncidentGoogleChatConfigurationTypeSerializer( + Class t) { + super(t); + } + + public IncidentGoogleChatConfigurationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentGoogleChatConfigurationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentGoogleChatConfigurationType fromValue(String value) { + return new IncidentGoogleChatConfigurationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataAttributesRequest.java new file mode 100644 index 00000000000..ed7b53db343 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataAttributesRequest.java @@ -0,0 +1,188 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating a Google Meet configuration. */ +@JsonPropertyOrder({ + IncidentGoogleMeetConfigurationDataAttributesRequest.JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION, + IncidentGoogleMeetConfigurationDataAttributesRequest.JSON_PROPERTY_AUTO_SUMMARIZE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION = + "allow_manual_meeting_creation"; + private Boolean allowManualMeetingCreation; + + public static final String JSON_PROPERTY_AUTO_SUMMARIZE = "auto_summarize"; + private Boolean autoSummarize; + + public IncidentGoogleMeetConfigurationDataAttributesRequest() {} + + @JsonCreator + public IncidentGoogleMeetConfigurationDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION) + Boolean allowManualMeetingCreation, + @JsonProperty(required = true, value = JSON_PROPERTY_AUTO_SUMMARIZE) Boolean autoSummarize) { + this.allowManualMeetingCreation = allowManualMeetingCreation; + this.autoSummarize = autoSummarize; + } + + public IncidentGoogleMeetConfigurationDataAttributesRequest allowManualMeetingCreation( + Boolean allowManualMeetingCreation) { + this.allowManualMeetingCreation = allowManualMeetingCreation; + return this; + } + + /** + * Whether to allow manual meeting creation. + * + * @return allowManualMeetingCreation + */ + @JsonProperty(JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAllowManualMeetingCreation() { + return allowManualMeetingCreation; + } + + public void setAllowManualMeetingCreation(Boolean allowManualMeetingCreation) { + this.allowManualMeetingCreation = allowManualMeetingCreation; + } + + public IncidentGoogleMeetConfigurationDataAttributesRequest autoSummarize(Boolean autoSummarize) { + this.autoSummarize = autoSummarize; + return this; + } + + /** + * Whether to auto-summarize meetings. + * + * @return autoSummarize + */ + @JsonProperty(JSON_PROPERTY_AUTO_SUMMARIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAutoSummarize() { + return autoSummarize; + } + + public void setAutoSummarize(Boolean autoSummarize) { + this.autoSummarize = autoSummarize; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationDataAttributesRequest + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentGoogleMeetConfigurationDataAttributesRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationDataAttributesRequest + incidentGoogleMeetConfigurationDataAttributesRequest = + (IncidentGoogleMeetConfigurationDataAttributesRequest) o; + return Objects.equals( + this.allowManualMeetingCreation, + incidentGoogleMeetConfigurationDataAttributesRequest.allowManualMeetingCreation) + && Objects.equals( + this.autoSummarize, incidentGoogleMeetConfigurationDataAttributesRequest.autoSummarize) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(allowManualMeetingCreation, autoSummarize, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationDataAttributesRequest {\n"); + sb.append(" allowManualMeetingCreation: ") + .append(toIndentedString(allowManualMeetingCreation)) + .append("\n"); + sb.append(" autoSummarize: ").append(toIndentedString(autoSummarize)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataAttributesResponse.java new file mode 100644 index 00000000000..40e5abbb07c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataAttributesResponse.java @@ -0,0 +1,249 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Google Meet configuration. */ +@JsonPropertyOrder({ + IncidentGoogleMeetConfigurationDataAttributesResponse.JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION, + IncidentGoogleMeetConfigurationDataAttributesResponse.JSON_PROPERTY_AUTO_SUMMARIZE, + IncidentGoogleMeetConfigurationDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + IncidentGoogleMeetConfigurationDataAttributesResponse.JSON_PROPERTY_MODIFIED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION = + "allow_manual_meeting_creation"; + private Boolean allowManualMeetingCreation; + + public static final String JSON_PROPERTY_AUTO_SUMMARIZE = "auto_summarize"; + private Boolean autoSummarize; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public IncidentGoogleMeetConfigurationDataAttributesResponse() {} + + @JsonCreator + public IncidentGoogleMeetConfigurationDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION) + Boolean allowManualMeetingCreation, + @JsonProperty(required = true, value = JSON_PROPERTY_AUTO_SUMMARIZE) Boolean autoSummarize, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt) { + this.allowManualMeetingCreation = allowManualMeetingCreation; + this.autoSummarize = autoSummarize; + this.modifiedAt = modifiedAt; + } + + public IncidentGoogleMeetConfigurationDataAttributesResponse allowManualMeetingCreation( + Boolean allowManualMeetingCreation) { + this.allowManualMeetingCreation = allowManualMeetingCreation; + return this; + } + + /** + * Whether manual meeting creation is allowed. + * + * @return allowManualMeetingCreation + */ + @JsonProperty(JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAllowManualMeetingCreation() { + return allowManualMeetingCreation; + } + + public void setAllowManualMeetingCreation(Boolean allowManualMeetingCreation) { + this.allowManualMeetingCreation = allowManualMeetingCreation; + } + + public IncidentGoogleMeetConfigurationDataAttributesResponse autoSummarize( + Boolean autoSummarize) { + this.autoSummarize = autoSummarize; + return this; + } + + /** + * Whether meetings are auto-summarized. + * + * @return autoSummarize + */ + @JsonProperty(JSON_PROPERTY_AUTO_SUMMARIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAutoSummarize() { + return autoSummarize; + } + + public void setAutoSummarize(Boolean autoSummarize) { + this.autoSummarize = autoSummarize; + } + + public IncidentGoogleMeetConfigurationDataAttributesResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the configuration was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public IncidentGoogleMeetConfigurationDataAttributesResponse modifiedAt( + OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Timestamp when the configuration was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationDataAttributesResponse + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationDataAttributesResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentGoogleMeetConfigurationDataAttributesResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationDataAttributesResponse + incidentGoogleMeetConfigurationDataAttributesResponse = + (IncidentGoogleMeetConfigurationDataAttributesResponse) o; + return Objects.equals( + this.allowManualMeetingCreation, + incidentGoogleMeetConfigurationDataAttributesResponse.allowManualMeetingCreation) + && Objects.equals( + this.autoSummarize, incidentGoogleMeetConfigurationDataAttributesResponse.autoSummarize) + && Objects.equals( + this.createdAt, incidentGoogleMeetConfigurationDataAttributesResponse.createdAt) + && Objects.equals( + this.modifiedAt, incidentGoogleMeetConfigurationDataAttributesResponse.modifiedAt) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + allowManualMeetingCreation, autoSummarize, createdAt, modifiedAt, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationDataAttributesResponse {\n"); + sb.append(" allowManualMeetingCreation: ") + .append(toIndentedString(allowManualMeetingCreation)) + .append("\n"); + sb.append(" autoSummarize: ").append(toIndentedString(autoSummarize)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataRequest.java new file mode 100644 index 00000000000..81d026db7d9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataRequest.java @@ -0,0 +1,220 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Google Meet configuration data in a create request. */ +@JsonPropertyOrder({ + IncidentGoogleMeetConfigurationDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentGoogleMeetConfigurationDataRequest.JSON_PROPERTY_RELATIONSHIPS, + IncidentGoogleMeetConfigurationDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentGoogleMeetConfigurationDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentGoogleMeetConfigurationRelationshipsRequest relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentGoogleMeetConfigurationType type; + + public IncidentGoogleMeetConfigurationDataRequest() {} + + @JsonCreator + public IncidentGoogleMeetConfigurationDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentGoogleMeetConfigurationDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + IncidentGoogleMeetConfigurationRelationshipsRequest relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentGoogleMeetConfigurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentGoogleMeetConfigurationDataRequest attributes( + IncidentGoogleMeetConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a Google Meet configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetConfigurationDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentGoogleMeetConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentGoogleMeetConfigurationDataRequest relationships( + IncidentGoogleMeetConfigurationRelationshipsRequest relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for a Google Meet configuration create request. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetConfigurationRelationshipsRequest getRelationships() { + return relationships; + } + + public void setRelationships(IncidentGoogleMeetConfigurationRelationshipsRequest relationships) { + this.relationships = relationships; + } + + public IncidentGoogleMeetConfigurationDataRequest type(IncidentGoogleMeetConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Meet configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetConfigurationType getType() { + return type; + } + + public void setType(IncidentGoogleMeetConfigurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationDataRequest + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationDataRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleMeetConfigurationDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationDataRequest incidentGoogleMeetConfigurationDataRequest = + (IncidentGoogleMeetConfigurationDataRequest) o; + return Objects.equals(this.attributes, incidentGoogleMeetConfigurationDataRequest.attributes) + && Objects.equals( + this.relationships, incidentGoogleMeetConfigurationDataRequest.relationships) + && Objects.equals(this.type, incidentGoogleMeetConfigurationDataRequest.type) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataResponse.java new file mode 100644 index 00000000000..80b2530fe34 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationDataResponse.java @@ -0,0 +1,247 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Google Meet configuration data in a response. */ +@JsonPropertyOrder({ + IncidentGoogleMeetConfigurationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentGoogleMeetConfigurationDataResponse.JSON_PROPERTY_ID, + IncidentGoogleMeetConfigurationDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentGoogleMeetConfigurationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentGoogleMeetConfigurationDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentGoogleMeetConfigurationRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentGoogleMeetConfigurationType type; + + public IncidentGoogleMeetConfigurationDataResponse() {} + + @JsonCreator + public IncidentGoogleMeetConfigurationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentGoogleMeetConfigurationDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentGoogleMeetConfigurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentGoogleMeetConfigurationDataResponse attributes( + IncidentGoogleMeetConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Google Meet configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetConfigurationDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentGoogleMeetConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentGoogleMeetConfigurationDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The configuration identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentGoogleMeetConfigurationDataResponse relationships( + IncidentGoogleMeetConfigurationRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for a Google Meet configuration. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentGoogleMeetConfigurationRelationships getRelationships() { + return relationships; + } + + public void setRelationships(IncidentGoogleMeetConfigurationRelationships relationships) { + this.relationships = relationships; + } + + public IncidentGoogleMeetConfigurationDataResponse type( + IncidentGoogleMeetConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Meet configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetConfigurationType getType() { + return type; + } + + public void setType(IncidentGoogleMeetConfigurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationDataResponse + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationDataResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleMeetConfigurationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationDataResponse incidentGoogleMeetConfigurationDataResponse = + (IncidentGoogleMeetConfigurationDataResponse) o; + return Objects.equals(this.attributes, incidentGoogleMeetConfigurationDataResponse.attributes) + && Objects.equals(this.id, incidentGoogleMeetConfigurationDataResponse.id) + && Objects.equals( + this.relationships, incidentGoogleMeetConfigurationDataResponse.relationships) + && Objects.equals(this.type, incidentGoogleMeetConfigurationDataResponse.type) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchDataAttributesRequest.java new file mode 100644 index 00000000000..265bae11af2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchDataAttributesRequest.java @@ -0,0 +1,182 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for patching a Google Meet configuration. All fields are optional. */ +@JsonPropertyOrder({ + IncidentGoogleMeetConfigurationPatchDataAttributesRequest + .JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION, + IncidentGoogleMeetConfigurationPatchDataAttributesRequest.JSON_PROPERTY_AUTO_SUMMARIZE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationPatchDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION = + "allow_manual_meeting_creation"; + private Boolean allowManualMeetingCreation; + + public static final String JSON_PROPERTY_AUTO_SUMMARIZE = "auto_summarize"; + private Boolean autoSummarize; + + public IncidentGoogleMeetConfigurationPatchDataAttributesRequest allowManualMeetingCreation( + Boolean allowManualMeetingCreation) { + this.allowManualMeetingCreation = allowManualMeetingCreation; + return this; + } + + /** + * Whether to allow manual meeting creation. + * + * @return allowManualMeetingCreation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_MANUAL_MEETING_CREATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowManualMeetingCreation() { + return allowManualMeetingCreation; + } + + public void setAllowManualMeetingCreation(Boolean allowManualMeetingCreation) { + this.allowManualMeetingCreation = allowManualMeetingCreation; + } + + public IncidentGoogleMeetConfigurationPatchDataAttributesRequest autoSummarize( + Boolean autoSummarize) { + this.autoSummarize = autoSummarize; + return this; + } + + /** + * Whether to auto-summarize meetings. + * + * @return autoSummarize + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTO_SUMMARIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAutoSummarize() { + return autoSummarize; + } + + public void setAutoSummarize(Boolean autoSummarize) { + this.autoSummarize = autoSummarize; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationPatchDataAttributesRequest + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationPatchDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentGoogleMeetConfigurationPatchDataAttributesRequest object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationPatchDataAttributesRequest + incidentGoogleMeetConfigurationPatchDataAttributesRequest = + (IncidentGoogleMeetConfigurationPatchDataAttributesRequest) o; + return Objects.equals( + this.allowManualMeetingCreation, + incidentGoogleMeetConfigurationPatchDataAttributesRequest.allowManualMeetingCreation) + && Objects.equals( + this.autoSummarize, + incidentGoogleMeetConfigurationPatchDataAttributesRequest.autoSummarize) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationPatchDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(allowManualMeetingCreation, autoSummarize, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationPatchDataAttributesRequest {\n"); + sb.append(" allowManualMeetingCreation: ") + .append(toIndentedString(allowManualMeetingCreation)) + .append("\n"); + sb.append(" autoSummarize: ").append(toIndentedString(autoSummarize)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchDataRequest.java new file mode 100644 index 00000000000..566abb5122e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchDataRequest.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Google Meet configuration data in a patch request. */ +@JsonPropertyOrder({ + IncidentGoogleMeetConfigurationPatchDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentGoogleMeetConfigurationPatchDataRequest.JSON_PROPERTY_ID, + IncidentGoogleMeetConfigurationPatchDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationPatchDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentGoogleMeetConfigurationPatchDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentGoogleMeetConfigurationType type; + + public IncidentGoogleMeetConfigurationPatchDataRequest() {} + + @JsonCreator + public IncidentGoogleMeetConfigurationPatchDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentGoogleMeetConfigurationType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentGoogleMeetConfigurationPatchDataRequest attributes( + IncidentGoogleMeetConfigurationPatchDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for patching a Google Meet configuration. All fields are optional. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentGoogleMeetConfigurationPatchDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentGoogleMeetConfigurationPatchDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentGoogleMeetConfigurationPatchDataRequest id(UUID id) { + this.id = id; + return this; + } + + /** + * The configuration identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentGoogleMeetConfigurationPatchDataRequest type( + IncidentGoogleMeetConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Meet configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetConfigurationType getType() { + return type; + } + + public void setType(IncidentGoogleMeetConfigurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationPatchDataRequest + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationPatchDataRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleMeetConfigurationPatchDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationPatchDataRequest + incidentGoogleMeetConfigurationPatchDataRequest = + (IncidentGoogleMeetConfigurationPatchDataRequest) o; + return Objects.equals( + this.attributes, incidentGoogleMeetConfigurationPatchDataRequest.attributes) + && Objects.equals(this.id, incidentGoogleMeetConfigurationPatchDataRequest.id) + && Objects.equals(this.type, incidentGoogleMeetConfigurationPatchDataRequest.type) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationPatchDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationPatchDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchRequest.java new file mode 100644 index 00000000000..6fc3e1dbf06 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationPatchRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for patching a Google Meet configuration. */ +@JsonPropertyOrder({IncidentGoogleMeetConfigurationPatchRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationPatchRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentGoogleMeetConfigurationPatchDataRequest data; + + public IncidentGoogleMeetConfigurationPatchRequest() {} + + @JsonCreator + public IncidentGoogleMeetConfigurationPatchRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentGoogleMeetConfigurationPatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentGoogleMeetConfigurationPatchRequest data( + IncidentGoogleMeetConfigurationPatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Meet configuration data in a patch request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetConfigurationPatchDataRequest getData() { + return data; + } + + public void setData(IncidentGoogleMeetConfigurationPatchDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationPatchRequest + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationPatchRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleMeetConfigurationPatchRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationPatchRequest incidentGoogleMeetConfigurationPatchRequest = + (IncidentGoogleMeetConfigurationPatchRequest) o; + return Objects.equals(this.data, incidentGoogleMeetConfigurationPatchRequest.data) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationPatchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationPatchRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRelationships.java new file mode 100644 index 00000000000..4f7a9225e30 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRelationships.java @@ -0,0 +1,205 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for a Google Meet configuration. */ +@JsonPropertyOrder({ + IncidentGoogleMeetConfigurationRelationships.JSON_PROPERTY_CREATED_BY_USER, + IncidentGoogleMeetConfigurationRelationships.JSON_PROPERTY_INCIDENT_TYPE, + IncidentGoogleMeetConfigurationRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private RelationshipToUser createdByUser; + + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private RelationshipToIncidentType incidentType; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private RelationshipToUser lastModifiedByUser; + + public IncidentGoogleMeetConfigurationRelationships createdByUser( + RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + } + + public IncidentGoogleMeetConfigurationRelationships incidentType( + RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + return this; + } + + /** + * Relationship to an incident type. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToIncidentType getIncidentType() { + return incidentType; + } + + public void setIncidentType(RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + } + + public IncidentGoogleMeetConfigurationRelationships lastModifiedByUser( + RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser(RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationRelationships + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationRelationships putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleMeetConfigurationRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationRelationships incidentGoogleMeetConfigurationRelationships = + (IncidentGoogleMeetConfigurationRelationships) o; + return Objects.equals( + this.createdByUser, incidentGoogleMeetConfigurationRelationships.createdByUser) + && Objects.equals( + this.incidentType, incidentGoogleMeetConfigurationRelationships.incidentType) + && Objects.equals( + this.lastModifiedByUser, + incidentGoogleMeetConfigurationRelationships.lastModifiedByUser) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, incidentType, lastModifiedByUser, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRelationshipsRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRelationshipsRequest.java new file mode 100644 index 00000000000..14feb2f8706 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRelationshipsRequest.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for a Google Meet configuration create request. */ +@JsonPropertyOrder({ + IncidentGoogleMeetConfigurationRelationshipsRequest.JSON_PROPERTY_INCIDENT_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationRelationshipsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private RelationshipToIncidentType incidentType; + + public IncidentGoogleMeetConfigurationRelationshipsRequest() {} + + @JsonCreator + public IncidentGoogleMeetConfigurationRelationshipsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_TYPE) + RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + } + + public IncidentGoogleMeetConfigurationRelationshipsRequest incidentType( + RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + return this; + } + + /** + * Relationship to an incident type. + * + * @return incidentType + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RelationshipToIncidentType getIncidentType() { + return incidentType; + } + + public void setIncidentType(RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationRelationshipsRequest + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationRelationshipsRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentGoogleMeetConfigurationRelationshipsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationRelationshipsRequest + incidentGoogleMeetConfigurationRelationshipsRequest = + (IncidentGoogleMeetConfigurationRelationshipsRequest) o; + return Objects.equals( + this.incidentType, incidentGoogleMeetConfigurationRelationshipsRequest.incidentType) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationRelationshipsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationRelationshipsRequest {\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRequest.java new file mode 100644 index 00000000000..fd6f5a4f90b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating a Google Meet configuration. */ +@JsonPropertyOrder({IncidentGoogleMeetConfigurationRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentGoogleMeetConfigurationDataRequest data; + + public IncidentGoogleMeetConfigurationRequest() {} + + @JsonCreator + public IncidentGoogleMeetConfigurationRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentGoogleMeetConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentGoogleMeetConfigurationRequest data( + IncidentGoogleMeetConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Meet configuration data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetConfigurationDataRequest getData() { + return data; + } + + public void setData(IncidentGoogleMeetConfigurationDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationRequest + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleMeetConfigurationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationRequest incidentGoogleMeetConfigurationRequest = + (IncidentGoogleMeetConfigurationRequest) o; + return Objects.equals(this.data, incidentGoogleMeetConfigurationRequest.data) + && Objects.equals( + this.additionalProperties, incidentGoogleMeetConfigurationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationResponse.java new file mode 100644 index 00000000000..cdea0435d0f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationResponse.java @@ -0,0 +1,171 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a Google Meet configuration. */ +@JsonPropertyOrder({ + IncidentGoogleMeetConfigurationResponse.JSON_PROPERTY_DATA, + IncidentGoogleMeetConfigurationResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetConfigurationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentGoogleMeetConfigurationDataResponse data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentGoogleMeetConfigurationResponse() {} + + @JsonCreator + public IncidentGoogleMeetConfigurationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentGoogleMeetConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentGoogleMeetConfigurationResponse data( + IncidentGoogleMeetConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Meet configuration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetConfigurationDataResponse getData() { + return data; + } + + public void setData(IncidentGoogleMeetConfigurationDataResponse data) { + this.data = data; + } + + /** + * Included related resources. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentGoogleMeetConfigurationResponse + */ + @JsonAnySetter + public IncidentGoogleMeetConfigurationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentGoogleMeetConfigurationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetConfigurationResponse incidentGoogleMeetConfigurationResponse = + (IncidentGoogleMeetConfigurationResponse) o; + return Objects.equals(this.data, incidentGoogleMeetConfigurationResponse.data) + && Objects.equals(this.included, incidentGoogleMeetConfigurationResponse.included) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetConfigurationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetConfigurationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationType.java new file mode 100644 index 00000000000..991e506149d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetConfigurationType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Google Meet configuration resource type. */ +@JsonSerialize( + using = IncidentGoogleMeetConfigurationType.IncidentGoogleMeetConfigurationTypeSerializer.class) +public class IncidentGoogleMeetConfigurationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("google_meet_configurations")); + + public static final IncidentGoogleMeetConfigurationType GOOGLE_MEET_CONFIGURATIONS = + new IncidentGoogleMeetConfigurationType("google_meet_configurations"); + + IncidentGoogleMeetConfigurationType(String value) { + super(value, allowedValues); + } + + public static class IncidentGoogleMeetConfigurationTypeSerializer + extends StdSerializer { + public IncidentGoogleMeetConfigurationTypeSerializer( + Class t) { + super(t); + } + + public IncidentGoogleMeetConfigurationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentGoogleMeetConfigurationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentGoogleMeetConfigurationType fromValue(String value) { + return new IncidentGoogleMeetConfigurationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldChoice.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldChoice.java new file mode 100644 index 00000000000..e75a85d6148 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldChoice.java @@ -0,0 +1,201 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A choice option for a dropdown or multiselect impact field. */ +@JsonPropertyOrder({ + IncidentImpactFieldChoice.JSON_PROPERTY_DESCRIPTION, + IncidentImpactFieldChoice.JSON_PROPERTY_DISPLAY_NAME, + IncidentImpactFieldChoice.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldChoice { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public IncidentImpactFieldChoice() {} + + @JsonCreator + public IncidentImpactFieldChoice( + @JsonProperty(required = true, value = JSON_PROPERTY_DISPLAY_NAME) String displayName, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.displayName = displayName; + this.value = value; + } + + public IncidentImpactFieldChoice description(String description) { + this.description = description; + return this; + } + + /** + * The description of the choice. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public IncidentImpactFieldChoice displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name of the choice. + * + * @return displayName + */ + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public IncidentImpactFieldChoice value(String value) { + this.value = value; + return this; + } + + /** + * The value of the choice. + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldChoice + */ + @JsonAnySetter + public IncidentImpactFieldChoice putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldChoice object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldChoice incidentImpactFieldChoice = (IncidentImpactFieldChoice) o; + return Objects.equals(this.description, incidentImpactFieldChoice.description) + && Objects.equals(this.displayName, incidentImpactFieldChoice.displayName) + && Objects.equals(this.value, incidentImpactFieldChoice.value) + && Objects.equals( + this.additionalProperties, incidentImpactFieldChoice.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, displayName, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldChoice {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataAttributesRequest.java new file mode 100644 index 00000000000..c5771a0e8a2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataAttributesRequest.java @@ -0,0 +1,292 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes for creating an impact field. */ +@JsonPropertyOrder({ + IncidentImpactFieldDataAttributesRequest.JSON_PROPERTY_DISPLAY_NAME, + IncidentImpactFieldDataAttributesRequest.JSON_PROPERTY_FIELD_CHOICES, + IncidentImpactFieldDataAttributesRequest.JSON_PROPERTY_FIELD_TYPE, + IncidentImpactFieldDataAttributesRequest.JSON_PROPERTY_NAME, + IncidentImpactFieldDataAttributesRequest.JSON_PROPERTY_TAG_KEY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_FIELD_CHOICES = "field_choices"; + private List fieldChoices = null; + + public static final String JSON_PROPERTY_FIELD_TYPE = "field_type"; + private IncidentImpactFieldValueType fieldType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TAG_KEY = "tag_key"; + private JsonNullable tagKey = JsonNullable.undefined(); + + public IncidentImpactFieldDataAttributesRequest() {} + + @JsonCreator + public IncidentImpactFieldDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DISPLAY_NAME) String displayName, + @JsonProperty(required = true, value = JSON_PROPERTY_FIELD_TYPE) + IncidentImpactFieldValueType fieldType, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.displayName = displayName; + this.fieldType = fieldType; + this.unparsed |= !fieldType.isValid(); + this.name = name; + } + + public IncidentImpactFieldDataAttributesRequest displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name of the impact field. + * + * @return displayName + */ + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public IncidentImpactFieldDataAttributesRequest fieldChoices( + List fieldChoices) { + this.fieldChoices = fieldChoices; + for (IncidentImpactFieldChoice item : fieldChoices) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentImpactFieldDataAttributesRequest addFieldChoicesItem( + IncidentImpactFieldChoice fieldChoicesItem) { + if (this.fieldChoices == null) { + this.fieldChoices = new ArrayList<>(); + } + this.fieldChoices.add(fieldChoicesItem); + this.unparsed |= fieldChoicesItem.unparsed; + return this; + } + + /** + * The choices for dropdown or multiselect fields. + * + * @return fieldChoices + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFieldChoices() { + return fieldChoices; + } + + public void setFieldChoices(List fieldChoices) { + this.fieldChoices = fieldChoices; + } + + public IncidentImpactFieldDataAttributesRequest fieldType( + IncidentImpactFieldValueType fieldType) { + this.fieldType = fieldType; + this.unparsed |= !fieldType.isValid(); + return this; + } + + /** + * The type of an impact field. + * + * @return fieldType + */ + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactFieldValueType getFieldType() { + return fieldType; + } + + public void setFieldType(IncidentImpactFieldValueType fieldType) { + if (!fieldType.isValid()) { + this.unparsed = true; + } + this.fieldType = fieldType; + } + + public IncidentImpactFieldDataAttributesRequest name(String name) { + this.name = name; + return this; + } + + /** + * The normalized name of the impact field (used as identifier). + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public IncidentImpactFieldDataAttributesRequest tagKey(String tagKey) { + this.tagKey = JsonNullable.of(tagKey); + return this; + } + + /** + * The tag key associated with the field (for metrictag type). + * + * @return tagKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTagKey() { + return tagKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAG_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTagKey_JsonNullable() { + return tagKey; + } + + @JsonProperty(JSON_PROPERTY_TAG_KEY) + public void setTagKey_JsonNullable(JsonNullable tagKey) { + this.tagKey = tagKey; + } + + public void setTagKey(String tagKey) { + this.tagKey = JsonNullable.of(tagKey); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldDataAttributesRequest + */ + @JsonAnySetter + public IncidentImpactFieldDataAttributesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldDataAttributesRequest incidentImpactFieldDataAttributesRequest = + (IncidentImpactFieldDataAttributesRequest) o; + return Objects.equals(this.displayName, incidentImpactFieldDataAttributesRequest.displayName) + && Objects.equals(this.fieldChoices, incidentImpactFieldDataAttributesRequest.fieldChoices) + && Objects.equals(this.fieldType, incidentImpactFieldDataAttributesRequest.fieldType) + && Objects.equals(this.name, incidentImpactFieldDataAttributesRequest.name) + && Objects.equals(this.tagKey, incidentImpactFieldDataAttributesRequest.tagKey) + && Objects.equals( + this.additionalProperties, + incidentImpactFieldDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(displayName, fieldChoices, fieldType, name, tagKey, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldDataAttributesRequest {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" fieldChoices: ").append(toIndentedString(fieldChoices)).append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tagKey: ").append(toIndentedString(tagKey)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataAttributesResponse.java new file mode 100644 index 00000000000..0fc33ee42d0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataAttributesResponse.java @@ -0,0 +1,292 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an impact field in a response. */ +@JsonPropertyOrder({ + IncidentImpactFieldDataAttributesResponse.JSON_PROPERTY_DISPLAY_NAME, + IncidentImpactFieldDataAttributesResponse.JSON_PROPERTY_FIELD_CHOICES, + IncidentImpactFieldDataAttributesResponse.JSON_PROPERTY_FIELD_TYPE, + IncidentImpactFieldDataAttributesResponse.JSON_PROPERTY_NAME, + IncidentImpactFieldDataAttributesResponse.JSON_PROPERTY_TAG_KEY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_FIELD_CHOICES = "field_choices"; + private List fieldChoices = null; + + public static final String JSON_PROPERTY_FIELD_TYPE = "field_type"; + private IncidentImpactFieldValueType fieldType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TAG_KEY = "tag_key"; + private JsonNullable tagKey = JsonNullable.undefined(); + + public IncidentImpactFieldDataAttributesResponse() {} + + @JsonCreator + public IncidentImpactFieldDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DISPLAY_NAME) String displayName, + @JsonProperty(required = true, value = JSON_PROPERTY_FIELD_TYPE) + IncidentImpactFieldValueType fieldType, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.displayName = displayName; + this.fieldType = fieldType; + this.unparsed |= !fieldType.isValid(); + this.name = name; + } + + public IncidentImpactFieldDataAttributesResponse displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name of the impact field. + * + * @return displayName + */ + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public IncidentImpactFieldDataAttributesResponse fieldChoices( + List fieldChoices) { + this.fieldChoices = fieldChoices; + for (IncidentImpactFieldChoice item : fieldChoices) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentImpactFieldDataAttributesResponse addFieldChoicesItem( + IncidentImpactFieldChoice fieldChoicesItem) { + if (this.fieldChoices == null) { + this.fieldChoices = new ArrayList<>(); + } + this.fieldChoices.add(fieldChoicesItem); + this.unparsed |= fieldChoicesItem.unparsed; + return this; + } + + /** + * The choices for dropdown or multiselect fields. + * + * @return fieldChoices + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFieldChoices() { + return fieldChoices; + } + + public void setFieldChoices(List fieldChoices) { + this.fieldChoices = fieldChoices; + } + + public IncidentImpactFieldDataAttributesResponse fieldType( + IncidentImpactFieldValueType fieldType) { + this.fieldType = fieldType; + this.unparsed |= !fieldType.isValid(); + return this; + } + + /** + * The type of an impact field. + * + * @return fieldType + */ + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactFieldValueType getFieldType() { + return fieldType; + } + + public void setFieldType(IncidentImpactFieldValueType fieldType) { + if (!fieldType.isValid()) { + this.unparsed = true; + } + this.fieldType = fieldType; + } + + public IncidentImpactFieldDataAttributesResponse name(String name) { + this.name = name; + return this; + } + + /** + * The normalized name of the impact field. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public IncidentImpactFieldDataAttributesResponse tagKey(String tagKey) { + this.tagKey = JsonNullable.of(tagKey); + return this; + } + + /** + * The tag key associated with the field. + * + * @return tagKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTagKey() { + return tagKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAG_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTagKey_JsonNullable() { + return tagKey; + } + + @JsonProperty(JSON_PROPERTY_TAG_KEY) + public void setTagKey_JsonNullable(JsonNullable tagKey) { + this.tagKey = tagKey; + } + + public void setTagKey(String tagKey) { + this.tagKey = JsonNullable.of(tagKey); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldDataAttributesResponse + */ + @JsonAnySetter + public IncidentImpactFieldDataAttributesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldDataAttributesResponse incidentImpactFieldDataAttributesResponse = + (IncidentImpactFieldDataAttributesResponse) o; + return Objects.equals(this.displayName, incidentImpactFieldDataAttributesResponse.displayName) + && Objects.equals(this.fieldChoices, incidentImpactFieldDataAttributesResponse.fieldChoices) + && Objects.equals(this.fieldType, incidentImpactFieldDataAttributesResponse.fieldType) + && Objects.equals(this.name, incidentImpactFieldDataAttributesResponse.name) + && Objects.equals(this.tagKey, incidentImpactFieldDataAttributesResponse.tagKey) + && Objects.equals( + this.additionalProperties, + incidentImpactFieldDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(displayName, fieldChoices, fieldType, name, tagKey, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldDataAttributesResponse {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" fieldChoices: ").append(toIndentedString(fieldChoices)).append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tagKey: ").append(toIndentedString(tagKey)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataRequest.java new file mode 100644 index 00000000000..8e260eaafaf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataRequest.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Impact field data in a create request. */ +@JsonPropertyOrder({ + IncidentImpactFieldDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentImpactFieldDataRequest.JSON_PROPERTY_RELATIONSHIPS, + IncidentImpactFieldDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentImpactFieldDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentImpactFieldRelationshipsRequest relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentImpactFieldType type; + + public IncidentImpactFieldDataRequest() {} + + @JsonCreator + public IncidentImpactFieldDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentImpactFieldDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + IncidentImpactFieldRelationshipsRequest relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentImpactFieldType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentImpactFieldDataRequest attributes( + IncidentImpactFieldDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating an impact field. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactFieldDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentImpactFieldDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentImpactFieldDataRequest relationships( + IncidentImpactFieldRelationshipsRequest relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for an impact field create request. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactFieldRelationshipsRequest getRelationships() { + return relationships; + } + + public void setRelationships(IncidentImpactFieldRelationshipsRequest relationships) { + this.relationships = relationships; + } + + public IncidentImpactFieldDataRequest type(IncidentImpactFieldType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Impact field resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactFieldType getType() { + return type; + } + + public void setType(IncidentImpactFieldType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldDataRequest + */ + @JsonAnySetter + public IncidentImpactFieldDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldDataRequest incidentImpactFieldDataRequest = + (IncidentImpactFieldDataRequest) o; + return Objects.equals(this.attributes, incidentImpactFieldDataRequest.attributes) + && Objects.equals(this.relationships, incidentImpactFieldDataRequest.relationships) + && Objects.equals(this.type, incidentImpactFieldDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentImpactFieldDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataResponse.java new file mode 100644 index 00000000000..c9343099ddc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldDataResponse.java @@ -0,0 +1,242 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Impact field data in a response. */ +@JsonPropertyOrder({ + IncidentImpactFieldDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentImpactFieldDataResponse.JSON_PROPERTY_ID, + IncidentImpactFieldDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentImpactFieldDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentImpactFieldDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentImpactFieldRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentImpactFieldType type; + + public IncidentImpactFieldDataResponse() {} + + @JsonCreator + public IncidentImpactFieldDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentImpactFieldDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentImpactFieldType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentImpactFieldDataResponse attributes( + IncidentImpactFieldDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an impact field in a response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactFieldDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentImpactFieldDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentImpactFieldDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The impact field identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentImpactFieldDataResponse relationships( + IncidentImpactFieldRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for an impact field. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentImpactFieldRelationships getRelationships() { + return relationships; + } + + public void setRelationships(IncidentImpactFieldRelationships relationships) { + this.relationships = relationships; + } + + public IncidentImpactFieldDataResponse type(IncidentImpactFieldType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Impact field resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactFieldType getType() { + return type; + } + + public void setType(IncidentImpactFieldType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldDataResponse + */ + @JsonAnySetter + public IncidentImpactFieldDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldDataResponse incidentImpactFieldDataResponse = + (IncidentImpactFieldDataResponse) o; + return Objects.equals(this.attributes, incidentImpactFieldDataResponse.attributes) + && Objects.equals(this.id, incidentImpactFieldDataResponse.id) + && Objects.equals(this.relationships, incidentImpactFieldDataResponse.relationships) + && Objects.equals(this.type, incidentImpactFieldDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentImpactFieldDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRelationships.java new file mode 100644 index 00000000000..9a8b65b13b0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRelationships.java @@ -0,0 +1,198 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for an impact field. */ +@JsonPropertyOrder({ + IncidentImpactFieldRelationships.JSON_PROPERTY_CREATED_BY_USER, + IncidentImpactFieldRelationships.JSON_PROPERTY_INCIDENT_TYPE, + IncidentImpactFieldRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private RelationshipToUser createdByUser; + + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private RelationshipToIncidentType incidentType; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private RelationshipToUser lastModifiedByUser; + + public IncidentImpactFieldRelationships createdByUser(RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + } + + public IncidentImpactFieldRelationships incidentType(RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + return this; + } + + /** + * Relationship to an incident type. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToIncidentType getIncidentType() { + return incidentType; + } + + public void setIncidentType(RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + } + + public IncidentImpactFieldRelationships lastModifiedByUser( + RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser(RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldRelationships + */ + @JsonAnySetter + public IncidentImpactFieldRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldRelationships incidentImpactFieldRelationships = + (IncidentImpactFieldRelationships) o; + return Objects.equals(this.createdByUser, incidentImpactFieldRelationships.createdByUser) + && Objects.equals(this.incidentType, incidentImpactFieldRelationships.incidentType) + && Objects.equals( + this.lastModifiedByUser, incidentImpactFieldRelationships.lastModifiedByUser) + && Objects.equals( + this.additionalProperties, incidentImpactFieldRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, incidentType, lastModifiedByUser, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRelationshipsRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRelationshipsRequest.java new file mode 100644 index 00000000000..d904b96a532 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRelationshipsRequest.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for an impact field create request. */ +@JsonPropertyOrder({IncidentImpactFieldRelationshipsRequest.JSON_PROPERTY_INCIDENT_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldRelationshipsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private RelationshipToIncidentType incidentType; + + public IncidentImpactFieldRelationshipsRequest() {} + + @JsonCreator + public IncidentImpactFieldRelationshipsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_TYPE) + RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + } + + public IncidentImpactFieldRelationshipsRequest incidentType( + RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + return this; + } + + /** + * Relationship to an incident type. + * + * @return incidentType + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RelationshipToIncidentType getIncidentType() { + return incidentType; + } + + public void setIncidentType(RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldRelationshipsRequest + */ + @JsonAnySetter + public IncidentImpactFieldRelationshipsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldRelationshipsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldRelationshipsRequest incidentImpactFieldRelationshipsRequest = + (IncidentImpactFieldRelationshipsRequest) o; + return Objects.equals(this.incidentType, incidentImpactFieldRelationshipsRequest.incidentType) + && Objects.equals( + this.additionalProperties, + incidentImpactFieldRelationshipsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldRelationshipsRequest {\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRequest.java new file mode 100644 index 00000000000..0c99f698527 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating an impact field. */ +@JsonPropertyOrder({IncidentImpactFieldRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentImpactFieldDataRequest data; + + public IncidentImpactFieldRequest() {} + + @JsonCreator + public IncidentImpactFieldRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentImpactFieldDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentImpactFieldRequest data(IncidentImpactFieldDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Impact field data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactFieldDataRequest getData() { + return data; + } + + public void setData(IncidentImpactFieldDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldRequest + */ + @JsonAnySetter + public IncidentImpactFieldRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldRequest incidentImpactFieldRequest = (IncidentImpactFieldRequest) o; + return Objects.equals(this.data, incidentImpactFieldRequest.data) + && Objects.equals( + this.additionalProperties, incidentImpactFieldRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldResponse.java new file mode 100644 index 00000000000..42a92c24006 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldResponse.java @@ -0,0 +1,168 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a single impact field. */ +@JsonPropertyOrder({ + IncidentImpactFieldResponse.JSON_PROPERTY_DATA, + IncidentImpactFieldResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentImpactFieldDataResponse data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentImpactFieldResponse() {} + + @JsonCreator + public IncidentImpactFieldResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentImpactFieldDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentImpactFieldResponse data(IncidentImpactFieldDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Impact field data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentImpactFieldDataResponse getData() { + return data; + } + + public void setData(IncidentImpactFieldDataResponse data) { + this.data = data; + } + + /** + * Included related resources. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldResponse + */ + @JsonAnySetter + public IncidentImpactFieldResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldResponse incidentImpactFieldResponse = (IncidentImpactFieldResponse) o; + return Objects.equals(this.data, incidentImpactFieldResponse.data) + && Objects.equals(this.included, incidentImpactFieldResponse.included) + && Objects.equals( + this.additionalProperties, incidentImpactFieldResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldType.java new file mode 100644 index 00000000000..7b5bf795211 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Impact field resource type. */ +@JsonSerialize(using = IncidentImpactFieldType.IncidentImpactFieldTypeSerializer.class) +public class IncidentImpactFieldType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("impact_fields")); + + public static final IncidentImpactFieldType IMPACT_FIELDS = + new IncidentImpactFieldType("impact_fields"); + + IncidentImpactFieldType(String value) { + super(value, allowedValues); + } + + public static class IncidentImpactFieldTypeSerializer + extends StdSerializer { + public IncidentImpactFieldTypeSerializer(Class t) { + super(t); + } + + public IncidentImpactFieldTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentImpactFieldType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentImpactFieldType fromValue(String value) { + return new IncidentImpactFieldType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldValueType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldValueType.java new file mode 100644 index 00000000000..10fde822bb5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldValueType.java @@ -0,0 +1,70 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of an impact field. */ +@JsonSerialize(using = IncidentImpactFieldValueType.IncidentImpactFieldValueTypeSerializer.class) +public class IncidentImpactFieldValueType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "dropdown", "text", "textarray", "metrictag", "number", "datetime", "multiselect")); + + public static final IncidentImpactFieldValueType DROPDOWN = + new IncidentImpactFieldValueType("dropdown"); + public static final IncidentImpactFieldValueType TEXT = new IncidentImpactFieldValueType("text"); + public static final IncidentImpactFieldValueType TEXTARRAY = + new IncidentImpactFieldValueType("textarray"); + public static final IncidentImpactFieldValueType METRICTAG = + new IncidentImpactFieldValueType("metrictag"); + public static final IncidentImpactFieldValueType NUMBER = + new IncidentImpactFieldValueType("number"); + public static final IncidentImpactFieldValueType DATETIME = + new IncidentImpactFieldValueType("datetime"); + public static final IncidentImpactFieldValueType MULTISELECT = + new IncidentImpactFieldValueType("multiselect"); + + IncidentImpactFieldValueType(String value) { + super(value, allowedValues); + } + + public static class IncidentImpactFieldValueTypeSerializer + extends StdSerializer { + public IncidentImpactFieldValueTypeSerializer(Class t) { + super(t); + } + + public IncidentImpactFieldValueTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentImpactFieldValueType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentImpactFieldValueType fromValue(String value) { + return new IncidentImpactFieldValueType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldsResponse.java new file mode 100644 index 00000000000..e66aaa3b75f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentImpactFieldsResponse.java @@ -0,0 +1,176 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a list of impact fields. */ +@JsonPropertyOrder({ + IncidentImpactFieldsResponse.JSON_PROPERTY_DATA, + IncidentImpactFieldsResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentImpactFieldsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentImpactFieldsResponse() {} + + @JsonCreator + public IncidentImpactFieldsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentImpactFieldsResponse data(List data) { + this.data = data; + for (IncidentImpactFieldDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentImpactFieldsResponse addDataItem(IncidentImpactFieldDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of impact fields. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * Included related resources. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentImpactFieldsResponse + */ + @JsonAnySetter + public IncidentImpactFieldsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentImpactFieldsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentImpactFieldsResponse incidentImpactFieldsResponse = (IncidentImpactFieldsResponse) o; + return Objects.equals(this.data, incidentImpactFieldsResponse.data) + && Objects.equals(this.included, incidentImpactFieldsResponse.included) + && Objects.equals( + this.additionalProperties, incidentImpactFieldsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentImpactFieldsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageDataAttributesRequest.java new file mode 100644 index 00000000000..4ecf4cfed41 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageDataAttributesRequest.java @@ -0,0 +1,195 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for linking a page to an incident. */ +@JsonPropertyOrder({ + IncidentOnCallPageDataAttributesRequest.JSON_PROPERTY_KEY, + IncidentOnCallPageDataAttributesRequest.JSON_PROPERTY_PAGE_TARGET, + IncidentOnCallPageDataAttributesRequest.JSON_PROPERTY_TEAM_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentOnCallPageDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_PAGE_TARGET = "page_target"; + private IncidentOnCallPageTarget pageTarget; + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private String teamId; + + public IncidentOnCallPageDataAttributesRequest key(String key) { + this.key = key; + return this; + } + + /** + * The key of the on-call page. + * + * @return key + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public IncidentOnCallPageDataAttributesRequest pageTarget(IncidentOnCallPageTarget pageTarget) { + this.pageTarget = pageTarget; + this.unparsed |= pageTarget.unparsed; + return this; + } + + /** + * The target of an on-call page. + * + * @return pageTarget + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE_TARGET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentOnCallPageTarget getPageTarget() { + return pageTarget; + } + + public void setPageTarget(IncidentOnCallPageTarget pageTarget) { + this.pageTarget = pageTarget; + } + + public IncidentOnCallPageDataAttributesRequest teamId(String teamId) { + this.teamId = teamId; + return this; + } + + /** + * The team ID associated with the page (deprecated, use page_target instead). + * + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTeamId() { + return teamId; + } + + public void setTeamId(String teamId) { + this.teamId = teamId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentOnCallPageDataAttributesRequest + */ + @JsonAnySetter + public IncidentOnCallPageDataAttributesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentOnCallPageDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentOnCallPageDataAttributesRequest incidentOnCallPageDataAttributesRequest = + (IncidentOnCallPageDataAttributesRequest) o; + return Objects.equals(this.key, incidentOnCallPageDataAttributesRequest.key) + && Objects.equals(this.pageTarget, incidentOnCallPageDataAttributesRequest.pageTarget) + && Objects.equals(this.teamId, incidentOnCallPageDataAttributesRequest.teamId) + && Objects.equals( + this.additionalProperties, + incidentOnCallPageDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, pageTarget, teamId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentOnCallPageDataAttributesRequest {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" pageTarget: ").append(toIndentedString(pageTarget)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageDataRequest.java new file mode 100644 index 00000000000..9a3d45b2c50 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageDataRequest.java @@ -0,0 +1,208 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** On-call page data in a link request. */ +@JsonPropertyOrder({ + IncidentOnCallPageDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentOnCallPageDataRequest.JSON_PROPERTY_ID, + IncidentOnCallPageDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentOnCallPageDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentOnCallPageDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentOnCallPageType type; + + public IncidentOnCallPageDataRequest() {} + + @JsonCreator + public IncidentOnCallPageDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentOnCallPageType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentOnCallPageDataRequest attributes( + IncidentOnCallPageDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for linking a page to an incident. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentOnCallPageDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentOnCallPageDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentOnCallPageDataRequest id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the on-call page to link. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public IncidentOnCallPageDataRequest type(IncidentOnCallPageType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * On-call page resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentOnCallPageType getType() { + return type; + } + + public void setType(IncidentOnCallPageType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentOnCallPageDataRequest + */ + @JsonAnySetter + public IncidentOnCallPageDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentOnCallPageDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentOnCallPageDataRequest incidentOnCallPageDataRequest = (IncidentOnCallPageDataRequest) o; + return Objects.equals(this.attributes, incidentOnCallPageDataRequest.attributes) + && Objects.equals(this.id, incidentOnCallPageDataRequest.id) + && Objects.equals(this.type, incidentOnCallPageDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentOnCallPageDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentOnCallPageDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageLinkRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageLinkRequest.java new file mode 100644 index 00000000000..2bd54854d83 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageLinkRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for linking an on-call page to an incident. */ +@JsonPropertyOrder({IncidentOnCallPageLinkRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentOnCallPageLinkRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentOnCallPageDataRequest data; + + public IncidentOnCallPageLinkRequest() {} + + @JsonCreator + public IncidentOnCallPageLinkRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentOnCallPageDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentOnCallPageLinkRequest data(IncidentOnCallPageDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * On-call page data in a link request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentOnCallPageDataRequest getData() { + return data; + } + + public void setData(IncidentOnCallPageDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentOnCallPageLinkRequest + */ + @JsonAnySetter + public IncidentOnCallPageLinkRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentOnCallPageLinkRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentOnCallPageLinkRequest incidentOnCallPageLinkRequest = (IncidentOnCallPageLinkRequest) o; + return Objects.equals(this.data, incidentOnCallPageLinkRequest.data) + && Objects.equals( + this.additionalProperties, incidentOnCallPageLinkRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentOnCallPageLinkRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageTarget.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageTarget.java new file mode 100644 index 00000000000..a6554c80440 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageTarget.java @@ -0,0 +1,173 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The target of an on-call page. */ +@JsonPropertyOrder({ + IncidentOnCallPageTarget.JSON_PROPERTY_IDENTIFIER, + IncidentOnCallPageTarget.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentOnCallPageTarget { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_IDENTIFIER = "identifier"; + private String identifier; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public IncidentOnCallPageTarget() {} + + @JsonCreator + public IncidentOnCallPageTarget( + @JsonProperty(required = true, value = JSON_PROPERTY_IDENTIFIER) String identifier, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.identifier = identifier; + this.type = type; + } + + public IncidentOnCallPageTarget identifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * The identifier of the page target. + * + * @return identifier + */ + @JsonProperty(JSON_PROPERTY_IDENTIFIER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public IncidentOnCallPageTarget type(String type) { + this.type = type; + return this; + } + + /** + * The type of the page target. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentOnCallPageTarget + */ + @JsonAnySetter + public IncidentOnCallPageTarget putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentOnCallPageTarget object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentOnCallPageTarget incidentOnCallPageTarget = (IncidentOnCallPageTarget) o; + return Objects.equals(this.identifier, incidentOnCallPageTarget.identifier) + && Objects.equals(this.type, incidentOnCallPageTarget.type) + && Objects.equals(this.additionalProperties, incidentOnCallPageTarget.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentOnCallPageTarget {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageType.java new file mode 100644 index 00000000000..09de76710cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOnCallPageType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** On-call page resource type. */ +@JsonSerialize(using = IncidentOnCallPageType.IncidentOnCallPageTypeSerializer.class) +public class IncidentOnCallPageType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("page")); + + public static final IncidentOnCallPageType PAGE = new IncidentOnCallPageType("page"); + + IncidentOnCallPageType(String value) { + super(value, allowedValues); + } + + public static class IncidentOnCallPageTypeSerializer + extends StdSerializer { + public IncidentOnCallPageTypeSerializer(Class t) { + super(t); + } + + public IncidentOnCallPageTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentOnCallPageType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentOnCallPageType fromValue(String value) { + return new IncidentOnCallPageType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsDataAttributesResponse.java new file mode 100644 index 00000000000..683b8d08ea2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsDataAttributesResponse.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an incident org settings resource in a response. */ +@JsonPropertyOrder({ + IncidentOrgSettingsDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentOrgSettingsDataAttributesResponse.JSON_PROPERTY_MODIFIED, + IncidentOrgSettingsDataAttributesResponse.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentOrgSettingsDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = new HashMap(); + + public IncidentOrgSettingsDataAttributesResponse() {} + + @JsonCreator + public IncidentOrgSettingsDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTINGS) Map settings) { + this.created = created; + this.modified = modified; + this.settings = settings; + } + + public IncidentOrgSettingsDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the settings were created. + * + * @return created + */ + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(OffsetDateTime created) { + this.created = created; + } + + public IncidentOrgSettingsDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the settings were last modified. + * + * @return modified + */ + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModified() { + return modified; + } + + public void setModified(OffsetDateTime modified) { + this.modified = modified; + } + + public IncidentOrgSettingsDataAttributesResponse settings(Map settings) { + this.settings = settings; + return this; + } + + public IncidentOrgSettingsDataAttributesResponse putSettingsItem( + String key, Object settingsItem) { + this.settings.put(key, settingsItem); + return this; + } + + /** + * The settings configuration for an incident org settings resource. + * + * @return settings + */ + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentOrgSettingsDataAttributesResponse + */ + @JsonAnySetter + public IncidentOrgSettingsDataAttributesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentOrgSettingsDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentOrgSettingsDataAttributesResponse incidentOrgSettingsDataAttributesResponse = + (IncidentOrgSettingsDataAttributesResponse) o; + return Objects.equals(this.created, incidentOrgSettingsDataAttributesResponse.created) + && Objects.equals(this.modified, incidentOrgSettingsDataAttributesResponse.modified) + && Objects.equals(this.settings, incidentOrgSettingsDataAttributesResponse.settings) + && Objects.equals( + this.additionalProperties, + incidentOrgSettingsDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(created, modified, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentOrgSettingsDataAttributesResponse {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsDataResponse.java new file mode 100644 index 00000000000..3d4da05ba71 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsDataResponse.java @@ -0,0 +1,242 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Incident org settings data in a response. */ +@JsonPropertyOrder({ + IncidentOrgSettingsDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentOrgSettingsDataResponse.JSON_PROPERTY_ID, + IncidentOrgSettingsDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentOrgSettingsDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentOrgSettingsDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentOrgSettingsDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentOrgSettingsRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentOrgSettingsType type; + + public IncidentOrgSettingsDataResponse() {} + + @JsonCreator + public IncidentOrgSettingsDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentOrgSettingsDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentOrgSettingsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentOrgSettingsDataResponse attributes( + IncidentOrgSettingsDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an incident org settings resource in a response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentOrgSettingsDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentOrgSettingsDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentOrgSettingsDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The org settings identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentOrgSettingsDataResponse relationships( + IncidentOrgSettingsRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for an incident org settings resource. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentOrgSettingsRelationships getRelationships() { + return relationships; + } + + public void setRelationships(IncidentOrgSettingsRelationships relationships) { + this.relationships = relationships; + } + + public IncidentOrgSettingsDataResponse type(IncidentOrgSettingsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident org settings resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentOrgSettingsType getType() { + return type; + } + + public void setType(IncidentOrgSettingsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentOrgSettingsDataResponse + */ + @JsonAnySetter + public IncidentOrgSettingsDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentOrgSettingsDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentOrgSettingsDataResponse incidentOrgSettingsDataResponse = + (IncidentOrgSettingsDataResponse) o; + return Objects.equals(this.attributes, incidentOrgSettingsDataResponse.attributes) + && Objects.equals(this.id, incidentOrgSettingsDataResponse.id) + && Objects.equals(this.relationships, incidentOrgSettingsDataResponse.relationships) + && Objects.equals(this.type, incidentOrgSettingsDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentOrgSettingsDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentOrgSettingsDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsListResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsListResponse.java new file mode 100644 index 00000000000..8708df2ab6b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsListResponse.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a list of incident org settings resources. */ +@JsonPropertyOrder({IncidentOrgSettingsListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentOrgSettingsListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentOrgSettingsListResponse() {} + + @JsonCreator + public IncidentOrgSettingsListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentOrgSettingsListResponse data(List data) { + this.data = data; + for (IncidentOrgSettingsDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentOrgSettingsListResponse addDataItem(IncidentOrgSettingsDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of incident org settings resources. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentOrgSettingsListResponse + */ + @JsonAnySetter + public IncidentOrgSettingsListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentOrgSettingsListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentOrgSettingsListResponse incidentOrgSettingsListResponse = + (IncidentOrgSettingsListResponse) o; + return Objects.equals(this.data, incidentOrgSettingsListResponse.data) + && Objects.equals( + this.additionalProperties, incidentOrgSettingsListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentOrgSettingsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsRelationships.java new file mode 100644 index 00000000000..7c423caa296 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsRelationships.java @@ -0,0 +1,138 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for an incident org settings resource. */ +@JsonPropertyOrder({IncidentOrgSettingsRelationships.JSON_PROPERTY_INCIDENT_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentOrgSettingsRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private RelationshipToIncidentType incidentType; + + public IncidentOrgSettingsRelationships incidentType(RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + return this; + } + + /** + * Relationship to an incident type. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToIncidentType getIncidentType() { + return incidentType; + } + + public void setIncidentType(RelationshipToIncidentType incidentType) { + this.incidentType = incidentType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentOrgSettingsRelationships + */ + @JsonAnySetter + public IncidentOrgSettingsRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentOrgSettingsRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentOrgSettingsRelationships incidentOrgSettingsRelationships = + (IncidentOrgSettingsRelationships) o; + return Objects.equals(this.incidentType, incidentOrgSettingsRelationships.incidentType) + && Objects.equals( + this.additionalProperties, incidentOrgSettingsRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentOrgSettingsRelationships {\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsResponse.java new file mode 100644 index 00000000000..cf6a705dce7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response with a single incident org settings resource. */ +@JsonPropertyOrder({IncidentOrgSettingsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentOrgSettingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentOrgSettingsDataResponse data; + + public IncidentOrgSettingsResponse() {} + + @JsonCreator + public IncidentOrgSettingsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentOrgSettingsDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentOrgSettingsResponse data(IncidentOrgSettingsDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident org settings data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentOrgSettingsDataResponse getData() { + return data; + } + + public void setData(IncidentOrgSettingsDataResponse data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentOrgSettingsResponse + */ + @JsonAnySetter + public IncidentOrgSettingsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentOrgSettingsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentOrgSettingsResponse incidentOrgSettingsResponse = (IncidentOrgSettingsResponse) o; + return Objects.equals(this.data, incidentOrgSettingsResponse.data) + && Objects.equals( + this.additionalProperties, incidentOrgSettingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentOrgSettingsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsType.java new file mode 100644 index 00000000000..205df0b38d2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentOrgSettingsType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Incident org settings resource type. */ +@JsonSerialize(using = IncidentOrgSettingsType.IncidentOrgSettingsTypeSerializer.class) +public class IncidentOrgSettingsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_org_settings")); + + public static final IncidentOrgSettingsType INCIDENT_ORG_SETTINGS = + new IncidentOrgSettingsType("incident_org_settings"); + + IncidentOrgSettingsType(String value) { + super(value, allowedValues); + } + + public static class IncidentOrgSettingsTypeSerializer + extends StdSerializer { + public IncidentOrgSettingsTypeSerializer(Class t) { + super(t); + } + + public IncidentOrgSettingsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentOrgSettingsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentOrgSettingsType fromValue(String value) { + return new IncidentOrgSettingsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPageRoleReference.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPageRoleReference.java new file mode 100644 index 00000000000..303c1a6a903 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPageRoleReference.java @@ -0,0 +1,180 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** A reference to an incident role for a page. */ +@JsonPropertyOrder({ + IncidentPageRoleReference.JSON_PROPERTY_ID, + IncidentPageRoleReference.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPageRoleReference { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentPageRoleType type; + + public IncidentPageRoleReference() {} + + @JsonCreator + public IncidentPageRoleReference( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentPageRoleType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentPageRoleReference id(UUID id) { + this.id = id; + return this; + } + + /** + * The role identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentPageRoleReference type(IncidentPageRoleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of incident role for a page. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentPageRoleType getType() { + return type; + } + + public void setType(IncidentPageRoleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentPageRoleReference + */ + @JsonAnySetter + public IncidentPageRoleReference putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentPageRoleReference object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPageRoleReference incidentPageRoleReference = (IncidentPageRoleReference) o; + return Objects.equals(this.id, incidentPageRoleReference.id) + && Objects.equals(this.type, incidentPageRoleReference.type) + && Objects.equals( + this.additionalProperties, incidentPageRoleReference.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPageRoleReference {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPageRoleType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPageRoleType.java new file mode 100644 index 00000000000..4b135b982bb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPageRoleType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of incident role for a page. */ +@JsonSerialize(using = IncidentPageRoleType.IncidentPageRoleTypeSerializer.class) +public class IncidentPageRoleType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_user_defined_roles", "incident_reserved_roles")); + + public static final IncidentPageRoleType INCIDENT_USER_DEFINED_ROLES = + new IncidentPageRoleType("incident_user_defined_roles"); + public static final IncidentPageRoleType INCIDENT_RESERVED_ROLES = + new IncidentPageRoleType("incident_reserved_roles"); + + IncidentPageRoleType(String value) { + super(value, allowedValues); + } + + public static class IncidentPageRoleTypeSerializer extends StdSerializer { + public IncidentPageRoleTypeSerializer(Class t) { + super(t); + } + + public IncidentPageRoleTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentPageRoleType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentPageRoleType fromValue(String value) { + return new IncidentPageRoleType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPageTarget.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPageTarget.java new file mode 100644 index 00000000000..bec8d422560 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPageTarget.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The target recipient for a page. */ +@JsonPropertyOrder({ + IncidentPageTarget.JSON_PROPERTY_IDENTIFIER, + IncidentPageTarget.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPageTarget { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_IDENTIFIER = "identifier"; + private String identifier; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentPageTargetType type; + + public IncidentPageTarget() {} + + @JsonCreator + public IncidentPageTarget( + @JsonProperty(required = true, value = JSON_PROPERTY_IDENTIFIER) String identifier, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentPageTargetType type) { + this.identifier = identifier; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentPageTarget identifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * The identifier of the target (handle, UUID, or user UUID). + * + * @return identifier + */ + @JsonProperty(JSON_PROPERTY_IDENTIFIER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public IncidentPageTarget type(IncidentPageTargetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of target for a page request. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentPageTargetType getType() { + return type; + } + + public void setType(IncidentPageTargetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentPageTarget + */ + @JsonAnySetter + public IncidentPageTarget putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentPageTarget object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPageTarget incidentPageTarget = (IncidentPageTarget) o; + return Objects.equals(this.identifier, incidentPageTarget.identifier) + && Objects.equals(this.type, incidentPageTarget.type) + && Objects.equals(this.additionalProperties, incidentPageTarget.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPageTarget {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPageTargetType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPageTargetType.java new file mode 100644 index 00000000000..b2d6d5ae7ca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPageTargetType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of target for a page request. */ +@JsonSerialize(using = IncidentPageTargetType.IncidentPageTargetTypeSerializer.class) +public class IncidentPageTargetType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("team_handle", "team_uuid", "user_uuid")); + + public static final IncidentPageTargetType TEAM_HANDLE = + new IncidentPageTargetType("team_handle"); + public static final IncidentPageTargetType TEAM_UUID = new IncidentPageTargetType("team_uuid"); + public static final IncidentPageTargetType USER_UUID = new IncidentPageTargetType("user_uuid"); + + IncidentPageTargetType(String value) { + super(value, allowedValues); + } + + public static class IncidentPageTargetTypeSerializer + extends StdSerializer { + public IncidentPageTargetTypeSerializer(Class t) { + super(t); + } + + public IncidentPageTargetTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentPageTargetType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentPageTargetType fromValue(String value) { + return new IncidentPageTargetType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDDataResponse.java new file mode 100644 index 00000000000..e04e584aa83 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDDataResponse.java @@ -0,0 +1,180 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Page UUID data in a response. */ +@JsonPropertyOrder({ + IncidentPageUUIDDataResponse.JSON_PROPERTY_ID, + IncidentPageUUIDDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPageUUIDDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentPageUUIDType type; + + public IncidentPageUUIDDataResponse() {} + + @JsonCreator + public IncidentPageUUIDDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentPageUUIDType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentPageUUIDDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The UUID of the created page. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentPageUUIDDataResponse type(IncidentPageUUIDType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for a page UUID response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentPageUUIDType getType() { + return type; + } + + public void setType(IncidentPageUUIDType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentPageUUIDDataResponse + */ + @JsonAnySetter + public IncidentPageUUIDDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentPageUUIDDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPageUUIDDataResponse incidentPageUuidDataResponse = (IncidentPageUUIDDataResponse) o; + return Objects.equals(this.id, incidentPageUuidDataResponse.id) + && Objects.equals(this.type, incidentPageUuidDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentPageUuidDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPageUUIDDataResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDResponse.java new file mode 100644 index 00000000000..cd08c55b6ec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDResponse.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response with a page UUID. */ +@JsonPropertyOrder({IncidentPageUUIDResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPageUUIDResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentPageUUIDDataResponse data; + + public IncidentPageUUIDResponse() {} + + @JsonCreator + public IncidentPageUUIDResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentPageUUIDDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentPageUUIDResponse data(IncidentPageUUIDDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Page UUID data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentPageUUIDDataResponse getData() { + return data; + } + + public void setData(IncidentPageUUIDDataResponse data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentPageUUIDResponse + */ + @JsonAnySetter + public IncidentPageUUIDResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentPageUUIDResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPageUUIDResponse incidentPageUuidResponse = (IncidentPageUUIDResponse) o; + return Objects.equals(this.data, incidentPageUuidResponse.data) + && Objects.equals(this.additionalProperties, incidentPageUuidResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPageUUIDResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDType.java new file mode 100644 index 00000000000..cd6af133f25 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPageUUIDType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type for a page UUID response. */ +@JsonSerialize(using = IncidentPageUUIDType.IncidentPageUUIDTypeSerializer.class) +public class IncidentPageUUIDType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("page_uuid")); + + public static final IncidentPageUUIDType PAGE_UUID = new IncidentPageUUIDType("page_uuid"); + + IncidentPageUUIDType(String value) { + super(value, allowedValues); + } + + public static class IncidentPageUUIDTypeSerializer extends StdSerializer { + public IncidentPageUUIDTypeSerializer(Class t) { + super(t); + } + + public IncidentPageUUIDTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentPageUUIDType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentPageUUIDType fromValue(String value) { + return new IncidentPageUUIDType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataAttributesResponse.java new file mode 100644 index 00000000000..3db19dbdac6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataAttributesResponse.java @@ -0,0 +1,375 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an incident responder in a response. */ +@JsonPropertyOrder({ + IncidentResponderDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentResponderDataAttributesResponse.JSON_PROPERTY_EXTERNAL_ID, + IncidentResponderDataAttributesResponse.JSON_PROPERTY_EXTERNAL_SOURCE, + IncidentResponderDataAttributesResponse.JSON_PROPERTY_IS_BILLABLE, + IncidentResponderDataAttributesResponse.JSON_PROPERTY_LAST_ACTIVE, + IncidentResponderDataAttributesResponse.JSON_PROPERTY_META, + IncidentResponderDataAttributesResponse.JSON_PROPERTY_MODIFIED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_EXTERNAL_ID = "external_id"; + private JsonNullable externalId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXTERNAL_SOURCE = "external_source"; + private JsonNullable externalSource = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_BILLABLE = "is_billable"; + private Boolean isBillable; + + public static final String JSON_PROPERTY_LAST_ACTIVE = "last_active"; + private JsonNullable lastActive = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_META = "meta"; + private JsonNullable> meta = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public IncidentResponderDataAttributesResponse() {} + + @JsonCreator + public IncidentResponderDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_BILLABLE) Boolean isBillable, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified) { + this.created = created; + this.isBillable = isBillable; + this.modified = modified; + } + + public IncidentResponderDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the responder was created. + * + * @return created + */ + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(OffsetDateTime created) { + this.created = created; + } + + public IncidentResponderDataAttributesResponse externalId(String externalId) { + this.externalId = JsonNullable.of(externalId); + return this; + } + + /** + * The external ID of the responder. + * + * @return externalId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getExternalId() { + return externalId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getExternalId_JsonNullable() { + return externalId; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + public void setExternalId_JsonNullable(JsonNullable externalId) { + this.externalId = externalId; + } + + public void setExternalId(String externalId) { + this.externalId = JsonNullable.of(externalId); + } + + public IncidentResponderDataAttributesResponse externalSource(String externalSource) { + this.externalSource = JsonNullable.of(externalSource); + return this; + } + + /** + * The external source of the responder. + * + * @return externalSource + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getExternalSource() { + return externalSource.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getExternalSource_JsonNullable() { + return externalSource; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_SOURCE) + public void setExternalSource_JsonNullable(JsonNullable externalSource) { + this.externalSource = externalSource; + } + + public void setExternalSource(String externalSource) { + this.externalSource = JsonNullable.of(externalSource); + } + + public IncidentResponderDataAttributesResponse isBillable(Boolean isBillable) { + this.isBillable = isBillable; + return this; + } + + /** + * Whether this responder counts toward billing. + * + * @return isBillable + */ + @JsonProperty(JSON_PROPERTY_IS_BILLABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsBillable() { + return isBillable; + } + + public void setIsBillable(Boolean isBillable) { + this.isBillable = isBillable; + } + + public IncidentResponderDataAttributesResponse lastActive(OffsetDateTime lastActive) { + this.lastActive = JsonNullable.of(lastActive); + return this; + } + + /** + * Timestamp when the responder was last active. + * + * @return lastActive + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getLastActive() { + return lastActive.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getLastActive_JsonNullable() { + return lastActive; + } + + @JsonProperty(JSON_PROPERTY_LAST_ACTIVE) + public void setLastActive_JsonNullable(JsonNullable lastActive) { + this.lastActive = lastActive; + } + + public void setLastActive(OffsetDateTime lastActive) { + this.lastActive = JsonNullable.of(lastActive); + } + + public IncidentResponderDataAttributesResponse meta(Map meta) { + this.meta = JsonNullable.>of(meta); + return this; + } + + public IncidentResponderDataAttributesResponse putMetaItem(String key, Object metaItem) { + if (this.meta == null || !this.meta.isPresent()) { + this.meta = JsonNullable.>of(new HashMap<>()); + } + try { + this.meta.get().put(key, metaItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Additional metadata for the responder. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Map getMeta() { + return meta.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getMeta_JsonNullable() { + return meta; + } + + @JsonProperty(JSON_PROPERTY_META) + public void setMeta_JsonNullable(JsonNullable> meta) { + this.meta = meta; + } + + public void setMeta(Map meta) { + this.meta = JsonNullable.>of(meta); + } + + public IncidentResponderDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the responder was last modified. + * + * @return modified + */ + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModified() { + return modified; + } + + public void setModified(OffsetDateTime modified) { + this.modified = modified; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderDataAttributesResponse + */ + @JsonAnySetter + public IncidentResponderDataAttributesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderDataAttributesResponse incidentResponderDataAttributesResponse = + (IncidentResponderDataAttributesResponse) o; + return Objects.equals(this.created, incidentResponderDataAttributesResponse.created) + && Objects.equals(this.externalId, incidentResponderDataAttributesResponse.externalId) + && Objects.equals( + this.externalSource, incidentResponderDataAttributesResponse.externalSource) + && Objects.equals(this.isBillable, incidentResponderDataAttributesResponse.isBillable) + && Objects.equals(this.lastActive, incidentResponderDataAttributesResponse.lastActive) + && Objects.equals(this.meta, incidentResponderDataAttributesResponse.meta) + && Objects.equals(this.modified, incidentResponderDataAttributesResponse.modified) + && Objects.equals( + this.additionalProperties, + incidentResponderDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + created, + externalId, + externalSource, + isBillable, + lastActive, + meta, + modified, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderDataAttributesResponse {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" externalSource: ").append(toIndentedString(externalSource)).append("\n"); + sb.append(" isBillable: ").append(toIndentedString(isBillable)).append("\n"); + sb.append(" lastActive: ").append(toIndentedString(lastActive)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataRequest.java new file mode 100644 index 00000000000..41c6e7c2fa9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataRequest.java @@ -0,0 +1,183 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Incident responder data in a create request. */ +@JsonPropertyOrder({ + IncidentResponderDataRequest.JSON_PROPERTY_RELATIONSHIPS, + IncidentResponderDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentResponderRelationshipsRequest relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentResponderType type; + + public IncidentResponderDataRequest() {} + + @JsonCreator + public IncidentResponderDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + IncidentResponderRelationshipsRequest relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentResponderType type) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentResponderDataRequest relationships( + IncidentResponderRelationshipsRequest relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for creating an incident responder. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentResponderRelationshipsRequest getRelationships() { + return relationships; + } + + public void setRelationships(IncidentResponderRelationshipsRequest relationships) { + this.relationships = relationships; + } + + public IncidentResponderDataRequest type(IncidentResponderType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident responder resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentResponderType getType() { + return type; + } + + public void setType(IncidentResponderType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderDataRequest + */ + @JsonAnySetter + public IncidentResponderDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderDataRequest incidentResponderDataRequest = (IncidentResponderDataRequest) o; + return Objects.equals(this.relationships, incidentResponderDataRequest.relationships) + && Objects.equals(this.type, incidentResponderDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentResponderDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderDataRequest {\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataResponse.java new file mode 100644 index 00000000000..63793d7c40e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderDataResponse.java @@ -0,0 +1,240 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Incident responder data in a response. */ +@JsonPropertyOrder({ + IncidentResponderDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentResponderDataResponse.JSON_PROPERTY_ID, + IncidentResponderDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentResponderDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentResponderDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentResponderRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentResponderType type; + + public IncidentResponderDataResponse() {} + + @JsonCreator + public IncidentResponderDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentResponderDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentResponderType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentResponderDataResponse attributes( + IncidentResponderDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an incident responder in a response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentResponderDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentResponderDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentResponderDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The responder identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentResponderDataResponse relationships(IncidentResponderRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for an incident responder. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentResponderRelationships getRelationships() { + return relationships; + } + + public void setRelationships(IncidentResponderRelationships relationships) { + this.relationships = relationships; + } + + public IncidentResponderDataResponse type(IncidentResponderType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident responder resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentResponderType getType() { + return type; + } + + public void setType(IncidentResponderType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderDataResponse + */ + @JsonAnySetter + public IncidentResponderDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderDataResponse incidentResponderDataResponse = (IncidentResponderDataResponse) o; + return Objects.equals(this.attributes, incidentResponderDataResponse.attributes) + && Objects.equals(this.id, incidentResponderDataResponse.id) + && Objects.equals(this.relationships, incidentResponderDataResponse.relationships) + && Objects.equals(this.type, incidentResponderDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentResponderDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRelationships.java new file mode 100644 index 00000000000..e67a50c8c8a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRelationships.java @@ -0,0 +1,236 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Relationships for an incident responder. */ +@JsonPropertyOrder({ + IncidentResponderRelationships.JSON_PROPERTY_CREATED_BY, + IncidentResponderRelationships.JSON_PROPERTY_LAST_MODIFIED_BY, + IncidentResponderRelationships.JSON_PROPERTY_ROLE_ASSIGNMENTS, + IncidentResponderRelationships.JSON_PROPERTY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private RelationshipToUser createdBy; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY = "last_modified_by"; + private RelationshipToUser lastModifiedBy; + + public static final String JSON_PROPERTY_ROLE_ASSIGNMENTS = "role_assignments"; + private IncidentResponderRoleAssignmentsRelationship roleAssignments; + + public static final String JSON_PROPERTY_USER = "user"; + private JsonNullable user = + JsonNullable.undefined(); + + public IncidentResponderRelationships createdBy(RelationshipToUser createdBy) { + this.createdBy = createdBy; + this.unparsed |= createdBy.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(RelationshipToUser createdBy) { + this.createdBy = createdBy; + } + + public IncidentResponderRelationships lastModifiedBy(RelationshipToUser lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + this.unparsed |= lastModifiedBy.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return lastModifiedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedBy() { + return lastModifiedBy; + } + + public void setLastModifiedBy(RelationshipToUser lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public IncidentResponderRelationships roleAssignments( + IncidentResponderRoleAssignmentsRelationship roleAssignments) { + this.roleAssignments = roleAssignments; + this.unparsed |= roleAssignments.unparsed; + return this; + } + + /** + * Relationship to role assignments for a responder. + * + * @return roleAssignments + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE_ASSIGNMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentResponderRoleAssignmentsRelationship getRoleAssignments() { + return roleAssignments; + } + + public void setRoleAssignments(IncidentResponderRoleAssignmentsRelationship roleAssignments) { + this.roleAssignments = roleAssignments; + } + + public IncidentResponderRelationships user(NullableRelationshipToUser user) { + this.user = JsonNullable.of(user); + return this; + } + + /** + * Relationship to user. + * + * @return user + */ + @jakarta.annotation.Nullable + @JsonIgnore + public NullableRelationshipToUser getUser() { + return user.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getUser_JsonNullable() { + return user; + } + + @JsonProperty(JSON_PROPERTY_USER) + public void setUser_JsonNullable(JsonNullable user) { + this.user = user; + } + + public void setUser(NullableRelationshipToUser user) { + this.user = JsonNullable.of(user); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderRelationships + */ + @JsonAnySetter + public IncidentResponderRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderRelationships incidentResponderRelationships = + (IncidentResponderRelationships) o; + return Objects.equals(this.createdBy, incidentResponderRelationships.createdBy) + && Objects.equals(this.lastModifiedBy, incidentResponderRelationships.lastModifiedBy) + && Objects.equals(this.roleAssignments, incidentResponderRelationships.roleAssignments) + && Objects.equals(this.user, incidentResponderRelationships.user) + && Objects.equals( + this.additionalProperties, incidentResponderRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdBy, lastModifiedBy, roleAssignments, user, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderRelationships {\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" lastModifiedBy: ").append(toIndentedString(lastModifiedBy)).append("\n"); + sb.append(" roleAssignments: ").append(toIndentedString(roleAssignments)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRelationshipsRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRelationshipsRequest.java new file mode 100644 index 00000000000..b13d162f03f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRelationshipsRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for creating an incident responder. */ +@JsonPropertyOrder({IncidentResponderRelationshipsRequest.JSON_PROPERTY_USER}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderRelationshipsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_USER = "user"; + private IncidentResponderUserRelationship user; + + public IncidentResponderRelationshipsRequest() {} + + @JsonCreator + public IncidentResponderRelationshipsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_USER) + IncidentResponderUserRelationship user) { + this.user = user; + this.unparsed |= user.unparsed; + } + + public IncidentResponderRelationshipsRequest user(IncidentResponderUserRelationship user) { + this.user = user; + this.unparsed |= user.unparsed; + return this; + } + + /** + * Relationship to a user for a responder create request. + * + * @return user + */ + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentResponderUserRelationship getUser() { + return user; + } + + public void setUser(IncidentResponderUserRelationship user) { + this.user = user; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderRelationshipsRequest + */ + @JsonAnySetter + public IncidentResponderRelationshipsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderRelationshipsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderRelationshipsRequest incidentResponderRelationshipsRequest = + (IncidentResponderRelationshipsRequest) o; + return Objects.equals(this.user, incidentResponderRelationshipsRequest.user) + && Objects.equals( + this.additionalProperties, incidentResponderRelationshipsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(user, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderRelationshipsRequest {\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRequest.java new file mode 100644 index 00000000000..fe2bffa4a8b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRequest.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating an incident responder. */ +@JsonPropertyOrder({IncidentResponderRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentResponderDataRequest data; + + public IncidentResponderRequest() {} + + @JsonCreator + public IncidentResponderRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentResponderDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentResponderRequest data(IncidentResponderDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident responder data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentResponderDataRequest getData() { + return data; + } + + public void setData(IncidentResponderDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderRequest + */ + @JsonAnySetter + public IncidentResponderRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderRequest incidentResponderRequest = (IncidentResponderRequest) o; + return Objects.equals(this.data, incidentResponderRequest.data) + && Objects.equals(this.additionalProperties, incidentResponderRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderResponse.java new file mode 100644 index 00000000000..87839058394 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderResponse.java @@ -0,0 +1,168 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a single incident responder. */ +@JsonPropertyOrder({ + IncidentResponderResponse.JSON_PROPERTY_DATA, + IncidentResponderResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentResponderDataResponse data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentResponderResponse() {} + + @JsonCreator + public IncidentResponderResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentResponderDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentResponderResponse data(IncidentResponderDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident responder data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentResponderDataResponse getData() { + return data; + } + + public void setData(IncidentResponderDataResponse data) { + this.data = data; + } + + /** + * Included related resources. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderResponse + */ + @JsonAnySetter + public IncidentResponderResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderResponse incidentResponderResponse = (IncidentResponderResponse) o; + return Objects.equals(this.data, incidentResponderResponse.data) + && Objects.equals(this.included, incidentResponderResponse.included) + && Objects.equals( + this.additionalProperties, incidentResponderResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRoleAssignmentRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRoleAssignmentRelationshipData.java new file mode 100644 index 00000000000..44cccf3d9e5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRoleAssignmentRelationshipData.java @@ -0,0 +1,179 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** A single role assignment relationship data object. */ +@JsonPropertyOrder({ + IncidentResponderRoleAssignmentRelationshipData.JSON_PROPERTY_ID, + IncidentResponderRoleAssignmentRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderRoleAssignmentRelationshipData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public IncidentResponderRoleAssignmentRelationshipData() {} + + @JsonCreator + public IncidentResponderRoleAssignmentRelationshipData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.id = id; + this.type = type; + } + + public IncidentResponderRoleAssignmentRelationshipData id(UUID id) { + this.id = id; + return this; + } + + /** + * The role assignment identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentResponderRoleAssignmentRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * The role assignment resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderRoleAssignmentRelationshipData + */ + @JsonAnySetter + public IncidentResponderRoleAssignmentRelationshipData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderRoleAssignmentRelationshipData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderRoleAssignmentRelationshipData + incidentResponderRoleAssignmentRelationshipData = + (IncidentResponderRoleAssignmentRelationshipData) o; + return Objects.equals(this.id, incidentResponderRoleAssignmentRelationshipData.id) + && Objects.equals(this.type, incidentResponderRoleAssignmentRelationshipData.type) + && Objects.equals( + this.additionalProperties, + incidentResponderRoleAssignmentRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderRoleAssignmentRelationshipData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRoleAssignmentsRelationship.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRoleAssignmentsRelationship.java new file mode 100644 index 00000000000..ff749315a78 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderRoleAssignmentsRelationship.java @@ -0,0 +1,155 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Relationship to role assignments for a responder. */ +@JsonPropertyOrder({IncidentResponderRoleAssignmentsRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderRoleAssignmentsRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public IncidentResponderRoleAssignmentsRelationship data( + List data) { + this.data = data; + for (IncidentResponderRoleAssignmentRelationshipData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentResponderRoleAssignmentsRelationship addDataItem( + IncidentResponderRoleAssignmentRelationshipData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of role assignment relationship data. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderRoleAssignmentsRelationship + */ + @JsonAnySetter + public IncidentResponderRoleAssignmentsRelationship putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderRoleAssignmentsRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderRoleAssignmentsRelationship incidentResponderRoleAssignmentsRelationship = + (IncidentResponderRoleAssignmentsRelationship) o; + return Objects.equals(this.data, incidentResponderRoleAssignmentsRelationship.data) + && Objects.equals( + this.additionalProperties, + incidentResponderRoleAssignmentsRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderRoleAssignmentsRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderType.java new file mode 100644 index 00000000000..c611749e3d6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderType.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Incident responder resource type. */ +@JsonSerialize(using = IncidentResponderType.IncidentResponderTypeSerializer.class) +public class IncidentResponderType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_responders")); + + public static final IncidentResponderType INCIDENT_RESPONDERS = + new IncidentResponderType("incident_responders"); + + IncidentResponderType(String value) { + super(value, allowedValues); + } + + public static class IncidentResponderTypeSerializer extends StdSerializer { + public IncidentResponderTypeSerializer(Class t) { + super(t); + } + + public IncidentResponderTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentResponderType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentResponderType fromValue(String value) { + return new IncidentResponderType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderUserRelationship.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderUserRelationship.java new file mode 100644 index 00000000000..ac8faab4ba9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderUserRelationship.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationship to a user for a responder create request. */ +@JsonPropertyOrder({IncidentResponderUserRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderUserRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentResponderUserRelationshipData data; + + public IncidentResponderUserRelationship() {} + + @JsonCreator + public IncidentResponderUserRelationship( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentResponderUserRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentResponderUserRelationship data(IncidentResponderUserRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A user relationship data object for creating a responder. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentResponderUserRelationshipData getData() { + return data; + } + + public void setData(IncidentResponderUserRelationshipData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderUserRelationship + */ + @JsonAnySetter + public IncidentResponderUserRelationship putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderUserRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderUserRelationship incidentResponderUserRelationship = + (IncidentResponderUserRelationship) o; + return Objects.equals(this.data, incidentResponderUserRelationship.data) + && Objects.equals( + this.additionalProperties, incidentResponderUserRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderUserRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponderUserRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderUserRelationshipData.java new file mode 100644 index 00000000000..0eebb9de97e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponderUserRelationshipData.java @@ -0,0 +1,176 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** A user relationship data object for creating a responder. */ +@JsonPropertyOrder({ + IncidentResponderUserRelationshipData.JSON_PROPERTY_ID, + IncidentResponderUserRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentResponderUserRelationshipData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public IncidentResponderUserRelationshipData() {} + + @JsonCreator + public IncidentResponderUserRelationshipData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.id = id; + this.type = type; + } + + public IncidentResponderUserRelationshipData id(UUID id) { + this.id = id; + return this; + } + + /** + * The user identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentResponderUserRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * The user resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentResponderUserRelationshipData + */ + @JsonAnySetter + public IncidentResponderUserRelationshipData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentResponderUserRelationshipData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentResponderUserRelationshipData incidentResponderUserRelationshipData = + (IncidentResponderUserRelationshipData) o; + return Objects.equals(this.id, incidentResponderUserRelationshipData.id) + && Objects.equals(this.type, incidentResponderUserRelationshipData.type) + && Objects.equals( + this.additionalProperties, incidentResponderUserRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentResponderUserRelationshipData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRespondersResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRespondersResponse.java new file mode 100644 index 00000000000..0343a68188a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRespondersResponse.java @@ -0,0 +1,176 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a list of incident responders. */ +@JsonPropertyOrder({ + IncidentRespondersResponse.JSON_PROPERTY_DATA, + IncidentRespondersResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRespondersResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentRespondersResponse() {} + + @JsonCreator + public IncidentRespondersResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentRespondersResponse data(List data) { + this.data = data; + for (IncidentResponderDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentRespondersResponse addDataItem(IncidentResponderDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of incident responders. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * Included related resources. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRespondersResponse + */ + @JsonAnySetter + public IncidentRespondersResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRespondersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRespondersResponse incidentRespondersResponse = (IncidentRespondersResponse) o; + return Objects.equals(this.data, incidentRespondersResponse.data) + && Objects.equals(this.included, incidentRespondersResponse.included) + && Objects.equals( + this.additionalProperties, incidentRespondersResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRespondersResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleCondition.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleCondition.java new file mode 100644 index 00000000000..497c394e5a4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleCondition.java @@ -0,0 +1,180 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A condition for an incident rule. */ +@JsonPropertyOrder({ + IncidentRuleCondition.JSON_PROPERTY_FIELD, + IncidentRuleCondition.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleCondition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIELD = "field"; + private String field; + + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = new ArrayList<>(); + + public IncidentRuleCondition() {} + + @JsonCreator + public IncidentRuleCondition( + @JsonProperty(required = true, value = JSON_PROPERTY_FIELD) String field, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUES) List values) { + this.field = field; + this.values = values; + } + + public IncidentRuleCondition field(String field) { + this.field = field; + return this; + } + + /** + * The field to match on. + * + * @return field + */ + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + public IncidentRuleCondition values(List values) { + this.values = values; + return this; + } + + public IncidentRuleCondition addValuesItem(String valuesItem) { + this.values.add(valuesItem); + return this; + } + + /** + * The values to match. + * + * @return values + */ + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRuleCondition + */ + @JsonAnySetter + public IncidentRuleCondition putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRuleCondition object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleCondition incidentRuleCondition = (IncidentRuleCondition) o; + return Objects.equals(this.field, incidentRuleCondition.field) + && Objects.equals(this.values, incidentRuleCondition.values) + && Objects.equals(this.additionalProperties, incidentRuleCondition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(field, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleCondition {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataAttributesRequest.java new file mode 100644 index 00000000000..14df56b4e7d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataAttributesRequest.java @@ -0,0 +1,453 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes for creating an incident rule. */ +@JsonPropertyOrder({ + IncidentRuleDataAttributesRequest.JSON_PROPERTY_CONDITION, + IncidentRuleDataAttributesRequest.JSON_PROPERTY_CONDITION_TABLE_TYPE, + IncidentRuleDataAttributesRequest.JSON_PROPERTY_CONDITIONS, + IncidentRuleDataAttributesRequest.JSON_PROPERTY_ENABLED, + IncidentRuleDataAttributesRequest.JSON_PROPERTY_EXECUTION_TYPE, + IncidentRuleDataAttributesRequest.JSON_PROPERTY_INCIDENT_TYPE_UUID, + IncidentRuleDataAttributesRequest.JSON_PROPERTY_MATCH_ANY_CONDITION, + IncidentRuleDataAttributesRequest.JSON_PROPERTY_TASK_ID, + IncidentRuleDataAttributesRequest.JSON_PROPERTY_TASK_PAYLOAD, + IncidentRuleDataAttributesRequest.JSON_PROPERTY_TRIGGER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private IncidentRuleQueryCondition condition; + + public static final String JSON_PROPERTY_CONDITION_TABLE_TYPE = "condition_table_type"; + private Integer conditionTableType; + + public static final String JSON_PROPERTY_CONDITIONS = "conditions"; + private List conditions = null; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_EXECUTION_TYPE = "execution_type"; + private IncidentRuleExecutionType executionType; + + public static final String JSON_PROPERTY_INCIDENT_TYPE_UUID = "incident_type_uuid"; + private JsonNullable incidentTypeUuid = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MATCH_ANY_CONDITION = "match_any_condition"; + private Boolean matchAnyCondition; + + public static final String JSON_PROPERTY_TASK_ID = "task_id"; + private IncidentRuleTaskIDType taskId; + + public static final String JSON_PROPERTY_TASK_PAYLOAD = "task_payload"; + private String taskPayload; + + public static final String JSON_PROPERTY_TRIGGER = "trigger"; + private IncidentRuleTriggerType trigger; + + public IncidentRuleDataAttributesRequest() {} + + @JsonCreator + public IncidentRuleDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION) + IncidentRuleQueryCondition condition, + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION_TABLE_TYPE) + Integer conditionTableType, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_EXECUTION_TYPE) + IncidentRuleExecutionType executionType, + @JsonProperty(required = true, value = JSON_PROPERTY_TASK_ID) IncidentRuleTaskIDType taskId, + @JsonProperty(required = true, value = JSON_PROPERTY_TASK_PAYLOAD) String taskPayload) { + this.condition = condition; + this.unparsed |= condition.unparsed; + this.conditionTableType = conditionTableType; + this.enabled = enabled; + this.executionType = executionType; + this.unparsed |= !executionType.isValid(); + this.taskId = taskId; + this.unparsed |= !taskId.isValid(); + this.taskPayload = taskPayload; + } + + public IncidentRuleDataAttributesRequest condition(IncidentRuleQueryCondition condition) { + this.condition = condition; + this.unparsed |= condition.unparsed; + return this; + } + + /** + * A query-based condition for an incident rule. + * + * @return condition + */ + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleQueryCondition getCondition() { + return condition; + } + + public void setCondition(IncidentRuleQueryCondition condition) { + this.condition = condition; + } + + public IncidentRuleDataAttributesRequest conditionTableType(Integer conditionTableType) { + this.conditionTableType = conditionTableType; + return this; + } + + /** + * The condition table type. 1 = raw query. + * + * @return conditionTableType + */ + @JsonProperty(JSON_PROPERTY_CONDITION_TABLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getConditionTableType() { + return conditionTableType; + } + + public void setConditionTableType(Integer conditionTableType) { + this.conditionTableType = conditionTableType; + } + + public IncidentRuleDataAttributesRequest conditions(List conditions) { + this.conditions = conditions; + for (IncidentRuleCondition item : conditions) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentRuleDataAttributesRequest addConditionsItem(IncidentRuleCondition conditionsItem) { + if (this.conditions == null) { + this.conditions = new ArrayList<>(); + } + this.conditions.add(conditionsItem); + this.unparsed |= conditionsItem.unparsed; + return this; + } + + /** + * List of field-based conditions. + * + * @return conditions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConditions() { + return conditions; + } + + public void setConditions(List conditions) { + this.conditions = conditions; + } + + public IncidentRuleDataAttributesRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the rule is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public IncidentRuleDataAttributesRequest executionType(IncidentRuleExecutionType executionType) { + this.executionType = executionType; + this.unparsed |= !executionType.isValid(); + return this; + } + + /** + * The execution type of an incident rule. + * + * @return executionType + */ + @JsonProperty(JSON_PROPERTY_EXECUTION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleExecutionType getExecutionType() { + return executionType; + } + + public void setExecutionType(IncidentRuleExecutionType executionType) { + if (!executionType.isValid()) { + this.unparsed = true; + } + this.executionType = executionType; + } + + public IncidentRuleDataAttributesRequest incidentTypeUuid(UUID incidentTypeUuid) { + this.incidentTypeUuid = JsonNullable.of(incidentTypeUuid); + return this; + } + + /** + * The UUID of the incident type this rule applies to. + * + * @return incidentTypeUuid + */ + @jakarta.annotation.Nullable + @JsonIgnore + public UUID getIncidentTypeUuid() { + return incidentTypeUuid.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIncidentTypeUuid_JsonNullable() { + return incidentTypeUuid; + } + + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE_UUID) + public void setIncidentTypeUuid_JsonNullable(JsonNullable incidentTypeUuid) { + this.incidentTypeUuid = incidentTypeUuid; + } + + public void setIncidentTypeUuid(UUID incidentTypeUuid) { + this.incidentTypeUuid = JsonNullable.of(incidentTypeUuid); + } + + public IncidentRuleDataAttributesRequest matchAnyCondition(Boolean matchAnyCondition) { + this.matchAnyCondition = matchAnyCondition; + return this; + } + + /** + * Whether any condition (OR logic) should match instead of all (AND logic). + * + * @return matchAnyCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATCH_ANY_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMatchAnyCondition() { + return matchAnyCondition; + } + + public void setMatchAnyCondition(Boolean matchAnyCondition) { + this.matchAnyCondition = matchAnyCondition; + } + + public IncidentRuleDataAttributesRequest taskId(IncidentRuleTaskIDType taskId) { + this.taskId = taskId; + this.unparsed |= !taskId.isValid(); + return this; + } + + /** + * The task ID for an incident rule. + * + * @return taskId + */ + @JsonProperty(JSON_PROPERTY_TASK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleTaskIDType getTaskId() { + return taskId; + } + + public void setTaskId(IncidentRuleTaskIDType taskId) { + if (!taskId.isValid()) { + this.unparsed = true; + } + this.taskId = taskId; + } + + public IncidentRuleDataAttributesRequest taskPayload(String taskPayload) { + this.taskPayload = taskPayload; + return this; + } + + /** + * The JSON-encoded payload for the task. + * + * @return taskPayload + */ + @JsonProperty(JSON_PROPERTY_TASK_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTaskPayload() { + return taskPayload; + } + + public void setTaskPayload(String taskPayload) { + this.taskPayload = taskPayload; + } + + public IncidentRuleDataAttributesRequest trigger(IncidentRuleTriggerType trigger) { + this.trigger = trigger; + this.unparsed |= !trigger.isValid(); + return this; + } + + /** + * The trigger event for an incident rule. + * + * @return trigger + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRIGGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRuleTriggerType getTrigger() { + return trigger; + } + + public void setTrigger(IncidentRuleTriggerType trigger) { + if (!trigger.isValid()) { + this.unparsed = true; + } + this.trigger = trigger; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRuleDataAttributesRequest + */ + @JsonAnySetter + public IncidentRuleDataAttributesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRuleDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleDataAttributesRequest incidentRuleDataAttributesRequest = + (IncidentRuleDataAttributesRequest) o; + return Objects.equals(this.condition, incidentRuleDataAttributesRequest.condition) + && Objects.equals( + this.conditionTableType, incidentRuleDataAttributesRequest.conditionTableType) + && Objects.equals(this.conditions, incidentRuleDataAttributesRequest.conditions) + && Objects.equals(this.enabled, incidentRuleDataAttributesRequest.enabled) + && Objects.equals(this.executionType, incidentRuleDataAttributesRequest.executionType) + && Objects.equals(this.incidentTypeUuid, incidentRuleDataAttributesRequest.incidentTypeUuid) + && Objects.equals( + this.matchAnyCondition, incidentRuleDataAttributesRequest.matchAnyCondition) + && Objects.equals(this.taskId, incidentRuleDataAttributesRequest.taskId) + && Objects.equals(this.taskPayload, incidentRuleDataAttributesRequest.taskPayload) + && Objects.equals(this.trigger, incidentRuleDataAttributesRequest.trigger) + && Objects.equals( + this.additionalProperties, incidentRuleDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + condition, + conditionTableType, + conditions, + enabled, + executionType, + incidentTypeUuid, + matchAnyCondition, + taskId, + taskPayload, + trigger, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleDataAttributesRequest {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" conditionTableType: ").append(toIndentedString(conditionTableType)).append("\n"); + sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" executionType: ").append(toIndentedString(executionType)).append("\n"); + sb.append(" incidentTypeUuid: ").append(toIndentedString(incidentTypeUuid)).append("\n"); + sb.append(" matchAnyCondition: ").append(toIndentedString(matchAnyCondition)).append("\n"); + sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); + sb.append(" taskPayload: ").append(toIndentedString(taskPayload)).append("\n"); + sb.append(" trigger: ").append(toIndentedString(trigger)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataAttributesResponse.java new file mode 100644 index 00000000000..0c7bbbab594 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataAttributesResponse.java @@ -0,0 +1,629 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an incident rule in a response. */ +@JsonPropertyOrder({ + IncidentRuleDataAttributesResponse.JSON_PROPERTY_CONDITION, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_CONDITION_TABLE_TYPE, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_CONDITIONS, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_CREATED_BY_UUID, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_DELETED, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_ENABLED, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_EXECUTION_TYPE, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_INCIDENT_SETTINGS_ASSOCIATION_UUID, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_MATCH_ANY_CONDITION, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_MODIFIED, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_MODIFIED_BY_UUID, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_ORG_ID, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_TASK_ID, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_TASK_PAYLOAD, + IncidentRuleDataAttributesResponse.JSON_PROPERTY_TRIGGER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private IncidentRuleQueryCondition condition; + + public static final String JSON_PROPERTY_CONDITION_TABLE_TYPE = "condition_table_type"; + private Integer conditionTableType; + + public static final String JSON_PROPERTY_CONDITIONS = "conditions"; + private List conditions = null; + + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_CREATED_BY_UUID = "created_by_uuid"; + private UUID createdByUuid; + + public static final String JSON_PROPERTY_DELETED = "deleted"; + private JsonNullable deleted = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_EXECUTION_TYPE = "execution_type"; + private Integer executionType; + + public static final String JSON_PROPERTY_INCIDENT_SETTINGS_ASSOCIATION_UUID = + "incident_settings_association_uuid"; + private JsonNullable incidentSettingsAssociationUuid = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MATCH_ANY_CONDITION = "match_any_condition"; + private Boolean matchAnyCondition; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_MODIFIED_BY_UUID = "modified_by_uuid"; + private UUID modifiedByUuid; + + public static final String JSON_PROPERTY_ORG_ID = "org_id"; + private Long orgId; + + public static final String JSON_PROPERTY_TASK_ID = "task_id"; + private JsonNullable taskId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TASK_PAYLOAD = "task_payload"; + private JsonNullable taskPayload = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TRIGGER = "trigger"; + private String trigger; + + public IncidentRuleDataAttributesResponse condition(IncidentRuleQueryCondition condition) { + this.condition = condition; + this.unparsed |= condition.unparsed; + return this; + } + + /** + * A query-based condition for an incident rule. + * + * @return condition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRuleQueryCondition getCondition() { + return condition; + } + + public void setCondition(IncidentRuleQueryCondition condition) { + this.condition = condition; + } + + public IncidentRuleDataAttributesResponse conditionTableType(Integer conditionTableType) { + this.conditionTableType = conditionTableType; + return this; + } + + /** + * The condition table type. + * + * @return conditionTableType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITION_TABLE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConditionTableType() { + return conditionTableType; + } + + public void setConditionTableType(Integer conditionTableType) { + this.conditionTableType = conditionTableType; + } + + public IncidentRuleDataAttributesResponse conditions(List conditions) { + this.conditions = conditions; + for (IncidentRuleCondition item : conditions) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentRuleDataAttributesResponse addConditionsItem( + IncidentRuleCondition conditionsItem) { + if (this.conditions == null) { + this.conditions = new ArrayList<>(); + } + this.conditions.add(conditionsItem); + this.unparsed |= conditionsItem.unparsed; + return this; + } + + /** + * List of field-based conditions. + * + * @return conditions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConditions() { + return conditions; + } + + public void setConditions(List conditions) { + this.conditions = conditions; + } + + public IncidentRuleDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the rule was created. + * + * @return created + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(OffsetDateTime created) { + this.created = created; + } + + public IncidentRuleDataAttributesResponse createdByUuid(UUID createdByUuid) { + this.createdByUuid = createdByUuid; + return this; + } + + /** + * UUID of the user who created the rule. + * + * @return createdByUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCreatedByUuid() { + return createdByUuid; + } + + public void setCreatedByUuid(UUID createdByUuid) { + this.createdByUuid = createdByUuid; + } + + public IncidentRuleDataAttributesResponse deleted(OffsetDateTime deleted) { + this.deleted = JsonNullable.of(deleted); + return this; + } + + /** + * Timestamp when the rule was deleted. + * + * @return deleted + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeleted() { + return deleted.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDeleted_JsonNullable() { + return deleted; + } + + @JsonProperty(JSON_PROPERTY_DELETED) + public void setDeleted_JsonNullable(JsonNullable deleted) { + this.deleted = deleted; + } + + public void setDeleted(OffsetDateTime deleted) { + this.deleted = JsonNullable.of(deleted); + } + + public IncidentRuleDataAttributesResponse enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the rule is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public IncidentRuleDataAttributesResponse executionType(Integer executionType) { + this.executionType = executionType; + return this; + } + + /** + * The execution type of the rule. + * + * @return executionType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getExecutionType() { + return executionType; + } + + public void setExecutionType(Integer executionType) { + this.executionType = executionType; + } + + public IncidentRuleDataAttributesResponse incidentSettingsAssociationUuid( + UUID incidentSettingsAssociationUuid) { + this.incidentSettingsAssociationUuid = JsonNullable.of(incidentSettingsAssociationUuid); + return this; + } + + /** + * The incident settings association UUID. + * + * @return incidentSettingsAssociationUuid + */ + @jakarta.annotation.Nullable + @JsonIgnore + public UUID getIncidentSettingsAssociationUuid() { + return incidentSettingsAssociationUuid.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCIDENT_SETTINGS_ASSOCIATION_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIncidentSettingsAssociationUuid_JsonNullable() { + return incidentSettingsAssociationUuid; + } + + @JsonProperty(JSON_PROPERTY_INCIDENT_SETTINGS_ASSOCIATION_UUID) + public void setIncidentSettingsAssociationUuid_JsonNullable( + JsonNullable incidentSettingsAssociationUuid) { + this.incidentSettingsAssociationUuid = incidentSettingsAssociationUuid; + } + + public void setIncidentSettingsAssociationUuid(UUID incidentSettingsAssociationUuid) { + this.incidentSettingsAssociationUuid = JsonNullable.of(incidentSettingsAssociationUuid); + } + + public IncidentRuleDataAttributesResponse matchAnyCondition(Boolean matchAnyCondition) { + this.matchAnyCondition = matchAnyCondition; + return this; + } + + /** + * Whether any condition should match. + * + * @return matchAnyCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATCH_ANY_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMatchAnyCondition() { + return matchAnyCondition; + } + + public void setMatchAnyCondition(Boolean matchAnyCondition) { + this.matchAnyCondition = matchAnyCondition; + } + + public IncidentRuleDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the rule was last modified. + * + * @return modified + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } + + public void setModified(OffsetDateTime modified) { + this.modified = modified; + } + + public IncidentRuleDataAttributesResponse modifiedByUuid(UUID modifiedByUuid) { + this.modifiedByUuid = modifiedByUuid; + return this; + } + + /** + * UUID of the user who last modified the rule. + * + * @return modifiedByUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getModifiedByUuid() { + return modifiedByUuid; + } + + public void setModifiedByUuid(UUID modifiedByUuid) { + this.modifiedByUuid = modifiedByUuid; + } + + public IncidentRuleDataAttributesResponse orgId(Long orgId) { + this.orgId = orgId; + return this; + } + + /** + * The organization ID. + * + * @return orgId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOrgId() { + return orgId; + } + + public void setOrgId(Long orgId) { + this.orgId = orgId; + } + + public IncidentRuleDataAttributesResponse taskId(String taskId) { + this.taskId = JsonNullable.of(taskId); + return this; + } + + /** + * The task ID. + * + * @return taskId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTaskId() { + return taskId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TASK_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTaskId_JsonNullable() { + return taskId; + } + + @JsonProperty(JSON_PROPERTY_TASK_ID) + public void setTaskId_JsonNullable(JsonNullable taskId) { + this.taskId = taskId; + } + + public void setTaskId(String taskId) { + this.taskId = JsonNullable.of(taskId); + } + + public IncidentRuleDataAttributesResponse taskPayload(String taskPayload) { + this.taskPayload = JsonNullable.of(taskPayload); + return this; + } + + /** + * The JSON-encoded task payload. + * + * @return taskPayload + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTaskPayload() { + return taskPayload.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TASK_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTaskPayload_JsonNullable() { + return taskPayload; + } + + @JsonProperty(JSON_PROPERTY_TASK_PAYLOAD) + public void setTaskPayload_JsonNullable(JsonNullable taskPayload) { + this.taskPayload = taskPayload; + } + + public void setTaskPayload(String taskPayload) { + this.taskPayload = JsonNullable.of(taskPayload); + } + + public IncidentRuleDataAttributesResponse trigger(String trigger) { + this.trigger = trigger; + return this; + } + + /** + * The trigger event for the rule. + * + * @return trigger + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRIGGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTrigger() { + return trigger; + } + + public void setTrigger(String trigger) { + this.trigger = trigger; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRuleDataAttributesResponse + */ + @JsonAnySetter + public IncidentRuleDataAttributesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRuleDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleDataAttributesResponse incidentRuleDataAttributesResponse = + (IncidentRuleDataAttributesResponse) o; + return Objects.equals(this.condition, incidentRuleDataAttributesResponse.condition) + && Objects.equals( + this.conditionTableType, incidentRuleDataAttributesResponse.conditionTableType) + && Objects.equals(this.conditions, incidentRuleDataAttributesResponse.conditions) + && Objects.equals(this.created, incidentRuleDataAttributesResponse.created) + && Objects.equals(this.createdByUuid, incidentRuleDataAttributesResponse.createdByUuid) + && Objects.equals(this.deleted, incidentRuleDataAttributesResponse.deleted) + && Objects.equals(this.enabled, incidentRuleDataAttributesResponse.enabled) + && Objects.equals(this.executionType, incidentRuleDataAttributesResponse.executionType) + && Objects.equals( + this.incidentSettingsAssociationUuid, + incidentRuleDataAttributesResponse.incidentSettingsAssociationUuid) + && Objects.equals( + this.matchAnyCondition, incidentRuleDataAttributesResponse.matchAnyCondition) + && Objects.equals(this.modified, incidentRuleDataAttributesResponse.modified) + && Objects.equals(this.modifiedByUuid, incidentRuleDataAttributesResponse.modifiedByUuid) + && Objects.equals(this.orgId, incidentRuleDataAttributesResponse.orgId) + && Objects.equals(this.taskId, incidentRuleDataAttributesResponse.taskId) + && Objects.equals(this.taskPayload, incidentRuleDataAttributesResponse.taskPayload) + && Objects.equals(this.trigger, incidentRuleDataAttributesResponse.trigger) + && Objects.equals( + this.additionalProperties, incidentRuleDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + condition, + conditionTableType, + conditions, + created, + createdByUuid, + deleted, + enabled, + executionType, + incidentSettingsAssociationUuid, + matchAnyCondition, + modified, + modifiedByUuid, + orgId, + taskId, + taskPayload, + trigger, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleDataAttributesResponse {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" conditionTableType: ").append(toIndentedString(conditionTableType)).append("\n"); + sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" createdByUuid: ").append(toIndentedString(createdByUuid)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" executionType: ").append(toIndentedString(executionType)).append("\n"); + sb.append(" incidentSettingsAssociationUuid: ") + .append(toIndentedString(incidentSettingsAssociationUuid)) + .append("\n"); + sb.append(" matchAnyCondition: ").append(toIndentedString(matchAnyCondition)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" modifiedByUuid: ").append(toIndentedString(modifiedByUuid)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); + sb.append(" taskPayload: ").append(toIndentedString(taskPayload)).append("\n"); + sb.append(" trigger: ").append(toIndentedString(trigger)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataRequest.java new file mode 100644 index 00000000000..9d4ed3b2a12 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataRequest.java @@ -0,0 +1,181 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Incident rule data in a create request. */ +@JsonPropertyOrder({ + IncidentRuleDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentRuleDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentRuleDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRuleType type; + + public IncidentRuleDataRequest() {} + + @JsonCreator + public IncidentRuleDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentRuleDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentRuleDataRequest attributes(IncidentRuleDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating an incident rule. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentRuleDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentRuleDataRequest type(IncidentRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleType getType() { + return type; + } + + public void setType(IncidentRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRuleDataRequest + */ + @JsonAnySetter + public IncidentRuleDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRuleDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleDataRequest incidentRuleDataRequest = (IncidentRuleDataRequest) o; + return Objects.equals(this.attributes, incidentRuleDataRequest.attributes) + && Objects.equals(this.type, incidentRuleDataRequest.type) + && Objects.equals(this.additionalProperties, incidentRuleDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataResponse.java new file mode 100644 index 00000000000..9723328f6df --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleDataResponse.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Incident rule data in a response. */ +@JsonPropertyOrder({ + IncidentRuleDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentRuleDataResponse.JSON_PROPERTY_ID, + IncidentRuleDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentRuleDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRuleResponseType type; + + public IncidentRuleDataResponse() {} + + @JsonCreator + public IncidentRuleDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentRuleDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentRuleResponseType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentRuleDataResponse attributes(IncidentRuleDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an incident rule in a response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentRuleDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentRuleDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The rule identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentRuleDataResponse type(IncidentRuleResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident rule response resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleResponseType getType() { + return type; + } + + public void setType(IncidentRuleResponseType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRuleDataResponse + */ + @JsonAnySetter + public IncidentRuleDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRuleDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleDataResponse incidentRuleDataResponse = (IncidentRuleDataResponse) o; + return Objects.equals(this.attributes, incidentRuleDataResponse.attributes) + && Objects.equals(this.id, incidentRuleDataResponse.id) + && Objects.equals(this.type, incidentRuleDataResponse.type) + && Objects.equals(this.additionalProperties, incidentRuleDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionType.java new file mode 100644 index 00000000000..74492253bb3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The execution type of an incident rule. */ +@JsonSerialize(using = IncidentRuleExecutionType.IncidentRuleExecutionTypeSerializer.class) +public class IncidentRuleExecutionType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList(1l, 2l)); + + public static final IncidentRuleExecutionType SINGLE_EXECUTION = + new IncidentRuleExecutionType(1l); + public static final IncidentRuleExecutionType MULTI_EXECUTION = new IncidentRuleExecutionType(2l); + + IncidentRuleExecutionType(Long value) { + super(value, allowedValues); + } + + public static class IncidentRuleExecutionTypeSerializer + extends StdSerializer { + public IncidentRuleExecutionTypeSerializer(Class t) { + super(t); + } + + public IncidentRuleExecutionTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentRuleExecutionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentRuleExecutionType fromValue(Long value) { + return new IncidentRuleExecutionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchDataAttributesRequest.java new file mode 100644 index 00000000000..865fb2baa1c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchDataAttributesRequest.java @@ -0,0 +1,267 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes for patching an incident rule. All fields are optional. */ +@JsonPropertyOrder({ + IncidentRulePatchDataAttributesRequest.JSON_PROPERTY_CONDITION, + IncidentRulePatchDataAttributesRequest.JSON_PROPERTY_CONDITIONS, + IncidentRulePatchDataAttributesRequest.JSON_PROPERTY_ENABLED, + IncidentRulePatchDataAttributesRequest.JSON_PROPERTY_TASK_PAYLOAD, + IncidentRulePatchDataAttributesRequest.JSON_PROPERTY_TRIGGER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRulePatchDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private IncidentRuleQueryCondition condition; + + public static final String JSON_PROPERTY_CONDITIONS = "conditions"; + private List conditions = null; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_TASK_PAYLOAD = "task_payload"; + private String taskPayload; + + public static final String JSON_PROPERTY_TRIGGER = "trigger"; + private IncidentRuleTriggerType trigger; + + public IncidentRulePatchDataAttributesRequest condition(IncidentRuleQueryCondition condition) { + this.condition = condition; + this.unparsed |= condition.unparsed; + return this; + } + + /** + * A query-based condition for an incident rule. + * + * @return condition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRuleQueryCondition getCondition() { + return condition; + } + + public void setCondition(IncidentRuleQueryCondition condition) { + this.condition = condition; + } + + public IncidentRulePatchDataAttributesRequest conditions(List conditions) { + this.conditions = conditions; + for (IncidentRuleCondition item : conditions) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentRulePatchDataAttributesRequest addConditionsItem( + IncidentRuleCondition conditionsItem) { + if (this.conditions == null) { + this.conditions = new ArrayList<>(); + } + this.conditions.add(conditionsItem); + this.unparsed |= conditionsItem.unparsed; + return this; + } + + /** + * List of field-based conditions. + * + * @return conditions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConditions() { + return conditions; + } + + public void setConditions(List conditions) { + this.conditions = conditions; + } + + public IncidentRulePatchDataAttributesRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the rule is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public IncidentRulePatchDataAttributesRequest taskPayload(String taskPayload) { + this.taskPayload = taskPayload; + return this; + } + + /** + * The JSON-encoded payload for the task. + * + * @return taskPayload + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TASK_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTaskPayload() { + return taskPayload; + } + + public void setTaskPayload(String taskPayload) { + this.taskPayload = taskPayload; + } + + public IncidentRulePatchDataAttributesRequest trigger(IncidentRuleTriggerType trigger) { + this.trigger = trigger; + this.unparsed |= !trigger.isValid(); + return this; + } + + /** + * The trigger event for an incident rule. + * + * @return trigger + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRIGGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRuleTriggerType getTrigger() { + return trigger; + } + + public void setTrigger(IncidentRuleTriggerType trigger) { + if (!trigger.isValid()) { + this.unparsed = true; + } + this.trigger = trigger; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRulePatchDataAttributesRequest + */ + @JsonAnySetter + public IncidentRulePatchDataAttributesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRulePatchDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRulePatchDataAttributesRequest incidentRulePatchDataAttributesRequest = + (IncidentRulePatchDataAttributesRequest) o; + return Objects.equals(this.condition, incidentRulePatchDataAttributesRequest.condition) + && Objects.equals(this.conditions, incidentRulePatchDataAttributesRequest.conditions) + && Objects.equals(this.enabled, incidentRulePatchDataAttributesRequest.enabled) + && Objects.equals(this.taskPayload, incidentRulePatchDataAttributesRequest.taskPayload) + && Objects.equals(this.trigger, incidentRulePatchDataAttributesRequest.trigger) + && Objects.equals( + this.additionalProperties, incidentRulePatchDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(condition, conditions, enabled, taskPayload, trigger, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRulePatchDataAttributesRequest {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" taskPayload: ").append(toIndentedString(taskPayload)).append("\n"); + sb.append(" trigger: ").append(toIndentedString(trigger)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchDataRequest.java new file mode 100644 index 00000000000..6fc2a600a84 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchDataRequest.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Incident rule data in a patch request. */ +@JsonPropertyOrder({ + IncidentRulePatchDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentRulePatchDataRequest.JSON_PROPERTY_ID, + IncidentRulePatchDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRulePatchDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentRulePatchDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRuleType type; + + public IncidentRulePatchDataRequest() {} + + @JsonCreator + public IncidentRulePatchDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentRuleType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentRulePatchDataRequest attributes( + IncidentRulePatchDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for patching an incident rule. All fields are optional. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRulePatchDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentRulePatchDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentRulePatchDataRequest id(UUID id) { + this.id = id; + return this; + } + + /** + * The rule identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentRulePatchDataRequest type(IncidentRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleType getType() { + return type; + } + + public void setType(IncidentRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRulePatchDataRequest + */ + @JsonAnySetter + public IncidentRulePatchDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRulePatchDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRulePatchDataRequest incidentRulePatchDataRequest = (IncidentRulePatchDataRequest) o; + return Objects.equals(this.attributes, incidentRulePatchDataRequest.attributes) + && Objects.equals(this.id, incidentRulePatchDataRequest.id) + && Objects.equals(this.type, incidentRulePatchDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentRulePatchDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRulePatchDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchRequest.java new file mode 100644 index 00000000000..84390f5c5db --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRulePatchRequest.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for patching an incident rule. */ +@JsonPropertyOrder({IncidentRulePatchRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRulePatchRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentRulePatchDataRequest data; + + public IncidentRulePatchRequest() {} + + @JsonCreator + public IncidentRulePatchRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentRulePatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentRulePatchRequest data(IncidentRulePatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident rule data in a patch request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRulePatchDataRequest getData() { + return data; + } + + public void setData(IncidentRulePatchDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRulePatchRequest + */ + @JsonAnySetter + public IncidentRulePatchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRulePatchRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRulePatchRequest incidentRulePatchRequest = (IncidentRulePatchRequest) o; + return Objects.equals(this.data, incidentRulePatchRequest.data) + && Objects.equals(this.additionalProperties, incidentRulePatchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRulePatchRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleQueryCondition.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleQueryCondition.java new file mode 100644 index 00000000000..c89af3576a7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleQueryCondition.java @@ -0,0 +1,186 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A query-based condition for an incident rule. */ +@JsonPropertyOrder({ + IncidentRuleQueryCondition.JSON_PROPERTY_NORMALIZED_QUERY, + IncidentRuleQueryCondition.JSON_PROPERTY_RAW_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleQueryCondition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NORMALIZED_QUERY = "normalized_query"; + private JsonNullable normalizedQuery = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RAW_QUERY = "raw_query"; + private JsonNullable rawQuery = JsonNullable.undefined(); + + public IncidentRuleQueryCondition normalizedQuery(String normalizedQuery) { + this.normalizedQuery = JsonNullable.of(normalizedQuery); + return this; + } + + /** + * The normalized query string. + * + * @return normalizedQuery + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNormalizedQuery() { + return normalizedQuery.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NORMALIZED_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getNormalizedQuery_JsonNullable() { + return normalizedQuery; + } + + @JsonProperty(JSON_PROPERTY_NORMALIZED_QUERY) + public void setNormalizedQuery_JsonNullable(JsonNullable normalizedQuery) { + this.normalizedQuery = normalizedQuery; + } + + public void setNormalizedQuery(String normalizedQuery) { + this.normalizedQuery = JsonNullable.of(normalizedQuery); + } + + public IncidentRuleQueryCondition rawQuery(String rawQuery) { + this.rawQuery = JsonNullable.of(rawQuery); + return this; + } + + /** + * The raw query string. + * + * @return rawQuery + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getRawQuery() { + return rawQuery.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RAW_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getRawQuery_JsonNullable() { + return rawQuery; + } + + @JsonProperty(JSON_PROPERTY_RAW_QUERY) + public void setRawQuery_JsonNullable(JsonNullable rawQuery) { + this.rawQuery = rawQuery; + } + + public void setRawQuery(String rawQuery) { + this.rawQuery = JsonNullable.of(rawQuery); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRuleQueryCondition + */ + @JsonAnySetter + public IncidentRuleQueryCondition putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRuleQueryCondition object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleQueryCondition incidentRuleQueryCondition = (IncidentRuleQueryCondition) o; + return Objects.equals(this.normalizedQuery, incidentRuleQueryCondition.normalizedQuery) + && Objects.equals(this.rawQuery, incidentRuleQueryCondition.rawQuery) + && Objects.equals( + this.additionalProperties, incidentRuleQueryCondition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(normalizedQuery, rawQuery, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleQueryCondition {\n"); + sb.append(" normalizedQuery: ").append(toIndentedString(normalizedQuery)).append("\n"); + sb.append(" rawQuery: ").append(toIndentedString(rawQuery)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleRequest.java new file mode 100644 index 00000000000..0c830d90cf5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating an incident rule. */ +@JsonPropertyOrder({IncidentRuleRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentRuleDataRequest data; + + public IncidentRuleRequest() {} + + @JsonCreator + public IncidentRuleRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentRuleDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentRuleRequest data(IncidentRuleDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident rule data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleDataRequest getData() { + return data; + } + + public void setData(IncidentRuleDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRuleRequest + */ + @JsonAnySetter + public IncidentRuleRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRuleRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleRequest incidentRuleRequest = (IncidentRuleRequest) o; + return Objects.equals(this.data, incidentRuleRequest.data) + && Objects.equals(this.additionalProperties, incidentRuleRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleResponse.java new file mode 100644 index 00000000000..a897311459a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response with a single incident rule. */ +@JsonPropertyOrder({IncidentRuleResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentRuleDataResponse data; + + public IncidentRuleResponse() {} + + @JsonCreator + public IncidentRuleResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentRuleDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentRuleResponse data(IncidentRuleDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident rule data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleDataResponse getData() { + return data; + } + + public void setData(IncidentRuleDataResponse data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRuleResponse + */ + @JsonAnySetter + public IncidentRuleResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRuleResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleResponse incidentRuleResponse = (IncidentRuleResponse) o; + return Objects.equals(this.data, incidentRuleResponse.data) + && Objects.equals(this.additionalProperties, incidentRuleResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleResponseType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleResponseType.java new file mode 100644 index 00000000000..078dce76b3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleResponseType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Incident rule response resource type. */ +@JsonSerialize(using = IncidentRuleResponseType.IncidentRuleResponseTypeSerializer.class) +public class IncidentRuleResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incidents_rules")); + + public static final IncidentRuleResponseType INCIDENTS_RULES = + new IncidentRuleResponseType("incidents_rules"); + + IncidentRuleResponseType(String value) { + super(value, allowedValues); + } + + public static class IncidentRuleResponseTypeSerializer + extends StdSerializer { + public IncidentRuleResponseTypeSerializer(Class t) { + super(t); + } + + public IncidentRuleResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentRuleResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentRuleResponseType fromValue(String value) { + return new IncidentRuleResponseType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleTaskIDType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleTaskIDType.java new file mode 100644 index 00000000000..209eadaa9b5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleTaskIDType.java @@ -0,0 +1,92 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The task ID for an incident rule. */ +@JsonSerialize(using = IncidentRuleTaskIDType.IncidentRuleTaskIDTypeSerializer.class) +public class IncidentRuleTaskIDType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "jira-create-issue-job", + "notify-incident-handles-job", + "servicenow-create-incident-job", + "slack-create-channel-job", + "zoom-create-meeting-job", + "google-meet-create-meeting-job", + "workflow-automation-job", + "ms-teams-create-meeting-job", + "google-chat-create-space-job", + "zoom-suppress-summarization-job", + "ms-teams-suppress-summarization-job", + "google-meet-suppress-summarization-job")); + + public static final IncidentRuleTaskIDType JIRA_CREATE_ISSUE_JOB = + new IncidentRuleTaskIDType("jira-create-issue-job"); + public static final IncidentRuleTaskIDType NOTIFY_INCIDENT_HANDLES_JOB = + new IncidentRuleTaskIDType("notify-incident-handles-job"); + public static final IncidentRuleTaskIDType SERVICENOW_CREATE_INCIDENT_JOB = + new IncidentRuleTaskIDType("servicenow-create-incident-job"); + public static final IncidentRuleTaskIDType SLACK_CREATE_CHANNEL_JOB = + new IncidentRuleTaskIDType("slack-create-channel-job"); + public static final IncidentRuleTaskIDType ZOOM_CREATE_MEETING_JOB = + new IncidentRuleTaskIDType("zoom-create-meeting-job"); + public static final IncidentRuleTaskIDType GOOGLE_MEET_CREATE_MEETING_JOB = + new IncidentRuleTaskIDType("google-meet-create-meeting-job"); + public static final IncidentRuleTaskIDType WORKFLOW_AUTOMATION_JOB = + new IncidentRuleTaskIDType("workflow-automation-job"); + public static final IncidentRuleTaskIDType MS_TEAMS_CREATE_MEETING_JOB = + new IncidentRuleTaskIDType("ms-teams-create-meeting-job"); + public static final IncidentRuleTaskIDType GOOGLE_CHAT_CREATE_SPACE_JOB = + new IncidentRuleTaskIDType("google-chat-create-space-job"); + public static final IncidentRuleTaskIDType ZOOM_SUPPRESS_SUMMARIZATION_JOB = + new IncidentRuleTaskIDType("zoom-suppress-summarization-job"); + public static final IncidentRuleTaskIDType MS_TEAMS_SUPPRESS_SUMMARIZATION_JOB = + new IncidentRuleTaskIDType("ms-teams-suppress-summarization-job"); + public static final IncidentRuleTaskIDType GOOGLE_MEET_SUPPRESS_SUMMARIZATION_JOB = + new IncidentRuleTaskIDType("google-meet-suppress-summarization-job"); + + IncidentRuleTaskIDType(String value) { + super(value, allowedValues); + } + + public static class IncidentRuleTaskIDTypeSerializer + extends StdSerializer { + public IncidentRuleTaskIDTypeSerializer(Class t) { + super(t); + } + + public IncidentRuleTaskIDTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentRuleTaskIDType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentRuleTaskIDType fromValue(String value) { + return new IncidentRuleTaskIDType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleTriggerType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleTriggerType.java new file mode 100644 index 00000000000..689f1366048 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleTriggerType.java @@ -0,0 +1,63 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The trigger event for an incident rule. */ +@JsonSerialize(using = IncidentRuleTriggerType.IncidentRuleTriggerTypeSerializer.class) +public class IncidentRuleTriggerType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "incident_saved_trigger", "incident_created_trigger", "incident_modified_trigger")); + + public static final IncidentRuleTriggerType INCIDENT_SAVED_TRIGGER = + new IncidentRuleTriggerType("incident_saved_trigger"); + public static final IncidentRuleTriggerType INCIDENT_CREATED_TRIGGER = + new IncidentRuleTriggerType("incident_created_trigger"); + public static final IncidentRuleTriggerType INCIDENT_MODIFIED_TRIGGER = + new IncidentRuleTriggerType("incident_modified_trigger"); + + IncidentRuleTriggerType(String value) { + super(value, allowedValues); + } + + public static class IncidentRuleTriggerTypeSerializer + extends StdSerializer { + public IncidentRuleTriggerTypeSerializer(Class t) { + super(t); + } + + public IncidentRuleTriggerTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentRuleTriggerType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentRuleTriggerType fromValue(String value) { + return new IncidentRuleTriggerType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleType.java new file mode 100644 index 00000000000..8b7186f205a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Incident rule resource type. */ +@JsonSerialize(using = IncidentRuleType.IncidentRuleTypeSerializer.class) +public class IncidentRuleType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_rules")); + + public static final IncidentRuleType INCIDENT_RULES = new IncidentRuleType("incident_rules"); + + IncidentRuleType(String value) { + super(value, allowedValues); + } + + public static class IncidentRuleTypeSerializer extends StdSerializer { + public IncidentRuleTypeSerializer(Class t) { + super(t); + } + + public IncidentRuleTypeSerializer() { + this(null); + } + + @Override + public void serialize(IncidentRuleType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentRuleType fromValue(String value) { + return new IncidentRuleType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRulesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRulesResponse.java new file mode 100644 index 00000000000..15477f9e413 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRulesResponse.java @@ -0,0 +1,155 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a list of incident rules. */ +@JsonPropertyOrder({IncidentRulesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRulesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentRulesResponse() {} + + @JsonCreator + public IncidentRulesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentRulesResponse data(List data) { + this.data = data; + for (IncidentRuleDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentRulesResponse addDataItem(IncidentRuleDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of incident rules. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentRulesResponse + */ + @JsonAnySetter + public IncidentRulesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentRulesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRulesResponse incidentRulesResponse = (IncidentRulesResponse) o; + return Objects.equals(this.data, incidentRulesResponse.data) + && Objects.equals(this.additionalProperties, incidentRulesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRulesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordDataAttributesRequest.java new file mode 100644 index 00000000000..e4da24261d7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordDataAttributesRequest.java @@ -0,0 +1,242 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating a ServiceNow record for an incident. */ +@JsonPropertyOrder({ + IncidentServiceNowRecordDataAttributesRequest.JSON_PROPERTY_ASSIGNMENT_GROUP, + IncidentServiceNowRecordDataAttributesRequest.JSON_PROPERTY_CONFIGURATION_ITEM_MAPPING, + IncidentServiceNowRecordDataAttributesRequest.JSON_PROPERTY_INSTANCE_NAME, + IncidentServiceNowRecordDataAttributesRequest.JSON_PROPERTY_RECORD_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentServiceNowRecordDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ASSIGNMENT_GROUP = "assignment_group"; + private String assignmentGroup; + + public static final String JSON_PROPERTY_CONFIGURATION_ITEM_MAPPING = + "configuration_item_mapping"; + private String configurationItemMapping; + + public static final String JSON_PROPERTY_INSTANCE_NAME = "instance_name"; + private String instanceName; + + public static final String JSON_PROPERTY_RECORD_ID = "record_id"; + private String recordId; + + public IncidentServiceNowRecordDataAttributesRequest() {} + + @JsonCreator + public IncidentServiceNowRecordDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ASSIGNMENT_GROUP) String assignmentGroup, + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIGURATION_ITEM_MAPPING) + String configurationItemMapping, + @JsonProperty(required = true, value = JSON_PROPERTY_INSTANCE_NAME) String instanceName) { + this.assignmentGroup = assignmentGroup; + this.configurationItemMapping = configurationItemMapping; + this.instanceName = instanceName; + } + + public IncidentServiceNowRecordDataAttributesRequest assignmentGroup(String assignmentGroup) { + this.assignmentGroup = assignmentGroup; + return this; + } + + /** + * The ServiceNow assignment group. + * + * @return assignmentGroup + */ + @JsonProperty(JSON_PROPERTY_ASSIGNMENT_GROUP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssignmentGroup() { + return assignmentGroup; + } + + public void setAssignmentGroup(String assignmentGroup) { + this.assignmentGroup = assignmentGroup; + } + + public IncidentServiceNowRecordDataAttributesRequest configurationItemMapping( + String configurationItemMapping) { + this.configurationItemMapping = configurationItemMapping; + return this; + } + + /** + * The ServiceNow configuration item mapping. + * + * @return configurationItemMapping + */ + @JsonProperty(JSON_PROPERTY_CONFIGURATION_ITEM_MAPPING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigurationItemMapping() { + return configurationItemMapping; + } + + public void setConfigurationItemMapping(String configurationItemMapping) { + this.configurationItemMapping = configurationItemMapping; + } + + public IncidentServiceNowRecordDataAttributesRequest instanceName(String instanceName) { + this.instanceName = instanceName; + return this; + } + + /** + * The ServiceNow instance name. + * + * @return instanceName + */ + @JsonProperty(JSON_PROPERTY_INSTANCE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInstanceName() { + return instanceName; + } + + public void setInstanceName(String instanceName) { + this.instanceName = instanceName; + } + + public IncidentServiceNowRecordDataAttributesRequest recordId(String recordId) { + this.recordId = recordId; + return this; + } + + /** + * An existing ServiceNow record ID (Sys ID) to link instead of creating a new record. + * + * @return recordId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECORD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRecordId() { + return recordId; + } + + public void setRecordId(String recordId) { + this.recordId = recordId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentServiceNowRecordDataAttributesRequest + */ + @JsonAnySetter + public IncidentServiceNowRecordDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentServiceNowRecordDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentServiceNowRecordDataAttributesRequest incidentServiceNowRecordDataAttributesRequest = + (IncidentServiceNowRecordDataAttributesRequest) o; + return Objects.equals( + this.assignmentGroup, incidentServiceNowRecordDataAttributesRequest.assignmentGroup) + && Objects.equals( + this.configurationItemMapping, + incidentServiceNowRecordDataAttributesRequest.configurationItemMapping) + && Objects.equals( + this.instanceName, incidentServiceNowRecordDataAttributesRequest.instanceName) + && Objects.equals(this.recordId, incidentServiceNowRecordDataAttributesRequest.recordId) + && Objects.equals( + this.additionalProperties, + incidentServiceNowRecordDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + assignmentGroup, configurationItemMapping, instanceName, recordId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentServiceNowRecordDataAttributesRequest {\n"); + sb.append(" assignmentGroup: ").append(toIndentedString(assignmentGroup)).append("\n"); + sb.append(" configurationItemMapping: ") + .append(toIndentedString(configurationItemMapping)) + .append("\n"); + sb.append(" instanceName: ").append(toIndentedString(instanceName)).append("\n"); + sb.append(" recordId: ").append(toIndentedString(recordId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordDataRequest.java new file mode 100644 index 00000000000..4a6483db59e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordDataRequest.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** ServiceNow record data in a create request. */ +@JsonPropertyOrder({ + IncidentServiceNowRecordDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentServiceNowRecordDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentServiceNowRecordDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentServiceNowRecordDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentServiceNowRecordPromptType type; + + public IncidentServiceNowRecordDataRequest() {} + + @JsonCreator + public IncidentServiceNowRecordDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentServiceNowRecordDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentServiceNowRecordPromptType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentServiceNowRecordDataRequest attributes( + IncidentServiceNowRecordDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a ServiceNow record for an incident. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentServiceNowRecordDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentServiceNowRecordDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentServiceNowRecordDataRequest type(IncidentServiceNowRecordPromptType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * ServiceNow record prompt resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentServiceNowRecordPromptType getType() { + return type; + } + + public void setType(IncidentServiceNowRecordPromptType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentServiceNowRecordDataRequest + */ + @JsonAnySetter + public IncidentServiceNowRecordDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentServiceNowRecordDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentServiceNowRecordDataRequest incidentServiceNowRecordDataRequest = + (IncidentServiceNowRecordDataRequest) o; + return Objects.equals(this.attributes, incidentServiceNowRecordDataRequest.attributes) + && Objects.equals(this.type, incidentServiceNowRecordDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentServiceNowRecordDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentServiceNowRecordDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordPromptType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordPromptType.java new file mode 100644 index 00000000000..1c3560715df --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordPromptType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** ServiceNow record prompt resource type. */ +@JsonSerialize( + using = IncidentServiceNowRecordPromptType.IncidentServiceNowRecordPromptTypeSerializer.class) +public class IncidentServiceNowRecordPromptType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_servicenow_record_prompt")); + + public static final IncidentServiceNowRecordPromptType INCIDENT_SERVICENOW_RECORD_PROMPT = + new IncidentServiceNowRecordPromptType("incident_servicenow_record_prompt"); + + IncidentServiceNowRecordPromptType(String value) { + super(value, allowedValues); + } + + public static class IncidentServiceNowRecordPromptTypeSerializer + extends StdSerializer { + public IncidentServiceNowRecordPromptTypeSerializer( + Class t) { + super(t); + } + + public IncidentServiceNowRecordPromptTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentServiceNowRecordPromptType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentServiceNowRecordPromptType fromValue(String value) { + return new IncidentServiceNowRecordPromptType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordRequest.java new file mode 100644 index 00000000000..25183a0110c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceNowRecordRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating a ServiceNow record for an incident. */ +@JsonPropertyOrder({IncidentServiceNowRecordRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentServiceNowRecordRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentServiceNowRecordDataRequest data; + + public IncidentServiceNowRecordRequest() {} + + @JsonCreator + public IncidentServiceNowRecordRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentServiceNowRecordDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentServiceNowRecordRequest data(IncidentServiceNowRecordDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * ServiceNow record data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentServiceNowRecordDataRequest getData() { + return data; + } + + public void setData(IncidentServiceNowRecordDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentServiceNowRecordRequest + */ + @JsonAnySetter + public IncidentServiceNowRecordRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentServiceNowRecordRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentServiceNowRecordRequest incidentServiceNowRecordRequest = + (IncidentServiceNowRecordRequest) o; + return Objects.equals(this.data, incidentServiceNowRecordRequest.data) + && Objects.equals( + this.additionalProperties, incidentServiceNowRecordRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentServiceNowRecordRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataAttributesRequest.java new file mode 100644 index 00000000000..fd96fc01a73 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataAttributesRequest.java @@ -0,0 +1,189 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating a timestamp override. */ +@JsonPropertyOrder({ + IncidentTimestampOverrideDataAttributesRequest.JSON_PROPERTY_TIMESTAMP_TYPE, + IncidentTimestampOverrideDataAttributesRequest.JSON_PROPERTY_TIMESTAMP_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverrideDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TIMESTAMP_TYPE = "timestamp_type"; + private IncidentTimestampType timestampType; + + public static final String JSON_PROPERTY_TIMESTAMP_VALUE = "timestamp_value"; + private OffsetDateTime timestampValue; + + public IncidentTimestampOverrideDataAttributesRequest() {} + + @JsonCreator + public IncidentTimestampOverrideDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_TIMESTAMP_TYPE) + IncidentTimestampType timestampType, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMESTAMP_VALUE) + OffsetDateTime timestampValue) { + this.timestampType = timestampType; + this.unparsed |= !timestampType.isValid(); + this.timestampValue = timestampValue; + } + + public IncidentTimestampOverrideDataAttributesRequest timestampType( + IncidentTimestampType timestampType) { + this.timestampType = timestampType; + this.unparsed |= !timestampType.isValid(); + return this; + } + + /** + * The type of timestamp to override. + * + * @return timestampType + */ + @JsonProperty(JSON_PROPERTY_TIMESTAMP_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampType getTimestampType() { + return timestampType; + } + + public void setTimestampType(IncidentTimestampType timestampType) { + if (!timestampType.isValid()) { + this.unparsed = true; + } + this.timestampType = timestampType; + } + + public IncidentTimestampOverrideDataAttributesRequest timestampValue( + OffsetDateTime timestampValue) { + this.timestampValue = timestampValue; + return this; + } + + /** + * The overridden timestamp value. + * + * @return timestampValue + */ + @JsonProperty(JSON_PROPERTY_TIMESTAMP_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getTimestampValue() { + return timestampValue; + } + + public void setTimestampValue(OffsetDateTime timestampValue) { + this.timestampValue = timestampValue; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverrideDataAttributesRequest + */ + @JsonAnySetter + public IncidentTimestampOverrideDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverrideDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverrideDataAttributesRequest incidentTimestampOverrideDataAttributesRequest = + (IncidentTimestampOverrideDataAttributesRequest) o; + return Objects.equals( + this.timestampType, incidentTimestampOverrideDataAttributesRequest.timestampType) + && Objects.equals( + this.timestampValue, incidentTimestampOverrideDataAttributesRequest.timestampValue) + && Objects.equals( + this.additionalProperties, + incidentTimestampOverrideDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(timestampType, timestampValue, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverrideDataAttributesRequest {\n"); + sb.append(" timestampType: ").append(toIndentedString(timestampType)).append("\n"); + sb.append(" timestampValue: ").append(toIndentedString(timestampValue)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataAttributesResponse.java new file mode 100644 index 00000000000..833f25555d7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataAttributesResponse.java @@ -0,0 +1,321 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of a timestamp override in a response. */ +@JsonPropertyOrder({ + IncidentTimestampOverrideDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + IncidentTimestampOverrideDataAttributesResponse.JSON_PROPERTY_DELETED_AT, + IncidentTimestampOverrideDataAttributesResponse.JSON_PROPERTY_INCIDENT_ID, + IncidentTimestampOverrideDataAttributesResponse.JSON_PROPERTY_MODIFIED_AT, + IncidentTimestampOverrideDataAttributesResponse.JSON_PROPERTY_TIMESTAMP_TYPE, + IncidentTimestampOverrideDataAttributesResponse.JSON_PROPERTY_TIMESTAMP_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverrideDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private JsonNullable deletedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INCIDENT_ID = "incident_id"; + private String incidentId; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_TIMESTAMP_TYPE = "timestamp_type"; + private IncidentTimestampType timestampType; + + public static final String JSON_PROPERTY_TIMESTAMP_VALUE = "timestamp_value"; + private OffsetDateTime timestampValue; + + public IncidentTimestampOverrideDataAttributesResponse() {} + + @JsonCreator + public IncidentTimestampOverrideDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_ID) String incidentId, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMESTAMP_TYPE) + IncidentTimestampType timestampType, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMESTAMP_VALUE) + OffsetDateTime timestampValue) { + this.createdAt = createdAt; + this.incidentId = incidentId; + this.modifiedAt = modifiedAt; + this.timestampType = timestampType; + this.unparsed |= !timestampType.isValid(); + this.timestampValue = timestampValue; + } + + public IncidentTimestampOverrideDataAttributesResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the override was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public IncidentTimestampOverrideDataAttributesResponse deletedAt(OffsetDateTime deletedAt) { + this.deletedAt = JsonNullable.of(deletedAt); + return this; + } + + /** + * Timestamp when the override was deleted. + * + * @return deletedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeletedAt() { + return deletedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDeletedAt_JsonNullable() { + return deletedAt; + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + public void setDeletedAt_JsonNullable(JsonNullable deletedAt) { + this.deletedAt = deletedAt; + } + + public void setDeletedAt(OffsetDateTime deletedAt) { + this.deletedAt = JsonNullable.of(deletedAt); + } + + public IncidentTimestampOverrideDataAttributesResponse incidentId(String incidentId) { + this.incidentId = incidentId; + return this; + } + + /** + * The incident identifier. + * + * @return incidentId + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIncidentId() { + return incidentId; + } + + public void setIncidentId(String incidentId) { + this.incidentId = incidentId; + } + + public IncidentTimestampOverrideDataAttributesResponse modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Timestamp when the override was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public IncidentTimestampOverrideDataAttributesResponse timestampType( + IncidentTimestampType timestampType) { + this.timestampType = timestampType; + this.unparsed |= !timestampType.isValid(); + return this; + } + + /** + * The type of timestamp to override. + * + * @return timestampType + */ + @JsonProperty(JSON_PROPERTY_TIMESTAMP_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampType getTimestampType() { + return timestampType; + } + + public void setTimestampType(IncidentTimestampType timestampType) { + if (!timestampType.isValid()) { + this.unparsed = true; + } + this.timestampType = timestampType; + } + + public IncidentTimestampOverrideDataAttributesResponse timestampValue( + OffsetDateTime timestampValue) { + this.timestampValue = timestampValue; + return this; + } + + /** + * The overridden timestamp value. + * + * @return timestampValue + */ + @JsonProperty(JSON_PROPERTY_TIMESTAMP_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getTimestampValue() { + return timestampValue; + } + + public void setTimestampValue(OffsetDateTime timestampValue) { + this.timestampValue = timestampValue; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverrideDataAttributesResponse + */ + @JsonAnySetter + public IncidentTimestampOverrideDataAttributesResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverrideDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverrideDataAttributesResponse + incidentTimestampOverrideDataAttributesResponse = + (IncidentTimestampOverrideDataAttributesResponse) o; + return Objects.equals(this.createdAt, incidentTimestampOverrideDataAttributesResponse.createdAt) + && Objects.equals(this.deletedAt, incidentTimestampOverrideDataAttributesResponse.deletedAt) + && Objects.equals( + this.incidentId, incidentTimestampOverrideDataAttributesResponse.incidentId) + && Objects.equals( + this.modifiedAt, incidentTimestampOverrideDataAttributesResponse.modifiedAt) + && Objects.equals( + this.timestampType, incidentTimestampOverrideDataAttributesResponse.timestampType) + && Objects.equals( + this.timestampValue, incidentTimestampOverrideDataAttributesResponse.timestampValue) + && Objects.equals( + this.additionalProperties, + incidentTimestampOverrideDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + deletedAt, + incidentId, + modifiedAt, + timestampType, + timestampValue, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverrideDataAttributesResponse {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" incidentId: ").append(toIndentedString(incidentId)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" timestampType: ").append(toIndentedString(timestampType)).append("\n"); + sb.append(" timestampValue: ").append(toIndentedString(timestampValue)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataRequest.java new file mode 100644 index 00000000000..93e6eac475e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataRequest.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Timestamp override data in a create request. */ +@JsonPropertyOrder({ + IncidentTimestampOverrideDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentTimestampOverrideDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverrideDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentTimestampOverrideDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentTimestampOverrideType type; + + public IncidentTimestampOverrideDataRequest() {} + + @JsonCreator + public IncidentTimestampOverrideDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentTimestampOverrideDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentTimestampOverrideType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentTimestampOverrideDataRequest attributes( + IncidentTimestampOverrideDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a timestamp override. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampOverrideDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentTimestampOverrideDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentTimestampOverrideDataRequest type(IncidentTimestampOverrideType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident timestamp override resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampOverrideType getType() { + return type; + } + + public void setType(IncidentTimestampOverrideType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverrideDataRequest + */ + @JsonAnySetter + public IncidentTimestampOverrideDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverrideDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverrideDataRequest incidentTimestampOverrideDataRequest = + (IncidentTimestampOverrideDataRequest) o; + return Objects.equals(this.attributes, incidentTimestampOverrideDataRequest.attributes) + && Objects.equals(this.type, incidentTimestampOverrideDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentTimestampOverrideDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverrideDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataResponse.java new file mode 100644 index 00000000000..e687bc2d26d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideDataResponse.java @@ -0,0 +1,243 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Timestamp override data in a response. */ +@JsonPropertyOrder({ + IncidentTimestampOverrideDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentTimestampOverrideDataResponse.JSON_PROPERTY_ID, + IncidentTimestampOverrideDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentTimestampOverrideDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverrideDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentTimestampOverrideDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentTimestampOverrideRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentTimestampOverrideType type; + + public IncidentTimestampOverrideDataResponse() {} + + @JsonCreator + public IncidentTimestampOverrideDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentTimestampOverrideDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentTimestampOverrideType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentTimestampOverrideDataResponse attributes( + IncidentTimestampOverrideDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a timestamp override in a response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampOverrideDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentTimestampOverrideDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentTimestampOverrideDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The timestamp override identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentTimestampOverrideDataResponse relationships( + IncidentTimestampOverrideRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for a timestamp override. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTimestampOverrideRelationships getRelationships() { + return relationships; + } + + public void setRelationships(IncidentTimestampOverrideRelationships relationships) { + this.relationships = relationships; + } + + public IncidentTimestampOverrideDataResponse type(IncidentTimestampOverrideType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident timestamp override resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampOverrideType getType() { + return type; + } + + public void setType(IncidentTimestampOverrideType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverrideDataResponse + */ + @JsonAnySetter + public IncidentTimestampOverrideDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverrideDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverrideDataResponse incidentTimestampOverrideDataResponse = + (IncidentTimestampOverrideDataResponse) o; + return Objects.equals(this.attributes, incidentTimestampOverrideDataResponse.attributes) + && Objects.equals(this.id, incidentTimestampOverrideDataResponse.id) + && Objects.equals(this.relationships, incidentTimestampOverrideDataResponse.relationships) + && Objects.equals(this.type, incidentTimestampOverrideDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentTimestampOverrideDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverrideDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchDataAttributesRequest.java new file mode 100644 index 00000000000..9be09ee6758 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchDataAttributesRequest.java @@ -0,0 +1,180 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for patching a timestamp override. All fields are optional. */ +@JsonPropertyOrder({ + IncidentTimestampOverridePatchDataAttributesRequest.JSON_PROPERTY_TIMESTAMP_TYPE, + IncidentTimestampOverridePatchDataAttributesRequest.JSON_PROPERTY_TIMESTAMP_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverridePatchDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TIMESTAMP_TYPE = "timestamp_type"; + private IncidentTimestampType timestampType; + + public static final String JSON_PROPERTY_TIMESTAMP_VALUE = "timestamp_value"; + private OffsetDateTime timestampValue; + + public IncidentTimestampOverridePatchDataAttributesRequest timestampType( + IncidentTimestampType timestampType) { + this.timestampType = timestampType; + this.unparsed |= !timestampType.isValid(); + return this; + } + + /** + * The type of timestamp to override. + * + * @return timestampType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTimestampType getTimestampType() { + return timestampType; + } + + public void setTimestampType(IncidentTimestampType timestampType) { + if (!timestampType.isValid()) { + this.unparsed = true; + } + this.timestampType = timestampType; + } + + public IncidentTimestampOverridePatchDataAttributesRequest timestampValue( + OffsetDateTime timestampValue) { + this.timestampValue = timestampValue; + return this; + } + + /** + * The overridden timestamp value. + * + * @return timestampValue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestampValue() { + return timestampValue; + } + + public void setTimestampValue(OffsetDateTime timestampValue) { + this.timestampValue = timestampValue; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverridePatchDataAttributesRequest + */ + @JsonAnySetter + public IncidentTimestampOverridePatchDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentTimestampOverridePatchDataAttributesRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverridePatchDataAttributesRequest + incidentTimestampOverridePatchDataAttributesRequest = + (IncidentTimestampOverridePatchDataAttributesRequest) o; + return Objects.equals( + this.timestampType, incidentTimestampOverridePatchDataAttributesRequest.timestampType) + && Objects.equals( + this.timestampValue, incidentTimestampOverridePatchDataAttributesRequest.timestampValue) + && Objects.equals( + this.additionalProperties, + incidentTimestampOverridePatchDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(timestampType, timestampValue, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverridePatchDataAttributesRequest {\n"); + sb.append(" timestampType: ").append(toIndentedString(timestampType)).append("\n"); + sb.append(" timestampValue: ").append(toIndentedString(timestampValue)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchDataRequest.java new file mode 100644 index 00000000000..f2652fa2bff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchDataRequest.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Timestamp override data in a patch request. */ +@JsonPropertyOrder({ + IncidentTimestampOverridePatchDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentTimestampOverridePatchDataRequest.JSON_PROPERTY_ID, + IncidentTimestampOverridePatchDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverridePatchDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentTimestampOverridePatchDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentTimestampOverrideType type; + + public IncidentTimestampOverridePatchDataRequest() {} + + @JsonCreator + public IncidentTimestampOverridePatchDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentTimestampOverrideType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentTimestampOverridePatchDataRequest attributes( + IncidentTimestampOverridePatchDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for patching a timestamp override. All fields are optional. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTimestampOverridePatchDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentTimestampOverridePatchDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentTimestampOverridePatchDataRequest id(UUID id) { + this.id = id; + return this; + } + + /** + * The timestamp override identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentTimestampOverridePatchDataRequest type(IncidentTimestampOverrideType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident timestamp override resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampOverrideType getType() { + return type; + } + + public void setType(IncidentTimestampOverrideType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverridePatchDataRequest + */ + @JsonAnySetter + public IncidentTimestampOverridePatchDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverridePatchDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverridePatchDataRequest incidentTimestampOverridePatchDataRequest = + (IncidentTimestampOverridePatchDataRequest) o; + return Objects.equals(this.attributes, incidentTimestampOverridePatchDataRequest.attributes) + && Objects.equals(this.id, incidentTimestampOverridePatchDataRequest.id) + && Objects.equals(this.type, incidentTimestampOverridePatchDataRequest.type) + && Objects.equals( + this.additionalProperties, + incidentTimestampOverridePatchDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverridePatchDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchRequest.java new file mode 100644 index 00000000000..e30845a8525 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridePatchRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for patching a timestamp override. */ +@JsonPropertyOrder({IncidentTimestampOverridePatchRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverridePatchRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentTimestampOverridePatchDataRequest data; + + public IncidentTimestampOverridePatchRequest() {} + + @JsonCreator + public IncidentTimestampOverridePatchRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentTimestampOverridePatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentTimestampOverridePatchRequest data( + IncidentTimestampOverridePatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Timestamp override data in a patch request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampOverridePatchDataRequest getData() { + return data; + } + + public void setData(IncidentTimestampOverridePatchDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverridePatchRequest + */ + @JsonAnySetter + public IncidentTimestampOverridePatchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverridePatchRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverridePatchRequest incidentTimestampOverridePatchRequest = + (IncidentTimestampOverridePatchRequest) o; + return Objects.equals(this.data, incidentTimestampOverridePatchRequest.data) + && Objects.equals( + this.additionalProperties, incidentTimestampOverridePatchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverridePatchRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideRelationships.java new file mode 100644 index 00000000000..5c0e4c3e8df --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideRelationships.java @@ -0,0 +1,170 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for a timestamp override. */ +@JsonPropertyOrder({ + IncidentTimestampOverrideRelationships.JSON_PROPERTY_CREATED_BY_USER, + IncidentTimestampOverrideRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverrideRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private RelationshipToUser createdByUser; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private RelationshipToUser lastModifiedByUser; + + public IncidentTimestampOverrideRelationships createdByUser(RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + } + + public IncidentTimestampOverrideRelationships lastModifiedByUser( + RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser(RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverrideRelationships + */ + @JsonAnySetter + public IncidentTimestampOverrideRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverrideRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverrideRelationships incidentTimestampOverrideRelationships = + (IncidentTimestampOverrideRelationships) o; + return Objects.equals(this.createdByUser, incidentTimestampOverrideRelationships.createdByUser) + && Objects.equals( + this.lastModifiedByUser, incidentTimestampOverrideRelationships.lastModifiedByUser) + && Objects.equals( + this.additionalProperties, incidentTimestampOverrideRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, lastModifiedByUser, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverrideRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideRequest.java new file mode 100644 index 00000000000..4d10f47ed5b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for creating a timestamp override. */ +@JsonPropertyOrder({IncidentTimestampOverrideRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverrideRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentTimestampOverrideDataRequest data; + + public IncidentTimestampOverrideRequest() {} + + @JsonCreator + public IncidentTimestampOverrideRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentTimestampOverrideDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentTimestampOverrideRequest data(IncidentTimestampOverrideDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Timestamp override data in a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampOverrideDataRequest getData() { + return data; + } + + public void setData(IncidentTimestampOverrideDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverrideRequest + */ + @JsonAnySetter + public IncidentTimestampOverrideRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverrideRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverrideRequest incidentTimestampOverrideRequest = + (IncidentTimestampOverrideRequest) o; + return Objects.equals(this.data, incidentTimestampOverrideRequest.data) + && Objects.equals( + this.additionalProperties, incidentTimestampOverrideRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverrideRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideResponse.java new file mode 100644 index 00000000000..1cfec669b18 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideResponse.java @@ -0,0 +1,169 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a single timestamp override. */ +@JsonPropertyOrder({ + IncidentTimestampOverrideResponse.JSON_PROPERTY_DATA, + IncidentTimestampOverrideResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverrideResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentTimestampOverrideDataResponse data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentTimestampOverrideResponse() {} + + @JsonCreator + public IncidentTimestampOverrideResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentTimestampOverrideDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentTimestampOverrideResponse data(IncidentTimestampOverrideDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Timestamp override data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimestampOverrideDataResponse getData() { + return data; + } + + public void setData(IncidentTimestampOverrideDataResponse data) { + this.data = data; + } + + /** + * Included related resources. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverrideResponse + */ + @JsonAnySetter + public IncidentTimestampOverrideResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverrideResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverrideResponse incidentTimestampOverrideResponse = + (IncidentTimestampOverrideResponse) o; + return Objects.equals(this.data, incidentTimestampOverrideResponse.data) + && Objects.equals(this.included, incidentTimestampOverrideResponse.included) + && Objects.equals( + this.additionalProperties, incidentTimestampOverrideResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverrideResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideType.java new file mode 100644 index 00000000000..1b2638ce16f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverrideType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Incident timestamp override resource type. */ +@JsonSerialize(using = IncidentTimestampOverrideType.IncidentTimestampOverrideTypeSerializer.class) +public class IncidentTimestampOverrideType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incidents_timestamp_overrides")); + + public static final IncidentTimestampOverrideType INCIDENTS_TIMESTAMP_OVERRIDES = + new IncidentTimestampOverrideType("incidents_timestamp_overrides"); + + IncidentTimestampOverrideType(String value) { + super(value, allowedValues); + } + + public static class IncidentTimestampOverrideTypeSerializer + extends StdSerializer { + public IncidentTimestampOverrideTypeSerializer(Class t) { + super(t); + } + + public IncidentTimestampOverrideTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentTimestampOverrideType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentTimestampOverrideType fromValue(String value) { + return new IncidentTimestampOverrideType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridesResponse.java new file mode 100644 index 00000000000..fa58470932c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampOverridesResponse.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a list of timestamp overrides. */ +@JsonPropertyOrder({ + IncidentTimestampOverridesResponse.JSON_PROPERTY_DATA, + IncidentTimestampOverridesResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimestampOverridesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentTimestampOverridesResponse() {} + + @JsonCreator + public IncidentTimestampOverridesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentTimestampOverridesResponse data(List data) { + this.data = data; + for (IncidentTimestampOverrideDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentTimestampOverridesResponse addDataItem( + IncidentTimestampOverrideDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of timestamp overrides. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * Included related resources. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentTimestampOverridesResponse + */ + @JsonAnySetter + public IncidentTimestampOverridesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentTimestampOverridesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimestampOverridesResponse incidentTimestampOverridesResponse = + (IncidentTimestampOverridesResponse) o; + return Objects.equals(this.data, incidentTimestampOverridesResponse.data) + && Objects.equals(this.included, incidentTimestampOverridesResponse.included) + && Objects.equals( + this.additionalProperties, incidentTimestampOverridesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimestampOverridesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampType.java new file mode 100644 index 00000000000..1f38b1e1f7a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimestampType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of timestamp to override. */ +@JsonSerialize(using = IncidentTimestampType.IncidentTimestampTypeSerializer.class) +public class IncidentTimestampType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("created", "detected", "resolved", "declared")); + + public static final IncidentTimestampType CREATED = new IncidentTimestampType("created"); + public static final IncidentTimestampType DETECTED = new IncidentTimestampType("detected"); + public static final IncidentTimestampType RESOLVED = new IncidentTimestampType("resolved"); + public static final IncidentTimestampType DECLARED = new IncidentTimestampType("declared"); + + IncidentTimestampType(String value) { + super(value, allowedValues); + } + + public static class IncidentTimestampTypeSerializer extends StdSerializer { + public IncidentTimestampTypeSerializer(Class t) { + super(t); + } + + public IncidentTimestampTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentTimestampType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentTimestampType fromValue(String value) { + return new IncidentTimestampType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataAttributesRequest.java new file mode 100644 index 00000000000..342bd8a4f19 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataAttributesRequest.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes for creating an incident user-defined role. */ +@JsonPropertyOrder({ + IncidentUserDefinedRoleDataAttributesRequest.JSON_PROPERTY_DESCRIPTION, + IncidentUserDefinedRoleDataAttributesRequest.JSON_PROPERTY_NAME, + IncidentUserDefinedRoleDataAttributesRequest.JSON_PROPERTY_POLICY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POLICY = "policy"; + private IncidentUserDefinedRolePolicy policy; + + public IncidentUserDefinedRoleDataAttributesRequest() {} + + @JsonCreator + public IncidentUserDefinedRoleDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_POLICY) + IncidentUserDefinedRolePolicy policy) { + this.name = name; + this.policy = policy; + this.unparsed |= policy.unparsed; + } + + public IncidentUserDefinedRoleDataAttributesRequest description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * A description of the user-defined role. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(String description) { + this.description = JsonNullable.of(description); + } + + public IncidentUserDefinedRoleDataAttributesRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the user-defined role. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public IncidentUserDefinedRoleDataAttributesRequest policy(IncidentUserDefinedRolePolicy policy) { + this.policy = policy; + this.unparsed |= policy.unparsed; + return this; + } + + /** + * Policy configuration for a user-defined role. + * + * @return policy + */ + @JsonProperty(JSON_PROPERTY_POLICY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRolePolicy getPolicy() { + return policy; + } + + public void setPolicy(IncidentUserDefinedRolePolicy policy) { + this.policy = policy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleDataAttributesRequest + */ + @JsonAnySetter + public IncidentUserDefinedRoleDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRoleDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleDataAttributesRequest incidentUserDefinedRoleDataAttributesRequest = + (IncidentUserDefinedRoleDataAttributesRequest) o; + return Objects.equals( + this.description, incidentUserDefinedRoleDataAttributesRequest.description) + && Objects.equals(this.name, incidentUserDefinedRoleDataAttributesRequest.name) + && Objects.equals(this.policy, incidentUserDefinedRoleDataAttributesRequest.policy) + && Objects.equals( + this.additionalProperties, + incidentUserDefinedRoleDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, name, policy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleDataAttributesRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataAttributesResponse.java new file mode 100644 index 00000000000..06a52fbb10f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataAttributesResponse.java @@ -0,0 +1,277 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an incident user-defined role. */ +@JsonPropertyOrder({ + IncidentUserDefinedRoleDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentUserDefinedRoleDataAttributesResponse.JSON_PROPERTY_DESCRIPTION, + IncidentUserDefinedRoleDataAttributesResponse.JSON_PROPERTY_MODIFIED, + IncidentUserDefinedRoleDataAttributesResponse.JSON_PROPERTY_NAME, + IncidentUserDefinedRoleDataAttributesResponse.JSON_PROPERTY_POLICY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POLICY = "policy"; + private IncidentUserDefinedRolePolicy policy; + + public IncidentUserDefinedRoleDataAttributesResponse() {} + + @JsonCreator + public IncidentUserDefinedRoleDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_POLICY) + IncidentUserDefinedRolePolicy policy) { + this.created = created; + this.modified = modified; + this.name = name; + this.policy = policy; + this.unparsed |= policy.unparsed; + } + + public IncidentUserDefinedRoleDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the role was created. + * + * @return created + */ + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(OffsetDateTime created) { + this.created = created; + } + + public IncidentUserDefinedRoleDataAttributesResponse description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * A description of the user-defined role. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(String description) { + this.description = JsonNullable.of(description); + } + + public IncidentUserDefinedRoleDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the role was last modified. + * + * @return modified + */ + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModified() { + return modified; + } + + public void setModified(OffsetDateTime modified) { + this.modified = modified; + } + + public IncidentUserDefinedRoleDataAttributesResponse name(String name) { + this.name = name; + return this; + } + + /** + * The name of the user-defined role. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public IncidentUserDefinedRoleDataAttributesResponse policy( + IncidentUserDefinedRolePolicy policy) { + this.policy = policy; + this.unparsed |= policy.unparsed; + return this; + } + + /** + * Policy configuration for a user-defined role. + * + * @return policy + */ + @JsonProperty(JSON_PROPERTY_POLICY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRolePolicy getPolicy() { + return policy; + } + + public void setPolicy(IncidentUserDefinedRolePolicy policy) { + this.policy = policy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleDataAttributesResponse + */ + @JsonAnySetter + public IncidentUserDefinedRoleDataAttributesResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRoleDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleDataAttributesResponse incidentUserDefinedRoleDataAttributesResponse = + (IncidentUserDefinedRoleDataAttributesResponse) o; + return Objects.equals(this.created, incidentUserDefinedRoleDataAttributesResponse.created) + && Objects.equals( + this.description, incidentUserDefinedRoleDataAttributesResponse.description) + && Objects.equals(this.modified, incidentUserDefinedRoleDataAttributesResponse.modified) + && Objects.equals(this.name, incidentUserDefinedRoleDataAttributesResponse.name) + && Objects.equals(this.policy, incidentUserDefinedRoleDataAttributesResponse.policy) + && Objects.equals( + this.additionalProperties, + incidentUserDefinedRoleDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(created, description, modified, name, policy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleDataAttributesResponse {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataRequest.java new file mode 100644 index 00000000000..5d1bb6bc0e8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataRequest.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data for creating an incident user-defined role. */ +@JsonPropertyOrder({ + IncidentUserDefinedRoleDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentUserDefinedRoleDataRequest.JSON_PROPERTY_RELATIONSHIPS, + IncidentUserDefinedRoleDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentUserDefinedRoleDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentUserDefinedRoleRelationshipsRequest relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentUserDefinedRoleType type; + + public IncidentUserDefinedRoleDataRequest() {} + + @JsonCreator + public IncidentUserDefinedRoleDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentUserDefinedRoleDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + IncidentUserDefinedRoleRelationshipsRequest relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentUserDefinedRoleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentUserDefinedRoleDataRequest attributes( + IncidentUserDefinedRoleDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating an incident user-defined role. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentUserDefinedRoleDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentUserDefinedRoleDataRequest relationships( + IncidentUserDefinedRoleRelationshipsRequest relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for creating a user-defined role. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleRelationshipsRequest getRelationships() { + return relationships; + } + + public void setRelationships(IncidentUserDefinedRoleRelationshipsRequest relationships) { + this.relationships = relationships; + } + + public IncidentUserDefinedRoleDataRequest type(IncidentUserDefinedRoleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident user-defined role resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleType getType() { + return type; + } + + public void setType(IncidentUserDefinedRoleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleDataRequest + */ + @JsonAnySetter + public IncidentUserDefinedRoleDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRoleDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleDataRequest incidentUserDefinedRoleDataRequest = + (IncidentUserDefinedRoleDataRequest) o; + return Objects.equals(this.attributes, incidentUserDefinedRoleDataRequest.attributes) + && Objects.equals(this.relationships, incidentUserDefinedRoleDataRequest.relationships) + && Objects.equals(this.type, incidentUserDefinedRoleDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentUserDefinedRoleDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataResponse.java new file mode 100644 index 00000000000..26e5ac55194 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleDataResponse.java @@ -0,0 +1,242 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Data for an incident user-defined role response. */ +@JsonPropertyOrder({ + IncidentUserDefinedRoleDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentUserDefinedRoleDataResponse.JSON_PROPERTY_ID, + IncidentUserDefinedRoleDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentUserDefinedRoleDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentUserDefinedRoleDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentUserDefinedRoleRelationshipsResponse relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentUserDefinedRoleType type; + + public IncidentUserDefinedRoleDataResponse() {} + + @JsonCreator + public IncidentUserDefinedRoleDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentUserDefinedRoleDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentUserDefinedRoleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentUserDefinedRoleDataResponse attributes( + IncidentUserDefinedRoleDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an incident user-defined role. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentUserDefinedRoleDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentUserDefinedRoleDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the user-defined role. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentUserDefinedRoleDataResponse relationships( + IncidentUserDefinedRoleRelationshipsResponse relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships of a user-defined role response. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentUserDefinedRoleRelationshipsResponse getRelationships() { + return relationships; + } + + public void setRelationships(IncidentUserDefinedRoleRelationshipsResponse relationships) { + this.relationships = relationships; + } + + public IncidentUserDefinedRoleDataResponse type(IncidentUserDefinedRoleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident user-defined role resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleType getType() { + return type; + } + + public void setType(IncidentUserDefinedRoleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleDataResponse + */ + @JsonAnySetter + public IncidentUserDefinedRoleDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRoleDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleDataResponse incidentUserDefinedRoleDataResponse = + (IncidentUserDefinedRoleDataResponse) o; + return Objects.equals(this.attributes, incidentUserDefinedRoleDataResponse.attributes) + && Objects.equals(this.id, incidentUserDefinedRoleDataResponse.id) + && Objects.equals(this.relationships, incidentUserDefinedRoleDataResponse.relationships) + && Objects.equals(this.type, incidentUserDefinedRoleDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentUserDefinedRoleDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncidentTypeRelationship.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncidentTypeRelationship.java new file mode 100644 index 00000000000..aa935dc5835 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncidentTypeRelationship.java @@ -0,0 +1,152 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationship to an incident type for a user-defined role. */ +@JsonPropertyOrder({IncidentUserDefinedRoleIncidentTypeRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleIncidentTypeRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentUserDefinedRoleIncidentTypeRelationshipData data; + + public IncidentUserDefinedRoleIncidentTypeRelationship() {} + + @JsonCreator + public IncidentUserDefinedRoleIncidentTypeRelationship( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentUserDefinedRoleIncidentTypeRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentUserDefinedRoleIncidentTypeRelationship data( + IncidentUserDefinedRoleIncidentTypeRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for the incident type relationship of a user-defined role. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleIncidentTypeRelationshipData getData() { + return data; + } + + public void setData(IncidentUserDefinedRoleIncidentTypeRelationshipData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleIncidentTypeRelationship + */ + @JsonAnySetter + public IncidentUserDefinedRoleIncidentTypeRelationship putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRoleIncidentTypeRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleIncidentTypeRelationship + incidentUserDefinedRoleIncidentTypeRelationship = + (IncidentUserDefinedRoleIncidentTypeRelationship) o; + return Objects.equals(this.data, incidentUserDefinedRoleIncidentTypeRelationship.data) + && Objects.equals( + this.additionalProperties, + incidentUserDefinedRoleIncidentTypeRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleIncidentTypeRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncidentTypeRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncidentTypeRelationshipData.java new file mode 100644 index 00000000000..de541482fd5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncidentTypeRelationshipData.java @@ -0,0 +1,181 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Data for the incident type relationship of a user-defined role. */ +@JsonPropertyOrder({ + IncidentUserDefinedRoleIncidentTypeRelationshipData.JSON_PROPERTY_ID, + IncidentUserDefinedRoleIncidentTypeRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleIncidentTypeRelationshipData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public IncidentUserDefinedRoleIncidentTypeRelationshipData() {} + + @JsonCreator + public IncidentUserDefinedRoleIncidentTypeRelationshipData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.id = id; + this.type = type; + } + + public IncidentUserDefinedRoleIncidentTypeRelationshipData id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the incident type. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentUserDefinedRoleIncidentTypeRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * The type of the resource. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleIncidentTypeRelationshipData + */ + @JsonAnySetter + public IncidentUserDefinedRoleIncidentTypeRelationshipData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this IncidentUserDefinedRoleIncidentTypeRelationshipData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleIncidentTypeRelationshipData + incidentUserDefinedRoleIncidentTypeRelationshipData = + (IncidentUserDefinedRoleIncidentTypeRelationshipData) o; + return Objects.equals(this.id, incidentUserDefinedRoleIncidentTypeRelationshipData.id) + && Objects.equals(this.type, incidentUserDefinedRoleIncidentTypeRelationshipData.type) + && Objects.equals( + this.additionalProperties, + incidentUserDefinedRoleIncidentTypeRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleIncidentTypeRelationshipData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncludedItem.java new file mode 100644 index 00000000000..c5dbff3eb99 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleIncludedItem.java @@ -0,0 +1,285 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = + IncidentUserDefinedRoleIncludedItem.IncidentUserDefinedRoleIncludedItemDeserializer.class) +@JsonSerialize( + using = IncidentUserDefinedRoleIncludedItem.IncidentUserDefinedRoleIncludedItemSerializer.class) +public class IncidentUserDefinedRoleIncludedItem extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(IncidentUserDefinedRoleIncludedItem.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class IncidentUserDefinedRoleIncludedItemSerializer + extends StdSerializer { + public IncidentUserDefinedRoleIncludedItemSerializer( + Class t) { + super(t); + } + + public IncidentUserDefinedRoleIncludedItemSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentUserDefinedRoleIncludedItem value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class IncidentUserDefinedRoleIncludedItemDeserializer + extends StdDeserializer { + public IncidentUserDefinedRoleIncludedItemDeserializer() { + this(IncidentUserDefinedRoleIncludedItem.class); + } + + public IncidentUserDefinedRoleIncludedItemDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentUserDefinedRoleIncludedItem deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize IncidentUserData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentUserData.class.equals(Integer.class) + || IncidentUserData.class.equals(Long.class) + || IncidentUserData.class.equals(Float.class) + || IncidentUserData.class.equals(Double.class) + || IncidentUserData.class.equals(Boolean.class) + || IncidentUserData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IncidentUserData.class.equals(Integer.class) + || IncidentUserData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IncidentUserData.class.equals(Float.class) + || IncidentUserData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IncidentUserData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IncidentUserData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentUserData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IncidentUserData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentUserData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentUserData'", e); + } + + // deserialize IncidentTypeObject + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentTypeObject.class.equals(Integer.class) + || IncidentTypeObject.class.equals(Long.class) + || IncidentTypeObject.class.equals(Float.class) + || IncidentTypeObject.class.equals(Double.class) + || IncidentTypeObject.class.equals(Boolean.class) + || IncidentTypeObject.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IncidentTypeObject.class.equals(Integer.class) + || IncidentTypeObject.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IncidentTypeObject.class.equals(Float.class) + || IncidentTypeObject.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IncidentTypeObject.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IncidentTypeObject.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentTypeObject.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IncidentTypeObject) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentTypeObject'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentTypeObject'", e); + } + + IncidentUserDefinedRoleIncludedItem ret = new IncidentUserDefinedRoleIncludedItem(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public IncidentUserDefinedRoleIncludedItem getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "IncidentUserDefinedRoleIncludedItem cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentUserDefinedRoleIncludedItem() { + super("oneOf", Boolean.FALSE); + } + + public IncidentUserDefinedRoleIncludedItem(IncidentUserData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public IncidentUserDefinedRoleIncludedItem(IncidentTypeObject o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("IncidentUserData", new GenericType() {}); + schemas.put("IncidentTypeObject", new GenericType() {}); + JSON.registerDescendants( + IncidentUserDefinedRoleIncludedItem.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return IncidentUserDefinedRoleIncludedItem.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: IncidentUserData, IncidentTypeObject + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(IncidentUserData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(IncidentTypeObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be IncidentUserData, IncidentTypeObject"); + } + + /** + * Get the actual instance, which can be the following: IncidentUserData, IncidentTypeObject + * + * @return The actual instance (IncidentUserData, IncidentTypeObject) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `IncidentUserData`. If the actual instance is not + * `IncidentUserData`, the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentUserData` + * @throws ClassCastException if the instance is not `IncidentUserData` + */ + public IncidentUserData getIncidentUserData() throws ClassCastException { + return (IncidentUserData) super.getActualInstance(); + } + + /** + * Get the actual instance of `IncidentTypeObject`. If the actual instance is not + * `IncidentTypeObject`, the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentTypeObject` + * @throws ClassCastException if the instance is not `IncidentTypeObject` + */ + public IncidentTypeObject getIncidentTypeObject() throws ClassCastException { + return (IncidentTypeObject) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchDataAttributesRequest.java new file mode 100644 index 00000000000..fe41888d77d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchDataAttributesRequest.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes for updating an incident user-defined role. */ +@JsonPropertyOrder({ + IncidentUserDefinedRolePatchDataAttributesRequest.JSON_PROPERTY_DESCRIPTION, + IncidentUserDefinedRolePatchDataAttributesRequest.JSON_PROPERTY_NAME, + IncidentUserDefinedRolePatchDataAttributesRequest.JSON_PROPERTY_POLICY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRolePatchDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POLICY = "policy"; + private IncidentUserDefinedRolePolicy policy; + + public IncidentUserDefinedRolePatchDataAttributesRequest description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * A description of the user-defined role. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(String description) { + this.description = JsonNullable.of(description); + } + + public IncidentUserDefinedRolePatchDataAttributesRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the user-defined role. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public IncidentUserDefinedRolePatchDataAttributesRequest policy( + IncidentUserDefinedRolePolicy policy) { + this.policy = policy; + this.unparsed |= policy.unparsed; + return this; + } + + /** + * Policy configuration for a user-defined role. + * + * @return policy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POLICY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentUserDefinedRolePolicy getPolicy() { + return policy; + } + + public void setPolicy(IncidentUserDefinedRolePolicy policy) { + this.policy = policy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRolePatchDataAttributesRequest + */ + @JsonAnySetter + public IncidentUserDefinedRolePatchDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRolePatchDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRolePatchDataAttributesRequest + incidentUserDefinedRolePatchDataAttributesRequest = + (IncidentUserDefinedRolePatchDataAttributesRequest) o; + return Objects.equals( + this.description, incidentUserDefinedRolePatchDataAttributesRequest.description) + && Objects.equals(this.name, incidentUserDefinedRolePatchDataAttributesRequest.name) + && Objects.equals(this.policy, incidentUserDefinedRolePatchDataAttributesRequest.policy) + && Objects.equals( + this.additionalProperties, + incidentUserDefinedRolePatchDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, name, policy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRolePatchDataAttributesRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchDataRequest.java new file mode 100644 index 00000000000..5f3975822a1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchDataRequest.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Data for updating an incident user-defined role. */ +@JsonPropertyOrder({ + IncidentUserDefinedRolePatchDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentUserDefinedRolePatchDataRequest.JSON_PROPERTY_ID, + IncidentUserDefinedRolePatchDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRolePatchDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentUserDefinedRolePatchDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentUserDefinedRoleType type; + + public IncidentUserDefinedRolePatchDataRequest() {} + + @JsonCreator + public IncidentUserDefinedRolePatchDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentUserDefinedRoleType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentUserDefinedRolePatchDataRequest attributes( + IncidentUserDefinedRolePatchDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for updating an incident user-defined role. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentUserDefinedRolePatchDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentUserDefinedRolePatchDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentUserDefinedRolePatchDataRequest id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the user-defined role to update. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public IncidentUserDefinedRolePatchDataRequest type(IncidentUserDefinedRoleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident user-defined role resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleType getType() { + return type; + } + + public void setType(IncidentUserDefinedRoleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRolePatchDataRequest + */ + @JsonAnySetter + public IncidentUserDefinedRolePatchDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRolePatchDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRolePatchDataRequest incidentUserDefinedRolePatchDataRequest = + (IncidentUserDefinedRolePatchDataRequest) o; + return Objects.equals(this.attributes, incidentUserDefinedRolePatchDataRequest.attributes) + && Objects.equals(this.id, incidentUserDefinedRolePatchDataRequest.id) + && Objects.equals(this.type, incidentUserDefinedRolePatchDataRequest.type) + && Objects.equals( + this.additionalProperties, + incidentUserDefinedRolePatchDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRolePatchDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchRequest.java new file mode 100644 index 00000000000..684e4f915a5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePatchRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request for updating an incident user-defined role. */ +@JsonPropertyOrder({IncidentUserDefinedRolePatchRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRolePatchRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentUserDefinedRolePatchDataRequest data; + + public IncidentUserDefinedRolePatchRequest() {} + + @JsonCreator + public IncidentUserDefinedRolePatchRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentUserDefinedRolePatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentUserDefinedRolePatchRequest data(IncidentUserDefinedRolePatchDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for updating an incident user-defined role. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRolePatchDataRequest getData() { + return data; + } + + public void setData(IncidentUserDefinedRolePatchDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRolePatchRequest + */ + @JsonAnySetter + public IncidentUserDefinedRolePatchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRolePatchRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRolePatchRequest incidentUserDefinedRolePatchRequest = + (IncidentUserDefinedRolePatchRequest) o; + return Objects.equals(this.data, incidentUserDefinedRolePatchRequest.data) + && Objects.equals( + this.additionalProperties, incidentUserDefinedRolePatchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRolePatchRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePolicy.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePolicy.java new file mode 100644 index 00000000000..46815e7b92d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolePolicy.java @@ -0,0 +1,144 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Policy configuration for a user-defined role. */ +@JsonPropertyOrder({IncidentUserDefinedRolePolicy.JSON_PROPERTY_IS_SINGLE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRolePolicy { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_IS_SINGLE = "is_single"; + private Boolean isSingle; + + public IncidentUserDefinedRolePolicy() {} + + @JsonCreator + public IncidentUserDefinedRolePolicy( + @JsonProperty(required = true, value = JSON_PROPERTY_IS_SINGLE) Boolean isSingle) { + this.isSingle = isSingle; + } + + public IncidentUserDefinedRolePolicy isSingle(Boolean isSingle) { + this.isSingle = isSingle; + return this; + } + + /** + * Whether this role can only be assigned to one responder at a time. + * + * @return isSingle + */ + @JsonProperty(JSON_PROPERTY_IS_SINGLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsSingle() { + return isSingle; + } + + public void setIsSingle(Boolean isSingle) { + this.isSingle = isSingle; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRolePolicy + */ + @JsonAnySetter + public IncidentUserDefinedRolePolicy putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRolePolicy object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRolePolicy incidentUserDefinedRolePolicy = (IncidentUserDefinedRolePolicy) o; + return Objects.equals(this.isSingle, incidentUserDefinedRolePolicy.isSingle) + && Objects.equals( + this.additionalProperties, incidentUserDefinedRolePolicy.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(isSingle, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRolePolicy {\n"); + sb.append(" isSingle: ").append(toIndentedString(isSingle)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRelationshipsRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRelationshipsRequest.java new file mode 100644 index 00000000000..51972c5594e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRelationshipsRequest.java @@ -0,0 +1,152 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for creating a user-defined role. */ +@JsonPropertyOrder({IncidentUserDefinedRoleRelationshipsRequest.JSON_PROPERTY_INCIDENT_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleRelationshipsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private IncidentUserDefinedRoleIncidentTypeRelationship incidentType; + + public IncidentUserDefinedRoleRelationshipsRequest() {} + + @JsonCreator + public IncidentUserDefinedRoleRelationshipsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_TYPE) + IncidentUserDefinedRoleIncidentTypeRelationship incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + } + + public IncidentUserDefinedRoleRelationshipsRequest incidentType( + IncidentUserDefinedRoleIncidentTypeRelationship incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + return this; + } + + /** + * Relationship to an incident type for a user-defined role. + * + * @return incidentType + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleIncidentTypeRelationship getIncidentType() { + return incidentType; + } + + public void setIncidentType(IncidentUserDefinedRoleIncidentTypeRelationship incidentType) { + this.incidentType = incidentType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleRelationshipsRequest + */ + @JsonAnySetter + public IncidentUserDefinedRoleRelationshipsRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRoleRelationshipsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleRelationshipsRequest incidentUserDefinedRoleRelationshipsRequest = + (IncidentUserDefinedRoleRelationshipsRequest) o; + return Objects.equals( + this.incidentType, incidentUserDefinedRoleRelationshipsRequest.incidentType) + && Objects.equals( + this.additionalProperties, + incidentUserDefinedRoleRelationshipsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleRelationshipsRequest {\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRelationshipsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRelationshipsResponse.java new file mode 100644 index 00000000000..58427e9a088 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRelationshipsResponse.java @@ -0,0 +1,205 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships of a user-defined role response. */ +@JsonPropertyOrder({ + IncidentUserDefinedRoleRelationshipsResponse.JSON_PROPERTY_CREATED_BY_USER, + IncidentUserDefinedRoleRelationshipsResponse.JSON_PROPERTY_INCIDENT_TYPE, + IncidentUserDefinedRoleRelationshipsResponse.JSON_PROPERTY_LAST_MODIFIED_BY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleRelationshipsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private RelationshipToUser createdByUser; + + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private IncidentUserDefinedRoleIncidentTypeRelationship incidentType; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private RelationshipToUser lastModifiedByUser; + + public IncidentUserDefinedRoleRelationshipsResponse createdByUser( + RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(RelationshipToUser createdByUser) { + this.createdByUser = createdByUser; + } + + public IncidentUserDefinedRoleRelationshipsResponse incidentType( + IncidentUserDefinedRoleIncidentTypeRelationship incidentType) { + this.incidentType = incidentType; + this.unparsed |= incidentType.unparsed; + return this; + } + + /** + * Relationship to an incident type for a user-defined role. + * + * @return incidentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentUserDefinedRoleIncidentTypeRelationship getIncidentType() { + return incidentType; + } + + public void setIncidentType(IncidentUserDefinedRoleIncidentTypeRelationship incidentType) { + this.incidentType = incidentType; + } + + public IncidentUserDefinedRoleRelationshipsResponse lastModifiedByUser( + RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * Relationship to user. + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser(RelationshipToUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleRelationshipsResponse + */ + @JsonAnySetter + public IncidentUserDefinedRoleRelationshipsResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRoleRelationshipsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleRelationshipsResponse incidentUserDefinedRoleRelationshipsResponse = + (IncidentUserDefinedRoleRelationshipsResponse) o; + return Objects.equals( + this.createdByUser, incidentUserDefinedRoleRelationshipsResponse.createdByUser) + && Objects.equals( + this.incidentType, incidentUserDefinedRoleRelationshipsResponse.incidentType) + && Objects.equals( + this.lastModifiedByUser, + incidentUserDefinedRoleRelationshipsResponse.lastModifiedByUser) + && Objects.equals( + this.additionalProperties, + incidentUserDefinedRoleRelationshipsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, incidentType, lastModifiedByUser, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleRelationshipsResponse {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" incidentType: ").append(toIndentedString(incidentType)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRequest.java new file mode 100644 index 00000000000..e97226c0c02 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request for creating an incident user-defined role. */ +@JsonPropertyOrder({IncidentUserDefinedRoleRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentUserDefinedRoleDataRequest data; + + public IncidentUserDefinedRoleRequest() {} + + @JsonCreator + public IncidentUserDefinedRoleRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentUserDefinedRoleDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentUserDefinedRoleRequest data(IncidentUserDefinedRoleDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for creating an incident user-defined role. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleDataRequest getData() { + return data; + } + + public void setData(IncidentUserDefinedRoleDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleRequest + */ + @JsonAnySetter + public IncidentUserDefinedRoleRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRoleRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleRequest incidentUserDefinedRoleRequest = + (IncidentUserDefinedRoleRequest) o; + return Objects.equals(this.data, incidentUserDefinedRoleRequest.data) + && Objects.equals( + this.additionalProperties, incidentUserDefinedRoleRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleResponse.java new file mode 100644 index 00000000000..c7ac2e8c545 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleResponse.java @@ -0,0 +1,193 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a single incident user-defined role. */ +@JsonPropertyOrder({ + IncidentUserDefinedRoleResponse.JSON_PROPERTY_DATA, + IncidentUserDefinedRoleResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRoleResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentUserDefinedRoleDataResponse data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentUserDefinedRoleResponse() {} + + @JsonCreator + public IncidentUserDefinedRoleResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentUserDefinedRoleDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentUserDefinedRoleResponse data(IncidentUserDefinedRoleDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for an incident user-defined role response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentUserDefinedRoleDataResponse getData() { + return data; + } + + public void setData(IncidentUserDefinedRoleDataResponse data) { + this.data = data; + } + + public IncidentUserDefinedRoleResponse included( + List included) { + this.included = included; + for (IncidentUserDefinedRoleIncludedItem item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentUserDefinedRoleResponse addIncludedItem( + IncidentUserDefinedRoleIncludedItem includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Included resources for an incident user-defined role response. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRoleResponse + */ + @JsonAnySetter + public IncidentUserDefinedRoleResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRoleResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRoleResponse incidentUserDefinedRoleResponse = + (IncidentUserDefinedRoleResponse) o; + return Objects.equals(this.data, incidentUserDefinedRoleResponse.data) + && Objects.equals(this.included, incidentUserDefinedRoleResponse.included) + && Objects.equals( + this.additionalProperties, incidentUserDefinedRoleResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRoleResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleType.java new file mode 100644 index 00000000000..883594ac806 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRoleType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Incident user-defined role resource type. */ +@JsonSerialize(using = IncidentUserDefinedRoleType.IncidentUserDefinedRoleTypeSerializer.class) +public class IncidentUserDefinedRoleType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_user_defined_roles")); + + public static final IncidentUserDefinedRoleType INCIDENT_USER_DEFINED_ROLES = + new IncidentUserDefinedRoleType("incident_user_defined_roles"); + + IncidentUserDefinedRoleType(String value) { + super(value, allowedValues); + } + + public static class IncidentUserDefinedRoleTypeSerializer + extends StdSerializer { + public IncidentUserDefinedRoleTypeSerializer(Class t) { + super(t); + } + + public IncidentUserDefinedRoleTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentUserDefinedRoleType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentUserDefinedRoleType fromValue(String value) { + return new IncidentUserDefinedRoleType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolesResponse.java new file mode 100644 index 00000000000..2a6dced4108 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUserDefinedRolesResponse.java @@ -0,0 +1,201 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a list of incident user-defined roles. */ +@JsonPropertyOrder({ + IncidentUserDefinedRolesResponse.JSON_PROPERTY_DATA, + IncidentUserDefinedRolesResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentUserDefinedRolesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public IncidentUserDefinedRolesResponse() {} + + @JsonCreator + public IncidentUserDefinedRolesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentUserDefinedRolesResponse data(List data) { + this.data = data; + for (IncidentUserDefinedRoleDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentUserDefinedRolesResponse addDataItem( + IncidentUserDefinedRoleDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of incident user-defined role data objects. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public IncidentUserDefinedRolesResponse included( + List included) { + this.included = included; + for (IncidentUserDefinedRoleIncludedItem item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentUserDefinedRolesResponse addIncludedItem( + IncidentUserDefinedRoleIncludedItem includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Included resources for an incident user-defined role response. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IncidentUserDefinedRolesResponse + */ + @JsonAnySetter + public IncidentUserDefinedRolesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IncidentUserDefinedRolesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentUserDefinedRolesResponse incidentUserDefinedRolesResponse = + (IncidentUserDefinedRolesResponse) o; + return Objects.equals(this.data, incidentUserDefinedRolesResponse.data) + && Objects.equals(this.included, incidentUserDefinedRolesResponse.included) + && Objects.equals( + this.additionalProperties, incidentUserDefinedRolesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentUserDefinedRolesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/incidents.feature b/src/test/resources/com/datadog/api/client/v2/api/incidents.feature index e30ccb25292..ad6a8db18e1 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/incidents.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/incidents.feature @@ -1122,6 +1122,36 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Patch an incident impact returns "Bad Request" response + Given operation "PatchIncidentImpact" enabled + And new "PatchIncidentImpact" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "impact_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Patch an incident impact returns "Not Found" response + Given operation "PatchIncidentImpact" enabled + And new "PatchIncidentImpact" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "impact_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Patch an incident impact returns "OK" response + Given operation "PatchIncidentImpact" enabled + And new "PatchIncidentImpact" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "impact_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/incident-app Scenario: Remove commander from an incident returns "OK" response Given operation "UpdateIncident" enabled @@ -1232,6 +1262,36 @@ Feature: Incidents Then the response status is 200 OK And the response "data.attributes.title" is equal to "{{ incident.data.attributes.title }}-updated" + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident impact returns "Bad Request" response + Given operation "UpdateIncidentImpact" enabled + And new "UpdateIncidentImpact" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "impact_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident impact returns "Not Found" response + Given operation "UpdateIncidentImpact" enabled + And new "UpdateIncidentImpact" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "impact_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident impact returns "OK" response + Given operation "UpdateIncidentImpact" enabled + And new "UpdateIncidentImpact" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "impact_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Update an incident notification rule returns "Bad Request" response Given operation "UpdateIncidentNotificationRule" enabled diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index f1a04b48a1a..e27a03165c9 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -2992,6 +2992,18 @@ "type": "idempotent" } }, + "PatchIncidentImpact": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentImpact": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListIncidentIntegrations": { "tag": "Incidents", "undo": {