diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 73163c4c177..7d0cf9ebb60 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -558,6 +558,37 @@ components: required: true schema: type: string + IncidentAutomationDataIncludeParameter: + description: Specifies which related objects to include in the response. + in: query + name: include + required: false + schema: + type: string + IncidentAutomationDataKeyParameter: + description: The automation data key. + example: workflow_status + in: path + name: key + required: true + schema: + type: string + IncidentCommunicationFilterTypeParameter: + description: Filter by communication type. + in: query + name: "filter[communication_type]" + required: false + schema: + type: string + IncidentCommunicationIdParameter: + description: The ID of the communication. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: communication_id + required: true + schema: + format: uuid + type: string IncidentIDPathParameter: description: The UUID of the incident. in: path @@ -609,6 +640,53 @@ components: required: true schema: type: string + IncidentJiraTemplateIdParameter: + description: The ID of the Jira template. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: template_id + required: true + schema: + format: uuid + type: string + IncidentJiraTemplateIncidentTypeIdParameter: + description: Filter templates by incident type identifier. + in: query + name: incidentTypeId + required: false + schema: + format: uuid + type: string + IncidentJiraTemplateIsDefaultParameter: + description: Filter templates by default status. + in: query + name: isDefault + required: false + schema: + type: boolean + IncidentJiraTemplateTypeParameter: + description: Filter templates by type. + in: query + name: templateType + required: false + schema: + type: string + IncidentMicrosoftTeamsConfigurationIdParameter: + description: The ID of the Microsoft Teams configuration. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: configuration_id + required: true + schema: + format: uuid + type: string + IncidentMicrosoftTeamsIncludeParameter: + description: Specifies which related objects to include in the response. + in: query + name: include + required: false + schema: + type: string IncidentNotificationRuleIDPathParameter: description: The ID of the notification rule. in: path @@ -657,6 +735,77 @@ components: schema: example: "created_by_user,incident_type" type: string + IncidentReservedRoleIdParameter: + description: The ID of the reserved role. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: role_id + required: true + schema: + format: uuid + type: string + IncidentRoleAssignmentIdParameter: + description: The ID of the role assignment. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: role_assignment_id + required: true + schema: + format: uuid + type: string + IncidentSearchIncidentsIncludeParameter: + description: Specifies which types of related objects to include. + in: query + name: include + required: false + schema: + items: + $ref: "#/components/schemas/IncidentSearchIncidentsIncludeType" + type: array + IncidentSearchIncidentsQueryParameter: + description: Specifies which incidents should be returned by the search. + in: query + name: query + required: false + schema: + type: string + IncidentSearchIncidentsSemanticQueryParameter: + description: A semantic search query. + in: query + name: semantic_query + required: false + schema: + type: string + IncidentSearchIncidentsSortParameter: + description: Specifies the order of returned incidents. + in: query + name: sort + required: false + schema: + $ref: "#/components/schemas/IncidentSearchIncidentsSortOrder" + IncidentSearchIncidentsTimezoneParameter: + description: The timezone for date-based operations. + in: query + name: timeZone + required: false + schema: + type: string + IncidentSearchIncidentsWithDeletedParameter: + description: Whether to include deleted incidents in the response. + in: query + name: "filter[with_deleted]" + required: false + schema: + default: false + type: boolean + IncidentSearchIncidentsWithFacetsParameter: + description: Whether to include facet data in the response. + in: query + name: with_facets + required: false + schema: + default: true + type: boolean IncidentSearchIncludeQueryParameter: description: Specifies which types of related objects should be included in the response. in: query @@ -705,6 +854,79 @@ components: schema: example: "ExampleServiceName" type: string + IncidentStatusPageIdParameter: + description: The ID of the status page. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: statuspage_id + required: true + schema: + format: uuid + type: string + IncidentStatusPageNoticeIdParameter: + description: The ID of the status page notice. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: notice_id + required: true + schema: + format: uuid + type: string + IncidentStatusPageNotifySubscribersParameter: + description: Whether to notify subscribers about this notice. + in: query + name: notify_subscribers + required: false + schema: + type: boolean + IncidentStatuspageIncidentIdParameter: + description: The ID of the Statuspage incident. + example: abc123 + in: path + name: statuspage_incident_id + required: true + schema: + type: string + IncidentStatuspagePageIdParameter: + description: The ID of the Statuspage page. + example: abc123 + in: path + name: page_id + required: true + schema: + type: string + IncidentStatuspagePageIdPathParameter: + description: The ID of the status page. + example: my-status-page + in: path + name: page_id + required: true + schema: + type: string + IncidentTemplateVariableFilterIncidentTypeParameter: + description: Filter template variables by incident type. + in: query + name: "filter[incident-type]" + required: false + schema: + format: uuid + type: string + IncidentTemplateVariableIncludeFollowUpsParameter: + description: Whether to include follow-up template variables. + in: query + name: includeFollowUps + required: false + schema: + type: boolean + IncidentTimelineEntryIdParameter: + description: The ID of the timeline entry. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: timeline_entry_id + required: true + schema: + format: uuid + type: string IncidentTodoIDPathParameter: description: The UUID of the incident todo. in: path @@ -734,6 +956,22 @@ components: schema: example: "00000000-0000-0000-0000-000000000000" type: string + IncidentZoomConfigurationIdParameter: + description: The ID of the Zoom configuration. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: configuration_id + required: true + schema: + format: uuid + type: string + IncidentZoomIncludeParameter: + description: Specifies which related objects to include in the response. + in: query + name: include + required: false + schema: + type: string Include: description: Include relationship data. explode: true @@ -1116,6 +1354,22 @@ components: example: 10 format: int64 type: integer + PagerdutyIncidentIdParameter: + description: The PagerDuty incident identifier. + example: P1234AB + in: path + name: pagerduty_incident_id + required: true + schema: + type: string + PagerdutyIncludeUnresolvedParameter: + description: Whether to include unresolved PagerDuty services. + in: query + name: include_unresolved + required: false + schema: + default: false + type: boolean PersonaMappingID: description: The ID of the persona mapping example: c5c758c6-18c2-4484-ae3f-46b84128404a @@ -33501,6 +33755,373 @@ components: type: string x-enum-varnames: - INCIDENT_ATTACHMENTS + IncidentAutomationDataAttributesRequest: + description: Attributes for upserting automation data. + properties: + value: + description: The automation data value. + example: completed + type: string + required: + - value + type: object + IncidentAutomationDataAttributesResponse: + description: Attributes of incident automation data. + properties: + created_at: + description: Timestamp when the data was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incident_id: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + key: + description: The automation data key. + example: workflow_status + type: string + updated_at: + description: Timestamp when the data was last updated. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + value: + description: The automation data value. + example: completed + type: string + required: + - incident_id + - key + - value + - created_at + - updated_at + type: object + IncidentAutomationDataDataRequest: + description: Automation data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentAutomationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentAutomationDataType" + required: + - type + - attributes + type: object + IncidentAutomationDataDataResponse: + description: Automation data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentAutomationDataAttributesResponse" + id: + description: The automation data identifier. + example: workflow_status + type: string + type: + $ref: "#/components/schemas/IncidentAutomationDataType" + required: + - id + - type + - attributes + type: object + IncidentAutomationDataRequest: + description: Request to upsert automation data. + properties: + data: + $ref: "#/components/schemas/IncidentAutomationDataDataRequest" + required: + - data + type: object + IncidentAutomationDataResponse: + description: Response with automation data. + properties: + data: + $ref: "#/components/schemas/IncidentAutomationDataDataResponse" + required: + - data + type: object + IncidentAutomationDataType: + description: Incident automation data resource type. + enum: + - incidents_automation_data + example: incidents_automation_data + type: string + x-enum-varnames: + - INCIDENTS_AUTOMATION_DATA + IncidentBatchCreateRuleExecutionStatesData: + description: Data for batch creating rule execution states. + properties: + attributes: + $ref: "#/components/schemas/IncidentBatchCreateRuleExecutionStatesDataAttributes" + type: + $ref: "#/components/schemas/IncidentRuleExecutionStateType" + required: + - type + - attributes + type: object + IncidentBatchCreateRuleExecutionStatesDataAttributes: + description: Attributes for batch creating rule execution states. + properties: + rules: + description: List of rules to create execution states for. + items: + $ref: "#/components/schemas/IncidentRuleExecutionStateRule" + type: array + required: + - rules + type: object + IncidentBatchCreateRuleExecutionStatesRequest: + description: Request to batch create rule execution states. + properties: + data: + $ref: "#/components/schemas/IncidentBatchCreateRuleExecutionStatesData" + required: + - data + type: object + IncidentBatchUpdateRuleExecutionStatesData: + description: Data for batch updating rule execution states. + properties: + attributes: + $ref: "#/components/schemas/IncidentBatchUpdateRuleExecutionStatesDataAttributes" + type: + $ref: "#/components/schemas/IncidentRuleExecutionStateType" + required: + - type + - attributes + type: object + IncidentBatchUpdateRuleExecutionStatesDataAttributes: + description: Attributes for batch updating rule execution states. + properties: + rules: + description: List of rules to update execution states for. + items: + $ref: "#/components/schemas/IncidentRuleExecutionStateRule" + type: array + required: + - rules + type: object + IncidentBatchUpdateRuleExecutionStatesRequest: + description: Request to batch update rule execution states. + properties: + data: + $ref: "#/components/schemas/IncidentBatchUpdateRuleExecutionStatesData" + required: + - data + type: object + IncidentCaseLinkData: + description: Case link data. + properties: + attributes: + $ref: "#/components/schemas/IncidentCaseLinkDataAttributes" + id: + description: The case link identifier. + example: "12345" + type: string + type: + $ref: "#/components/schemas/IncidentCaseLinkType" + required: + - id + - type + - attributes + type: object + IncidentCaseLinkDataAttributes: + description: Attributes of a case link. + properties: + entity_id: + description: The entity identifier. + example: "12345" + type: string + is_page: + description: Whether this is a page link. + example: false + type: boolean + relationship: + description: The relationship type. + example: source + type: string + required: + - entity_id + - is_page + - relationship + type: object + IncidentCaseLinkResponse: + description: Response with a case link. + properties: + data: + $ref: "#/components/schemas/IncidentCaseLinkData" + required: + - data + type: object + IncidentCaseLinkType: + description: Case link resource type. + enum: + - case_link + example: case_link + type: string + x-enum-varnames: + - CASE_LINK + IncidentCommunicationContent: + description: The content of a communication. + properties: + grouping_key: + description: A key used for grouping communications. + example: update-1 + type: string + handles: + description: The list of handles the communication is sent to. + items: + $ref: "#/components/schemas/IncidentCommunicationContentHandle" + type: array + message: + description: The message body of the communication. + example: Incident update for INC-123. + type: string + status: + description: The status code of the communication. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + subject: + description: The subject line of the communication. + example: "Incident INC-123: Update" + type: string + required: + - handles + - message + type: object + IncidentCommunicationContentHandle: + description: A handle used for sending a communication. + properties: + created_at: + description: Timestamp when the handle was added. + example: "2024-01-01T00:00:00.000Z" + type: string + display_name: + description: The display name for the handle. + example: "#incidents-channel" + type: string + handle: + description: The notification handle. + example: "@slack-incidents-channel" + type: string + required: + - handle + type: object + IncidentCommunicationDataAttributesRequest: + description: Attributes for creating or updating a communication. + properties: + communication_type: + $ref: "#/components/schemas/IncidentCommunicationKind" + content: + $ref: "#/components/schemas/IncidentCommunicationContent" + required: + - communication_type + - content + type: object + IncidentCommunicationDataAttributesResponse: + description: Attributes of an incident communication response. + properties: + communication_type: + $ref: "#/components/schemas/IncidentCommunicationKind" + content: + $ref: "#/components/schemas/IncidentCommunicationContent" + created: + description: Timestamp when the communication was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incident_id: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + modified: + description: Timestamp when the communication was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + required: + - incident_id + - communication_type + - content + - created + - modified + type: object + IncidentCommunicationDataRequest: + description: Incident communication data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentCommunicationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentCommunicationType" + required: + - type + - attributes + type: object + IncidentCommunicationDataResponse: + description: Incident communication data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentCommunicationDataAttributesResponse" + id: + description: The communication identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentCommunicationType" + required: + - id + - type + - attributes + type: object + IncidentCommunicationKind: + description: The kind of communication. + enum: + - manual + - automated + example: manual + type: string + x-enum-varnames: + - MANUAL + - AUTOMATED + IncidentCommunicationRequest: + description: Request to create or update a communication. + properties: + data: + $ref: "#/components/schemas/IncidentCommunicationDataRequest" + required: + - data + type: object + IncidentCommunicationResponse: + description: Response with a single communication. + properties: + data: + $ref: "#/components/schemas/IncidentCommunicationDataResponse" + required: + - data + type: object + IncidentCommunicationType: + description: Incident communication resource type. + enum: + - communication + example: communication + type: string + x-enum-varnames: + - COMMUNICATION + IncidentCommunicationsResponse: + description: Response with a list of communications. + properties: + data: + description: List of communications. + items: + $ref: "#/components/schemas/IncidentCommunicationDataResponse" + type: array + required: + - data + type: object IncidentCreateAttributes: description: The incident's attributes for a create request. properties: @@ -33574,6 +34195,35 @@ components: required: - data type: object + IncidentCreateZoomMeetingData: + description: Data for creating a Zoom meeting. + properties: + attributes: + $ref: "#/components/schemas/IncidentCreateZoomMeetingDataAttributes" + type: + $ref: "#/components/schemas/IncidentZoomIntegrationType" + required: + - type + - attributes + type: object + IncidentCreateZoomMeetingDataAttributes: + description: Attributes for creating a Zoom meeting. + properties: + topic: + description: The topic of the Zoom meeting. + example: "Incident INC-123 War Room" + type: string + required: + - topic + type: object + IncidentCreateZoomMeetingRequest: + description: Request to create a Zoom meeting for an incident. + properties: + data: + $ref: "#/components/schemas/IncidentCreateZoomMeetingData" + required: + - data + type: object IncidentFieldAttributes: description: Dynamic fields for which selections can be made, with field names as keys. oneOf: @@ -33631,6 +34281,92 @@ components: - TEXTARRAY - METRICTAG - AUTOCOMPLETE + IncidentGoogleMeetIntegrationDataAttributes: + description: Attributes of a Google Meet integration metadata. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: google_meet + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + spaces: + description: List of Google Meet spaces. + items: + $ref: "#/components/schemas/IncidentGoogleMeetSpace" + type: array + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - spaces + - created + - modified + type: object + IncidentGoogleMeetIntegrationDataResponse: + description: Google Meet integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentGoogleMeetIntegrationResponse: + description: Response with Google Meet integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationDataResponse" + required: + - data + type: object + IncidentGoogleMeetIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentGoogleMeetSpace: + description: A Google Meet space associated with an incident. + properties: + join_url: + description: The URL to join the Google Meet space. + example: https://meet.google.com/abc-defg-hij + type: string + meeting_code: + description: The meeting code for the space. + example: abc-defg-hij + type: string + name: + description: The name of the Google Meet space. + example: spaces/abc123 + type: string + required: + - name + - join_url + - meeting_code + type: object IncidentHandleAttributesFields: description: Dynamic fields associated with the handle example: @@ -34454,6 +35190,579 @@ components: last_modified_by_user: $ref: "#/components/schemas/RelationshipToUser" type: object + IncidentJiraIssueDataAttributesRequest: + description: Attributes for creating a Jira issue from an incident. + properties: + account_id: + description: The Jira account identifier. + example: "123456" + type: string + issue_type_id: + description: The Jira issue type identifier. + example: "10001" + type: string + project_id: + description: The Jira project identifier. + example: "10000" + type: string + template_id: + description: The identifier of the Jira template to use. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + required: + - account_id + - project_id + - issue_type_id + type: object + IncidentJiraIssueDataRequest: + description: Jira issue data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraIssueDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentJiraIssueType" + required: + - type + - attributes + type: object + IncidentJiraIssueIntegrationDataAttributes: + description: Attributes of a Jira issue integration. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: jira + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - created + - modified + type: object + IncidentJiraIssueIntegrationDataResponse: + description: Jira issue integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentJiraIssueIntegrationResponse: + description: Response with Jira issue integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationDataResponse" + required: + - data + type: object + IncidentJiraIssueIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentJiraIssueRequest: + description: Request to create a Jira issue from an incident. + properties: + data: + $ref: "#/components/schemas/IncidentJiraIssueDataRequest" + required: + - data + type: object + IncidentJiraIssueType: + description: Incident Jira issue resource type. + enum: + - incident_jira_issues + example: incident_jira_issues + type: string + x-enum-varnames: + - INCIDENT_JIRA_ISSUES + IncidentJiraTemplateDataAttributesRequest: + description: Attributes for creating or updating an incident Jira template. + properties: + account_id: + description: The Jira account identifier. + example: "123456" + type: string + field_configurations: + description: Field configuration mappings. + items: + $ref: "#/components/schemas/IncidentJiraTemplateFieldConfiguration" + type: array + fields: + additionalProperties: {} + description: The Jira fields configuration. + type: object + is_default: + description: Whether this is the default template. + example: false + type: boolean + issue_id: + description: The Jira issue type identifier. + example: "10001" + type: string + mappings: + additionalProperties: {} + description: The field mappings configuration. + type: object + meta: + additionalProperties: {} + description: Additional metadata for the template. + type: object + name: + description: The name of the template. + example: Default Jira Template + type: string + project_id: + description: The Jira project identifier. + example: "10000" + type: string + project_key: + description: The Jira project key. + example: INC + type: string + sync_enabled: + description: Whether synchronization is enabled. + example: true + type: boolean + type: + description: The type of the template. + example: jira + type: string + required: + - account_id + - issue_id + - project_id + - project_key + type: object + IncidentJiraTemplateDataAttributesResponse: + description: Attributes of an incident Jira template. + properties: + account_id: + description: The Jira account identifier. + example: "123456" + type: string + created: + description: Timestamp when the template 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 template. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + field_configurations: + description: Field configuration mappings. + items: + $ref: "#/components/schemas/IncidentJiraTemplateFieldConfiguration" + type: array + fields: + additionalProperties: {} + description: The Jira fields configuration. + type: object + is_default: + description: Whether this is the default template. + example: false + type: boolean + issue_id: + description: The Jira issue type identifier. + example: "10001" + type: string + last_modified_by_uuid: + description: UUID of the user who last modified the template. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + mappings: + additionalProperties: {} + description: The field mappings configuration. + type: object + meta: + additionalProperties: {} + description: Additional metadata for the template. + type: object + modified: + description: Timestamp when the template was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + name: + description: The name of the template. + example: Default Jira Template + type: string + project_id: + description: The Jira project identifier. + example: "10000" + type: string + project_key: + description: The Jira project key. + example: INC + type: string + sync_enabled: + description: Whether synchronization is enabled. + example: true + type: boolean + type: + description: The type of the template. + example: jira + type: string + required: + - account_id + - issue_id + - project_id + - project_key + - name + - type + - is_default + - sync_enabled + - created + - modified + - created_by_uuid + - last_modified_by_uuid + type: object + IncidentJiraTemplateDataRequest: + description: Incident Jira template data for a create or update request. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraTemplateDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentJiraTemplateRelationships" + type: + $ref: "#/components/schemas/IncidentJiraTemplateType" + required: + - type + - attributes + type: object + IncidentJiraTemplateDataResponse: + description: Incident Jira template data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraTemplateDataAttributesResponse" + id: + description: The template identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentJiraTemplateRelationships" + type: + $ref: "#/components/schemas/IncidentJiraTemplateType" + required: + - id + - type + - attributes + type: object + IncidentJiraTemplateFieldConfiguration: + description: Configuration for a Jira field mapping. + properties: + custom_outbound_value: + description: Custom value for outbound synchronization. + incident_field: + description: The incident field to map to. + example: title + nullable: true + type: string + jira_field_key: + description: The Jira field key. + example: summary + type: string + jira_field_type: + description: The type of the Jira field. + example: string + nullable: true + type: string + sync_direction: + description: The direction of synchronization. + example: bidirectional + type: string + value_mapping: + additionalProperties: + type: string + description: Mapping of values between incident and Jira fields. + type: object + required: + - jira_field_key + - sync_direction + type: object + IncidentJiraTemplateIncidentTypeRelationship: + description: Relationship to an incident type. + properties: + data: + $ref: "#/components/schemas/IncidentJiraTemplateIncidentTypeRelationshipData" + required: + - data + type: object + IncidentJiraTemplateIncidentTypeRelationshipData: + description: Incident type relationship data. + properties: + id: + description: The incident type identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The incident type resource type. + example: incident_types + type: string + required: + - id + - type + type: object + IncidentJiraTemplateRelationships: + description: Relationships for an incident Jira template. + properties: + incident_type: + $ref: "#/components/schemas/IncidentJiraTemplateIncidentTypeRelationship" + type: object + IncidentJiraTemplateRequest: + description: Create or update request for an incident Jira template. + properties: + data: + $ref: "#/components/schemas/IncidentJiraTemplateDataRequest" + required: + - data + type: object + IncidentJiraTemplateResponse: + description: Response with a single incident Jira template. + properties: + data: + $ref: "#/components/schemas/IncidentJiraTemplateDataResponse" + required: + - data + type: object + IncidentJiraTemplateType: + description: Incident Jira template resource type. + enum: + - incidents_jira_templates + example: incidents_jira_templates + type: string + x-enum-varnames: + - INCIDENTS_JIRA_TEMPLATES + IncidentJiraTemplatesResponse: + description: Response with a list of incident Jira templates. + properties: + data: + description: List of incident Jira templates. + items: + $ref: "#/components/schemas/IncidentJiraTemplateDataResponse" + type: array + required: + - data + type: object + IncidentMSTeamsChannel: + description: A Microsoft Teams channel associated with an incident. + properties: + ms_channel_id: + description: The Teams channel identifier. + example: "19:abc123@thread.tacv2" + type: string + ms_channel_name: + description: The name of the Teams channel. + example: incidents-channel + type: string + ms_team_id: + description: The Teams team identifier. + example: "00000000-0000-0000-0000-000000000000" + type: string + ms_tenant_id: + description: The Teams tenant identifier. + example: "00000000-0000-0000-0000-000000000000" + type: string + redirect_url: + description: The redirect URL for the channel. + example: https://teams.microsoft.com/l/channel/abc123 + type: string + team_name: + description: The name of the Teams team. + example: Incident Response + type: string + required: + - ms_channel_name + - ms_channel_id + type: object + IncidentMSTeamsIntegrationDataAttributes: + description: Attributes of a Microsoft Teams integration metadata. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: ms_teams + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + teams: + description: List of Microsoft Teams channels. + items: + $ref: "#/components/schemas/IncidentMSTeamsChannel" + type: array + required: + - status + - integration_type + - teams + - created + - modified + type: object + IncidentMSTeamsIntegrationDataResponse: + description: Microsoft Teams integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentMSTeamsIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentMicrosoftTeamsIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentMSTeamsIntegrationResponse: + description: Response with Microsoft Teams integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentMSTeamsIntegrationDataResponse" + required: + - data + type: object + IncidentMicrosoftTeamsConfigurationDataAttributesRequest: + description: Attributes for creating or updating a Microsoft Teams configuration. + properties: + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + type: object + IncidentMicrosoftTeamsConfigurationDataAttributesResponse: + description: Attributes of a Microsoft Teams configuration. + properties: + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + modified_at: + description: Timestamp when the configuration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + required: + - manual_meeting_creation + - post_meeting_summary + - created_at + - modified_at + type: object + IncidentMicrosoftTeamsConfigurationDataRequest: + description: Microsoft Teams configuration data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationType" + required: + - type + - attributes + type: object + IncidentMicrosoftTeamsConfigurationDataResponse: + description: Microsoft Teams configuration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataAttributesResponse" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationType" + required: + - id + - type + - attributes + type: object + IncidentMicrosoftTeamsConfigurationRequest: + description: Request to create or update a Microsoft Teams configuration. + properties: + data: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataRequest" + required: + - data + type: object + IncidentMicrosoftTeamsConfigurationResponse: + description: Response with a Microsoft Teams configuration. + properties: + data: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataResponse" + required: + - data + type: object + IncidentMicrosoftTeamsConfigurationType: + description: Microsoft Teams configuration resource type. + enum: + - microsoft_teams_configurations + example: microsoft_teams_configurations + type: string + x-enum-varnames: + - MICROSOFT_TEAMS_CONFIGURATIONS + IncidentMicrosoftTeamsIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS IncidentNonDatadogCreator: description: Incident's non Datadog creator. nullable: true @@ -34967,6 +36276,93 @@ components: - id - type type: object + IncidentPagerdutyIncidentDataResponse: + description: Incident data related to a PagerDuty incident. + properties: + id: + description: The Datadog incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The incident resource type. + example: incidents + type: string + required: + - id + - type + type: object + IncidentPagerdutyRelatedIncidentsResponse: + description: Response with a list of Datadog incidents related to a PagerDuty incident. + properties: + data: + description: List of related Datadog incidents. + items: + $ref: "#/components/schemas/IncidentPagerdutyIncidentDataResponse" + type: array + required: + - data + type: object + IncidentPagerdutyServiceData: + description: PagerDuty service data. + properties: + attributes: + $ref: "#/components/schemas/IncidentPagerdutyServiceDataAttributes" + id: + description: The PagerDuty service identifier. + example: P1234AB + type: string + type: + $ref: "#/components/schemas/IncidentPagerdutyServiceType" + required: + - id + - type + - attributes + type: object + IncidentPagerdutyServiceDataAttributes: + description: Attributes of a PagerDuty service. + properties: + handle: + description: The handle for the PagerDuty service. + example: my-pagerduty-service + type: string + name: + description: The name of the PagerDuty service. + example: My PagerDuty Service + type: string + service_id: + description: The PagerDuty service identifier. + example: P1234AB + type: string + webhooks_enabled: + description: Whether webhooks are enabled for this service. + example: true + type: boolean + required: + - name + - service_id + - webhooks_enabled + - handle + type: object + IncidentPagerdutyServiceType: + description: PagerDuty service resource type. + enum: + - pagerduty_service + example: pagerduty_service + type: string + x-enum-varnames: + - PAGERDUTY_SERVICE + IncidentPagerdutyServicesResponse: + description: Response with a list of PagerDuty services. + properties: + data: + description: List of PagerDuty services. + items: + $ref: "#/components/schemas/IncidentPagerdutyServiceData" + type: array + required: + - data + type: object IncidentPostmortemType: default: incident_postmortems description: Incident postmortem resource type. @@ -34998,6 +36394,180 @@ components: - type - id type: object + IncidentRenderTemplateDataAttributesRequest: + description: Attributes for rendering a template. + properties: + content: + description: The template content to render. + example: "Incident INC-123 is SEV-1." + type: string + datetime_format: + description: The date-time format to use for rendering. + example: "2006-01-02T15:04:05Z07:00" + type: string + timezone: + description: The timezone to use for rendering. + example: America/New_York + type: string + validate_links: + description: Whether to validate links in the rendered template. + example: false + nullable: true + type: boolean + validate_variables: + description: Whether to validate variables in the template. + example: false + nullable: true + type: boolean + required: + - content + type: object + IncidentRenderTemplateDataRequest: + description: Data for rendering a template. + properties: + attributes: + $ref: "#/components/schemas/IncidentRenderTemplateDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentRenderedTemplateType" + required: + - type + - attributes + type: object + IncidentRenderTemplateRequest: + description: Request to render a template. + properties: + data: + $ref: "#/components/schemas/IncidentRenderTemplateDataRequest" + required: + - data + type: object + IncidentRenderedTemplateData: + description: Rendered template data. + properties: + attributes: + $ref: "#/components/schemas/IncidentRenderedTemplateDataAttributes" + id: + description: The rendered template identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentRenderedTemplateType" + required: + - id + - type + - attributes + type: object + IncidentRenderedTemplateDataAttributes: + description: Attributes of a rendered template. + properties: + rendered_content: + description: The rendered template content. + example: "Incident Server Down is SEV-1." + type: string + required: + - rendered_content + type: object + IncidentRenderedTemplateResponse: + description: Response with a rendered template. + properties: + data: + $ref: "#/components/schemas/IncidentRenderedTemplateData" + required: + - data + type: object + IncidentRenderedTemplateType: + description: Rendered template resource type. + enum: + - rendered_templates + example: rendered_templates + type: string + x-enum-varnames: + - RENDERED_TEMPLATES + IncidentReservedRoleDataAttributesResponse: + description: Attributes of a reserved 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 reserved role. + example: The incident commander. + 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 reserved role. + example: commander + type: string + policy: + $ref: "#/components/schemas/IncidentReservedRolePolicy" + required: + - name + - policy + - created + - modified + type: object + IncidentReservedRoleDataResponse: + description: Reserved role data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentReservedRoleDataAttributesResponse" + id: + description: The reserved role identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentReservedRoleType" + required: + - id + - type + - attributes + type: object + IncidentReservedRolePolicy: + description: Policy for a reserved role. + properties: + is_single: + description: Whether this role can only be assigned to a single responder. + example: true + type: boolean + required: + - is_single + type: object + IncidentReservedRoleResponse: + description: Response with a single reserved role. + properties: + data: + $ref: "#/components/schemas/IncidentReservedRoleDataResponse" + required: + - data + type: object + IncidentReservedRoleType: + description: Incident reserved role resource type. + enum: + - incident_reserved_roles + example: incident_reserved_roles + type: string + x-enum-varnames: + - INCIDENT_RESERVED_ROLES + IncidentReservedRolesResponse: + description: Response with a list of reserved roles. + properties: + data: + description: List of reserved roles. + items: + $ref: "#/components/schemas/IncidentReservedRoleDataResponse" + type: array + required: + - data + type: object IncidentResourceType: description: Incident resource type enum: @@ -35241,6 +36811,310 @@ components: user_defined_fields: $ref: "#/components/schemas/RelationshipToIncidentUserDefinedFields" type: object + IncidentRoleAssignmentDataAttributesRequest: + description: Attributes for creating a role assignment. + properties: + role: + description: The name of the role to assign. + example: commander + nullable: true + type: string + type: object + IncidentRoleAssignmentDataAttributesResponse: + description: Attributes of an incident role assignment. + properties: + created: + description: Timestamp when the role assignment was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + modified: + description: Timestamp when the role assignment was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + responder_type: + description: The type of the responder. + example: user + type: string + role: + description: The name of the assigned role. + example: commander + type: string + required: + - role + - responder_type + - created + - modified + type: object + IncidentRoleAssignmentDataRequest: + description: Role assignment data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentRoleAssignmentDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentRoleAssignmentRelationshipsRequest" + type: + $ref: "#/components/schemas/IncidentRoleAssignmentType" + required: + - type + - relationships + type: object + IncidentRoleAssignmentDataResponse: + description: Role assignment data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentRoleAssignmentDataAttributesResponse" + id: + description: The role assignment identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentRoleAssignmentRelationshipsResponse" + type: + $ref: "#/components/schemas/IncidentRoleAssignmentType" + required: + - id + - type + - attributes + type: object + IncidentRoleAssignmentRelationshipsRequest: + description: Relationships for creating a role assignment. + properties: + reserved_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + responder: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + user_defined_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + required: + - responder + type: object + IncidentRoleAssignmentRelationshipsResponse: + description: Relationships of a role assignment. + properties: + created_by_user: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + last_modified_by_user: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + reserved_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + responder: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + user_defined_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + required: + - responder + type: object + IncidentRoleAssignmentRequest: + description: Request to create a role assignment. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentDataRequest" + required: + - data + type: object + IncidentRoleAssignmentResponderRelationship: + description: Relationship to a responder. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationshipData" + required: + - data + type: object + IncidentRoleAssignmentResponderRelationshipData: + description: Responder relationship data. + properties: + id: + description: The responder identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The responder resource type. + example: users + type: string + required: + - id + - type + type: object + IncidentRoleAssignmentResponse: + description: Response with a single role assignment. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentDataResponse" + required: + - data + type: object + IncidentRoleAssignmentRoleRelationship: + description: Relationship to a role. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationshipData" + type: object + IncidentRoleAssignmentRoleRelationshipData: + description: Role relationship data. + properties: + id: + description: The role identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The role resource type. + example: incident_reserved_roles + type: string + required: + - id + - type + type: object + IncidentRoleAssignmentType: + description: Incident role assignment resource type. + enum: + - incident_role_assignments + example: incident_role_assignments + type: string + x-enum-varnames: + - INCIDENT_ROLE_ASSIGNMENTS + IncidentRuleExecutionStateDataAttributesResponse: + description: Attributes of an incident rule execution state. + properties: + created: + description: Timestamp when the state was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incident_uuid: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + last_executed_at: + description: Timestamp of the last rule execution. + example: "2024-01-01T00:00:00.000Z" + format: date-time + nullable: true + type: string + modified: + description: Timestamp when the state was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + rule_uuid: + description: The rule identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + required: + - rule_uuid + - incident_uuid + - created + - modified + type: object + IncidentRuleExecutionStateDataResponse: + description: Rule execution state data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentRuleExecutionStateDataAttributesResponse" + id: + description: The rule execution state identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentRuleExecutionStateType" + required: + - id + - type + - attributes + type: object + IncidentRuleExecutionStateRule: + description: A rule in a batch request. + properties: + last_executed_at: + description: Timestamp of the last rule execution. + example: "2024-01-01T00:00:00.000Z" + format: date-time + nullable: true + type: string + rule_uuid: + description: The rule identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + required: + - rule_uuid + type: object + IncidentRuleExecutionStateType: + description: Incident rule execution state resource type. + enum: + - incident_rule_execution_states + example: incident_rule_execution_states + type: string + x-enum-varnames: + - INCIDENT_RULE_EXECUTION_STATES + IncidentRuleExecutionStatesResponse: + description: Response with a list of rule execution states. + properties: + data: + description: List of rule execution states. + items: + $ref: "#/components/schemas/IncidentRuleExecutionStateDataResponse" + type: array + required: + - data + type: object + IncidentSearchIncidentsExportRequest: + description: Request to export incidents as CSV. + properties: + fields: + description: The list of fields to include in the export. + example: + - title + - severity + - state + items: + type: string + type: array + query: + description: The search query to filter incidents for export. + example: "state:active" + type: string + required: + - query + - fields + type: object + IncidentSearchIncidentsIncludeType: + description: Types of related objects to include. + enum: + - incident_type + - impacts + - users + - responders + - integrations + - attachments + type: string + x-enum-varnames: + - INCIDENT_TYPE + - IMPACTS + - USERS + - RESPONDERS + - INTEGRATIONS + - ATTACHMENTS + IncidentSearchIncidentsSortOrder: + description: The ways searched incidents can be sorted. + enum: + - created + - -created + - modified + - -modified + type: string + x-enum-varnames: + - CREATED_ASCENDING + - CREATED_DESCENDING + - MODIFIED_ASCENDING + - MODIFIED_DESCENDING IncidentSearchResponse: description: Response with incidents and facets. properties: @@ -35638,6 +37512,531 @@ components: - SEV_3 - SEV_4 - SEV_5 + IncidentStatusPageNoticeCreateData: + description: Data for publishing a status page notice. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPageNoticeCreateDataAttributes" + type: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationType" + required: + - type + - attributes + type: object + IncidentStatusPageNoticeCreateDataAttributes: + description: Attributes for publishing a status page notice. + properties: + components: + additionalProperties: + type: string + description: Map of component identifiers to their status. + example: + component_1: degraded_performance + type: object + message: + description: The message body of the notice. + example: We are investigating reports of elevated error rates. + type: string + status: + description: The status of the notice. + example: investigating + type: string + title: + description: The title of the notice. + example: Service degradation detected. + type: string + type: object + IncidentStatusPageNoticeCreateRequest: + description: Request to publish a status page notice. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPageNoticeCreateData" + required: + - data + type: object + IncidentStatusPageNoticeIntegrationDataAttributes: + description: Attributes of a status page notice integration. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: statuspage + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - created + - modified + type: object + IncidentStatusPageNoticeIntegrationDataResponse: + description: Status page notice integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentStatusPageNoticeIntegrationResponse: + description: Response with status page notice integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationDataResponse" + required: + - data + type: object + IncidentStatusPageNoticeIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentStatusPageNoticeUpdateData: + description: Data for updating a status page notice. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPageNoticeUpdateDataAttributes" + type: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationType" + required: + - type + - attributes + type: object + IncidentStatusPageNoticeUpdateDataAttributes: + description: Attributes for updating a status page notice. + properties: + components: + additionalProperties: + type: string + description: Map of component identifiers to their status. + type: object + message: + description: The message body of the notice. + example: The issue has been resolved. + type: string + status: + description: The status of the notice. + example: resolved + type: string + title: + description: The title of the notice. + example: Service degradation resolved. + type: string + type: object + IncidentStatusPageNoticeUpdateRequest: + description: Request to update a status page notice. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPageNoticeUpdateData" + required: + - data + type: object + IncidentStatusPagesSuggestionData: + description: Status pages suggestion data. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionDataAttributes" + id: + description: The suggestion title. + example: Service Degradation Detected + type: string + type: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionType" + required: + - id + - type + - attributes + type: object + IncidentStatusPagesSuggestionDataAttributes: + description: Attributes of a status pages suggestion. + properties: + status: + description: The suggested status for the status page. + example: investigating + type: string + update_text: + description: The suggested update text for the status page notice. + example: We are investigating reports of elevated error rates. + type: string + required: + - status + - update_text + type: object + IncidentStatusPagesSuggestionResponse: + description: Response with a status pages suggestion. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionData" + required: + - data + type: object + IncidentStatusPagesSuggestionType: + description: Incident status pages suggestion resource type. + enum: + - incident_statuspages_suggestion + example: incident_statuspages_suggestion + type: string + x-enum-varnames: + - INCIDENT_STATUSPAGES_SUGGESTION + IncidentStatuspageIncidentDataAttributesRequest: + description: Attributes for creating or updating a Statuspage incident. + properties: + body: + description: The body text of the Statuspage incident. + example: We are investigating the issue. + nullable: true + type: string + components: + additionalProperties: + type: string + description: Map of component identifiers to their status. + type: object + deliver_notifications: + description: Whether to deliver notifications. + example: true + nullable: true + type: boolean + impact: + description: The impact level of the incident. + example: major + nullable: true + type: string + name: + description: The name of the Statuspage incident. + example: Service Outage + nullable: true + type: string + page_id: + description: The Statuspage page identifier. + example: abc123 + type: string + status: + description: The status of the Statuspage incident. + example: investigating + nullable: true + type: string + type: object + IncidentStatuspageIncidentDataAttributesResponse: + description: Attributes of a Statuspage incident integration. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incidents: + description: List of Statuspage incidents. + items: + $ref: "#/components/schemas/IncidentStatuspageIncidentEntry" + type: array + integration_type: + description: The type of integration. + example: statuspage + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - created + - modified + type: object + IncidentStatuspageIncidentDataRequest: + description: Statuspage incident data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentStatuspageIncidentType" + required: + - type + - attributes + type: object + IncidentStatuspageIncidentDataResponse: + description: Statuspage incident data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataAttributesResponse" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentStatuspageIncidentType" + required: + - id + - type + - attributes + type: object + IncidentStatuspageIncidentEntry: + description: A Statuspage incident entry. + properties: + incident_id: + description: The Datadog incident identifier. + example: "12345" + type: string + page_id: + description: The Statuspage page identifier. + example: abc123 + type: string + redirect_url: + description: The URL of the Statuspage incident. + example: https://status.example.com/incidents/abc123 + type: string + required: + - incident_id + - page_id + type: object + IncidentStatuspageIncidentRequest: + description: Request to create or update a Statuspage incident. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataRequest" + required: + - data + type: object + IncidentStatuspageIncidentResponse: + description: Response with Statuspage incident integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataResponse" + required: + - data + type: object + IncidentStatuspageIncidentType: + description: Statuspage incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentStatuspagePreferencesData: + description: Subscription preferences data. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspagePreferencesDataAttributes" + id: + description: The preferences identifier. + example: "12345" + type: string + type: + $ref: "#/components/schemas/IncidentStatuspagePreferencesType" + required: + - id + - type + - attributes + type: object + IncidentStatuspagePreferencesDataAttributes: + description: Attributes of subscription preferences. + properties: + subscribed: + description: Whether the user is subscribed. + example: true + type: boolean + required: + - subscribed + type: object + IncidentStatuspagePreferencesResponse: + description: Response with subscription preferences. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspagePreferencesData" + required: + - data + type: object + IncidentStatuspagePreferencesType: + description: Subscription preferences resource type. + enum: + - statuspage_subscription_preferences + example: statuspage_subscription_preferences + type: string + x-enum-varnames: + - STATUSPAGE_SUBSCRIPTION_PREFERENCES + IncidentStatuspageSubscriptionDataAttributesRequest: + description: Attributes for creating an email subscription. + properties: + email: + description: The email address to subscribe. + example: user@example.com + type: string + required: + - email + type: object + IncidentStatuspageSubscriptionDataAttributesResponse: + description: Attributes of an email subscription. + properties: + confirmed: + description: Whether the subscription has been confirmed. + example: true + type: boolean + created_at: + description: Timestamp when the subscription was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + email: + description: The subscribed email address. + example: user@example.com + type: string + required: + - email + - confirmed + - created_at + type: object + IncidentStatuspageSubscriptionDataRequest: + description: Subscription data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionType" + required: + - type + - attributes + type: object + IncidentStatuspageSubscriptionDataResponse: + description: Email subscription data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataAttributesResponse" + id: + description: The subscription identifier. + example: "12345" + type: string + type: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionType" + required: + - id + - type + - attributes + type: object + IncidentStatuspageSubscriptionRequest: + description: Request to create an email subscription. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataRequest" + required: + - data + type: object + IncidentStatuspageSubscriptionResponse: + description: Response with a single email subscription. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataResponse" + required: + - data + type: object + IncidentStatuspageSubscriptionType: + description: Statuspage email subscription resource type. + enum: + - statuspage_email_subscription + example: statuspage_email_subscription + type: string + x-enum-varnames: + - STATUSPAGE_EMAIL_SUBSCRIPTION + IncidentStatuspageSubscriptionsResponse: + description: Response with a list of email subscriptions. + properties: + data: + description: List of email subscriptions. + items: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataResponse" + type: array + required: + - data + type: object + IncidentTemplateVariableData: + description: Template variable data. + properties: + attributes: + $ref: "#/components/schemas/IncidentTemplateVariableDataAttributes" + id: + description: The template variable identifier. + example: incident.title + type: string + type: + $ref: "#/components/schemas/IncidentTemplateVariableType" + required: + - id + - type + - attributes + type: object + IncidentTemplateVariableDataAttributes: + description: Attributes of a template variable. + properties: + description: + description: A description of the template variable. + example: The title of the incident. + type: string + display_name: + description: The display name of the template variable. + example: Incident Title + type: string + domain: + description: The domain of the template variable. + example: incident + type: string + variable: + description: The variable name used in templates. + example: "incident.title" + type: string + required: + - display_name + - domain + - variable + - description + type: object + IncidentTemplateVariableType: + description: Template variable resource type. + enum: + - template_variables + example: template_variables + type: string + x-enum-varnames: + - TEMPLATE_VARIABLES + IncidentTemplateVariablesResponse: + description: Response with a list of template variables. + properties: + data: + description: List of template variables. + items: + $ref: "#/components/schemas/IncidentTemplateVariableData" + type: array + required: + - data + type: object IncidentTimelineCellCreateAttributes: description: The timeline cell's attributes for a create request. oneOf: @@ -35676,6 +38075,206 @@ components: nullable: false type: string type: object + IncidentTimelineCellSource: + description: The source of a timeline cell. + enum: + - slack + - microsoft_teams + - datadog + - api + example: api + type: string + x-enum-varnames: + - SLACK + - MICROSOFT_TEAMS + - DATADOG + - API + IncidentTimelineCellType: + description: The type of a timeline cell. + enum: + - markdown + - incident_status_change + - timestamp_change + - meeting_summary + - meeting_chat + - role_assignment_change + - postmortem_change + example: markdown + type: string + x-enum-varnames: + - MARKDOWN + - INCIDENT_STATUS_CHANGE + - TIMESTAMP_CHANGE + - MEETING_SUMMARY + - MEETING_CHAT + - ROLE_ASSIGNMENT_CHANGE + - POSTMORTEM_CHANGE + IncidentTimelineEntriesResponse: + description: Response with a list of timeline entries. + properties: + data: + description: List of timeline entries. + items: + $ref: "#/components/schemas/IncidentTimelineEntryDataResponse" + type: array + required: + - data + type: object + IncidentTimelineEntryContent: + description: The content of a timeline entry. + properties: + message: + description: The markdown message content. + example: Investigating the issue. + type: string + type: object + IncidentTimelineEntryDataAttributesRequest: + description: Attributes for creating or updating a timeline entry. + properties: + cell_type: + $ref: "#/components/schemas/IncidentTimelineCellType" + content: + $ref: "#/components/schemas/IncidentTimelineEntryContent" + display_time: + description: The display time for this timeline entry. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + important: + description: Whether this timeline entry is marked as important. + example: false + type: boolean + required: + - cell_type + - content + type: object + IncidentTimelineEntryDataAttributesResponse: + description: Attributes of a timeline entry. + properties: + cell_type: + $ref: "#/components/schemas/IncidentTimelineCellType" + content: + $ref: "#/components/schemas/IncidentTimelineEntryContent" + created: + description: Timestamp when the entry was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + display_time: + description: The display time for this timeline entry. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + important: + description: Whether this timeline entry is marked as important. + example: false + type: boolean + incident_id: + description: The incident identifier. + example: "12345" + type: string + modified: + description: Timestamp when the entry was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + parent_uuid: + description: UUID of the parent timeline entry. + example: 00000000-0000-0000-0000-000000000000 + nullable: true + type: string + source: + $ref: "#/components/schemas/IncidentTimelineCellSource" + required: + - incident_id + - cell_type + - content + - source + - display_time + - important + - created + - modified + type: object + IncidentTimelineEntryDataRequest: + description: Timeline entry data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimelineEntryDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentTimelineEntryType" + required: + - type + - attributes + type: object + IncidentTimelineEntryDataResponse: + description: Timeline entry data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimelineEntryDataAttributesResponse" + id: + description: The timeline entry identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentTimelineEntryType" + required: + - id + - type + - attributes + type: object + IncidentTimelineEntryRequest: + description: Request to create or update a timeline entry. + properties: + data: + $ref: "#/components/schemas/IncidentTimelineEntryDataRequest" + required: + - data + type: object + IncidentTimelineEntryResponse: + description: Response with a single timeline entry. + properties: + data: + $ref: "#/components/schemas/IncidentTimelineEntryDataResponse" + required: + - data + type: object + IncidentTimelineEntryType: + description: Incident timeline entry resource type. + enum: + - incident_timeline_cells + example: incident_timeline_cells + type: string + x-enum-varnames: + - INCIDENT_TIMELINE_CELLS + IncidentTimelineThreadDataResponse: + description: Thread data for a timeline entry. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimelineEntryDataAttributesResponse" + id: + description: The thread entry identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentTimelineEntryType" + required: + - id + - type + - attributes + type: object + IncidentTimelineThreadResponse: + description: Response with thread entries for a timeline entry. + properties: + data: + description: List of thread entries. + items: + $ref: "#/components/schemas/IncidentTimelineThreadDataResponse" + type: array + required: + - data + type: object IncidentTodoAnonymousAssignee: description: Anonymous assignee entity. properties: @@ -36624,6 +39223,200 @@ components: - display_name - value type: object + IncidentZoomConfigurationDataAttributesRequest: + description: Attributes for creating or updating a Zoom configuration. + properties: + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + meeting_chat_timeline_sync: + description: Whether meeting chat timeline sync is enabled. + example: false + type: boolean + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + type: object + IncidentZoomConfigurationDataAttributesResponse: + description: Attributes of a Zoom configuration. + properties: + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + meeting_chat_timeline_sync: + description: Whether meeting chat timeline sync is enabled. + example: false + type: boolean + modified_at: + description: Timestamp when the configuration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + required: + - manual_meeting_creation + - post_meeting_summary + - meeting_chat_timeline_sync + - created_at + - modified_at + type: object + IncidentZoomConfigurationDataRequest: + description: Zoom configuration data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentZoomConfigurationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentZoomConfigurationType" + required: + - type + - attributes + type: object + IncidentZoomConfigurationDataResponse: + description: Zoom configuration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentZoomConfigurationDataAttributesResponse" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentZoomConfigurationType" + required: + - id + - type + - attributes + type: object + IncidentZoomConfigurationRequest: + description: Request to create or update a Zoom configuration. + properties: + data: + $ref: "#/components/schemas/IncidentZoomConfigurationDataRequest" + required: + - data + type: object + IncidentZoomConfigurationResponse: + description: Response with a Zoom configuration. + properties: + data: + $ref: "#/components/schemas/IncidentZoomConfigurationDataResponse" + required: + - data + type: object + IncidentZoomConfigurationType: + description: Zoom configuration resource type. + enum: + - zoom_configurations + example: zoom_configurations + type: string + x-enum-varnames: + - ZOOM_CONFIGURATIONS + IncidentZoomIntegrationDataAttributes: + description: Attributes of a Zoom integration metadata. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: zoom + type: string + meetings: + description: List of Zoom meetings. + items: + $ref: "#/components/schemas/IncidentZoomMeeting" + type: array + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - meetings + - created + - modified + type: object + IncidentZoomIntegrationDataResponse: + description: Zoom integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentZoomIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentZoomIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentZoomIntegrationResponse: + description: Response with Zoom integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentZoomIntegrationDataResponse" + required: + - data + type: object + IncidentZoomIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentZoomMeeting: + description: A Zoom meeting associated with an incident. + properties: + host_id: + description: The Zoom host identifier. + example: abc123 + type: string + join_url: + description: The URL to join the meeting. + example: https://zoom.us/j/1234567890 + type: string + meeting_id: + description: The Zoom meeting identifier. + example: 1234567890 + format: int64 + type: integer + password: + description: The meeting password. + example: abc123 + type: string + recording_url: + description: The URL of the meeting recording. + example: https://zoom.us/rec/share/abc123 + type: string + required: + - join_url + - meeting_id + type: object IncidentsResponse: description: Response with a list of incidents. properties: @@ -104250,6 +107043,475 @@ 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/jira-templates: + get: + description: List all incident Jira templates for the organization. + operationId: ListIncidentJiraTemplates + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIsDefaultParameter" + - $ref: "#/components/parameters/IncidentJiraTemplateIncidentTypeIdParameter" + - $ref: "#/components/parameters/IncidentJiraTemplateTypeParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentJiraTemplatesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: List incident Jira templates + 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 incident Jira template for the organization. + operationId: CreateIncidentJiraTemplate + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + issue_id: "10001" + project_id: "10000" + project_key: INC + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + created: "2024-01-01T00:00:00.000Z" + created_by_uuid: 00000000-0000-0000-0000-000000000000 + is_default: false + issue_id: "10001" + last_modified_by_uuid: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + name: Default Jira Template + project_id: "10000" + project_key: INC + sync_enabled: true + type: jira + id: 00000000-0000-0000-0000-000000000000 + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "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 Jira template + 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/jira-templates/{template_id}: + delete: + description: Delete an incident Jira template by its identifier. + operationId: DeleteIncidentJiraTemplate + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "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 Jira template + 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: Get the details of an incident Jira template by its identifier. + operationId: GetIncidentJiraTemplate + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + created: "2024-01-01T00:00:00.000Z" + created_by_uuid: 00000000-0000-0000-0000-000000000000 + is_default: false + issue_id: "10001" + last_modified_by_uuid: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + name: Default Jira Template + project_id: "10000" + project_key: INC + sync_enabled: true + type: jira + id: 00000000-0000-0000-0000-000000000000 + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "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 Jira template + 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/). + put: + description: Update an existing incident Jira template. + operationId: UpdateIncidentJiraTemplate + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + issue_id: "10001" + project_id: "10000" + project_key: INC + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + created: "2024-01-01T00:00:00.000Z" + created_by_uuid: 00000000-0000-0000-0000-000000000000 + is_default: false + issue_id: "10001" + last_modified_by_uuid: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + name: Default Jira Template + project_id: "10000" + project_key: INC + sync_enabled: true + type: jira + id: 00000000-0000-0000-0000-000000000000 + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "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 Jira template + 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/microsoft-teams-configurations: + post: + description: Create a Microsoft Teams configuration for incidents. + operationId: CreateIncidentMicrosoftTeamsConfiguration + parameters: + - $ref: "#/components/parameters/IncidentMicrosoftTeamsIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + post_meeting_summary: true + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "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 Microsoft Teams configuration + 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/microsoft-teams-configurations/{configuration_id}: + patch: + description: Update a Microsoft Teams configuration for incidents. + operationId: UpdateIncidentMicrosoftTeamsConfiguration + parameters: + - $ref: "#/components/parameters/IncidentMicrosoftTeamsConfigurationIdParameter" + - $ref: "#/components/parameters/IncidentMicrosoftTeamsIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + post_meeting_summary: true + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "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 Microsoft Teams configuration + 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/notification-rules: get: description: Lists all notification rules for the organization. Optionally filter by incident type. @@ -104488,6 +107750,100 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Partially updates an existing notification rule. + operationId: PatchIncidentNotificationRule + parameters: + - $ref: "#/components/parameters/IncidentNotificationRuleIDPathParameter" + - $ref: "#/components/parameters/IncidentNotificationRuleIncludeQueryParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + conditions: + - field: severity + values: + - SEV-1 + - SEV-2 + enabled: true + handles: + - "@team-email@company.com" + - "@slack-channel" + renotify_on: + - status + - severity + trigger: incident_created_trigger + visibility: organization + id: 00000000-0000-0000-0000-000000000001 + relationships: + incident_type: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_types + notification_template: + data: + id: 00000000-0000-0000-0000-000000000001 + type: notification_templates + type: incident_notification_rules + schema: + $ref: "#/components/schemas/PutIncidentNotificationRuleRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + conditions: + - field: severity + values: + - SEV-1 + - SEV-2 + created: "2024-01-01T00:00:00+00:00" + enabled: true + handles: + - "@team-email@example.com" + modified: "2024-01-01T00:00:00+00:00" + trigger: incident_created_trigger + visibility: organization + id: 00000000-0000-0000-0000-000000000001 + type: incident_notification_rules + schema: + $ref: "#/components/schemas/IncidentNotificationRule" + 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_notification_settings_write + summary: Patch an incident notification rule + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - 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/). put: description: Updates an existing notification rule with a complete replacement. operationId: UpdateIncidentNotificationRule @@ -105093,6 +108449,146 @@ 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/reserved-roles: + get: + description: List all reserved roles for incidents. + operationId: ListIncidentReservedRoles + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentReservedRolesResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: List incident reserved 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/). + /api/v2/incidents/config/reserved-roles/{role_id}: + get: + description: Get the details of a reserved role by its identifier. + operationId: GetIncidentReservedRole + parameters: + - $ref: "#/components/parameters/IncidentReservedRoleIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + description: The incident commander. + modified: "2024-01-01T00:00:00.000Z" + name: commander + policy: + is_single: true + id: 00000000-0000-0000-0000-000000000000 + type: incident_reserved_roles + schema: + $ref: "#/components/schemas/IncidentReservedRoleResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "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 reserved 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/template-variables: + get: + description: List all available template variables for incident templates. + operationId: ListIncidentTemplateVariables + parameters: + - $ref: "#/components/parameters/IncidentTemplateVariableFilterIncidentTypeParameter" + - $ref: "#/components/parameters/IncidentTemplateVariableIncludeFollowUpsParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTemplateVariablesResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident template variables + 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/types: get: description: Get all incident types. @@ -105832,6 +109328,155 @@ 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/zoom-configurations: + post: + description: Create a Zoom configuration for incidents. + operationId: CreateIncidentZoomConfiguration + parameters: + - $ref: "#/components/parameters/IncidentZoomIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + meeting_chat_timeline_sync: false + post_meeting_summary: true + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + meeting_chat_timeline_sync: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "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 Zoom configuration + 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/zoom-configurations/{configuration_id}: + patch: + description: Update a Zoom configuration for incidents. + operationId: UpdateIncidentZoomConfiguration + parameters: + - $ref: "#/components/parameters/IncidentZoomConfigurationIdParameter" + - $ref: "#/components/parameters/IncidentZoomIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + meeting_chat_timeline_sync: false + post_meeting_summary: true + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + meeting_chat_timeline_sync: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "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 Zoom configuration + 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: |- @@ -105922,6 +109567,297 @@ 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/pagerduty/services: + get: + description: List all PagerDuty services configured for the organization. + operationId: ListIncidentPagerdutyServices + parameters: + - $ref: "#/components/parameters/PagerdutyIncludeUnresolvedParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentPagerdutyServicesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List PagerDuty services + 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/pagerduty/{pagerduty_incident_id}/relationships/incidents: + get: + description: Get the list of Datadog incidents attached to a PagerDuty incident. + operationId: GetIncidentPagerdutyRelatedIncidents + parameters: + - $ref: "#/components/parameters/PagerdutyIncidentIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentPagerdutyRelatedIncidentsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get PagerDuty related incidents + 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/role_assignments: + post: + description: Create a new role assignment for an incident. + operationId: CreateIncidentRoleAssignment + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + role: commander + relationships: + responder: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + type: incident_role_assignments + schema: + $ref: "#/components/schemas/IncidentRoleAssignmentRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + modified: "2024-01-01T00:00:00.000Z" + responder_type: user + role: commander + id: 00000000-0000-0000-0000-000000000000 + type: incident_role_assignments + schema: + $ref: "#/components/schemas/IncidentRoleAssignmentResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident role assignment + 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/role_assignments/{role_assignment_id}: + delete: + description: Delete a role assignment by its identifier. + operationId: DeleteIncidentRoleAssignment + parameters: + - $ref: "#/components/parameters/IncidentRoleAssignmentIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident role assignment + 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: Get the details of a role assignment by its identifier. + operationId: GetIncidentRoleAssignment + parameters: + - $ref: "#/components/parameters/IncidentRoleAssignmentIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + modified: "2024-01-01T00:00:00.000Z" + responder_type: user + role: commander + id: 00000000-0000-0000-0000-000000000000 + type: incident_role_assignments + schema: + $ref: "#/components/schemas/IncidentRoleAssignmentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get an incident role assignment + 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/search: get: description: >- @@ -105980,6 +109916,285 @@ 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/search-incidents: + get: + description: Search for incidents using advanced filtering and pagination. + operationId: SearchIncidentsV2 + parameters: + - $ref: "#/components/parameters/IncidentSearchIncidentsQueryParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsSortParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsWithFacetsParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsWithDeletedParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsSemanticQueryParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsTimezoneParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsIncludeParameter" + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/PageOffset" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + facets: {} + incidents: [] + total: 0 + type: incidents_search_results + schema: + $ref: "#/components/schemas/IncidentSearchResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Search incidents + 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/search-incidents/export: + post: + description: Export incidents matching a search query as a CSV file. + operationId: ExportIncidents + requestBody: + content: + application/json: + examples: + default: + value: + fields: + - title + - severity + - state + query: "state:active" + schema: + $ref: "#/components/schemas/IncidentSearchIncidentsExportRequest" + required: true + responses: + "200": + content: + text/csv: + examples: + default: + value: "title,severity,state" + schema: + format: binary + type: string + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Export incidents + 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/statuspage/{incident_id}/statuspage-incidents: + post: + description: Create a Statuspage incident linked to a Datadog incident. + operationId: CreateIncidentStatuspageIncident + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + body: We are investigating the issue. + deliver_notifications: true + name: Service Outage + page_id: abc123 + status: investigating + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Statuspage incident + 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/statuspage/{incident_id}/statuspage-incidents/pages/{page_id}/incidents/{statuspage_incident_id}: + patch: + description: Update a Statuspage incident linked to a Datadog incident. + operationId: UpdateIncidentStatuspageIncident + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentStatuspagePageIdParameter" + - $ref: "#/components/parameters/IncidentStatuspageIncidentIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + body: The issue has been resolved. + deliver_notifications: true + name: Service Outage + page_id: abc123 + status: resolved + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident Statuspage incident + 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/{incident_id}: delete: description: Deletes an existing incident from the users organization. @@ -106461,6 +110676,592 @@ 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}/automation-data/{key}: + get: + description: Get automation data for a given incident and key. + operationId: GetIncidentAutomationData + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentAutomationDataKeyParameter" + - $ref: "#/components/parameters/IncidentAutomationDataIncludeParameter" + 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 + key: workflow_status + updated_at: "2024-01-01T00:00:00.000Z" + value: completed + id: workflow_status + type: incidents_automation_data + schema: + $ref: "#/components/schemas/IncidentAutomationDataResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident automation data + 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/). + put: + description: Create or update automation data for a given incident and key. + operationId: UpsertIncidentAutomationData + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentAutomationDataKeyParameter" + - $ref: "#/components/parameters/IncidentAutomationDataIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + value: completed + type: incidents_automation_data + schema: + $ref: "#/components/schemas/IncidentAutomationDataRequest" + 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 + key: workflow_status + updated_at: "2024-01-01T00:00:00.000Z" + value: completed + id: workflow_status + type: incidents_automation_data + schema: + $ref: "#/components/schemas/IncidentAutomationDataResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Upsert incident automation data + 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/{incident_id}/cases/source-link: + get: + description: Get the source link for a case associated with an incident. + operationId: GetIncidentCaseSourceLink + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + entity_id: "12345" + is_page: false + relationship: source + id: "12345" + type: case_link + schema: + $ref: "#/components/schemas/IncidentCaseLinkResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident case source link + 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/{incident_id}/communications: + get: + description: List all communications for a given incident. + operationId: ListIncidentCommunications + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationFilterTypeParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentCommunicationsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident communications + 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 communication for a given incident. + operationId: CreateIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Incident update for INC-123. + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Incident update for INC-123. + created: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000000 + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident communication + 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/{incident_id}/communications/{communication_id}: + delete: + description: Delete a communication for a given incident. + operationId: DeleteIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident communication + 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: Get the details of a communication for a given incident. + operationId: GetIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Incident update for INC-123. + created: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000000 + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get an incident communication + 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 a communication for a given incident. + operationId: UpdateIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Updated incident communication for INC-123. + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Updated incident communication for INC-123. + created: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000000 + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident communication + 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/{incident_id}/google-meet/space: + post: + description: Create a Google Meet space for a given incident. + operationId: CreateIncidentGoogleMeetSpace + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: google_meet + modified: "2024-01-01T00:00:00.000Z" + spaces: [] + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Google Meet space + 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/{incident_id}/impacts: get: description: Get all impacts for an incident. @@ -106604,6 +111405,198 @@ paths: operator: OR permissions: - incident_write + /api/v2/incidents/{incident_id}/jira-issues: + post: + description: Create a Jira issue linked to a given incident. + operationId: CreateIncidentJiraIssue + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + issue_type_id: "10001" + project_id: "10000" + type: incident_jira_issues + schema: + $ref: "#/components/schemas/IncidentJiraIssueRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: jira + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Jira issue + 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/{incident_id}/microsoft-teams-integration/online-meeting: + post: + description: Create a Microsoft Teams online meeting for a given incident. + operationId: CreateIncidentMSTeamsOnlineMeeting + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: ms_teams + modified: "2024-01-01T00:00:00.000Z" + status: active + teams: [] + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentMSTeamsIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Microsoft Teams online meeting + 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/{incident_id}/pages/source-link: + get: + description: Get the source link for a page associated with an incident. + operationId: GetIncidentPageSourceLink + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + entity_id: "12345" + is_page: true + relationship: source + id: "12345" + type: case_link + schema: + $ref: "#/components/schemas/IncidentCaseLinkResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident page source link + 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/{incident_id}/relationships/integrations: get: description: Get all integration metadata for an incident. @@ -107142,6 +112135,871 @@ 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}/render-template: + post: + description: Render a template with incident-specific data. + operationId: RenderIncidentTemplate + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + content: "Incident INC-123 is SEV-1." + type: rendered_templates + schema: + $ref: "#/components/schemas/IncidentRenderTemplateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + rendered_content: "Incident Server Down is SEV-1." + id: 00000000-0000-0000-0000-000000000000 + type: rendered_templates + schema: + $ref: "#/components/schemas/IncidentRenderedTemplateResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Render an incident template + 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/{incident_id}/rule-execution-states: + get: + description: List all rule execution states for a given incident. + operationId: ListIncidentRuleExecutionStates + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRuleExecutionStatesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident rule execution states + 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/{incident_id}/rule-execution-states/batch: + post: + description: Batch create rule execution states for a given incident. + operationId: BatchCreateIncidentRuleExecutionStates + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + rules: + - rule_uuid: 00000000-0000-0000-0000-000000000000 + type: incident_rule_execution_states + schema: + $ref: "#/components/schemas/IncidentBatchCreateRuleExecutionStatesRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRuleExecutionStatesResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Batch create incident rule execution states + 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/). + put: + description: Batch update rule execution states for a given incident. + operationId: BatchUpdateIncidentRuleExecutionStates + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + rules: + - last_executed_at: "2024-01-01T00:00:00.000Z" + rule_uuid: 00000000-0000-0000-0000-000000000000 + type: incident_rule_execution_states + schema: + $ref: "#/components/schemas/IncidentBatchUpdateRuleExecutionStatesRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRuleExecutionStatesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Batch update incident rule execution states + 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/{incident_id}/statuspages-suggestion: + get: + description: Get an AI-generated suggestion for a status page notice for a given incident. + operationId: GetIncidentStatusPagesSuggestion + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + status: investigating + update_text: We are investigating reports of elevated error rates. + id: Service Degradation Detected + type: incident_statuspages_suggestion + schema: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident status pages suggestion + 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/{incident_id}/statuspages/{statuspage_id}/notices: + post: + description: Publish a status page notice for a given incident. + operationId: CreateIncidentStatusPageNotice + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentStatusPageIdParameter" + - $ref: "#/components/parameters/IncidentStatusPageNotifySubscribersParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + components: + component_1: degraded_performance + message: We are investigating reports of elevated error rates. + status: investigating + title: Service degradation detected. + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeCreateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Publish an incident status page notice + 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/{incident_id}/statuspages/{statuspage_id}/notices/{notice_id}: + patch: + description: Update a status page notice for a given incident. + operationId: UpdateIncidentStatusPageNotice + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentStatusPageIdParameter" + - $ref: "#/components/parameters/IncidentStatusPageNoticeIdParameter" + - $ref: "#/components/parameters/IncidentStatusPageNotifySubscribersParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + message: The issue has been resolved. + status: resolved + title: Service degradation resolved. + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident status page notice + 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/{incident_id}/timeline: + get: + description: Get the timeline for a given incident. + operationId: ListIncidentTimelineEntries + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTimelineEntriesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident timeline entries + 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 timeline entry for a given incident. + operationId: CreateIncidentTimelineEntry + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Investigating the issue. + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Investigating the issue. + created: "2024-01-01T00:00:00.000Z" + display_time: "2024-01-01T00:00:00.000Z" + important: false + incident_id: "12345" + modified: "2024-01-01T00:00:00.000Z" + source: api + id: 00000000-0000-0000-0000-000000000000 + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident timeline entry + 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/{incident_id}/timeline/{timeline_entry_id}: + delete: + description: Delete a timeline entry for a given incident. + operationId: DeleteIncidentTimelineEntry + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimelineEntryIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident timeline entry + 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 a timeline entry for a given incident. + operationId: UpdateIncidentTimelineEntry + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimelineEntryIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Updated investigation notes. + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Updated investigation notes. + created: "2024-01-01T00:00:00.000Z" + display_time: "2024-01-01T00:00:00.000Z" + important: false + incident_id: "12345" + modified: "2024-01-01T00:00:00.000Z" + source: api + id: 00000000-0000-0000-0000-000000000000 + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident timeline entry + 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/{incident_id}/timeline/{timeline_entry_id}/thread: + get: + description: Get the thread entries for a given timeline entry. + operationId: GetIncidentTimelineEntryThread + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimelineEntryIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTimelineThreadResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident timeline entry thread + 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/{incident_id}/zoom/meeting: + post: + description: Create a Zoom meeting for a given incident. + operationId: CreateIncidentZoomMeeting + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + topic: "Incident INC-123 War Room" + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentCreateZoomMeetingRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: zoom + meetings: [] + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentZoomIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Zoom meeting + 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/integration/aws/accounts: get: description: Get a list of AWS Account Integration Configs. @@ -139061,6 +144919,48 @@ paths: operator: AND permissions: - status_pages_settings_read + /api/v2/statuspages/subscription/preferences: + get: + description: Get the subscription preferences for the current user. + operationId: GetStatuspageSubscriptionPreferences + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + subscribed: true + id: "12345" + type: statuspage_subscription_preferences + schema: + $ref: "#/components/schemas/IncidentStatuspagePreferencesResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get status page subscription preferences + 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/statuspages/{page_id}: delete: description: Deletes a status page by its ID. @@ -140168,6 +146068,103 @@ paths: - status_pages_settings_write - status_pages_public_page_publish - status_pages_internal_page_publish + /api/v2/statuspages/{page_id}/subscriptions/email: + get: + description: List all email subscriptions for a status page. + operationId: ListStatuspageEmailSubscriptions + parameters: + - $ref: "#/components/parameters/IncidentStatuspagePageIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionsResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List status page email subscriptions + 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 an email subscription for a status page. + operationId: CreateStatuspageEmailSubscription + parameters: + - $ref: "#/components/parameters/IncidentStatuspagePageIdPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + email: user@example.com + type: statuspage_email_subscription + schema: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + confirmed: true + created_at: "2024-01-01T00:00:00.000Z" + email: user@example.com + id: "12345" + type: statuspage_email_subscription + schema: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a status page email subscription + 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/statuspages/{page_id}/unpublish: post: description: Unpublishes a status page. For pages of type `public`, removes the status page from the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, removes the `status-pages/$domain_prefix/view` route from the Datadog organization and requires the `status_pages_internal_page_publish` permission. The `status_pages_settings_write` permission is temporarily honored as we migrate unpublishing functionality from the update status page endpoint to the unpublish status page endpoint. diff --git a/examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.java b/examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.java new file mode 100644 index 00000000000..222656cfd93 --- /dev/null +++ b/examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.java @@ -0,0 +1,51 @@ +// Batch create incident rule execution states returns "Created" 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.IncidentBatchCreateRuleExecutionStatesData; +import com.datadog.api.client.v2.model.IncidentBatchCreateRuleExecutionStatesDataAttributes; +import com.datadog.api.client.v2.model.IncidentBatchCreateRuleExecutionStatesRequest; +import com.datadog.api.client.v2.model.IncidentRuleExecutionStateRule; +import com.datadog.api.client.v2.model.IncidentRuleExecutionStateType; +import com.datadog.api.client.v2.model.IncidentRuleExecutionStatesResponse; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.batchCreateIncidentRuleExecutionStates", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentBatchCreateRuleExecutionStatesRequest body = + new IncidentBatchCreateRuleExecutionStatesRequest() + .data( + new IncidentBatchCreateRuleExecutionStatesData() + .attributes( + new IncidentBatchCreateRuleExecutionStatesDataAttributes() + .rules( + Collections.singletonList( + new IncidentRuleExecutionStateRule() + .lastExecutedAt( + OffsetDateTime.parse("2024-01-01T00:00:00.000Z")) + .ruleUuid( + UUID.fromString( + "00000000-0000-0000-0000-000000000000"))))) + .type(IncidentRuleExecutionStateType.INCIDENT_RULE_EXECUTION_STATES)); + + try { + IncidentRuleExecutionStatesResponse result = + apiInstance.batchCreateIncidentRuleExecutionStates("incident_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling IncidentsApi#batchCreateIncidentRuleExecutionStates"); + 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/BatchUpdateIncidentRuleExecutionStates.java b/examples/v2/incidents/BatchUpdateIncidentRuleExecutionStates.java new file mode 100644 index 00000000000..a217d47db98 --- /dev/null +++ b/examples/v2/incidents/BatchUpdateIncidentRuleExecutionStates.java @@ -0,0 +1,51 @@ +// Batch update incident rule execution states 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.IncidentBatchUpdateRuleExecutionStatesData; +import com.datadog.api.client.v2.model.IncidentBatchUpdateRuleExecutionStatesDataAttributes; +import com.datadog.api.client.v2.model.IncidentBatchUpdateRuleExecutionStatesRequest; +import com.datadog.api.client.v2.model.IncidentRuleExecutionStateRule; +import com.datadog.api.client.v2.model.IncidentRuleExecutionStateType; +import com.datadog.api.client.v2.model.IncidentRuleExecutionStatesResponse; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.batchUpdateIncidentRuleExecutionStates", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentBatchUpdateRuleExecutionStatesRequest body = + new IncidentBatchUpdateRuleExecutionStatesRequest() + .data( + new IncidentBatchUpdateRuleExecutionStatesData() + .attributes( + new IncidentBatchUpdateRuleExecutionStatesDataAttributes() + .rules( + Collections.singletonList( + new IncidentRuleExecutionStateRule() + .lastExecutedAt( + OffsetDateTime.parse("2024-01-01T00:00:00.000Z")) + .ruleUuid( + UUID.fromString( + "00000000-0000-0000-0000-000000000000"))))) + .type(IncidentRuleExecutionStateType.INCIDENT_RULE_EXECUTION_STATES)); + + try { + IncidentRuleExecutionStatesResponse result = + apiInstance.batchUpdateIncidentRuleExecutionStates("incident_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling IncidentsApi#batchUpdateIncidentRuleExecutionStates"); + 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/CreateIncidentCommunication.java b/examples/v2/incidents/CreateIncidentCommunication.java new file mode 100644 index 00000000000..2017a05e2e4 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentCommunication.java @@ -0,0 +1,55 @@ +// Create an incident communication returns "Created" 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.IncidentCommunicationContent; +import com.datadog.api.client.v2.model.IncidentCommunicationContentHandle; +import com.datadog.api.client.v2.model.IncidentCommunicationDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentCommunicationDataRequest; +import com.datadog.api.client.v2.model.IncidentCommunicationKind; +import com.datadog.api.client.v2.model.IncidentCommunicationRequest; +import com.datadog.api.client.v2.model.IncidentCommunicationResponse; +import com.datadog.api.client.v2.model.IncidentCommunicationType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentCommunication", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentCommunicationRequest body = + new IncidentCommunicationRequest() + .data( + new IncidentCommunicationDataRequest() + .attributes( + new IncidentCommunicationDataAttributesRequest() + .communicationType(IncidentCommunicationKind.MANUAL) + .content( + new IncidentCommunicationContent() + .groupingKey("update-1") + .handles( + Collections.singletonList( + new IncidentCommunicationContentHandle() + .createdAt("2024-01-01T00:00:00.000Z") + .displayName("#incidents-channel") + .handle("@slack-incidents-channel"))) + .message("Incident update for INC-123.") + .status(0) + .subject("Incident INC-123: Update"))) + .type(IncidentCommunicationType.COMMUNICATION)); + + try { + IncidentCommunicationResponse result = + apiInstance.createIncidentCommunication("incident_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentCommunication"); + 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/CreateIncidentGoogleMeetSpace.java b/examples/v2/incidents/CreateIncidentGoogleMeetSpace.java new file mode 100644 index 00000000000..0e179fb073d --- /dev/null +++ b/examples/v2/incidents/CreateIncidentGoogleMeetSpace.java @@ -0,0 +1,26 @@ +// Create an incident Google Meet space returns "Created" 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.IncidentGoogleMeetIntegrationResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentGoogleMeetSpace", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentGoogleMeetIntegrationResponse result = + apiInstance.createIncidentGoogleMeetSpace("incident_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentGoogleMeetSpace"); + 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/CreateIncidentJiraIssue.java b/examples/v2/incidents/CreateIncidentJiraIssue.java new file mode 100644 index 00000000000..094c84baae4 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentJiraIssue.java @@ -0,0 +1,43 @@ +// Create an incident Jira issue returns "Created" 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.IncidentJiraIssueDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentJiraIssueDataRequest; +import com.datadog.api.client.v2.model.IncidentJiraIssueIntegrationResponse; +import com.datadog.api.client.v2.model.IncidentJiraIssueRequest; +import com.datadog.api.client.v2.model.IncidentJiraIssueType; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentJiraIssue", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentJiraIssueRequest body = + new IncidentJiraIssueRequest() + .data( + new IncidentJiraIssueDataRequest() + .attributes( + new IncidentJiraIssueDataAttributesRequest() + .accountId("123456") + .issueTypeId("10001") + .projectId("10000") + .templateId(UUID.fromString("00000000-0000-0000-0000-000000000000"))) + .type(IncidentJiraIssueType.INCIDENT_JIRA_ISSUES)); + + try { + IncidentJiraIssueIntegrationResponse result = + apiInstance.createIncidentJiraIssue("incident_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentJiraIssue"); + 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/CreateIncidentJiraTemplate.java b/examples/v2/incidents/CreateIncidentJiraTemplate.java new file mode 100644 index 00000000000..b9a84914626 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentJiraTemplate.java @@ -0,0 +1,68 @@ +// Create an incident Jira template returns "Created" 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.IncidentJiraTemplateDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentJiraTemplateDataRequest; +import com.datadog.api.client.v2.model.IncidentJiraTemplateFieldConfiguration; +import com.datadog.api.client.v2.model.IncidentJiraTemplateIncidentTypeRelationship; +import com.datadog.api.client.v2.model.IncidentJiraTemplateIncidentTypeRelationshipData; +import com.datadog.api.client.v2.model.IncidentJiraTemplateRelationships; +import com.datadog.api.client.v2.model.IncidentJiraTemplateRequest; +import com.datadog.api.client.v2.model.IncidentJiraTemplateResponse; +import com.datadog.api.client.v2.model.IncidentJiraTemplateType; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentJiraTemplate", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentJiraTemplateRequest body = + new IncidentJiraTemplateRequest() + .data( + new IncidentJiraTemplateDataRequest() + .attributes( + new IncidentJiraTemplateDataAttributesRequest() + .accountId("123456") + .fieldConfigurations( + Collections.singletonList( + new IncidentJiraTemplateFieldConfiguration() + .incidentField("title") + .jiraFieldKey("summary") + .jiraFieldType("string") + .syncDirection("bidirectional"))) + .isDefault(false) + .issueId("10001") + .name("Default Jira Template") + .projectId("10000") + .projectKey("INC") + .syncEnabled(true) + .type("jira")) + .relationships( + new IncidentJiraTemplateRelationships() + .incidentType( + new IncidentJiraTemplateIncidentTypeRelationship() + .data( + new IncidentJiraTemplateIncidentTypeRelationshipData() + .id( + UUID.fromString( + "00000000-0000-0000-0000-000000000000")) + .type("incident_types")))) + .type(IncidentJiraTemplateType.INCIDENTS_JIRA_TEMPLATES)); + + try { + IncidentJiraTemplateResponse result = apiInstance.createIncidentJiraTemplate(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentJiraTemplate"); + 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/CreateIncidentMSTeamsOnlineMeeting.java b/examples/v2/incidents/CreateIncidentMSTeamsOnlineMeeting.java new file mode 100644 index 00000000000..c250d41a15c --- /dev/null +++ b/examples/v2/incidents/CreateIncidentMSTeamsOnlineMeeting.java @@ -0,0 +1,26 @@ +// Create an incident Microsoft Teams online meeting returns "Created" 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.IncidentMSTeamsIntegrationResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentMSTeamsOnlineMeeting", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentMSTeamsIntegrationResponse result = + apiInstance.createIncidentMSTeamsOnlineMeeting("incident_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentMSTeamsOnlineMeeting"); + 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/CreateIncidentMicrosoftTeamsConfiguration.java b/examples/v2/incidents/CreateIncidentMicrosoftTeamsConfiguration.java new file mode 100644 index 00000000000..117cf003142 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentMicrosoftTeamsConfiguration.java @@ -0,0 +1,41 @@ +// Create an incident Microsoft Teams configuration returns "Created" 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.IncidentMicrosoftTeamsConfigurationDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationDataRequest; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationRequest; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationResponse; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentMicrosoftTeamsConfiguration", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentMicrosoftTeamsConfigurationRequest body = + new IncidentMicrosoftTeamsConfigurationRequest() + .data( + new IncidentMicrosoftTeamsConfigurationDataRequest() + .attributes( + new IncidentMicrosoftTeamsConfigurationDataAttributesRequest() + .manualMeetingCreation(false) + .postMeetingSummary(true)) + .type(IncidentMicrosoftTeamsConfigurationType.MICROSOFT_TEAMS_CONFIGURATIONS)); + + try { + IncidentMicrosoftTeamsConfigurationResponse result = + apiInstance.createIncidentMicrosoftTeamsConfiguration(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling IncidentsApi#createIncidentMicrosoftTeamsConfiguration"); + 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/CreateIncidentRoleAssignment.java b/examples/v2/incidents/CreateIncidentRoleAssignment.java new file mode 100644 index 00000000000..3501b195461 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentRoleAssignment.java @@ -0,0 +1,68 @@ +// Create an incident role assignment returns "Created" 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.IncidentRoleAssignmentDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentDataRequest; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentRelationshipsRequest; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentRequest; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentResponderRelationship; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentResponderRelationshipData; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentResponse; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentRoleRelationship; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentRoleRelationshipData; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentType; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentRoleAssignment", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentRoleAssignmentRequest body = + new IncidentRoleAssignmentRequest() + .data( + new IncidentRoleAssignmentDataRequest() + .attributes(new IncidentRoleAssignmentDataAttributesRequest().role("commander")) + .relationships( + new IncidentRoleAssignmentRelationshipsRequest() + .reservedRole( + new IncidentRoleAssignmentRoleRelationship() + .data( + new IncidentRoleAssignmentRoleRelationshipData() + .id( + UUID.fromString( + "00000000-0000-0000-0000-000000000000")) + .type("incident_reserved_roles"))) + .responder( + new IncidentRoleAssignmentResponderRelationship() + .data( + new IncidentRoleAssignmentResponderRelationshipData() + .id( + UUID.fromString( + "00000000-0000-0000-0000-000000000000")) + .type("users"))) + .userDefinedRole( + new IncidentRoleAssignmentRoleRelationship() + .data( + new IncidentRoleAssignmentRoleRelationshipData() + .id( + UUID.fromString( + "00000000-0000-0000-0000-000000000000")) + .type("incident_reserved_roles")))) + .type(IncidentRoleAssignmentType.INCIDENT_ROLE_ASSIGNMENTS)); + + try { + IncidentRoleAssignmentResponse result = apiInstance.createIncidentRoleAssignment(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentRoleAssignment"); + 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/CreateIncidentStatusPageNotice.java b/examples/v2/incidents/CreateIncidentStatusPageNotice.java new file mode 100644 index 00000000000..811a40f6526 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentStatusPageNotice.java @@ -0,0 +1,46 @@ +// Publish an incident status page notice 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.IncidentStatusPageNoticeCreateData; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeCreateDataAttributes; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeCreateRequest; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeIntegrationResponse; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeIntegrationType; +import java.util.Map; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentStatusPageNotice", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentStatusPageNoticeCreateRequest body = + new IncidentStatusPageNoticeCreateRequest() + .data( + new IncidentStatusPageNoticeCreateData() + .attributes( + new IncidentStatusPageNoticeCreateDataAttributes() + .components( + Map.ofEntries(Map.entry("component_1", "degraded_performance"))) + .message("We are investigating reports of elevated error rates.") + .status("investigating") + .title("Service degradation detected.")) + .type(IncidentStatusPageNoticeIntegrationType.INCIDENT_INTEGRATIONS)); + + try { + IncidentStatusPageNoticeIntegrationResponse result = + apiInstance.createIncidentStatusPageNotice( + "incident_id", UUID.fromString("00000000-0000-0000-0000-000000000000"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentStatusPageNotice"); + 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/CreateIncidentStatuspageIncident.java b/examples/v2/incidents/CreateIncidentStatuspageIncident.java new file mode 100644 index 00000000000..ac7fc0c275d --- /dev/null +++ b/examples/v2/incidents/CreateIncidentStatuspageIncident.java @@ -0,0 +1,44 @@ +// Create an incident Statuspage incident 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.IncidentStatuspageIncidentDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentDataRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentResponse; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentStatuspageIncident", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentStatuspageIncidentRequest body = + new IncidentStatuspageIncidentRequest() + .data( + new IncidentStatuspageIncidentDataRequest() + .attributes( + new IncidentStatuspageIncidentDataAttributesRequest() + .body("We are investigating the issue.") + .deliverNotifications(true) + .impact("major") + .name("Service Outage") + .pageId("abc123") + .status("investigating")) + .type(IncidentStatuspageIncidentType.INCIDENT_INTEGRATIONS)); + + try { + IncidentStatuspageIncidentResponse result = + apiInstance.createIncidentStatuspageIncident("incident_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentStatuspageIncident"); + 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/CreateIncidentTimelineEntry.java b/examples/v2/incidents/CreateIncidentTimelineEntry.java new file mode 100644 index 00000000000..52148c1dfbe --- /dev/null +++ b/examples/v2/incidents/CreateIncidentTimelineEntry.java @@ -0,0 +1,47 @@ +// Create an incident timeline entry returns "Created" 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.IncidentTimelineCellType; +import com.datadog.api.client.v2.model.IncidentTimelineEntryContent; +import com.datadog.api.client.v2.model.IncidentTimelineEntryDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentTimelineEntryDataRequest; +import com.datadog.api.client.v2.model.IncidentTimelineEntryRequest; +import com.datadog.api.client.v2.model.IncidentTimelineEntryResponse; +import com.datadog.api.client.v2.model.IncidentTimelineEntryType; +import java.time.OffsetDateTime; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentTimelineEntry", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentTimelineEntryRequest body = + new IncidentTimelineEntryRequest() + .data( + new IncidentTimelineEntryDataRequest() + .attributes( + new IncidentTimelineEntryDataAttributesRequest() + .cellType(IncidentTimelineCellType.MARKDOWN) + .content( + new IncidentTimelineEntryContent() + .message("Investigating the issue.")) + .displayTime(OffsetDateTime.parse("2024-01-01T00:00:00.000Z")) + .important(false)) + .type(IncidentTimelineEntryType.INCIDENT_TIMELINE_CELLS)); + + try { + IncidentTimelineEntryResponse result = + apiInstance.createIncidentTimelineEntry("incident_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentTimelineEntry"); + 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/CreateIncidentZoomConfiguration.java b/examples/v2/incidents/CreateIncidentZoomConfiguration.java new file mode 100644 index 00000000000..01e6d5dfcc5 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentZoomConfiguration.java @@ -0,0 +1,40 @@ +// Create an incident Zoom configuration returns "Created" 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.IncidentZoomConfigurationDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentZoomConfigurationDataRequest; +import com.datadog.api.client.v2.model.IncidentZoomConfigurationRequest; +import com.datadog.api.client.v2.model.IncidentZoomConfigurationResponse; +import com.datadog.api.client.v2.model.IncidentZoomConfigurationType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentZoomConfiguration", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentZoomConfigurationRequest body = + new IncidentZoomConfigurationRequest() + .data( + new IncidentZoomConfigurationDataRequest() + .attributes( + new IncidentZoomConfigurationDataAttributesRequest() + .manualMeetingCreation(false) + .meetingChatTimelineSync(false) + .postMeetingSummary(true)) + .type(IncidentZoomConfigurationType.ZOOM_CONFIGURATIONS)); + + try { + IncidentZoomConfigurationResponse result = apiInstance.createIncidentZoomConfiguration(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentZoomConfiguration"); + 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/CreateIncidentZoomMeeting.java b/examples/v2/incidents/CreateIncidentZoomMeeting.java new file mode 100644 index 00000000000..e301f15e32e --- /dev/null +++ b/examples/v2/incidents/CreateIncidentZoomMeeting.java @@ -0,0 +1,39 @@ +// Create an incident Zoom meeting returns "Created" 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.IncidentCreateZoomMeetingData; +import com.datadog.api.client.v2.model.IncidentCreateZoomMeetingDataAttributes; +import com.datadog.api.client.v2.model.IncidentCreateZoomMeetingRequest; +import com.datadog.api.client.v2.model.IncidentZoomIntegrationResponse; +import com.datadog.api.client.v2.model.IncidentZoomIntegrationType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentZoomMeeting", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentCreateZoomMeetingRequest body = + new IncidentCreateZoomMeetingRequest() + .data( + new IncidentCreateZoomMeetingData() + .attributes( + new IncidentCreateZoomMeetingDataAttributes() + .topic("Incident INC-123 War Room")) + .type(IncidentZoomIntegrationType.INCIDENT_INTEGRATIONS)); + + try { + IncidentZoomIntegrationResponse result = + apiInstance.createIncidentZoomMeeting("incident_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentZoomMeeting"); + 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/CreateStatuspageEmailSubscription.java b/examples/v2/incidents/CreateStatuspageEmailSubscription.java new file mode 100644 index 00000000000..b33dc95b0f0 --- /dev/null +++ b/examples/v2/incidents/CreateStatuspageEmailSubscription.java @@ -0,0 +1,39 @@ +// Create a status page email subscription returns "Created" 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.IncidentStatuspageSubscriptionDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageSubscriptionDataRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageSubscriptionRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageSubscriptionResponse; +import com.datadog.api.client.v2.model.IncidentStatuspageSubscriptionType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createStatuspageEmailSubscription", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentStatuspageSubscriptionRequest body = + new IncidentStatuspageSubscriptionRequest() + .data( + new IncidentStatuspageSubscriptionDataRequest() + .attributes( + new IncidentStatuspageSubscriptionDataAttributesRequest() + .email("user@example.com")) + .type(IncidentStatuspageSubscriptionType.STATUSPAGE_EMAIL_SUBSCRIPTION)); + + try { + IncidentStatuspageSubscriptionResponse result = + apiInstance.createStatuspageEmailSubscription("my-status-page", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createStatuspageEmailSubscription"); + 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/DeleteIncidentCommunication.java b/examples/v2/incidents/DeleteIncidentCommunication.java new file mode 100644 index 00000000000..ca5c104547b --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentCommunication.java @@ -0,0 +1,25 @@ +// Delete an incident communication returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.IncidentsApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteIncidentCommunication", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + apiInstance.deleteIncidentCommunication( + "incident_id", UUID.fromString("00000000-0000-0000-0000-000000000000")); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#deleteIncidentCommunication"); + 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/DeleteIncidentJiraTemplate.java b/examples/v2/incidents/DeleteIncidentJiraTemplate.java new file mode 100644 index 00000000000..72e8b3acff7 --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentJiraTemplate.java @@ -0,0 +1,25 @@ +// Delete an incident Jira template returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.IncidentsApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteIncidentJiraTemplate", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + apiInstance.deleteIncidentJiraTemplate( + UUID.fromString("00000000-0000-0000-0000-000000000000")); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#deleteIncidentJiraTemplate"); + 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/DeleteIncidentRoleAssignment.java b/examples/v2/incidents/DeleteIncidentRoleAssignment.java new file mode 100644 index 00000000000..44ff9c537f8 --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentRoleAssignment.java @@ -0,0 +1,25 @@ +// Delete an incident role assignment returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.IncidentsApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteIncidentRoleAssignment", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + apiInstance.deleteIncidentRoleAssignment( + UUID.fromString("00000000-0000-0000-0000-000000000000")); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#deleteIncidentRoleAssignment"); + 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/DeleteIncidentTimelineEntry.java b/examples/v2/incidents/DeleteIncidentTimelineEntry.java new file mode 100644 index 00000000000..d5973188218 --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentTimelineEntry.java @@ -0,0 +1,25 @@ +// Delete an incident timeline entry returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.IncidentsApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteIncidentTimelineEntry", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + apiInstance.deleteIncidentTimelineEntry( + "incident_id", UUID.fromString("00000000-0000-0000-0000-000000000000")); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#deleteIncidentTimelineEntry"); + 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/ExportIncidents.java b/examples/v2/incidents/ExportIncidents.java new file mode 100644 index 00000000000..fd1a85fbf58 --- /dev/null +++ b/examples/v2/incidents/ExportIncidents.java @@ -0,0 +1,32 @@ +// Export incidents 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.IncidentSearchIncidentsExportRequest; +import java.io.File; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.exportIncidents", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentSearchIncidentsExportRequest body = + new IncidentSearchIncidentsExportRequest() + .fields(Arrays.asList("title", "severity", "state")) + .query("state:active"); + + try { + File result = apiInstance.exportIncidents(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#exportIncidents"); + 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/GetIncidentAutomationData.java b/examples/v2/incidents/GetIncidentAutomationData.java new file mode 100644 index 00000000000..e76e90addea --- /dev/null +++ b/examples/v2/incidents/GetIncidentAutomationData.java @@ -0,0 +1,26 @@ +// Get incident automation data 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.IncidentAutomationDataResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentAutomationData", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentAutomationDataResponse result = + apiInstance.getIncidentAutomationData("incident_id", "workflow_status"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentAutomationData"); + 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/GetIncidentCaseSourceLink.java b/examples/v2/incidents/GetIncidentCaseSourceLink.java new file mode 100644 index 00000000000..840de84f2f3 --- /dev/null +++ b/examples/v2/incidents/GetIncidentCaseSourceLink.java @@ -0,0 +1,25 @@ +// Get incident case source link 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.IncidentCaseLinkResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentCaseSourceLink", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentCaseLinkResponse result = apiInstance.getIncidentCaseSourceLink("incident_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentCaseSourceLink"); + 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/GetIncidentCommunication.java b/examples/v2/incidents/GetIncidentCommunication.java new file mode 100644 index 00000000000..87c013a604b --- /dev/null +++ b/examples/v2/incidents/GetIncidentCommunication.java @@ -0,0 +1,28 @@ +// Get an incident communication 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.IncidentCommunicationResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentCommunication", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentCommunicationResponse result = + apiInstance.getIncidentCommunication( + "incident_id", UUID.fromString("00000000-0000-0000-0000-000000000000")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentCommunication"); + 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/GetIncidentJiraTemplate.java b/examples/v2/incidents/GetIncidentJiraTemplate.java new file mode 100644 index 00000000000..2dc23482795 --- /dev/null +++ b/examples/v2/incidents/GetIncidentJiraTemplate.java @@ -0,0 +1,28 @@ +// Get an incident Jira template 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.IncidentJiraTemplateResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentJiraTemplate", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentJiraTemplateResponse result = + apiInstance.getIncidentJiraTemplate( + UUID.fromString("00000000-0000-0000-0000-000000000000")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentJiraTemplate"); + 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/GetIncidentPageSourceLink.java b/examples/v2/incidents/GetIncidentPageSourceLink.java new file mode 100644 index 00000000000..c9235db5f02 --- /dev/null +++ b/examples/v2/incidents/GetIncidentPageSourceLink.java @@ -0,0 +1,25 @@ +// Get incident page source link 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.IncidentCaseLinkResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentPageSourceLink", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentCaseLinkResponse result = apiInstance.getIncidentPageSourceLink("incident_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentPageSourceLink"); + 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/GetIncidentPagerdutyRelatedIncidents.java b/examples/v2/incidents/GetIncidentPagerdutyRelatedIncidents.java new file mode 100644 index 00000000000..0763a52bf99 --- /dev/null +++ b/examples/v2/incidents/GetIncidentPagerdutyRelatedIncidents.java @@ -0,0 +1,27 @@ +// Get PagerDuty related incidents 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.IncidentPagerdutyRelatedIncidentsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentPagerdutyRelatedIncidents", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentPagerdutyRelatedIncidentsResponse result = + apiInstance.getIncidentPagerdutyRelatedIncidents("P1234AB"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling IncidentsApi#getIncidentPagerdutyRelatedIncidents"); + 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/GetIncidentReservedRole.java b/examples/v2/incidents/GetIncidentReservedRole.java new file mode 100644 index 00000000000..6bb223ba2e1 --- /dev/null +++ b/examples/v2/incidents/GetIncidentReservedRole.java @@ -0,0 +1,28 @@ +// Get an incident reserved role 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.IncidentReservedRoleResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentReservedRole", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentReservedRoleResponse result = + apiInstance.getIncidentReservedRole( + UUID.fromString("00000000-0000-0000-0000-000000000000")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentReservedRole"); + 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/GetIncidentRoleAssignment.java b/examples/v2/incidents/GetIncidentRoleAssignment.java new file mode 100644 index 00000000000..00ef5f39886 --- /dev/null +++ b/examples/v2/incidents/GetIncidentRoleAssignment.java @@ -0,0 +1,28 @@ +// Get an incident role assignment 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.IncidentRoleAssignmentResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentRoleAssignment", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentRoleAssignmentResponse result = + apiInstance.getIncidentRoleAssignment( + UUID.fromString("00000000-0000-0000-0000-000000000000")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentRoleAssignment"); + 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/GetIncidentStatusPagesSuggestion.java b/examples/v2/incidents/GetIncidentStatusPagesSuggestion.java new file mode 100644 index 00000000000..0f3e45c1ea0 --- /dev/null +++ b/examples/v2/incidents/GetIncidentStatusPagesSuggestion.java @@ -0,0 +1,26 @@ +// Get incident status pages suggestion 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.IncidentStatusPagesSuggestionResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentStatusPagesSuggestion", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentStatusPagesSuggestionResponse result = + apiInstance.getIncidentStatusPagesSuggestion("incident_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentStatusPagesSuggestion"); + 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/GetIncidentTimelineEntryThread.java b/examples/v2/incidents/GetIncidentTimelineEntryThread.java new file mode 100644 index 00000000000..fb3fd2f2fb0 --- /dev/null +++ b/examples/v2/incidents/GetIncidentTimelineEntryThread.java @@ -0,0 +1,28 @@ +// Get incident timeline entry thread 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.IncidentTimelineThreadResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentTimelineEntryThread", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentTimelineThreadResponse result = + apiInstance.getIncidentTimelineEntryThread( + "incident_id", UUID.fromString("00000000-0000-0000-0000-000000000000")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentTimelineEntryThread"); + 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/GetStatuspageSubscriptionPreferences.java b/examples/v2/incidents/GetStatuspageSubscriptionPreferences.java new file mode 100644 index 00000000000..3d3debcee5e --- /dev/null +++ b/examples/v2/incidents/GetStatuspageSubscriptionPreferences.java @@ -0,0 +1,27 @@ +// Get status page subscription preferences 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.IncidentStatuspagePreferencesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getStatuspageSubscriptionPreferences", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentStatuspagePreferencesResponse result = + apiInstance.getStatuspageSubscriptionPreferences(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling IncidentsApi#getStatuspageSubscriptionPreferences"); + 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/ListIncidentCommunications.java b/examples/v2/incidents/ListIncidentCommunications.java new file mode 100644 index 00000000000..eaa13f7e9e2 --- /dev/null +++ b/examples/v2/incidents/ListIncidentCommunications.java @@ -0,0 +1,25 @@ +// List incident communications 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.IncidentCommunicationsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listIncidentCommunications", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentCommunicationsResponse result = apiInstance.listIncidentCommunications("incident_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#listIncidentCommunications"); + 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/ListIncidentJiraTemplates.java b/examples/v2/incidents/ListIncidentJiraTemplates.java new file mode 100644 index 00000000000..bd04b9cd801 --- /dev/null +++ b/examples/v2/incidents/ListIncidentJiraTemplates.java @@ -0,0 +1,25 @@ +// List incident Jira templates 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.IncidentJiraTemplatesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listIncidentJiraTemplates", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentJiraTemplatesResponse result = apiInstance.listIncidentJiraTemplates(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#listIncidentJiraTemplates"); + 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/ListIncidentPagerdutyServices.java b/examples/v2/incidents/ListIncidentPagerdutyServices.java new file mode 100644 index 00000000000..f731a7a36a4 --- /dev/null +++ b/examples/v2/incidents/ListIncidentPagerdutyServices.java @@ -0,0 +1,25 @@ +// List PagerDuty services 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.IncidentPagerdutyServicesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listIncidentPagerdutyServices", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentPagerdutyServicesResponse result = apiInstance.listIncidentPagerdutyServices(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#listIncidentPagerdutyServices"); + 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/ListIncidentReservedRoles.java b/examples/v2/incidents/ListIncidentReservedRoles.java new file mode 100644 index 00000000000..2d06191d5e0 --- /dev/null +++ b/examples/v2/incidents/ListIncidentReservedRoles.java @@ -0,0 +1,25 @@ +// List incident reserved roles 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.IncidentReservedRolesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listIncidentReservedRoles", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentReservedRolesResponse result = apiInstance.listIncidentReservedRoles(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#listIncidentReservedRoles"); + 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/ListIncidentRuleExecutionStates.java b/examples/v2/incidents/ListIncidentRuleExecutionStates.java new file mode 100644 index 00000000000..f2f2edcbe40 --- /dev/null +++ b/examples/v2/incidents/ListIncidentRuleExecutionStates.java @@ -0,0 +1,26 @@ +// List incident rule execution states 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.IncidentRuleExecutionStatesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listIncidentRuleExecutionStates", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentRuleExecutionStatesResponse result = + apiInstance.listIncidentRuleExecutionStates("incident_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#listIncidentRuleExecutionStates"); + 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/ListIncidentTemplateVariables.java b/examples/v2/incidents/ListIncidentTemplateVariables.java new file mode 100644 index 00000000000..1fbd630141d --- /dev/null +++ b/examples/v2/incidents/ListIncidentTemplateVariables.java @@ -0,0 +1,25 @@ +// List incident template variables 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.IncidentTemplateVariablesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listIncidentTemplateVariables", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentTemplateVariablesResponse result = apiInstance.listIncidentTemplateVariables(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#listIncidentTemplateVariables"); + 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/ListIncidentTimelineEntries.java b/examples/v2/incidents/ListIncidentTimelineEntries.java new file mode 100644 index 00000000000..9fbe22a8961 --- /dev/null +++ b/examples/v2/incidents/ListIncidentTimelineEntries.java @@ -0,0 +1,26 @@ +// List incident timeline entries 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.IncidentTimelineEntriesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listIncidentTimelineEntries", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentTimelineEntriesResponse result = + apiInstance.listIncidentTimelineEntries("incident_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#listIncidentTimelineEntries"); + 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/ListStatuspageEmailSubscriptions.java b/examples/v2/incidents/ListStatuspageEmailSubscriptions.java new file mode 100644 index 00000000000..1d6d1c85b1e --- /dev/null +++ b/examples/v2/incidents/ListStatuspageEmailSubscriptions.java @@ -0,0 +1,26 @@ +// List status page email subscriptions 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.IncidentStatuspageSubscriptionsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listStatuspageEmailSubscriptions", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentStatuspageSubscriptionsResponse result = + apiInstance.listStatuspageEmailSubscriptions("my-status-page"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#listStatuspageEmailSubscriptions"); + 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/PatchIncidentNotificationRule.java b/examples/v2/incidents/PatchIncidentNotificationRule.java new file mode 100644 index 00000000000..e4c12ff9601 --- /dev/null +++ b/examples/v2/incidents/PatchIncidentNotificationRule.java @@ -0,0 +1,81 @@ +// Patch an incident notification rule 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.IncidentNotificationRule; +import com.datadog.api.client.v2.model.IncidentNotificationRuleConditionsItems; +import com.datadog.api.client.v2.model.IncidentNotificationRuleCreateAttributes; +import com.datadog.api.client.v2.model.IncidentNotificationRuleCreateAttributesVisibility; +import com.datadog.api.client.v2.model.IncidentNotificationRuleCreateDataRelationships; +import com.datadog.api.client.v2.model.IncidentNotificationRuleType; +import com.datadog.api.client.v2.model.IncidentNotificationRuleUpdateData; +import com.datadog.api.client.v2.model.IncidentNotificationTemplateType; +import com.datadog.api.client.v2.model.IncidentTypeType; +import com.datadog.api.client.v2.model.PutIncidentNotificationRuleRequest; +import com.datadog.api.client.v2.model.RelationshipToIncidentNotificationTemplate; +import com.datadog.api.client.v2.model.RelationshipToIncidentNotificationTemplateData; +import com.datadog.api.client.v2.model.RelationshipToIncidentType; +import com.datadog.api.client.v2.model.RelationshipToIncidentTypeData; +import java.util.Arrays; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.patchIncidentNotificationRule", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + PutIncidentNotificationRuleRequest body = + new PutIncidentNotificationRuleRequest() + .data( + new IncidentNotificationRuleUpdateData() + .attributes( + new IncidentNotificationRuleCreateAttributes() + .conditions( + Collections.singletonList( + new IncidentNotificationRuleConditionsItems() + .field("severity") + .values(Arrays.asList("SEV-1", "SEV-2")))) + .enabled(true) + .handles(Arrays.asList("@team-email@company.com", "@slack-channel")) + .renotifyOn(Arrays.asList("status", "severity")) + .trigger("incident_created_trigger") + .visibility( + IncidentNotificationRuleCreateAttributesVisibility.ORGANIZATION)) + .id(UUID.fromString("00000000-0000-0000-0000-000000000001")) + .relationships( + new IncidentNotificationRuleCreateDataRelationships() + .incidentType( + new RelationshipToIncidentType() + .data( + new RelationshipToIncidentTypeData() + .id("00000000-0000-0000-0000-000000000000") + .type(IncidentTypeType.INCIDENT_TYPES))) + .notificationTemplate( + new RelationshipToIncidentNotificationTemplate() + .data( + new RelationshipToIncidentNotificationTemplateData() + .id( + UUID.fromString( + "00000000-0000-0000-0000-000000000001")) + .type( + IncidentNotificationTemplateType + .NOTIFICATION_TEMPLATES)))) + .type(IncidentNotificationRuleType.INCIDENT_NOTIFICATION_RULES)); + + try { + IncidentNotificationRule result = + apiInstance.patchIncidentNotificationRule( + UUID.fromString("00000000-0000-0000-0000-000000000001"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#patchIncidentNotificationRule"); + 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/RenderIncidentTemplate.java b/examples/v2/incidents/RenderIncidentTemplate.java new file mode 100644 index 00000000000..54a28824338 --- /dev/null +++ b/examples/v2/incidents/RenderIncidentTemplate.java @@ -0,0 +1,43 @@ +// Render an incident template 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.IncidentRenderTemplateDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentRenderTemplateDataRequest; +import com.datadog.api.client.v2.model.IncidentRenderTemplateRequest; +import com.datadog.api.client.v2.model.IncidentRenderedTemplateResponse; +import com.datadog.api.client.v2.model.IncidentRenderedTemplateType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.renderIncidentTemplate", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentRenderTemplateRequest body = + new IncidentRenderTemplateRequest() + .data( + new IncidentRenderTemplateDataRequest() + .attributes( + new IncidentRenderTemplateDataAttributesRequest() + .content("Incident INC-123 is SEV-1.") + .datetimeFormat("2006-01-02T15:04:05Z07:00") + .timezone("America/New_York") + .validateLinks(false) + .validateVariables(false)) + .type(IncidentRenderedTemplateType.RENDERED_TEMPLATES)); + + try { + IncidentRenderedTemplateResponse result = + apiInstance.renderIncidentTemplate("incident_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#renderIncidentTemplate"); + 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/SearchIncidentsV2.java b/examples/v2/incidents/SearchIncidentsV2.java new file mode 100644 index 00000000000..70b54c97c97 --- /dev/null +++ b/examples/v2/incidents/SearchIncidentsV2.java @@ -0,0 +1,25 @@ +// Search incidents 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.IncidentSearchResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.searchIncidentsV2", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentSearchResponse result = apiInstance.searchIncidentsV2(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#searchIncidentsV2"); + 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/UpdateIncidentCommunication.java b/examples/v2/incidents/UpdateIncidentCommunication.java new file mode 100644 index 00000000000..6a5a20ecdfd --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentCommunication.java @@ -0,0 +1,57 @@ +// Update an incident communication 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.IncidentCommunicationContent; +import com.datadog.api.client.v2.model.IncidentCommunicationContentHandle; +import com.datadog.api.client.v2.model.IncidentCommunicationDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentCommunicationDataRequest; +import com.datadog.api.client.v2.model.IncidentCommunicationKind; +import com.datadog.api.client.v2.model.IncidentCommunicationRequest; +import com.datadog.api.client.v2.model.IncidentCommunicationResponse; +import com.datadog.api.client.v2.model.IncidentCommunicationType; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateIncidentCommunication", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentCommunicationRequest body = + new IncidentCommunicationRequest() + .data( + new IncidentCommunicationDataRequest() + .attributes( + new IncidentCommunicationDataAttributesRequest() + .communicationType(IncidentCommunicationKind.MANUAL) + .content( + new IncidentCommunicationContent() + .groupingKey("update-1") + .handles( + Collections.singletonList( + new IncidentCommunicationContentHandle() + .createdAt("2024-01-01T00:00:00.000Z") + .displayName("#incidents-channel") + .handle("@slack-incidents-channel"))) + .message("Incident update for INC-123.") + .status(0) + .subject("Incident INC-123: Update"))) + .type(IncidentCommunicationType.COMMUNICATION)); + + try { + IncidentCommunicationResponse result = + apiInstance.updateIncidentCommunication( + "incident_id", UUID.fromString("00000000-0000-0000-0000-000000000000"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#updateIncidentCommunication"); + 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/UpdateIncidentJiraTemplate.java b/examples/v2/incidents/UpdateIncidentJiraTemplate.java new file mode 100644 index 00000000000..d157e11f0a8 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentJiraTemplate.java @@ -0,0 +1,70 @@ +// Update an incident Jira template 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.IncidentJiraTemplateDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentJiraTemplateDataRequest; +import com.datadog.api.client.v2.model.IncidentJiraTemplateFieldConfiguration; +import com.datadog.api.client.v2.model.IncidentJiraTemplateIncidentTypeRelationship; +import com.datadog.api.client.v2.model.IncidentJiraTemplateIncidentTypeRelationshipData; +import com.datadog.api.client.v2.model.IncidentJiraTemplateRelationships; +import com.datadog.api.client.v2.model.IncidentJiraTemplateRequest; +import com.datadog.api.client.v2.model.IncidentJiraTemplateResponse; +import com.datadog.api.client.v2.model.IncidentJiraTemplateType; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateIncidentJiraTemplate", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentJiraTemplateRequest body = + new IncidentJiraTemplateRequest() + .data( + new IncidentJiraTemplateDataRequest() + .attributes( + new IncidentJiraTemplateDataAttributesRequest() + .accountId("123456") + .fieldConfigurations( + Collections.singletonList( + new IncidentJiraTemplateFieldConfiguration() + .incidentField("title") + .jiraFieldKey("summary") + .jiraFieldType("string") + .syncDirection("bidirectional"))) + .isDefault(false) + .issueId("10001") + .name("Default Jira Template") + .projectId("10000") + .projectKey("INC") + .syncEnabled(true) + .type("jira")) + .relationships( + new IncidentJiraTemplateRelationships() + .incidentType( + new IncidentJiraTemplateIncidentTypeRelationship() + .data( + new IncidentJiraTemplateIncidentTypeRelationshipData() + .id( + UUID.fromString( + "00000000-0000-0000-0000-000000000000")) + .type("incident_types")))) + .type(IncidentJiraTemplateType.INCIDENTS_JIRA_TEMPLATES)); + + try { + IncidentJiraTemplateResponse result = + apiInstance.updateIncidentJiraTemplate( + UUID.fromString("00000000-0000-0000-0000-000000000000"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#updateIncidentJiraTemplate"); + 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/UpdateIncidentMicrosoftTeamsConfiguration.java b/examples/v2/incidents/UpdateIncidentMicrosoftTeamsConfiguration.java new file mode 100644 index 00000000000..49ebb7cb12f --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentMicrosoftTeamsConfiguration.java @@ -0,0 +1,43 @@ +// Update an incident Microsoft Teams configuration 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.IncidentMicrosoftTeamsConfigurationDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationDataRequest; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationRequest; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationResponse; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationType; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateIncidentMicrosoftTeamsConfiguration", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentMicrosoftTeamsConfigurationRequest body = + new IncidentMicrosoftTeamsConfigurationRequest() + .data( + new IncidentMicrosoftTeamsConfigurationDataRequest() + .attributes( + new IncidentMicrosoftTeamsConfigurationDataAttributesRequest() + .manualMeetingCreation(false) + .postMeetingSummary(true)) + .type(IncidentMicrosoftTeamsConfigurationType.MICROSOFT_TEAMS_CONFIGURATIONS)); + + try { + IncidentMicrosoftTeamsConfigurationResponse result = + apiInstance.updateIncidentMicrosoftTeamsConfiguration( + UUID.fromString("00000000-0000-0000-0000-000000000000"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling IncidentsApi#updateIncidentMicrosoftTeamsConfiguration"); + 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/UpdateIncidentStatusPageNotice.java b/examples/v2/incidents/UpdateIncidentStatusPageNotice.java new file mode 100644 index 00000000000..49801cd5acd --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentStatusPageNotice.java @@ -0,0 +1,46 @@ +// Update an incident status page notice 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.IncidentStatusPageNoticeIntegrationResponse; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeIntegrationType; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeUpdateData; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeUpdateDataAttributes; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeUpdateRequest; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateIncidentStatusPageNotice", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentStatusPageNoticeUpdateRequest body = + new IncidentStatusPageNoticeUpdateRequest() + .data( + new IncidentStatusPageNoticeUpdateData() + .attributes( + new IncidentStatusPageNoticeUpdateDataAttributes() + .message("The issue has been resolved.") + .status("resolved") + .title("Service degradation resolved.")) + .type(IncidentStatusPageNoticeIntegrationType.INCIDENT_INTEGRATIONS)); + + try { + IncidentStatusPageNoticeIntegrationResponse result = + apiInstance.updateIncidentStatusPageNotice( + "incident_id", + UUID.fromString("00000000-0000-0000-0000-000000000000"), + UUID.fromString("00000000-0000-0000-0000-000000000000"), + body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#updateIncidentStatusPageNotice"); + 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/UpdateIncidentStatuspageIncident.java b/examples/v2/incidents/UpdateIncidentStatuspageIncident.java new file mode 100644 index 00000000000..dbe29636ad8 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentStatuspageIncident.java @@ -0,0 +1,44 @@ +// Update an incident Statuspage incident 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.IncidentStatuspageIncidentDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentDataRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentResponse; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateIncidentStatuspageIncident", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentStatuspageIncidentRequest body = + new IncidentStatuspageIncidentRequest() + .data( + new IncidentStatuspageIncidentDataRequest() + .attributes( + new IncidentStatuspageIncidentDataAttributesRequest() + .body("We are investigating the issue.") + .deliverNotifications(true) + .impact("major") + .name("Service Outage") + .pageId("abc123") + .status("investigating")) + .type(IncidentStatuspageIncidentType.INCIDENT_INTEGRATIONS)); + + try { + IncidentStatuspageIncidentResponse result = + apiInstance.updateIncidentStatuspageIncident("incident_id", "abc123", "abc123", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#updateIncidentStatuspageIncident"); + 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/UpdateIncidentTimelineEntry.java b/examples/v2/incidents/UpdateIncidentTimelineEntry.java new file mode 100644 index 00000000000..a9d81672e06 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentTimelineEntry.java @@ -0,0 +1,49 @@ +// Update an incident timeline entry 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.IncidentTimelineCellType; +import com.datadog.api.client.v2.model.IncidentTimelineEntryContent; +import com.datadog.api.client.v2.model.IncidentTimelineEntryDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentTimelineEntryDataRequest; +import com.datadog.api.client.v2.model.IncidentTimelineEntryRequest; +import com.datadog.api.client.v2.model.IncidentTimelineEntryResponse; +import com.datadog.api.client.v2.model.IncidentTimelineEntryType; +import java.time.OffsetDateTime; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateIncidentTimelineEntry", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentTimelineEntryRequest body = + new IncidentTimelineEntryRequest() + .data( + new IncidentTimelineEntryDataRequest() + .attributes( + new IncidentTimelineEntryDataAttributesRequest() + .cellType(IncidentTimelineCellType.MARKDOWN) + .content( + new IncidentTimelineEntryContent() + .message("Investigating the issue.")) + .displayTime(OffsetDateTime.parse("2024-01-01T00:00:00.000Z")) + .important(false)) + .type(IncidentTimelineEntryType.INCIDENT_TIMELINE_CELLS)); + + try { + IncidentTimelineEntryResponse result = + apiInstance.updateIncidentTimelineEntry( + "incident_id", UUID.fromString("00000000-0000-0000-0000-000000000000"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#updateIncidentTimelineEntry"); + 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/UpdateIncidentZoomConfiguration.java b/examples/v2/incidents/UpdateIncidentZoomConfiguration.java new file mode 100644 index 00000000000..db3b9788aaa --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentZoomConfiguration.java @@ -0,0 +1,43 @@ +// Update an incident Zoom configuration 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.IncidentZoomConfigurationDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentZoomConfigurationDataRequest; +import com.datadog.api.client.v2.model.IncidentZoomConfigurationRequest; +import com.datadog.api.client.v2.model.IncidentZoomConfigurationResponse; +import com.datadog.api.client.v2.model.IncidentZoomConfigurationType; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateIncidentZoomConfiguration", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentZoomConfigurationRequest body = + new IncidentZoomConfigurationRequest() + .data( + new IncidentZoomConfigurationDataRequest() + .attributes( + new IncidentZoomConfigurationDataAttributesRequest() + .manualMeetingCreation(false) + .meetingChatTimelineSync(false) + .postMeetingSummary(true)) + .type(IncidentZoomConfigurationType.ZOOM_CONFIGURATIONS)); + + try { + IncidentZoomConfigurationResponse result = + apiInstance.updateIncidentZoomConfiguration( + UUID.fromString("00000000-0000-0000-0000-000000000000"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#updateIncidentZoomConfiguration"); + 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/UpsertIncidentAutomationData.java b/examples/v2/incidents/UpsertIncidentAutomationData.java new file mode 100644 index 00000000000..b9ae6779595 --- /dev/null +++ b/examples/v2/incidents/UpsertIncidentAutomationData.java @@ -0,0 +1,37 @@ +// Upsert incident automation data 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.IncidentAutomationDataAttributesRequest; +import com.datadog.api.client.v2.model.IncidentAutomationDataDataRequest; +import com.datadog.api.client.v2.model.IncidentAutomationDataRequest; +import com.datadog.api.client.v2.model.IncidentAutomationDataResponse; +import com.datadog.api.client.v2.model.IncidentAutomationDataType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.upsertIncidentAutomationData", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentAutomationDataRequest body = + new IncidentAutomationDataRequest() + .data( + new IncidentAutomationDataDataRequest() + .attributes(new IncidentAutomationDataAttributesRequest().value("completed")) + .type(IncidentAutomationDataType.INCIDENTS_AUTOMATION_DATA)); + + try { + IncidentAutomationDataResponse result = + apiInstance.upsertIncidentAutomationData("incident_id", "workflow_status", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#upsertIncidentAutomationData"); + 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 fc8d594424b..07e64367885 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -888,59 +888,109 @@ public class ApiClient { put("v2.createEmailTransportWebhookIntake", false); put("v2.createHamrOrgConnection", false); put("v2.getHamrOrgConnection", false); + put("v2.batchCreateIncidentRuleExecutionStates", false); + put("v2.batchUpdateIncidentRuleExecutionStates", false); put("v2.createGlobalIncidentHandle", false); put("v2.createIncident", false); put("v2.createIncidentAttachment", false); + put("v2.createIncidentCommunication", false); + put("v2.createIncidentGoogleMeetSpace", false); put("v2.createIncidentIntegration", false); + put("v2.createIncidentJiraIssue", false); + put("v2.createIncidentJiraTemplate", false); + put("v2.createIncidentMicrosoftTeamsConfiguration", false); + put("v2.createIncidentMSTeamsOnlineMeeting", false); put("v2.createIncidentNotificationRule", false); put("v2.createIncidentNotificationTemplate", false); put("v2.createIncidentPostmortemAttachment", false); put("v2.createIncidentPostmortemTemplate", false); + put("v2.createIncidentRoleAssignment", false); + put("v2.createIncidentStatuspageIncident", false); + put("v2.createIncidentStatusPageNotice", false); + put("v2.createIncidentTimelineEntry", false); put("v2.createIncidentTodo", false); put("v2.createIncidentType", false); put("v2.createIncidentUserDefinedField", false); + put("v2.createIncidentZoomConfiguration", false); + put("v2.createIncidentZoomMeeting", false); + put("v2.createStatuspageEmailSubscription", false); put("v2.deleteGlobalIncidentHandle", false); put("v2.deleteIncident", false); put("v2.deleteIncidentAttachment", false); + put("v2.deleteIncidentCommunication", false); put("v2.deleteIncidentIntegration", false); + put("v2.deleteIncidentJiraTemplate", false); put("v2.deleteIncidentNotificationRule", false); put("v2.deleteIncidentNotificationTemplate", false); put("v2.deleteIncidentPostmortemTemplate", false); + put("v2.deleteIncidentRoleAssignment", false); + put("v2.deleteIncidentTimelineEntry", false); put("v2.deleteIncidentTodo", false); put("v2.deleteIncidentType", false); put("v2.deleteIncidentUserDefinedField", false); + put("v2.exportIncidents", false); put("v2.getGlobalIncidentSettings", false); put("v2.getIncident", false); + put("v2.getIncidentAutomationData", false); + put("v2.getIncidentCaseSourceLink", false); + put("v2.getIncidentCommunication", false); put("v2.getIncidentIntegration", false); + put("v2.getIncidentJiraTemplate", false); put("v2.getIncidentNotificationRule", false); put("v2.getIncidentNotificationTemplate", false); + put("v2.getIncidentPagerdutyRelatedIncidents", false); + put("v2.getIncidentPageSourceLink", false); put("v2.getIncidentPostmortemTemplate", false); + put("v2.getIncidentReservedRole", false); + put("v2.getIncidentRoleAssignment", false); + put("v2.getIncidentStatusPagesSuggestion", false); + put("v2.getIncidentTimelineEntryThread", false); put("v2.getIncidentTodo", false); put("v2.getIncidentType", false); put("v2.getIncidentUserDefinedField", false); + put("v2.getStatuspageSubscriptionPreferences", false); put("v2.importIncident", false); put("v2.listGlobalIncidentHandles", false); put("v2.listIncidentAttachments", false); + put("v2.listIncidentCommunications", false); put("v2.listIncidentIntegrations", false); + put("v2.listIncidentJiraTemplates", false); put("v2.listIncidentNotificationRules", false); put("v2.listIncidentNotificationTemplates", false); + put("v2.listIncidentPagerdutyServices", false); put("v2.listIncidentPostmortemTemplates", false); + put("v2.listIncidentReservedRoles", false); + put("v2.listIncidentRuleExecutionStates", false); put("v2.listIncidents", false); + put("v2.listIncidentTemplateVariables", false); + put("v2.listIncidentTimelineEntries", false); put("v2.listIncidentTodos", false); put("v2.listIncidentTypes", false); put("v2.listIncidentUserDefinedFields", false); + put("v2.listStatuspageEmailSubscriptions", false); + put("v2.patchIncidentNotificationRule", false); + put("v2.renderIncidentTemplate", false); put("v2.searchIncidents", false); + put("v2.searchIncidentsV2", false); put("v2.updateGlobalIncidentHandle", false); put("v2.updateGlobalIncidentSettings", false); put("v2.updateIncident", false); put("v2.updateIncidentAttachment", false); + put("v2.updateIncidentCommunication", false); put("v2.updateIncidentIntegration", false); + put("v2.updateIncidentJiraTemplate", false); + put("v2.updateIncidentMicrosoftTeamsConfiguration", false); put("v2.updateIncidentNotificationRule", false); put("v2.updateIncidentNotificationTemplate", false); put("v2.updateIncidentPostmortemTemplate", false); + put("v2.updateIncidentStatuspageIncident", false); + put("v2.updateIncidentStatusPageNotice", false); + put("v2.updateIncidentTimelineEntry", false); put("v2.updateIncidentTodo", false); put("v2.updateIncidentType", false); put("v2.updateIncidentUserDefinedField", false); + put("v2.updateIncidentZoomConfiguration", false); + put("v2.upsertIncidentAutomationData", 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..853e65922d2 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,7 +12,17 @@ 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.IncidentAutomationDataRequest; +import com.datadog.api.client.v2.model.IncidentAutomationDataResponse; +import com.datadog.api.client.v2.model.IncidentBatchCreateRuleExecutionStatesRequest; +import com.datadog.api.client.v2.model.IncidentBatchUpdateRuleExecutionStatesRequest; +import com.datadog.api.client.v2.model.IncidentCaseLinkResponse; +import com.datadog.api.client.v2.model.IncidentCommunicationRequest; +import com.datadog.api.client.v2.model.IncidentCommunicationResponse; +import com.datadog.api.client.v2.model.IncidentCommunicationsResponse; import com.datadog.api.client.v2.model.IncidentCreateRequest; +import com.datadog.api.client.v2.model.IncidentCreateZoomMeetingRequest; +import com.datadog.api.client.v2.model.IncidentGoogleMeetIntegrationResponse; import com.datadog.api.client.v2.model.IncidentHandleRequest; import com.datadog.api.client.v2.model.IncidentHandleResponse; import com.datadog.api.client.v2.model.IncidentHandlesResponse; @@ -27,16 +37,51 @@ import com.datadog.api.client.v2.model.IncidentIntegrationMetadataListResponse; import com.datadog.api.client.v2.model.IncidentIntegrationMetadataPatchRequest; import com.datadog.api.client.v2.model.IncidentIntegrationMetadataResponse; +import com.datadog.api.client.v2.model.IncidentJiraIssueIntegrationResponse; +import com.datadog.api.client.v2.model.IncidentJiraIssueRequest; +import com.datadog.api.client.v2.model.IncidentJiraTemplateRequest; +import com.datadog.api.client.v2.model.IncidentJiraTemplateResponse; +import com.datadog.api.client.v2.model.IncidentJiraTemplatesResponse; +import com.datadog.api.client.v2.model.IncidentMSTeamsIntegrationResponse; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationRequest; +import com.datadog.api.client.v2.model.IncidentMicrosoftTeamsConfigurationResponse; import com.datadog.api.client.v2.model.IncidentNotificationRule; 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.IncidentPagerdutyRelatedIncidentsResponse; +import com.datadog.api.client.v2.model.IncidentPagerdutyServicesResponse; import com.datadog.api.client.v2.model.IncidentRelatedObject; +import com.datadog.api.client.v2.model.IncidentRenderTemplateRequest; +import com.datadog.api.client.v2.model.IncidentRenderedTemplateResponse; +import com.datadog.api.client.v2.model.IncidentReservedRoleResponse; +import com.datadog.api.client.v2.model.IncidentReservedRolesResponse; import com.datadog.api.client.v2.model.IncidentResponse; import com.datadog.api.client.v2.model.IncidentResponseData; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentRequest; +import com.datadog.api.client.v2.model.IncidentRoleAssignmentResponse; +import com.datadog.api.client.v2.model.IncidentRuleExecutionStatesResponse; +import com.datadog.api.client.v2.model.IncidentSearchIncidentsExportRequest; +import com.datadog.api.client.v2.model.IncidentSearchIncidentsIncludeType; +import com.datadog.api.client.v2.model.IncidentSearchIncidentsSortOrder; 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.IncidentStatusPageNoticeCreateRequest; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeIntegrationResponse; +import com.datadog.api.client.v2.model.IncidentStatusPageNoticeUpdateRequest; +import com.datadog.api.client.v2.model.IncidentStatusPagesSuggestionResponse; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageIncidentResponse; +import com.datadog.api.client.v2.model.IncidentStatuspagePreferencesResponse; +import com.datadog.api.client.v2.model.IncidentStatuspageSubscriptionRequest; +import com.datadog.api.client.v2.model.IncidentStatuspageSubscriptionResponse; +import com.datadog.api.client.v2.model.IncidentStatuspageSubscriptionsResponse; +import com.datadog.api.client.v2.model.IncidentTemplateVariablesResponse; +import com.datadog.api.client.v2.model.IncidentTimelineEntriesResponse; +import com.datadog.api.client.v2.model.IncidentTimelineEntryRequest; +import com.datadog.api.client.v2.model.IncidentTimelineEntryResponse; +import com.datadog.api.client.v2.model.IncidentTimelineThreadResponse; 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 +95,9 @@ 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.IncidentZoomConfigurationRequest; +import com.datadog.api.client.v2.model.IncidentZoomConfigurationResponse; +import com.datadog.api.client.v2.model.IncidentZoomIntegrationResponse; import com.datadog.api.client.v2.model.IncidentsResponse; import com.datadog.api.client.v2.model.PatchAttachmentRequest; import com.datadog.api.client.v2.model.PatchIncidentNotificationTemplateRequest; @@ -60,6 +108,7 @@ import com.datadog.api.client.v2.model.PutIncidentNotificationRuleRequest; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; +import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; @@ -99,85 +148,34 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to createGlobalIncidentHandle. */ - public static class CreateGlobalIncidentHandleOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Comma-separated list of related resources to include in the response - * (optional) - * @return CreateGlobalIncidentHandleOptionalParameters - */ - public CreateGlobalIncidentHandleOptionalParameters include(String include) { - this.include = include; - return this; - } - } - - /** - * Create global incident handle. - * - *

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

See {@link #createGlobalIncidentHandleWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<IncidentHandleResponse> - */ - public CompletableFuture createGlobalIncidentHandleAsync( - IncidentHandleRequest body) { - return createGlobalIncidentHandleWithHttpInfoAsync( - body, new CreateGlobalIncidentHandleOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - /** - * Create global incident handle. + * Batch create incident rule execution states. * - *

See {@link #createGlobalIncidentHandleWithHttpInfo}. + *

See {@link #batchCreateIncidentRuleExecutionStatesWithHttpInfo}. * + * @param incidentId The UUID of the incident. (required) * @param body (required) - * @param parameters Optional parameters for the request. - * @return IncidentHandleResponse + * @return IncidentRuleExecutionStatesResponse * @throws ApiException if fails to make API call */ - public IncidentHandleResponse createGlobalIncidentHandle( - IncidentHandleRequest body, CreateGlobalIncidentHandleOptionalParameters parameters) - throws ApiException { - return createGlobalIncidentHandleWithHttpInfo(body, parameters).getData(); + public IncidentRuleExecutionStatesResponse batchCreateIncidentRuleExecutionStates( + String incidentId, IncidentBatchCreateRuleExecutionStatesRequest body) throws ApiException { + return batchCreateIncidentRuleExecutionStatesWithHttpInfo(incidentId, body).getData(); } /** - * Create global incident handle. + * Batch create incident rule execution states. * - *

See {@link #createGlobalIncidentHandleWithHttpInfoAsync}. + *

See {@link #batchCreateIncidentRuleExecutionStatesWithHttpInfoAsync}. * + * @param incidentId The UUID of the incident. (required) * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentHandleResponse> + * @return CompletableFuture<IncidentRuleExecutionStatesResponse> */ - public CompletableFuture createGlobalIncidentHandleAsync( - IncidentHandleRequest body, CreateGlobalIncidentHandleOptionalParameters parameters) { - return createGlobalIncidentHandleWithHttpInfoAsync(body, parameters) + public CompletableFuture + batchCreateIncidentRuleExecutionStatesAsync( + String incidentId, IncidentBatchCreateRuleExecutionStatesRequest body) { + return batchCreateIncidentRuleExecutionStatesWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -185,11 +183,11 @@ public CompletableFuture createGlobalIncidentHandleAsync } /** - * Create a new global incident handle. + * Batch create rule execution states for a given incident. * + * @param incidentId The UUID of the incident. (required) * @param body (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentHandleResponse> + * @return ApiResponse<IncidentRuleExecutionStatesResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -197,14 +195,18 @@ public CompletableFuture createGlobalIncidentHandleAsync * * * + * + * + * * *
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse createGlobalIncidentHandleWithHttpInfo( - IncidentHandleRequest body, CreateGlobalIncidentHandleOptionalParameters parameters) - throws ApiException { + public ApiResponse + batchCreateIncidentRuleExecutionStatesWithHttpInfo( + String incidentId, IncidentBatchCreateRuleExecutionStatesRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "createGlobalIncidentHandle"; + String operationId = "batchCreateIncidentRuleExecutionStates"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -212,29 +214,38 @@ public ApiResponse createGlobalIncidentHandleWithHttpInf } Object localVarPostBody = body; + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling" + + " batchCreateIncidentRuleExecutionStates"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createGlobalIncidentHandle"); + 400, + "Missing the required parameter 'body' when calling" + + " batchCreateIncidentRuleExecutionStates"); } - String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/{incident_id}/rule-execution-states/batch" + .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.createGlobalIncidentHandle", + "v2.IncidentsApi.batchCreateIncidentRuleExecutionStates", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "POST", builder, @@ -243,64 +254,79 @@ public ApiResponse createGlobalIncidentHandleWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create global incident handle. + * Batch create incident rule execution states. * - *

See {@link #createGlobalIncidentHandleWithHttpInfo}. + *

See {@link #batchCreateIncidentRuleExecutionStatesWithHttpInfo}. * + * @param incidentId The UUID of the incident. (required) * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentHandleResponse>> + * @return CompletableFuture<ApiResponse<IncidentRuleExecutionStatesResponse>> */ - public CompletableFuture> - createGlobalIncidentHandleWithHttpInfoAsync( - IncidentHandleRequest body, CreateGlobalIncidentHandleOptionalParameters parameters) { + public CompletableFuture> + batchCreateIncidentRuleExecutionStatesWithHttpInfoAsync( + String incidentId, IncidentBatchCreateRuleExecutionStatesRequest body) { // Check if unstable operation is enabled - String operationId = "createGlobalIncidentHandle"; + String operationId = "batchCreateIncidentRuleExecutionStates"; 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" + + " batchCreateIncidentRuleExecutionStates")); + 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 createGlobalIncidentHandle")); + "Missing the required parameter 'body' when calling" + + " batchCreateIncidentRuleExecutionStates")); 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/{incident_id}/rule-execution-states/batch" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createGlobalIncidentHandle", + "v2.IncidentsApi.batchCreateIncidentRuleExecutionStates", 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; } @@ -312,32 +338,37 @@ public ApiResponse createGlobalIncidentHandleWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident. + * Batch update incident rule execution states. * - *

See {@link #createIncidentWithHttpInfo}. + *

See {@link #batchUpdateIncidentRuleExecutionStatesWithHttpInfo}. * - * @param body Incident payload. (required) - * @return IncidentResponse + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return IncidentRuleExecutionStatesResponse * @throws ApiException if fails to make API call */ - public IncidentResponse createIncident(IncidentCreateRequest body) throws ApiException { - return createIncidentWithHttpInfo(body).getData(); + public IncidentRuleExecutionStatesResponse batchUpdateIncidentRuleExecutionStates( + String incidentId, IncidentBatchUpdateRuleExecutionStatesRequest body) throws ApiException { + return batchUpdateIncidentRuleExecutionStatesWithHttpInfo(incidentId, body).getData(); } /** - * Create an incident. + * Batch update incident rule execution states. * - *

See {@link #createIncidentWithHttpInfoAsync}. + *

See {@link #batchUpdateIncidentRuleExecutionStatesWithHttpInfoAsync}. * - * @param body Incident payload. (required) - * @return CompletableFuture<IncidentResponse> + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return CompletableFuture<IncidentRuleExecutionStatesResponse> */ - public CompletableFuture createIncidentAsync(IncidentCreateRequest body) { - return createIncidentWithHttpInfoAsync(body) + public CompletableFuture + batchUpdateIncidentRuleExecutionStatesAsync( + String incidentId, IncidentBatchUpdateRuleExecutionStatesRequest body) { + return batchUpdateIncidentRuleExecutionStatesWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -345,16 +376,17 @@ public CompletableFuture createIncidentAsync(IncidentCreateReq } /** - * Create an incident. + * Batch update rule execution states for a given incident. * - * @param body Incident payload. (required) - * @return ApiResponse<IncidentResponse> + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return ApiResponse<IncidentRuleExecutionStatesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -362,10 +394,12 @@ public CompletableFuture createIncidentAsync(IncidentCreateReq * *
Response details
Status Code Description Response Headers
201 CREATED -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse createIncidentWithHttpInfo(IncidentCreateRequest body) - throws ApiException { + public ApiResponse + batchUpdateIncidentRuleExecutionStatesWithHttpInfo( + String incidentId, IncidentBatchUpdateRuleExecutionStatesRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncident"; + String operationId = "batchUpdateIncidentRuleExecutionStates"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -373,19 +407,32 @@ public ApiResponse createIncidentWithHttpInfo(IncidentCreateRe } Object localVarPostBody = body; + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling" + + " batchUpdateIncidentRuleExecutionStates"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncident"); + 400, + "Missing the required parameter 'body' when calling" + + " batchUpdateIncidentRuleExecutionStates"); } // create path and map variables - String localVarPath = "/api/v2/incidents"; + String localVarPath = + "/api/v2/incidents/{incident_id}/rule-execution-states/batch" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncident", + "v2.IncidentsApi.batchUpdateIncidentRuleExecutionStates", localVarPath, new ArrayList(), localVarHeaderParams, @@ -393,48 +440,69 @@ public ApiResponse createIncidentWithHttpInfo(IncidentCreateRe new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "POST", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident. + * Batch update incident rule execution states. * - *

See {@link #createIncidentWithHttpInfo}. + *

See {@link #batchUpdateIncidentRuleExecutionStatesWithHttpInfo}. * - * @param body Incident payload. (required) - * @return CompletableFuture<ApiResponse<IncidentResponse>> + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentRuleExecutionStatesResponse>> */ - public CompletableFuture> createIncidentWithHttpInfoAsync( - IncidentCreateRequest body) { + public CompletableFuture> + batchUpdateIncidentRuleExecutionStatesWithHttpInfoAsync( + String incidentId, IncidentBatchUpdateRuleExecutionStatesRequest body) { // Check if unstable operation is enabled - String operationId = "createIncident"; + String operationId = "batchUpdateIncidentRuleExecutionStates"; 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" + + " batchUpdateIncidentRuleExecutionStates")); + 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 createIncident")); + 400, + "Missing the required parameter 'body' when calling" + + " batchUpdateIncidentRuleExecutionStates")); return result; } // create path and map variables - String localVarPath = "/api/v2/incidents"; + String localVarPath = + "/api/v2/incidents/{incident_id}/rule-execution-states/batch" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -442,7 +510,7 @@ public CompletableFuture> createIncidentWithHttpIn try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncident", + "v2.IncidentsApi.batchUpdateIncidentRuleExecutionStates", localVarPath, new ArrayList(), localVarHeaderParams, @@ -450,68 +518,67 @@ public CompletableFuture> createIncidentWithHttpIn 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( - "POST", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to createIncidentAttachment. */ - public static class CreateIncidentAttachmentOptionalParameters { + /** Manage optional parameters to createGlobalIncidentHandle. */ + public static class CreateGlobalIncidentHandleOptionalParameters { private String include; /** * Set include. * - * @param include Resource to include in the response. Supported value: - * last_modified_by_user. (optional) - * @return CreateIncidentAttachmentOptionalParameters + * @param include Comma-separated list of related resources to include in the response + * (optional) + * @return CreateGlobalIncidentHandleOptionalParameters */ - public CreateIncidentAttachmentOptionalParameters include(String include) { + public CreateGlobalIncidentHandleOptionalParameters include(String include) { this.include = include; return this; } } /** - * Create incident attachment. + * Create global incident handle. * - *

See {@link #createIncidentAttachmentWithHttpInfo}. + *

See {@link #createGlobalIncidentHandleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) * @param body (required) - * @return Attachment + * @return IncidentHandleResponse * @throws ApiException if fails to make API call */ - public Attachment createIncidentAttachment(String incidentId, CreateAttachmentRequest body) + public IncidentHandleResponse createGlobalIncidentHandle(IncidentHandleRequest body) throws ApiException { - return createIncidentAttachmentWithHttpInfo( - incidentId, body, new CreateIncidentAttachmentOptionalParameters()) + return createGlobalIncidentHandleWithHttpInfo( + body, new CreateGlobalIncidentHandleOptionalParameters()) .getData(); } /** - * Create incident attachment. + * Create global incident handle. * - *

See {@link #createIncidentAttachmentWithHttpInfoAsync}. + *

See {@link #createGlobalIncidentHandleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) * @param body (required) - * @return CompletableFuture<Attachment> + * @return CompletableFuture<IncidentHandleResponse> */ - public CompletableFuture createIncidentAttachmentAsync( - String incidentId, CreateAttachmentRequest body) { - return createIncidentAttachmentWithHttpInfoAsync( - incidentId, body, new CreateIncidentAttachmentOptionalParameters()) + public CompletableFuture createGlobalIncidentHandleAsync( + IncidentHandleRequest body) { + return createGlobalIncidentHandleWithHttpInfoAsync( + body, new CreateGlobalIncidentHandleOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -519,39 +586,33 @@ incidentId, body, new CreateIncidentAttachmentOptionalParameters()) } /** - * Create incident attachment. + * Create global incident handle. * - *

See {@link #createIncidentAttachmentWithHttpInfo}. + *

See {@link #createGlobalIncidentHandleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return Attachment + * @return IncidentHandleResponse * @throws ApiException if fails to make API call */ - public Attachment createIncidentAttachment( - String incidentId, - CreateAttachmentRequest body, - CreateIncidentAttachmentOptionalParameters parameters) + public IncidentHandleResponse createGlobalIncidentHandle( + IncidentHandleRequest body, CreateGlobalIncidentHandleOptionalParameters parameters) throws ApiException { - return createIncidentAttachmentWithHttpInfo(incidentId, body, parameters).getData(); + return createGlobalIncidentHandleWithHttpInfo(body, parameters).getData(); } /** - * Create incident attachment. + * Create global incident handle. * - *

See {@link #createIncidentAttachmentWithHttpInfoAsync}. + *

See {@link #createGlobalIncidentHandleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<Attachment> + * @return CompletableFuture<IncidentHandleResponse> */ - public CompletableFuture createIncidentAttachmentAsync( - String incidentId, - CreateAttachmentRequest body, - CreateIncidentAttachmentOptionalParameters parameters) { - return createIncidentAttachmentWithHttpInfoAsync(incidentId, body, parameters) + public CompletableFuture createGlobalIncidentHandleAsync( + IncidentHandleRequest body, CreateGlobalIncidentHandleOptionalParameters parameters) { + return createGlobalIncidentHandleWithHttpInfoAsync(body, parameters) .thenApply( response -> { return response.getData(); @@ -559,12 +620,11 @@ public CompletableFuture createIncidentAttachmentAsync( } /** - * Create an incident attachment. + * Create a new global incident handle. * - * @param incidentId The UUID of the incident. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<Attachment> + * @return ApiResponse<IncidentHandleResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -572,17 +632,14 @@ public CompletableFuture createIncidentAttachmentAsync( * * * - * * *
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse createIncidentAttachmentWithHttpInfo( - String incidentId, - CreateAttachmentRequest body, - CreateIncidentAttachmentOptionalParameters parameters) + public ApiResponse createGlobalIncidentHandleWithHttpInfo( + IncidentHandleRequest body, CreateGlobalIncidentHandleOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentAttachment"; + String operationId = "createGlobalIncidentHandle"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -590,23 +647,14 @@ public ApiResponse createIncidentAttachmentWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling createIncidentAttachment"); - } - // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentAttachment"); + 400, "Missing the required parameter 'body' when calling createGlobalIncidentHandle"); } String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/config/global/incident-handles"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -615,13 +663,13 @@ public ApiResponse createIncidentAttachmentWithHttpInfo( Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentAttachment", + "v2.IncidentsApi.createGlobalIncidentHandle", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( "POST", builder, @@ -630,59 +678,45 @@ public ApiResponse createIncidentAttachmentWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create incident attachment. + * Create global incident handle. * - *

See {@link #createIncidentAttachmentWithHttpInfo}. + *

See {@link #createGlobalIncidentHandleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<Attachment>> + * @return CompletableFuture<ApiResponse<IncidentHandleResponse>> */ - public CompletableFuture> createIncidentAttachmentWithHttpInfoAsync( - String incidentId, - CreateAttachmentRequest body, - CreateIncidentAttachmentOptionalParameters parameters) { + public CompletableFuture> + createGlobalIncidentHandleWithHttpInfoAsync( + IncidentHandleRequest body, CreateGlobalIncidentHandleOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "createIncidentAttachment"; + String operationId = "createGlobalIncidentHandle"; 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 createIncidentAttachment")); - 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 createIncidentAttachment")); + 400, + "Missing the required parameter 'body' when calling createGlobalIncidentHandle")); return result; } String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/config/global/incident-handles"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -693,15 +727,15 @@ public CompletableFuture> createIncidentAttachmentWithHt try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentAttachment", + "v2.IncidentsApi.createGlobalIncidentHandle", localVarPath, localVarQueryParams, 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; } @@ -713,97 +747,32 @@ public CompletableFuture> createIncidentAttachmentWithHt localVarPostBody, new HashMap(), false, - 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(); - }); + new GenericType() {}); } /** - * Create an incident impact. + * Create an incident. * - *

See {@link #createIncidentImpactWithHttpInfo}. + *

See {@link #createIncidentWithHttpInfo}. * - * @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 payload. (required) + * @return IncidentResponse * @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 IncidentResponse createIncident(IncidentCreateRequest body) throws ApiException { + return createIncidentWithHttpInfo(body).getData(); } /** - * Create an incident impact. + * Create an incident. * - *

See {@link #createIncidentImpactWithHttpInfoAsync}. + *

See {@link #createIncidentWithHttpInfoAsync}. * - * @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 payload. (required) + * @return CompletableFuture<IncidentResponse> */ - public CompletableFuture createIncidentImpactAsync( - String incidentId, - IncidentImpactCreateRequest body, - CreateIncidentImpactOptionalParameters parameters) { - return createIncidentImpactWithHttpInfoAsync(incidentId, body, parameters) + public CompletableFuture createIncidentAsync(IncidentCreateRequest body) { + return createIncidentWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -811,12 +780,10 @@ public CompletableFuture createIncidentImpactAsync( } /** - * Create an impact for an incident. + * Create 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 payload. (required) + * @return ApiResponse<IncidentResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -830,41 +797,32 @@ public CompletableFuture createIncidentImpactAsync( * *
429 Too many requests -
*/ - public ApiResponse createIncidentImpactWithHttpInfo( - String incidentId, - IncidentImpactCreateRequest body, - CreateIncidentImpactOptionalParameters parameters) + public ApiResponse createIncidentWithHttpInfo(IncidentCreateRequest body) 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"); + // Check if unstable operation is enabled + String operationId = "createIncident"; + 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 createIncidentImpact"); + 400, "Missing the required parameter 'body' when calling createIncident"); } - List include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/impacts" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents"; - 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.createIncident", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -877,69 +835,57 @@ public ApiResponse createIncidentImpactWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident impact. + * Create an incident. * - *

See {@link #createIncidentImpactWithHttpInfo}. + *

See {@link #createIncidentWithHttpInfo}. * - * @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> - createIncidentImpactWithHttpInfoAsync( - String incidentId, - IncidentImpactCreateRequest body, - CreateIncidentImpactOptionalParameters parameters) { - Object localVarPostBody = body; - - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + * @param body Incident payload. (required) + * @return CompletableFuture<ApiResponse<IncidentResponse>> + */ + public CompletableFuture> createIncidentWithHttpInfoAsync( + IncidentCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createIncident"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling createIncidentImpact")); + 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<>(); + 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 createIncident")); 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())); + String localVarPath = "/api/v2/incidents"; - 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.createIncident", 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 +897,56 @@ public ApiResponse createIncidentImpactWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to createIncidentAttachment. */ + public static class CreateIncidentAttachmentOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Resource to include in the response. Supported value: + * last_modified_by_user. (optional) + * @return CreateIncidentAttachmentOptionalParameters + */ + public CreateIncidentAttachmentOptionalParameters include(String include) { + this.include = include; + return this; + } } /** - * Create an incident integration metadata. + * Create incident attachment. * - *

See {@link #createIncidentIntegrationWithHttpInfo}. + *

See {@link #createIncidentAttachmentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident integration metadata payload. (required) - * @return IncidentIntegrationMetadataResponse + * @param body (required) + * @return Attachment * @throws ApiException if fails to make API call */ - public IncidentIntegrationMetadataResponse createIncidentIntegration( - String incidentId, IncidentIntegrationMetadataCreateRequest body) throws ApiException { - return createIncidentIntegrationWithHttpInfo(incidentId, body).getData(); + public Attachment createIncidentAttachment(String incidentId, CreateAttachmentRequest body) + throws ApiException { + return createIncidentAttachmentWithHttpInfo( + incidentId, body, new CreateIncidentAttachmentOptionalParameters()) + .getData(); } /** - * Create an incident integration metadata. + * Create incident attachment. * - *

See {@link #createIncidentIntegrationWithHttpInfoAsync}. + *

See {@link #createIncidentAttachmentWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident integration metadata payload. (required) - * @return CompletableFuture<IncidentIntegrationMetadataResponse> + * @param body (required) + * @return CompletableFuture<Attachment> */ - public CompletableFuture createIncidentIntegrationAsync( - String incidentId, IncidentIntegrationMetadataCreateRequest body) { - return createIncidentIntegrationWithHttpInfoAsync(incidentId, body) + public CompletableFuture createIncidentAttachmentAsync( + String incidentId, CreateAttachmentRequest body) { + return createIncidentAttachmentWithHttpInfoAsync( + incidentId, body, new CreateIncidentAttachmentOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -988,28 +954,70 @@ public CompletableFuture createIncidentInte } /** - * Create an incident integration metadata. + * Create incident attachment. + * + *

See {@link #createIncidentAttachmentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident integration metadata payload. (required) - * @return ApiResponse<IncidentIntegrationMetadataResponse> + * @param body (required) + * @param parameters Optional parameters for the request. + * @return Attachment + * @throws ApiException if fails to make API call + */ + public Attachment createIncidentAttachment( + String incidentId, + CreateAttachmentRequest body, + CreateIncidentAttachmentOptionalParameters parameters) + throws ApiException { + return createIncidentAttachmentWithHttpInfo(incidentId, body, parameters).getData(); + } + + /** + * Create incident attachment. + * + *

See {@link #createIncidentAttachmentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<Attachment> + */ + public CompletableFuture createIncidentAttachmentAsync( + String incidentId, + CreateAttachmentRequest body, + CreateIncidentAttachmentOptionalParameters parameters) { + return createIncidentAttachmentWithHttpInfoAsync(incidentId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an incident attachment. + * + * @param incidentId The UUID of the incident. (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
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 createIncidentAttachmentWithHttpInfo( + String incidentId, + CreateAttachmentRequest body, + CreateIncidentAttachmentOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentIntegration"; + String operationId = "createIncidentAttachment"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1020,28 +1028,31 @@ public ApiResponse createIncidentIntegratio // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling createIncidentIntegration"); + 400, "Missing the required parameter 'incidentId' when calling createIncidentAttachment"); } // 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 createIncidentAttachment"); } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations" + "/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("", "include", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentIntegration", + "v2.IncidentsApi.createIncidentAttachment", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -1054,28 +1065,29 @@ public ApiResponse createIncidentIntegratio localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident integration metadata. + * Create incident attachment. * - *

See {@link #createIncidentIntegrationWithHttpInfo}. + *

See {@link #createIncidentAttachmentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident integration metadata payload. (required) - * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Attachment>> */ - public CompletableFuture> - createIncidentIntegrationWithHttpInfoAsync( - String incidentId, IncidentIntegrationMetadataCreateRequest body) { + public CompletableFuture> createIncidentAttachmentWithHttpInfoAsync( + String incidentId, + CreateAttachmentRequest body, + CreateIncidentAttachmentOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "createIncidentIntegration"; + String operationId = "createIncidentAttachment"; 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; @@ -1084,47 +1096,47 @@ public ApiResponse createIncidentIntegratio // 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" - + " createIncidentIntegration")); + "Missing the required parameter 'incidentId' when calling createIncidentAttachment")); 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 createIncidentIntegration")); + 400, "Missing the required parameter 'body' when calling createIncidentAttachment")); return result; } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations" + "/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("", "include", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentIntegration", + "v2.IncidentsApi.createIncidentAttachment", 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; } @@ -1136,34 +1148,36 @@ public ApiResponse createIncidentIntegratio localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident notification rule. + * Create an incident communication. * - *

See {@link #createIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createIncidentCommunicationWithHttpInfo}. * + * @param incidentId The UUID of the incident. (required) * @param body (required) - * @return IncidentNotificationRule + * @return IncidentCommunicationResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationRule createIncidentNotificationRule( - CreateIncidentNotificationRuleRequest body) throws ApiException { - return createIncidentNotificationRuleWithHttpInfo(body).getData(); + public IncidentCommunicationResponse createIncidentCommunication( + String incidentId, IncidentCommunicationRequest body) throws ApiException { + return createIncidentCommunicationWithHttpInfo(incidentId, body).getData(); } /** - * Create an incident notification rule. + * Create an incident communication. * - *

See {@link #createIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #createIncidentCommunicationWithHttpInfoAsync}. * + * @param incidentId The UUID of the incident. (required) * @param body (required) - * @return CompletableFuture<IncidentNotificationRule> + * @return CompletableFuture<IncidentCommunicationResponse> */ - public CompletableFuture createIncidentNotificationRuleAsync( - CreateIncidentNotificationRuleRequest body) { - return createIncidentNotificationRuleWithHttpInfoAsync(body) + public CompletableFuture createIncidentCommunicationAsync( + String incidentId, IncidentCommunicationRequest body) { + return createIncidentCommunicationWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -1171,10 +1185,11 @@ public CompletableFuture createIncidentNotificationRul } /** - * Creates a new notification rule. + * Create a new communication for a given incident. * + * @param incidentId The UUID of the incident. (required) * @param body (required) - * @return ApiResponse<IncidentNotificationRule> + * @return ApiResponse<IncidentCommunicationResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1188,10 +1203,10 @@ public CompletableFuture createIncidentNotificationRul * *
429 Too many requests -
*/ - public ApiResponse createIncidentNotificationRuleWithHttpInfo( - CreateIncidentNotificationRuleRequest body) throws ApiException { + public ApiResponse createIncidentCommunicationWithHttpInfo( + String incidentId, IncidentCommunicationRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentNotificationRule"; + String operationId = "createIncidentCommunication"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1199,19 +1214,29 @@ public ApiResponse createIncidentNotificationRuleWithH } Object localVarPostBody = body; + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling createIncidentCommunication"); + } + // 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 createIncidentCommunication"); } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-rules"; + String localVarPath = + "/api/v2/incidents/{incident_id}/communications" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentNotificationRule", + "v2.IncidentsApi.createIncidentCommunication", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1226,42 +1251,61 @@ public ApiResponse createIncidentNotificationRuleWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident notification rule. + * Create an incident communication. * - *

See {@link #createIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createIncidentCommunicationWithHttpInfo}. * + * @param incidentId The UUID of the incident. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> + * @return CompletableFuture<ApiResponse<IncidentCommunicationResponse>> */ - public CompletableFuture> - createIncidentNotificationRuleWithHttpInfoAsync(CreateIncidentNotificationRuleRequest body) { + public CompletableFuture> + createIncidentCommunicationWithHttpInfoAsync( + String incidentId, IncidentCommunicationRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentNotificationRule"; + String operationId = "createIncidentCommunication"; 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" + + " createIncidentCommunication")); + 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 createIncidentNotificationRule")); + "Missing the required parameter 'body' when calling createIncidentCommunication")); return result; } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-rules"; + String localVarPath = + "/api/v2/incidents/{incident_id}/communications" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1269,7 +1313,7 @@ public ApiResponse createIncidentNotificationRuleWithH try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentNotificationRule", + "v2.IncidentsApi.createIncidentCommunication", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1277,7 +1321,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 +1334,34 @@ public ApiResponse createIncidentNotificationRuleWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create incident notification template. + * Create an incident Google Meet space. * - *

See {@link #createIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #createIncidentGoogleMeetSpaceWithHttpInfo}. * - * @param body (required) - * @return IncidentNotificationTemplate + * @param incidentId The UUID of the incident. (required) + * @return IncidentGoogleMeetIntegrationResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationTemplate createIncidentNotificationTemplate( - CreateIncidentNotificationTemplateRequest body) throws ApiException { - return createIncidentNotificationTemplateWithHttpInfo(body).getData(); + public IncidentGoogleMeetIntegrationResponse createIncidentGoogleMeetSpace(String incidentId) + throws ApiException { + return createIncidentGoogleMeetSpaceWithHttpInfo(incidentId).getData(); } /** - * Create incident notification template. + * Create an incident Google Meet space. * - *

See {@link #createIncidentNotificationTemplateWithHttpInfoAsync}. + *

See {@link #createIncidentGoogleMeetSpaceWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<IncidentNotificationTemplate> + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentGoogleMeetIntegrationResponse> */ - public CompletableFuture createIncidentNotificationTemplateAsync( - CreateIncidentNotificationTemplateRequest body) { - return createIncidentNotificationTemplateWithHttpInfoAsync(body) + public CompletableFuture + createIncidentGoogleMeetSpaceAsync(String incidentId) { + return createIncidentGoogleMeetSpaceWithHttpInfoAsync(incidentId) .thenApply( response -> { return response.getData(); @@ -1324,10 +1369,10 @@ public CompletableFuture createIncidentNotificatio } /** - * Creates a new notification template. + * Create a Google Meet space for a given incident. * - * @param body (required) - * @return ApiResponse<IncidentNotificationTemplate> + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentGoogleMeetIntegrationResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1341,31 +1386,34 @@ public CompletableFuture createIncidentNotificatio * *
429 Too many requests -
*/ - public ApiResponse createIncidentNotificationTemplateWithHttpInfo( - CreateIncidentNotificationTemplateRequest body) throws ApiException { + public ApiResponse + createIncidentGoogleMeetSpaceWithHttpInfo(String incidentId) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentNotificationTemplate"; + String operationId = "createIncidentGoogleMeetSpace"; 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 'incidentId' is set + if (incidentId == null) { throw new ApiException( 400, - "Missing the required parameter 'body' when calling createIncidentNotificationTemplate"); + "Missing the required parameter 'incidentId' when calling createIncidentGoogleMeetSpace"); } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}/google-meet/space" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentNotificationTemplate", + "v2.IncidentsApi.createIncidentGoogleMeetSpace", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1376,50 +1424,52 @@ public ApiResponse createIncidentNotificationTempl "POST", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create incident notification template. + * Create an incident Google Meet space. * - *

See {@link #createIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #createIncidentGoogleMeetSpaceWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentGoogleMeetIntegrationResponse>> */ - public CompletableFuture> - createIncidentNotificationTemplateWithHttpInfoAsync( - CreateIncidentNotificationTemplateRequest body) { + public CompletableFuture> + createIncidentGoogleMeetSpaceWithHttpInfoAsync(String incidentId) { // Check if unstable operation is enabled - String operationId = "createIncidentNotificationTemplate"; + String operationId = "createIncidentGoogleMeetSpace"; 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; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == 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 'body' when calling" - + " createIncidentNotificationTemplate")); + "Missing the required parameter 'incidentId' when calling" + + " createIncidentGoogleMeetSpace")); return result; } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}/google-meet/space" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1427,7 +1477,7 @@ public ApiResponse createIncidentNotificationTempl try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentNotificationTemplate", + "v2.IncidentsApi.createIncidentGoogleMeetSpace", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1435,7 +1485,7 @@ public ApiResponse createIncidentNotificationTempl new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -1444,40 +1494,61 @@ public ApiResponse createIncidentNotificationTempl "POST", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, 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 postmortem attachment. + * Create an incident impact. * - *

See {@link #createIncidentPostmortemAttachmentWithHttpInfo}. + *

See {@link #createIncidentImpactWithHttpInfo}. * - * @param incidentId The ID of the incident (required) - * @param body (required) - * @return Attachment + * @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 Attachment createIncidentPostmortemAttachment( - String incidentId, PostmortemAttachmentRequest body) throws ApiException { - return createIncidentPostmortemAttachmentWithHttpInfo(incidentId, body).getData(); + public IncidentImpactResponse createIncidentImpact( + String incidentId, IncidentImpactCreateRequest body) throws ApiException { + return createIncidentImpactWithHttpInfo( + incidentId, body, new CreateIncidentImpactOptionalParameters()) + .getData(); } /** - * Create postmortem attachment. + * Create an incident impact. * - *

See {@link #createIncidentPostmortemAttachmentWithHttpInfoAsync}. + *

See {@link #createIncidentImpactWithHttpInfoAsync}. * - * @param incidentId The ID of the incident (required) - * @param body (required) - * @return CompletableFuture<Attachment> + * @param incidentId The UUID of the incident. (required) + * @param body Incident impact payload. (required) + * @return CompletableFuture<IncidentImpactResponse> */ - public CompletableFuture createIncidentPostmortemAttachmentAsync( - String incidentId, PostmortemAttachmentRequest body) { - return createIncidentPostmortemAttachmentWithHttpInfoAsync(incidentId, body) + public CompletableFuture createIncidentImpactAsync( + String incidentId, IncidentImpactCreateRequest body) { + return createIncidentImpactWithHttpInfoAsync( + incidentId, body, new CreateIncidentImpactOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -1485,67 +1556,104 @@ public CompletableFuture createIncidentPostmortemAttachmentAsync( } /** - * Create a postmortem attachment for an incident. + * Create an incident impact. * - *

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. + *

See {@link #createIncidentImpactWithHttpInfo}. * - * @param incidentId The ID of the incident (required) - * @param body (required) - * @return ApiResponse<Attachment> + * @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 * * * - * + * * + * + * + * * *
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 createIncidentPostmortemAttachmentWithHttpInfo( - String incidentId, PostmortemAttachmentRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "createIncidentPostmortemAttachment"; - 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" - + " createIncidentPostmortemAttachment"); + 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 createIncidentPostmortemAttachment"); + 400, "Missing the required parameter 'body' when calling createIncidentImpact"); } + List include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/attachments/postmortems" + "/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.createIncidentPostmortemAttachment", + "v2.IncidentsApi.createIncidentImpact", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "POST", builder, @@ -1554,75 +1662,69 @@ public ApiResponse createIncidentPostmortemAttachmentWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create postmortem attachment. + * Create an incident impact. * - *

See {@link #createIncidentPostmortemAttachmentWithHttpInfo}. + *

See {@link #createIncidentImpactWithHttpInfo}. * - * @param incidentId The ID of the incident (required) - * @param body (required) - * @return CompletableFuture<ApiResponse<Attachment>> + * @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> - createIncidentPostmortemAttachmentWithHttpInfoAsync( - String incidentId, PostmortemAttachmentRequest body) { - // Check if unstable operation is enabled - String operationId = "createIncidentPostmortemAttachment"; - 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; - } + 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<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentId' when calling" - + " createIncidentPostmortemAttachment")); + "Missing the required parameter 'incidentId' when calling createIncidentImpact")); 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 createIncidentImpact")); return result; } + List include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/attachments/postmortems" + "/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.createIncidentPostmortemAttachment", + "v2.IncidentsApi.createIncidentImpact", 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; } @@ -1634,34 +1736,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 +1773,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 +1802,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 +1839,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 +1900,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 +1921,36 @@ public ApiResponse createIncidentPostmortemTemplateW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident todo. + * Create an incident Jira issue. * - *

See {@link #createIncidentTodoWithHttpInfo}. + *

See {@link #createIncidentJiraIssueWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident todo payload. (required) - * @return IncidentTodoResponse + * @param body (required) + * @return IncidentJiraIssueIntegrationResponse * @throws ApiException if fails to make API call */ - public IncidentTodoResponse createIncidentTodo(String incidentId, IncidentTodoCreateRequest body) - throws ApiException { - return createIncidentTodoWithHttpInfo(incidentId, body).getData(); + public IncidentJiraIssueIntegrationResponse createIncidentJiraIssue( + String incidentId, IncidentJiraIssueRequest body) throws ApiException { + return createIncidentJiraIssueWithHttpInfo(incidentId, body).getData(); } /** - * Create an incident todo. + * Create an incident Jira issue. * - *

See {@link #createIncidentTodoWithHttpInfoAsync}. + *

See {@link #createIncidentJiraIssueWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident todo payload. (required) - * @return CompletableFuture<IncidentTodoResponse> + * @param body (required) + * @return CompletableFuture<IncidentJiraIssueIntegrationResponse> */ - public CompletableFuture createIncidentTodoAsync( - String incidentId, IncidentTodoCreateRequest body) { - return createIncidentTodoWithHttpInfoAsync(incidentId, body) + public CompletableFuture createIncidentJiraIssueAsync( + String incidentId, IncidentJiraIssueRequest body) { + return createIncidentJiraIssueWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -1824,17 +1958,17 @@ public CompletableFuture createIncidentTodoAsync( } /** - * Create an incident todo. + * Create a Jira issue linked to a given incident. * * @param incidentId The UUID of the incident. (required) - * @param body Incident todo payload. (required) - * @return ApiResponse<IncidentTodoResponse> + * @param body (required) + * @return ApiResponse<IncidentJiraIssueIntegrationResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -1842,10 +1976,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 createIncidentJiraIssueWithHttpInfo( + String incidentId, IncidentJiraIssueRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentTodo"; + String operationId = "createIncidentJiraIssue"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1856,17 +1990,17 @@ public ApiResponse createIncidentTodoWithHttpInfo( // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling createIncidentTodo"); + 400, "Missing the required parameter 'incidentId' when calling createIncidentJiraIssue"); } // 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 createIncidentJiraIssue"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos" + "/api/v2/incidents/{incident_id}/jira-issues" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); @@ -1874,7 +2008,7 @@ public ApiResponse createIncidentTodoWithHttpInfo( Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentTodo", + "v2.IncidentsApi.createIncidentJiraIssue", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1889,26 +2023,27 @@ public ApiResponse createIncidentTodoWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident todo. + * Create an incident Jira issue. * - *

See {@link #createIncidentTodoWithHttpInfo}. + *

See {@link #createIncidentJiraIssueWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param body Incident todo payload. (required) - * @return CompletableFuture<ApiResponse<IncidentTodoResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentJiraIssueIntegrationResponse>> */ - public CompletableFuture> createIncidentTodoWithHttpInfoAsync( - String incidentId, IncidentTodoCreateRequest body) { + public CompletableFuture> + createIncidentJiraIssueWithHttpInfoAsync(String incidentId, IncidentJiraIssueRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentTodo"; + String operationId = "createIncidentJiraIssue"; 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; @@ -1917,24 +2052,27 @@ public CompletableFuture> createIncidentTodoWi // 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 createIncidentTodo")); + 400, + "Missing the required parameter 'incidentId' when calling createIncidentJiraIssue")); 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 createIncidentJiraIssue")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos" + "/api/v2/incidents/{incident_id}/jira-issues" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); @@ -1944,7 +2082,7 @@ public CompletableFuture> createIncidentTodoWi try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentTodo", + "v2.IncidentsApi.createIncidentJiraIssue", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1952,7 +2090,8 @@ 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 +2103,34 @@ public CompletableFuture> createIncidentTodoWi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident type. + * Create an incident Jira template. * - *

See {@link #createIncidentTypeWithHttpInfo}. + *

See {@link #createIncidentJiraTemplateWithHttpInfo}. * - * @param body Incident type payload. (required) - * @return IncidentTypeResponse + * @param body (required) + * @return IncidentJiraTemplateResponse * @throws ApiException if fails to make API call */ - public IncidentTypeResponse createIncidentType(IncidentTypeCreateRequest body) + public IncidentJiraTemplateResponse createIncidentJiraTemplate(IncidentJiraTemplateRequest body) throws ApiException { - return createIncidentTypeWithHttpInfo(body).getData(); + return createIncidentJiraTemplateWithHttpInfo(body).getData(); } /** - * Create an incident type. + * Create an incident Jira template. * - *

See {@link #createIncidentTypeWithHttpInfoAsync}. + *

See {@link #createIncidentJiraTemplateWithHttpInfoAsync}. * - * @param body Incident type payload. (required) - * @return CompletableFuture<IncidentTypeResponse> + * @param body (required) + * @return CompletableFuture<IncidentJiraTemplateResponse> */ - public CompletableFuture createIncidentTypeAsync( - IncidentTypeCreateRequest body) { - return createIncidentTypeWithHttpInfoAsync(body) + public CompletableFuture createIncidentJiraTemplateAsync( + IncidentJiraTemplateRequest body) { + return createIncidentJiraTemplateWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -1999,27 +2138,26 @@ public CompletableFuture createIncidentTypeAsync( } /** - * Create an incident type. + * Create a new incident Jira template for the organization. * - * @param body Incident type payload. (required) - * @return ApiResponse<IncidentTypeResponse> + * @param body (required) + * @return ApiResponse<IncidentJiraTemplateResponse> * @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 createIncidentTypeWithHttpInfo( - IncidentTypeCreateRequest body) throws ApiException { + public ApiResponse createIncidentJiraTemplateWithHttpInfo( + IncidentJiraTemplateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentType"; + String operationId = "createIncidentJiraTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -2030,16 +2168,16 @@ 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 createIncidentJiraTemplate"); } // create path and map variables - String localVarPath = "/api/v2/incidents/config/types"; + String localVarPath = "/api/v2/incidents/config/jira-templates"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentType", + "v2.IncidentsApi.createIncidentJiraTemplate", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2054,25 +2192,26 @@ public ApiResponse createIncidentTypeWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident type. + * Create an incident Jira template. * - *

See {@link #createIncidentTypeWithHttpInfo}. + *

See {@link #createIncidentJiraTemplateWithHttpInfo}. * - * @param body Incident type payload. (required) - * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentJiraTemplateResponse>> */ - public CompletableFuture> createIncidentTypeWithHttpInfoAsync( - IncidentTypeCreateRequest body) { + public CompletableFuture> + createIncidentJiraTemplateWithHttpInfoAsync(IncidentJiraTemplateRequest body) { // Check if unstable operation is enabled - String operationId = "createIncidentType"; + String operationId = "createIncidentJiraTemplate"; 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 +2220,16 @@ 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 createIncidentJiraTemplate")); return result; } // create path and map variables - String localVarPath = "/api/v2/incidents/config/types"; + String localVarPath = "/api/v2/incidents/config/jira-templates"; Map localVarHeaderParams = new HashMap(); @@ -2096,7 +2237,7 @@ public CompletableFuture> createIncidentTypeWi try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentType", + "v2.IncidentsApi.createIncidentJiraTemplate", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2104,7 +2245,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 +2258,54 @@ public CompletableFuture> createIncidentTypeWi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to createIncidentUserDefinedField. */ - public static class CreateIncidentUserDefinedFieldOptionalParameters { + /** Manage optional parameters to createIncidentMicrosoftTeamsConfiguration. */ + public static class CreateIncidentMicrosoftTeamsConfigurationOptionalParameters { 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 + * @param include Specifies which related objects to include in the response. (optional) + * @return CreateIncidentMicrosoftTeamsConfigurationOptionalParameters */ - public CreateIncidentUserDefinedFieldOptionalParameters include(String include) { + public CreateIncidentMicrosoftTeamsConfigurationOptionalParameters include(String include) { this.include = include; return this; } } /** - * Create an incident user-defined field. + * Create an incident Microsoft Teams configuration. * - *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #createIncidentMicrosoftTeamsConfigurationWithHttpInfo}. * - * @param body Incident user-defined field payload. (required) - * @return IncidentUserDefinedFieldResponse + * @param body (required) + * @return IncidentMicrosoftTeamsConfigurationResponse * @throws ApiException if fails to make API call */ - public IncidentUserDefinedFieldResponse createIncidentUserDefinedField( - IncidentUserDefinedFieldCreateRequest body) throws ApiException { - return createIncidentUserDefinedFieldWithHttpInfo( - body, new CreateIncidentUserDefinedFieldOptionalParameters()) + public IncidentMicrosoftTeamsConfigurationResponse createIncidentMicrosoftTeamsConfiguration( + IncidentMicrosoftTeamsConfigurationRequest body) throws ApiException { + return createIncidentMicrosoftTeamsConfigurationWithHttpInfo( + body, new CreateIncidentMicrosoftTeamsConfigurationOptionalParameters()) .getData(); } /** - * Create an incident user-defined field. + * Create an incident Microsoft Teams configuration. * - *

See {@link #createIncidentUserDefinedFieldWithHttpInfoAsync}. + *

See {@link #createIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync}. * - * @param body Incident user-defined field payload. (required) - * @return CompletableFuture<IncidentUserDefinedFieldResponse> + * @param body (required) + * @return CompletableFuture<IncidentMicrosoftTeamsConfigurationResponse> */ - public CompletableFuture createIncidentUserDefinedFieldAsync( - IncidentUserDefinedFieldCreateRequest body) { - return createIncidentUserDefinedFieldWithHttpInfoAsync( - body, new CreateIncidentUserDefinedFieldOptionalParameters()) + public CompletableFuture + createIncidentMicrosoftTeamsConfigurationAsync( + IncidentMicrosoftTeamsConfigurationRequest body) { + return createIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync( + body, new CreateIncidentMicrosoftTeamsConfigurationOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -2171,35 +2313,36 @@ body, new CreateIncidentUserDefinedFieldOptionalParameters()) } /** - * Create an incident user-defined field. + * Create an incident Microsoft Teams configuration. * - *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. + *

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

See {@link #createIncidentUserDefinedFieldWithHttpInfoAsync}. + *

See {@link #createIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync}. * - * @param body Incident user-defined field payload. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentUserDefinedFieldResponse> + * @return CompletableFuture<IncidentMicrosoftTeamsConfigurationResponse> */ - public CompletableFuture createIncidentUserDefinedFieldAsync( - IncidentUserDefinedFieldCreateRequest body, - CreateIncidentUserDefinedFieldOptionalParameters parameters) { - return createIncidentUserDefinedFieldWithHttpInfoAsync(body, parameters) + public CompletableFuture + createIncidentMicrosoftTeamsConfigurationAsync( + IncidentMicrosoftTeamsConfigurationRequest body, + CreateIncidentMicrosoftTeamsConfigurationOptionalParameters parameters) { + return createIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync(body, parameters) .thenApply( response -> { return response.getData(); @@ -2207,30 +2350,30 @@ public CompletableFuture createIncidentUserDef } /** - * Create an incident user-defined field. + * Create a Microsoft Teams configuration for incidents. * - * @param body Incident user-defined field payload. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentUserDefinedFieldResponse> + * @return ApiResponse<IncidentMicrosoftTeamsConfigurationResponse> * @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 + createIncidentMicrosoftTeamsConfigurationWithHttpInfo( + IncidentMicrosoftTeamsConfigurationRequest body, + CreateIncidentMicrosoftTeamsConfigurationOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "createIncidentUserDefinedField"; + String operationId = "createIncidentMicrosoftTeamsConfiguration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -2241,11 +2384,13 @@ public ApiResponse createIncidentUserDefinedFi // 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" + + " createIncidentMicrosoftTeamsConfiguration"); } String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/user-defined-fields"; + String localVarPath = "/api/v2/incidents/config/microsoft-teams-configurations"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2254,7 +2399,7 @@ public ApiResponse createIncidentUserDefinedFi Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentUserDefinedField", + "v2.IncidentsApi.createIncidentMicrosoftTeamsConfiguration", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -2269,28 +2414,28 @@ public ApiResponse createIncidentUserDefinedFi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an incident user-defined field. + * Create an incident Microsoft Teams configuration. * - *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #createIncidentMicrosoftTeamsConfigurationWithHttpInfo}. * - * @param body Incident user-defined field payload. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldResponse>> + * @return CompletableFuture<ApiResponse<IncidentMicrosoftTeamsConfigurationResponse>> */ - public CompletableFuture> - createIncidentUserDefinedFieldWithHttpInfoAsync( - IncidentUserDefinedFieldCreateRequest body, - CreateIncidentUserDefinedFieldOptionalParameters parameters) { + public CompletableFuture> + createIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync( + IncidentMicrosoftTeamsConfigurationRequest body, + CreateIncidentMicrosoftTeamsConfigurationOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "createIncidentUserDefinedField"; + String operationId = "createIncidentMicrosoftTeamsConfiguration"; 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))); @@ -2300,17 +2445,18 @@ public ApiResponse createIncidentUserDefinedFi // 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 createIncidentUserDefinedField")); + "Missing the required parameter 'body' when calling" + + " createIncidentMicrosoftTeamsConfiguration")); 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/microsoft-teams-configurations"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2321,7 +2467,7 @@ public ApiResponse createIncidentUserDefinedFi try { builder = apiClient.createBuilder( - "v2.IncidentsApi.createIncidentUserDefinedField", + "v2.IncidentsApi.createIncidentMicrosoftTeamsConfiguration", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -2329,7 +2475,7 @@ public ApiResponse createIncidentUserDefinedFi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -2342,29 +2488,34 @@ public ApiResponse createIncidentUserDefinedFi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Delete global incident handle. + * Create an incident Microsoft Teams online meeting. * - *

See {@link #deleteGlobalIncidentHandleWithHttpInfo}. + *

See {@link #createIncidentMSTeamsOnlineMeetingWithHttpInfo}. * + * @param incidentId The UUID of the incident. (required) + * @return IncidentMSTeamsIntegrationResponse * @throws ApiException if fails to make API call */ - public void deleteGlobalIncidentHandle() throws ApiException { - deleteGlobalIncidentHandleWithHttpInfo(); + public IncidentMSTeamsIntegrationResponse createIncidentMSTeamsOnlineMeeting(String incidentId) + throws ApiException { + return createIncidentMSTeamsOnlineMeetingWithHttpInfo(incidentId).getData(); } /** - * Delete global incident handle. + * Create an incident Microsoft Teams online meeting. * - *

See {@link #deleteGlobalIncidentHandleWithHttpInfoAsync}. + *

See {@link #createIncidentMSTeamsOnlineMeetingWithHttpInfoAsync}. * - * @return CompletableFuture + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentMSTeamsIntegrationResponse> */ - public CompletableFuture deleteGlobalIncidentHandleAsync() { - return deleteGlobalIncidentHandleWithHttpInfoAsync() + public CompletableFuture + createIncidentMSTeamsOnlineMeetingAsync(String incidentId) { + return createIncidentMSTeamsOnlineMeetingWithHttpInfoAsync(incidentId) .thenApply( response -> { return response.getData(); @@ -2372,74 +2523,108 @@ public CompletableFuture deleteGlobalIncidentHandleAsync() { } /** - * Delete a global incident handle. + * Create a Microsoft Teams online meeting for a given incident. * - * @return ApiResponse<Void> + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentMSTeamsIntegrationResponse> * @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 deleteGlobalIncidentHandleWithHttpInfo() throws ApiException { + public ApiResponse + createIncidentMSTeamsOnlineMeetingWithHttpInfo(String incidentId) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteGlobalIncidentHandle"; + String operationId = "createIncidentMSTeamsOnlineMeeting"; 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" + + " createIncidentMSTeamsOnlineMeeting"); + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/{incident_id}/microsoft-teams-integration/online-meeting" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteGlobalIncidentHandle", + "v2.IncidentsApi.createIncidentMSTeamsOnlineMeeting", localVarPath, new ArrayList(), 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[] {}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete global incident handle. + * Create an incident Microsoft Teams online meeting. * - *

See {@link #deleteGlobalIncidentHandleWithHttpInfo}. + *

See {@link #createIncidentMSTeamsOnlineMeetingWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<Void>> + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentMSTeamsIntegrationResponse>> */ - public CompletableFuture> deleteGlobalIncidentHandleWithHttpInfoAsync() { + public CompletableFuture> + createIncidentMSTeamsOnlineMeetingWithHttpInfoAsync(String incidentId) { // Check if unstable operation is enabled - String operationId = "deleteGlobalIncidentHandle"; + String operationId = "createIncidentMSTeamsOnlineMeeting"; 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" + + " createIncidentMSTeamsOnlineMeeting")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/{incident_id}/microsoft-teams-integration/online-meeting" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -2447,51 +2632,55 @@ public CompletableFuture> deleteGlobalIncidentHandleWithHttpIn try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteGlobalIncidentHandle", + "v2.IncidentsApi.createIncidentMSTeamsOnlineMeeting", localVarPath, new ArrayList(), 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[] {}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an existing incident. + * Create an incident notification rule. * - *

See {@link #deleteIncidentWithHttpInfo}. + *

See {@link #createIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return IncidentNotificationRule * @throws ApiException if fails to make API call */ - public void deleteIncident(String incidentId) throws ApiException { - deleteIncidentWithHttpInfo(incidentId); + public IncidentNotificationRule createIncidentNotificationRule( + CreateIncidentNotificationRuleRequest body) throws ApiException { + return createIncidentNotificationRuleWithHttpInfo(body).getData(); } /** - * Delete an existing incident. + * Create an incident notification rule. * - *

See {@link #deleteIncidentWithHttpInfoAsync}. + *

See {@link #createIncidentNotificationRuleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<IncidentNotificationRule> */ - public CompletableFuture deleteIncidentAsync(String incidentId) { - return deleteIncidentWithHttpInfoAsync(incidentId) + public CompletableFuture createIncidentNotificationRuleAsync( + CreateIncidentNotificationRuleRequest body) { + return createIncidentNotificationRuleWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -2499,16 +2688,16 @@ public CompletableFuture deleteIncidentAsync(String incidentId) { } /** - * Deletes an existing incident from the users organization. + * Creates a new notification rule. * - * @param incidentId The UUID of the incident. (required) - * @return ApiResponse<Void> + * @param body (required) + * @return ApiResponse<IncidentNotificationRule> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -2516,83 +2705,80 @@ 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 createIncidentNotificationRuleWithHttpInfo( + CreateIncidentNotificationRuleRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncident"; + String operationId = "createIncidentNotificationRule"; 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) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling deleteIncident"); + 400, "Missing the required parameter 'body' when calling createIncidentNotificationRule"); } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}" - .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.deleteIncident", + "v2.IncidentsApi.createIncidentNotificationRule", 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 notification rule. * - *

See {@link #deleteIncidentWithHttpInfo}. + *

See {@link #createIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> */ - public CompletableFuture> deleteIncidentWithHttpInfoAsync(String incidentId) { + public CompletableFuture> + createIncidentNotificationRuleWithHttpInfoAsync(CreateIncidentNotificationRuleRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncident"; + 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 = null; + Object localVarPostBody = body; - // verify the required parameter 'incidentId' is set - if (incidentId == 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 'incidentId' when calling deleteIncident")); + 400, + "Missing the required parameter 'body' when calling createIncidentNotificationRule")); return result; } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/config/notification-rules"; Map localVarHeaderParams = new HashMap(); @@ -2600,54 +2786,54 @@ public CompletableFuture> deleteIncidentWithHttpInfoAsync(Stri try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncident", + "v2.IncidentsApi.createIncidentNotificationRule", 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 incident notification template. * - *

See {@link #deleteIncidentAttachmentWithHttpInfo}. + *

See {@link #createIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param body (required) + * @return IncidentNotificationTemplate * @throws ApiException if fails to make API call */ - public void deleteIncidentAttachment(String incidentId, String attachmentId) throws ApiException { - deleteIncidentAttachmentWithHttpInfo(incidentId, attachmentId); + public IncidentNotificationTemplate createIncidentNotificationTemplate( + CreateIncidentNotificationTemplateRequest body) throws ApiException { + return createIncidentNotificationTemplateWithHttpInfo(body).getData(); } /** - * Delete incident attachment. + * Create incident notification template. * - *

See {@link #deleteIncidentAttachmentWithHttpInfoAsync}. + *

See {@link #createIncidentNotificationTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<IncidentNotificationTemplate> */ - public CompletableFuture deleteIncidentAttachmentAsync( - String incidentId, String attachmentId) { - return deleteIncidentAttachmentWithHttpInfoAsync(incidentId, attachmentId) + public CompletableFuture createIncidentNotificationTemplateAsync( + CreateIncidentNotificationTemplateRequest body) { + return createIncidentNotificationTemplateWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -2655,124 +2841,102 @@ public CompletableFuture deleteIncidentAttachmentAsync( } /** - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) - * @return ApiResponse<Void> + * Creates a new notification template. + * + * @param body (required) + * @return ApiResponse<IncidentNotificationTemplate> * @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 createIncidentNotificationTemplateWithHttpInfo( + CreateIncidentNotificationTemplateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentAttachment"; + 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)); } - 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"); + "Missing the required parameter 'body' when calling createIncidentNotificationTemplate"); } // 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/notification-templates"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentAttachment", + "v2.IncidentsApi.createIncidentNotificationTemplate", 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 incident notification template. * - *

See {@link #deleteIncidentAttachmentWithHttpInfo}. + *

See {@link #createIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> */ - public CompletableFuture> deleteIncidentAttachmentWithHttpInfoAsync( - String incidentId, String attachmentId) { + public CompletableFuture> + createIncidentNotificationTemplateWithHttpInfoAsync( + CreateIncidentNotificationTemplateRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentAttachment"; + 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; } - 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 deleteIncidentAttachment")); - return result; - } + Object localVarPostBody = body; - // 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")); + "Missing the required parameter 'body' when calling" + + " createIncidentNotificationTemplate")); 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/notification-templates"; Map localVarHeaderParams = new HashMap(); @@ -2780,53 +2944,57 @@ public CompletableFuture> deleteIncidentAttachmentWithHttpInfo try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentAttachment", + "v2.IncidentsApi.createIncidentNotificationTemplate", 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 postmortem attachment. * - *

See {@link #deleteIncidentImpactWithHttpInfo}. + *

See {@link #createIncidentPostmortemAttachmentWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param impactId The UUID of the incident impact. (required) + * @param incidentId The ID of the incident (required) + * @param body (required) + * @return Attachment * @throws ApiException if fails to make API call */ - public void deleteIncidentImpact(String incidentId, String impactId) throws ApiException { - deleteIncidentImpactWithHttpInfo(incidentId, impactId); + public Attachment createIncidentPostmortemAttachment( + String incidentId, PostmortemAttachmentRequest body) throws ApiException { + return createIncidentPostmortemAttachmentWithHttpInfo(incidentId, body).getData(); } /** - * Delete an incident impact. + * Create postmortem attachment. * - *

See {@link #deleteIncidentImpactWithHttpInfoAsync}. + *

See {@link #createIncidentPostmortemAttachmentWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param impactId The UUID of the incident impact. (required) - * @return CompletableFuture + * @param incidentId The ID of the incident (required) + * @param body (required) + * @return CompletableFuture<Attachment> */ - public CompletableFuture deleteIncidentImpactAsync(String incidentId, String impactId) { - return deleteIncidentImpactWithHttpInfoAsync(incidentId, impactId) + public CompletableFuture createIncidentPostmortemAttachmentAsync( + String incidentId, PostmortemAttachmentRequest body) { + return createIncidentPostmortemAttachmentWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -2834,104 +3002,128 @@ public CompletableFuture deleteIncidentImpactAsync(String incidentId, Stri } /** - * Delete an incident impact. + * Create a postmortem attachment for an incident. * - * @param incidentId The UUID of the incident. (required) - * @param impactId The UUID of the incident impact. (required) - * @return ApiResponse<Void> + *

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 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
204 No Content -
401 Unauthorized -
403 Forbidden -
404 Not Found -
201 Created -
400 Bad Request -
429 Too many requests -
*/ - public ApiResponse deleteIncidentImpactWithHttpInfo(String incidentId, String impactId) - throws ApiException { - Object localVarPostBody = null; + public ApiResponse createIncidentPostmortemAttachmentWithHttpInfo( + String incidentId, PostmortemAttachmentRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createIncidentPostmortemAttachment"; + 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" + + " createIncidentPostmortemAttachment"); } - // 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 createIncidentPostmortemAttachment"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + "/api/v2/incidents/{incident_id}/attachments/postmortems" .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.createIncidentPostmortemAttachment", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + 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 an incident impact. + * Create postmortem attachment. * - *

See {@link #deleteIncidentImpactWithHttpInfo}. + *

See {@link #createIncidentPostmortemAttachmentWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param impactId The UUID of the incident impact. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param incidentId The ID of the incident (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<Attachment>> */ - public CompletableFuture> deleteIncidentImpactWithHttpInfoAsync( - String incidentId, String impactId) { - Object localVarPostBody = null; + public CompletableFuture> + createIncidentPostmortemAttachmentWithHttpInfoAsync( + String incidentId, PostmortemAttachmentRequest body) { + // Check if unstable operation is enabled + String operationId = "createIncidentPostmortemAttachment"; + 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")); - return result; + "Missing the required parameter 'incidentId' when calling" + + " createIncidentPostmortemAttachment")); + 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" + + " createIncidentPostmortemAttachment")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + "/api/v2/incidents/{incident_id}/attachments/postmortems" .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 +3131,54 @@ public CompletableFuture> deleteIncidentImpactWithHttpInfoAsyn try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentImpact", + "v2.IncidentsApi.createIncidentPostmortemAttachment", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + 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 incident integration metadata. + * Create postmortem template. * - *

See {@link #deleteIncidentIntegrationWithHttpInfo}. + *

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

See {@link #deleteIncidentIntegrationWithHttpInfoAsync}. + *

See {@link #createIncidentPostmortemTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<PostmortemTemplateResponse> */ - public CompletableFuture deleteIncidentIntegrationAsync( - String incidentId, String integrationMetadataId) { - return deleteIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId) + public CompletableFuture createIncidentPostmortemTemplateAsync( + PostmortemTemplateRequest body) { + return createIncidentPostmortemTemplateWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -2995,132 +3186,97 @@ public CompletableFuture deleteIncidentIntegrationAsync( } /** - * Delete an incident integration metadata. + * Create a new postmortem template for incidents. * - * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @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 OK -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteIncidentIntegrationWithHttpInfo( - String incidentId, String integrationMetadataId) throws ApiException { + public ApiResponse createIncidentPostmortemTemplateWithHttpInfo( + PostmortemTemplateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentIntegration"; + 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; - - // verify the required parameter 'incidentId' is set - if (incidentId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling deleteIncidentIntegration"); - } + Object localVarPostBody = body; - // 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"); + "Missing the required parameter 'body' when calling createIncidentPostmortemTemplate"); } // create path and map variables - 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())); + String localVarPath = "/api/v2/incidents/config/postmortem-templates"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentIntegration", + "v2.IncidentsApi.createIncidentPostmortemTemplate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + 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 an incident integration metadata. + * Create postmortem template. * - *

See {@link #deleteIncidentIntegrationWithHttpInfo}. + *

See {@link #createIncidentPostmortemTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @return CompletableFuture<ApiResponse<PostmortemTemplateResponse>> */ - public CompletableFuture> deleteIncidentIntegrationWithHttpInfoAsync( - String incidentId, String integrationMetadataId) { + public CompletableFuture> + createIncidentPostmortemTemplateWithHttpInfoAsync(PostmortemTemplateRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentIntegration"; + 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; - - // 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" - + " deleteIncidentIntegration")); - return result; - } + Object localVarPostBody = body; - // 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")); + "Missing the required parameter 'body' when calling" + + " createIncidentPostmortemTemplate")); 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())) - .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + String localVarPath = "/api/v2/incidents/config/postmortem-templates"; Map localVarHeaderParams = new HashMap(); @@ -3128,103 +3284,54 @@ public CompletableFuture> deleteIncidentIntegrationWithHttpInf try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentIntegration", + "v2.IncidentsApi.createIncidentPostmortemTemplate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + 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); - } - - /** 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 role assignment. * - *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createIncidentRoleAssignmentWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. + * @param body (required) + * @return IncidentRoleAssignmentResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentNotificationRule( - UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) throws ApiException { - deleteIncidentNotificationRuleWithHttpInfo(id, parameters); + public IncidentRoleAssignmentResponse createIncidentRoleAssignment( + IncidentRoleAssignmentRequest body) throws ApiException { + return createIncidentRoleAssignmentWithHttpInfo(body).getData(); } /** - * Delete an incident notification rule. + * Create an incident role assignment. * - *

See {@link #deleteIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #createIncidentRoleAssignmentWithHttpInfoAsync}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<IncidentRoleAssignmentResponse> */ - public CompletableFuture deleteIncidentNotificationRuleAsync( - UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) { - return deleteIncidentNotificationRuleWithHttpInfoAsync(id, parameters) + public CompletableFuture createIncidentRoleAssignmentAsync( + IncidentRoleAssignmentRequest body) { + return createIncidentRoleAssignmentWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -3232,216 +3339,159 @@ public CompletableFuture deleteIncidentNotificationRuleAsync( } /** - * Deletes a notification rule by its ID. + * Create a new role assignment for an incident. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<Void> + * @param body (required) + * @return ApiResponse<IncidentRoleAssignmentResponse> * @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 -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse deleteIncidentNotificationRuleWithHttpInfo( - UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) throws ApiException { + public ApiResponse createIncidentRoleAssignmentWithHttpInfo( + IncidentRoleAssignmentRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentNotificationRule"; + String operationId = "createIncidentRoleAssignment"; 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 createIncidentRoleAssignment"); } - 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/role_assignments"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentNotificationRule", + "v2.IncidentsApi.createIncidentRoleAssignment", 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 role assignment. * - *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createIncidentRoleAssignmentWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentRoleAssignmentResponse>> */ - public CompletableFuture> deleteIncidentNotificationRuleWithHttpInfoAsync( - UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) { + public CompletableFuture> + createIncidentRoleAssignmentWithHttpInfoAsync(IncidentRoleAssignmentRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentNotificationRule"; + String operationId = "createIncidentRoleAssignment"; 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")); + "Missing the required parameter 'body' when calling createIncidentRoleAssignment")); 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/role_assignments"; - 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.createIncidentRoleAssignment", 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); - } - - /** 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; - } - } - - /** - * Delete a notification template. - * - *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. - * - * @param id The ID of the notification template. (required) - * @throws ApiException if fails to make API call - */ - 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(); - }); + new GenericType() {}); } /** - * Delete a notification template. + * Create an incident Statuspage incident. * - *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #createIncidentStatuspageIncidentWithHttpInfo}. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return IncidentStatuspageIncidentResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentNotificationTemplate( - UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) - throws ApiException { - deleteIncidentNotificationTemplateWithHttpInfo(id, parameters); + public IncidentStatuspageIncidentResponse createIncidentStatuspageIncident( + String incidentId, IncidentStatuspageIncidentRequest body) throws ApiException { + return createIncidentStatuspageIncidentWithHttpInfo(incidentId, body).getData(); } /** - * Delete a notification template. + * Create an incident Statuspage incident. * - *

See {@link #deleteIncidentNotificationTemplateWithHttpInfoAsync}. + *

See {@link #createIncidentStatuspageIncidentWithHttpInfoAsync}. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return CompletableFuture<IncidentStatuspageIncidentResponse> */ - public CompletableFuture deleteIncidentNotificationTemplateAsync( - UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) { - return deleteIncidentNotificationTemplateWithHttpInfoAsync(id, parameters) + public CompletableFuture + createIncidentStatuspageIncidentAsync( + String incidentId, IncidentStatuspageIncidentRequest body) { + return createIncidentStatuspageIncidentWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -3449,17 +3499,17 @@ public CompletableFuture deleteIncidentNotificationTemplateAsync( } /** - * Deletes a notification template by its ID. + * Create a Statuspage incident linked to a Datadog incident. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<Void> + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return ApiResponse<IncidentStatuspageIncidentResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -3467,148 +3517,195 @@ public CompletableFuture deleteIncidentNotificationTemplateAsync( * *
Response details
Status Code Description Response Headers
204 No Content -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentNotificationTemplateWithHttpInfo( - UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) - throws ApiException { + public ApiResponse + createIncidentStatuspageIncidentWithHttpInfo( + String incidentId, IncidentStatuspageIncidentRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentNotificationTemplate"; + String operationId = "createIncidentStatuspageIncident"; 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 'incidentId' is set + if (incidentId == null) { throw new ApiException( 400, - "Missing the required parameter 'id' when calling deleteIncidentNotificationTemplate"); + "Missing the required parameter 'incidentId' when calling" + + " createIncidentStatuspageIncident"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling createIncidentStatuspageIncident"); } - 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/statuspage/{incident_id}/statuspage-incidents" + .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.deleteIncidentNotificationTemplate", + "v2.IncidentsApi.createIncidentStatuspageIncident", 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 a notification template. + * Create an incident Statuspage incident. * - *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #createIncidentStatuspageIncidentWithHttpInfo}. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<Void>> + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentStatuspageIncidentResponse>> */ - public CompletableFuture> deleteIncidentNotificationTemplateWithHttpInfoAsync( - UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) { + public CompletableFuture> + createIncidentStatuspageIncidentWithHttpInfoAsync( + String incidentId, IncidentStatuspageIncidentRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentNotificationTemplate"; + String operationId = "createIncidentStatuspageIncident"; 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 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'id' when calling" - + " deleteIncidentNotificationTemplate")); + "Missing the required parameter 'incidentId' when calling" + + " createIncidentStatuspageIncident")); + 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" + + " createIncidentStatuspageIncident")); 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/statuspage/{incident_id}/statuspage-incidents" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentNotificationTemplate", + "v2.IncidentsApi.createIncidentStatuspageIncident", 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 createIncidentStatusPageNotice. */ + public static class CreateIncidentStatusPageNoticeOptionalParameters { + private Boolean notifySubscribers; + + /** + * Set notifySubscribers. + * + * @param notifySubscribers Whether to notify subscribers about this notice. (optional) + * @return CreateIncidentStatusPageNoticeOptionalParameters + */ + public CreateIncidentStatusPageNoticeOptionalParameters notifySubscribers( + Boolean notifySubscribers) { + this.notifySubscribers = notifySubscribers; + return this; + } } /** - * Delete postmortem template. + * Publish an incident status page notice. * - *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #createIncidentStatusPageNoticeWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param body (required) + * @return IncidentStatusPageNoticeIntegrationResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentPostmortemTemplate(String templateId) throws ApiException { - deleteIncidentPostmortemTemplateWithHttpInfo(templateId); + public IncidentStatusPageNoticeIntegrationResponse createIncidentStatusPageNotice( + String incidentId, UUID statuspageId, IncidentStatusPageNoticeCreateRequest body) + throws ApiException { + return createIncidentStatusPageNoticeWithHttpInfo( + incidentId, statuspageId, body, new CreateIncidentStatusPageNoticeOptionalParameters()) + .getData(); } /** - * Delete postmortem template. + * Publish an incident status page notice. * - *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfoAsync}. + *

See {@link #createIncidentStatusPageNoticeWithHttpInfoAsync}. * - * @param templateId The ID of the postmortem template (required) - * @return CompletableFuture + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param body (required) + * @return CompletableFuture<IncidentStatusPageNoticeIntegrationResponse> */ - public CompletableFuture deleteIncidentPostmortemTemplateAsync(String templateId) { - return deleteIncidentPostmortemTemplateWithHttpInfoAsync(templateId) + public CompletableFuture + createIncidentStatusPageNoticeAsync( + String incidentId, UUID statuspageId, IncidentStatusPageNoticeCreateRequest body) { + return createIncidentStatusPageNoticeWithHttpInfoAsync( + incidentId, statuspageId, body, new CreateIncidentStatusPageNoticeOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -3616,158 +3713,279 @@ public CompletableFuture deleteIncidentPostmortemTemplateAsync(String temp } /** - * Delete a postmortem template. + * Publish an incident status page notice. * - * @param templateId The ID of the postmortem template (required) - * @return ApiResponse<Void> + *

See {@link #createIncidentStatusPageNoticeWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return IncidentStatusPageNoticeIntegrationResponse * @throws ApiException if fails to make API call - * @http.response.details - * - * + */ + public IncidentStatusPageNoticeIntegrationResponse createIncidentStatusPageNotice( + String incidentId, + UUID statuspageId, + IncidentStatusPageNoticeCreateRequest body, + CreateIncidentStatusPageNoticeOptionalParameters parameters) + throws ApiException { + return createIncidentStatusPageNoticeWithHttpInfo(incidentId, statuspageId, body, parameters) + .getData(); + } + + /** + * Publish an incident status page notice. + * + *

See {@link #createIncidentStatusPageNoticeWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentStatusPageNoticeIntegrationResponse> + */ + public CompletableFuture + createIncidentStatusPageNoticeAsync( + String incidentId, + UUID statuspageId, + IncidentStatusPageNoticeCreateRequest body, + CreateIncidentStatusPageNoticeOptionalParameters parameters) { + return createIncidentStatusPageNoticeWithHttpInfoAsync( + incidentId, statuspageId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Publish a status page notice for a given incident. + * + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentStatusPageNoticeIntegrationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + *

Response details
+ * * - * + * * + * + * * * *
Response details
Status Code Description Response Headers
204 No Content -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteIncidentPostmortemTemplateWithHttpInfo(String templateId) - throws ApiException { + public ApiResponse + createIncidentStatusPageNoticeWithHttpInfo( + String incidentId, + UUID statuspageId, + IncidentStatusPageNoticeCreateRequest body, + CreateIncidentStatusPageNoticeOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentPostmortemTemplate"; + String operationId = "createIncidentStatusPageNotice"; 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 'incidentId' is set + if (incidentId == null) { throw new ApiException( 400, - "Missing the required parameter 'templateId' when calling" - + " deleteIncidentPostmortemTemplate"); + "Missing the required parameter 'incidentId' when calling" + + " createIncidentStatusPageNotice"); + } + + // verify the required parameter 'statuspageId' is set + if (statuspageId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'statuspageId' when calling" + + " createIncidentStatusPageNotice"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createIncidentStatusPageNotice"); } + Boolean notifySubscribers = parameters.notifySubscribers; // create path and map variables String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" + "/api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices" .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "statuspage_id" + "\\}", apiClient.escapeString(statuspageId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentPostmortemTemplate", + "v2.IncidentsApi.createIncidentStatusPageNotice", 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. + * Publish an incident status page notice. * - *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #createIncidentStatusPageNoticeWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentStatusPageNoticeIntegrationResponse>> */ - public CompletableFuture> deleteIncidentPostmortemTemplateWithHttpInfoAsync( - String templateId) { + public CompletableFuture> + createIncidentStatusPageNoticeWithHttpInfoAsync( + String incidentId, + UUID statuspageId, + IncidentStatusPageNoticeCreateRequest body, + CreateIncidentStatusPageNoticeOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "deleteIncidentPostmortemTemplate"; + String operationId = "createIncidentStatusPageNotice"; 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 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'templateId' when calling" - + " deleteIncidentPostmortemTemplate")); + "Missing the required parameter 'incidentId' when calling" + + " createIncidentStatusPageNotice")); + return result; + } + + // verify the required parameter 'statuspageId' is set + if (statuspageId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'statuspageId' when calling" + + " createIncidentStatusPageNotice")); + 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 createIncidentStatusPageNotice")); return result; } + Boolean notifySubscribers = parameters.notifySubscribers; // create path and map variables String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" + "/api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices" .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "statuspage_id" + "\\}", apiClient.escapeString(statuspageId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentPostmortemTemplate", + "v2.IncidentsApi.createIncidentStatusPageNotice", 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 incident timeline entry. * - *

See {@link #deleteIncidentTodoWithHttpInfo}. + *

See {@link #createIncidentTimelineEntryWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) + * @param body (required) + * @return IncidentTimelineEntryResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentTodo(String incidentId, String todoId) throws ApiException { - deleteIncidentTodoWithHttpInfo(incidentId, todoId); + public IncidentTimelineEntryResponse createIncidentTimelineEntry( + String incidentId, IncidentTimelineEntryRequest body) throws ApiException { + return createIncidentTimelineEntryWithHttpInfo(incidentId, body).getData(); } /** - * Delete an incident todo. + * Create an incident timeline entry. * - *

See {@link #deleteIncidentTodoWithHttpInfoAsync}. + *

See {@link #createIncidentTimelineEntryWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<IncidentTimelineEntryResponse> */ - public CompletableFuture deleteIncidentTodoAsync(String incidentId, String todoId) { - return deleteIncidentTodoWithHttpInfoAsync(incidentId, todoId) + public CompletableFuture createIncidentTimelineEntryAsync( + String incidentId, IncidentTimelineEntryRequest body) { + return createIncidentTimelineEntryWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -3775,17 +3993,17 @@ public CompletableFuture deleteIncidentTodoAsync(String incidentId, String } /** - * Delete an incident todo. + * Create a new timeline entry for a given incident. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return ApiResponse<Void> + * @param body (required) + * @return ApiResponse<IncidentTimelineEntryResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -3793,103 +4011,109 @@ public CompletableFuture deleteIncidentTodoAsync(String incidentId, String * *
Response details
Status Code Description Response Headers
204 OK -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentTodoWithHttpInfo(String incidentId, String todoId) - throws ApiException { + public ApiResponse createIncidentTimelineEntryWithHttpInfo( + String incidentId, IncidentTimelineEntryRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentTodo"; + String operationId = "createIncidentTimelineEntry"; 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 createIncidentTimelineEntry"); } - // 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 createIncidentTimelineEntry"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + "/api/v2/incidents/{incident_id}/timeline" .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.createIncidentTimelineEntry", 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 incident timeline entry. * - *

See {@link #deleteIncidentTodoWithHttpInfo}. + *

See {@link #createIncidentTimelineEntryWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentTimelineEntryResponse>> */ - public CompletableFuture> deleteIncidentTodoWithHttpInfoAsync( - String incidentId, String todoId) { + public CompletableFuture> + createIncidentTimelineEntryWithHttpInfoAsync( + String incidentId, IncidentTimelineEntryRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentTodo"; + String operationId = "createIncidentTimelineEntry"; 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" + + " createIncidentTimelineEntry")); 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 createIncidentTimelineEntry")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + "/api/v2/incidents/{incident_id}/timeline" .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 +4121,57 @@ public CompletableFuture> deleteIncidentTodoWithHttpInfoAsync( try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentTodo", + "v2.IncidentsApi.createIncidentTimelineEntry", 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 an incident todo. * - *

See {@link #deleteIncidentTypeWithHttpInfo}. + *

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

See {@link #deleteIncidentTypeWithHttpInfoAsync}. + *

See {@link #createIncidentTodoWithHttpInfoAsync}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return CompletableFuture + * @param incidentId The UUID of the incident. (required) + * @param body Incident todo payload. (required) + * @return CompletableFuture<IncidentTodoResponse> */ - public CompletableFuture deleteIncidentTypeAsync(String incidentTypeId) { - return deleteIncidentTypeWithHttpInfoAsync(incidentTypeId) + public CompletableFuture createIncidentTodoAsync( + String incidentId, IncidentTodoCreateRequest body) { + return createIncidentTodoWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -3949,16 +4179,17 @@ public CompletableFuture deleteIncidentTypeAsync(String incidentTypeId) { } /** - * Delete an incident type. + * Create an incident todo. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return ApiResponse<Void> + * @param incidentId The UUID of the incident. (required) + * @param body Incident todo payload. (required) + * @return ApiResponse<IncidentTodoResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -3966,88 +4197,101 @@ public CompletableFuture deleteIncidentTypeAsync(String incidentTypeId) { * *
Response details
Status Code Description Response Headers
204 OK -
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deleteIncidentTypeWithHttpInfo(String incidentTypeId) - throws ApiException { - // Check if unstable operation is enabled - String operationId = "deleteIncidentType"; + public ApiResponse createIncidentTodoWithHttpInfo( + String incidentId, IncidentTodoCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + 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 '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 createIncidentTodo"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createIncidentTodo"); } // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/{incident_id}/relationships/todos" .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.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 type. + * Create an incident todo. * - *

See {@link #deleteIncidentTypeWithHttpInfo}. + *

See {@link #createIncidentTodoWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param incidentId The UUID of the incident. (required) + * @param body Incident todo payload. (required) + * @return CompletableFuture<ApiResponse<IncidentTodoResponse>> */ - public CompletableFuture> deleteIncidentTypeWithHttpInfoAsync( - String incidentTypeId) { + public CompletableFuture> createIncidentTodoWithHttpInfoAsync( + String incidentId, IncidentTodoCreateRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentType"; + 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 '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")); + 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<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createIncidentTodo")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/{incident_id}/relationships/todos" .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -4055,51 +4299,54 @@ public CompletableFuture> deleteIncidentTypeWithHttpInfoAsync( try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentType", + "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); + new GenericType() {}); } /** - * Delete an incident user-defined field. + * Create an incident type. * - *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #createIncidentTypeWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) + * @param body Incident type payload. (required) + * @return IncidentTypeResponse * @throws ApiException if fails to make API call */ - public void deleteIncidentUserDefinedField(String fieldId) throws ApiException { - deleteIncidentUserDefinedFieldWithHttpInfo(fieldId); + public IncidentTypeResponse createIncidentType(IncidentTypeCreateRequest body) + throws ApiException { + return createIncidentTypeWithHttpInfo(body).getData(); } /** - * Delete an incident user-defined field. + * Create an incident type. * - *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfoAsync}. + *

See {@link #createIncidentTypeWithHttpInfoAsync}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @return CompletableFuture + * @param body Incident type payload. (required) + * @return CompletableFuture<IncidentTypeResponse> */ - public CompletableFuture deleteIncidentUserDefinedFieldAsync(String fieldId) { - return deleteIncidentUserDefinedFieldWithHttpInfoAsync(fieldId) + public CompletableFuture createIncidentTypeAsync( + IncidentTypeCreateRequest body) { + return createIncidentTypeWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -4107,16 +4354,16 @@ public CompletableFuture deleteIncidentUserDefinedFieldAsync(String fieldI } /** - * Delete an incident user-defined field. + * Create an incident type. * - * @param fieldId The ID of the incident user-defined field. (required) - * @return ApiResponse<Void> + * @param body Incident type payload. (required) + * @return ApiResponse<IncidentTypeResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -4124,86 +4371,79 @@ 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 createIncidentTypeWithHttpInfo( + IncidentTypeCreateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteIncidentUserDefinedField"; + 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 'fieldId' is set - if (fieldId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'fieldId' when calling deleteIncidentUserDefinedField"); + 400, "Missing the required parameter 'body' when calling createIncidentType"); } // create path and map variables - String localVarPath = - "/api/v2/incidents/config/user-defined-fields/{field_id}" - .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); + String localVarPath = "/api/v2/incidents/config/types"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentUserDefinedField", + "v2.IncidentsApi.createIncidentType", 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 type. * - *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #createIncidentTypeWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body Incident type payload. (required) + * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> */ - public CompletableFuture> deleteIncidentUserDefinedFieldWithHttpInfoAsync( - String fieldId) { + public CompletableFuture> createIncidentTypeWithHttpInfoAsync( + IncidentTypeCreateRequest body) { // Check if unstable operation is enabled - String operationId = "deleteIncidentUserDefinedField"; + 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 'fieldId' is set - if (fieldId == 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 'fieldId' when calling" - + " deleteIncidentUserDefinedField")); + 400, "Missing the required parameter 'body' when calling createIncidentType")); 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())); + String localVarPath = "/api/v2/incidents/config/types"; Map localVarHeaderParams = new HashMap(); @@ -4211,50 +4451,74 @@ public CompletableFuture> deleteIncidentUserDefinedFieldWithHt try { builder = apiClient.createBuilder( - "v2.IncidentsApi.deleteIncidentUserDefinedField", + "v2.IncidentsApi.createIncidentType", 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() {}); + } + + /** 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; + } } /** - * Get global incident settings. + * Create an incident user-defined field. * - *

See {@link #getGlobalIncidentSettingsWithHttpInfo}. + *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. * - * @return GlobalIncidentSettingsResponse + * @param body Incident user-defined field payload. (required) + * @return IncidentUserDefinedFieldResponse * @throws ApiException if fails to make API call */ - public GlobalIncidentSettingsResponse getGlobalIncidentSettings() throws ApiException { - return getGlobalIncidentSettingsWithHttpInfo().getData(); + public IncidentUserDefinedFieldResponse createIncidentUserDefinedField( + IncidentUserDefinedFieldCreateRequest body) throws ApiException { + return createIncidentUserDefinedFieldWithHttpInfo( + body, new CreateIncidentUserDefinedFieldOptionalParameters()) + .getData(); } /** - * Get global incident settings. + * Create an incident user-defined field. * - *

See {@link #getGlobalIncidentSettingsWithHttpInfoAsync}. + *

See {@link #createIncidentUserDefinedFieldWithHttpInfoAsync}. * - * @return CompletableFuture<GlobalIncidentSettingsResponse> + * @param body Incident user-defined field payload. (required) + * @return CompletableFuture<IncidentUserDefinedFieldResponse> */ - public CompletableFuture getGlobalIncidentSettingsAsync() { - return getGlobalIncidentSettingsWithHttpInfoAsync() + public CompletableFuture createIncidentUserDefinedFieldAsync( + IncidentUserDefinedFieldCreateRequest body) { + return createIncidentUserDefinedFieldWithHttpInfoAsync( + body, new CreateIncidentUserDefinedFieldOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -4262,148 +4526,224 @@ public CompletableFuture getGlobalIncidentSettin } /** - * Retrieve global incident settings for the organization. + * Create an incident user-defined field. * - * @return ApiResponse<GlobalIncidentSettingsResponse> + *

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 - * @http.response.details - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
*/ - public ApiResponse getGlobalIncidentSettingsWithHttpInfo() - throws ApiException { + public IncidentUserDefinedFieldResponse createIncidentUserDefinedField( + IncidentUserDefinedFieldCreateRequest body, + CreateIncidentUserDefinedFieldOptionalParameters parameters) + throws ApiException { + return createIncidentUserDefinedFieldWithHttpInfo(body, parameters).getData(); + } + + /** + * Create an incident user-defined field. + * + *

See {@link #createIncidentUserDefinedFieldWithHttpInfoAsync}. + * + * @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. + * + * @param body Incident user-defined field payload. (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
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 { // Check if unstable operation is enabled - String operationId = "getGlobalIncidentSettings"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createIncidentUserDefinedField"); + } + String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/settings"; + String localVarPath = "/api/v2/incidents/config/user-defined-fields"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getGlobalIncidentSettings", + "v2.IncidentsApi.createIncidentUserDefinedField", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get global incident settings. + * Create an incident user-defined field. * - *

See {@link #getGlobalIncidentSettingsWithHttpInfo}. + *

See {@link #createIncidentUserDefinedFieldWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<GlobalIncidentSettingsResponse>> + * @param body Incident user-defined field payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldResponse>> */ - public CompletableFuture> - getGlobalIncidentSettingsWithHttpInfoAsync() { + public CompletableFuture> + createIncidentUserDefinedFieldWithHttpInfoAsync( + IncidentUserDefinedFieldCreateRequest body, + CreateIncidentUserDefinedFieldOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getGlobalIncidentSettings"; + String operationId = "createIncidentUserDefinedField"; 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; + 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 createIncidentUserDefinedField")); + return result; + } + String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/settings"; + String localVarPath = "/api/v2/incidents/config/user-defined-fields"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getGlobalIncidentSettings", + "v2.IncidentsApi.createIncidentUserDefinedField", 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 = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to getIncident. */ - public static class GetIncidentOptionalParameters { - private List include; + /** Manage optional parameters to createIncidentZoomConfiguration. */ + public static class CreateIncidentZoomConfigurationOptionalParameters { + private String include; /** * Set include. * - * @param include Specifies which types of related objects should be included in the response. - * (optional) - * @return GetIncidentOptionalParameters + * @param include Specifies which related objects to include in the response. (optional) + * @return CreateIncidentZoomConfigurationOptionalParameters */ - public GetIncidentOptionalParameters include(List include) { + public CreateIncidentZoomConfigurationOptionalParameters include(String include) { this.include = include; return this; } } /** - * Get the details of an incident. + * Create an incident Zoom configuration. * - *

See {@link #getIncidentWithHttpInfo}. + *

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

See {@link #getIncidentWithHttpInfoAsync}. + *

See {@link #createIncidentZoomConfigurationWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentResponse> + * @param body (required) + * @return CompletableFuture<IncidentZoomConfigurationResponse> */ - public CompletableFuture getIncidentAsync(String incidentId) { - return getIncidentWithHttpInfoAsync(incidentId, new GetIncidentOptionalParameters()) + public CompletableFuture createIncidentZoomConfigurationAsync( + IncidentZoomConfigurationRequest body) { + return createIncidentZoomConfigurationWithHttpInfoAsync( + body, new CreateIncidentZoomConfigurationOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -4411,32 +4751,35 @@ public CompletableFuture getIncidentAsync(String incidentId) { } /** - * Get the details of an incident. + * Create an incident Zoom configuration. * - *

See {@link #getIncidentWithHttpInfo}. + *

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

See {@link #getIncidentWithHttpInfoAsync}. + *

See {@link #createIncidentZoomConfigurationWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentResponse> + * @return CompletableFuture<IncidentZoomConfigurationResponse> */ - public CompletableFuture getIncidentAsync( - String incidentId, GetIncidentOptionalParameters parameters) { - return getIncidentWithHttpInfoAsync(incidentId, parameters) + public CompletableFuture createIncidentZoomConfigurationAsync( + IncidentZoomConfigurationRequest body, + CreateIncidentZoomConfigurationOptionalParameters parameters) { + return createIncidentZoomConfigurationWithHttpInfoAsync(body, parameters) .thenApply( response -> { return response.getData(); @@ -4444,55 +4787,54 @@ public CompletableFuture getIncidentAsync( } /** - * Get the details of an incident by incident_id. + * Create a Zoom configuration for incidents. * - * @param incidentId The UUID of the incident. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentResponse> + * @return ApiResponse<IncidentZoomConfigurationResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * - * * *
Response details
Status Code Description Response Headers
200 OK -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getIncidentWithHttpInfo( - String incidentId, GetIncidentOptionalParameters parameters) throws ApiException { + public ApiResponse createIncidentZoomConfigurationWithHttpInfo( + IncidentZoomConfigurationRequest body, + CreateIncidentZoomConfigurationOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncident"; + String operationId = "createIncidentZoomConfiguration"; 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) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncident"); + 400, + "Missing the required parameter 'body' when calling createIncidentZoomConfiguration"); } - 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())); + String localVarPath = "/api/v2/incidents/config/zoom-configurations"; 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.getIncident", + "v2.IncidentsApi.createIncidentZoomConfiguration", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -4500,64 +4842,67 @@ public ApiResponse getIncidentWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get the details of an incident. + * Create an incident Zoom configuration. * - *

See {@link #getIncidentWithHttpInfo}. + *

See {@link #createIncidentZoomConfigurationWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentResponse>> + * @return CompletableFuture<ApiResponse<IncidentZoomConfigurationResponse>> */ - public CompletableFuture> getIncidentWithHttpInfoAsync( - String incidentId, GetIncidentOptionalParameters parameters) { + public CompletableFuture> + createIncidentZoomConfigurationWithHttpInfoAsync( + IncidentZoomConfigurationRequest body, + CreateIncidentZoomConfigurationOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getIncident"; + String operationId = "createIncidentZoomConfiguration"; 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<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncident")); + 400, + "Missing the required parameter 'body' when calling" + + " createIncidentZoomConfiguration")); 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())); + String localVarPath = "/api/v2/incidents/config/zoom-configurations"; 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.getIncident", + "v2.IncidentsApi.createIncidentZoomConfiguration", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -4565,48 +4910,49 @@ public CompletableFuture> getIncidentWithHttpInfoA 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[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get incident integration metadata details. + * Create an incident Zoom meeting. * - *

See {@link #getIncidentIntegrationWithHttpInfo}. + *

See {@link #createIncidentZoomMeetingWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return IncidentIntegrationMetadataResponse + * @param body (required) + * @return IncidentZoomIntegrationResponse * @throws ApiException if fails to make API call */ - public IncidentIntegrationMetadataResponse getIncidentIntegration( - String incidentId, String integrationMetadataId) throws ApiException { - return getIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId).getData(); + public IncidentZoomIntegrationResponse createIncidentZoomMeeting( + String incidentId, IncidentCreateZoomMeetingRequest body) throws ApiException { + return createIncidentZoomMeetingWithHttpInfo(incidentId, body).getData(); } /** - * Get incident integration metadata details. + * Create an incident Zoom meeting. * - *

See {@link #getIncidentIntegrationWithHttpInfoAsync}. + *

See {@link #createIncidentZoomMeetingWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return CompletableFuture<IncidentIntegrationMetadataResponse> + * @param body (required) + * @return CompletableFuture<IncidentZoomIntegrationResponse> */ - public CompletableFuture getIncidentIntegrationAsync( - String incidentId, String integrationMetadataId) { - return getIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId) + public CompletableFuture createIncidentZoomMeetingAsync( + String incidentId, IncidentCreateZoomMeetingRequest body) { + return createIncidentZoomMeetingWithHttpInfoAsync(incidentId, body) .thenApply( response -> { return response.getData(); @@ -4614,17 +4960,17 @@ public CompletableFuture getIncidentIntegra } /** - * Get incident integration metadata details. + * Create a Zoom meeting for a given incident. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return ApiResponse<IncidentIntegrationMetadataResponse> + * @param body (required) + * @return ApiResponse<IncidentZoomIntegrationResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -4632,44 +4978,40 @@ public CompletableFuture getIncidentIntegra * *
Response details
Status Code Description Response Headers
200 OK -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse getIncidentIntegrationWithHttpInfo( - String incidentId, String integrationMetadataId) throws ApiException { + public ApiResponse createIncidentZoomMeetingWithHttpInfo( + String incidentId, IncidentCreateZoomMeetingRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentIntegration"; + String operationId = "createIncidentZoomMeeting"; 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 getIncidentIntegration"); + 400, + "Missing the required parameter 'incidentId' when calling createIncidentZoomMeeting"); } - // 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" - + " getIncidentIntegration"); + 400, "Missing the required parameter 'body' when calling createIncidentZoomMeeting"); } // 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}/zoom/meeting" .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.getIncidentIntegration", + "v2.IncidentsApi.createIncidentZoomMeeting", localVarPath, new ArrayList(), localVarHeaderParams, @@ -4677,70 +5019,67 @@ public ApiResponse getIncidentIntegrationWi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get incident integration metadata details. + * Create an incident Zoom meeting. * - *

See {@link #getIncidentIntegrationWithHttpInfo}. + *

See {@link #createIncidentZoomMeetingWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param integrationMetadataId The UUID of the incident integration metadata. (required) - * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentZoomIntegrationResponse>> */ - public CompletableFuture> - getIncidentIntegrationWithHttpInfoAsync(String incidentId, String integrationMetadataId) { + public CompletableFuture> + createIncidentZoomMeetingWithHttpInfoAsync( + String incidentId, IncidentCreateZoomMeetingRequest body) { // Check if unstable operation is enabled - String operationId = "getIncidentIntegration"; + String operationId = "createIncidentZoomMeeting"; 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; + Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentId' when calling getIncidentIntegration")); + "Missing the required parameter 'incidentId' when calling" + + " createIncidentZoomMeeting")); return result; } - // verify the required parameter 'integrationMetadataId' is set - if (integrationMetadataId == null) { - CompletableFuture> result = + // 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" - + " getIncidentIntegration")); + 400, "Missing the required parameter 'body' when calling createIncidentZoomMeeting")); 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}/zoom/meeting" .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -4748,7 +5087,7 @@ public ApiResponse getIncidentIntegrationWi try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentIntegration", + "v2.IncidentsApi.createIncidentZoomMeeting", localVarPath, new ArrayList(), localVarHeaderParams, @@ -4756,99 +5095,50 @@ public ApiResponse getIncidentIntegrationWi 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", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, 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; - } - } - - /** - * Get an incident notification rule. - * - *

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

See {@link #getIncidentNotificationRuleWithHttpInfoAsync}. - * - * @param id The ID of the notification rule. (required) - * @return CompletableFuture<IncidentNotificationRule> - */ - public CompletableFuture getIncidentNotificationRuleAsync(UUID id) { - return getIncidentNotificationRuleWithHttpInfoAsync( - id, new GetIncidentNotificationRuleOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get an incident notification rule. + * Create a status page email subscription. * - *

See {@link #getIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createStatuspageEmailSubscriptionWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return IncidentNotificationRule + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return IncidentStatuspageSubscriptionResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationRule getIncidentNotificationRule( - UUID id, GetIncidentNotificationRuleOptionalParameters parameters) throws ApiException { - return getIncidentNotificationRuleWithHttpInfo(id, parameters).getData(); + public IncidentStatuspageSubscriptionResponse createStatuspageEmailSubscription( + String pageId, IncidentStatuspageSubscriptionRequest body) throws ApiException { + return createStatuspageEmailSubscriptionWithHttpInfo(pageId, body).getData(); } /** - * Get an incident notification rule. + * Create a status page email subscription. * - *

See {@link #getIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #createStatuspageEmailSubscriptionWithHttpInfoAsync}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationRule> + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return CompletableFuture<IncidentStatuspageSubscriptionResponse> */ - public CompletableFuture getIncidentNotificationRuleAsync( - UUID id, GetIncidentNotificationRuleOptionalParameters parameters) { - return getIncidentNotificationRuleWithHttpInfoAsync(id, parameters) + public CompletableFuture + createStatuspageEmailSubscriptionAsync( + String pageId, IncidentStatuspageSubscriptionRequest body) { + return createStatuspageEmailSubscriptionWithHttpInfoAsync(pageId, body) .thenApply( response -> { return response.getData(); @@ -4856,219 +5146,176 @@ public CompletableFuture getIncidentNotificationRuleAs } /** - * Retrieves a specific notification rule by its ID. + * Create an email subscription for a status page. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationRule> + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return ApiResponse<IncidentStatuspageSubscriptionResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * - * * *
Response details
Status Code Description Response Headers
200 OK -
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getIncidentNotificationRuleWithHttpInfo( - UUID id, GetIncidentNotificationRuleOptionalParameters parameters) throws ApiException { + public ApiResponse + createStatuspageEmailSubscriptionWithHttpInfo( + String pageId, IncidentStatuspageSubscriptionRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentNotificationRule"; + String operationId = "createStatuspageEmailSubscription"; 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 'pageId' is set + if (pageId == null) { throw new ApiException( - 400, "Missing the required parameter 'id' when calling getIncidentNotificationRule"); + 400, + "Missing the required parameter 'pageId' when calling createStatuspageEmailSubscription"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling createStatuspageEmailSubscription"); } - 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/statuspages/{page_id}/subscriptions/email" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.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.createStatuspageEmailSubscription", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an incident notification rule. + * Create a status page email subscription. * - *

See {@link #getIncidentNotificationRuleWithHttpInfo}. + *

See {@link #createStatuspageEmailSubscriptionWithHttpInfo}. * - * @param id The ID of the notification rule. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentStatuspageSubscriptionResponse>> */ - public CompletableFuture> - getIncidentNotificationRuleWithHttpInfoAsync( - UUID id, GetIncidentNotificationRuleOptionalParameters parameters) { + public CompletableFuture> + createStatuspageEmailSubscriptionWithHttpInfoAsync( + String pageId, IncidentStatuspageSubscriptionRequest body) { // Check if unstable operation is enabled - String operationId = "getIncidentNotificationRule"; + String operationId = "createStatuspageEmailSubscription"; 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 'pageId' is set + if (pageId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'id' when calling getIncidentNotificationRule")); + 400, + "Missing the required parameter 'pageId' when calling" + + " createStatuspageEmailSubscription")); + 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" + + " createStatuspageEmailSubscription")); 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/statuspages/{page_id}/subscriptions/email" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.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.createStatuspageEmailSubscription", 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; } return apiClient.invokeAPIAsync( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, 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; - } + new GenericType() {}); } /** - * Get incident notification template. + * Delete global incident handle. * - *

See {@link #getIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #deleteGlobalIncidentHandleWithHttpInfo}. * - * @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(); + public void deleteGlobalIncidentHandle() throws ApiException { + deleteGlobalIncidentHandleWithHttpInfo(); } /** - * Get incident notification template. + * Delete global incident handle. * - *

See {@link #getIncidentNotificationTemplateWithHttpInfoAsync}. + *

See {@link #deleteGlobalIncidentHandleWithHttpInfoAsync}. * - * @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(); - }); - } - - /** - * Get incident notification template. - * - *

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

See {@link #getIncidentNotificationTemplateWithHttpInfoAsync}. - * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationTemplate> + * @return CompletableFuture */ - public CompletableFuture getIncidentNotificationTemplateAsync( - UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) { - return getIncidentNotificationTemplateWithHttpInfoAsync(id, parameters) + public CompletableFuture deleteGlobalIncidentHandleAsync() { + return deleteGlobalIncidentHandleWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -5076,170 +5323,126 @@ public CompletableFuture getIncidentNotificationTe } /** - * Retrieves a specific notification template by its ID. + * Delete a global incident handle. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationTemplate> + * @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 getIncidentNotificationTemplateWithHttpInfo( - UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { + public ApiResponse deleteGlobalIncidentHandleWithHttpInfo() throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentNotificationTemplate"; + String operationId = "deleteGlobalIncidentHandle"; 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 '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/notification-templates/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + 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.getIncidentNotificationTemplate", + "v2.IncidentsApi.deleteGlobalIncidentHandle", localVarPath, - localVarQueryParams, + 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 notification template. + * Delete global incident handle. * - *

See {@link #getIncidentNotificationTemplateWithHttpInfo}. + *

See {@link #deleteGlobalIncidentHandleWithHttpInfo}. * - * @param id The ID of the notification template. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getIncidentNotificationTemplateWithHttpInfoAsync( - UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) { + public CompletableFuture> deleteGlobalIncidentHandleWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "getIncidentNotificationTemplate"; + 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; - - // 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/notification-templates/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + 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.getIncidentNotificationTemplate", + "v2.IncidentsApi.deleteGlobalIncidentHandle", localVarPath, - localVarQueryParams, + 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() {}); + null); } /** - * Get postmortem template. + * Delete an existing incident. * - *

See {@link #getIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #deleteIncidentWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) - * @return PostmortemTemplateResponse + * @param incidentId The UUID of the incident. (required) * @throws ApiException if fails to make API call */ - public PostmortemTemplateResponse getIncidentPostmortemTemplate(String templateId) - throws ApiException { - return getIncidentPostmortemTemplateWithHttpInfo(templateId).getData(); + public void deleteIncident(String incidentId) throws ApiException { + deleteIncidentWithHttpInfo(incidentId); } /** - * Get postmortem template. + * Delete an existing incident. * - *

See {@link #getIncidentPostmortemTemplateWithHttpInfoAsync}. + *

See {@link #deleteIncidentWithHttpInfoAsync}. * - * @param templateId The ID of the postmortem template (required) - * @return CompletableFuture<PostmortemTemplateResponse> + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentPostmortemTemplateAsync( - String templateId) { - return getIncidentPostmortemTemplateWithHttpInfoAsync(templateId) + public CompletableFuture deleteIncidentAsync(String incidentId) { + return deleteIncidentWithHttpInfoAsync(incidentId) .thenApply( response -> { return response.getData(); @@ -5247,25 +5450,26 @@ public CompletableFuture getIncidentPostmortemTempla } /** - * Retrieve details of a specific postmortem template. + * Deletes an existing incident from the users organization. * - * @param templateId The ID of the postmortem template (required) - * @return ApiResponse<PostmortemTemplateResponse> + * @param incidentId The UUID of the incident. (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 getIncidentPostmortemTemplateWithHttpInfo( - String templateId) throws ApiException { + public ApiResponse deleteIncidentWithHttpInfo(String incidentId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentPostmortemTemplate"; + String operationId = "deleteIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5273,77 +5477,73 @@ public ApiResponse getIncidentPostmortemTemplateWith } Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == null) { + // verify the required parameter 'incidentId' is set + if (incidentId == null) { throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling getIncidentPostmortemTemplate"); + 400, "Missing the required parameter 'incidentId' when calling deleteIncident"); } // create path and map variables String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" + "/api/v2/incidents/{incident_id}" .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentPostmortemTemplate", + "v2.IncidentsApi.deleteIncident", localVarPath, 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); } /** - * Get postmortem template. + * Delete an existing incident. * - *

See {@link #getIncidentPostmortemTemplateWithHttpInfo}. + *

See {@link #deleteIncidentWithHttpInfo}. * - * @param templateId The ID of the postmortem template (required) - * @return CompletableFuture<ApiResponse<PostmortemTemplateResponse>> + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getIncidentPostmortemTemplateWithHttpInfoAsync(String templateId) { + public CompletableFuture> deleteIncidentWithHttpInfoAsync(String incidentId) { // Check if unstable operation is enabled - String operationId = "getIncidentPostmortemTemplate"; + 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; } Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == 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 'templateId' when calling" - + " getIncidentPostmortemTemplate")); + 400, "Missing the required parameter 'incidentId' when calling deleteIncident")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}" + "/api/v2/incidents/{incident_id}" .replaceAll( - "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -5351,56 +5551,54 @@ public ApiResponse getIncidentPostmortemTemplateWith try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentPostmortemTemplate", + "v2.IncidentsApi.deleteIncident", localVarPath, 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() {}); + null); } /** - * Get incident todo details. + * Delete incident attachment. * - *

See {@link #getIncidentTodoWithHttpInfo}. + *

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

See {@link #getIncidentTodoWithHttpInfoAsync}. + *

See {@link #deleteIncidentAttachmentWithHttpInfoAsync}. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return CompletableFuture<IncidentTodoResponse> + * @param attachmentId The ID of the attachment. (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentTodoAsync( - String incidentId, String todoId) { - return getIncidentTodoWithHttpInfoAsync(incidentId, todoId) + public CompletableFuture deleteIncidentAttachmentAsync( + String incidentId, String attachmentId) { + return deleteIncidentAttachmentWithHttpInfoAsync(incidentId, attachmentId) .thenApply( response -> { return response.getData(); @@ -5408,28 +5606,25 @@ public CompletableFuture getIncidentTodoAsync( } /** - * Get incident todo details. - * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return ApiResponse<IncidentTodoResponse> + * @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 getIncidentTodoWithHttpInfo( - String incidentId, String todoId) throws ApiException { + public ApiResponse deleteIncidentAttachmentWithHttpInfo( + String incidentId, String attachmentId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentTodo"; + String operationId = "deleteIncidentAttachment"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5440,60 +5635,62 @@ public ApiResponse getIncidentTodoWithHttpInfo( // verify the required parameter 'incidentId' is set if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncidentTodo"); + 400, "Missing the required parameter 'incidentId' when calling deleteIncidentAttachment"); } - // verify the required parameter 'todoId' is set - if (todoId == null) { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { throw new ApiException( - 400, "Missing the required parameter 'todoId' when calling getIncidentTodo"); + 400, + "Missing the required parameter 'attachmentId' when calling deleteIncidentAttachment"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + .replaceAll( + "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentTodo", + "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 todo details. + * Delete incident attachment. * - *

See {@link #getIncidentTodoWithHttpInfo}. + *

See {@link #deleteIncidentAttachmentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param todoId The UUID of the incident todo. (required) - * @return CompletableFuture<ApiResponse<IncidentTodoResponse>> + * @param attachmentId The ID of the attachment. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> getIncidentTodoWithHttpInfoAsync( - String incidentId, String todoId) { + public CompletableFuture> deleteIncidentAttachmentWithHttpInfoAsync( + String incidentId, String attachmentId) { // Check if unstable operation is enabled - String operationId = "getIncidentTodo"; + 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; @@ -5502,27 +5699,31 @@ public CompletableFuture> getIncidentTodoWithH // 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 getIncidentTodo")); + 400, + "Missing the required parameter 'incidentId' when calling deleteIncidentAttachment")); return result; } - // verify the required parameter 'todoId' is set - if (todoId == 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 'todoId' when calling getIncidentTodo")); + 400, + "Missing the required parameter 'attachmentId' when calling" + + " deleteIncidentAttachment")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) - .replaceAll("\\{" + "todo_id" + "\\}", apiClient.escapeString(todoId.toString())); + .replaceAll( + "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -5530,52 +5731,55 @@ public CompletableFuture> getIncidentTodoWithH try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentTodo", + "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() {}); + null); } /** - * Get incident type details. + * Delete an incident communication. * - *

See {@link #getIncidentTypeWithHttpInfo}. + *

See {@link #deleteIncidentCommunicationWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return IncidentTypeResponse + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) * @throws ApiException if fails to make API call */ - public IncidentTypeResponse getIncidentType(String incidentTypeId) throws ApiException { - return getIncidentTypeWithHttpInfo(incidentTypeId).getData(); + public void deleteIncidentCommunication(String incidentId, UUID communicationId) + throws ApiException { + deleteIncidentCommunicationWithHttpInfo(incidentId, communicationId); } /** - * Get incident type details. + * Delete an incident communication. * - *

See {@link #getIncidentTypeWithHttpInfoAsync}. + *

See {@link #deleteIncidentCommunicationWithHttpInfoAsync}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return CompletableFuture<IncidentTypeResponse> + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @return CompletableFuture */ - public CompletableFuture getIncidentTypeAsync(String incidentTypeId) { - return getIncidentTypeWithHttpInfoAsync(incidentTypeId) + public CompletableFuture deleteIncidentCommunicationAsync( + String incidentId, UUID communicationId) { + return deleteIncidentCommunicationWithHttpInfoAsync(incidentId, communicationId) .thenApply( response -> { return response.getData(); @@ -5583,16 +5787,17 @@ public CompletableFuture getIncidentTypeAsync(String incid } /** - * Get incident type details. + * Delete a communication for a given incident. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return ApiResponse<IncidentTypeResponse> + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -5600,10 +5805,10 @@ public CompletableFuture getIncidentTypeAsync(String incid * *
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 getIncidentTypeWithHttpInfo(String incidentTypeId) - throws ApiException { + public ApiResponse deleteIncidentCommunicationWithHttpInfo( + String incidentId, UUID communicationId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIncidentType"; + String operationId = "deleteIncidentCommunication"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5611,76 +5816,103 @@ public ApiResponse getIncidentTypeWithHttpInfo(String inci } Object localVarPostBody = null; - // 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 getIncidentType"); + 400, + "Missing the required parameter 'incidentId' when calling deleteIncidentCommunication"); + } + + // verify the required parameter 'communicationId' is set + if (communicationId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'communicationId' when calling" + + " deleteIncidentCommunication"); } // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/{incident_id}/communications/{communication_id}" .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "communication_id" + "\\}", + apiClient.escapeString(communicationId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentType", + "v2.IncidentsApi.deleteIncidentCommunication", 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 type details. + * Delete an incident communication. * - *

See {@link #getIncidentTypeWithHttpInfo}. + *

See {@link #deleteIncidentCommunicationWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> getIncidentTypeWithHttpInfoAsync( - String incidentTypeId) { + public CompletableFuture> deleteIncidentCommunicationWithHttpInfoAsync( + String incidentId, UUID communicationId) { // Check if unstable operation is enabled - String operationId = "getIncidentType"; + String operationId = "deleteIncidentCommunication"; 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 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentTypeId' when calling getIncidentType")); + 400, + "Missing the required parameter 'incidentId' when calling" + + " deleteIncidentCommunication")); + return result; + } + + // verify the required parameter 'communicationId' is set + if (communicationId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'communicationId' when calling" + + " deleteIncidentCommunication")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/{incident_id}/communications/{communication_id}" .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "communication_id" + "\\}", + apiClient.escapeString(communicationId.toString())); Map localVarHeaderParams = new HashMap(); @@ -5688,74 +5920,53 @@ public CompletableFuture> getIncidentTypeWithH try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentType", + "v2.IncidentsApi.deleteIncidentCommunication", 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 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; - } + null); } /** - * Get an incident user-defined field. + * Delete an incident impact. * - *

See {@link #getIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #deleteIncidentImpactWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @return IncidentUserDefinedFieldResponse + * @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 IncidentUserDefinedFieldResponse getIncidentUserDefinedField(String fieldId) - throws ApiException { - return getIncidentUserDefinedFieldWithHttpInfo( - fieldId, new GetIncidentUserDefinedFieldOptionalParameters()) - .getData(); + public void deleteIncidentImpact(String incidentId, String impactId) throws ApiException { + deleteIncidentImpactWithHttpInfo(incidentId, impactId); } /** - * Get an incident user-defined field. + * Delete an incident impact. * - *

See {@link #getIncidentUserDefinedFieldWithHttpInfoAsync}. + *

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

See {@link #getIncidentUserDefinedFieldWithHttpInfo}. + * Delete an incident impact. * - * @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 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 IncidentUserDefinedFieldResponse getIncidentUserDefinedField( - String fieldId, GetIncidentUserDefinedFieldOptionalParameters parameters) + public ApiResponse deleteIncidentImpactWithHttpInfo(String incidentId, String impactId) throws ApiException { - return getIncidentUserDefinedFieldWithHttpInfo(fieldId, parameters).getData(); - } + Object localVarPostBody = null; - /** - * 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)); + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling deleteIncidentImpact"); } - Object localVarPostBody = null; - // verify the required parameter 'fieldId' is set - if (fieldId == null) { + // verify the required parameter 'impactId' is set + if (impactId == null) { throw new ApiException( - 400, "Missing the required parameter 'fieldId' when calling getIncidentUserDefinedField"); + 400, "Missing the required parameter 'impactId' when calling deleteIncidentImpact"); } - 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}/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("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentUserDefinedField", + "v2.IncidentsApi.deleteIncidentImpact", 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 impact. * - *

See {@link #getIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #deleteIncidentImpactWithHttpInfo}. * - * @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 impactId The UUID of the incident impact. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - 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<>(); + 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(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling deleteIncidentImpact")); return result; } - Object localVarPostBody = null; - // verify the required parameter 'fieldId' is set - if (fieldId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'impactId' is set + if (impactId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'fieldId' when calling getIncidentUserDefinedField")); + 400, "Missing the required parameter 'impactId' when calling deleteIncidentImpact")); 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}/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("", "include", include)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.getIncidentUserDefinedField", + "v2.IncidentsApi.deleteIncidentImpact", 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 integration metadata. * - *

See {@link #importIncidentWithHttpInfo}. + *

See {@link #deleteIncidentIntegrationWithHttpInfo}. * - * @param body Incident import payload. (required) - * @param parameters Optional parameters for the request. - * @return IncidentImportResponse + * @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 IncidentImportResponse importIncident( - IncidentImportRequest body, ImportIncidentOptionalParameters parameters) throws ApiException { - return importIncidentWithHttpInfo(body, parameters).getData(); + public void deleteIncidentIntegration(String incidentId, String integrationMetadataId) + throws ApiException { + deleteIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId); } /** - * Import an incident. + * Delete an incident integration metadata. * - *

See {@link #importIncidentWithHttpInfoAsync}. + *

See {@link #deleteIncidentIntegrationWithHttpInfoAsync}. * - * @param body Incident import payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentImportResponse> + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture */ - public CompletableFuture importIncidentAsync( - IncidentImportRequest body, ImportIncidentOptionalParameters parameters) { - return importIncidentWithHttpInfoAsync(body, parameters) + public CompletableFuture deleteIncidentIntegrationAsync( + String incidentId, String integrationMetadataId) { + return deleteIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId) .thenApply( response -> { return response.getData(); @@ -6016,19 +6135,17 @@ 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 integration metadata. * - * @param body Incident import payload. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentImportResponse> + * @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 * * * - * + * * * * @@ -6036,189 +6153,166 @@ public CompletableFuture importIncidentAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
204 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse importIncidentWithHttpInfo( - IncidentImportRequest body, ImportIncidentOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentIntegrationWithHttpInfo( + String incidentId, String integrationMetadataId) throws ApiException { // Check if unstable operation is enabled - String operationId = "importIncident"; + String operationId = "deleteIncidentIntegration"; 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 'incidentId' is set + if (incidentId == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling importIncident"); + 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"); } - List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/import"; + 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())); - 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.deleteIncidentIntegration", 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 integration metadata. * - *

See {@link #importIncidentWithHttpInfo}. + *

See {@link #deleteIncidentIntegrationWithHttpInfo}. * - * @param body Incident import payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentImportResponse>> + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> importIncidentWithHttpInfoAsync( - IncidentImportRequest body, ImportIncidentOptionalParameters parameters) { + public CompletableFuture> deleteIncidentIntegrationWithHttpInfoAsync( + String incidentId, String integrationMetadataId) { // Check if unstable operation is enabled - String operationId = "importIncident"; + 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 = body; + Object localVarPostBody = null; - // 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 importIncident")); + 400, + "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; } - List include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/import"; + 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())); - 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.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( - "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; - } - } - - /** - * 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(); - }); + null); } /** - * List global incident handles. + * Delete an incident Jira template. * - *

See {@link #listGlobalIncidentHandlesWithHttpInfo}. + *

See {@link #deleteIncidentJiraTemplateWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return IncidentHandlesResponse + * @param templateId The ID of the Jira template. (required) * @throws ApiException if fails to make API call */ - public IncidentHandlesResponse listGlobalIncidentHandles( - ListGlobalIncidentHandlesOptionalParameters parameters) throws ApiException { - return listGlobalIncidentHandlesWithHttpInfo(parameters).getData(); + public void deleteIncidentJiraTemplate(UUID templateId) throws ApiException { + deleteIncidentJiraTemplateWithHttpInfo(templateId); } /** - * List global incident handles. + * Delete an incident Jira template. * - *

See {@link #listGlobalIncidentHandlesWithHttpInfoAsync}. + *

See {@link #deleteIncidentJiraTemplateWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentHandlesResponse> + * @param templateId The ID of the Jira template. (required) + * @return CompletableFuture */ - public CompletableFuture listGlobalIncidentHandlesAsync( - ListGlobalIncidentHandlesOptionalParameters parameters) { - return listGlobalIncidentHandlesWithHttpInfoAsync(parameters) + public CompletableFuture deleteIncidentJiraTemplateAsync(UUID templateId) { + return deleteIncidentJiraTemplateWithHttpInfoAsync(templateId) .thenApply( response -> { return response.getData(); @@ -6226,174 +6320,177 @@ public CompletableFuture listGlobalIncidentHandlesAsync } /** - * Retrieve a list of global incident handles. + * Delete an incident Jira template by its identifier. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentHandlesResponse> + * @param templateId The ID of the Jira 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 listGlobalIncidentHandlesWithHttpInfo( - ListGlobalIncidentHandlesOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentJiraTemplateWithHttpInfo(UUID templateId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listGlobalIncidentHandles"; + String operationId = "deleteIncidentJiraTemplate"; 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 'templateId' is set + if (templateId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'templateId' when calling deleteIncidentJiraTemplate"); + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/config/jira-templates/{template_id}" + .replaceAll( + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.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.deleteIncidentJiraTemplate", 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 Jira template. * - *

See {@link #listGlobalIncidentHandlesWithHttpInfo}. + *

See {@link #deleteIncidentJiraTemplateWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentHandlesResponse>> + * @param templateId The ID of the Jira template. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listGlobalIncidentHandlesWithHttpInfoAsync( - ListGlobalIncidentHandlesOptionalParameters parameters) { + public CompletableFuture> deleteIncidentJiraTemplateWithHttpInfoAsync( + UUID templateId) { // Check if unstable operation is enabled - String operationId = "listGlobalIncidentHandles"; + String operationId = "deleteIncidentJiraTemplate"; 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 'templateId' is set + if (templateId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'templateId' when calling" + + " deleteIncidentJiraTemplate")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/config/jira-templates/{template_id}" + .replaceAll( + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.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.deleteIncidentJiraTemplate", 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() {}); + null); } - /** Manage optional parameters to listIncidentAttachments. */ - public static class ListIncidentAttachmentsOptionalParameters { - private String filterAttachmentType; + /** Manage optional parameters to deleteIncidentNotificationRule. */ + public static class DeleteIncidentNotificationRuleOptionalParameters { 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 + * @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 ListIncidentAttachmentsOptionalParameters include(String include) { + public DeleteIncidentNotificationRuleOptionalParameters include(String include) { this.include = include; return this; } } /** - * List incident attachments. + * Delete an incident notification rule. * - *

See {@link #listIncidentAttachmentsWithHttpInfo}. + *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @return AttachmentArray + * @param id The ID of the notification rule. (required) * @throws ApiException if fails to make API call */ - public AttachmentArray listIncidentAttachments(String incidentId) throws ApiException { - return listIncidentAttachmentsWithHttpInfo( - incidentId, new ListIncidentAttachmentsOptionalParameters()) - .getData(); + public void deleteIncidentNotificationRule(UUID id) throws ApiException { + deleteIncidentNotificationRuleWithHttpInfo( + id, new DeleteIncidentNotificationRuleOptionalParameters()); } /** - * List incident attachments. + * Delete an incident notification rule. * - *

See {@link #listIncidentAttachmentsWithHttpInfoAsync}. + *

See {@link #deleteIncidentNotificationRuleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<AttachmentArray> + * @param id The ID of the notification rule. (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentAttachmentsAsync(String incidentId) { - return listIncidentAttachmentsWithHttpInfoAsync( - incidentId, new ListIncidentAttachmentsOptionalParameters()) + public CompletableFuture deleteIncidentNotificationRuleAsync(UUID id) { + return deleteIncidentNotificationRuleWithHttpInfoAsync( + id, new DeleteIncidentNotificationRuleOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6401,32 +6498,31 @@ incidentId, new ListIncidentAttachmentsOptionalParameters()) } /** - * List incident attachments. + * Delete an incident notification rule. * - *

See {@link #listIncidentAttachmentsWithHttpInfo}. + *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) + * @param id The ID of the notification rule. (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(); + public void deleteIncidentNotificationRule( + UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) throws ApiException { + deleteIncidentNotificationRuleWithHttpInfo(id, parameters); } /** - * List incident attachments. + * Delete an incident notification rule. * - *

See {@link #listIncidentAttachmentsWithHttpInfoAsync}. + *

See {@link #deleteIncidentNotificationRuleWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) + * @param id The ID of the notification rule. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<AttachmentArray> + * @return CompletableFuture */ - public CompletableFuture listIncidentAttachmentsAsync( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { - return listIncidentAttachmentsWithHttpInfoAsync(incidentId, parameters) + public CompletableFuture deleteIncidentNotificationRuleAsync( + UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) { + return deleteIncidentNotificationRuleWithHttpInfoAsync(id, parameters) .thenApply( response -> { return response.getData(); @@ -6434,25 +6530,28 @@ public CompletableFuture listIncidentAttachmentsAsync( } /** - * List incident attachments. + * Deletes a notification rule by its ID. * - * @param incidentId The UUID of the incident. (required) + * @param id The ID of the notification rule. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<AttachmentArray> + * @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 listIncidentAttachmentsWithHttpInfo( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentNotificationRuleWithHttpInfo( + UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentAttachments"; + String operationId = "deleteIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6460,163 +6559,154 @@ public ApiResponse listIncidentAttachmentsWithHttpInfo( } Object localVarPostBody = null; - // 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 listIncidentAttachments"); + 400, "Missing the required parameter 'id' when calling deleteIncidentNotificationRule"); } - 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())); + "/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("", "filter[attachment_type]", filterAttachmentType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentAttachments", + "v2.IncidentsApi.deleteIncidentNotificationRule", localVarPath, 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); } /** - * List incident attachments. + * Delete an incident notification rule. * - *

See {@link #listIncidentAttachmentsWithHttpInfo}. + *

See {@link #deleteIncidentNotificationRuleWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) + * @param id The ID of the notification rule. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<AttachmentArray>> + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> listIncidentAttachmentsWithHttpInfoAsync( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { + public CompletableFuture> deleteIncidentNotificationRuleWithHttpInfoAsync( + UUID id, DeleteIncidentNotificationRuleOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listIncidentAttachments"; + 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 '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 listIncidentAttachments")); + "Missing the required parameter 'id' when calling deleteIncidentNotificationRule")); 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())); + "/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("", "filter[attachment_type]", filterAttachmentType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentAttachments", + "v2.IncidentsApi.deleteIncidentNotificationRule", localVarPath, 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 listIncidentImpacts. */ - public static class ListIncidentImpactsOptionalParameters { - private List include; + /** Manage optional parameters to deleteIncidentNotificationTemplate. */ + public static class DeleteIncidentNotificationTemplateOptionalParameters { + private String include; /** * Set include. * - * @param include Specifies which related resources should be included in the response. + * @param include Comma-separated list of relationships to include. Supported values: + * created_by_user, last_modified_by_user, incident_type * (optional) - * @return ListIncidentImpactsOptionalParameters + * @return DeleteIncidentNotificationTemplateOptionalParameters */ - public ListIncidentImpactsOptionalParameters include( - List include) { + public DeleteIncidentNotificationTemplateOptionalParameters include(String include) { this.include = include; return this; } } /** - * List an incident's impacts. + * Delete a notification template. * - *

See {@link #listIncidentImpactsWithHttpInfo}. + *

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

See {@link #listIncidentImpactsWithHttpInfoAsync}. + *

See {@link #deleteIncidentNotificationTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentImpactsResponse> + * @param id The ID of the notification template. (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentImpactsAsync(String incidentId) { - return listIncidentImpactsWithHttpInfoAsync( - incidentId, new ListIncidentImpactsOptionalParameters()) + public CompletableFuture deleteIncidentNotificationTemplateAsync(UUID id) { + return deleteIncidentNotificationTemplateWithHttpInfoAsync( + id, new DeleteIncidentNotificationTemplateOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6624,32 +6714,32 @@ incidentId, new ListIncidentImpactsOptionalParameters()) } /** - * List an incident's impacts. + * Delete a notification template. * - *

See {@link #listIncidentImpactsWithHttpInfo}. + *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) + * @param id The ID of the notification template. (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(); + public void deleteIncidentNotificationTemplate( + UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) + throws ApiException { + deleteIncidentNotificationTemplateWithHttpInfo(id, parameters); } /** - * List an incident's impacts. + * Delete a notification template. * - *

See {@link #listIncidentImpactsWithHttpInfoAsync}. + *

See {@link #deleteIncidentNotificationTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) + * @param id The ID of the notification template. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentImpactsResponse> + * @return CompletableFuture */ - public CompletableFuture listIncidentImpactsAsync( - String incidentId, ListIncidentImpactsOptionalParameters parameters) { - return listIncidentImpactsWithHttpInfoAsync(incidentId, parameters) + public CompletableFuture deleteIncidentNotificationTemplateAsync( + UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) { + return deleteIncidentNotificationTemplateWithHttpInfoAsync(id, parameters) .thenApply( response -> { return response.getData(); @@ -6657,17 +6747,17 @@ public CompletableFuture listIncidentImpactsAsync( } /** - * Get all impacts for an incident. + * Deletes a notification template by its ID. * - * @param incidentId The UUID of the incident. (required) + * @param id The ID of the notification template. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentImpactsResponse> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -6675,133 +6765,148 @@ 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 deleteIncidentNotificationTemplateWithHttpInfo( + UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteIncidentNotificationTemplate"; + 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 'id' is set + if (id == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentImpacts"); + 400, + "Missing the required parameter 'id' when calling deleteIncidentNotificationTemplate"); } - List include = parameters.include; + String 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/notification-templates/{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.listIncidentImpacts", + "v2.IncidentsApi.deleteIncidentNotificationTemplate", localVarPath, 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); } /** - * List an incident's impacts. + * Delete a notification template. * - *

See {@link #listIncidentImpactsWithHttpInfo}. + *

See {@link #deleteIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) + * @param id The ID of the notification template. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentImpactsResponse>> + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listIncidentImpactsWithHttpInfoAsync( - String incidentId, ListIncidentImpactsOptionalParameters parameters) { + public CompletableFuture> deleteIncidentNotificationTemplateWithHttpInfoAsync( + UUID id, DeleteIncidentNotificationTemplateOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "deleteIncidentNotificationTemplate"; + 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 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentImpacts")); + 400, + "Missing the required parameter 'id' when calling" + + " deleteIncidentNotificationTemplate")); return result; } - List include = parameters.include; + String 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/notification-templates/{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.listIncidentImpacts", + "v2.IncidentsApi.deleteIncidentNotificationTemplate", localVarPath, 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 a list of an incident's integration metadata. + * Delete postmortem template. * - *

See {@link #listIncidentIntegrationsWithHttpInfo}. + *

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

See {@link #listIncidentIntegrationsWithHttpInfoAsync}. + *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentIntegrationMetadataListResponse> + * @param templateId The ID of the postmortem template (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentIntegrationsAsync( - String incidentId) { - return listIncidentIntegrationsWithHttpInfoAsync(incidentId) + public CompletableFuture deleteIncidentPostmortemTemplateAsync(String templateId) { + return deleteIncidentPostmortemTemplateWithHttpInfoAsync(templateId) .thenApply( response -> { return response.getData(); @@ -6809,27 +6914,25 @@ public CompletableFuture listIncidentIn } /** - * Get all integration metadata for an incident. + * Delete a postmortem template. * - * @param incidentId The UUID of the incident. (required) - * @return ApiResponse<IncidentIntegrationMetadataListResponse> + * @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 listIncidentIntegrationsWithHttpInfo( - String incidentId) throws ApiException { + public ApiResponse deleteIncidentPostmortemTemplateWithHttpInfo(String templateId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentIntegrations"; + String operationId = "deleteIncidentPostmortemTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6837,77 +6940,78 @@ public ApiResponse listIncidentIntegrat } Object localVarPostBody = null; - // verify the required parameter 'incidentId' is set - if (incidentId == null) { + // verify the required parameter 'templateId' is set + if (templateId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentIntegrations"); + 400, + "Missing the required parameter 'templateId' when calling" + + " deleteIncidentPostmortemTemplate"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations" + "/api/v2/incidents/config/postmortem-templates/{template_id}" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentIntegrations", + "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 a list of an incident's integration metadata. + * Delete postmortem template. * - *

See {@link #listIncidentIntegrationsWithHttpInfo}. + *

See {@link #deleteIncidentPostmortemTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataListResponse>> + * @param templateId The ID of the postmortem template (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listIncidentIntegrationsWithHttpInfoAsync(String incidentId) { + public CompletableFuture> deleteIncidentPostmortemTemplateWithHttpInfoAsync( + String templateId) { // Check if unstable operation is enabled - String operationId = "listIncidentIntegrations"; + 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 'incidentId' is set - if (incidentId == 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 'incidentId' when calling listIncidentIntegrations")); + "Missing the required parameter 'templateId' when calling" + + " deleteIncidentPostmortemTemplate")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations" + "/api/v2/incidents/config/postmortem-templates/{template_id}" .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); Map localVarHeaderParams = new HashMap(); @@ -6915,103 +7019,51 @@ public ApiResponse listIncidentIntegrat try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentIntegrations", + "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 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 role assignment. * - *

See {@link #listIncidentNotificationRulesWithHttpInfo}. + *

See {@link #deleteIncidentRoleAssignmentWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return IncidentNotificationRuleArray + * @param roleAssignmentId The ID of the role assignment. (required) * @throws ApiException if fails to make API call */ - public IncidentNotificationRuleArray listIncidentNotificationRules( - ListIncidentNotificationRulesOptionalParameters parameters) throws ApiException { - return listIncidentNotificationRulesWithHttpInfo(parameters).getData(); + public void deleteIncidentRoleAssignment(UUID roleAssignmentId) throws ApiException { + deleteIncidentRoleAssignmentWithHttpInfo(roleAssignmentId); } /** - * List incident notification rules. + * Delete an incident role assignment. * - *

See {@link #listIncidentNotificationRulesWithHttpInfoAsync}. + *

See {@link #deleteIncidentRoleAssignmentWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationRuleArray> + * @param roleAssignmentId The ID of the role assignment. (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentNotificationRulesAsync( - ListIncidentNotificationRulesOptionalParameters parameters) { - return listIncidentNotificationRulesWithHttpInfoAsync(parameters) + public CompletableFuture deleteIncidentRoleAssignmentAsync(UUID roleAssignmentId) { + return deleteIncidentRoleAssignmentWithHttpInfoAsync(roleAssignmentId) .thenApply( response -> { return response.getData(); @@ -7019,16 +7071,16 @@ public CompletableFuture listIncidentNotification } /** - * Lists all notification rules for the organization. Optionally filter by incident type. + * Delete a role assignment by its identifier. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationRuleArray> + * @param roleAssignmentId The ID of the role assignment. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -7036,193 +7088,147 @@ public CompletableFuture listIncidentNotification * *
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 listIncidentNotificationRulesWithHttpInfo( - ListIncidentNotificationRulesOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentRoleAssignmentWithHttpInfo(UUID roleAssignmentId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentNotificationRules"; + String operationId = "deleteIncidentRoleAssignment"; 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 'roleAssignmentId' is set + if (roleAssignmentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'roleAssignmentId' when calling" + + " deleteIncidentRoleAssignment"); + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-rules"; + String localVarPath = + "/api/v2/incidents/role_assignments/{role_assignment_id}" + .replaceAll( + "\\{" + "role_assignment_id" + "\\}", + apiClient.escapeString(roleAssignmentId.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.deleteIncidentRoleAssignment", 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 incident notification rules. + * Delete an incident role assignment. * - *

See {@link #listIncidentNotificationRulesWithHttpInfo}. + *

See {@link #deleteIncidentRoleAssignmentWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationRuleArray>> + * @param roleAssignmentId The ID of the role assignment. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listIncidentNotificationRulesWithHttpInfoAsync( - ListIncidentNotificationRulesOptionalParameters parameters) { + public CompletableFuture> deleteIncidentRoleAssignmentWithHttpInfoAsync( + UUID roleAssignmentId) { // Check if unstable operation is enabled - String operationId = "listIncidentNotificationRules"; + String operationId = "deleteIncidentRoleAssignment"; 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 'roleAssignmentId' is set + if (roleAssignmentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'roleAssignmentId' when calling" + + " deleteIncidentRoleAssignment")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-rules"; + String localVarPath = + "/api/v2/incidents/role_assignments/{role_assignment_id}" + .replaceAll( + "\\{" + "role_assignment_id" + "\\}", + apiClient.escapeString(roleAssignmentId.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.deleteIncidentRoleAssignment", 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 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(); - }); + null); } /** - * List incident notification templates. + * Delete an incident timeline entry. * - *

See {@link #listIncidentNotificationTemplatesWithHttpInfo}. + *

See {@link #deleteIncidentTimelineEntryWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return IncidentNotificationTemplateArray + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) * @throws ApiException if fails to make API call */ - public IncidentNotificationTemplateArray listIncidentNotificationTemplates( - ListIncidentNotificationTemplatesOptionalParameters parameters) throws ApiException { - return listIncidentNotificationTemplatesWithHttpInfo(parameters).getData(); + public void deleteIncidentTimelineEntry(String incidentId, UUID timelineEntryId) + throws ApiException { + deleteIncidentTimelineEntryWithHttpInfo(incidentId, timelineEntryId); } /** - * List incident notification templates. + * Delete an incident timeline entry. * - *

See {@link #listIncidentNotificationTemplatesWithHttpInfoAsync}. + *

See {@link #deleteIncidentTimelineEntryWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationTemplateArray> + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) + * @return CompletableFuture */ - public CompletableFuture - listIncidentNotificationTemplatesAsync( - ListIncidentNotificationTemplatesOptionalParameters parameters) { - return listIncidentNotificationTemplatesWithHttpInfoAsync(parameters) + public CompletableFuture deleteIncidentTimelineEntryAsync( + String incidentId, UUID timelineEntryId) { + return deleteIncidentTimelineEntryWithHttpInfoAsync(incidentId, timelineEntryId) .thenApply( response -> { return response.getData(); @@ -7230,16 +7236,17 @@ public IncidentNotificationTemplateArray listIncidentNotificationTemplates( } /** - * Lists all notification templates. Optionally filter by incident type. + * Delete a timeline entry for a given incident. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationTemplateArray> + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -7247,133 +7254,168 @@ public IncidentNotificationTemplateArray listIncidentNotificationTemplates( * *
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 - listIncidentNotificationTemplatesWithHttpInfo( - ListIncidentNotificationTemplatesOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentTimelineEntryWithHttpInfo( + String incidentId, UUID timelineEntryId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentNotificationTemplates"; + String operationId = "deleteIncidentTimelineEntry"; 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; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'incidentId' when calling deleteIncidentTimelineEntry"); + } + + // verify the required parameter 'timelineEntryId' is set + if (timelineEntryId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'timelineEntryId' when calling" + + " deleteIncidentTimelineEntry"); + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "timeline_entry_id" + "\\}", + apiClient.escapeString(timelineEntryId.toString())); - 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.deleteIncidentTimelineEntry", 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 incident notification templates. + * Delete an incident timeline entry. * - *

See {@link #listIncidentNotificationTemplatesWithHttpInfo}. + *

See {@link #deleteIncidentTimelineEntryWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationTemplateArray>> + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listIncidentNotificationTemplatesWithHttpInfoAsync( - ListIncidentNotificationTemplatesOptionalParameters parameters) { + public CompletableFuture> deleteIncidentTimelineEntryWithHttpInfoAsync( + String incidentId, UUID timelineEntryId) { // Check if unstable operation is enabled - String operationId = "listIncidentNotificationTemplates"; + String operationId = "deleteIncidentTimelineEntry"; 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; - UUID filterIncidentType = parameters.filterIncidentType; - 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" + + " deleteIncidentTimelineEntry")); + return result; + } + + // verify the required parameter 'timelineEntryId' is set + if (timelineEntryId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'timelineEntryId' when calling" + + " deleteIncidentTimelineEntry")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/notification-templates"; + String localVarPath = + "/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "timeline_entry_id" + "\\}", + apiClient.escapeString(timelineEntryId.toString())); - 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.deleteIncidentTimelineEntry", 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); } /** - * List postmortem templates. + * Delete an incident todo. * - *

See {@link #listIncidentPostmortemTemplatesWithHttpInfo}. + *

See {@link #deleteIncidentTodoWithHttpInfo}. * - * @return PostmortemTemplatesResponse + * @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 PostmortemTemplatesResponse listIncidentPostmortemTemplates() throws ApiException { - return listIncidentPostmortemTemplatesWithHttpInfo().getData(); + public void deleteIncidentTodo(String incidentId, String todoId) throws ApiException { + deleteIncidentTodoWithHttpInfo(incidentId, todoId); } /** - * List postmortem templates. + * Delete an incident todo. * - *

See {@link #listIncidentPostmortemTemplatesWithHttpInfoAsync}. + *

See {@link #deleteIncidentTodoWithHttpInfoAsync}. * - * @return CompletableFuture<PostmortemTemplatesResponse> + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentPostmortemTemplatesAsync() { - return listIncidentPostmortemTemplatesWithHttpInfoAsync() + public CompletableFuture deleteIncidentTodoAsync(String incidentId, String todoId) { + return deleteIncidentTodoWithHttpInfoAsync(incidentId, todoId) .thenApply( response -> { return response.getData(); @@ -7381,77 +7423,121 @@ public CompletableFuture listIncidentPostmortemTemp } /** - * Retrieve a list of all postmortem templates for incidents. + * Delete an incident todo. * - * @return ApiResponse<PostmortemTemplatesResponse> + * @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 listIncidentPostmortemTemplatesWithHttpInfo() + public ApiResponse deleteIncidentTodoWithHttpInfo(String incidentId, String todoId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentPostmortemTemplates"; + 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; - // create path and map variables - String localVarPath = "/api/v2/incidents/config/postmortem-templates"; - Map localVarHeaderParams = new HashMap(); + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentId' when calling deleteIncidentTodo"); + } - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentsApi.listIncidentPostmortemTemplates", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + // 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/{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.deleteIncidentTodo", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * List postmortem templates. + * Delete an incident todo. * - *

See {@link #listIncidentPostmortemTemplatesWithHttpInfo}. + *

See {@link #deleteIncidentTodoWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<PostmortemTemplatesResponse>> + * @param incidentId The UUID of the incident. (required) + * @param todoId The UUID of the incident todo. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listIncidentPostmortemTemplatesWithHttpInfoAsync() { + public CompletableFuture> deleteIncidentTodoWithHttpInfoAsync( + String incidentId, String todoId) { // Check if unstable operation is enabled - String operationId = "listIncidentPostmortemTemplates"; + 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; + + // 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/postmortem-templates"; + 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(); @@ -7459,125 +7545,51 @@ public ApiResponse listIncidentPostmortemTemplatesW try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentPostmortemTemplates", + "v2.IncidentsApi.deleteIncidentTodo", localVarPath, 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 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(); - }); + null); } /** - * Get a list of incidents. + * Delete an incident type. * - *

See {@link #listIncidentsWithHttpInfo}. + *

See {@link #deleteIncidentTypeWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return IncidentsResponse + * @param incidentTypeId The UUID of the incident type. (required) * @throws ApiException if fails to make API call */ - public IncidentsResponse listIncidents(ListIncidentsOptionalParameters parameters) - throws ApiException { - return listIncidentsWithHttpInfo(parameters).getData(); + public void deleteIncidentType(String incidentTypeId) throws ApiException { + deleteIncidentTypeWithHttpInfo(incidentTypeId); } /** - * Get a list of incidents. + * Delete an incident type. * - *

See {@link #listIncidentsWithHttpInfoAsync}. + *

See {@link #deleteIncidentTypeWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentsResponse> + * @param incidentTypeId The UUID of the incident type. (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentsAsync( - ListIncidentsOptionalParameters parameters) { - return listIncidentsWithHttpInfoAsync(parameters) + public CompletableFuture deleteIncidentTypeAsync(String incidentTypeId) { + return deleteIncidentTypeWithHttpInfoAsync(incidentTypeId) .thenApply( response -> { return response.getData(); @@ -7585,70 +7597,16 @@ 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. + * Delete an incident type. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentsResponse> + * @param incidentTypeId The UUID of the incident type. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -7656,133 +7614,140 @@ public PaginationIterable listIncidentsWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
204 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse listIncidentsWithHttpInfo( - ListIncidentsOptionalParameters parameters) throws ApiException { + public ApiResponse deleteIncidentTypeWithHttpInfo(String incidentTypeId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidents"; + String operationId = "deleteIncidentType"; 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)); + // verify the required parameter 'incidentTypeId' is set + if (incidentTypeId == null) { + throw new ApiException( + 400, "Missing the required parameter 'incidentTypeId' when calling deleteIncidentType"); + } + // 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.listIncidents", + "v2.IncidentsApi.deleteIncidentType", 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 a list of incidents. + * Delete an incident type. * - *

See {@link #listIncidentsWithHttpInfo}. + *

See {@link #deleteIncidentTypeWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentsResponse>> + * @param incidentTypeId The UUID of the incident type. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> listIncidentsWithHttpInfoAsync( - ListIncidentsOptionalParameters parameters) { + public CompletableFuture> deleteIncidentTypeWithHttpInfoAsync( + String incidentTypeId) { // Check if unstable operation is enabled - String operationId = "listIncidents"; + 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; - List include = parameters.include; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; + + // 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 deleteIncidentType")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents"; + String localVarPath = + "/api/v2/incidents/config/types/{incident_type_id}" + .replaceAll( + "\\{" + "incident_type_id" + "\\}", + apiClient.escapeString(incidentTypeId.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.deleteIncidentType", 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 todos. + * Delete an incident user-defined field. * - *

See {@link #listIncidentTodosWithHttpInfo}. + *

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

See {@link #listIncidentTodosWithHttpInfoAsync}. + *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentTodoListResponse> + * @param fieldId The ID of the incident user-defined field. (required) + * @return CompletableFuture */ - public CompletableFuture listIncidentTodosAsync(String incidentId) { - return listIncidentTodosWithHttpInfoAsync(incidentId) + public CompletableFuture deleteIncidentUserDefinedFieldAsync(String fieldId) { + return deleteIncidentUserDefinedFieldWithHttpInfoAsync(fieldId) .thenApply( response -> { return response.getData(); @@ -7790,16 +7755,16 @@ public CompletableFuture listIncidentTodosAsync(String } /** - * Get all todos for an incident. + * Delete an incident user-defined field. * - * @param incidentId The UUID of the incident. (required) - * @return ApiResponse<IncidentTodoListResponse> + * @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 * * * - * + * * * * @@ -7807,10 +7772,10 @@ public CompletableFuture listIncidentTodosAsync(String * *
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 listIncidentTodosWithHttpInfo(String incidentId) + public ApiResponse deleteIncidentUserDefinedFieldWithHttpInfo(String fieldId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentTodos"; + String operationId = "deleteIncidentUserDefinedField"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -7818,74 +7783,75 @@ public ApiResponse listIncidentTodosWithHttpInfo(Strin } 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 listIncidentTodos"); + 400, + "Missing the required parameter 'fieldId' when calling deleteIncidentUserDefinedField"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "/api/v2/incidents/config/user-defined-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentTodos", + "v2.IncidentsApi.deleteIncidentUserDefinedField", 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 todos. + * Delete an incident user-defined field. * - *

See {@link #listIncidentTodosWithHttpInfo}. + *

See {@link #deleteIncidentUserDefinedFieldWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<ApiResponse<IncidentTodoListResponse>> + * @param fieldId The ID of the incident user-defined field. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - listIncidentTodosWithHttpInfoAsync(String incidentId) { + public CompletableFuture> deleteIncidentUserDefinedFieldWithHttpInfoAsync( + String fieldId) { // Check if unstable operation is enabled - String operationId = "listIncidentTodos"; + String operationId = "deleteIncidentUserDefinedField"; 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 'fieldId' is set + if (fieldId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentTodos")); + 400, + "Missing the required parameter 'fieldId' when calling" + + " deleteIncidentUserDefinedField")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + "/api/v2/incidents/config/user-defined-fields/{field_id}" + .replaceAll("\\{" + "field_id" + "\\}", apiClient.escapeString(fieldId.toString())); Map localVarHeaderParams = new HashMap(); @@ -7893,98 +7859,52 @@ public ApiResponse listIncidentTodosWithHttpInfo(Strin try { builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentTodos", + "v2.IncidentsApi.deleteIncidentUserDefinedField", 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 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(); - }); + null); } /** - * Get a list of incident types. + * Export incidents. * - *

See {@link #listIncidentTypesWithHttpInfo}. + *

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

See {@link #listIncidentTypesWithHttpInfoAsync}. + *

See {@link #exportIncidentsWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentTypeListResponse> + * @param body (required) + * @return CompletableFuture<File> */ - public CompletableFuture listIncidentTypesAsync( - ListIncidentTypesOptionalParameters parameters) { - return listIncidentTypesWithHttpInfoAsync(parameters) + public CompletableFuture exportIncidentsAsync(IncidentSearchIncidentsExportRequest body) { + return exportIncidentsWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -7992,10 +7912,10 @@ public CompletableFuture listIncidentTypesAsync( } /** - * Get all incident types. + * Export incidents matching a search query as a CSV file. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentTypeListResponse> + * @param body (required) + * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details * @@ -8008,227 +7928,130 @@ public CompletableFuture listIncidentTypesAsync( * *
429 Too many requests -
*/ - public ApiResponse listIncidentTypesWithHttpInfo( - ListIncidentTypesOptionalParameters parameters) throws ApiException { + public ApiResponse exportIncidentsWithHttpInfo(IncidentSearchIncidentsExportRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentTypes"; + String operationId = "exportIncidents"; 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; + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling exportIncidents"); + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/types"; + String localVarPath = "/api/v2/incidents/search-incidents/export"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_deleted", includeDeleted)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.listIncidentTypes", + "v2.IncidentsApi.exportIncidents", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"text/csv", "application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a list of incident types. + * Export incidents. * - *

See {@link #listIncidentTypesWithHttpInfo}. + *

See {@link #exportIncidentsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentTypeListResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<File>> */ - public CompletableFuture> - listIncidentTypesWithHttpInfoAsync(ListIncidentTypesOptionalParameters parameters) { + public CompletableFuture> exportIncidentsWithHttpInfoAsync( + IncidentSearchIncidentsExportRequest body) { // Check if unstable operation is enabled - String operationId = "listIncidentTypes"; + String operationId = "exportIncidents"; 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; + 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 exportIncidents")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/incidents/config/types"; + String localVarPath = "/api/v2/incidents/search-incidents/export"; - 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", + "v2.IncidentsApi.exportIncidents", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"text/csv", "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[] {}, + new String[] {"application/json"}, 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(); - }); + new GenericType() {}); } /** - * Get a list of incident user-defined fields. + * Get global incident settings. * - *

See {@link #listIncidentUserDefinedFieldsWithHttpInfo}. + *

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

See {@link #listIncidentUserDefinedFieldsWithHttpInfoAsync}. + *

See {@link #getGlobalIncidentSettingsWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentUserDefinedFieldListResponse> + * @return CompletableFuture<GlobalIncidentSettingsResponse> */ - public CompletableFuture listIncidentUserDefinedFieldsAsync( - ListIncidentUserDefinedFieldsOptionalParameters parameters) { - return listIncidentUserDefinedFieldsWithHttpInfoAsync(parameters) + public CompletableFuture getGlobalIncidentSettingsAsync() { + return getGlobalIncidentSettingsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -8236,10 +8059,9 @@ public CompletableFuture listIncidentUserD } /** - * Get a list of all incident user-defined fields. + * Retrieve global incident settings for the organization. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentUserDefinedFieldListResponse> + * @return ApiResponse<GlobalIncidentSettingsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -8247,49 +8069,33 @@ public CompletableFuture listIncidentUserD * * * - * - * * *
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 { + public ApiResponse getGlobalIncidentSettingsWithHttpInfo() + throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentUserDefinedFields"; + 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; - 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"; + String localVarPath = "/api/v2/incidents/config/global/settings"; - 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.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, @@ -8298,63 +8104,48 @@ public CompletableFuture listIncidentUserD localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a list of incident user-defined fields. + * Get global incident settings. * - *

See {@link #listIncidentUserDefinedFieldsWithHttpInfo}. + *

See {@link #getGlobalIncidentSettingsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldListResponse>> + * @return CompletableFuture<ApiResponse<GlobalIncidentSettingsResponse>> */ - public CompletableFuture> - listIncidentUserDefinedFieldsWithHttpInfoAsync( - ListIncidentUserDefinedFieldsOptionalParameters parameters) { + public CompletableFuture> + getGlobalIncidentSettingsWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "listIncidentUserDefinedFields"; + 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; - 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"; + String localVarPath = "/api/v2/incidents/config/global/settings"; - 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.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; @@ -8367,93 +8158,271 @@ 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; + /** 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 SearchIncidentsOptionalParameters + * @return GetIncidentOptionalParameters */ - public SearchIncidentsOptionalParameters include(IncidentRelatedObject include) { + public GetIncidentOptionalParameters include(List 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; + /** + * 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(); + }); + } + + /** + * Get the details of an incident. + * + *

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 + * + * + * + * + * + * + * + * + * + *
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 getIncidentWithHttpInfo( + String incidentId, GetIncidentOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + 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/{incident_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - /** - * 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; + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncident", + 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 the details of an incident. + * + *

See {@link #getIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentResponse>> + */ + public CompletableFuture> getIncidentWithHttpInfoAsync( + String incidentId, GetIncidentOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getIncident"; + 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 getIncident")); + 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", + 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 getIncidentAutomationData. */ + public static class GetIncidentAutomationDataOptionalParameters { + private String 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 objects to include in the response. (optional) + * @return GetIncidentAutomationDataOptionalParameters */ - public SearchIncidentsOptionalParameters pageOffset(Long pageOffset) { - this.pageOffset = pageOffset; + public GetIncidentAutomationDataOptionalParameters include(String include) { + this.include = include; return this; } } /** - * Search for incidents. + * Get incident automation data. * - *

See {@link #searchIncidentsWithHttpInfo}. + *

See {@link #getIncidentAutomationDataWithHttpInfo}. * - * @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 key The automation data key. (required) + * @return IncidentAutomationDataResponse * @throws ApiException if fails to make API call */ - public IncidentSearchResponse searchIncidents(String query) throws ApiException { - return searchIncidentsWithHttpInfo(query, new SearchIncidentsOptionalParameters()).getData(); + public IncidentAutomationDataResponse getIncidentAutomationData(String incidentId, String key) + throws ApiException { + return getIncidentAutomationDataWithHttpInfo( + incidentId, key, new GetIncidentAutomationDataOptionalParameters()) + .getData(); } /** - * Search for incidents. + * Get incident automation data. * - *

See {@link #searchIncidentsWithHttpInfoAsync}. + *

See {@link #getIncidentAutomationDataWithHttpInfoAsync}. * - * @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 key The automation data key. (required) + * @return CompletableFuture<IncidentAutomationDataResponse> */ - public CompletableFuture searchIncidentsAsync(String query) { - return searchIncidentsWithHttpInfoAsync(query, new SearchIncidentsOptionalParameters()) + public CompletableFuture getIncidentAutomationDataAsync( + String incidentId, String key) { + return getIncidentAutomationDataWithHttpInfoAsync( + incidentId, key, new GetIncidentAutomationDataOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -8461,38 +8430,9600 @@ public CompletableFuture searchIncidentsAsync(String que } /** - * Search for incidents. + * Get incident automation data. + * + *

See {@link #getIncidentAutomationDataWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param key The automation data key. (required) + * @param parameters Optional parameters for the request. + * @return IncidentAutomationDataResponse + * @throws ApiException if fails to make API call + */ + public IncidentAutomationDataResponse getIncidentAutomationData( + String incidentId, String key, GetIncidentAutomationDataOptionalParameters parameters) + throws ApiException { + return getIncidentAutomationDataWithHttpInfo(incidentId, key, parameters).getData(); + } + + /** + * Get incident automation data. + * + *

See {@link #getIncidentAutomationDataWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param key The automation data key. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentAutomationDataResponse> + */ + public CompletableFuture getIncidentAutomationDataAsync( + String incidentId, String key, GetIncidentAutomationDataOptionalParameters parameters) { + return getIncidentAutomationDataWithHttpInfoAsync(incidentId, key, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get automation data for a given incident and key. + * + * @param incidentId The UUID of the incident. (required) + * @param key The automation data key. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentAutomationDataResponse> + * @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 getIncidentAutomationDataWithHttpInfo( + String incidentId, String key, GetIncidentAutomationDataOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentAutomationData"; + 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 getIncidentAutomationData"); + } + + // verify the required parameter 'key' is set + if (key == null) { + throw new ApiException( + 400, "Missing the required parameter 'key' when calling getIncidentAutomationData"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/automation-data/{key}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentAutomationData", + 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 incident automation data. + * + *

See {@link #getIncidentAutomationDataWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param key The automation data key. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentAutomationDataResponse>> + */ + public CompletableFuture> + getIncidentAutomationDataWithHttpInfoAsync( + String incidentId, String key, GetIncidentAutomationDataOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getIncidentAutomationData"; + 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" + + " getIncidentAutomationData")); + return result; + } + + // verify the required parameter 'key' is set + if (key == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'key' when calling getIncidentAutomationData")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/automation-data/{key}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentAutomationData", + 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 incident case source link. + * + *

See {@link #getIncidentCaseSourceLinkWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentCaseLinkResponse + * @throws ApiException if fails to make API call + */ + public IncidentCaseLinkResponse getIncidentCaseSourceLink(String incidentId) throws ApiException { + return getIncidentCaseSourceLinkWithHttpInfo(incidentId).getData(); + } + + /** + * Get incident case source link. + * + *

See {@link #getIncidentCaseSourceLinkWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentCaseLinkResponse> + */ + public CompletableFuture getIncidentCaseSourceLinkAsync( + String incidentId) { + return getIncidentCaseSourceLinkWithHttpInfoAsync(incidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the source link for a case associated with an incident. + * + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentCaseLinkResponse> + * @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 getIncidentCaseSourceLinkWithHttpInfo( + String incidentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentCaseSourceLink"; + 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 getIncidentCaseSourceLink"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/cases/source-link" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentCaseSourceLink", + 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 case source link. + * + *

See {@link #getIncidentCaseSourceLinkWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentCaseLinkResponse>> + */ + public CompletableFuture> + getIncidentCaseSourceLinkWithHttpInfoAsync(String incidentId) { + // Check if unstable operation is enabled + String operationId = "getIncidentCaseSourceLink"; + 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" + + " getIncidentCaseSourceLink")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/cases/source-link" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentCaseSourceLink", + 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 communication. + * + *

See {@link #getIncidentCommunicationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @return IncidentCommunicationResponse + * @throws ApiException if fails to make API call + */ + public IncidentCommunicationResponse getIncidentCommunication( + String incidentId, UUID communicationId) throws ApiException { + return getIncidentCommunicationWithHttpInfo(incidentId, communicationId).getData(); + } + + /** + * Get an incident communication. + * + *

See {@link #getIncidentCommunicationWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @return CompletableFuture<IncidentCommunicationResponse> + */ + public CompletableFuture getIncidentCommunicationAsync( + String incidentId, UUID communicationId) { + return getIncidentCommunicationWithHttpInfoAsync(incidentId, communicationId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the details of a communication for a given incident. + * + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @return ApiResponse<IncidentCommunicationResponse> + * @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 getIncidentCommunicationWithHttpInfo( + String incidentId, UUID communicationId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentCommunication"; + 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 getIncidentCommunication"); + } + + // verify the required parameter 'communicationId' is set + if (communicationId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'communicationId' when calling getIncidentCommunication"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/communications/{communication_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "communication_id" + "\\}", + apiClient.escapeString(communicationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentCommunication", + 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 communication. + * + *

See {@link #getIncidentCommunicationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @return CompletableFuture<ApiResponse<IncidentCommunicationResponse>> + */ + public CompletableFuture> + getIncidentCommunicationWithHttpInfoAsync(String incidentId, UUID communicationId) { + // Check if unstable operation is enabled + String operationId = "getIncidentCommunication"; + 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 getIncidentCommunication")); + return result; + } + + // verify the required parameter 'communicationId' is set + if (communicationId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'communicationId' when calling" + + " getIncidentCommunication")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/communications/{communication_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "communication_id" + "\\}", + apiClient.escapeString(communicationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentCommunication", + 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 integration metadata details. + * + *

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

See {@link #getIncidentIntegrationWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture<IncidentIntegrationMetadataResponse> + */ + public CompletableFuture getIncidentIntegrationAsync( + String incidentId, String integrationMetadataId) { + return getIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * 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> + * @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 getIncidentIntegrationWithHttpInfo( + String incidentId, String integrationMetadataId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentIntegration"; + 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 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/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.getIncidentIntegration", + 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 integration metadata details. + * + *

See {@link #getIncidentIntegrationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> + */ + public CompletableFuture> + getIncidentIntegrationWithHttpInfoAsync(String incidentId, String integrationMetadataId) { + // Check if unstable operation is enabled + String operationId = "getIncidentIntegration"; + 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 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/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; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentIntegration", + 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 Jira template. + * + *

See {@link #getIncidentJiraTemplateWithHttpInfo}. + * + * @param templateId The ID of the Jira template. (required) + * @return IncidentJiraTemplateResponse + * @throws ApiException if fails to make API call + */ + public IncidentJiraTemplateResponse getIncidentJiraTemplate(UUID templateId) throws ApiException { + return getIncidentJiraTemplateWithHttpInfo(templateId).getData(); + } + + /** + * Get an incident Jira template. + * + *

See {@link #getIncidentJiraTemplateWithHttpInfoAsync}. + * + * @param templateId The ID of the Jira template. (required) + * @return CompletableFuture<IncidentJiraTemplateResponse> + */ + public CompletableFuture getIncidentJiraTemplateAsync( + UUID templateId) { + return getIncidentJiraTemplateWithHttpInfoAsync(templateId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the details of an incident Jira template by its identifier. + * + * @param templateId The ID of the Jira template. (required) + * @return ApiResponse<IncidentJiraTemplateResponse> + * @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 getIncidentJiraTemplateWithHttpInfo( + UUID templateId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentJiraTemplate"; + 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 'templateId' is set + if (templateId == null) { + throw new ApiException( + 400, "Missing the required parameter 'templateId' when calling getIncidentJiraTemplate"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/jira-templates/{template_id}" + .replaceAll( + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentJiraTemplate", + 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 Jira template. + * + *

See {@link #getIncidentJiraTemplateWithHttpInfo}. + * + * @param templateId The ID of the Jira template. (required) + * @return CompletableFuture<ApiResponse<IncidentJiraTemplateResponse>> + */ + public CompletableFuture> + getIncidentJiraTemplateWithHttpInfoAsync(UUID templateId) { + // Check if unstable operation is enabled + String operationId = "getIncidentJiraTemplate"; + 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 getIncidentJiraTemplate")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/jira-templates/{template_id}" + .replaceAll( + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentJiraTemplate", + 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 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; + } + } + + /** + * Get an incident notification rule. + * + *

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

See {@link #getIncidentNotificationRuleWithHttpInfoAsync}. + * + * @param id The ID of the notification rule. (required) + * @return CompletableFuture<IncidentNotificationRule> + */ + public CompletableFuture getIncidentNotificationRuleAsync(UUID id) { + return getIncidentNotificationRuleWithHttpInfoAsync( + id, new GetIncidentNotificationRuleOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an incident notification rule. + * + *

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

See {@link #getIncidentNotificationRuleWithHttpInfoAsync}. + * + * @param id The ID of the notification rule. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentNotificationRule> + */ + public CompletableFuture getIncidentNotificationRuleAsync( + UUID id, GetIncidentNotificationRuleOptionalParameters parameters) { + return getIncidentNotificationRuleWithHttpInfoAsync(id, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * 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<IncidentNotificationRule> + * @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 getIncidentNotificationRuleWithHttpInfo( + UUID id, GetIncidentNotificationRuleOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + 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; + + // 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/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.getIncidentNotificationRule", + 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 notification rule. + * + *

See {@link #getIncidentNotificationRuleWithHttpInfo}. + * + * @param id The ID of the notification rule. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> + */ + public CompletableFuture> + getIncidentNotificationRuleWithHttpInfoAsync( + UUID id, GetIncidentNotificationRuleOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getIncidentNotificationRule"; + 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 '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/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.getIncidentNotificationRule", + 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 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(); + }); + } + + /** + * Get incident notification template. + * + *

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

See {@link #getIncidentNotificationTemplateWithHttpInfoAsync}. + * + * @param id The ID of the notification template. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentNotificationTemplate> + */ + public CompletableFuture getIncidentNotificationTemplateAsync( + UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) { + return getIncidentNotificationTemplateWithHttpInfoAsync(id, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * 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<IncidentNotificationTemplate> + * @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 getIncidentNotificationTemplateWithHttpInfo( + UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + 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; + + // 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/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.getIncidentNotificationTemplate", + 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 incident notification template. + * + *

See {@link #getIncidentNotificationTemplateWithHttpInfo}. + * + * @param id The ID of the notification template. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> + */ + public CompletableFuture> + getIncidentNotificationTemplateWithHttpInfoAsync( + UUID id, GetIncidentNotificationTemplateOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getIncidentNotificationTemplate"; + 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 '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/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.getIncidentNotificationTemplate", + 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 PagerDuty related incidents. + * + *

See {@link #getIncidentPagerdutyRelatedIncidentsWithHttpInfo}. + * + * @param pagerdutyIncidentId The PagerDuty incident identifier. (required) + * @return IncidentPagerdutyRelatedIncidentsResponse + * @throws ApiException if fails to make API call + */ + public IncidentPagerdutyRelatedIncidentsResponse getIncidentPagerdutyRelatedIncidents( + String pagerdutyIncidentId) throws ApiException { + return getIncidentPagerdutyRelatedIncidentsWithHttpInfo(pagerdutyIncidentId).getData(); + } + + /** + * Get PagerDuty related incidents. + * + *

See {@link #getIncidentPagerdutyRelatedIncidentsWithHttpInfoAsync}. + * + * @param pagerdutyIncidentId The PagerDuty incident identifier. (required) + * @return CompletableFuture<IncidentPagerdutyRelatedIncidentsResponse> + */ + public CompletableFuture + getIncidentPagerdutyRelatedIncidentsAsync(String pagerdutyIncidentId) { + return getIncidentPagerdutyRelatedIncidentsWithHttpInfoAsync(pagerdutyIncidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of Datadog incidents attached to a PagerDuty incident. + * + * @param pagerdutyIncidentId The PagerDuty incident identifier. (required) + * @return ApiResponse<IncidentPagerdutyRelatedIncidentsResponse> + * @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 + getIncidentPagerdutyRelatedIncidentsWithHttpInfo(String pagerdutyIncidentId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentPagerdutyRelatedIncidents"; + 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 'pagerdutyIncidentId' is set + if (pagerdutyIncidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'pagerdutyIncidentId' when calling" + + " getIncidentPagerdutyRelatedIncidents"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/pagerduty/{pagerduty_incident_id}/relationships/incidents" + .replaceAll( + "\\{" + "pagerduty_incident_id" + "\\}", + apiClient.escapeString(pagerdutyIncidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentPagerdutyRelatedIncidents", + 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 PagerDuty related incidents. + * + *

See {@link #getIncidentPagerdutyRelatedIncidentsWithHttpInfo}. + * + * @param pagerdutyIncidentId The PagerDuty incident identifier. (required) + * @return CompletableFuture<ApiResponse<IncidentPagerdutyRelatedIncidentsResponse>> + */ + public CompletableFuture> + getIncidentPagerdutyRelatedIncidentsWithHttpInfoAsync(String pagerdutyIncidentId) { + // Check if unstable operation is enabled + String operationId = "getIncidentPagerdutyRelatedIncidents"; + 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 'pagerdutyIncidentId' is set + if (pagerdutyIncidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'pagerdutyIncidentId' when calling" + + " getIncidentPagerdutyRelatedIncidents")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/pagerduty/{pagerduty_incident_id}/relationships/incidents" + .replaceAll( + "\\{" + "pagerduty_incident_id" + "\\}", + apiClient.escapeString(pagerdutyIncidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentPagerdutyRelatedIncidents", + 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 page source link. + * + *

See {@link #getIncidentPageSourceLinkWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentCaseLinkResponse + * @throws ApiException if fails to make API call + */ + public IncidentCaseLinkResponse getIncidentPageSourceLink(String incidentId) throws ApiException { + return getIncidentPageSourceLinkWithHttpInfo(incidentId).getData(); + } + + /** + * Get incident page source link. + * + *

See {@link #getIncidentPageSourceLinkWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentCaseLinkResponse> + */ + public CompletableFuture getIncidentPageSourceLinkAsync( + String incidentId) { + return getIncidentPageSourceLinkWithHttpInfoAsync(incidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the source link for a page associated with an incident. + * + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentCaseLinkResponse> + * @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 getIncidentPageSourceLinkWithHttpInfo( + String incidentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentPageSourceLink"; + 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 getIncidentPageSourceLink"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/pages/source-link" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentPageSourceLink", + 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 page source link. + * + *

See {@link #getIncidentPageSourceLinkWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentCaseLinkResponse>> + */ + public CompletableFuture> + getIncidentPageSourceLinkWithHttpInfoAsync(String incidentId) { + // Check if unstable operation is enabled + String operationId = "getIncidentPageSourceLink"; + 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" + + " getIncidentPageSourceLink")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/pages/source-link" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentPageSourceLink", + 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 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(); + } + + /** + * 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; + + // 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())); + + 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 reserved role. + * + *

See {@link #getIncidentReservedRoleWithHttpInfo}. + * + * @param roleId The ID of the reserved role. (required) + * @return IncidentReservedRoleResponse + * @throws ApiException if fails to make API call + */ + public IncidentReservedRoleResponse getIncidentReservedRole(UUID roleId) throws ApiException { + return getIncidentReservedRoleWithHttpInfo(roleId).getData(); + } + + /** + * Get an incident reserved role. + * + *

See {@link #getIncidentReservedRoleWithHttpInfoAsync}. + * + * @param roleId The ID of the reserved role. (required) + * @return CompletableFuture<IncidentReservedRoleResponse> + */ + public CompletableFuture getIncidentReservedRoleAsync(UUID roleId) { + return getIncidentReservedRoleWithHttpInfoAsync(roleId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the details of a reserved role by its identifier. + * + * @param roleId The ID of the reserved role. (required) + * @return ApiResponse<IncidentReservedRoleResponse> + * @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 getIncidentReservedRoleWithHttpInfo(UUID roleId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentReservedRole"; + 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 getIncidentReservedRole"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/reserved-roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentReservedRole", + 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 reserved role. + * + *

See {@link #getIncidentReservedRoleWithHttpInfo}. + * + * @param roleId The ID of the reserved role. (required) + * @return CompletableFuture<ApiResponse<IncidentReservedRoleResponse>> + */ + public CompletableFuture> + getIncidentReservedRoleWithHttpInfoAsync(UUID roleId) { + // Check if unstable operation is enabled + String operationId = "getIncidentReservedRole"; + 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 getIncidentReservedRole")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/config/reserved-roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentReservedRole", + 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 role assignment. + * + *

See {@link #getIncidentRoleAssignmentWithHttpInfo}. + * + * @param roleAssignmentId The ID of the role assignment. (required) + * @return IncidentRoleAssignmentResponse + * @throws ApiException if fails to make API call + */ + public IncidentRoleAssignmentResponse getIncidentRoleAssignment(UUID roleAssignmentId) + throws ApiException { + return getIncidentRoleAssignmentWithHttpInfo(roleAssignmentId).getData(); + } + + /** + * Get an incident role assignment. + * + *

See {@link #getIncidentRoleAssignmentWithHttpInfoAsync}. + * + * @param roleAssignmentId The ID of the role assignment. (required) + * @return CompletableFuture<IncidentRoleAssignmentResponse> + */ + public CompletableFuture getIncidentRoleAssignmentAsync( + UUID roleAssignmentId) { + return getIncidentRoleAssignmentWithHttpInfoAsync(roleAssignmentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the details of a role assignment by its identifier. + * + * @param roleAssignmentId The ID of the role assignment. (required) + * @return ApiResponse<IncidentRoleAssignmentResponse> + * @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 getIncidentRoleAssignmentWithHttpInfo( + UUID roleAssignmentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentRoleAssignment"; + 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 'roleAssignmentId' is set + if (roleAssignmentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'roleAssignmentId' when calling" + + " getIncidentRoleAssignment"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/role_assignments/{role_assignment_id}" + .replaceAll( + "\\{" + "role_assignment_id" + "\\}", + apiClient.escapeString(roleAssignmentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentRoleAssignment", + 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 role assignment. + * + *

See {@link #getIncidentRoleAssignmentWithHttpInfo}. + * + * @param roleAssignmentId The ID of the role assignment. (required) + * @return CompletableFuture<ApiResponse<IncidentRoleAssignmentResponse>> + */ + public CompletableFuture> + getIncidentRoleAssignmentWithHttpInfoAsync(UUID roleAssignmentId) { + // Check if unstable operation is enabled + String operationId = "getIncidentRoleAssignment"; + 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 'roleAssignmentId' is set + if (roleAssignmentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'roleAssignmentId' when calling" + + " getIncidentRoleAssignment")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/role_assignments/{role_assignment_id}" + .replaceAll( + "\\{" + "role_assignment_id" + "\\}", + apiClient.escapeString(roleAssignmentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentRoleAssignment", + 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 status pages suggestion. + * + *

See {@link #getIncidentStatusPagesSuggestionWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentStatusPagesSuggestionResponse + * @throws ApiException if fails to make API call + */ + public IncidentStatusPagesSuggestionResponse getIncidentStatusPagesSuggestion(String incidentId) + throws ApiException { + return getIncidentStatusPagesSuggestionWithHttpInfo(incidentId).getData(); + } + + /** + * Get incident status pages suggestion. + * + *

See {@link #getIncidentStatusPagesSuggestionWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentStatusPagesSuggestionResponse> + */ + public CompletableFuture + getIncidentStatusPagesSuggestionAsync(String incidentId) { + return getIncidentStatusPagesSuggestionWithHttpInfoAsync(incidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an AI-generated suggestion for a status page notice for a given incident. + * + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentStatusPagesSuggestionResponse> + * @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 + getIncidentStatusPagesSuggestionWithHttpInfo(String incidentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentStatusPagesSuggestion"; + 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" + + " getIncidentStatusPagesSuggestion"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/statuspages-suggestion" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentStatusPagesSuggestion", + 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 status pages suggestion. + * + *

See {@link #getIncidentStatusPagesSuggestionWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentStatusPagesSuggestionResponse>> + */ + public CompletableFuture> + getIncidentStatusPagesSuggestionWithHttpInfoAsync(String incidentId) { + // Check if unstable operation is enabled + String operationId = "getIncidentStatusPagesSuggestion"; + 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" + + " getIncidentStatusPagesSuggestion")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/statuspages-suggestion" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentStatusPagesSuggestion", + 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 timeline entry thread. + * + *

See {@link #getIncidentTimelineEntryThreadWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) + * @return IncidentTimelineThreadResponse + * @throws ApiException if fails to make API call + */ + public IncidentTimelineThreadResponse getIncidentTimelineEntryThread( + String incidentId, UUID timelineEntryId) throws ApiException { + return getIncidentTimelineEntryThreadWithHttpInfo(incidentId, timelineEntryId).getData(); + } + + /** + * Get incident timeline entry thread. + * + *

See {@link #getIncidentTimelineEntryThreadWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) + * @return CompletableFuture<IncidentTimelineThreadResponse> + */ + public CompletableFuture getIncidentTimelineEntryThreadAsync( + String incidentId, UUID timelineEntryId) { + return getIncidentTimelineEntryThreadWithHttpInfoAsync(incidentId, timelineEntryId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the thread entries for a given timeline entry. + * + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) + * @return ApiResponse<IncidentTimelineThreadResponse> + * @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 getIncidentTimelineEntryThreadWithHttpInfo( + String incidentId, UUID timelineEntryId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentTimelineEntryThread"; + 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" + + " getIncidentTimelineEntryThread"); + } + + // verify the required parameter 'timelineEntryId' is set + if (timelineEntryId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'timelineEntryId' when calling" + + " getIncidentTimelineEntryThread"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}/thread" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "timeline_entry_id" + "\\}", + apiClient.escapeString(timelineEntryId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentTimelineEntryThread", + 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 timeline entry thread. + * + *

See {@link #getIncidentTimelineEntryThreadWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) + * @return CompletableFuture<ApiResponse<IncidentTimelineThreadResponse>> + */ + public CompletableFuture> + getIncidentTimelineEntryThreadWithHttpInfoAsync(String incidentId, UUID timelineEntryId) { + // Check if unstable operation is enabled + String operationId = "getIncidentTimelineEntryThread"; + 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" + + " getIncidentTimelineEntryThread")); + return result; + } + + // verify the required parameter 'timelineEntryId' is set + if (timelineEntryId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'timelineEntryId' when calling" + + " getIncidentTimelineEntryThread")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}/thread" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "timeline_entry_id" + "\\}", + apiClient.escapeString(timelineEntryId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getIncidentTimelineEntryThread", + 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() {}); + } + + /** + * Get status page subscription preferences. + * + *

See {@link #getStatuspageSubscriptionPreferencesWithHttpInfo}. + * + * @return IncidentStatuspagePreferencesResponse + * @throws ApiException if fails to make API call + */ + public IncidentStatuspagePreferencesResponse getStatuspageSubscriptionPreferences() + throws ApiException { + return getStatuspageSubscriptionPreferencesWithHttpInfo().getData(); + } + + /** + * Get status page subscription preferences. + * + *

See {@link #getStatuspageSubscriptionPreferencesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentStatuspagePreferencesResponse> + */ + public CompletableFuture + getStatuspageSubscriptionPreferencesAsync() { + return getStatuspageSubscriptionPreferencesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the subscription preferences for the current user. + * + * @return ApiResponse<IncidentStatuspagePreferencesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse + getStatuspageSubscriptionPreferencesWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "getStatuspageSubscriptionPreferences"; + 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/statuspages/subscription/preferences"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.getStatuspageSubscriptionPreferences", + 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 status page subscription preferences. + * + *

See {@link #getStatuspageSubscriptionPreferencesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<IncidentStatuspagePreferencesResponse>> + */ + public CompletableFuture> + getStatuspageSubscriptionPreferencesWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "getStatuspageSubscriptionPreferences"; + 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/statuspages/subscription/preferences"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.getStatuspageSubscriptionPreferences", + 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() {}); + } + + /** 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() {}); + } + + /** 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() {}); + } + + /** Manage optional parameters to listIncidentCommunications. */ + public static class ListIncidentCommunicationsOptionalParameters { + private String filterCommunicationType; + + /** + * Set filterCommunicationType. + * + * @param filterCommunicationType Filter by communication type. (optional) + * @return ListIncidentCommunicationsOptionalParameters + */ + public ListIncidentCommunicationsOptionalParameters filterCommunicationType( + String filterCommunicationType) { + this.filterCommunicationType = filterCommunicationType; + return this; + } + } + + /** + * List incident communications. + * + *

See {@link #listIncidentCommunicationsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentCommunicationsResponse + * @throws ApiException if fails to make API call + */ + public IncidentCommunicationsResponse listIncidentCommunications(String incidentId) + throws ApiException { + return listIncidentCommunicationsWithHttpInfo( + incidentId, new ListIncidentCommunicationsOptionalParameters()) + .getData(); + } + + /** + * List incident communications. + * + *

See {@link #listIncidentCommunicationsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentCommunicationsResponse> + */ + public CompletableFuture listIncidentCommunicationsAsync( + String incidentId) { + return listIncidentCommunicationsWithHttpInfoAsync( + incidentId, new ListIncidentCommunicationsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident communications. + * + *

See {@link #listIncidentCommunicationsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return IncidentCommunicationsResponse + * @throws ApiException if fails to make API call + */ + public IncidentCommunicationsResponse listIncidentCommunications( + String incidentId, ListIncidentCommunicationsOptionalParameters parameters) + throws ApiException { + return listIncidentCommunicationsWithHttpInfo(incidentId, parameters).getData(); + } + + /** + * List incident communications. + * + *

See {@link #listIncidentCommunicationsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentCommunicationsResponse> + */ + public CompletableFuture listIncidentCommunicationsAsync( + String incidentId, ListIncidentCommunicationsOptionalParameters parameters) { + return listIncidentCommunicationsWithHttpInfoAsync(incidentId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all communications for a given incident. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentCommunicationsResponse> + * @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 listIncidentCommunicationsWithHttpInfo( + String incidentId, ListIncidentCommunicationsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentCommunications"; + 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 listIncidentCommunications"); + } + String filterCommunicationType = parameters.filterCommunicationType; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/communications" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[communication_type]", filterCommunicationType)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentCommunications", + 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 communications. + * + *

See {@link #listIncidentCommunicationsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentCommunicationsResponse>> + */ + public CompletableFuture> + listIncidentCommunicationsWithHttpInfoAsync( + String incidentId, ListIncidentCommunicationsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentCommunications"; + 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" + + " listIncidentCommunications")); + return result; + } + String filterCommunicationType = parameters.filterCommunicationType; + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/communications" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[communication_type]", filterCommunicationType)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentCommunications", + 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 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 listIncidentJiraTemplates. */ + public static class ListIncidentJiraTemplatesOptionalParameters { + private Boolean isDefault; + private UUID incidentTypeId; + private String templateType; + + /** + * Set isDefault. + * + * @param isDefault Filter templates by default status. (optional) + * @return ListIncidentJiraTemplatesOptionalParameters + */ + public ListIncidentJiraTemplatesOptionalParameters isDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Set incidentTypeId. + * + * @param incidentTypeId Filter templates by incident type identifier. (optional) + * @return ListIncidentJiraTemplatesOptionalParameters + */ + public ListIncidentJiraTemplatesOptionalParameters incidentTypeId(UUID incidentTypeId) { + this.incidentTypeId = incidentTypeId; + return this; + } + + /** + * Set templateType. + * + * @param templateType Filter templates by type. (optional) + * @return ListIncidentJiraTemplatesOptionalParameters + */ + public ListIncidentJiraTemplatesOptionalParameters templateType(String templateType) { + this.templateType = templateType; + return this; + } + } + + /** + * List incident Jira templates. + * + *

See {@link #listIncidentJiraTemplatesWithHttpInfo}. + * + * @return IncidentJiraTemplatesResponse + * @throws ApiException if fails to make API call + */ + public IncidentJiraTemplatesResponse listIncidentJiraTemplates() throws ApiException { + return listIncidentJiraTemplatesWithHttpInfo(new ListIncidentJiraTemplatesOptionalParameters()) + .getData(); + } + + /** + * List incident Jira templates. + * + *

See {@link #listIncidentJiraTemplatesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentJiraTemplatesResponse> + */ + public CompletableFuture listIncidentJiraTemplatesAsync() { + return listIncidentJiraTemplatesWithHttpInfoAsync( + new ListIncidentJiraTemplatesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident Jira templates. + * + *

See {@link #listIncidentJiraTemplatesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentJiraTemplatesResponse + * @throws ApiException if fails to make API call + */ + public IncidentJiraTemplatesResponse listIncidentJiraTemplates( + ListIncidentJiraTemplatesOptionalParameters parameters) throws ApiException { + return listIncidentJiraTemplatesWithHttpInfo(parameters).getData(); + } + + /** + * List incident Jira templates. + * + *

See {@link #listIncidentJiraTemplatesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentJiraTemplatesResponse> + */ + public CompletableFuture listIncidentJiraTemplatesAsync( + ListIncidentJiraTemplatesOptionalParameters parameters) { + return listIncidentJiraTemplatesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all incident Jira templates for the organization. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentJiraTemplatesResponse> + * @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 listIncidentJiraTemplatesWithHttpInfo( + ListIncidentJiraTemplatesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentJiraTemplates"; + 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 isDefault = parameters.isDefault; + UUID incidentTypeId = parameters.incidentTypeId; + String templateType = parameters.templateType; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/jira-templates"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "isDefault", isDefault)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "incidentTypeId", incidentTypeId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "templateType", templateType)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentJiraTemplates", + 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 Jira templates. + * + *

See {@link #listIncidentJiraTemplatesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentJiraTemplatesResponse>> + */ + public CompletableFuture> + listIncidentJiraTemplatesWithHttpInfoAsync( + ListIncidentJiraTemplatesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentJiraTemplates"; + 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 isDefault = parameters.isDefault; + UUID incidentTypeId = parameters.incidentTypeId; + String templateType = parameters.templateType; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/jira-templates"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "isDefault", isDefault)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "incidentTypeId", incidentTypeId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "templateType", templateType)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentJiraTemplates", + 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 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() {}); + } + + /** Manage optional parameters to listIncidentPagerdutyServices. */ + public static class ListIncidentPagerdutyServicesOptionalParameters { + private Boolean includeUnresolved; + + /** + * Set includeUnresolved. + * + * @param includeUnresolved Whether to include unresolved PagerDuty services. (optional, default + * to false) + * @return ListIncidentPagerdutyServicesOptionalParameters + */ + public ListIncidentPagerdutyServicesOptionalParameters includeUnresolved( + Boolean includeUnresolved) { + this.includeUnresolved = includeUnresolved; + return this; + } + } + + /** + * List PagerDuty services. + * + *

See {@link #listIncidentPagerdutyServicesWithHttpInfo}. + * + * @return IncidentPagerdutyServicesResponse + * @throws ApiException if fails to make API call + */ + public IncidentPagerdutyServicesResponse listIncidentPagerdutyServices() throws ApiException { + return listIncidentPagerdutyServicesWithHttpInfo( + new ListIncidentPagerdutyServicesOptionalParameters()) + .getData(); + } + + /** + * List PagerDuty services. + * + *

See {@link #listIncidentPagerdutyServicesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentPagerdutyServicesResponse> + */ + public CompletableFuture listIncidentPagerdutyServicesAsync() { + return listIncidentPagerdutyServicesWithHttpInfoAsync( + new ListIncidentPagerdutyServicesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List PagerDuty services. + * + *

See {@link #listIncidentPagerdutyServicesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentPagerdutyServicesResponse + * @throws ApiException if fails to make API call + */ + public IncidentPagerdutyServicesResponse listIncidentPagerdutyServices( + ListIncidentPagerdutyServicesOptionalParameters parameters) throws ApiException { + return listIncidentPagerdutyServicesWithHttpInfo(parameters).getData(); + } + + /** + * List PagerDuty services. + * + *

See {@link #listIncidentPagerdutyServicesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentPagerdutyServicesResponse> + */ + public CompletableFuture listIncidentPagerdutyServicesAsync( + ListIncidentPagerdutyServicesOptionalParameters parameters) { + return listIncidentPagerdutyServicesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all PagerDuty services configured for the organization. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentPagerdutyServicesResponse> + * @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 listIncidentPagerdutyServicesWithHttpInfo( + ListIncidentPagerdutyServicesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentPagerdutyServices"; + 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 includeUnresolved = parameters.includeUnresolved; + // create path and map variables + String localVarPath = "/api/v2/incidents/pagerduty/services"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include_unresolved", includeUnresolved)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentPagerdutyServices", + 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 PagerDuty services. + * + *

See {@link #listIncidentPagerdutyServicesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentPagerdutyServicesResponse>> + */ + public CompletableFuture> + listIncidentPagerdutyServicesWithHttpInfoAsync( + ListIncidentPagerdutyServicesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentPagerdutyServices"; + 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 includeUnresolved = parameters.includeUnresolved; + // create path and map variables + String localVarPath = "/api/v2/incidents/pagerduty/services"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include_unresolved", includeUnresolved)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentPagerdutyServices", + 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 reserved roles. + * + *

See {@link #listIncidentReservedRolesWithHttpInfo}. + * + * @return IncidentReservedRolesResponse + * @throws ApiException if fails to make API call + */ + public IncidentReservedRolesResponse listIncidentReservedRoles() throws ApiException { + return listIncidentReservedRolesWithHttpInfo().getData(); + } + + /** + * List incident reserved roles. + * + *

See {@link #listIncidentReservedRolesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentReservedRolesResponse> + */ + public CompletableFuture listIncidentReservedRolesAsync() { + return listIncidentReservedRolesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all reserved roles for incidents. + * + * @return ApiResponse<IncidentReservedRolesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listIncidentReservedRolesWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentReservedRoles"; + 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/reserved-roles"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentReservedRoles", + 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 reserved roles. + * + *

See {@link #listIncidentReservedRolesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<IncidentReservedRolesResponse>> + */ + public CompletableFuture> + listIncidentReservedRolesWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listIncidentReservedRoles"; + 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/reserved-roles"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentReservedRoles", + 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() {}); + } + + /** + * List incident rule execution states. + * + *

See {@link #listIncidentRuleExecutionStatesWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentRuleExecutionStatesResponse + * @throws ApiException if fails to make API call + */ + public IncidentRuleExecutionStatesResponse listIncidentRuleExecutionStates(String incidentId) + throws ApiException { + return listIncidentRuleExecutionStatesWithHttpInfo(incidentId).getData(); + } + + /** + * List incident rule execution states. + * + *

See {@link #listIncidentRuleExecutionStatesWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentRuleExecutionStatesResponse> + */ + public CompletableFuture + listIncidentRuleExecutionStatesAsync(String incidentId) { + return listIncidentRuleExecutionStatesWithHttpInfoAsync(incidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all rule execution states for a given incident. + * + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentRuleExecutionStatesResponse> + * @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 + listIncidentRuleExecutionStatesWithHttpInfo(String incidentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentRuleExecutionStates"; + 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" + + " listIncidentRuleExecutionStates"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/rule-execution-states" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentRuleExecutionStates", + 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 rule execution states. + * + *

See {@link #listIncidentRuleExecutionStatesWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentRuleExecutionStatesResponse>> + */ + public CompletableFuture> + listIncidentRuleExecutionStatesWithHttpInfoAsync(String incidentId) { + // Check if unstable operation is enabled + String operationId = "listIncidentRuleExecutionStates"; + 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" + + " listIncidentRuleExecutionStates")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/rule-execution-states" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentRuleExecutionStates", + 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 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() {}); + } + + /** Manage optional parameters to listIncidentTemplateVariables. */ + public static class ListIncidentTemplateVariablesOptionalParameters { + private UUID filterIncidentType; + private Boolean includeFollowUps; + + /** + * Set filterIncidentType. + * + * @param filterIncidentType Filter template variables by incident type. (optional) + * @return ListIncidentTemplateVariablesOptionalParameters + */ + public ListIncidentTemplateVariablesOptionalParameters filterIncidentType( + UUID filterIncidentType) { + this.filterIncidentType = filterIncidentType; + return this; + } + + /** + * Set includeFollowUps. + * + * @param includeFollowUps Whether to include follow-up template variables. (optional) + * @return ListIncidentTemplateVariablesOptionalParameters + */ + public ListIncidentTemplateVariablesOptionalParameters includeFollowUps( + Boolean includeFollowUps) { + this.includeFollowUps = includeFollowUps; + return this; + } + } + + /** + * List incident template variables. + * + *

See {@link #listIncidentTemplateVariablesWithHttpInfo}. + * + * @return IncidentTemplateVariablesResponse + * @throws ApiException if fails to make API call + */ + public IncidentTemplateVariablesResponse listIncidentTemplateVariables() throws ApiException { + return listIncidentTemplateVariablesWithHttpInfo( + new ListIncidentTemplateVariablesOptionalParameters()) + .getData(); + } + + /** + * List incident template variables. + * + *

See {@link #listIncidentTemplateVariablesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentTemplateVariablesResponse> + */ + public CompletableFuture listIncidentTemplateVariablesAsync() { + return listIncidentTemplateVariablesWithHttpInfoAsync( + new ListIncidentTemplateVariablesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List incident template variables. + * + *

See {@link #listIncidentTemplateVariablesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentTemplateVariablesResponse + * @throws ApiException if fails to make API call + */ + public IncidentTemplateVariablesResponse listIncidentTemplateVariables( + ListIncidentTemplateVariablesOptionalParameters parameters) throws ApiException { + return listIncidentTemplateVariablesWithHttpInfo(parameters).getData(); + } + + /** + * List incident template variables. + * + *

See {@link #listIncidentTemplateVariablesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentTemplateVariablesResponse> + */ + public CompletableFuture listIncidentTemplateVariablesAsync( + ListIncidentTemplateVariablesOptionalParameters parameters) { + return listIncidentTemplateVariablesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all available template variables for incident templates. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentTemplateVariablesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listIncidentTemplateVariablesWithHttpInfo( + ListIncidentTemplateVariablesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentTemplateVariables"; + 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; + Boolean includeFollowUps = parameters.includeFollowUps; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/template-variables"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "includeFollowUps", includeFollowUps)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentTemplateVariables", + 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 template variables. + * + *

See {@link #listIncidentTemplateVariablesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentTemplateVariablesResponse>> + */ + public CompletableFuture> + listIncidentTemplateVariablesWithHttpInfoAsync( + ListIncidentTemplateVariablesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentTemplateVariables"; + 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; + Boolean includeFollowUps = parameters.includeFollowUps; + // create path and map variables + String localVarPath = "/api/v2/incidents/config/template-variables"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[incident-type]", filterIncidentType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "includeFollowUps", includeFollowUps)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentTemplateVariables", + 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 timeline entries. + * + *

See {@link #listIncidentTimelineEntriesWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentTimelineEntriesResponse + * @throws ApiException if fails to make API call + */ + public IncidentTimelineEntriesResponse listIncidentTimelineEntries(String incidentId) + throws ApiException { + return listIncidentTimelineEntriesWithHttpInfo(incidentId).getData(); + } + + /** + * List incident timeline entries. + * + *

See {@link #listIncidentTimelineEntriesWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentTimelineEntriesResponse> + */ + public CompletableFuture listIncidentTimelineEntriesAsync( + String incidentId) { + return listIncidentTimelineEntriesWithHttpInfoAsync(incidentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the timeline for a given incident. + * + * @param incidentId The UUID of the incident. (required) + * @return ApiResponse<IncidentTimelineEntriesResponse> + * @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 listIncidentTimelineEntriesWithHttpInfo( + String incidentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentTimelineEntries"; + 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 listIncidentTimelineEntries"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/timeline" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentTimelineEntries", + 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 timeline entries. + * + *

See {@link #listIncidentTimelineEntriesWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<ApiResponse<IncidentTimelineEntriesResponse>> + */ + public CompletableFuture> + listIncidentTimelineEntriesWithHttpInfoAsync(String incidentId) { + // Check if unstable operation is enabled + String operationId = "listIncidentTimelineEntries"; + 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" + + " listIncidentTimelineEntries")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/timeline" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listIncidentTimelineEntries", + 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 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() {}); + } + + /** + * List status page email subscriptions. + * + *

See {@link #listStatuspageEmailSubscriptionsWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @return IncidentStatuspageSubscriptionsResponse + * @throws ApiException if fails to make API call + */ + public IncidentStatuspageSubscriptionsResponse listStatuspageEmailSubscriptions(String pageId) + throws ApiException { + return listStatuspageEmailSubscriptionsWithHttpInfo(pageId).getData(); + } + + /** + * List status page email subscriptions. + * + *

See {@link #listStatuspageEmailSubscriptionsWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @return CompletableFuture<IncidentStatuspageSubscriptionsResponse> + */ + public CompletableFuture + listStatuspageEmailSubscriptionsAsync(String pageId) { + return listStatuspageEmailSubscriptionsWithHttpInfoAsync(pageId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all email subscriptions for a status page. + * + * @param pageId The ID of the status page. (required) + * @return ApiResponse<IncidentStatuspageSubscriptionsResponse> + * @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 + listStatuspageEmailSubscriptionsWithHttpInfo(String pageId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listStatuspageEmailSubscriptions"; + 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 'pageId' is set + if (pageId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'pageId' when calling listStatuspageEmailSubscriptions"); + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/subscriptions/email" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.listStatuspageEmailSubscriptions", + 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 status page email subscriptions. + * + *

See {@link #listStatuspageEmailSubscriptionsWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @return CompletableFuture<ApiResponse<IncidentStatuspageSubscriptionsResponse>> + */ + public CompletableFuture> + listStatuspageEmailSubscriptionsWithHttpInfoAsync(String pageId) { + // Check if unstable operation is enabled + String operationId = "listStatuspageEmailSubscriptions"; + 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 'pageId' is set + if (pageId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'pageId' when calling" + + " listStatuspageEmailSubscriptions")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/subscriptions/email" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.listStatuspageEmailSubscriptions", + 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 patchIncidentNotificationRule. */ + public static class PatchIncidentNotificationRuleOptionalParameters { + 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 PatchIncidentNotificationRuleOptionalParameters + */ + public PatchIncidentNotificationRuleOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Patch an incident notification rule. + * + *

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

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

See {@link #patchIncidentNotificationRuleWithHttpInfo}. + * + * @param id The ID of the notification rule. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return IncidentNotificationRule + * @throws ApiException if fails to make API call + */ + public IncidentNotificationRule patchIncidentNotificationRule( + UUID id, + PutIncidentNotificationRuleRequest body, + PatchIncidentNotificationRuleOptionalParameters parameters) + throws ApiException { + return patchIncidentNotificationRuleWithHttpInfo(id, body, parameters).getData(); + } + + /** + * Patch an incident notification rule. + * + *

See {@link #patchIncidentNotificationRuleWithHttpInfoAsync}. + * + * @param id The ID of the notification rule. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentNotificationRule> + */ + public CompletableFuture patchIncidentNotificationRuleAsync( + UUID id, + PutIncidentNotificationRuleRequest body, + PatchIncidentNotificationRuleOptionalParameters parameters) { + return patchIncidentNotificationRuleWithHttpInfoAsync(id, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Partially updates an existing notification rule. + * + * @param id The ID of the notification rule. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentNotificationRule> + * @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 patchIncidentNotificationRuleWithHttpInfo( + UUID id, + PutIncidentNotificationRuleRequest body, + PatchIncidentNotificationRuleOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "patchIncidentNotificationRule"; + 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 patchIncidentNotificationRule"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling patchIncidentNotificationRule"); + } + String include = parameters.include; + // create path and map variables + 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", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.patchIncidentNotificationRule", + 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 notification rule. + * + *

See {@link #patchIncidentNotificationRuleWithHttpInfo}. + * + * @param id The ID of the notification rule. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> + */ + public CompletableFuture> + patchIncidentNotificationRuleWithHttpInfoAsync( + UUID id, + PutIncidentNotificationRuleRequest body, + PatchIncidentNotificationRuleOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "patchIncidentNotificationRule"; + 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 patchIncidentNotificationRule")); + 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 patchIncidentNotificationRule")); + 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())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.patchIncidentNotificationRule", + 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() {}); + } + + /** + * Render an incident template. + * + *

See {@link #renderIncidentTemplateWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return IncidentRenderedTemplateResponse + * @throws ApiException if fails to make API call + */ + public IncidentRenderedTemplateResponse renderIncidentTemplate( + String incidentId, IncidentRenderTemplateRequest body) throws ApiException { + return renderIncidentTemplateWithHttpInfo(incidentId, body).getData(); + } + + /** + * Render an incident template. + * + *

See {@link #renderIncidentTemplateWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return CompletableFuture<IncidentRenderedTemplateResponse> + */ + public CompletableFuture renderIncidentTemplateAsync( + String incidentId, IncidentRenderTemplateRequest body) { + return renderIncidentTemplateWithHttpInfoAsync(incidentId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Render a template with incident-specific data. + * + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return ApiResponse<IncidentRenderedTemplateResponse> + * @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 renderIncidentTemplateWithHttpInfo( + String incidentId, IncidentRenderTemplateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "renderIncidentTemplate"; + 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 renderIncidentTemplate"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling renderIncidentTemplate"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/render-template" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.renderIncidentTemplate", + 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() {}); + } + + /** + * Render an incident template. + * + *

See {@link #renderIncidentTemplateWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentRenderedTemplateResponse>> + */ + public CompletableFuture> + renderIncidentTemplateWithHttpInfoAsync( + String incidentId, IncidentRenderTemplateRequest body) { + // Check if unstable operation is enabled + String operationId = "renderIncidentTemplate"; + 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 renderIncidentTemplate")); + 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 renderIncidentTemplate")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/render-template" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.renderIncidentTemplate", + 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 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 searchIncidentsV2. */ + public static class SearchIncidentsV2OptionalParameters { + private String query; + private IncidentSearchIncidentsSortOrder sort; + private Boolean withFacets; + private Boolean filterWithDeleted; + private String semanticQuery; + private String timeZone; + private List include; + private Long pageSize; + private Long pageOffset; + + /** + * Set query. + * + * @param query Specifies which incidents should be returned by the search. (optional) + * @return SearchIncidentsV2OptionalParameters + */ + public SearchIncidentsV2OptionalParameters query(String query) { + this.query = query; + return this; + } + + /** + * Set sort. + * + * @param sort Specifies the order of returned incidents. (optional) + * @return SearchIncidentsV2OptionalParameters + */ + public SearchIncidentsV2OptionalParameters sort(IncidentSearchIncidentsSortOrder sort) { + this.sort = sort; + return this; + } + + /** + * Set withFacets. + * + * @param withFacets Whether to include facet data in the response. (optional, default to true) + * @return SearchIncidentsV2OptionalParameters + */ + public SearchIncidentsV2OptionalParameters withFacets(Boolean withFacets) { + this.withFacets = withFacets; + return this; + } + + /** + * Set filterWithDeleted. + * + * @param filterWithDeleted Whether to include deleted incidents in the response. (optional, + * default to false) + * @return SearchIncidentsV2OptionalParameters + */ + public SearchIncidentsV2OptionalParameters filterWithDeleted(Boolean filterWithDeleted) { + this.filterWithDeleted = filterWithDeleted; + return this; + } + + /** + * Set semanticQuery. + * + * @param semanticQuery A semantic search query. (optional) + * @return SearchIncidentsV2OptionalParameters + */ + public SearchIncidentsV2OptionalParameters semanticQuery(String semanticQuery) { + this.semanticQuery = semanticQuery; + return this; + } + + /** + * Set timeZone. + * + * @param timeZone The timezone for date-based operations. (optional) + * @return SearchIncidentsV2OptionalParameters + */ + public SearchIncidentsV2OptionalParameters timeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Set include. + * + * @param include Specifies which types of related objects to include. (optional) + * @return SearchIncidentsV2OptionalParameters + */ + public SearchIncidentsV2OptionalParameters 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 SearchIncidentsV2OptionalParameters + */ + public SearchIncidentsV2OptionalParameters 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 SearchIncidentsV2OptionalParameters + */ + public SearchIncidentsV2OptionalParameters pageOffset(Long pageOffset) { + this.pageOffset = pageOffset; + return this; + } + } + + /** + * Search incidents. + * + *

See {@link #searchIncidentsV2WithHttpInfo}. + * + * @return IncidentSearchResponse + * @throws ApiException if fails to make API call + */ + public IncidentSearchResponse searchIncidentsV2() throws ApiException { + return searchIncidentsV2WithHttpInfo(new SearchIncidentsV2OptionalParameters()).getData(); + } + + /** + * Search incidents. + * + *

See {@link #searchIncidentsV2WithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentSearchResponse> + */ + public CompletableFuture searchIncidentsV2Async() { + return searchIncidentsV2WithHttpInfoAsync(new SearchIncidentsV2OptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search incidents. + * + *

See {@link #searchIncidentsV2WithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentSearchResponse + * @throws ApiException if fails to make API call + */ + public IncidentSearchResponse searchIncidentsV2(SearchIncidentsV2OptionalParameters parameters) + throws ApiException { + return searchIncidentsV2WithHttpInfo(parameters).getData(); + } + + /** + * Search incidents. + * + *

See {@link #searchIncidentsV2WithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentSearchResponse> + */ + public CompletableFuture searchIncidentsV2Async( + SearchIncidentsV2OptionalParameters parameters) { + return searchIncidentsV2WithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search for incidents using advanced filtering and pagination. + * + * @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 -
429 Too many requests -
+ */ + public ApiResponse searchIncidentsV2WithHttpInfo( + SearchIncidentsV2OptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "searchIncidentsV2"; + 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 query = parameters.query; + IncidentSearchIncidentsSortOrder sort = parameters.sort; + Boolean withFacets = parameters.withFacets; + Boolean filterWithDeleted = parameters.filterWithDeleted; + String semanticQuery = parameters.semanticQuery; + String timeZone = parameters.timeZone; + List include = parameters.include; + Long pageSize = parameters.pageSize; + Long pageOffset = parameters.pageOffset; + // create path and map variables + String localVarPath = "/api/v2/incidents/search-incidents"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "with_facets", withFacets)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[with_deleted]", filterWithDeleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "semantic_query", semanticQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "timeZone", timeZone)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.searchIncidentsV2", + 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 incidents. + * + *

See {@link #searchIncidentsV2WithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentSearchResponse>> + */ + public CompletableFuture> searchIncidentsV2WithHttpInfoAsync( + SearchIncidentsV2OptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "searchIncidentsV2"; + 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 query = parameters.query; + IncidentSearchIncidentsSortOrder sort = parameters.sort; + Boolean withFacets = parameters.withFacets; + Boolean filterWithDeleted = parameters.filterWithDeleted; + String semanticQuery = parameters.semanticQuery; + String timeZone = parameters.timeZone; + List include = parameters.include; + Long pageSize = parameters.pageSize; + Long pageOffset = parameters.pageOffset; + // create path and map variables + String localVarPath = "/api/v2/incidents/search-incidents"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "with_facets", withFacets)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[with_deleted]", filterWithDeleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "semantic_query", semanticQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "timeZone", timeZone)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "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.searchIncidentsV2", + 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 include Resource to include in the response. Supported value: + * last_modified_by_user. (optional) + * @return UpdateIncidentAttachmentOptionalParameters + */ + 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 communication. + * + *

See {@link #updateIncidentCommunicationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @param body (required) + * @return IncidentCommunicationResponse + * @throws ApiException if fails to make API call + */ + public IncidentCommunicationResponse updateIncidentCommunication( + String incidentId, UUID communicationId, IncidentCommunicationRequest body) + throws ApiException { + return updateIncidentCommunicationWithHttpInfo(incidentId, communicationId, body).getData(); + } + + /** + * Update an incident communication. + * + *

See {@link #updateIncidentCommunicationWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @param body (required) + * @return CompletableFuture<IncidentCommunicationResponse> + */ + public CompletableFuture updateIncidentCommunicationAsync( + String incidentId, UUID communicationId, IncidentCommunicationRequest body) { + return updateIncidentCommunicationWithHttpInfoAsync(incidentId, communicationId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a communication for a given incident. + * + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @param body (required) + * @return ApiResponse<IncidentCommunicationResponse> + * @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 updateIncidentCommunicationWithHttpInfo( + String incidentId, UUID communicationId, IncidentCommunicationRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateIncidentCommunication"; + 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 updateIncidentCommunication"); + } + + // verify the required parameter 'communicationId' is set + if (communicationId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'communicationId' when calling" + + " updateIncidentCommunication"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncidentCommunication"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/communications/{communication_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "communication_id" + "\\}", + apiClient.escapeString(communicationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentCommunication", + 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 communication. + * + *

See {@link #updateIncidentCommunicationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param communicationId The ID of the communication. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentCommunicationResponse>> + */ + public CompletableFuture> + updateIncidentCommunicationWithHttpInfoAsync( + String incidentId, UUID communicationId, IncidentCommunicationRequest body) { + // Check if unstable operation is enabled + String operationId = "updateIncidentCommunication"; + 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" + + " updateIncidentCommunication")); + return result; + } + + // verify the required parameter 'communicationId' is set + if (communicationId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'communicationId' when calling" + + " updateIncidentCommunication")); + 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 updateIncidentCommunication")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/communications/{communication_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "communication_id" + "\\}", + apiClient.escapeString(communicationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentCommunication", + 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 existing incident integration metadata. + * + *

See {@link #updateIncidentIntegrationWithHttpInfo}. + * + * @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 IncidentIntegrationMetadataResponse updateIncidentIntegration( + String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) + throws ApiException { + return updateIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId, body).getData(); + } + + /** + * Update an existing incident integration metadata. + * + *

See {@link #updateIncidentIntegrationWithHttpInfoAsync}. + * + * @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 updateIncidentIntegrationAsync( + String incidentId, + String integrationMetadataId, + IncidentIntegrationMetadataPatchRequest body) { + return updateIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing incident integration metadata. + * + * @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 + * + * + * + * + * + * + * + * + * + *
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 updateIncidentIntegrationWithHttpInfo( + String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateIncidentIntegration"; + 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 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 updateIncidentIntegration"); + } + // create path and map variables + 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.updateIncidentIntegration", + 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 existing incident integration metadata. + * + *

See {@link #updateIncidentIntegrationWithHttpInfo}. + * + * @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> + updateIncidentIntegrationWithHttpInfoAsync( + String incidentId, + String integrationMetadataId, + IncidentIntegrationMetadataPatchRequest body) { + // Check if unstable operation is enabled + String operationId = "updateIncidentIntegration"; + 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" + + " 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; + } + + // 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 updateIncidentIntegration")); + 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())) + .replaceAll( + "\\{" + "integration_metadata_id" + "\\}", + apiClient.escapeString(integrationMetadataId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentIntegration", + 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 Jira template. * - *

See {@link #searchIncidentsWithHttpInfo}. + *

See {@link #updateIncidentJiraTemplateWithHttpInfo}. * - * @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 + * @param templateId The ID of the Jira template. (required) + * @param body (required) + * @return IncidentJiraTemplateResponse * @throws ApiException if fails to make API call */ - public IncidentSearchResponse searchIncidents( - String query, SearchIncidentsOptionalParameters parameters) throws ApiException { - return searchIncidentsWithHttpInfo(query, parameters).getData(); + public IncidentJiraTemplateResponse updateIncidentJiraTemplate( + UUID templateId, IncidentJiraTemplateRequest body) throws ApiException { + return updateIncidentJiraTemplateWithHttpInfo(templateId, body).getData(); } /** - * Search for incidents. + * Update an incident Jira template. * - *

See {@link #searchIncidentsWithHttpInfoAsync}. + *

See {@link #updateIncidentJiraTemplateWithHttpInfoAsync}. * - * @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> + * @param templateId The ID of the Jira template. (required) + * @param body (required) + * @return CompletableFuture<IncidentJiraTemplateResponse> */ - public CompletableFuture searchIncidentsAsync( - String query, SearchIncidentsOptionalParameters parameters) { - return searchIncidentsWithHttpInfoAsync(query, parameters) + public CompletableFuture updateIncidentJiraTemplateAsync( + UUID templateId, IncidentJiraTemplateRequest body) { + return updateIncidentJiraTemplateWithHttpInfoAsync(templateId, body) .thenApply( response -> { return response.getData(); @@ -8500,78 +18031,11 @@ 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 existing incident Jira template. * - * @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> + * @param templateId The ID of the Jira template. (required) + * @param body (required) + * @return ApiResponse<IncidentJiraTemplateResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -8585,180 +18049,191 @@ public PaginationIterable searchIncidentsWi * *
429 Too many requests -
*/ - public ApiResponse searchIncidentsWithHttpInfo( - String query, SearchIncidentsOptionalParameters parameters) throws ApiException { + public ApiResponse updateIncidentJiraTemplateWithHttpInfo( + UUID templateId, IncidentJiraTemplateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "searchIncidents"; + String operationId = "updateIncidentJiraTemplate"; 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 'templateId' is set + if (templateId == null) { throw new ApiException( - 400, "Missing the required parameter 'query' when calling searchIncidents"); + 400, + "Missing the required parameter 'templateId' when calling updateIncidentJiraTemplate"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncidentJiraTemplate"); } - 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"; + String localVarPath = + "/api/v2/incidents/config/jira-templates/{template_id}" + .replaceAll( + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.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)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.searchIncidents", + "v2.IncidentsApi.updateIncidentJiraTemplate", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), 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 Jira template. * - *

See {@link #searchIncidentsWithHttpInfo}. + *

See {@link #updateIncidentJiraTemplateWithHttpInfo}. * - * @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>> + * @param templateId The ID of the Jira template. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentJiraTemplateResponse>> */ - public CompletableFuture> searchIncidentsWithHttpInfoAsync( - String query, SearchIncidentsOptionalParameters parameters) { + public CompletableFuture> + updateIncidentJiraTemplateWithHttpInfoAsync( + UUID templateId, IncidentJiraTemplateRequest body) { // Check if unstable operation is enabled - String operationId = "searchIncidents"; + String operationId = "updateIncidentJiraTemplate"; 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 'templateId' is set + if (templateId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'query' when calling searchIncidents")); + 400, + "Missing the required parameter 'templateId' when calling" + + " updateIncidentJiraTemplate")); + 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 updateIncidentJiraTemplate")); 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"; + String localVarPath = + "/api/v2/incidents/config/jira-templates/{template_id}" + .replaceAll( + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.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)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.searchIncidents", + "v2.IncidentsApi.updateIncidentJiraTemplate", 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", + "PUT", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to updateGlobalIncidentHandle. */ - public static class UpdateGlobalIncidentHandleOptionalParameters { + /** Manage optional parameters to updateIncidentMicrosoftTeamsConfiguration. */ + public static class UpdateIncidentMicrosoftTeamsConfigurationOptionalParameters { private String include; /** * Set include. * - * @param include Comma-separated list of related resources to include in the response - * (optional) - * @return UpdateGlobalIncidentHandleOptionalParameters + * @param include Specifies which related objects to include in the response. (optional) + * @return UpdateIncidentMicrosoftTeamsConfigurationOptionalParameters */ - public UpdateGlobalIncidentHandleOptionalParameters include(String include) { + public UpdateIncidentMicrosoftTeamsConfigurationOptionalParameters include(String include) { this.include = include; return this; } } /** - * Update global incident handle. + * Update an incident Microsoft Teams configuration. * - *

See {@link #updateGlobalIncidentHandleWithHttpInfo}. + *

See {@link #updateIncidentMicrosoftTeamsConfigurationWithHttpInfo}. * + * @param configurationId The ID of the Microsoft Teams configuration. (required) * @param body (required) - * @return IncidentHandleResponse + * @return IncidentMicrosoftTeamsConfigurationResponse * @throws ApiException if fails to make API call */ - public IncidentHandleResponse updateGlobalIncidentHandle(IncidentHandleRequest body) - throws ApiException { - return updateGlobalIncidentHandleWithHttpInfo( - body, new UpdateGlobalIncidentHandleOptionalParameters()) + public IncidentMicrosoftTeamsConfigurationResponse updateIncidentMicrosoftTeamsConfiguration( + UUID configurationId, IncidentMicrosoftTeamsConfigurationRequest body) throws ApiException { + return updateIncidentMicrosoftTeamsConfigurationWithHttpInfo( + configurationId, + body, + new UpdateIncidentMicrosoftTeamsConfigurationOptionalParameters()) .getData(); } /** - * Update global incident handle. + * Update an incident Microsoft Teams configuration. * - *

See {@link #updateGlobalIncidentHandleWithHttpInfoAsync}. + *

See {@link #updateIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync}. * + * @param configurationId The ID of the Microsoft Teams configuration. (required) * @param body (required) - * @return CompletableFuture<IncidentHandleResponse> - */ - public CompletableFuture updateGlobalIncidentHandleAsync( - IncidentHandleRequest body) { - return updateGlobalIncidentHandleWithHttpInfoAsync( - body, new UpdateGlobalIncidentHandleOptionalParameters()) + * @return CompletableFuture<IncidentMicrosoftTeamsConfigurationResponse> + */ + public CompletableFuture + updateIncidentMicrosoftTeamsConfigurationAsync( + UUID configurationId, IncidentMicrosoftTeamsConfigurationRequest body) { + return updateIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync( + configurationId, + body, + new UpdateIncidentMicrosoftTeamsConfigurationOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -8766,33 +18241,42 @@ body, new UpdateGlobalIncidentHandleOptionalParameters()) } /** - * Update global incident handle. + * Update an incident Microsoft Teams configuration. * - *

See {@link #updateGlobalIncidentHandleWithHttpInfo}. + *

See {@link #updateIncidentMicrosoftTeamsConfigurationWithHttpInfo}. * + * @param configurationId The ID of the Microsoft Teams configuration. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return IncidentHandleResponse + * @return IncidentMicrosoftTeamsConfigurationResponse * @throws ApiException if fails to make API call */ - public IncidentHandleResponse updateGlobalIncidentHandle( - IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) + public IncidentMicrosoftTeamsConfigurationResponse updateIncidentMicrosoftTeamsConfiguration( + UUID configurationId, + IncidentMicrosoftTeamsConfigurationRequest body, + UpdateIncidentMicrosoftTeamsConfigurationOptionalParameters parameters) throws ApiException { - return updateGlobalIncidentHandleWithHttpInfo(body, parameters).getData(); + return updateIncidentMicrosoftTeamsConfigurationWithHttpInfo(configurationId, body, parameters) + .getData(); } /** - * Update global incident handle. + * Update an incident Microsoft Teams configuration. * - *

See {@link #updateGlobalIncidentHandleWithHttpInfoAsync}. + *

See {@link #updateIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync}. * + * @param configurationId The ID of the Microsoft Teams configuration. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentHandleResponse> - */ - public CompletableFuture updateGlobalIncidentHandleAsync( - IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) { - return updateGlobalIncidentHandleWithHttpInfoAsync(body, parameters) + * @return CompletableFuture<IncidentMicrosoftTeamsConfigurationResponse> + */ + public CompletableFuture + updateIncidentMicrosoftTeamsConfigurationAsync( + UUID configurationId, + IncidentMicrosoftTeamsConfigurationRequest body, + UpdateIncidentMicrosoftTeamsConfigurationOptionalParameters parameters) { + return updateIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync( + configurationId, body, parameters) .thenApply( response -> { return response.getData(); @@ -8800,11 +18284,12 @@ public CompletableFuture updateGlobalIncidentHandleAsync } /** - * Update an existing global incident handle. + * Update a Microsoft Teams configuration for incidents. * + * @param configurationId The ID of the Microsoft Teams configuration. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentHandleResponse> + * @return ApiResponse<IncidentMicrosoftTeamsConfigurationResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -8812,14 +18297,20 @@ 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 + updateIncidentMicrosoftTeamsConfigurationWithHttpInfo( + UUID configurationId, + IncidentMicrosoftTeamsConfigurationRequest body, + UpdateIncidentMicrosoftTeamsConfigurationOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateGlobalIncidentHandle"; + String operationId = "updateIncidentMicrosoftTeamsConfiguration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8827,14 +18318,28 @@ public ApiResponse updateGlobalIncidentHandleWithHttpInf } Object localVarPostBody = body; + // verify the required parameter 'configurationId' is set + if (configurationId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'configurationId' when calling" + + " updateIncidentMicrosoftTeamsConfiguration"); + } + // 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" + + " updateIncidentMicrosoftTeamsConfiguration"); } String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/incident-handles"; + String localVarPath = + "/api/v2/incidents/config/microsoft-teams-configurations/{configuration_id}" + .replaceAll( + "\\{" + "configuration_id" + "\\}", + apiClient.escapeString(configurationId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -8843,60 +18348,82 @@ public ApiResponse updateGlobalIncidentHandleWithHttpInf Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateGlobalIncidentHandle", + "v2.IncidentsApi.updateIncidentMicrosoftTeamsConfiguration", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + 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 global incident handle. + * Update an incident Microsoft Teams configuration. * - *

See {@link #updateGlobalIncidentHandleWithHttpInfo}. + *

See {@link #updateIncidentMicrosoftTeamsConfigurationWithHttpInfo}. * + * @param configurationId The ID of the Microsoft Teams configuration. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentHandleResponse>> + * @return CompletableFuture<ApiResponse<IncidentMicrosoftTeamsConfigurationResponse>> */ - public CompletableFuture> - updateGlobalIncidentHandleWithHttpInfoAsync( - IncidentHandleRequest body, UpdateGlobalIncidentHandleOptionalParameters parameters) { + public CompletableFuture> + updateIncidentMicrosoftTeamsConfigurationWithHttpInfoAsync( + UUID configurationId, + IncidentMicrosoftTeamsConfigurationRequest body, + UpdateIncidentMicrosoftTeamsConfigurationOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateGlobalIncidentHandle"; + String operationId = "updateIncidentMicrosoftTeamsConfiguration"; 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 'configurationId' is set + if (configurationId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'configurationId' when calling" + + " updateIncidentMicrosoftTeamsConfiguration")); + 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")); + "Missing the required parameter 'body' when calling" + + " updateIncidentMicrosoftTeamsConfiguration")); 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/microsoft-teams-configurations/{configuration_id}" + .replaceAll( + "\\{" + "configuration_id" + "\\}", + apiClient.escapeString(configurationId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -8907,54 +18434,78 @@ public ApiResponse updateGlobalIncidentHandleWithHttpInf try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateGlobalIncidentHandle", + "v2.IncidentsApi.updateIncidentMicrosoftTeamsConfiguration", localVarPath, 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; } return apiClient.invokeAPIAsync( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + 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 global incident settings. + * Update an incident notification rule. * - *

See {@link #updateGlobalIncidentSettingsWithHttpInfo}. + *

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

See {@link #updateGlobalIncidentSettingsWithHttpInfoAsync}. + *

See {@link #updateIncidentNotificationRuleWithHttpInfoAsync}. * + * @param id The ID of the notification rule. (required) * @param body (required) - * @return CompletableFuture<GlobalIncidentSettingsResponse> + * @return CompletableFuture<IncidentNotificationRule> */ - public CompletableFuture updateGlobalIncidentSettingsAsync( - GlobalIncidentSettingsRequest body) { - return updateGlobalIncidentSettingsWithHttpInfoAsync(body) + public CompletableFuture updateIncidentNotificationRuleAsync( + UUID id, PutIncidentNotificationRuleRequest body) { + return updateIncidentNotificationRuleWithHttpInfoAsync( + id, body, new UpdateIncidentNotificationRuleOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -8962,10 +18513,52 @@ public CompletableFuture updateGlobalIncidentSet } /** - * Update global incident settings for the organization. + * Update an incident notification rule. + * + *

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

See {@link #updateIncidentNotificationRuleWithHttpInfoAsync}. + * + * @param id The ID of the notification rule. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentNotificationRule> + */ + public CompletableFuture updateIncidentNotificationRuleAsync( + UUID id, + PutIncidentNotificationRuleRequest body, + UpdateIncidentNotificationRuleOptionalParameters parameters) { + return updateIncidentNotificationRuleWithHttpInfoAsync(id, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Updates an existing notification rule with a complete replacement. + * + * @param id The ID of the notification rule. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentNotificationRule> * @throws ApiException if fails to make API call * @http.response.details * @@ -8973,13 +18566,19 @@ 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 updateIncidentNotificationRuleWithHttpInfo( + UUID id, + PutIncidentNotificationRuleRequest body, + UpdateIncidentNotificationRuleOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateGlobalIncidentSettings"; + String operationId = "updateIncidentNotificationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8987,147 +18586,180 @@ public ApiResponse updateGlobalIncidentSettingsW } Object localVarPostBody = body; + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 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 updateGlobalIncidentSettings"); + 400, "Missing the required parameter 'body' when calling updateIncidentNotificationRule"); } + String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/settings"; + 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", include)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateGlobalIncidentSettings", + "v2.IncidentsApi.updateIncidentNotificationRule", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + 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 global incident settings. + * Update an incident notification rule. * - *

See {@link #updateGlobalIncidentSettingsWithHttpInfo}. + *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. * + * @param id The ID of the notification rule. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<GlobalIncidentSettingsResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> */ - public CompletableFuture> - updateGlobalIncidentSettingsWithHttpInfoAsync(GlobalIncidentSettingsRequest body) { + public CompletableFuture> + updateIncidentNotificationRuleWithHttpInfoAsync( + UUID id, + PutIncidentNotificationRuleRequest body, + UpdateIncidentNotificationRuleOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateGlobalIncidentSettings"; + 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 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 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 updateGlobalIncidentSettings")); + "Missing the required parameter 'body' when calling updateIncidentNotificationRule")); return result; } + String include = parameters.include; // create path and map variables - String localVarPath = "/api/v2/incidents/config/global/settings"; + 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", include)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateGlobalIncidentSettings", + "v2.IncidentsApi.updateIncidentNotificationRule", 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; } return apiClient.invokeAPIAsync( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to updateIncident. */ - public static class UpdateIncidentOptionalParameters { - private List include; + /** Manage optional parameters to updateIncidentNotificationTemplate. */ + public static class UpdateIncidentNotificationTemplateOptionalParameters { + private String include; /** * Set include. * - * @param include Specifies which types of related objects should be included in the response. + * @param include Comma-separated list of relationships to include. Supported values: + * created_by_user, last_modified_by_user, incident_type * (optional) - * @return UpdateIncidentOptionalParameters + * @return UpdateIncidentNotificationTemplateOptionalParameters */ - public UpdateIncidentOptionalParameters include(List include) { + public UpdateIncidentNotificationTemplateOptionalParameters include(String include) { this.include = include; return this; } } /** - * Update an existing incident. + * Update incident notification template. * - *

See {@link #updateIncidentWithHttpInfo}. + *

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

See {@link #updateIncidentWithHttpInfoAsync}. + *

See {@link #updateIncidentNotificationTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) - * @return CompletableFuture<IncidentResponse> + * @param id The ID of the notification template. (required) + * @param body (required) + * @return CompletableFuture<IncidentNotificationTemplate> */ - public CompletableFuture updateIncidentAsync( - String incidentId, IncidentUpdateRequest body) { - return updateIncidentWithHttpInfoAsync(incidentId, body, new UpdateIncidentOptionalParameters()) + public CompletableFuture updateIncidentNotificationTemplateAsync( + UUID id, PatchIncidentNotificationTemplateRequest body) { + return updateIncidentNotificationTemplateWithHttpInfoAsync( + id, body, new UpdateIncidentNotificationTemplateOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -9135,35 +18767,39 @@ public CompletableFuture updateIncidentAsync( } /** - * Update an existing incident. + * Update incident notification template. * - *

See {@link #updateIncidentWithHttpInfo}. + *

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

See {@link #updateIncidentWithHttpInfoAsync}. + *

See {@link #updateIncidentNotificationTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) + * @param id The ID of the notification template. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentResponse> + * @return CompletableFuture<IncidentNotificationTemplate> */ - public CompletableFuture updateIncidentAsync( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { - return updateIncidentWithHttpInfoAsync(incidentId, body, parameters) + public CompletableFuture updateIncidentNotificationTemplateAsync( + UUID id, + PatchIncidentNotificationTemplateRequest body, + UpdateIncidentNotificationTemplateOptionalParameters parameters) { + return updateIncidentNotificationTemplateWithHttpInfoAsync(id, body, parameters) .thenApply( response -> { return response.getData(); @@ -9171,13 +18807,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 template's attributes. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) + * @param id The ID of the notification template. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentResponse> + * @return ApiResponse<IncidentNotificationTemplate> * @throws ApiException if fails to make API call * @http.response.details * @@ -9191,11 +18826,13 @@ public CompletableFuture updateIncidentAsync( * *
429 Too many requests -
*/ - public ApiResponse updateIncidentWithHttpInfo( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) + public ApiResponse updateIncidentNotificationTemplateWithHttpInfo( + UUID id, + PatchIncidentNotificationTemplateRequest body, + UpdateIncidentNotificationTemplateOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncident"; + String operationId = "updateIncidentNotificationTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9203,32 +18840,33 @@ 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 updateIncidentNotificationTemplate"); } // 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 updateIncidentNotificationTemplate"); } - 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-templates/{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.updateIncidentNotificationTemplate", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -9243,67 +18881,76 @@ public ApiResponse updateIncidentWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an existing incident. + * Update incident notification template. * - *

See {@link #updateIncidentWithHttpInfo}. + *

See {@link #updateIncidentNotificationTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) + * @param id The ID of the notification template. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentResponse>> + * @return CompletableFuture<ApiResponse<IncidentNotificationTemplate>> */ - public CompletableFuture> updateIncidentWithHttpInfoAsync( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { + public CompletableFuture> + updateIncidentNotificationTemplateWithHttpInfoAsync( + UUID id, + PatchIncidentNotificationTemplateRequest body, + UpdateIncidentNotificationTemplateOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateIncident"; + 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<>(); + // 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" + + " 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 updateIncident")); + 400, + "Missing the required parameter 'body' when calling" + + " updateIncidentNotificationTemplate")); 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-templates/{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.updateIncidentNotificationTemplate", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -9311,7 +18958,8 @@ 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; } @@ -9323,103 +18971,36 @@ public CompletableFuture> updateIncidentWithHttpIn localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to updateIncidentAttachment. */ - public static class UpdateIncidentAttachmentOptionalParameters { - private String include; - - /** - * Set include. - * - * @param include Resource to include in the response. Supported value: - * last_modified_by_user. (optional) - * @return UpdateIncidentAttachmentOptionalParameters - */ - 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(); - }); + new GenericType() {}); } /** - * Update incident attachment. + * Update postmortem template. * - *

See {@link #updateIncidentAttachmentWithHttpInfo}. + *

See {@link #updateIncidentPostmortemTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param templateId The ID of the postmortem template (required) * @param body (required) - * @param parameters Optional parameters for the request. - * @return Attachment + * @return PostmortemTemplateResponse * @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(); + public PostmortemTemplateResponse updateIncidentPostmortemTemplate( + String templateId, PostmortemTemplateRequest body) throws ApiException { + return updateIncidentPostmortemTemplateWithHttpInfo(templateId, body).getData(); } /** - * Update incident attachment. + * Update postmortem template. * - *

See {@link #updateIncidentAttachmentWithHttpInfoAsync}. + *

See {@link #updateIncidentPostmortemTemplateWithHttpInfoAsync}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param templateId The ID of the postmortem template (required) * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<Attachment> + * @return CompletableFuture<PostmortemTemplateResponse> */ - public CompletableFuture updateIncidentAttachmentAsync( - String incidentId, - String attachmentId, - PatchAttachmentRequest body, - UpdateIncidentAttachmentOptionalParameters parameters) { - return updateIncidentAttachmentWithHttpInfoAsync(incidentId, attachmentId, body, parameters) + public CompletableFuture updateIncidentPostmortemTemplateAsync( + String templateId, PostmortemTemplateRequest body) { + return updateIncidentPostmortemTemplateWithHttpInfoAsync(templateId, body) .thenApply( response -> { return response.getData(); @@ -9427,11 +19008,11 @@ public CompletableFuture updateIncidentAttachmentAsync( } /** - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * Update an existing postmortem template. + * + * @param templateId The ID of the postmortem template (required) * @param body (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<Attachment> + * @return ApiResponse<PostmortemTemplateResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -9439,19 +19020,14 @@ public CompletableFuture updateIncidentAttachmentAsync( * * * - * * * *
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 { + public ApiResponse updateIncidentPostmortemTemplateWithHttpInfo( + String templateId, PostmortemTemplateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentAttachment"; + String operationId = "updateIncidentPostmortemTemplate"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9459,47 +19035,37 @@ 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 'templateId' is set + if (templateId == null) { throw new ApiException( 400, - "Missing the required parameter 'attachmentId' when calling updateIncidentAttachment"); + "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 updateIncidentAttachment"); + 400, + "Missing the required parameter 'body' when calling updateIncidentPostmortemTemplate"); } - 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())) + "/api/v2/incidents/config/postmortem-templates/{template_id}" .replaceAll( - "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentAttachment", + "v2.IncidentsApi.updateIncidentPostmortemTemplate", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( "PATCH", builder, @@ -9508,93 +19074,75 @@ public ApiResponse updateIncidentAttachmentWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update incident attachment. + * Update postmortem template. * - *

See {@link #updateIncidentAttachmentWithHttpInfo}. + *

See {@link #updateIncidentPostmortemTemplateWithHttpInfo}. * - * @param incidentId The UUID of the incident. (required) - * @param attachmentId The ID of the attachment. (required) + * @param templateId The ID of the postmortem template (required) * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<Attachment>> + * @return CompletableFuture<ApiResponse<PostmortemTemplateResponse>> */ - public CompletableFuture> updateIncidentAttachmentWithHttpInfoAsync( - String incidentId, - String attachmentId, - PatchAttachmentRequest body, - UpdateIncidentAttachmentOptionalParameters parameters) { + public CompletableFuture> + updateIncidentPostmortemTemplateWithHttpInfoAsync( + String templateId, PostmortemTemplateRequest body) { // Check if unstable operation is enabled - String operationId = "updateIncidentAttachment"; + 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 updateIncidentAttachment")); - return result; - } - - // verify the required parameter 'attachmentId' is set - if (attachmentId == 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 'attachmentId' when calling" - + " updateIncidentAttachment")); + "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 updateIncidentAttachment")); + 400, + "Missing the required parameter 'body' when calling" + + " updateIncidentPostmortemTemplate")); 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())) + "/api/v2/incidents/config/postmortem-templates/{template_id}" .replaceAll( - "\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + "\\{" + "template_id" + "\\}", apiClient.escapeString(templateId.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", + "v2.IncidentsApi.updateIncidentPostmortemTemplate", 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; } @@ -9606,41 +19154,51 @@ public CompletableFuture> updateIncidentAttachmentWithHt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an existing incident integration metadata. + * Update an incident Statuspage incident. * - *

See {@link #updateIncidentIntegrationWithHttpInfo}. + *

See {@link #updateIncidentStatuspageIncidentWithHttpInfo}. * * @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 pageId The ID of the Statuspage page. (required) + * @param statuspageIncidentId The ID of the Statuspage incident. (required) + * @param body (required) + * @return IncidentStatuspageIncidentResponse * @throws ApiException if fails to make API call */ - public IncidentIntegrationMetadataResponse updateIncidentIntegration( - String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) + public IncidentStatuspageIncidentResponse updateIncidentStatuspageIncident( + String incidentId, + String pageId, + String statuspageIncidentId, + IncidentStatuspageIncidentRequest body) throws ApiException { - return updateIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId, body).getData(); + return updateIncidentStatuspageIncidentWithHttpInfo( + incidentId, pageId, statuspageIncidentId, body) + .getData(); } /** - * Update an existing incident integration metadata. + * Update an incident Statuspage incident. * - *

See {@link #updateIncidentIntegrationWithHttpInfoAsync}. + *

See {@link #updateIncidentStatuspageIncidentWithHttpInfoAsync}. * * @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 pageId The ID of the Statuspage page. (required) + * @param statuspageIncidentId The ID of the Statuspage incident. (required) + * @param body (required) + * @return CompletableFuture<IncidentStatuspageIncidentResponse> */ - public CompletableFuture updateIncidentIntegrationAsync( - String incidentId, - String integrationMetadataId, - IncidentIntegrationMetadataPatchRequest body) { - return updateIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId, body) + public CompletableFuture + updateIncidentStatuspageIncidentAsync( + String incidentId, + String pageId, + String statuspageIncidentId, + IncidentStatuspageIncidentRequest body) { + return updateIncidentStatuspageIncidentWithHttpInfoAsync( + incidentId, pageId, statuspageIncidentId, body) .thenApply( response -> { return response.getData(); @@ -9648,12 +19206,13 @@ public CompletableFuture updateIncidentInte } /** - * Update an existing incident integration metadata. + * Update a Statuspage incident linked to a Datadog incident. * * @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 pageId The ID of the Statuspage page. (required) + * @param statuspageIncidentId The ID of the Statuspage incident. (required) + * @param body (required) + * @return ApiResponse<IncidentStatuspageIncidentResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -9667,11 +19226,15 @@ public CompletableFuture updateIncidentInte * *
429 Too many requests -
*/ - public ApiResponse updateIncidentIntegrationWithHttpInfo( - String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) - throws ApiException { + public ApiResponse + updateIncidentStatuspageIncidentWithHttpInfo( + String incidentId, + String pageId, + String statuspageIncidentId, + IncidentStatuspageIncidentRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentIntegration"; + String operationId = "updateIncidentStatuspageIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9683,36 +19246,46 @@ public ApiResponse updateIncidentIntegratio if (incidentId == null) { throw new ApiException( 400, - "Missing the required parameter 'incidentId' when calling updateIncidentIntegration"); + "Missing the required parameter 'incidentId' when calling" + + " updateIncidentStatuspageIncident"); } - // verify the required parameter 'integrationMetadataId' is set - if (integrationMetadataId == null) { + // verify the required parameter 'pageId' is set + if (pageId == null) { throw new ApiException( 400, - "Missing the required parameter 'integrationMetadataId' when calling" - + " updateIncidentIntegration"); + "Missing the required parameter 'pageId' when calling updateIncidentStatuspageIncident"); + } + + // verify the required parameter 'statuspageIncidentId' is set + if (statuspageIncidentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'statuspageIncidentId' when calling" + + " updateIncidentStatuspageIncident"); } // 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 updateIncidentStatuspageIncident"); } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + "/api/v2/incidents/statuspage/{incident_id}/statuspage-incidents/pages/{page_id}/incidents/{statuspage_incident_id}" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + "\\{" + "statuspage_incident_id" + "\\}", + apiClient.escapeString(statuspageIncidentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentIntegration", + "v2.IncidentsApi.updateIncidentStatuspageIncident", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9727,30 +19300,32 @@ public ApiResponse updateIncidentIntegratio localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an existing incident integration metadata. + * Update an incident Statuspage incident. * - *

See {@link #updateIncidentIntegrationWithHttpInfo}. + *

See {@link #updateIncidentStatuspageIncidentWithHttpInfo}. * * @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 pageId The ID of the Statuspage page. (required) + * @param statuspageIncidentId The ID of the Statuspage incident. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentStatuspageIncidentResponse>> */ - public CompletableFuture> - updateIncidentIntegrationWithHttpInfoAsync( + public CompletableFuture> + updateIncidentStatuspageIncidentWithHttpInfoAsync( String incidentId, - String integrationMetadataId, - IncidentIntegrationMetadataPatchRequest body) { + String pageId, + String statuspageIncidentId, + IncidentStatuspageIncidentRequest body) { // Check if unstable operation is enabled - String operationId = "updateIncidentIntegration"; + String operationId = "updateIncidentStatuspageIncident"; 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))); @@ -9760,45 +19335,60 @@ public ApiResponse updateIncidentIntegratio // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'incidentId' when calling" - + " updateIncidentIntegration")); + + " updateIncidentStatuspageIncident")); return result; } - // verify the required parameter 'integrationMetadataId' is set - if (integrationMetadataId == null) { - CompletableFuture> result = + // verify the required parameter 'pageId' is set + if (pageId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'integrationMetadataId' when calling" - + " updateIncidentIntegration")); + "Missing the required parameter 'pageId' when calling" + + " updateIncidentStatuspageIncident")); + return result; + } + + // verify the required parameter 'statuspageIncidentId' is set + if (statuspageIncidentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'statuspageIncidentId' when calling" + + " updateIncidentStatuspageIncident")); 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 updateIncidentIntegration")); + 400, + "Missing the required parameter 'body' when calling" + + " updateIncidentStatuspageIncident")); return result; } // create path and map variables String localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + "/api/v2/incidents/statuspage/{incident_id}/statuspage-incidents/pages/{page_id}/incidents/{statuspage_incident_id}" .replaceAll( "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) .replaceAll( - "\\{" + "integration_metadata_id" + "\\}", - apiClient.escapeString(integrationMetadataId.toString())); + "\\{" + "statuspage_incident_id" + "\\}", + apiClient.escapeString(statuspageIncidentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -9806,7 +19396,7 @@ public ApiResponse updateIncidentIntegratio try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentIntegration", + "v2.IncidentsApi.updateIncidentStatuspageIncident", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9814,7 +19404,7 @@ public ApiResponse updateIncidentIntegratio new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -9827,57 +19417,76 @@ public ApiResponse updateIncidentIntegratio localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to updateIncidentNotificationRule. */ - public static class UpdateIncidentNotificationRuleOptionalParameters { - private String include; + /** Manage optional parameters to updateIncidentStatusPageNotice. */ + public static class UpdateIncidentStatusPageNoticeOptionalParameters { + private Boolean notifySubscribers; /** - * Set include. + * Set notifySubscribers. * - * @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 + * @param notifySubscribers Whether to notify subscribers about this notice. (optional) + * @return UpdateIncidentStatusPageNoticeOptionalParameters */ - public UpdateIncidentNotificationRuleOptionalParameters include(String include) { - this.include = include; + public UpdateIncidentStatusPageNoticeOptionalParameters notifySubscribers( + Boolean notifySubscribers) { + this.notifySubscribers = notifySubscribers; return this; } } /** - * Update an incident notification rule. + * Update an incident status page notice. * - *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. + *

See {@link #updateIncidentStatusPageNoticeWithHttpInfo}. * - * @param id The ID of the notification rule. (required) + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param noticeId The ID of the status page notice. (required) * @param body (required) - * @return IncidentNotificationRule + * @return IncidentStatusPageNoticeIntegrationResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationRule updateIncidentNotificationRule( - UUID id, PutIncidentNotificationRuleRequest body) throws ApiException { - return updateIncidentNotificationRuleWithHttpInfo( - id, body, new UpdateIncidentNotificationRuleOptionalParameters()) + public IncidentStatusPageNoticeIntegrationResponse updateIncidentStatusPageNotice( + String incidentId, + UUID statuspageId, + UUID noticeId, + IncidentStatusPageNoticeUpdateRequest body) + throws ApiException { + return updateIncidentStatusPageNoticeWithHttpInfo( + incidentId, + statuspageId, + noticeId, + body, + new UpdateIncidentStatusPageNoticeOptionalParameters()) .getData(); } /** - * Update an incident notification rule. + * Update an incident status page notice. * - *

See {@link #updateIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #updateIncidentStatusPageNoticeWithHttpInfoAsync}. * - * @param id The ID of the notification rule. (required) + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param noticeId The ID of the status page notice. (required) * @param body (required) - * @return CompletableFuture<IncidentNotificationRule> + * @return CompletableFuture<IncidentStatusPageNoticeIntegrationResponse> */ - public CompletableFuture updateIncidentNotificationRuleAsync( - UUID id, PutIncidentNotificationRuleRequest body) { - return updateIncidentNotificationRuleWithHttpInfoAsync( - id, body, new UpdateIncidentNotificationRuleOptionalParameters()) + public CompletableFuture + updateIncidentStatusPageNoticeAsync( + String incidentId, + UUID statuspageId, + UUID noticeId, + IncidentStatusPageNoticeUpdateRequest body) { + return updateIncidentStatusPageNoticeWithHttpInfoAsync( + incidentId, + statuspageId, + noticeId, + body, + new UpdateIncidentStatusPageNoticeOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -9885,39 +19494,51 @@ id, body, new UpdateIncidentNotificationRuleOptionalParameters()) } /** - * Update an incident notification rule. + * Update an incident status page notice. * - *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. + *

See {@link #updateIncidentStatusPageNoticeWithHttpInfo}. * - * @param id The ID of the notification rule. (required) + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param noticeId The ID of the status page notice. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return IncidentNotificationRule + * @return IncidentStatusPageNoticeIntegrationResponse * @throws ApiException if fails to make API call */ - public IncidentNotificationRule updateIncidentNotificationRule( - UUID id, - PutIncidentNotificationRuleRequest body, - UpdateIncidentNotificationRuleOptionalParameters parameters) + public IncidentStatusPageNoticeIntegrationResponse updateIncidentStatusPageNotice( + String incidentId, + UUID statuspageId, + UUID noticeId, + IncidentStatusPageNoticeUpdateRequest body, + UpdateIncidentStatusPageNoticeOptionalParameters parameters) throws ApiException { - return updateIncidentNotificationRuleWithHttpInfo(id, body, parameters).getData(); + return updateIncidentStatusPageNoticeWithHttpInfo( + incidentId, statuspageId, noticeId, body, parameters) + .getData(); } /** - * Update an incident notification rule. + * Update an incident status page notice. * - *

See {@link #updateIncidentNotificationRuleWithHttpInfoAsync}. + *

See {@link #updateIncidentStatusPageNoticeWithHttpInfoAsync}. * - * @param id The ID of the notification rule. (required) + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param noticeId The ID of the status page notice. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentNotificationRule> + * @return CompletableFuture<IncidentStatusPageNoticeIntegrationResponse> */ - public CompletableFuture updateIncidentNotificationRuleAsync( - UUID id, - PutIncidentNotificationRuleRequest body, - UpdateIncidentNotificationRuleOptionalParameters parameters) { - return updateIncidentNotificationRuleWithHttpInfoAsync(id, body, parameters) + public CompletableFuture + updateIncidentStatusPageNoticeAsync( + String incidentId, + UUID statuspageId, + UUID noticeId, + IncidentStatusPageNoticeUpdateRequest body, + UpdateIncidentStatusPageNoticeOptionalParameters parameters) { + return updateIncidentStatusPageNoticeWithHttpInfoAsync( + incidentId, statuspageId, noticeId, body, parameters) .thenApply( response -> { return response.getData(); @@ -9925,12 +19546,14 @@ public CompletableFuture updateIncidentNotificationRul } /** - * Updates an existing notification rule with a complete replacement. + * Update a status page notice for a given incident. * - * @param id The ID of the notification rule. (required) + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param noticeId The ID of the status page notice. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentNotificationRule> + * @return ApiResponse<IncidentStatusPageNoticeIntegrationResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -9944,13 +19567,16 @@ public CompletableFuture updateIncidentNotificationRul * *
429 Too many requests -
*/ - public ApiResponse updateIncidentNotificationRuleWithHttpInfo( - UUID id, - PutIncidentNotificationRuleRequest body, - UpdateIncidentNotificationRuleOptionalParameters parameters) - throws ApiException { + public ApiResponse + updateIncidentStatusPageNoticeWithHttpInfo( + String incidentId, + UUID statuspageId, + UUID noticeId, + IncidentStatusPageNoticeUpdateRequest body, + UpdateIncidentStatusPageNoticeOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentNotificationRule"; + String operationId = "updateIncidentStatusPageNotice"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9958,31 +19584,53 @@ public ApiResponse updateIncidentNotificationRuleWithH } 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 updateIncidentNotificationRule"); + 400, + "Missing the required parameter 'incidentId' when calling" + + " updateIncidentStatusPageNotice"); + } + + // verify the required parameter 'statuspageId' is set + if (statuspageId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'statuspageId' when calling" + + " updateIncidentStatusPageNotice"); + } + + // verify the required parameter 'noticeId' is set + if (noticeId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'noticeId' when calling updateIncidentStatusPageNotice"); } // 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 updateIncidentStatusPageNotice"); } - String include = parameters.include; + Boolean notifySubscribers = parameters.notifySubscribers; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices/{notice_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "statuspage_id" + "\\}", apiClient.escapeString(statuspageId.toString())) + .replaceAll("\\{" + "notice_id" + "\\}", apiClient.escapeString(noticeId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers)); Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentNotificationRule", + "v2.IncidentsApi.updateIncidentStatusPageNotice", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -9990,78 +19638,115 @@ public ApiResponse updateIncidentNotificationRuleWithH 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 status page notice. * - *

See {@link #updateIncidentNotificationRuleWithHttpInfo}. + *

See {@link #updateIncidentStatusPageNoticeWithHttpInfo}. * - * @param id The ID of the notification rule. (required) + * @param incidentId The UUID of the incident. (required) + * @param statuspageId The ID of the status page. (required) + * @param noticeId The ID of the status page notice. (required) * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentNotificationRule>> + * @return CompletableFuture<ApiResponse<IncidentStatusPageNoticeIntegrationResponse>> */ - public CompletableFuture> - updateIncidentNotificationRuleWithHttpInfoAsync( - UUID id, - PutIncidentNotificationRuleRequest body, - UpdateIncidentNotificationRuleOptionalParameters parameters) { + public CompletableFuture> + updateIncidentStatusPageNoticeWithHttpInfoAsync( + String incidentId, + UUID statuspageId, + UUID noticeId, + IncidentStatusPageNoticeUpdateRequest body, + UpdateIncidentStatusPageNoticeOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateIncidentNotificationRule"; + String operationId = "updateIncidentStatusPageNotice"; 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 updateIncidentNotificationRule")); + "Missing the required parameter 'incidentId' when calling" + + " updateIncidentStatusPageNotice")); + return result; + } + + // verify the required parameter 'statuspageId' is set + if (statuspageId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'statuspageId' when calling" + + " updateIncidentStatusPageNotice")); + return result; + } + + // verify the required parameter 'noticeId' is set + if (noticeId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'noticeId' when calling" + + " updateIncidentStatusPageNotice")); 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")); + "Missing the required parameter 'body' when calling updateIncidentStatusPageNotice")); return result; } - String include = parameters.include; + Boolean notifySubscribers = parameters.notifySubscribers; // create path and map variables String localVarPath = - "/api/v2/incidents/config/notification-rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices/{notice_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "statuspage_id" + "\\}", apiClient.escapeString(statuspageId.toString())) + .replaceAll("\\{" + "notice_id" + "\\}", apiClient.escapeString(noticeId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentNotificationRule", + "v2.IncidentsApi.updateIncidentStatusPageNotice", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -10069,69 +19754,52 @@ public ApiResponse updateIncidentNotificationRuleWithH 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; - } + new GenericType() {}); } /** - * Update incident notification template. + * Update an incident timeline entry. * - *

See {@link #updateIncidentNotificationTemplateWithHttpInfo}. + *

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

See {@link #updateIncidentNotificationTemplateWithHttpInfoAsync}. + *

See {@link #updateIncidentTimelineEntryWithHttpInfoAsync}. * - * @param id The ID of the notification template. (required) + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) * @param body (required) - * @return CompletableFuture<IncidentNotificationTemplate> + * @return CompletableFuture<IncidentTimelineEntryResponse> */ - public CompletableFuture updateIncidentNotificationTemplateAsync( - UUID id, PatchIncidentNotificationTemplateRequest body) { - return updateIncidentNotificationTemplateWithHttpInfoAsync( - id, body, new UpdateIncidentNotificationTemplateOptionalParameters()) + public CompletableFuture updateIncidentTimelineEntryAsync( + String incidentId, UUID timelineEntryId, IncidentTimelineEntryRequest body) { + return updateIncidentTimelineEntryWithHttpInfoAsync(incidentId, timelineEntryId, body) .thenApply( response -> { return response.getData(); @@ -10139,39 +19807,216 @@ id, body, new UpdateIncidentNotificationTemplateOptionalParameters()) } /** - * Update incident notification template. + * Update a timeline entry for a given incident. + * + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) + * @param body (required) + * @return ApiResponse<IncidentTimelineEntryResponse> + * @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 updateIncidentTimelineEntryWithHttpInfo( + String incidentId, UUID timelineEntryId, IncidentTimelineEntryRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateIncidentTimelineEntry"; + 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 updateIncidentTimelineEntry"); + } + + // verify the required parameter 'timelineEntryId' is set + if (timelineEntryId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'timelineEntryId' when calling" + + " updateIncidentTimelineEntry"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateIncidentTimelineEntry"); + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "timeline_entry_id" + "\\}", + apiClient.escapeString(timelineEntryId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentTimelineEntry", + 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 timeline entry. + * + *

See {@link #updateIncidentTimelineEntryWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param timelineEntryId The ID of the timeline entry. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<IncidentTimelineEntryResponse>> + */ + public CompletableFuture> + updateIncidentTimelineEntryWithHttpInfoAsync( + String incidentId, UUID timelineEntryId, IncidentTimelineEntryRequest body) { + // Check if unstable operation is enabled + String operationId = "updateIncidentTimelineEntry"; + 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" + + " updateIncidentTimelineEntry")); + return result; + } + + // verify the required parameter 'timelineEntryId' is set + if (timelineEntryId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'timelineEntryId' when calling" + + " updateIncidentTimelineEntry")); + 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 updateIncidentTimelineEntry")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll( + "\\{" + "timeline_entry_id" + "\\}", + apiClient.escapeString(timelineEntryId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.IncidentsApi.updateIncidentTimelineEntry", + 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 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 +20024,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 +20043,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 +20054,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 +20097,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 +20183,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 +20220,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 +20232,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 +20249,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 +20286,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")); + "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 +20343,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 +20363,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 +20420,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 +20479,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 +20493,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 +20533,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 +20622,55 @@ public CompletableFuture> updateIncidentTodoWi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to updateIncidentZoomConfiguration. */ + public static class UpdateIncidentZoomConfigurationOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Specifies which related objects to include in the response. (optional) + * @return UpdateIncidentZoomConfigurationOptionalParameters + */ + public UpdateIncidentZoomConfigurationOptionalParameters include(String include) { + this.include = include; + return this; + } } /** - * Update an incident type. + * Update an incident Zoom configuration. * - *

See {@link #updateIncidentTypeWithHttpInfo}. + *

See {@link #updateIncidentZoomConfigurationWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @param body Incident type payload. (required) - * @return IncidentTypeResponse + * @param configurationId The ID of the Zoom configuration. (required) + * @param body (required) + * @return IncidentZoomConfigurationResponse * @throws ApiException if fails to make API call */ - public IncidentTypeResponse updateIncidentType( - String incidentTypeId, IncidentTypePatchRequest body) throws ApiException { - return updateIncidentTypeWithHttpInfo(incidentTypeId, body).getData(); + public IncidentZoomConfigurationResponse updateIncidentZoomConfiguration( + UUID configurationId, IncidentZoomConfigurationRequest body) throws ApiException { + return updateIncidentZoomConfigurationWithHttpInfo( + configurationId, body, new UpdateIncidentZoomConfigurationOptionalParameters()) + .getData(); } /** - * Update an incident type. + * Update an incident Zoom configuration. * - *

See {@link #updateIncidentTypeWithHttpInfoAsync}. + *

See {@link #updateIncidentZoomConfigurationWithHttpInfoAsync}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @param body Incident type payload. (required) - * @return CompletableFuture<IncidentTypeResponse> + * @param configurationId The ID of the Zoom configuration. (required) + * @param body (required) + * @return CompletableFuture<IncidentZoomConfigurationResponse> */ - public CompletableFuture updateIncidentTypeAsync( - String incidentTypeId, IncidentTypePatchRequest body) { - return updateIncidentTypeWithHttpInfoAsync(incidentTypeId, body) + public CompletableFuture updateIncidentZoomConfigurationAsync( + UUID configurationId, IncidentZoomConfigurationRequest body) { + return updateIncidentZoomConfigurationWithHttpInfoAsync( + configurationId, body, new UpdateIncidentZoomConfigurationOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -10761,11 +20678,52 @@ public CompletableFuture updateIncidentTypeAsync( } /** - * Update an incident type. + * Update an incident Zoom configuration. * - * @param incidentTypeId The UUID of the incident type. (required) - * @param body Incident type payload. (required) - * @return ApiResponse<IncidentTypeResponse> + *

See {@link #updateIncidentZoomConfigurationWithHttpInfo}. + * + * @param configurationId The ID of the Zoom configuration. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return IncidentZoomConfigurationResponse + * @throws ApiException if fails to make API call + */ + public IncidentZoomConfigurationResponse updateIncidentZoomConfiguration( + UUID configurationId, + IncidentZoomConfigurationRequest body, + UpdateIncidentZoomConfigurationOptionalParameters parameters) + throws ApiException { + return updateIncidentZoomConfigurationWithHttpInfo(configurationId, body, parameters).getData(); + } + + /** + * Update an incident Zoom configuration. + * + *

See {@link #updateIncidentZoomConfigurationWithHttpInfoAsync}. + * + * @param configurationId The ID of the Zoom configuration. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentZoomConfigurationResponse> + */ + public CompletableFuture updateIncidentZoomConfigurationAsync( + UUID configurationId, + IncidentZoomConfigurationRequest body, + UpdateIncidentZoomConfigurationOptionalParameters parameters) { + return updateIncidentZoomConfigurationWithHttpInfoAsync(configurationId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a Zoom configuration for incidents. + * + * @param configurationId The ID of the Zoom configuration. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentZoomConfigurationResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10779,10 +20737,13 @@ public CompletableFuture updateIncidentTypeAsync( * *
429 Too many requests -
*/ - public ApiResponse updateIncidentTypeWithHttpInfo( - String incidentTypeId, IncidentTypePatchRequest body) throws ApiException { + public ApiResponse updateIncidentZoomConfigurationWithHttpInfo( + UUID configurationId, + IncidentZoomConfigurationRequest body, + UpdateIncidentZoomConfigurationOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentType"; + String operationId = "updateIncidentZoomConfiguration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10790,31 +20751,38 @@ public ApiResponse updateIncidentTypeWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'incidentTypeId' is set - if (incidentTypeId == null) { + // verify the required parameter 'configurationId' is set + if (configurationId == null) { throw new ApiException( - 400, "Missing the required parameter 'incidentTypeId' when calling updateIncidentType"); + 400, + "Missing the required parameter 'configurationId' when calling" + + " updateIncidentZoomConfiguration"); } // 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 updateIncidentZoomConfiguration"); } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/config/zoom-configurations/{configuration_id}" .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "\\{" + "configuration_id" + "\\}", + apiClient.escapeString(configurationId.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.updateIncidentZoomConfiguration", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -10827,72 +20795,87 @@ public ApiResponse updateIncidentTypeWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an incident type. + * Update an incident Zoom configuration. * - *

See {@link #updateIncidentTypeWithHttpInfo}. + *

See {@link #updateIncidentZoomConfigurationWithHttpInfo}. * - * @param incidentTypeId The UUID of the incident type. (required) - * @param body Incident type payload. (required) - * @return CompletableFuture<ApiResponse<IncidentTypeResponse>> + * @param configurationId The ID of the Zoom configuration. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentZoomConfigurationResponse>> */ - public CompletableFuture> updateIncidentTypeWithHttpInfoAsync( - String incidentTypeId, IncidentTypePatchRequest body) { + public CompletableFuture> + updateIncidentZoomConfigurationWithHttpInfoAsync( + UUID configurationId, + IncidentZoomConfigurationRequest body, + UpdateIncidentZoomConfigurationOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateIncidentType"; + String operationId = "updateIncidentZoomConfiguration"; 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 'configurationId' is set + if (configurationId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'incidentTypeId' when calling updateIncidentType")); + "Missing the required parameter 'configurationId' when calling" + + " updateIncidentZoomConfiguration")); 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" + + " updateIncidentZoomConfiguration")); return result; } + String include = parameters.include; // create path and map variables String localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}" + "/api/v2/incidents/config/zoom-configurations/{configuration_id}" .replaceAll( - "\\{" + "incident_type_id" + "\\}", - apiClient.escapeString(incidentTypeId.toString())); + "\\{" + "configuration_id" + "\\}", + apiClient.escapeString(configurationId.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.updateIncidentZoomConfiguration", 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,56 +20887,57 @@ public CompletableFuture> updateIncidentTypeWi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to updateIncidentUserDefinedField. */ - public static class UpdateIncidentUserDefinedFieldOptionalParameters { + /** Manage optional parameters to upsertIncidentAutomationData. */ + public static class UpsertIncidentAutomationDataOptionalParameters { 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 + * @param include Specifies which related objects to include in the response. (optional) + * @return UpsertIncidentAutomationDataOptionalParameters */ - public UpdateIncidentUserDefinedFieldOptionalParameters include(String include) { + public UpsertIncidentAutomationDataOptionalParameters include(String include) { this.include = include; return this; } } /** - * Update an incident user-defined field. + * Upsert incident automation data. * - *

See {@link #updateIncidentUserDefinedFieldWithHttpInfo}. + *

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

See {@link #updateIncidentUserDefinedFieldWithHttpInfoAsync}. + *

See {@link #upsertIncidentAutomationDataWithHttpInfoAsync}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) - * @return CompletableFuture<IncidentUserDefinedFieldResponse> + * @param incidentId The UUID of the incident. (required) + * @param key The automation data key. (required) + * @param body (required) + * @return CompletableFuture<IncidentAutomationDataResponse> */ - public CompletableFuture updateIncidentUserDefinedFieldAsync( - String fieldId, IncidentUserDefinedFieldUpdateRequest body) { - return updateIncidentUserDefinedFieldWithHttpInfoAsync( - fieldId, body, new UpdateIncidentUserDefinedFieldOptionalParameters()) + public CompletableFuture upsertIncidentAutomationDataAsync( + String incidentId, String key, IncidentAutomationDataRequest body) { + return upsertIncidentAutomationDataWithHttpInfoAsync( + incidentId, key, body, new UpsertIncidentAutomationDataOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -10961,39 +20945,43 @@ fieldId, body, new UpdateIncidentUserDefinedFieldOptionalParameters()) } /** - * Update an incident user-defined field. + * Upsert incident automation data. * - *

See {@link #updateIncidentUserDefinedFieldWithHttpInfo}. + *

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

See {@link #updateIncidentUserDefinedFieldWithHttpInfoAsync}. + *

See {@link #upsertIncidentAutomationDataWithHttpInfoAsync}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) + * @param incidentId The UUID of the incident. (required) + * @param key The automation data key. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentUserDefinedFieldResponse> + * @return CompletableFuture<IncidentAutomationDataResponse> */ - public CompletableFuture updateIncidentUserDefinedFieldAsync( - String fieldId, - IncidentUserDefinedFieldUpdateRequest body, - UpdateIncidentUserDefinedFieldOptionalParameters parameters) { - return updateIncidentUserDefinedFieldWithHttpInfoAsync(fieldId, body, parameters) + public CompletableFuture upsertIncidentAutomationDataAsync( + String incidentId, + String key, + IncidentAutomationDataRequest body, + UpsertIncidentAutomationDataOptionalParameters parameters) { + return upsertIncidentAutomationDataWithHttpInfoAsync(incidentId, key, body, parameters) .thenApply( response -> { return response.getData(); @@ -11001,12 +20989,13 @@ public CompletableFuture updateIncidentUserDef } /** - * Update an incident user-defined field. + * Create or update automation data for a given incident and key. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) + * @param incidentId The UUID of the incident. (required) + * @param key The automation data key. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentUserDefinedFieldResponse> + * @return ApiResponse<IncidentAutomationDataResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -11020,13 +21009,14 @@ public CompletableFuture updateIncidentUserDef * *
429 Too many requests -
*/ - public ApiResponse updateIncidentUserDefinedFieldWithHttpInfo( - String fieldId, - IncidentUserDefinedFieldUpdateRequest body, - UpdateIncidentUserDefinedFieldOptionalParameters parameters) + public ApiResponse upsertIncidentAutomationDataWithHttpInfo( + String incidentId, + String key, + IncidentAutomationDataRequest body, + UpsertIncidentAutomationDataOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateIncidentUserDefinedField"; + String operationId = "upsertIncidentAutomationData"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -11034,23 +21024,31 @@ 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"); + "Missing the required parameter 'incidentId' when calling upsertIncidentAutomationData"); + } + + // verify the required parameter 'key' is set + if (key == null) { + throw new ApiException( + 400, "Missing the required parameter 'key' when calling upsertIncidentAutomationData"); } // 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 upsertIncidentAutomationData"); } 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}/automation-data/{key}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -11059,7 +21057,7 @@ public ApiResponse updateIncidentUserDefinedFi Invocation.Builder builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentUserDefinedField", + "v2.IncidentsApi.upsertIncidentAutomationData", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -11067,37 +21065,39 @@ public ApiResponse updateIncidentUserDefinedFi 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 incident user-defined field. + * Upsert incident automation data. * - *

See {@link #updateIncidentUserDefinedFieldWithHttpInfo}. + *

See {@link #upsertIncidentAutomationDataWithHttpInfo}. * - * @param fieldId The ID of the incident user-defined field. (required) - * @param body Incident user-defined field update payload. (required) + * @param incidentId The UUID of the incident. (required) + * @param key The automation data key. (required) + * @param body (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentUserDefinedFieldResponse>> + * @return CompletableFuture<ApiResponse<IncidentAutomationDataResponse>> */ - public CompletableFuture> - updateIncidentUserDefinedFieldWithHttpInfoAsync( - String fieldId, - IncidentUserDefinedFieldUpdateRequest body, - UpdateIncidentUserDefinedFieldOptionalParameters parameters) { + public CompletableFuture> + upsertIncidentAutomationDataWithHttpInfoAsync( + String incidentId, + String key, + IncidentAutomationDataRequest body, + UpsertIncidentAutomationDataOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "updateIncidentUserDefinedField"; + String operationId = "upsertIncidentAutomationData"; 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,33 +21105,46 @@ 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" + + " upsertIncidentAutomationData")); + return result; + } + + // verify the required parameter 'key' is set + if (key == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'key' when calling upsertIncidentAutomationData")); 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")); + "Missing the required parameter 'body' when calling upsertIncidentAutomationData")); 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}/automation-data/{key}" + .replaceAll( + "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -11142,7 +21155,7 @@ public ApiResponse updateIncidentUserDefinedFi try { builder = apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentUserDefinedField", + "v2.IncidentsApi.upsertIncidentAutomationData", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -11150,19 +21163,19 @@ public ApiResponse updateIncidentUserDefinedFi 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( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataAttributesRequest.java new file mode 100644 index 00000000000..c10a25dadb7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataAttributesRequest.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; + +/** Attributes for upserting automation data. */ +@JsonPropertyOrder({IncidentAutomationDataAttributesRequest.JSON_PROPERTY_VALUE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentAutomationDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public IncidentAutomationDataAttributesRequest() {} + + @JsonCreator + public IncidentAutomationDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.value = value; + } + + public IncidentAutomationDataAttributesRequest value(String value) { + this.value = value; + return this; + } + + /** + * The automation data value. + * + * @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 IncidentAutomationDataAttributesRequest + */ + @JsonAnySetter + public IncidentAutomationDataAttributesRequest 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 IncidentAutomationDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentAutomationDataAttributesRequest incidentAutomationDataAttributesRequest = + (IncidentAutomationDataAttributesRequest) o; + return Objects.equals(this.value, incidentAutomationDataAttributesRequest.value) + && Objects.equals( + this.additionalProperties, + incidentAutomationDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentAutomationDataAttributesRequest {\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/IncidentAutomationDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataAttributesResponse.java new file mode 100644 index 00000000000..1725e6ce32d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataAttributesResponse.java @@ -0,0 +1,262 @@ +/* + * 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 java.util.UUID; + +/** Attributes of incident automation data. */ +@JsonPropertyOrder({ + IncidentAutomationDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + IncidentAutomationDataAttributesResponse.JSON_PROPERTY_INCIDENT_ID, + IncidentAutomationDataAttributesResponse.JSON_PROPERTY_KEY, + IncidentAutomationDataAttributesResponse.JSON_PROPERTY_UPDATED_AT, + IncidentAutomationDataAttributesResponse.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentAutomationDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_INCIDENT_ID = "incident_id"; + private UUID incidentId; + + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public IncidentAutomationDataAttributesResponse() {} + + @JsonCreator + public IncidentAutomationDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_ID) UUID incidentId, + @JsonProperty(required = true, value = JSON_PROPERTY_KEY) String key, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.createdAt = createdAt; + this.incidentId = incidentId; + this.key = key; + this.updatedAt = updatedAt; + this.value = value; + } + + public IncidentAutomationDataAttributesResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the data 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 IncidentAutomationDataAttributesResponse incidentId(UUID incidentId) { + this.incidentId = incidentId; + return this; + } + + /** + * The incident identifier. + * + * @return incidentId + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getIncidentId() { + return incidentId; + } + + public void setIncidentId(UUID incidentId) { + this.incidentId = incidentId; + } + + public IncidentAutomationDataAttributesResponse key(String key) { + this.key = key; + return this; + } + + /** + * The automation data key. + * + * @return key + */ + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public IncidentAutomationDataAttributesResponse updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Timestamp when the data was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public IncidentAutomationDataAttributesResponse value(String value) { + this.value = value; + return this; + } + + /** + * The automation data value. + * + * @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 IncidentAutomationDataAttributesResponse + */ + @JsonAnySetter + public IncidentAutomationDataAttributesResponse 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 IncidentAutomationDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentAutomationDataAttributesResponse incidentAutomationDataAttributesResponse = + (IncidentAutomationDataAttributesResponse) o; + return Objects.equals(this.createdAt, incidentAutomationDataAttributesResponse.createdAt) + && Objects.equals(this.incidentId, incidentAutomationDataAttributesResponse.incidentId) + && Objects.equals(this.key, incidentAutomationDataAttributesResponse.key) + && Objects.equals(this.updatedAt, incidentAutomationDataAttributesResponse.updatedAt) + && Objects.equals(this.value, incidentAutomationDataAttributesResponse.value) + && Objects.equals( + this.additionalProperties, + incidentAutomationDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, incidentId, key, updatedAt, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentAutomationDataAttributesResponse {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" incidentId: ").append(toIndentedString(incidentId)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/IncidentAutomationDataDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataDataRequest.java new file mode 100644 index 00000000000..1bb662bef1b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataDataRequest.java @@ -0,0 +1,184 @@ +/* + * 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; + +/** Automation data for a request. */ +@JsonPropertyOrder({ + IncidentAutomationDataDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentAutomationDataDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentAutomationDataDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentAutomationDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentAutomationDataType type; + + public IncidentAutomationDataDataRequest() {} + + @JsonCreator + public IncidentAutomationDataDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentAutomationDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentAutomationDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentAutomationDataDataRequest attributes( + IncidentAutomationDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for upserting automation data. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentAutomationDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentAutomationDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentAutomationDataDataRequest type(IncidentAutomationDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident automation data resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentAutomationDataType getType() { + return type; + } + + public void setType(IncidentAutomationDataType 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 IncidentAutomationDataDataRequest + */ + @JsonAnySetter + public IncidentAutomationDataDataRequest 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 IncidentAutomationDataDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentAutomationDataDataRequest incidentAutomationDataDataRequest = + (IncidentAutomationDataDataRequest) o; + return Objects.equals(this.attributes, incidentAutomationDataDataRequest.attributes) + && Objects.equals(this.type, incidentAutomationDataDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentAutomationDataDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentAutomationDataDataRequest {\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/IncidentAutomationDataDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataDataResponse.java new file mode 100644 index 00000000000..3194e498070 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataDataResponse.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; + +/** Automation data in a response. */ +@JsonPropertyOrder({ + IncidentAutomationDataDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentAutomationDataDataResponse.JSON_PROPERTY_ID, + IncidentAutomationDataDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentAutomationDataDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentAutomationDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentAutomationDataType type; + + public IncidentAutomationDataDataResponse() {} + + @JsonCreator + public IncidentAutomationDataDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentAutomationDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentAutomationDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentAutomationDataDataResponse attributes( + IncidentAutomationDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of incident automation data. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentAutomationDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentAutomationDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentAutomationDataDataResponse id(String id) { + this.id = id; + return this; + } + + /** + * The automation data identifier. + * + * @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 IncidentAutomationDataDataResponse type(IncidentAutomationDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident automation data resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentAutomationDataType getType() { + return type; + } + + public void setType(IncidentAutomationDataType 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 IncidentAutomationDataDataResponse + */ + @JsonAnySetter + public IncidentAutomationDataDataResponse 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 IncidentAutomationDataDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentAutomationDataDataResponse incidentAutomationDataDataResponse = + (IncidentAutomationDataDataResponse) o; + return Objects.equals(this.attributes, incidentAutomationDataDataResponse.attributes) + && Objects.equals(this.id, incidentAutomationDataDataResponse.id) + && Objects.equals(this.type, incidentAutomationDataDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentAutomationDataDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentAutomationDataDataResponse {\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/IncidentAutomationDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataRequest.java new file mode 100644 index 00000000000..8fc718e44d4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataRequest.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 to upsert automation data. */ +@JsonPropertyOrder({IncidentAutomationDataRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentAutomationDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentAutomationDataDataRequest data; + + public IncidentAutomationDataRequest() {} + + @JsonCreator + public IncidentAutomationDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentAutomationDataDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentAutomationDataRequest data(IncidentAutomationDataDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Automation data for a request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentAutomationDataDataRequest getData() { + return data; + } + + public void setData(IncidentAutomationDataDataRequest 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 IncidentAutomationDataRequest + */ + @JsonAnySetter + public IncidentAutomationDataRequest 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 IncidentAutomationDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentAutomationDataRequest incidentAutomationDataRequest = (IncidentAutomationDataRequest) o; + return Objects.equals(this.data, incidentAutomationDataRequest.data) + && Objects.equals( + this.additionalProperties, incidentAutomationDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentAutomationDataRequest {\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/IncidentAutomationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataResponse.java new file mode 100644 index 00000000000..68a6b336fa9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataResponse.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; + +/** Response with automation data. */ +@JsonPropertyOrder({IncidentAutomationDataResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentAutomationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentAutomationDataDataResponse data; + + public IncidentAutomationDataResponse() {} + + @JsonCreator + public IncidentAutomationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentAutomationDataDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentAutomationDataResponse data(IncidentAutomationDataDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Automation data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentAutomationDataDataResponse getData() { + return data; + } + + public void setData(IncidentAutomationDataDataResponse 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 IncidentAutomationDataResponse + */ + @JsonAnySetter + public IncidentAutomationDataResponse 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 IncidentAutomationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentAutomationDataResponse incidentAutomationDataResponse = + (IncidentAutomationDataResponse) o; + return Objects.equals(this.data, incidentAutomationDataResponse.data) + && Objects.equals( + this.additionalProperties, incidentAutomationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentAutomationDataResponse {\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/IncidentAutomationDataType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataType.java new file mode 100644 index 00000000000..6eb294ff9cd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAutomationDataType.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 automation data resource type. */ +@JsonSerialize(using = IncidentAutomationDataType.IncidentAutomationDataTypeSerializer.class) +public class IncidentAutomationDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incidents_automation_data")); + + public static final IncidentAutomationDataType INCIDENTS_AUTOMATION_DATA = + new IncidentAutomationDataType("incidents_automation_data"); + + IncidentAutomationDataType(String value) { + super(value, allowedValues); + } + + public static class IncidentAutomationDataTypeSerializer + extends StdSerializer { + public IncidentAutomationDataTypeSerializer(Class t) { + super(t); + } + + public IncidentAutomationDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentAutomationDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentAutomationDataType fromValue(String value) { + return new IncidentAutomationDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentBatchCreateRuleExecutionStatesData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchCreateRuleExecutionStatesData.java new file mode 100644 index 00000000000..482c14c762e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchCreateRuleExecutionStatesData.java @@ -0,0 +1,187 @@ +/* + * 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 batch creating rule execution states. */ +@JsonPropertyOrder({ + IncidentBatchCreateRuleExecutionStatesData.JSON_PROPERTY_ATTRIBUTES, + IncidentBatchCreateRuleExecutionStatesData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentBatchCreateRuleExecutionStatesData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentBatchCreateRuleExecutionStatesDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRuleExecutionStateType type; + + public IncidentBatchCreateRuleExecutionStatesData() {} + + @JsonCreator + public IncidentBatchCreateRuleExecutionStatesData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentBatchCreateRuleExecutionStatesDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentRuleExecutionStateType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentBatchCreateRuleExecutionStatesData attributes( + IncidentBatchCreateRuleExecutionStatesDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for batch creating rule execution states. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentBatchCreateRuleExecutionStatesDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentBatchCreateRuleExecutionStatesDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentBatchCreateRuleExecutionStatesData type(IncidentRuleExecutionStateType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident rule execution state resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleExecutionStateType getType() { + return type; + } + + public void setType(IncidentRuleExecutionStateType 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 IncidentBatchCreateRuleExecutionStatesData + */ + @JsonAnySetter + public IncidentBatchCreateRuleExecutionStatesData 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 IncidentBatchCreateRuleExecutionStatesData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentBatchCreateRuleExecutionStatesData incidentBatchCreateRuleExecutionStatesData = + (IncidentBatchCreateRuleExecutionStatesData) o; + return Objects.equals(this.attributes, incidentBatchCreateRuleExecutionStatesData.attributes) + && Objects.equals(this.type, incidentBatchCreateRuleExecutionStatesData.type) + && Objects.equals( + this.additionalProperties, + incidentBatchCreateRuleExecutionStatesData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentBatchCreateRuleExecutionStatesData {\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/IncidentBatchCreateRuleExecutionStatesDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchCreateRuleExecutionStatesDataAttributes.java new file mode 100644 index 00000000000..3430b026c4f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchCreateRuleExecutionStatesDataAttributes.java @@ -0,0 +1,164 @@ +/* + * 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; + +/** Attributes for batch creating rule execution states. */ +@JsonPropertyOrder({IncidentBatchCreateRuleExecutionStatesDataAttributes.JSON_PROPERTY_RULES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentBatchCreateRuleExecutionStatesDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RULES = "rules"; + private List rules = new ArrayList<>(); + + public IncidentBatchCreateRuleExecutionStatesDataAttributes() {} + + @JsonCreator + public IncidentBatchCreateRuleExecutionStatesDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RULES) + List rules) { + this.rules = rules; + } + + public IncidentBatchCreateRuleExecutionStatesDataAttributes rules( + List rules) { + this.rules = rules; + for (IncidentRuleExecutionStateRule item : rules) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentBatchCreateRuleExecutionStatesDataAttributes addRulesItem( + IncidentRuleExecutionStateRule rulesItem) { + this.rules.add(rulesItem); + this.unparsed |= rulesItem.unparsed; + return this; + } + + /** + * List of rules to create execution states for. + * + * @return rules + */ + @JsonProperty(JSON_PROPERTY_RULES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRules() { + return rules; + } + + public void setRules(List rules) { + this.rules = rules; + } + + /** + * 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 IncidentBatchCreateRuleExecutionStatesDataAttributes + */ + @JsonAnySetter + public IncidentBatchCreateRuleExecutionStatesDataAttributes 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 IncidentBatchCreateRuleExecutionStatesDataAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentBatchCreateRuleExecutionStatesDataAttributes + incidentBatchCreateRuleExecutionStatesDataAttributes = + (IncidentBatchCreateRuleExecutionStatesDataAttributes) o; + return Objects.equals(this.rules, incidentBatchCreateRuleExecutionStatesDataAttributes.rules) + && Objects.equals( + this.additionalProperties, + incidentBatchCreateRuleExecutionStatesDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(rules, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentBatchCreateRuleExecutionStatesDataAttributes {\n"); + sb.append(" rules: ").append(toIndentedString(rules)).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/IncidentBatchCreateRuleExecutionStatesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchCreateRuleExecutionStatesRequest.java new file mode 100644 index 00000000000..b41af6a0b14 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchCreateRuleExecutionStatesRequest.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 to batch create rule execution states. */ +@JsonPropertyOrder({IncidentBatchCreateRuleExecutionStatesRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentBatchCreateRuleExecutionStatesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentBatchCreateRuleExecutionStatesData data; + + public IncidentBatchCreateRuleExecutionStatesRequest() {} + + @JsonCreator + public IncidentBatchCreateRuleExecutionStatesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentBatchCreateRuleExecutionStatesData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentBatchCreateRuleExecutionStatesRequest data( + IncidentBatchCreateRuleExecutionStatesData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for batch creating rule execution states. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentBatchCreateRuleExecutionStatesData getData() { + return data; + } + + public void setData(IncidentBatchCreateRuleExecutionStatesData 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 IncidentBatchCreateRuleExecutionStatesRequest + */ + @JsonAnySetter + public IncidentBatchCreateRuleExecutionStatesRequest 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 IncidentBatchCreateRuleExecutionStatesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentBatchCreateRuleExecutionStatesRequest incidentBatchCreateRuleExecutionStatesRequest = + (IncidentBatchCreateRuleExecutionStatesRequest) o; + return Objects.equals(this.data, incidentBatchCreateRuleExecutionStatesRequest.data) + && Objects.equals( + this.additionalProperties, + incidentBatchCreateRuleExecutionStatesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentBatchCreateRuleExecutionStatesRequest {\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/IncidentBatchUpdateRuleExecutionStatesData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchUpdateRuleExecutionStatesData.java new file mode 100644 index 00000000000..611acaebb43 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchUpdateRuleExecutionStatesData.java @@ -0,0 +1,187 @@ +/* + * 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 batch updating rule execution states. */ +@JsonPropertyOrder({ + IncidentBatchUpdateRuleExecutionStatesData.JSON_PROPERTY_ATTRIBUTES, + IncidentBatchUpdateRuleExecutionStatesData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentBatchUpdateRuleExecutionStatesData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentBatchUpdateRuleExecutionStatesDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRuleExecutionStateType type; + + public IncidentBatchUpdateRuleExecutionStatesData() {} + + @JsonCreator + public IncidentBatchUpdateRuleExecutionStatesData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentBatchUpdateRuleExecutionStatesDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentRuleExecutionStateType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentBatchUpdateRuleExecutionStatesData attributes( + IncidentBatchUpdateRuleExecutionStatesDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for batch updating rule execution states. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentBatchUpdateRuleExecutionStatesDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentBatchUpdateRuleExecutionStatesDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentBatchUpdateRuleExecutionStatesData type(IncidentRuleExecutionStateType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident rule execution state resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleExecutionStateType getType() { + return type; + } + + public void setType(IncidentRuleExecutionStateType 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 IncidentBatchUpdateRuleExecutionStatesData + */ + @JsonAnySetter + public IncidentBatchUpdateRuleExecutionStatesData 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 IncidentBatchUpdateRuleExecutionStatesData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentBatchUpdateRuleExecutionStatesData incidentBatchUpdateRuleExecutionStatesData = + (IncidentBatchUpdateRuleExecutionStatesData) o; + return Objects.equals(this.attributes, incidentBatchUpdateRuleExecutionStatesData.attributes) + && Objects.equals(this.type, incidentBatchUpdateRuleExecutionStatesData.type) + && Objects.equals( + this.additionalProperties, + incidentBatchUpdateRuleExecutionStatesData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentBatchUpdateRuleExecutionStatesData {\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/IncidentBatchUpdateRuleExecutionStatesDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchUpdateRuleExecutionStatesDataAttributes.java new file mode 100644 index 00000000000..0bbd322be68 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchUpdateRuleExecutionStatesDataAttributes.java @@ -0,0 +1,164 @@ +/* + * 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; + +/** Attributes for batch updating rule execution states. */ +@JsonPropertyOrder({IncidentBatchUpdateRuleExecutionStatesDataAttributes.JSON_PROPERTY_RULES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentBatchUpdateRuleExecutionStatesDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RULES = "rules"; + private List rules = new ArrayList<>(); + + public IncidentBatchUpdateRuleExecutionStatesDataAttributes() {} + + @JsonCreator + public IncidentBatchUpdateRuleExecutionStatesDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RULES) + List rules) { + this.rules = rules; + } + + public IncidentBatchUpdateRuleExecutionStatesDataAttributes rules( + List rules) { + this.rules = rules; + for (IncidentRuleExecutionStateRule item : rules) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentBatchUpdateRuleExecutionStatesDataAttributes addRulesItem( + IncidentRuleExecutionStateRule rulesItem) { + this.rules.add(rulesItem); + this.unparsed |= rulesItem.unparsed; + return this; + } + + /** + * List of rules to update execution states for. + * + * @return rules + */ + @JsonProperty(JSON_PROPERTY_RULES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRules() { + return rules; + } + + public void setRules(List rules) { + this.rules = rules; + } + + /** + * 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 IncidentBatchUpdateRuleExecutionStatesDataAttributes + */ + @JsonAnySetter + public IncidentBatchUpdateRuleExecutionStatesDataAttributes 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 IncidentBatchUpdateRuleExecutionStatesDataAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentBatchUpdateRuleExecutionStatesDataAttributes + incidentBatchUpdateRuleExecutionStatesDataAttributes = + (IncidentBatchUpdateRuleExecutionStatesDataAttributes) o; + return Objects.equals(this.rules, incidentBatchUpdateRuleExecutionStatesDataAttributes.rules) + && Objects.equals( + this.additionalProperties, + incidentBatchUpdateRuleExecutionStatesDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(rules, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentBatchUpdateRuleExecutionStatesDataAttributes {\n"); + sb.append(" rules: ").append(toIndentedString(rules)).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/IncidentBatchUpdateRuleExecutionStatesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchUpdateRuleExecutionStatesRequest.java new file mode 100644 index 00000000000..10b11cfb2c5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentBatchUpdateRuleExecutionStatesRequest.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 to batch update rule execution states. */ +@JsonPropertyOrder({IncidentBatchUpdateRuleExecutionStatesRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentBatchUpdateRuleExecutionStatesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentBatchUpdateRuleExecutionStatesData data; + + public IncidentBatchUpdateRuleExecutionStatesRequest() {} + + @JsonCreator + public IncidentBatchUpdateRuleExecutionStatesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentBatchUpdateRuleExecutionStatesData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentBatchUpdateRuleExecutionStatesRequest data( + IncidentBatchUpdateRuleExecutionStatesData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for batch updating rule execution states. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentBatchUpdateRuleExecutionStatesData getData() { + return data; + } + + public void setData(IncidentBatchUpdateRuleExecutionStatesData 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 IncidentBatchUpdateRuleExecutionStatesRequest + */ + @JsonAnySetter + public IncidentBatchUpdateRuleExecutionStatesRequest 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 IncidentBatchUpdateRuleExecutionStatesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentBatchUpdateRuleExecutionStatesRequest incidentBatchUpdateRuleExecutionStatesRequest = + (IncidentBatchUpdateRuleExecutionStatesRequest) o; + return Objects.equals(this.data, incidentBatchUpdateRuleExecutionStatesRequest.data) + && Objects.equals( + this.additionalProperties, + incidentBatchUpdateRuleExecutionStatesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentBatchUpdateRuleExecutionStatesRequest {\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/IncidentCaseLinkData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCaseLinkData.java new file mode 100644 index 00000000000..e2e39e9020a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCaseLinkData.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; + +/** Case link data. */ +@JsonPropertyOrder({ + IncidentCaseLinkData.JSON_PROPERTY_ATTRIBUTES, + IncidentCaseLinkData.JSON_PROPERTY_ID, + IncidentCaseLinkData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCaseLinkData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentCaseLinkDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentCaseLinkType type; + + public IncidentCaseLinkData() {} + + @JsonCreator + public IncidentCaseLinkData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentCaseLinkDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentCaseLinkType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentCaseLinkData attributes(IncidentCaseLinkDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a case link. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCaseLinkDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentCaseLinkDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentCaseLinkData id(String id) { + this.id = id; + return this; + } + + /** + * The case link identifier. + * + * @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 IncidentCaseLinkData type(IncidentCaseLinkType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Case link resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCaseLinkType getType() { + return type; + } + + public void setType(IncidentCaseLinkType 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 IncidentCaseLinkData + */ + @JsonAnySetter + public IncidentCaseLinkData 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 IncidentCaseLinkData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCaseLinkData incidentCaseLinkData = (IncidentCaseLinkData) o; + return Objects.equals(this.attributes, incidentCaseLinkData.attributes) + && Objects.equals(this.id, incidentCaseLinkData.id) + && Objects.equals(this.type, incidentCaseLinkData.type) + && Objects.equals(this.additionalProperties, incidentCaseLinkData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCaseLinkData {\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/IncidentCaseLinkDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCaseLinkDataAttributes.java new file mode 100644 index 00000000000..c4ad6afa03b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCaseLinkDataAttributes.java @@ -0,0 +1,203 @@ +/* + * 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 of a case link. */ +@JsonPropertyOrder({ + IncidentCaseLinkDataAttributes.JSON_PROPERTY_ENTITY_ID, + IncidentCaseLinkDataAttributes.JSON_PROPERTY_IS_PAGE, + IncidentCaseLinkDataAttributes.JSON_PROPERTY_RELATIONSHIP +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCaseLinkDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENTITY_ID = "entity_id"; + private String entityId; + + public static final String JSON_PROPERTY_IS_PAGE = "is_page"; + private Boolean isPage; + + public static final String JSON_PROPERTY_RELATIONSHIP = "relationship"; + private String relationship; + + public IncidentCaseLinkDataAttributes() {} + + @JsonCreator + public IncidentCaseLinkDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ENTITY_ID) String entityId, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_PAGE) Boolean isPage, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIP) String relationship) { + this.entityId = entityId; + this.isPage = isPage; + this.relationship = relationship; + } + + public IncidentCaseLinkDataAttributes entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * The entity identifier. + * + * @return entityId + */ + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public IncidentCaseLinkDataAttributes isPage(Boolean isPage) { + this.isPage = isPage; + return this; + } + + /** + * Whether this is a page link. + * + * @return isPage + */ + @JsonProperty(JSON_PROPERTY_IS_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsPage() { + return isPage; + } + + public void setIsPage(Boolean isPage) { + this.isPage = isPage; + } + + public IncidentCaseLinkDataAttributes relationship(String relationship) { + this.relationship = relationship; + return this; + } + + /** + * The relationship type. + * + * @return relationship + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRelationship() { + return relationship; + } + + public void setRelationship(String relationship) { + this.relationship = relationship; + } + + /** + * 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 IncidentCaseLinkDataAttributes + */ + @JsonAnySetter + public IncidentCaseLinkDataAttributes 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 IncidentCaseLinkDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCaseLinkDataAttributes incidentCaseLinkDataAttributes = + (IncidentCaseLinkDataAttributes) o; + return Objects.equals(this.entityId, incidentCaseLinkDataAttributes.entityId) + && Objects.equals(this.isPage, incidentCaseLinkDataAttributes.isPage) + && Objects.equals(this.relationship, incidentCaseLinkDataAttributes.relationship) + && Objects.equals( + this.additionalProperties, incidentCaseLinkDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(entityId, isPage, relationship, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCaseLinkDataAttributes {\n"); + sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); + sb.append(" isPage: ").append(toIndentedString(isPage)).append("\n"); + sb.append(" relationship: ").append(toIndentedString(relationship)).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/IncidentCaseLinkResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCaseLinkResponse.java new file mode 100644 index 00000000000..3618e485db4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCaseLinkResponse.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 case link. */ +@JsonPropertyOrder({IncidentCaseLinkResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCaseLinkResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentCaseLinkData data; + + public IncidentCaseLinkResponse() {} + + @JsonCreator + public IncidentCaseLinkResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentCaseLinkData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentCaseLinkResponse data(IncidentCaseLinkData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Case link data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCaseLinkData getData() { + return data; + } + + public void setData(IncidentCaseLinkData 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 IncidentCaseLinkResponse + */ + @JsonAnySetter + public IncidentCaseLinkResponse 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 IncidentCaseLinkResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCaseLinkResponse incidentCaseLinkResponse = (IncidentCaseLinkResponse) o; + return Objects.equals(this.data, incidentCaseLinkResponse.data) + && Objects.equals(this.additionalProperties, incidentCaseLinkResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCaseLinkResponse {\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/IncidentCaseLinkType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCaseLinkType.java new file mode 100644 index 00000000000..cf561bddf12 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCaseLinkType.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; + +/** Case link resource type. */ +@JsonSerialize(using = IncidentCaseLinkType.IncidentCaseLinkTypeSerializer.class) +public class IncidentCaseLinkType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("case_link")); + + public static final IncidentCaseLinkType CASE_LINK = new IncidentCaseLinkType("case_link"); + + IncidentCaseLinkType(String value) { + super(value, allowedValues); + } + + public static class IncidentCaseLinkTypeSerializer extends StdSerializer { + public IncidentCaseLinkTypeSerializer(Class t) { + super(t); + } + + public IncidentCaseLinkTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentCaseLinkType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentCaseLinkType fromValue(String value) { + return new IncidentCaseLinkType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationContent.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationContent.java new file mode 100644 index 00000000000..df829c85f2a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationContent.java @@ -0,0 +1,268 @@ +/* + * 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; + +/** The content of a communication. */ +@JsonPropertyOrder({ + IncidentCommunicationContent.JSON_PROPERTY_GROUPING_KEY, + IncidentCommunicationContent.JSON_PROPERTY_HANDLES, + IncidentCommunicationContent.JSON_PROPERTY_MESSAGE, + IncidentCommunicationContent.JSON_PROPERTY_STATUS, + IncidentCommunicationContent.JSON_PROPERTY_SUBJECT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCommunicationContent { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_GROUPING_KEY = "grouping_key"; + private String groupingKey; + + public static final String JSON_PROPERTY_HANDLES = "handles"; + private List handles = new ArrayList<>(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + private String subject; + + public IncidentCommunicationContent() {} + + @JsonCreator + public IncidentCommunicationContent( + @JsonProperty(required = true, value = JSON_PROPERTY_HANDLES) + List handles, + @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message) { + this.handles = handles; + this.message = message; + } + + public IncidentCommunicationContent groupingKey(String groupingKey) { + this.groupingKey = groupingKey; + return this; + } + + /** + * A key used for grouping communications. + * + * @return groupingKey + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPING_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroupingKey() { + return groupingKey; + } + + public void setGroupingKey(String groupingKey) { + this.groupingKey = groupingKey; + } + + public IncidentCommunicationContent handles(List handles) { + this.handles = handles; + for (IncidentCommunicationContentHandle item : handles) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentCommunicationContent addHandlesItem( + IncidentCommunicationContentHandle handlesItem) { + this.handles.add(handlesItem); + this.unparsed |= handlesItem.unparsed; + return this; + } + + /** + * The list of handles the communication is sent to. + * + * @return handles + */ + @JsonProperty(JSON_PROPERTY_HANDLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getHandles() { + return handles; + } + + public void setHandles(List handles) { + this.handles = handles; + } + + public IncidentCommunicationContent message(String message) { + this.message = message; + return this; + } + + /** + * The message body of the communication. + * + * @return message + */ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public IncidentCommunicationContent status(Integer status) { + this.status = status; + return this; + } + + /** + * The status code of the communication. maximum: 2147483647 + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public IncidentCommunicationContent subject(String subject) { + this.subject = subject; + return this; + } + + /** + * The subject line of the communication. + * + * @return subject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + /** + * 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 IncidentCommunicationContent + */ + @JsonAnySetter + public IncidentCommunicationContent 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 IncidentCommunicationContent object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCommunicationContent incidentCommunicationContent = (IncidentCommunicationContent) o; + return Objects.equals(this.groupingKey, incidentCommunicationContent.groupingKey) + && Objects.equals(this.handles, incidentCommunicationContent.handles) + && Objects.equals(this.message, incidentCommunicationContent.message) + && Objects.equals(this.status, incidentCommunicationContent.status) + && Objects.equals(this.subject, incidentCommunicationContent.subject) + && Objects.equals( + this.additionalProperties, incidentCommunicationContent.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(groupingKey, handles, message, status, subject, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCommunicationContent {\n"); + sb.append(" groupingKey: ").append(toIndentedString(groupingKey)).append("\n"); + sb.append(" handles: ").append(toIndentedString(handles)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).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/IncidentCommunicationContentHandle.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationContentHandle.java new file mode 100644 index 00000000000..89d5a29c860 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationContentHandle.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 handle used for sending a communication. */ +@JsonPropertyOrder({ + IncidentCommunicationContentHandle.JSON_PROPERTY_CREATED_AT, + IncidentCommunicationContentHandle.JSON_PROPERTY_DISPLAY_NAME, + IncidentCommunicationContentHandle.JSON_PROPERTY_HANDLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCommunicationContentHandle { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public IncidentCommunicationContentHandle() {} + + @JsonCreator + public IncidentCommunicationContentHandle( + @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle) { + this.handle = handle; + } + + public IncidentCommunicationContentHandle createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the handle was added. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public IncidentCommunicationContentHandle displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name for the handle. + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public IncidentCommunicationContentHandle handle(String handle) { + this.handle = handle; + return this; + } + + /** + * The notification handle. + * + * @return handle + */ + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + /** + * 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 IncidentCommunicationContentHandle + */ + @JsonAnySetter + public IncidentCommunicationContentHandle 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 IncidentCommunicationContentHandle object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCommunicationContentHandle incidentCommunicationContentHandle = + (IncidentCommunicationContentHandle) o; + return Objects.equals(this.createdAt, incidentCommunicationContentHandle.createdAt) + && Objects.equals(this.displayName, incidentCommunicationContentHandle.displayName) + && Objects.equals(this.handle, incidentCommunicationContentHandle.handle) + && Objects.equals( + this.additionalProperties, incidentCommunicationContentHandle.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, displayName, handle, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCommunicationContentHandle {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" handle: ").append(toIndentedString(handle)).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/IncidentCommunicationDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationDataAttributesRequest.java new file mode 100644 index 00000000000..756d77f8a0b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationDataAttributesRequest.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 or updating a communication. */ +@JsonPropertyOrder({ + IncidentCommunicationDataAttributesRequest.JSON_PROPERTY_COMMUNICATION_TYPE, + IncidentCommunicationDataAttributesRequest.JSON_PROPERTY_CONTENT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCommunicationDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMMUNICATION_TYPE = "communication_type"; + private IncidentCommunicationKind communicationType; + + public static final String JSON_PROPERTY_CONTENT = "content"; + private IncidentCommunicationContent content; + + public IncidentCommunicationDataAttributesRequest() {} + + @JsonCreator + public IncidentCommunicationDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_COMMUNICATION_TYPE) + IncidentCommunicationKind communicationType, + @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT) + IncidentCommunicationContent content) { + this.communicationType = communicationType; + this.unparsed |= !communicationType.isValid(); + this.content = content; + this.unparsed |= content.unparsed; + } + + public IncidentCommunicationDataAttributesRequest communicationType( + IncidentCommunicationKind communicationType) { + this.communicationType = communicationType; + this.unparsed |= !communicationType.isValid(); + return this; + } + + /** + * The kind of communication. + * + * @return communicationType + */ + @JsonProperty(JSON_PROPERTY_COMMUNICATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationKind getCommunicationType() { + return communicationType; + } + + public void setCommunicationType(IncidentCommunicationKind communicationType) { + if (!communicationType.isValid()) { + this.unparsed = true; + } + this.communicationType = communicationType; + } + + public IncidentCommunicationDataAttributesRequest content(IncidentCommunicationContent content) { + this.content = content; + this.unparsed |= content.unparsed; + return this; + } + + /** + * The content of a communication. + * + * @return content + */ + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationContent getContent() { + return content; + } + + public void setContent(IncidentCommunicationContent content) { + this.content = content; + } + + /** + * 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 IncidentCommunicationDataAttributesRequest + */ + @JsonAnySetter + public IncidentCommunicationDataAttributesRequest 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 IncidentCommunicationDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCommunicationDataAttributesRequest incidentCommunicationDataAttributesRequest = + (IncidentCommunicationDataAttributesRequest) o; + return Objects.equals( + this.communicationType, incidentCommunicationDataAttributesRequest.communicationType) + && Objects.equals(this.content, incidentCommunicationDataAttributesRequest.content) + && Objects.equals( + this.additionalProperties, + incidentCommunicationDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(communicationType, content, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCommunicationDataAttributesRequest {\n"); + sb.append(" communicationType: ").append(toIndentedString(communicationType)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).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/IncidentCommunicationDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationDataAttributesResponse.java new file mode 100644 index 00000000000..95db744115d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationDataAttributesResponse.java @@ -0,0 +1,275 @@ +/* + * 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 java.util.UUID; + +/** Attributes of an incident communication response. */ +@JsonPropertyOrder({ + IncidentCommunicationDataAttributesResponse.JSON_PROPERTY_COMMUNICATION_TYPE, + IncidentCommunicationDataAttributesResponse.JSON_PROPERTY_CONTENT, + IncidentCommunicationDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentCommunicationDataAttributesResponse.JSON_PROPERTY_INCIDENT_ID, + IncidentCommunicationDataAttributesResponse.JSON_PROPERTY_MODIFIED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCommunicationDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMMUNICATION_TYPE = "communication_type"; + private IncidentCommunicationKind communicationType; + + public static final String JSON_PROPERTY_CONTENT = "content"; + private IncidentCommunicationContent content; + + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_INCIDENT_ID = "incident_id"; + private UUID incidentId; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public IncidentCommunicationDataAttributesResponse() {} + + @JsonCreator + public IncidentCommunicationDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_COMMUNICATION_TYPE) + IncidentCommunicationKind communicationType, + @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT) + IncidentCommunicationContent content, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_ID) UUID incidentId, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified) { + this.communicationType = communicationType; + this.unparsed |= !communicationType.isValid(); + this.content = content; + this.unparsed |= content.unparsed; + this.created = created; + this.incidentId = incidentId; + this.modified = modified; + } + + public IncidentCommunicationDataAttributesResponse communicationType( + IncidentCommunicationKind communicationType) { + this.communicationType = communicationType; + this.unparsed |= !communicationType.isValid(); + return this; + } + + /** + * The kind of communication. + * + * @return communicationType + */ + @JsonProperty(JSON_PROPERTY_COMMUNICATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationKind getCommunicationType() { + return communicationType; + } + + public void setCommunicationType(IncidentCommunicationKind communicationType) { + if (!communicationType.isValid()) { + this.unparsed = true; + } + this.communicationType = communicationType; + } + + public IncidentCommunicationDataAttributesResponse content(IncidentCommunicationContent content) { + this.content = content; + this.unparsed |= content.unparsed; + return this; + } + + /** + * The content of a communication. + * + * @return content + */ + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationContent getContent() { + return content; + } + + public void setContent(IncidentCommunicationContent content) { + this.content = content; + } + + public IncidentCommunicationDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the communication 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 IncidentCommunicationDataAttributesResponse incidentId(UUID incidentId) { + this.incidentId = incidentId; + return this; + } + + /** + * The incident identifier. + * + * @return incidentId + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getIncidentId() { + return incidentId; + } + + public void setIncidentId(UUID incidentId) { + this.incidentId = incidentId; + } + + public IncidentCommunicationDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the communication 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 IncidentCommunicationDataAttributesResponse + */ + @JsonAnySetter + public IncidentCommunicationDataAttributesResponse 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 IncidentCommunicationDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCommunicationDataAttributesResponse incidentCommunicationDataAttributesResponse = + (IncidentCommunicationDataAttributesResponse) o; + return Objects.equals( + this.communicationType, incidentCommunicationDataAttributesResponse.communicationType) + && Objects.equals(this.content, incidentCommunicationDataAttributesResponse.content) + && Objects.equals(this.created, incidentCommunicationDataAttributesResponse.created) + && Objects.equals(this.incidentId, incidentCommunicationDataAttributesResponse.incidentId) + && Objects.equals(this.modified, incidentCommunicationDataAttributesResponse.modified) + && Objects.equals( + this.additionalProperties, + incidentCommunicationDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + communicationType, content, created, incidentId, modified, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCommunicationDataAttributesResponse {\n"); + sb.append(" communicationType: ").append(toIndentedString(communicationType)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" incidentId: ").append(toIndentedString(incidentId)).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/IncidentCommunicationDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationDataRequest.java new file mode 100644 index 00000000000..55277dc682c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationDataRequest.java @@ -0,0 +1,184 @@ +/* + * 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 communication data for a request. */ +@JsonPropertyOrder({ + IncidentCommunicationDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentCommunicationDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCommunicationDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentCommunicationDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentCommunicationType type; + + public IncidentCommunicationDataRequest() {} + + @JsonCreator + public IncidentCommunicationDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentCommunicationDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentCommunicationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentCommunicationDataRequest attributes( + IncidentCommunicationDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a communication. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentCommunicationDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentCommunicationDataRequest type(IncidentCommunicationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident communication resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationType getType() { + return type; + } + + public void setType(IncidentCommunicationType 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 IncidentCommunicationDataRequest + */ + @JsonAnySetter + public IncidentCommunicationDataRequest 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 IncidentCommunicationDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCommunicationDataRequest incidentCommunicationDataRequest = + (IncidentCommunicationDataRequest) o; + return Objects.equals(this.attributes, incidentCommunicationDataRequest.attributes) + && Objects.equals(this.type, incidentCommunicationDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentCommunicationDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCommunicationDataRequest {\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/IncidentCommunicationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationDataResponse.java new file mode 100644 index 00000000000..7d801c0ff0e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationDataResponse.java @@ -0,0 +1,213 @@ +/* + * 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 communication data in a response. */ +@JsonPropertyOrder({ + IncidentCommunicationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentCommunicationDataResponse.JSON_PROPERTY_ID, + IncidentCommunicationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCommunicationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentCommunicationDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentCommunicationType type; + + public IncidentCommunicationDataResponse() {} + + @JsonCreator + public IncidentCommunicationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentCommunicationDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentCommunicationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentCommunicationDataResponse attributes( + IncidentCommunicationDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an incident communication response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentCommunicationDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentCommunicationDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The communication 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 IncidentCommunicationDataResponse type(IncidentCommunicationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident communication resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationType getType() { + return type; + } + + public void setType(IncidentCommunicationType 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 IncidentCommunicationDataResponse + */ + @JsonAnySetter + public IncidentCommunicationDataResponse 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 IncidentCommunicationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCommunicationDataResponse incidentCommunicationDataResponse = + (IncidentCommunicationDataResponse) o; + return Objects.equals(this.attributes, incidentCommunicationDataResponse.attributes) + && Objects.equals(this.id, incidentCommunicationDataResponse.id) + && Objects.equals(this.type, incidentCommunicationDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentCommunicationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCommunicationDataResponse {\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/IncidentCommunicationKind.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationKind.java new file mode 100644 index 00000000000..2aeb4323253 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationKind.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 kind of communication. */ +@JsonSerialize(using = IncidentCommunicationKind.IncidentCommunicationKindSerializer.class) +public class IncidentCommunicationKind extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("manual", "automated")); + + public static final IncidentCommunicationKind MANUAL = new IncidentCommunicationKind("manual"); + public static final IncidentCommunicationKind AUTOMATED = + new IncidentCommunicationKind("automated"); + + IncidentCommunicationKind(String value) { + super(value, allowedValues); + } + + public static class IncidentCommunicationKindSerializer + extends StdSerializer { + public IncidentCommunicationKindSerializer(Class t) { + super(t); + } + + public IncidentCommunicationKindSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentCommunicationKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentCommunicationKind fromValue(String value) { + return new IncidentCommunicationKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationRequest.java new file mode 100644 index 00000000000..1e2d073cf90 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationRequest.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 to create or update a communication. */ +@JsonPropertyOrder({IncidentCommunicationRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCommunicationRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentCommunicationDataRequest data; + + public IncidentCommunicationRequest() {} + + @JsonCreator + public IncidentCommunicationRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentCommunicationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentCommunicationRequest data(IncidentCommunicationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident communication data for a request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationDataRequest getData() { + return data; + } + + public void setData(IncidentCommunicationDataRequest 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 IncidentCommunicationRequest + */ + @JsonAnySetter + public IncidentCommunicationRequest 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 IncidentCommunicationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCommunicationRequest incidentCommunicationRequest = (IncidentCommunicationRequest) o; + return Objects.equals(this.data, incidentCommunicationRequest.data) + && Objects.equals( + this.additionalProperties, incidentCommunicationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCommunicationRequest {\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/IncidentCommunicationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationResponse.java new file mode 100644 index 00000000000..8a121cabf69 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationResponse.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 communication. */ +@JsonPropertyOrder({IncidentCommunicationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCommunicationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentCommunicationDataResponse data; + + public IncidentCommunicationResponse() {} + + @JsonCreator + public IncidentCommunicationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentCommunicationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentCommunicationResponse data(IncidentCommunicationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident communication data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCommunicationDataResponse getData() { + return data; + } + + public void setData(IncidentCommunicationDataResponse 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 IncidentCommunicationResponse + */ + @JsonAnySetter + public IncidentCommunicationResponse 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 IncidentCommunicationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCommunicationResponse incidentCommunicationResponse = (IncidentCommunicationResponse) o; + return Objects.equals(this.data, incidentCommunicationResponse.data) + && Objects.equals( + this.additionalProperties, incidentCommunicationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCommunicationResponse {\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/IncidentCommunicationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationType.java new file mode 100644 index 00000000000..ce0cb4293fa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationType.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 communication resource type. */ +@JsonSerialize(using = IncidentCommunicationType.IncidentCommunicationTypeSerializer.class) +public class IncidentCommunicationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("communication")); + + public static final IncidentCommunicationType COMMUNICATION = + new IncidentCommunicationType("communication"); + + IncidentCommunicationType(String value) { + super(value, allowedValues); + } + + public static class IncidentCommunicationTypeSerializer + extends StdSerializer { + public IncidentCommunicationTypeSerializer(Class t) { + super(t); + } + + public IncidentCommunicationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentCommunicationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentCommunicationType fromValue(String value) { + return new IncidentCommunicationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationsResponse.java new file mode 100644 index 00000000000..e71fb292531 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCommunicationsResponse.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 communications. */ +@JsonPropertyOrder({IncidentCommunicationsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCommunicationsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentCommunicationsResponse() {} + + @JsonCreator + public IncidentCommunicationsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentCommunicationsResponse data(List data) { + this.data = data; + for (IncidentCommunicationDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentCommunicationsResponse addDataItem(IncidentCommunicationDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of communications. + * + * @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 IncidentCommunicationsResponse + */ + @JsonAnySetter + public IncidentCommunicationsResponse 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 IncidentCommunicationsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCommunicationsResponse incidentCommunicationsResponse = + (IncidentCommunicationsResponse) o; + return Objects.equals(this.data, incidentCommunicationsResponse.data) + && Objects.equals( + this.additionalProperties, incidentCommunicationsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCommunicationsResponse {\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/IncidentCreateZoomMeetingData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateZoomMeetingData.java new file mode 100644 index 00000000000..a6bdcfc6a80 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateZoomMeetingData.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; + +/** Data for creating a Zoom meeting. */ +@JsonPropertyOrder({ + IncidentCreateZoomMeetingData.JSON_PROPERTY_ATTRIBUTES, + IncidentCreateZoomMeetingData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreateZoomMeetingData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentCreateZoomMeetingDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentZoomIntegrationType type; + + public IncidentCreateZoomMeetingData() {} + + @JsonCreator + public IncidentCreateZoomMeetingData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentCreateZoomMeetingDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentZoomIntegrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentCreateZoomMeetingData attributes( + IncidentCreateZoomMeetingDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a Zoom meeting. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCreateZoomMeetingDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentCreateZoomMeetingDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentCreateZoomMeetingData type(IncidentZoomIntegrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomIntegrationType getType() { + return type; + } + + public void setType(IncidentZoomIntegrationType 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 IncidentCreateZoomMeetingData + */ + @JsonAnySetter + public IncidentCreateZoomMeetingData 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 IncidentCreateZoomMeetingData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreateZoomMeetingData incidentCreateZoomMeetingData = (IncidentCreateZoomMeetingData) o; + return Objects.equals(this.attributes, incidentCreateZoomMeetingData.attributes) + && Objects.equals(this.type, incidentCreateZoomMeetingData.type) + && Objects.equals( + this.additionalProperties, incidentCreateZoomMeetingData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreateZoomMeetingData {\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/IncidentCreateZoomMeetingDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateZoomMeetingDataAttributes.java new file mode 100644 index 00000000000..9f9799b03ef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateZoomMeetingDataAttributes.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; + +/** Attributes for creating a Zoom meeting. */ +@JsonPropertyOrder({IncidentCreateZoomMeetingDataAttributes.JSON_PROPERTY_TOPIC}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreateZoomMeetingDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOPIC = "topic"; + private String topic; + + public IncidentCreateZoomMeetingDataAttributes() {} + + @JsonCreator + public IncidentCreateZoomMeetingDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_TOPIC) String topic) { + this.topic = topic; + } + + public IncidentCreateZoomMeetingDataAttributes topic(String topic) { + this.topic = topic; + return this; + } + + /** + * The topic of the Zoom meeting. + * + * @return topic + */ + @JsonProperty(JSON_PROPERTY_TOPIC) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + /** + * 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 IncidentCreateZoomMeetingDataAttributes + */ + @JsonAnySetter + public IncidentCreateZoomMeetingDataAttributes 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 IncidentCreateZoomMeetingDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreateZoomMeetingDataAttributes incidentCreateZoomMeetingDataAttributes = + (IncidentCreateZoomMeetingDataAttributes) o; + return Objects.equals(this.topic, incidentCreateZoomMeetingDataAttributes.topic) + && Objects.equals( + this.additionalProperties, + incidentCreateZoomMeetingDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(topic, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreateZoomMeetingDataAttributes {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).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/IncidentCreateZoomMeetingRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateZoomMeetingRequest.java new file mode 100644 index 00000000000..d923a7bc1b4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateZoomMeetingRequest.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 to create a Zoom meeting for an incident. */ +@JsonPropertyOrder({IncidentCreateZoomMeetingRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentCreateZoomMeetingRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentCreateZoomMeetingData data; + + public IncidentCreateZoomMeetingRequest() {} + + @JsonCreator + public IncidentCreateZoomMeetingRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentCreateZoomMeetingData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentCreateZoomMeetingRequest data(IncidentCreateZoomMeetingData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for creating a Zoom meeting. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentCreateZoomMeetingData getData() { + return data; + } + + public void setData(IncidentCreateZoomMeetingData 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 IncidentCreateZoomMeetingRequest + */ + @JsonAnySetter + public IncidentCreateZoomMeetingRequest 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 IncidentCreateZoomMeetingRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentCreateZoomMeetingRequest incidentCreateZoomMeetingRequest = + (IncidentCreateZoomMeetingRequest) o; + return Objects.equals(this.data, incidentCreateZoomMeetingRequest.data) + && Objects.equals( + this.additionalProperties, incidentCreateZoomMeetingRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentCreateZoomMeetingRequest {\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/IncidentGoogleMeetIntegrationDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetIntegrationDataAttributes.java new file mode 100644 index 00000000000..8207cee8e6f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetIntegrationDataAttributes.java @@ -0,0 +1,276 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Google Meet integration metadata. */ +@JsonPropertyOrder({ + IncidentGoogleMeetIntegrationDataAttributes.JSON_PROPERTY_CREATED, + IncidentGoogleMeetIntegrationDataAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + IncidentGoogleMeetIntegrationDataAttributes.JSON_PROPERTY_MODIFIED, + IncidentGoogleMeetIntegrationDataAttributes.JSON_PROPERTY_SPACES, + IncidentGoogleMeetIntegrationDataAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetIntegrationDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private String integrationType; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_SPACES = "spaces"; + private List spaces = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public IncidentGoogleMeetIntegrationDataAttributes() {} + + @JsonCreator + public IncidentGoogleMeetIntegrationDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) String integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_SPACES) + List spaces, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.created = created; + this.integrationType = integrationType; + this.modified = modified; + this.spaces = spaces; + this.status = status; + } + + public IncidentGoogleMeetIntegrationDataAttributes created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the integration 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 IncidentGoogleMeetIntegrationDataAttributes integrationType(String integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + * The type of integration. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(String integrationType) { + this.integrationType = integrationType; + } + + public IncidentGoogleMeetIntegrationDataAttributes modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the integration 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 IncidentGoogleMeetIntegrationDataAttributes spaces(List spaces) { + this.spaces = spaces; + for (IncidentGoogleMeetSpace item : spaces) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentGoogleMeetIntegrationDataAttributes addSpacesItem( + IncidentGoogleMeetSpace spacesItem) { + this.spaces.add(spacesItem); + this.unparsed |= spacesItem.unparsed; + return this; + } + + /** + * List of Google Meet spaces. + * + * @return spaces + */ + @JsonProperty(JSON_PROPERTY_SPACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSpaces() { + return spaces; + } + + public void setSpaces(List spaces) { + this.spaces = spaces; + } + + public IncidentGoogleMeetIntegrationDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The status of the integration. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * 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 IncidentGoogleMeetIntegrationDataAttributes + */ + @JsonAnySetter + public IncidentGoogleMeetIntegrationDataAttributes 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 IncidentGoogleMeetIntegrationDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetIntegrationDataAttributes incidentGoogleMeetIntegrationDataAttributes = + (IncidentGoogleMeetIntegrationDataAttributes) o; + return Objects.equals(this.created, incidentGoogleMeetIntegrationDataAttributes.created) + && Objects.equals( + this.integrationType, incidentGoogleMeetIntegrationDataAttributes.integrationType) + && Objects.equals(this.modified, incidentGoogleMeetIntegrationDataAttributes.modified) + && Objects.equals(this.spaces, incidentGoogleMeetIntegrationDataAttributes.spaces) + && Objects.equals(this.status, incidentGoogleMeetIntegrationDataAttributes.status) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetIntegrationDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(created, integrationType, modified, spaces, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetIntegrationDataAttributes {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" spaces: ").append(toIndentedString(spaces)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IncidentGoogleMeetIntegrationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetIntegrationDataResponse.java new file mode 100644 index 00000000000..4d08c2c7584 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetIntegrationDataResponse.java @@ -0,0 +1,215 @@ +/* + * 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 integration data in a response. */ +@JsonPropertyOrder({ + IncidentGoogleMeetIntegrationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentGoogleMeetIntegrationDataResponse.JSON_PROPERTY_ID, + IncidentGoogleMeetIntegrationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetIntegrationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentGoogleMeetIntegrationDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentGoogleMeetIntegrationType type; + + public IncidentGoogleMeetIntegrationDataResponse() {} + + @JsonCreator + public IncidentGoogleMeetIntegrationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentGoogleMeetIntegrationDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentGoogleMeetIntegrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentGoogleMeetIntegrationDataResponse attributes( + IncidentGoogleMeetIntegrationDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Google Meet integration metadata. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetIntegrationDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentGoogleMeetIntegrationDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentGoogleMeetIntegrationDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The integration 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 IncidentGoogleMeetIntegrationDataResponse type(IncidentGoogleMeetIntegrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetIntegrationType getType() { + return type; + } + + public void setType(IncidentGoogleMeetIntegrationType 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 IncidentGoogleMeetIntegrationDataResponse + */ + @JsonAnySetter + public IncidentGoogleMeetIntegrationDataResponse 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 IncidentGoogleMeetIntegrationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetIntegrationDataResponse incidentGoogleMeetIntegrationDataResponse = + (IncidentGoogleMeetIntegrationDataResponse) o; + return Objects.equals(this.attributes, incidentGoogleMeetIntegrationDataResponse.attributes) + && Objects.equals(this.id, incidentGoogleMeetIntegrationDataResponse.id) + && Objects.equals(this.type, incidentGoogleMeetIntegrationDataResponse.type) + && Objects.equals( + this.additionalProperties, + incidentGoogleMeetIntegrationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetIntegrationDataResponse {\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/IncidentGoogleMeetIntegrationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetIntegrationResponse.java new file mode 100644 index 00000000000..aab1719823b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetIntegrationResponse.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; + +/** Response with Google Meet integration metadata. */ +@JsonPropertyOrder({IncidentGoogleMeetIntegrationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetIntegrationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentGoogleMeetIntegrationDataResponse data; + + public IncidentGoogleMeetIntegrationResponse() {} + + @JsonCreator + public IncidentGoogleMeetIntegrationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentGoogleMeetIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentGoogleMeetIntegrationResponse data( + IncidentGoogleMeetIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Meet integration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentGoogleMeetIntegrationDataResponse getData() { + return data; + } + + public void setData(IncidentGoogleMeetIntegrationDataResponse 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 IncidentGoogleMeetIntegrationResponse + */ + @JsonAnySetter + public IncidentGoogleMeetIntegrationResponse 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 IncidentGoogleMeetIntegrationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetIntegrationResponse incidentGoogleMeetIntegrationResponse = + (IncidentGoogleMeetIntegrationResponse) o; + return Objects.equals(this.data, incidentGoogleMeetIntegrationResponse.data) + && Objects.equals( + this.additionalProperties, incidentGoogleMeetIntegrationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetIntegrationResponse {\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/IncidentGoogleMeetIntegrationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetIntegrationType.java new file mode 100644 index 00000000000..226cce6c1aa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetIntegrationType.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; + +/** Incident integration resource type. */ +@JsonSerialize( + using = IncidentGoogleMeetIntegrationType.IncidentGoogleMeetIntegrationTypeSerializer.class) +public class IncidentGoogleMeetIntegrationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_integrations")); + + public static final IncidentGoogleMeetIntegrationType INCIDENT_INTEGRATIONS = + new IncidentGoogleMeetIntegrationType("incident_integrations"); + + IncidentGoogleMeetIntegrationType(String value) { + super(value, allowedValues); + } + + public static class IncidentGoogleMeetIntegrationTypeSerializer + extends StdSerializer { + public IncidentGoogleMeetIntegrationTypeSerializer(Class t) { + super(t); + } + + public IncidentGoogleMeetIntegrationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentGoogleMeetIntegrationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentGoogleMeetIntegrationType fromValue(String value) { + return new IncidentGoogleMeetIntegrationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetSpace.java b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetSpace.java new file mode 100644 index 00000000000..0ac7566e647 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentGoogleMeetSpace.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 Google Meet space associated with an incident. */ +@JsonPropertyOrder({ + IncidentGoogleMeetSpace.JSON_PROPERTY_JOIN_URL, + IncidentGoogleMeetSpace.JSON_PROPERTY_MEETING_CODE, + IncidentGoogleMeetSpace.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentGoogleMeetSpace { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_JOIN_URL = "join_url"; + private String joinUrl; + + public static final String JSON_PROPERTY_MEETING_CODE = "meeting_code"; + private String meetingCode; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public IncidentGoogleMeetSpace() {} + + @JsonCreator + public IncidentGoogleMeetSpace( + @JsonProperty(required = true, value = JSON_PROPERTY_JOIN_URL) String joinUrl, + @JsonProperty(required = true, value = JSON_PROPERTY_MEETING_CODE) String meetingCode, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.joinUrl = joinUrl; + this.meetingCode = meetingCode; + this.name = name; + } + + public IncidentGoogleMeetSpace joinUrl(String joinUrl) { + this.joinUrl = joinUrl; + return this; + } + + /** + * The URL to join the Google Meet space. + * + * @return joinUrl + */ + @JsonProperty(JSON_PROPERTY_JOIN_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getJoinUrl() { + return joinUrl; + } + + public void setJoinUrl(String joinUrl) { + this.joinUrl = joinUrl; + } + + public IncidentGoogleMeetSpace meetingCode(String meetingCode) { + this.meetingCode = meetingCode; + return this; + } + + /** + * The meeting code for the space. + * + * @return meetingCode + */ + @JsonProperty(JSON_PROPERTY_MEETING_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMeetingCode() { + return meetingCode; + } + + public void setMeetingCode(String meetingCode) { + this.meetingCode = meetingCode; + } + + public IncidentGoogleMeetSpace name(String name) { + this.name = name; + return this; + } + + /** + * The name of the Google Meet space. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * 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 IncidentGoogleMeetSpace + */ + @JsonAnySetter + public IncidentGoogleMeetSpace 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 IncidentGoogleMeetSpace object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentGoogleMeetSpace incidentGoogleMeetSpace = (IncidentGoogleMeetSpace) o; + return Objects.equals(this.joinUrl, incidentGoogleMeetSpace.joinUrl) + && Objects.equals(this.meetingCode, incidentGoogleMeetSpace.meetingCode) + && Objects.equals(this.name, incidentGoogleMeetSpace.name) + && Objects.equals(this.additionalProperties, incidentGoogleMeetSpace.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(joinUrl, meetingCode, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentGoogleMeetSpace {\n"); + sb.append(" joinUrl: ").append(toIndentedString(joinUrl)).append("\n"); + sb.append(" meetingCode: ").append(toIndentedString(meetingCode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/IncidentJiraIssueDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueDataAttributesRequest.java new file mode 100644 index 00000000000..6dd6a5e4804 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueDataAttributesRequest.java @@ -0,0 +1,231 @@ +/* + * 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; + +/** Attributes for creating a Jira issue from an incident. */ +@JsonPropertyOrder({ + IncidentJiraIssueDataAttributesRequest.JSON_PROPERTY_ACCOUNT_ID, + IncidentJiraIssueDataAttributesRequest.JSON_PROPERTY_ISSUE_TYPE_ID, + IncidentJiraIssueDataAttributesRequest.JSON_PROPERTY_PROJECT_ID, + IncidentJiraIssueDataAttributesRequest.JSON_PROPERTY_TEMPLATE_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraIssueDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_ISSUE_TYPE_ID = "issue_type_id"; + private String issueTypeId; + + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + private String projectId; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + private UUID templateId; + + public IncidentJiraIssueDataAttributesRequest() {} + + @JsonCreator + public IncidentJiraIssueDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, + @JsonProperty(required = true, value = JSON_PROPERTY_ISSUE_TYPE_ID) String issueTypeId, + @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_ID) String projectId) { + this.accountId = accountId; + this.issueTypeId = issueTypeId; + this.projectId = projectId; + } + + public IncidentJiraIssueDataAttributesRequest accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The Jira account identifier. + * + * @return accountId + */ + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public IncidentJiraIssueDataAttributesRequest issueTypeId(String issueTypeId) { + this.issueTypeId = issueTypeId; + return this; + } + + /** + * The Jira issue type identifier. + * + * @return issueTypeId + */ + @JsonProperty(JSON_PROPERTY_ISSUE_TYPE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIssueTypeId() { + return issueTypeId; + } + + public void setIssueTypeId(String issueTypeId) { + this.issueTypeId = issueTypeId; + } + + public IncidentJiraIssueDataAttributesRequest projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * The Jira project identifier. + * + * @return projectId + */ + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public IncidentJiraIssueDataAttributesRequest templateId(UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * The identifier of the Jira template to use. + * + * @return templateId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTemplateId() { + return templateId; + } + + public void setTemplateId(UUID templateId) { + this.templateId = templateId; + } + + /** + * 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 IncidentJiraIssueDataAttributesRequest + */ + @JsonAnySetter + public IncidentJiraIssueDataAttributesRequest 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 IncidentJiraIssueDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraIssueDataAttributesRequest incidentJiraIssueDataAttributesRequest = + (IncidentJiraIssueDataAttributesRequest) o; + return Objects.equals(this.accountId, incidentJiraIssueDataAttributesRequest.accountId) + && Objects.equals(this.issueTypeId, incidentJiraIssueDataAttributesRequest.issueTypeId) + && Objects.equals(this.projectId, incidentJiraIssueDataAttributesRequest.projectId) + && Objects.equals(this.templateId, incidentJiraIssueDataAttributesRequest.templateId) + && Objects.equals( + this.additionalProperties, incidentJiraIssueDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, issueTypeId, projectId, templateId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraIssueDataAttributesRequest {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" issueTypeId: ").append(toIndentedString(issueTypeId)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).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/IncidentJiraIssueDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueDataRequest.java new file mode 100644 index 00000000000..c90242a3834 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueDataRequest.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; + +/** Jira issue data for a request. */ +@JsonPropertyOrder({ + IncidentJiraIssueDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentJiraIssueDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraIssueDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentJiraIssueDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentJiraIssueType type; + + public IncidentJiraIssueDataRequest() {} + + @JsonCreator + public IncidentJiraIssueDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentJiraIssueDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentJiraIssueType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentJiraIssueDataRequest attributes( + IncidentJiraIssueDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a Jira issue from an incident. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraIssueDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentJiraIssueDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentJiraIssueDataRequest type(IncidentJiraIssueType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident Jira issue resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraIssueType getType() { + return type; + } + + public void setType(IncidentJiraIssueType 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 IncidentJiraIssueDataRequest + */ + @JsonAnySetter + public IncidentJiraIssueDataRequest 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 IncidentJiraIssueDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraIssueDataRequest incidentJiraIssueDataRequest = (IncidentJiraIssueDataRequest) o; + return Objects.equals(this.attributes, incidentJiraIssueDataRequest.attributes) + && Objects.equals(this.type, incidentJiraIssueDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentJiraIssueDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraIssueDataRequest {\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/IncidentJiraIssueIntegrationDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueIntegrationDataAttributes.java new file mode 100644 index 00000000000..c4f17888d7b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueIntegrationDataAttributes.java @@ -0,0 +1,235 @@ +/* + * 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 Jira issue integration. */ +@JsonPropertyOrder({ + IncidentJiraIssueIntegrationDataAttributes.JSON_PROPERTY_CREATED, + IncidentJiraIssueIntegrationDataAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + IncidentJiraIssueIntegrationDataAttributes.JSON_PROPERTY_MODIFIED, + IncidentJiraIssueIntegrationDataAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraIssueIntegrationDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private String integrationType; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public IncidentJiraIssueIntegrationDataAttributes() {} + + @JsonCreator + public IncidentJiraIssueIntegrationDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) String integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.created = created; + this.integrationType = integrationType; + this.modified = modified; + this.status = status; + } + + public IncidentJiraIssueIntegrationDataAttributes created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the integration 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 IncidentJiraIssueIntegrationDataAttributes integrationType(String integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + * The type of integration. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(String integrationType) { + this.integrationType = integrationType; + } + + public IncidentJiraIssueIntegrationDataAttributes modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the integration 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 IncidentJiraIssueIntegrationDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The status of the integration. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * 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 IncidentJiraIssueIntegrationDataAttributes + */ + @JsonAnySetter + public IncidentJiraIssueIntegrationDataAttributes 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 IncidentJiraIssueIntegrationDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraIssueIntegrationDataAttributes incidentJiraIssueIntegrationDataAttributes = + (IncidentJiraIssueIntegrationDataAttributes) o; + return Objects.equals(this.created, incidentJiraIssueIntegrationDataAttributes.created) + && Objects.equals( + this.integrationType, incidentJiraIssueIntegrationDataAttributes.integrationType) + && Objects.equals(this.modified, incidentJiraIssueIntegrationDataAttributes.modified) + && Objects.equals(this.status, incidentJiraIssueIntegrationDataAttributes.status) + && Objects.equals( + this.additionalProperties, + incidentJiraIssueIntegrationDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(created, integrationType, modified, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraIssueIntegrationDataAttributes {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IncidentJiraIssueIntegrationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueIntegrationDataResponse.java new file mode 100644 index 00000000000..9503f73616b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueIntegrationDataResponse.java @@ -0,0 +1,215 @@ +/* + * 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; + +/** Jira issue integration data in a response. */ +@JsonPropertyOrder({ + IncidentJiraIssueIntegrationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentJiraIssueIntegrationDataResponse.JSON_PROPERTY_ID, + IncidentJiraIssueIntegrationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraIssueIntegrationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentJiraIssueIntegrationDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentJiraIssueIntegrationType type; + + public IncidentJiraIssueIntegrationDataResponse() {} + + @JsonCreator + public IncidentJiraIssueIntegrationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentJiraIssueIntegrationDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentJiraIssueIntegrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentJiraIssueIntegrationDataResponse attributes( + IncidentJiraIssueIntegrationDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Jira issue integration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraIssueIntegrationDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentJiraIssueIntegrationDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentJiraIssueIntegrationDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The integration 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 IncidentJiraIssueIntegrationDataResponse type(IncidentJiraIssueIntegrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraIssueIntegrationType getType() { + return type; + } + + public void setType(IncidentJiraIssueIntegrationType 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 IncidentJiraIssueIntegrationDataResponse + */ + @JsonAnySetter + public IncidentJiraIssueIntegrationDataResponse 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 IncidentJiraIssueIntegrationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraIssueIntegrationDataResponse incidentJiraIssueIntegrationDataResponse = + (IncidentJiraIssueIntegrationDataResponse) o; + return Objects.equals(this.attributes, incidentJiraIssueIntegrationDataResponse.attributes) + && Objects.equals(this.id, incidentJiraIssueIntegrationDataResponse.id) + && Objects.equals(this.type, incidentJiraIssueIntegrationDataResponse.type) + && Objects.equals( + this.additionalProperties, + incidentJiraIssueIntegrationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraIssueIntegrationDataResponse {\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/IncidentJiraIssueIntegrationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueIntegrationResponse.java new file mode 100644 index 00000000000..7a5d519465b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueIntegrationResponse.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; + +/** Response with Jira issue integration metadata. */ +@JsonPropertyOrder({IncidentJiraIssueIntegrationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraIssueIntegrationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentJiraIssueIntegrationDataResponse data; + + public IncidentJiraIssueIntegrationResponse() {} + + @JsonCreator + public IncidentJiraIssueIntegrationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentJiraIssueIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentJiraIssueIntegrationResponse data(IncidentJiraIssueIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Jira issue integration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraIssueIntegrationDataResponse getData() { + return data; + } + + public void setData(IncidentJiraIssueIntegrationDataResponse 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 IncidentJiraIssueIntegrationResponse + */ + @JsonAnySetter + public IncidentJiraIssueIntegrationResponse 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 IncidentJiraIssueIntegrationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraIssueIntegrationResponse incidentJiraIssueIntegrationResponse = + (IncidentJiraIssueIntegrationResponse) o; + return Objects.equals(this.data, incidentJiraIssueIntegrationResponse.data) + && Objects.equals( + this.additionalProperties, incidentJiraIssueIntegrationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraIssueIntegrationResponse {\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/IncidentJiraIssueIntegrationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueIntegrationType.java new file mode 100644 index 00000000000..9cdc55178a8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueIntegrationType.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; + +/** Incident integration resource type. */ +@JsonSerialize( + using = IncidentJiraIssueIntegrationType.IncidentJiraIssueIntegrationTypeSerializer.class) +public class IncidentJiraIssueIntegrationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_integrations")); + + public static final IncidentJiraIssueIntegrationType INCIDENT_INTEGRATIONS = + new IncidentJiraIssueIntegrationType("incident_integrations"); + + IncidentJiraIssueIntegrationType(String value) { + super(value, allowedValues); + } + + public static class IncidentJiraIssueIntegrationTypeSerializer + extends StdSerializer { + public IncidentJiraIssueIntegrationTypeSerializer(Class t) { + super(t); + } + + public IncidentJiraIssueIntegrationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentJiraIssueIntegrationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentJiraIssueIntegrationType fromValue(String value) { + return new IncidentJiraIssueIntegrationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueRequest.java new file mode 100644 index 00000000000..92469256c7c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueRequest.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 to create a Jira issue from an incident. */ +@JsonPropertyOrder({IncidentJiraIssueRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraIssueRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentJiraIssueDataRequest data; + + public IncidentJiraIssueRequest() {} + + @JsonCreator + public IncidentJiraIssueRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentJiraIssueDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentJiraIssueRequest data(IncidentJiraIssueDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Jira issue data for a request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraIssueDataRequest getData() { + return data; + } + + public void setData(IncidentJiraIssueDataRequest 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 IncidentJiraIssueRequest + */ + @JsonAnySetter + public IncidentJiraIssueRequest 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 IncidentJiraIssueRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraIssueRequest incidentJiraIssueRequest = (IncidentJiraIssueRequest) o; + return Objects.equals(this.data, incidentJiraIssueRequest.data) + && Objects.equals(this.additionalProperties, incidentJiraIssueRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraIssueRequest {\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/IncidentJiraIssueType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueType.java new file mode 100644 index 00000000000..6994cf31d70 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraIssueType.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 Jira issue resource type. */ +@JsonSerialize(using = IncidentJiraIssueType.IncidentJiraIssueTypeSerializer.class) +public class IncidentJiraIssueType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_jira_issues")); + + public static final IncidentJiraIssueType INCIDENT_JIRA_ISSUES = + new IncidentJiraIssueType("incident_jira_issues"); + + IncidentJiraIssueType(String value) { + super(value, allowedValues); + } + + public static class IncidentJiraIssueTypeSerializer extends StdSerializer { + public IncidentJiraIssueTypeSerializer(Class t) { + super(t); + } + + public IncidentJiraIssueTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentJiraIssueType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentJiraIssueType fromValue(String value) { + return new IncidentJiraIssueType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateDataAttributesRequest.java new file mode 100644 index 00000000000..211675e2df3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateDataAttributesRequest.java @@ -0,0 +1,506 @@ +/* + * 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; + +/** Attributes for creating or updating an incident Jira template. */ +@JsonPropertyOrder({ + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_ACCOUNT_ID, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_FIELD_CONFIGURATIONS, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_FIELDS, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_IS_DEFAULT, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_ISSUE_ID, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_MAPPINGS, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_META, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_NAME, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_PROJECT_ID, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_PROJECT_KEY, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_SYNC_ENABLED, + IncidentJiraTemplateDataAttributesRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_FIELD_CONFIGURATIONS = "field_configurations"; + private List fieldConfigurations = null; + + public static final String JSON_PROPERTY_FIELDS = "fields"; + private Map fields = null; + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + private Boolean isDefault; + + public static final String JSON_PROPERTY_ISSUE_ID = "issue_id"; + private String issueId; + + public static final String JSON_PROPERTY_MAPPINGS = "mappings"; + private Map mappings = null; + + public static final String JSON_PROPERTY_META = "meta"; + private Map meta = null; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + private String projectId; + + public static final String JSON_PROPERTY_PROJECT_KEY = "project_key"; + private String projectKey; + + public static final String JSON_PROPERTY_SYNC_ENABLED = "sync_enabled"; + private Boolean syncEnabled; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public IncidentJiraTemplateDataAttributesRequest() {} + + @JsonCreator + public IncidentJiraTemplateDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, + @JsonProperty(required = true, value = JSON_PROPERTY_ISSUE_ID) String issueId, + @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_ID) String projectId, + @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_KEY) String projectKey) { + this.accountId = accountId; + this.issueId = issueId; + this.projectId = projectId; + this.projectKey = projectKey; + } + + public IncidentJiraTemplateDataAttributesRequest accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The Jira account identifier. + * + * @return accountId + */ + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public IncidentJiraTemplateDataAttributesRequest fieldConfigurations( + List fieldConfigurations) { + this.fieldConfigurations = fieldConfigurations; + for (IncidentJiraTemplateFieldConfiguration item : fieldConfigurations) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentJiraTemplateDataAttributesRequest addFieldConfigurationsItem( + IncidentJiraTemplateFieldConfiguration fieldConfigurationsItem) { + if (this.fieldConfigurations == null) { + this.fieldConfigurations = new ArrayList<>(); + } + this.fieldConfigurations.add(fieldConfigurationsItem); + this.unparsed |= fieldConfigurationsItem.unparsed; + return this; + } + + /** + * Field configuration mappings. + * + * @return fieldConfigurations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD_CONFIGURATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFieldConfigurations() { + return fieldConfigurations; + } + + public void setFieldConfigurations( + List fieldConfigurations) { + this.fieldConfigurations = fieldConfigurations; + } + + public IncidentJiraTemplateDataAttributesRequest fields(Map fields) { + this.fields = fields; + return this; + } + + public IncidentJiraTemplateDataAttributesRequest putFieldsItem(String key, Object fieldsItem) { + if (this.fields == null) { + this.fields = new HashMap<>(); + } + this.fields.put(key, fieldsItem); + return this; + } + + /** + * The Jira fields configuration. + * + * @return fields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getFields() { + return fields; + } + + public void setFields(Map fields) { + this.fields = fields; + } + + public IncidentJiraTemplateDataAttributesRequest isDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Whether this is the default template. + * + * @return isDefault + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDefault() { + return isDefault; + } + + public void setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + } + + public IncidentJiraTemplateDataAttributesRequest issueId(String issueId) { + this.issueId = issueId; + return this; + } + + /** + * The Jira issue type identifier. + * + * @return issueId + */ + @JsonProperty(JSON_PROPERTY_ISSUE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIssueId() { + return issueId; + } + + public void setIssueId(String issueId) { + this.issueId = issueId; + } + + public IncidentJiraTemplateDataAttributesRequest mappings(Map mappings) { + this.mappings = mappings; + return this; + } + + public IncidentJiraTemplateDataAttributesRequest putMappingsItem( + String key, Object mappingsItem) { + if (this.mappings == null) { + this.mappings = new HashMap<>(); + } + this.mappings.put(key, mappingsItem); + return this; + } + + /** + * The field mappings configuration. + * + * @return mappings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAPPINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMappings() { + return mappings; + } + + public void setMappings(Map mappings) { + this.mappings = mappings; + } + + public IncidentJiraTemplateDataAttributesRequest meta(Map meta) { + this.meta = meta; + return this; + } + + public IncidentJiraTemplateDataAttributesRequest putMetaItem(String key, Object metaItem) { + if (this.meta == null) { + this.meta = new HashMap<>(); + } + this.meta.put(key, metaItem); + return this; + } + + /** + * Additional metadata for the template. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMeta() { + return meta; + } + + public void setMeta(Map meta) { + this.meta = meta; + } + + public IncidentJiraTemplateDataAttributesRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the template. + * + * @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 IncidentJiraTemplateDataAttributesRequest projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * The Jira project identifier. + * + * @return projectId + */ + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public IncidentJiraTemplateDataAttributesRequest projectKey(String projectKey) { + this.projectKey = projectKey; + return this; + } + + /** + * The Jira project key. + * + * @return projectKey + */ + @JsonProperty(JSON_PROPERTY_PROJECT_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProjectKey() { + return projectKey; + } + + public void setProjectKey(String projectKey) { + this.projectKey = projectKey; + } + + public IncidentJiraTemplateDataAttributesRequest syncEnabled(Boolean syncEnabled) { + this.syncEnabled = syncEnabled; + return this; + } + + /** + * Whether synchronization is enabled. + * + * @return syncEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNC_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSyncEnabled() { + return syncEnabled; + } + + public void setSyncEnabled(Boolean syncEnabled) { + this.syncEnabled = syncEnabled; + } + + public IncidentJiraTemplateDataAttributesRequest type(String type) { + this.type = type; + return this; + } + + /** + * The type of the template. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + 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 IncidentJiraTemplateDataAttributesRequest + */ + @JsonAnySetter + public IncidentJiraTemplateDataAttributesRequest 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 IncidentJiraTemplateDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateDataAttributesRequest incidentJiraTemplateDataAttributesRequest = + (IncidentJiraTemplateDataAttributesRequest) o; + return Objects.equals(this.accountId, incidentJiraTemplateDataAttributesRequest.accountId) + && Objects.equals( + this.fieldConfigurations, incidentJiraTemplateDataAttributesRequest.fieldConfigurations) + && Objects.equals(this.fields, incidentJiraTemplateDataAttributesRequest.fields) + && Objects.equals(this.isDefault, incidentJiraTemplateDataAttributesRequest.isDefault) + && Objects.equals(this.issueId, incidentJiraTemplateDataAttributesRequest.issueId) + && Objects.equals(this.mappings, incidentJiraTemplateDataAttributesRequest.mappings) + && Objects.equals(this.meta, incidentJiraTemplateDataAttributesRequest.meta) + && Objects.equals(this.name, incidentJiraTemplateDataAttributesRequest.name) + && Objects.equals(this.projectId, incidentJiraTemplateDataAttributesRequest.projectId) + && Objects.equals(this.projectKey, incidentJiraTemplateDataAttributesRequest.projectKey) + && Objects.equals(this.syncEnabled, incidentJiraTemplateDataAttributesRequest.syncEnabled) + && Objects.equals(this.type, incidentJiraTemplateDataAttributesRequest.type) + && Objects.equals( + this.additionalProperties, + incidentJiraTemplateDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + fieldConfigurations, + fields, + isDefault, + issueId, + mappings, + meta, + name, + projectId, + projectKey, + syncEnabled, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateDataAttributesRequest {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" fieldConfigurations: ") + .append(toIndentedString(fieldConfigurations)) + .append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" issueId: ").append(toIndentedString(issueId)).append("\n"); + sb.append(" mappings: ").append(toIndentedString(mappings)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" projectKey: ").append(toIndentedString(projectKey)).append("\n"); + sb.append(" syncEnabled: ").append(toIndentedString(syncEnabled)).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/IncidentJiraTemplateDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateDataAttributesResponse.java new file mode 100644 index 00000000000..7d0402f5621 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateDataAttributesResponse.java @@ -0,0 +1,633 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Attributes of an incident Jira template. */ +@JsonPropertyOrder({ + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_ACCOUNT_ID, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_CREATED_BY_UUID, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_FIELD_CONFIGURATIONS, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_FIELDS, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_IS_DEFAULT, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_ISSUE_ID, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_LAST_MODIFIED_BY_UUID, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_MAPPINGS, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_META, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_MODIFIED, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_NAME, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_PROJECT_ID, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_PROJECT_KEY, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_SYNC_ENABLED, + IncidentJiraTemplateDataAttributesResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + 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_FIELD_CONFIGURATIONS = "field_configurations"; + private List fieldConfigurations = null; + + public static final String JSON_PROPERTY_FIELDS = "fields"; + private Map fields = null; + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + private Boolean isDefault; + + public static final String JSON_PROPERTY_ISSUE_ID = "issue_id"; + private String issueId; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_UUID = "last_modified_by_uuid"; + private UUID lastModifiedByUuid; + + public static final String JSON_PROPERTY_MAPPINGS = "mappings"; + private Map mappings = null; + + public static final String JSON_PROPERTY_META = "meta"; + private Map meta = null; + + 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_PROJECT_ID = "project_id"; + private String projectId; + + public static final String JSON_PROPERTY_PROJECT_KEY = "project_key"; + private String projectKey; + + public static final String JSON_PROPERTY_SYNC_ENABLED = "sync_enabled"; + private Boolean syncEnabled; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public IncidentJiraTemplateDataAttributesResponse() {} + + @JsonCreator + public IncidentJiraTemplateDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY_UUID) UUID createdByUuid, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_DEFAULT) Boolean isDefault, + @JsonProperty(required = true, value = JSON_PROPERTY_ISSUE_ID) String issueId, + @JsonProperty(required = true, value = JSON_PROPERTY_LAST_MODIFIED_BY_UUID) + UUID lastModifiedByUuid, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_ID) String projectId, + @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_KEY) String projectKey, + @JsonProperty(required = true, value = JSON_PROPERTY_SYNC_ENABLED) Boolean syncEnabled, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.accountId = accountId; + this.created = created; + this.createdByUuid = createdByUuid; + this.isDefault = isDefault; + this.issueId = issueId; + this.lastModifiedByUuid = lastModifiedByUuid; + this.modified = modified; + this.name = name; + this.projectId = projectId; + this.projectKey = projectKey; + this.syncEnabled = syncEnabled; + this.type = type; + } + + public IncidentJiraTemplateDataAttributesResponse accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The Jira account identifier. + * + * @return accountId + */ + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public IncidentJiraTemplateDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the template 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 IncidentJiraTemplateDataAttributesResponse createdByUuid(UUID createdByUuid) { + this.createdByUuid = createdByUuid; + return this; + } + + /** + * UUID of the user who created the template. + * + * @return createdByUuid + */ + @JsonProperty(JSON_PROPERTY_CREATED_BY_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getCreatedByUuid() { + return createdByUuid; + } + + public void setCreatedByUuid(UUID createdByUuid) { + this.createdByUuid = createdByUuid; + } + + public IncidentJiraTemplateDataAttributesResponse fieldConfigurations( + List fieldConfigurations) { + this.fieldConfigurations = fieldConfigurations; + for (IncidentJiraTemplateFieldConfiguration item : fieldConfigurations) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentJiraTemplateDataAttributesResponse addFieldConfigurationsItem( + IncidentJiraTemplateFieldConfiguration fieldConfigurationsItem) { + if (this.fieldConfigurations == null) { + this.fieldConfigurations = new ArrayList<>(); + } + this.fieldConfigurations.add(fieldConfigurationsItem); + this.unparsed |= fieldConfigurationsItem.unparsed; + return this; + } + + /** + * Field configuration mappings. + * + * @return fieldConfigurations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD_CONFIGURATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFieldConfigurations() { + return fieldConfigurations; + } + + public void setFieldConfigurations( + List fieldConfigurations) { + this.fieldConfigurations = fieldConfigurations; + } + + public IncidentJiraTemplateDataAttributesResponse fields(Map fields) { + this.fields = fields; + return this; + } + + public IncidentJiraTemplateDataAttributesResponse putFieldsItem(String key, Object fieldsItem) { + if (this.fields == null) { + this.fields = new HashMap<>(); + } + this.fields.put(key, fieldsItem); + return this; + } + + /** + * The Jira fields configuration. + * + * @return fields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getFields() { + return fields; + } + + public void setFields(Map fields) { + this.fields = fields; + } + + public IncidentJiraTemplateDataAttributesResponse isDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Whether this is the default template. + * + * @return isDefault + */ + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsDefault() { + return isDefault; + } + + public void setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + } + + public IncidentJiraTemplateDataAttributesResponse issueId(String issueId) { + this.issueId = issueId; + return this; + } + + /** + * The Jira issue type identifier. + * + * @return issueId + */ + @JsonProperty(JSON_PROPERTY_ISSUE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIssueId() { + return issueId; + } + + public void setIssueId(String issueId) { + this.issueId = issueId; + } + + public IncidentJiraTemplateDataAttributesResponse lastModifiedByUuid(UUID lastModifiedByUuid) { + this.lastModifiedByUuid = lastModifiedByUuid; + return this; + } + + /** + * UUID of the user who last modified the template. + * + * @return lastModifiedByUuid + */ + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getLastModifiedByUuid() { + return lastModifiedByUuid; + } + + public void setLastModifiedByUuid(UUID lastModifiedByUuid) { + this.lastModifiedByUuid = lastModifiedByUuid; + } + + public IncidentJiraTemplateDataAttributesResponse mappings(Map mappings) { + this.mappings = mappings; + return this; + } + + public IncidentJiraTemplateDataAttributesResponse putMappingsItem( + String key, Object mappingsItem) { + if (this.mappings == null) { + this.mappings = new HashMap<>(); + } + this.mappings.put(key, mappingsItem); + return this; + } + + /** + * The field mappings configuration. + * + * @return mappings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAPPINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMappings() { + return mappings; + } + + public void setMappings(Map mappings) { + this.mappings = mappings; + } + + public IncidentJiraTemplateDataAttributesResponse meta(Map meta) { + this.meta = meta; + return this; + } + + public IncidentJiraTemplateDataAttributesResponse putMetaItem(String key, Object metaItem) { + if (this.meta == null) { + this.meta = new HashMap<>(); + } + this.meta.put(key, metaItem); + return this; + } + + /** + * Additional metadata for the template. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMeta() { + return meta; + } + + public void setMeta(Map meta) { + this.meta = meta; + } + + public IncidentJiraTemplateDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the template 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 IncidentJiraTemplateDataAttributesResponse name(String name) { + this.name = name; + return this; + } + + /** + * The name of the template. + * + * @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 IncidentJiraTemplateDataAttributesResponse projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * The Jira project identifier. + * + * @return projectId + */ + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public IncidentJiraTemplateDataAttributesResponse projectKey(String projectKey) { + this.projectKey = projectKey; + return this; + } + + /** + * The Jira project key. + * + * @return projectKey + */ + @JsonProperty(JSON_PROPERTY_PROJECT_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProjectKey() { + return projectKey; + } + + public void setProjectKey(String projectKey) { + this.projectKey = projectKey; + } + + public IncidentJiraTemplateDataAttributesResponse syncEnabled(Boolean syncEnabled) { + this.syncEnabled = syncEnabled; + return this; + } + + /** + * Whether synchronization is enabled. + * + * @return syncEnabled + */ + @JsonProperty(JSON_PROPERTY_SYNC_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSyncEnabled() { + return syncEnabled; + } + + public void setSyncEnabled(Boolean syncEnabled) { + this.syncEnabled = syncEnabled; + } + + public IncidentJiraTemplateDataAttributesResponse type(String type) { + this.type = type; + return this; + } + + /** + * The type of the template. + * + * @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 IncidentJiraTemplateDataAttributesResponse + */ + @JsonAnySetter + public IncidentJiraTemplateDataAttributesResponse 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 IncidentJiraTemplateDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateDataAttributesResponse incidentJiraTemplateDataAttributesResponse = + (IncidentJiraTemplateDataAttributesResponse) o; + return Objects.equals(this.accountId, incidentJiraTemplateDataAttributesResponse.accountId) + && Objects.equals(this.created, incidentJiraTemplateDataAttributesResponse.created) + && Objects.equals( + this.createdByUuid, incidentJiraTemplateDataAttributesResponse.createdByUuid) + && Objects.equals( + this.fieldConfigurations, + incidentJiraTemplateDataAttributesResponse.fieldConfigurations) + && Objects.equals(this.fields, incidentJiraTemplateDataAttributesResponse.fields) + && Objects.equals(this.isDefault, incidentJiraTemplateDataAttributesResponse.isDefault) + && Objects.equals(this.issueId, incidentJiraTemplateDataAttributesResponse.issueId) + && Objects.equals( + this.lastModifiedByUuid, incidentJiraTemplateDataAttributesResponse.lastModifiedByUuid) + && Objects.equals(this.mappings, incidentJiraTemplateDataAttributesResponse.mappings) + && Objects.equals(this.meta, incidentJiraTemplateDataAttributesResponse.meta) + && Objects.equals(this.modified, incidentJiraTemplateDataAttributesResponse.modified) + && Objects.equals(this.name, incidentJiraTemplateDataAttributesResponse.name) + && Objects.equals(this.projectId, incidentJiraTemplateDataAttributesResponse.projectId) + && Objects.equals(this.projectKey, incidentJiraTemplateDataAttributesResponse.projectKey) + && Objects.equals(this.syncEnabled, incidentJiraTemplateDataAttributesResponse.syncEnabled) + && Objects.equals(this.type, incidentJiraTemplateDataAttributesResponse.type) + && Objects.equals( + this.additionalProperties, + incidentJiraTemplateDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + created, + createdByUuid, + fieldConfigurations, + fields, + isDefault, + issueId, + lastModifiedByUuid, + mappings, + meta, + modified, + name, + projectId, + projectKey, + syncEnabled, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateDataAttributesResponse {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" createdByUuid: ").append(toIndentedString(createdByUuid)).append("\n"); + sb.append(" fieldConfigurations: ") + .append(toIndentedString(fieldConfigurations)) + .append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" issueId: ").append(toIndentedString(issueId)).append("\n"); + sb.append(" lastModifiedByUuid: ").append(toIndentedString(lastModifiedByUuid)).append("\n"); + sb.append(" mappings: ").append(toIndentedString(mappings)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" projectKey: ").append(toIndentedString(projectKey)).append("\n"); + sb.append(" syncEnabled: ").append(toIndentedString(syncEnabled)).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/IncidentJiraTemplateDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateDataRequest.java new file mode 100644 index 00000000000..e0565a96ee0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateDataRequest.java @@ -0,0 +1,213 @@ +/* + * 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 Jira template data for a create or update request. */ +@JsonPropertyOrder({ + IncidentJiraTemplateDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentJiraTemplateDataRequest.JSON_PROPERTY_RELATIONSHIPS, + IncidentJiraTemplateDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentJiraTemplateDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentJiraTemplateRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentJiraTemplateType type; + + public IncidentJiraTemplateDataRequest() {} + + @JsonCreator + public IncidentJiraTemplateDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentJiraTemplateDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentJiraTemplateType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentJiraTemplateDataRequest attributes( + IncidentJiraTemplateDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating an incident Jira template. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraTemplateDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentJiraTemplateDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentJiraTemplateDataRequest relationships( + IncidentJiraTemplateRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for an incident Jira template. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentJiraTemplateRelationships getRelationships() { + return relationships; + } + + public void setRelationships(IncidentJiraTemplateRelationships relationships) { + this.relationships = relationships; + } + + public IncidentJiraTemplateDataRequest type(IncidentJiraTemplateType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident Jira template resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraTemplateType getType() { + return type; + } + + public void setType(IncidentJiraTemplateType 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 IncidentJiraTemplateDataRequest + */ + @JsonAnySetter + public IncidentJiraTemplateDataRequest 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 IncidentJiraTemplateDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateDataRequest incidentJiraTemplateDataRequest = + (IncidentJiraTemplateDataRequest) o; + return Objects.equals(this.attributes, incidentJiraTemplateDataRequest.attributes) + && Objects.equals(this.relationships, incidentJiraTemplateDataRequest.relationships) + && Objects.equals(this.type, incidentJiraTemplateDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentJiraTemplateDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateDataRequest {\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/IncidentJiraTemplateDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateDataResponse.java new file mode 100644 index 00000000000..b113d98b7c1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateDataResponse.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 Jira template data in a response. */ +@JsonPropertyOrder({ + IncidentJiraTemplateDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentJiraTemplateDataResponse.JSON_PROPERTY_ID, + IncidentJiraTemplateDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentJiraTemplateDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentJiraTemplateDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentJiraTemplateRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentJiraTemplateType type; + + public IncidentJiraTemplateDataResponse() {} + + @JsonCreator + public IncidentJiraTemplateDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentJiraTemplateDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentJiraTemplateType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentJiraTemplateDataResponse attributes( + IncidentJiraTemplateDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an incident Jira template. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraTemplateDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentJiraTemplateDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentJiraTemplateDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The template 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 IncidentJiraTemplateDataResponse relationships( + IncidentJiraTemplateRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for an incident Jira template. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentJiraTemplateRelationships getRelationships() { + return relationships; + } + + public void setRelationships(IncidentJiraTemplateRelationships relationships) { + this.relationships = relationships; + } + + public IncidentJiraTemplateDataResponse type(IncidentJiraTemplateType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident Jira template resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraTemplateType getType() { + return type; + } + + public void setType(IncidentJiraTemplateType 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 IncidentJiraTemplateDataResponse + */ + @JsonAnySetter + public IncidentJiraTemplateDataResponse 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 IncidentJiraTemplateDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateDataResponse incidentJiraTemplateDataResponse = + (IncidentJiraTemplateDataResponse) o; + return Objects.equals(this.attributes, incidentJiraTemplateDataResponse.attributes) + && Objects.equals(this.id, incidentJiraTemplateDataResponse.id) + && Objects.equals(this.relationships, incidentJiraTemplateDataResponse.relationships) + && Objects.equals(this.type, incidentJiraTemplateDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentJiraTemplateDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateDataResponse {\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/IncidentJiraTemplateFieldConfiguration.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateFieldConfiguration.java new file mode 100644 index 00000000000..0ae4f434c8a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateFieldConfiguration.java @@ -0,0 +1,323 @@ +/* + * 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; + +/** Configuration for a Jira field mapping. */ +@JsonPropertyOrder({ + IncidentJiraTemplateFieldConfiguration.JSON_PROPERTY_CUSTOM_OUTBOUND_VALUE, + IncidentJiraTemplateFieldConfiguration.JSON_PROPERTY_INCIDENT_FIELD, + IncidentJiraTemplateFieldConfiguration.JSON_PROPERTY_JIRA_FIELD_KEY, + IncidentJiraTemplateFieldConfiguration.JSON_PROPERTY_JIRA_FIELD_TYPE, + IncidentJiraTemplateFieldConfiguration.JSON_PROPERTY_SYNC_DIRECTION, + IncidentJiraTemplateFieldConfiguration.JSON_PROPERTY_VALUE_MAPPING +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateFieldConfiguration { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CUSTOM_OUTBOUND_VALUE = "custom_outbound_value"; + private Object customOutboundValue = null; + + public static final String JSON_PROPERTY_INCIDENT_FIELD = "incident_field"; + private JsonNullable incidentField = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_JIRA_FIELD_KEY = "jira_field_key"; + private String jiraFieldKey; + + public static final String JSON_PROPERTY_JIRA_FIELD_TYPE = "jira_field_type"; + private JsonNullable jiraFieldType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SYNC_DIRECTION = "sync_direction"; + private String syncDirection; + + public static final String JSON_PROPERTY_VALUE_MAPPING = "value_mapping"; + private Map valueMapping = null; + + public IncidentJiraTemplateFieldConfiguration() {} + + @JsonCreator + public IncidentJiraTemplateFieldConfiguration( + @JsonProperty(required = true, value = JSON_PROPERTY_JIRA_FIELD_KEY) String jiraFieldKey, + @JsonProperty(required = true, value = JSON_PROPERTY_SYNC_DIRECTION) String syncDirection) { + this.jiraFieldKey = jiraFieldKey; + this.syncDirection = syncDirection; + } + + public IncidentJiraTemplateFieldConfiguration customOutboundValue(Object customOutboundValue) { + this.customOutboundValue = customOutboundValue; + return this; + } + + /** + * Custom value for outbound synchronization. + * + * @return customOutboundValue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_OUTBOUND_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getCustomOutboundValue() { + return customOutboundValue; + } + + public void setCustomOutboundValue(Object customOutboundValue) { + this.customOutboundValue = customOutboundValue; + } + + public IncidentJiraTemplateFieldConfiguration incidentField(String incidentField) { + this.incidentField = JsonNullable.of(incidentField); + return this; + } + + /** + * The incident field to map to. + * + * @return incidentField + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getIncidentField() { + return incidentField.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCIDENT_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIncidentField_JsonNullable() { + return incidentField; + } + + @JsonProperty(JSON_PROPERTY_INCIDENT_FIELD) + public void setIncidentField_JsonNullable(JsonNullable incidentField) { + this.incidentField = incidentField; + } + + public void setIncidentField(String incidentField) { + this.incidentField = JsonNullable.of(incidentField); + } + + public IncidentJiraTemplateFieldConfiguration jiraFieldKey(String jiraFieldKey) { + this.jiraFieldKey = jiraFieldKey; + return this; + } + + /** + * The Jira field key. + * + * @return jiraFieldKey + */ + @JsonProperty(JSON_PROPERTY_JIRA_FIELD_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getJiraFieldKey() { + return jiraFieldKey; + } + + public void setJiraFieldKey(String jiraFieldKey) { + this.jiraFieldKey = jiraFieldKey; + } + + public IncidentJiraTemplateFieldConfiguration jiraFieldType(String jiraFieldType) { + this.jiraFieldType = JsonNullable.of(jiraFieldType); + return this; + } + + /** + * The type of the Jira field. + * + * @return jiraFieldType + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getJiraFieldType() { + return jiraFieldType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JIRA_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getJiraFieldType_JsonNullable() { + return jiraFieldType; + } + + @JsonProperty(JSON_PROPERTY_JIRA_FIELD_TYPE) + public void setJiraFieldType_JsonNullable(JsonNullable jiraFieldType) { + this.jiraFieldType = jiraFieldType; + } + + public void setJiraFieldType(String jiraFieldType) { + this.jiraFieldType = JsonNullable.of(jiraFieldType); + } + + public IncidentJiraTemplateFieldConfiguration syncDirection(String syncDirection) { + this.syncDirection = syncDirection; + return this; + } + + /** + * The direction of synchronization. + * + * @return syncDirection + */ + @JsonProperty(JSON_PROPERTY_SYNC_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSyncDirection() { + return syncDirection; + } + + public void setSyncDirection(String syncDirection) { + this.syncDirection = syncDirection; + } + + public IncidentJiraTemplateFieldConfiguration valueMapping(Map valueMapping) { + this.valueMapping = valueMapping; + return this; + } + + public IncidentJiraTemplateFieldConfiguration putValueMappingItem( + String key, String valueMappingItem) { + if (this.valueMapping == null) { + this.valueMapping = new HashMap<>(); + } + this.valueMapping.put(key, valueMappingItem); + return this; + } + + /** + * Mapping of values between incident and Jira fields. + * + * @return valueMapping + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE_MAPPING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getValueMapping() { + return valueMapping; + } + + public void setValueMapping(Map valueMapping) { + this.valueMapping = valueMapping; + } + + /** + * 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 IncidentJiraTemplateFieldConfiguration + */ + @JsonAnySetter + public IncidentJiraTemplateFieldConfiguration 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 IncidentJiraTemplateFieldConfiguration object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateFieldConfiguration incidentJiraTemplateFieldConfiguration = + (IncidentJiraTemplateFieldConfiguration) o; + return Objects.equals( + this.customOutboundValue, incidentJiraTemplateFieldConfiguration.customOutboundValue) + && Objects.equals(this.incidentField, incidentJiraTemplateFieldConfiguration.incidentField) + && Objects.equals(this.jiraFieldKey, incidentJiraTemplateFieldConfiguration.jiraFieldKey) + && Objects.equals(this.jiraFieldType, incidentJiraTemplateFieldConfiguration.jiraFieldType) + && Objects.equals(this.syncDirection, incidentJiraTemplateFieldConfiguration.syncDirection) + && Objects.equals(this.valueMapping, incidentJiraTemplateFieldConfiguration.valueMapping) + && Objects.equals( + this.additionalProperties, incidentJiraTemplateFieldConfiguration.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + customOutboundValue, + incidentField, + jiraFieldKey, + jiraFieldType, + syncDirection, + valueMapping, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateFieldConfiguration {\n"); + sb.append(" customOutboundValue: ") + .append(toIndentedString(customOutboundValue)) + .append("\n"); + sb.append(" incidentField: ").append(toIndentedString(incidentField)).append("\n"); + sb.append(" jiraFieldKey: ").append(toIndentedString(jiraFieldKey)).append("\n"); + sb.append(" jiraFieldType: ").append(toIndentedString(jiraFieldType)).append("\n"); + sb.append(" syncDirection: ").append(toIndentedString(syncDirection)).append("\n"); + sb.append(" valueMapping: ").append(toIndentedString(valueMapping)).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/IncidentJiraTemplateIncidentTypeRelationship.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateIncidentTypeRelationship.java new file mode 100644 index 00000000000..6b3ced586d4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateIncidentTypeRelationship.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; + +/** Relationship to an incident type. */ +@JsonPropertyOrder({IncidentJiraTemplateIncidentTypeRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateIncidentTypeRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentJiraTemplateIncidentTypeRelationshipData data; + + public IncidentJiraTemplateIncidentTypeRelationship() {} + + @JsonCreator + public IncidentJiraTemplateIncidentTypeRelationship( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentJiraTemplateIncidentTypeRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentJiraTemplateIncidentTypeRelationship data( + IncidentJiraTemplateIncidentTypeRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident type relationship data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraTemplateIncidentTypeRelationshipData getData() { + return data; + } + + public void setData(IncidentJiraTemplateIncidentTypeRelationshipData 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 IncidentJiraTemplateIncidentTypeRelationship + */ + @JsonAnySetter + public IncidentJiraTemplateIncidentTypeRelationship 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 IncidentJiraTemplateIncidentTypeRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateIncidentTypeRelationship incidentJiraTemplateIncidentTypeRelationship = + (IncidentJiraTemplateIncidentTypeRelationship) o; + return Objects.equals(this.data, incidentJiraTemplateIncidentTypeRelationship.data) + && Objects.equals( + this.additionalProperties, + incidentJiraTemplateIncidentTypeRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateIncidentTypeRelationship {\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/IncidentJiraTemplateIncidentTypeRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateIncidentTypeRelationshipData.java new file mode 100644 index 00000000000..269be8b7ca9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateIncidentTypeRelationshipData.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; + +/** Incident type relationship data. */ +@JsonPropertyOrder({ + IncidentJiraTemplateIncidentTypeRelationshipData.JSON_PROPERTY_ID, + IncidentJiraTemplateIncidentTypeRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateIncidentTypeRelationshipData { + @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 IncidentJiraTemplateIncidentTypeRelationshipData() {} + + @JsonCreator + public IncidentJiraTemplateIncidentTypeRelationshipData( + @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 IncidentJiraTemplateIncidentTypeRelationshipData id(UUID id) { + this.id = id; + return this; + } + + /** + * The incident type 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 IncidentJiraTemplateIncidentTypeRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * The incident type 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 IncidentJiraTemplateIncidentTypeRelationshipData + */ + @JsonAnySetter + public IncidentJiraTemplateIncidentTypeRelationshipData 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 IncidentJiraTemplateIncidentTypeRelationshipData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateIncidentTypeRelationshipData + incidentJiraTemplateIncidentTypeRelationshipData = + (IncidentJiraTemplateIncidentTypeRelationshipData) o; + return Objects.equals(this.id, incidentJiraTemplateIncidentTypeRelationshipData.id) + && Objects.equals(this.type, incidentJiraTemplateIncidentTypeRelationshipData.type) + && Objects.equals( + this.additionalProperties, + incidentJiraTemplateIncidentTypeRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateIncidentTypeRelationshipData {\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/IncidentJiraTemplateRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateRelationships.java new file mode 100644 index 00000000000..dcb18bd18ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateRelationships.java @@ -0,0 +1,139 @@ +/* + * 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 Jira template. */ +@JsonPropertyOrder({IncidentJiraTemplateRelationships.JSON_PROPERTY_INCIDENT_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_TYPE = "incident_type"; + private IncidentJiraTemplateIncidentTypeRelationship incidentType; + + public IncidentJiraTemplateRelationships incidentType( + IncidentJiraTemplateIncidentTypeRelationship 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 IncidentJiraTemplateIncidentTypeRelationship getIncidentType() { + return incidentType; + } + + public void setIncidentType(IncidentJiraTemplateIncidentTypeRelationship 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 IncidentJiraTemplateRelationships + */ + @JsonAnySetter + public IncidentJiraTemplateRelationships 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 IncidentJiraTemplateRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateRelationships incidentJiraTemplateRelationships = + (IncidentJiraTemplateRelationships) o; + return Objects.equals(this.incidentType, incidentJiraTemplateRelationships.incidentType) + && Objects.equals( + this.additionalProperties, incidentJiraTemplateRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateRelationships {\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/IncidentJiraTemplateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateRequest.java new file mode 100644 index 00000000000..ba8a4130025 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateRequest.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; + +/** Create or update request for an incident Jira template. */ +@JsonPropertyOrder({IncidentJiraTemplateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentJiraTemplateDataRequest data; + + public IncidentJiraTemplateRequest() {} + + @JsonCreator + public IncidentJiraTemplateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentJiraTemplateDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentJiraTemplateRequest data(IncidentJiraTemplateDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident Jira template data for a create or update request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraTemplateDataRequest getData() { + return data; + } + + public void setData(IncidentJiraTemplateDataRequest 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 IncidentJiraTemplateRequest + */ + @JsonAnySetter + public IncidentJiraTemplateRequest 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 IncidentJiraTemplateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateRequest incidentJiraTemplateRequest = (IncidentJiraTemplateRequest) o; + return Objects.equals(this.data, incidentJiraTemplateRequest.data) + && Objects.equals( + this.additionalProperties, incidentJiraTemplateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateRequest {\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/IncidentJiraTemplateResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateResponse.java new file mode 100644 index 00000000000..b1b4d4e2cfb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateResponse.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 Jira template. */ +@JsonPropertyOrder({IncidentJiraTemplateResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplateResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentJiraTemplateDataResponse data; + + public IncidentJiraTemplateResponse() {} + + @JsonCreator + public IncidentJiraTemplateResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentJiraTemplateDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentJiraTemplateResponse data(IncidentJiraTemplateDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Incident Jira template data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentJiraTemplateDataResponse getData() { + return data; + } + + public void setData(IncidentJiraTemplateDataResponse 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 IncidentJiraTemplateResponse + */ + @JsonAnySetter + public IncidentJiraTemplateResponse 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 IncidentJiraTemplateResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplateResponse incidentJiraTemplateResponse = (IncidentJiraTemplateResponse) o; + return Objects.equals(this.data, incidentJiraTemplateResponse.data) + && Objects.equals( + this.additionalProperties, incidentJiraTemplateResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplateResponse {\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/IncidentJiraTemplateType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateType.java new file mode 100644 index 00000000000..c1e43498b92 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplateType.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 Jira template resource type. */ +@JsonSerialize(using = IncidentJiraTemplateType.IncidentJiraTemplateTypeSerializer.class) +public class IncidentJiraTemplateType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incidents_jira_templates")); + + public static final IncidentJiraTemplateType INCIDENTS_JIRA_TEMPLATES = + new IncidentJiraTemplateType("incidents_jira_templates"); + + IncidentJiraTemplateType(String value) { + super(value, allowedValues); + } + + public static class IncidentJiraTemplateTypeSerializer + extends StdSerializer { + public IncidentJiraTemplateTypeSerializer(Class t) { + super(t); + } + + public IncidentJiraTemplateTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentJiraTemplateType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentJiraTemplateType fromValue(String value) { + return new IncidentJiraTemplateType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplatesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplatesResponse.java new file mode 100644 index 00000000000..8b36315a99e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentJiraTemplatesResponse.java @@ -0,0 +1,156 @@ +/* + * 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 Jira templates. */ +@JsonPropertyOrder({IncidentJiraTemplatesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentJiraTemplatesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentJiraTemplatesResponse() {} + + @JsonCreator + public IncidentJiraTemplatesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentJiraTemplatesResponse data(List data) { + this.data = data; + for (IncidentJiraTemplateDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentJiraTemplatesResponse addDataItem(IncidentJiraTemplateDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of incident Jira templates. + * + * @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 IncidentJiraTemplatesResponse + */ + @JsonAnySetter + public IncidentJiraTemplatesResponse 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 IncidentJiraTemplatesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentJiraTemplatesResponse incidentJiraTemplatesResponse = (IncidentJiraTemplatesResponse) o; + return Objects.equals(this.data, incidentJiraTemplatesResponse.data) + && Objects.equals( + this.additionalProperties, incidentJiraTemplatesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentJiraTemplatesResponse {\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/IncidentMSTeamsChannel.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMSTeamsChannel.java new file mode 100644 index 00000000000..e1be146731f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMSTeamsChannel.java @@ -0,0 +1,288 @@ +/* + * 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 Microsoft Teams channel associated with an incident. */ +@JsonPropertyOrder({ + IncidentMSTeamsChannel.JSON_PROPERTY_MS_CHANNEL_ID, + IncidentMSTeamsChannel.JSON_PROPERTY_MS_CHANNEL_NAME, + IncidentMSTeamsChannel.JSON_PROPERTY_MS_TEAM_ID, + IncidentMSTeamsChannel.JSON_PROPERTY_MS_TENANT_ID, + IncidentMSTeamsChannel.JSON_PROPERTY_REDIRECT_URL, + IncidentMSTeamsChannel.JSON_PROPERTY_TEAM_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMSTeamsChannel { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MS_CHANNEL_ID = "ms_channel_id"; + private String msChannelId; + + public static final String JSON_PROPERTY_MS_CHANNEL_NAME = "ms_channel_name"; + private String msChannelName; + + public static final String JSON_PROPERTY_MS_TEAM_ID = "ms_team_id"; + private String msTeamId; + + public static final String JSON_PROPERTY_MS_TENANT_ID = "ms_tenant_id"; + private String msTenantId; + + public static final String JSON_PROPERTY_REDIRECT_URL = "redirect_url"; + private String redirectUrl; + + public static final String JSON_PROPERTY_TEAM_NAME = "team_name"; + private String teamName; + + public IncidentMSTeamsChannel() {} + + @JsonCreator + public IncidentMSTeamsChannel( + @JsonProperty(required = true, value = JSON_PROPERTY_MS_CHANNEL_ID) String msChannelId, + @JsonProperty(required = true, value = JSON_PROPERTY_MS_CHANNEL_NAME) String msChannelName) { + this.msChannelId = msChannelId; + this.msChannelName = msChannelName; + } + + public IncidentMSTeamsChannel msChannelId(String msChannelId) { + this.msChannelId = msChannelId; + return this; + } + + /** + * The Teams channel identifier. + * + * @return msChannelId + */ + @JsonProperty(JSON_PROPERTY_MS_CHANNEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMsChannelId() { + return msChannelId; + } + + public void setMsChannelId(String msChannelId) { + this.msChannelId = msChannelId; + } + + public IncidentMSTeamsChannel msChannelName(String msChannelName) { + this.msChannelName = msChannelName; + return this; + } + + /** + * The name of the Teams channel. + * + * @return msChannelName + */ + @JsonProperty(JSON_PROPERTY_MS_CHANNEL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMsChannelName() { + return msChannelName; + } + + public void setMsChannelName(String msChannelName) { + this.msChannelName = msChannelName; + } + + public IncidentMSTeamsChannel msTeamId(String msTeamId) { + this.msTeamId = msTeamId; + return this; + } + + /** + * The Teams team identifier. + * + * @return msTeamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MS_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMsTeamId() { + return msTeamId; + } + + public void setMsTeamId(String msTeamId) { + this.msTeamId = msTeamId; + } + + public IncidentMSTeamsChannel msTenantId(String msTenantId) { + this.msTenantId = msTenantId; + return this; + } + + /** + * The Teams tenant identifier. + * + * @return msTenantId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MS_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMsTenantId() { + return msTenantId; + } + + public void setMsTenantId(String msTenantId) { + this.msTenantId = msTenantId; + } + + public IncidentMSTeamsChannel redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + * The redirect URL for the channel. + * + * @return redirectUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public IncidentMSTeamsChannel teamName(String teamName) { + this.teamName = teamName; + return this; + } + + /** + * The name of the Teams team. + * + * @return teamName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTeamName() { + return teamName; + } + + public void setTeamName(String teamName) { + this.teamName = teamName; + } + + /** + * 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 IncidentMSTeamsChannel + */ + @JsonAnySetter + public IncidentMSTeamsChannel 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 IncidentMSTeamsChannel object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMSTeamsChannel incidentMsTeamsChannel = (IncidentMSTeamsChannel) o; + return Objects.equals(this.msChannelId, incidentMsTeamsChannel.msChannelId) + && Objects.equals(this.msChannelName, incidentMsTeamsChannel.msChannelName) + && Objects.equals(this.msTeamId, incidentMsTeamsChannel.msTeamId) + && Objects.equals(this.msTenantId, incidentMsTeamsChannel.msTenantId) + && Objects.equals(this.redirectUrl, incidentMsTeamsChannel.redirectUrl) + && Objects.equals(this.teamName, incidentMsTeamsChannel.teamName) + && Objects.equals(this.additionalProperties, incidentMsTeamsChannel.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + msChannelId, + msChannelName, + msTeamId, + msTenantId, + redirectUrl, + teamName, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMSTeamsChannel {\n"); + sb.append(" msChannelId: ").append(toIndentedString(msChannelId)).append("\n"); + sb.append(" msChannelName: ").append(toIndentedString(msChannelName)).append("\n"); + sb.append(" msTeamId: ").append(toIndentedString(msTeamId)).append("\n"); + sb.append(" msTenantId: ").append(toIndentedString(msTenantId)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" teamName: ").append(toIndentedString(teamName)).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/IncidentMSTeamsIntegrationDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMSTeamsIntegrationDataAttributes.java new file mode 100644 index 00000000000..649400642e9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMSTeamsIntegrationDataAttributes.java @@ -0,0 +1,274 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Microsoft Teams integration metadata. */ +@JsonPropertyOrder({ + IncidentMSTeamsIntegrationDataAttributes.JSON_PROPERTY_CREATED, + IncidentMSTeamsIntegrationDataAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + IncidentMSTeamsIntegrationDataAttributes.JSON_PROPERTY_MODIFIED, + IncidentMSTeamsIntegrationDataAttributes.JSON_PROPERTY_STATUS, + IncidentMSTeamsIntegrationDataAttributes.JSON_PROPERTY_TEAMS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMSTeamsIntegrationDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private String integrationType; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_TEAMS = "teams"; + private List teams = new ArrayList<>(); + + public IncidentMSTeamsIntegrationDataAttributes() {} + + @JsonCreator + public IncidentMSTeamsIntegrationDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) String integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status, + @JsonProperty(required = true, value = JSON_PROPERTY_TEAMS) + List teams) { + this.created = created; + this.integrationType = integrationType; + this.modified = modified; + this.status = status; + this.teams = teams; + } + + public IncidentMSTeamsIntegrationDataAttributes created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the integration 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 IncidentMSTeamsIntegrationDataAttributes integrationType(String integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + * The type of integration. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(String integrationType) { + this.integrationType = integrationType; + } + + public IncidentMSTeamsIntegrationDataAttributes modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the integration 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 IncidentMSTeamsIntegrationDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The status of the integration. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public IncidentMSTeamsIntegrationDataAttributes teams(List teams) { + this.teams = teams; + for (IncidentMSTeamsChannel item : teams) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentMSTeamsIntegrationDataAttributes addTeamsItem(IncidentMSTeamsChannel teamsItem) { + this.teams.add(teamsItem); + this.unparsed |= teamsItem.unparsed; + return this; + } + + /** + * List of Microsoft Teams channels. + * + * @return teams + */ + @JsonProperty(JSON_PROPERTY_TEAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTeams() { + return teams; + } + + public void setTeams(List teams) { + this.teams = teams; + } + + /** + * 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 IncidentMSTeamsIntegrationDataAttributes + */ + @JsonAnySetter + public IncidentMSTeamsIntegrationDataAttributes 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 IncidentMSTeamsIntegrationDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMSTeamsIntegrationDataAttributes incidentMsTeamsIntegrationDataAttributes = + (IncidentMSTeamsIntegrationDataAttributes) o; + return Objects.equals(this.created, incidentMsTeamsIntegrationDataAttributes.created) + && Objects.equals( + this.integrationType, incidentMsTeamsIntegrationDataAttributes.integrationType) + && Objects.equals(this.modified, incidentMsTeamsIntegrationDataAttributes.modified) + && Objects.equals(this.status, incidentMsTeamsIntegrationDataAttributes.status) + && Objects.equals(this.teams, incidentMsTeamsIntegrationDataAttributes.teams) + && Objects.equals( + this.additionalProperties, + incidentMsTeamsIntegrationDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(created, integrationType, modified, status, teams, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMSTeamsIntegrationDataAttributes {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" teams: ").append(toIndentedString(teams)).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/IncidentMSTeamsIntegrationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMSTeamsIntegrationDataResponse.java new file mode 100644 index 00000000000..649ac2d3711 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMSTeamsIntegrationDataResponse.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; + +/** Microsoft Teams integration data in a response. */ +@JsonPropertyOrder({ + IncidentMSTeamsIntegrationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentMSTeamsIntegrationDataResponse.JSON_PROPERTY_ID, + IncidentMSTeamsIntegrationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMSTeamsIntegrationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentMSTeamsIntegrationDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentMicrosoftTeamsIntegrationType type; + + public IncidentMSTeamsIntegrationDataResponse() {} + + @JsonCreator + public IncidentMSTeamsIntegrationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentMSTeamsIntegrationDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentMicrosoftTeamsIntegrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentMSTeamsIntegrationDataResponse attributes( + IncidentMSTeamsIntegrationDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Microsoft Teams integration metadata. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentMSTeamsIntegrationDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentMSTeamsIntegrationDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentMSTeamsIntegrationDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The integration 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 IncidentMSTeamsIntegrationDataResponse type(IncidentMicrosoftTeamsIntegrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentMicrosoftTeamsIntegrationType getType() { + return type; + } + + public void setType(IncidentMicrosoftTeamsIntegrationType 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 IncidentMSTeamsIntegrationDataResponse + */ + @JsonAnySetter + public IncidentMSTeamsIntegrationDataResponse 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 IncidentMSTeamsIntegrationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMSTeamsIntegrationDataResponse incidentMsTeamsIntegrationDataResponse = + (IncidentMSTeamsIntegrationDataResponse) o; + return Objects.equals(this.attributes, incidentMsTeamsIntegrationDataResponse.attributes) + && Objects.equals(this.id, incidentMsTeamsIntegrationDataResponse.id) + && Objects.equals(this.type, incidentMsTeamsIntegrationDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentMsTeamsIntegrationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMSTeamsIntegrationDataResponse {\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/IncidentMSTeamsIntegrationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMSTeamsIntegrationResponse.java new file mode 100644 index 00000000000..1dc5168ee76 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMSTeamsIntegrationResponse.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; + +/** Response with Microsoft Teams integration metadata. */ +@JsonPropertyOrder({IncidentMSTeamsIntegrationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMSTeamsIntegrationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentMSTeamsIntegrationDataResponse data; + + public IncidentMSTeamsIntegrationResponse() {} + + @JsonCreator + public IncidentMSTeamsIntegrationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentMSTeamsIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentMSTeamsIntegrationResponse data(IncidentMSTeamsIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Microsoft Teams integration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentMSTeamsIntegrationDataResponse getData() { + return data; + } + + public void setData(IncidentMSTeamsIntegrationDataResponse 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 IncidentMSTeamsIntegrationResponse + */ + @JsonAnySetter + public IncidentMSTeamsIntegrationResponse 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 IncidentMSTeamsIntegrationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMSTeamsIntegrationResponse incidentMsTeamsIntegrationResponse = + (IncidentMSTeamsIntegrationResponse) o; + return Objects.equals(this.data, incidentMsTeamsIntegrationResponse.data) + && Objects.equals( + this.additionalProperties, incidentMsTeamsIntegrationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMSTeamsIntegrationResponse {\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/IncidentMicrosoftTeamsConfigurationDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationDataAttributesRequest.java new file mode 100644 index 00000000000..bc2649babbb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationDataAttributesRequest.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.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating or updating a Microsoft Teams configuration. */ +@JsonPropertyOrder({ + IncidentMicrosoftTeamsConfigurationDataAttributesRequest.JSON_PROPERTY_MANUAL_MEETING_CREATION, + IncidentMicrosoftTeamsConfigurationDataAttributesRequest.JSON_PROPERTY_POST_MEETING_SUMMARY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMicrosoftTeamsConfigurationDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MANUAL_MEETING_CREATION = "manual_meeting_creation"; + private Boolean manualMeetingCreation; + + public static final String JSON_PROPERTY_POST_MEETING_SUMMARY = "post_meeting_summary"; + private Boolean postMeetingSummary; + + public IncidentMicrosoftTeamsConfigurationDataAttributesRequest manualMeetingCreation( + Boolean manualMeetingCreation) { + this.manualMeetingCreation = manualMeetingCreation; + return this; + } + + /** + * Whether manual meeting creation is enabled. + * + * @return manualMeetingCreation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MANUAL_MEETING_CREATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getManualMeetingCreation() { + return manualMeetingCreation; + } + + public void setManualMeetingCreation(Boolean manualMeetingCreation) { + this.manualMeetingCreation = manualMeetingCreation; + } + + public IncidentMicrosoftTeamsConfigurationDataAttributesRequest postMeetingSummary( + Boolean postMeetingSummary) { + this.postMeetingSummary = postMeetingSummary; + return this; + } + + /** + * Whether post-meeting summary is enabled. + * + * @return postMeetingSummary + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POST_MEETING_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPostMeetingSummary() { + return postMeetingSummary; + } + + public void setPostMeetingSummary(Boolean postMeetingSummary) { + this.postMeetingSummary = postMeetingSummary; + } + + /** + * 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 IncidentMicrosoftTeamsConfigurationDataAttributesRequest + */ + @JsonAnySetter + public IncidentMicrosoftTeamsConfigurationDataAttributesRequest 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 IncidentMicrosoftTeamsConfigurationDataAttributesRequest object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMicrosoftTeamsConfigurationDataAttributesRequest + incidentMicrosoftTeamsConfigurationDataAttributesRequest = + (IncidentMicrosoftTeamsConfigurationDataAttributesRequest) o; + return Objects.equals( + this.manualMeetingCreation, + incidentMicrosoftTeamsConfigurationDataAttributesRequest.manualMeetingCreation) + && Objects.equals( + this.postMeetingSummary, + incidentMicrosoftTeamsConfigurationDataAttributesRequest.postMeetingSummary) + && Objects.equals( + this.additionalProperties, + incidentMicrosoftTeamsConfigurationDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(manualMeetingCreation, postMeetingSummary, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMicrosoftTeamsConfigurationDataAttributesRequest {\n"); + sb.append(" manualMeetingCreation: ") + .append(toIndentedString(manualMeetingCreation)) + .append("\n"); + sb.append(" postMeetingSummary: ").append(toIndentedString(postMeetingSummary)).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/IncidentMicrosoftTeamsConfigurationDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationDataAttributesResponse.java new file mode 100644 index 00000000000..ac068e3b6b4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationDataAttributesResponse.java @@ -0,0 +1,253 @@ +/* + * 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 Microsoft Teams configuration. */ +@JsonPropertyOrder({ + IncidentMicrosoftTeamsConfigurationDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + IncidentMicrosoftTeamsConfigurationDataAttributesResponse.JSON_PROPERTY_MANUAL_MEETING_CREATION, + IncidentMicrosoftTeamsConfigurationDataAttributesResponse.JSON_PROPERTY_MODIFIED_AT, + IncidentMicrosoftTeamsConfigurationDataAttributesResponse.JSON_PROPERTY_POST_MEETING_SUMMARY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMicrosoftTeamsConfigurationDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MANUAL_MEETING_CREATION = "manual_meeting_creation"; + private Boolean manualMeetingCreation; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_POST_MEETING_SUMMARY = "post_meeting_summary"; + private Boolean postMeetingSummary; + + public IncidentMicrosoftTeamsConfigurationDataAttributesResponse() {} + + @JsonCreator + public IncidentMicrosoftTeamsConfigurationDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MANUAL_MEETING_CREATION) + Boolean manualMeetingCreation, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_POST_MEETING_SUMMARY) + Boolean postMeetingSummary) { + this.createdAt = createdAt; + this.manualMeetingCreation = manualMeetingCreation; + this.modifiedAt = modifiedAt; + this.postMeetingSummary = postMeetingSummary; + } + + public IncidentMicrosoftTeamsConfigurationDataAttributesResponse 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 IncidentMicrosoftTeamsConfigurationDataAttributesResponse manualMeetingCreation( + Boolean manualMeetingCreation) { + this.manualMeetingCreation = manualMeetingCreation; + return this; + } + + /** + * Whether manual meeting creation is enabled. + * + * @return manualMeetingCreation + */ + @JsonProperty(JSON_PROPERTY_MANUAL_MEETING_CREATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getManualMeetingCreation() { + return manualMeetingCreation; + } + + public void setManualMeetingCreation(Boolean manualMeetingCreation) { + this.manualMeetingCreation = manualMeetingCreation; + } + + public IncidentMicrosoftTeamsConfigurationDataAttributesResponse 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 IncidentMicrosoftTeamsConfigurationDataAttributesResponse postMeetingSummary( + Boolean postMeetingSummary) { + this.postMeetingSummary = postMeetingSummary; + return this; + } + + /** + * Whether post-meeting summary is enabled. + * + * @return postMeetingSummary + */ + @JsonProperty(JSON_PROPERTY_POST_MEETING_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getPostMeetingSummary() { + return postMeetingSummary; + } + + public void setPostMeetingSummary(Boolean postMeetingSummary) { + this.postMeetingSummary = postMeetingSummary; + } + + /** + * 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 IncidentMicrosoftTeamsConfigurationDataAttributesResponse + */ + @JsonAnySetter + public IncidentMicrosoftTeamsConfigurationDataAttributesResponse 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 IncidentMicrosoftTeamsConfigurationDataAttributesResponse object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMicrosoftTeamsConfigurationDataAttributesResponse + incidentMicrosoftTeamsConfigurationDataAttributesResponse = + (IncidentMicrosoftTeamsConfigurationDataAttributesResponse) o; + return Objects.equals( + this.createdAt, incidentMicrosoftTeamsConfigurationDataAttributesResponse.createdAt) + && Objects.equals( + this.manualMeetingCreation, + incidentMicrosoftTeamsConfigurationDataAttributesResponse.manualMeetingCreation) + && Objects.equals( + this.modifiedAt, incidentMicrosoftTeamsConfigurationDataAttributesResponse.modifiedAt) + && Objects.equals( + this.postMeetingSummary, + incidentMicrosoftTeamsConfigurationDataAttributesResponse.postMeetingSummary) + && Objects.equals( + this.additionalProperties, + incidentMicrosoftTeamsConfigurationDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, manualMeetingCreation, modifiedAt, postMeetingSummary, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMicrosoftTeamsConfigurationDataAttributesResponse {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" manualMeetingCreation: ") + .append(toIndentedString(manualMeetingCreation)) + .append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" postMeetingSummary: ").append(toIndentedString(postMeetingSummary)).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/IncidentMicrosoftTeamsConfigurationDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationDataRequest.java new file mode 100644 index 00000000000..e8850d15738 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationDataRequest.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.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Microsoft Teams configuration data for a request. */ +@JsonPropertyOrder({ + IncidentMicrosoftTeamsConfigurationDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentMicrosoftTeamsConfigurationDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMicrosoftTeamsConfigurationDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentMicrosoftTeamsConfigurationDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentMicrosoftTeamsConfigurationType type; + + public IncidentMicrosoftTeamsConfigurationDataRequest() {} + + @JsonCreator + public IncidentMicrosoftTeamsConfigurationDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentMicrosoftTeamsConfigurationDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentMicrosoftTeamsConfigurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentMicrosoftTeamsConfigurationDataRequest attributes( + IncidentMicrosoftTeamsConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a Microsoft Teams configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentMicrosoftTeamsConfigurationDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentMicrosoftTeamsConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentMicrosoftTeamsConfigurationDataRequest type( + IncidentMicrosoftTeamsConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Microsoft Teams configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentMicrosoftTeamsConfigurationType getType() { + return type; + } + + public void setType(IncidentMicrosoftTeamsConfigurationType 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 IncidentMicrosoftTeamsConfigurationDataRequest + */ + @JsonAnySetter + public IncidentMicrosoftTeamsConfigurationDataRequest 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 IncidentMicrosoftTeamsConfigurationDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMicrosoftTeamsConfigurationDataRequest incidentMicrosoftTeamsConfigurationDataRequest = + (IncidentMicrosoftTeamsConfigurationDataRequest) o; + return Objects.equals( + this.attributes, incidentMicrosoftTeamsConfigurationDataRequest.attributes) + && Objects.equals(this.type, incidentMicrosoftTeamsConfigurationDataRequest.type) + && Objects.equals( + this.additionalProperties, + incidentMicrosoftTeamsConfigurationDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMicrosoftTeamsConfigurationDataRequest {\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/IncidentMicrosoftTeamsConfigurationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationDataResponse.java new file mode 100644 index 00000000000..56d93da193d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationDataResponse.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 java.util.UUID; + +/** Microsoft Teams configuration data in a response. */ +@JsonPropertyOrder({ + IncidentMicrosoftTeamsConfigurationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentMicrosoftTeamsConfigurationDataResponse.JSON_PROPERTY_ID, + IncidentMicrosoftTeamsConfigurationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMicrosoftTeamsConfigurationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentMicrosoftTeamsConfigurationDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentMicrosoftTeamsConfigurationType type; + + public IncidentMicrosoftTeamsConfigurationDataResponse() {} + + @JsonCreator + public IncidentMicrosoftTeamsConfigurationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentMicrosoftTeamsConfigurationDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentMicrosoftTeamsConfigurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentMicrosoftTeamsConfigurationDataResponse attributes( + IncidentMicrosoftTeamsConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Microsoft Teams configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentMicrosoftTeamsConfigurationDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentMicrosoftTeamsConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentMicrosoftTeamsConfigurationDataResponse 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 IncidentMicrosoftTeamsConfigurationDataResponse type( + IncidentMicrosoftTeamsConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Microsoft Teams configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentMicrosoftTeamsConfigurationType getType() { + return type; + } + + public void setType(IncidentMicrosoftTeamsConfigurationType 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 IncidentMicrosoftTeamsConfigurationDataResponse + */ + @JsonAnySetter + public IncidentMicrosoftTeamsConfigurationDataResponse 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 IncidentMicrosoftTeamsConfigurationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMicrosoftTeamsConfigurationDataResponse + incidentMicrosoftTeamsConfigurationDataResponse = + (IncidentMicrosoftTeamsConfigurationDataResponse) o; + return Objects.equals( + this.attributes, incidentMicrosoftTeamsConfigurationDataResponse.attributes) + && Objects.equals(this.id, incidentMicrosoftTeamsConfigurationDataResponse.id) + && Objects.equals(this.type, incidentMicrosoftTeamsConfigurationDataResponse.type) + && Objects.equals( + this.additionalProperties, + incidentMicrosoftTeamsConfigurationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMicrosoftTeamsConfigurationDataResponse {\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/IncidentMicrosoftTeamsConfigurationRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationRequest.java new file mode 100644 index 00000000000..2d47d8f9814 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationRequest.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 to create or update a Microsoft Teams configuration. */ +@JsonPropertyOrder({IncidentMicrosoftTeamsConfigurationRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMicrosoftTeamsConfigurationRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentMicrosoftTeamsConfigurationDataRequest data; + + public IncidentMicrosoftTeamsConfigurationRequest() {} + + @JsonCreator + public IncidentMicrosoftTeamsConfigurationRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentMicrosoftTeamsConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentMicrosoftTeamsConfigurationRequest data( + IncidentMicrosoftTeamsConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Microsoft Teams configuration data for a request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentMicrosoftTeamsConfigurationDataRequest getData() { + return data; + } + + public void setData(IncidentMicrosoftTeamsConfigurationDataRequest 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 IncidentMicrosoftTeamsConfigurationRequest + */ + @JsonAnySetter + public IncidentMicrosoftTeamsConfigurationRequest 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 IncidentMicrosoftTeamsConfigurationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMicrosoftTeamsConfigurationRequest incidentMicrosoftTeamsConfigurationRequest = + (IncidentMicrosoftTeamsConfigurationRequest) o; + return Objects.equals(this.data, incidentMicrosoftTeamsConfigurationRequest.data) + && Objects.equals( + this.additionalProperties, + incidentMicrosoftTeamsConfigurationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMicrosoftTeamsConfigurationRequest {\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/IncidentMicrosoftTeamsConfigurationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationResponse.java new file mode 100644 index 00000000000..186f9c81b5c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationResponse.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; + +/** Response with a Microsoft Teams configuration. */ +@JsonPropertyOrder({IncidentMicrosoftTeamsConfigurationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentMicrosoftTeamsConfigurationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentMicrosoftTeamsConfigurationDataResponse data; + + public IncidentMicrosoftTeamsConfigurationResponse() {} + + @JsonCreator + public IncidentMicrosoftTeamsConfigurationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentMicrosoftTeamsConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentMicrosoftTeamsConfigurationResponse data( + IncidentMicrosoftTeamsConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Microsoft Teams configuration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentMicrosoftTeamsConfigurationDataResponse getData() { + return data; + } + + public void setData(IncidentMicrosoftTeamsConfigurationDataResponse 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 IncidentMicrosoftTeamsConfigurationResponse + */ + @JsonAnySetter + public IncidentMicrosoftTeamsConfigurationResponse 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 IncidentMicrosoftTeamsConfigurationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentMicrosoftTeamsConfigurationResponse incidentMicrosoftTeamsConfigurationResponse = + (IncidentMicrosoftTeamsConfigurationResponse) o; + return Objects.equals(this.data, incidentMicrosoftTeamsConfigurationResponse.data) + && Objects.equals( + this.additionalProperties, + incidentMicrosoftTeamsConfigurationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentMicrosoftTeamsConfigurationResponse {\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/IncidentMicrosoftTeamsConfigurationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationType.java new file mode 100644 index 00000000000..845363b1a2e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsConfigurationType.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; + +/** Microsoft Teams configuration resource type. */ +@JsonSerialize( + using = + IncidentMicrosoftTeamsConfigurationType.IncidentMicrosoftTeamsConfigurationTypeSerializer + .class) +public class IncidentMicrosoftTeamsConfigurationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("microsoft_teams_configurations")); + + public static final IncidentMicrosoftTeamsConfigurationType MICROSOFT_TEAMS_CONFIGURATIONS = + new IncidentMicrosoftTeamsConfigurationType("microsoft_teams_configurations"); + + IncidentMicrosoftTeamsConfigurationType(String value) { + super(value, allowedValues); + } + + public static class IncidentMicrosoftTeamsConfigurationTypeSerializer + extends StdSerializer { + public IncidentMicrosoftTeamsConfigurationTypeSerializer( + Class t) { + super(t); + } + + public IncidentMicrosoftTeamsConfigurationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentMicrosoftTeamsConfigurationType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentMicrosoftTeamsConfigurationType fromValue(String value) { + return new IncidentMicrosoftTeamsConfigurationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsIntegrationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsIntegrationType.java new file mode 100644 index 00000000000..2386b22b6aa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentMicrosoftTeamsIntegrationType.java @@ -0,0 +1,62 @@ +/* + * 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 integration resource type. */ +@JsonSerialize( + using = + IncidentMicrosoftTeamsIntegrationType.IncidentMicrosoftTeamsIntegrationTypeSerializer.class) +public class IncidentMicrosoftTeamsIntegrationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_integrations")); + + public static final IncidentMicrosoftTeamsIntegrationType INCIDENT_INTEGRATIONS = + new IncidentMicrosoftTeamsIntegrationType("incident_integrations"); + + IncidentMicrosoftTeamsIntegrationType(String value) { + super(value, allowedValues); + } + + public static class IncidentMicrosoftTeamsIntegrationTypeSerializer + extends StdSerializer { + public IncidentMicrosoftTeamsIntegrationTypeSerializer( + Class t) { + super(t); + } + + public IncidentMicrosoftTeamsIntegrationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentMicrosoftTeamsIntegrationType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentMicrosoftTeamsIntegrationType fromValue(String value) { + return new IncidentMicrosoftTeamsIntegrationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyIncidentDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyIncidentDataResponse.java new file mode 100644 index 00000000000..7af7e74f080 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyIncidentDataResponse.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; + +/** Incident data related to a PagerDuty incident. */ +@JsonPropertyOrder({ + IncidentPagerdutyIncidentDataResponse.JSON_PROPERTY_ID, + IncidentPagerdutyIncidentDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPagerdutyIncidentDataResponse { + @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 IncidentPagerdutyIncidentDataResponse() {} + + @JsonCreator + public IncidentPagerdutyIncidentDataResponse( + @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 IncidentPagerdutyIncidentDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The Datadog 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 IncidentPagerdutyIncidentDataResponse type(String type) { + this.type = type; + return this; + } + + /** + * The incident 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 IncidentPagerdutyIncidentDataResponse + */ + @JsonAnySetter + public IncidentPagerdutyIncidentDataResponse 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 IncidentPagerdutyIncidentDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPagerdutyIncidentDataResponse incidentPagerdutyIncidentDataResponse = + (IncidentPagerdutyIncidentDataResponse) o; + return Objects.equals(this.id, incidentPagerdutyIncidentDataResponse.id) + && Objects.equals(this.type, incidentPagerdutyIncidentDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentPagerdutyIncidentDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPagerdutyIncidentDataResponse {\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/IncidentPagerdutyRelatedIncidentsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyRelatedIncidentsResponse.java new file mode 100644 index 00000000000..01554f65c01 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyRelatedIncidentsResponse.java @@ -0,0 +1,160 @@ +/* + * 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 Datadog incidents related to a PagerDuty incident. */ +@JsonPropertyOrder({IncidentPagerdutyRelatedIncidentsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPagerdutyRelatedIncidentsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentPagerdutyRelatedIncidentsResponse() {} + + @JsonCreator + public IncidentPagerdutyRelatedIncidentsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentPagerdutyRelatedIncidentsResponse data( + List data) { + this.data = data; + for (IncidentPagerdutyIncidentDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentPagerdutyRelatedIncidentsResponse addDataItem( + IncidentPagerdutyIncidentDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of related Datadog incidents. + * + * @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 IncidentPagerdutyRelatedIncidentsResponse + */ + @JsonAnySetter + public IncidentPagerdutyRelatedIncidentsResponse 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 IncidentPagerdutyRelatedIncidentsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPagerdutyRelatedIncidentsResponse incidentPagerdutyRelatedIncidentsResponse = + (IncidentPagerdutyRelatedIncidentsResponse) o; + return Objects.equals(this.data, incidentPagerdutyRelatedIncidentsResponse.data) + && Objects.equals( + this.additionalProperties, + incidentPagerdutyRelatedIncidentsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPagerdutyRelatedIncidentsResponse {\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/IncidentPagerdutyServiceData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyServiceData.java new file mode 100644 index 00000000000..09110c6f45d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyServiceData.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; + +/** PagerDuty service data. */ +@JsonPropertyOrder({ + IncidentPagerdutyServiceData.JSON_PROPERTY_ATTRIBUTES, + IncidentPagerdutyServiceData.JSON_PROPERTY_ID, + IncidentPagerdutyServiceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPagerdutyServiceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentPagerdutyServiceDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentPagerdutyServiceType type; + + public IncidentPagerdutyServiceData() {} + + @JsonCreator + public IncidentPagerdutyServiceData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentPagerdutyServiceDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentPagerdutyServiceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentPagerdutyServiceData attributes( + IncidentPagerdutyServiceDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a PagerDuty service. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentPagerdutyServiceDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentPagerdutyServiceDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentPagerdutyServiceData id(String id) { + this.id = id; + return this; + } + + /** + * The PagerDuty service identifier. + * + * @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 IncidentPagerdutyServiceData type(IncidentPagerdutyServiceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * PagerDuty service resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentPagerdutyServiceType getType() { + return type; + } + + public void setType(IncidentPagerdutyServiceType 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 IncidentPagerdutyServiceData + */ + @JsonAnySetter + public IncidentPagerdutyServiceData 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 IncidentPagerdutyServiceData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPagerdutyServiceData incidentPagerdutyServiceData = (IncidentPagerdutyServiceData) o; + return Objects.equals(this.attributes, incidentPagerdutyServiceData.attributes) + && Objects.equals(this.id, incidentPagerdutyServiceData.id) + && Objects.equals(this.type, incidentPagerdutyServiceData.type) + && Objects.equals( + this.additionalProperties, incidentPagerdutyServiceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPagerdutyServiceData {\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/IncidentPagerdutyServiceDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyServiceDataAttributes.java new file mode 100644 index 00000000000..470c4e35d20 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyServiceDataAttributes.java @@ -0,0 +1,233 @@ +/* + * 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 of a PagerDuty service. */ +@JsonPropertyOrder({ + IncidentPagerdutyServiceDataAttributes.JSON_PROPERTY_HANDLE, + IncidentPagerdutyServiceDataAttributes.JSON_PROPERTY_NAME, + IncidentPagerdutyServiceDataAttributes.JSON_PROPERTY_SERVICE_ID, + IncidentPagerdutyServiceDataAttributes.JSON_PROPERTY_WEBHOOKS_ENABLED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPagerdutyServiceDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SERVICE_ID = "service_id"; + private String serviceId; + + public static final String JSON_PROPERTY_WEBHOOKS_ENABLED = "webhooks_enabled"; + private Boolean webhooksEnabled; + + public IncidentPagerdutyServiceDataAttributes() {} + + @JsonCreator + public IncidentPagerdutyServiceDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE_ID) String serviceId, + @JsonProperty(required = true, value = JSON_PROPERTY_WEBHOOKS_ENABLED) + Boolean webhooksEnabled) { + this.handle = handle; + this.name = name; + this.serviceId = serviceId; + this.webhooksEnabled = webhooksEnabled; + } + + public IncidentPagerdutyServiceDataAttributes handle(String handle) { + this.handle = handle; + return this; + } + + /** + * The handle for the PagerDuty service. + * + * @return handle + */ + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public IncidentPagerdutyServiceDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the PagerDuty service. + * + * @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 IncidentPagerdutyServiceDataAttributes serviceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * The PagerDuty service identifier. + * + * @return serviceId + */ + @JsonProperty(JSON_PROPERTY_SERVICE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getServiceId() { + return serviceId; + } + + public void setServiceId(String serviceId) { + this.serviceId = serviceId; + } + + public IncidentPagerdutyServiceDataAttributes webhooksEnabled(Boolean webhooksEnabled) { + this.webhooksEnabled = webhooksEnabled; + return this; + } + + /** + * Whether webhooks are enabled for this service. + * + * @return webhooksEnabled + */ + @JsonProperty(JSON_PROPERTY_WEBHOOKS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getWebhooksEnabled() { + return webhooksEnabled; + } + + public void setWebhooksEnabled(Boolean webhooksEnabled) { + this.webhooksEnabled = webhooksEnabled; + } + + /** + * 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 IncidentPagerdutyServiceDataAttributes + */ + @JsonAnySetter + public IncidentPagerdutyServiceDataAttributes 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 IncidentPagerdutyServiceDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPagerdutyServiceDataAttributes incidentPagerdutyServiceDataAttributes = + (IncidentPagerdutyServiceDataAttributes) o; + return Objects.equals(this.handle, incidentPagerdutyServiceDataAttributes.handle) + && Objects.equals(this.name, incidentPagerdutyServiceDataAttributes.name) + && Objects.equals(this.serviceId, incidentPagerdutyServiceDataAttributes.serviceId) + && Objects.equals( + this.webhooksEnabled, incidentPagerdutyServiceDataAttributes.webhooksEnabled) + && Objects.equals( + this.additionalProperties, incidentPagerdutyServiceDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(handle, name, serviceId, webhooksEnabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPagerdutyServiceDataAttributes {\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" serviceId: ").append(toIndentedString(serviceId)).append("\n"); + sb.append(" webhooksEnabled: ").append(toIndentedString(webhooksEnabled)).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/IncidentPagerdutyServiceType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyServiceType.java new file mode 100644 index 00000000000..c3750517c91 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyServiceType.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; + +/** PagerDuty service resource type. */ +@JsonSerialize(using = IncidentPagerdutyServiceType.IncidentPagerdutyServiceTypeSerializer.class) +public class IncidentPagerdutyServiceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("pagerduty_service")); + + public static final IncidentPagerdutyServiceType PAGERDUTY_SERVICE = + new IncidentPagerdutyServiceType("pagerduty_service"); + + IncidentPagerdutyServiceType(String value) { + super(value, allowedValues); + } + + public static class IncidentPagerdutyServiceTypeSerializer + extends StdSerializer { + public IncidentPagerdutyServiceTypeSerializer(Class t) { + super(t); + } + + public IncidentPagerdutyServiceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentPagerdutyServiceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentPagerdutyServiceType fromValue(String value) { + return new IncidentPagerdutyServiceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyServicesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyServicesResponse.java new file mode 100644 index 00000000000..635149e49bf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPagerdutyServicesResponse.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 PagerDuty services. */ +@JsonPropertyOrder({IncidentPagerdutyServicesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentPagerdutyServicesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentPagerdutyServicesResponse() {} + + @JsonCreator + public IncidentPagerdutyServicesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentPagerdutyServicesResponse data(List data) { + this.data = data; + for (IncidentPagerdutyServiceData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentPagerdutyServicesResponse addDataItem(IncidentPagerdutyServiceData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of PagerDuty services. + * + * @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 IncidentPagerdutyServicesResponse + */ + @JsonAnySetter + public IncidentPagerdutyServicesResponse 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 IncidentPagerdutyServicesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentPagerdutyServicesResponse incidentPagerdutyServicesResponse = + (IncidentPagerdutyServicesResponse) o; + return Objects.equals(this.data, incidentPagerdutyServicesResponse.data) + && Objects.equals( + this.additionalProperties, incidentPagerdutyServicesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentPagerdutyServicesResponse {\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/IncidentRenderTemplateDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderTemplateDataAttributesRequest.java new file mode 100644 index 00000000000..d3c8ab4da75 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderTemplateDataAttributesRequest.java @@ -0,0 +1,282 @@ +/* + * 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 rendering a template. */ +@JsonPropertyOrder({ + IncidentRenderTemplateDataAttributesRequest.JSON_PROPERTY_CONTENT, + IncidentRenderTemplateDataAttributesRequest.JSON_PROPERTY_DATETIME_FORMAT, + IncidentRenderTemplateDataAttributesRequest.JSON_PROPERTY_TIMEZONE, + IncidentRenderTemplateDataAttributesRequest.JSON_PROPERTY_VALIDATE_LINKS, + IncidentRenderTemplateDataAttributesRequest.JSON_PROPERTY_VALIDATE_VARIABLES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRenderTemplateDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONTENT = "content"; + private String content; + + public static final String JSON_PROPERTY_DATETIME_FORMAT = "datetime_format"; + private String datetimeFormat; + + public static final String JSON_PROPERTY_TIMEZONE = "timezone"; + private String timezone; + + public static final String JSON_PROPERTY_VALIDATE_LINKS = "validate_links"; + private JsonNullable validateLinks = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_VALIDATE_VARIABLES = "validate_variables"; + private JsonNullable validateVariables = JsonNullable.undefined(); + + public IncidentRenderTemplateDataAttributesRequest() {} + + @JsonCreator + public IncidentRenderTemplateDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT) String content) { + this.content = content; + } + + public IncidentRenderTemplateDataAttributesRequest content(String content) { + this.content = content; + return this; + } + + /** + * The template content to render. + * + * @return content + */ + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public IncidentRenderTemplateDataAttributesRequest datetimeFormat(String datetimeFormat) { + this.datetimeFormat = datetimeFormat; + return this; + } + + /** + * The date-time format to use for rendering. + * + * @return datetimeFormat + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATETIME_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatetimeFormat() { + return datetimeFormat; + } + + public void setDatetimeFormat(String datetimeFormat) { + this.datetimeFormat = datetimeFormat; + } + + public IncidentRenderTemplateDataAttributesRequest timezone(String timezone) { + this.timezone = timezone; + return this; + } + + /** + * The timezone to use for rendering. + * + * @return timezone + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } + + public void setTimezone(String timezone) { + this.timezone = timezone; + } + + public IncidentRenderTemplateDataAttributesRequest validateLinks(Boolean validateLinks) { + this.validateLinks = JsonNullable.of(validateLinks); + return this; + } + + /** + * Whether to validate links in the rendered template. + * + * @return validateLinks + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getValidateLinks() { + return validateLinks.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALIDATE_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getValidateLinks_JsonNullable() { + return validateLinks; + } + + @JsonProperty(JSON_PROPERTY_VALIDATE_LINKS) + public void setValidateLinks_JsonNullable(JsonNullable validateLinks) { + this.validateLinks = validateLinks; + } + + public void setValidateLinks(Boolean validateLinks) { + this.validateLinks = JsonNullable.of(validateLinks); + } + + public IncidentRenderTemplateDataAttributesRequest validateVariables(Boolean validateVariables) { + this.validateVariables = JsonNullable.of(validateVariables); + return this; + } + + /** + * Whether to validate variables in the template. + * + * @return validateVariables + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getValidateVariables() { + return validateVariables.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALIDATE_VARIABLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getValidateVariables_JsonNullable() { + return validateVariables; + } + + @JsonProperty(JSON_PROPERTY_VALIDATE_VARIABLES) + public void setValidateVariables_JsonNullable(JsonNullable validateVariables) { + this.validateVariables = validateVariables; + } + + public void setValidateVariables(Boolean validateVariables) { + this.validateVariables = JsonNullable.of(validateVariables); + } + + /** + * 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 IncidentRenderTemplateDataAttributesRequest + */ + @JsonAnySetter + public IncidentRenderTemplateDataAttributesRequest 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 IncidentRenderTemplateDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRenderTemplateDataAttributesRequest incidentRenderTemplateDataAttributesRequest = + (IncidentRenderTemplateDataAttributesRequest) o; + return Objects.equals(this.content, incidentRenderTemplateDataAttributesRequest.content) + && Objects.equals( + this.datetimeFormat, incidentRenderTemplateDataAttributesRequest.datetimeFormat) + && Objects.equals(this.timezone, incidentRenderTemplateDataAttributesRequest.timezone) + && Objects.equals( + this.validateLinks, incidentRenderTemplateDataAttributesRequest.validateLinks) + && Objects.equals( + this.validateVariables, incidentRenderTemplateDataAttributesRequest.validateVariables) + && Objects.equals( + this.additionalProperties, + incidentRenderTemplateDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + content, datetimeFormat, timezone, validateLinks, validateVariables, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRenderTemplateDataAttributesRequest {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" datetimeFormat: ").append(toIndentedString(datetimeFormat)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" validateLinks: ").append(toIndentedString(validateLinks)).append("\n"); + sb.append(" validateVariables: ").append(toIndentedString(validateVariables)).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/IncidentRenderTemplateDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderTemplateDataRequest.java new file mode 100644 index 00000000000..fa21eabb931 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderTemplateDataRequest.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; + +/** Data for rendering a template. */ +@JsonPropertyOrder({ + IncidentRenderTemplateDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentRenderTemplateDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRenderTemplateDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentRenderTemplateDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRenderedTemplateType type; + + public IncidentRenderTemplateDataRequest() {} + + @JsonCreator + public IncidentRenderTemplateDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentRenderTemplateDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentRenderedTemplateType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentRenderTemplateDataRequest attributes( + IncidentRenderTemplateDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for rendering a template. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRenderTemplateDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentRenderTemplateDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentRenderTemplateDataRequest type(IncidentRenderedTemplateType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Rendered template resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRenderedTemplateType getType() { + return type; + } + + public void setType(IncidentRenderedTemplateType 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 IncidentRenderTemplateDataRequest + */ + @JsonAnySetter + public IncidentRenderTemplateDataRequest 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 IncidentRenderTemplateDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRenderTemplateDataRequest incidentRenderTemplateDataRequest = + (IncidentRenderTemplateDataRequest) o; + return Objects.equals(this.attributes, incidentRenderTemplateDataRequest.attributes) + && Objects.equals(this.type, incidentRenderTemplateDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentRenderTemplateDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRenderTemplateDataRequest {\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/IncidentRenderTemplateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderTemplateRequest.java new file mode 100644 index 00000000000..f7d0d8c4325 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderTemplateRequest.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 to render a template. */ +@JsonPropertyOrder({IncidentRenderTemplateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRenderTemplateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentRenderTemplateDataRequest data; + + public IncidentRenderTemplateRequest() {} + + @JsonCreator + public IncidentRenderTemplateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentRenderTemplateDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentRenderTemplateRequest data(IncidentRenderTemplateDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for rendering a template. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRenderTemplateDataRequest getData() { + return data; + } + + public void setData(IncidentRenderTemplateDataRequest 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 IncidentRenderTemplateRequest + */ + @JsonAnySetter + public IncidentRenderTemplateRequest 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 IncidentRenderTemplateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRenderTemplateRequest incidentRenderTemplateRequest = (IncidentRenderTemplateRequest) o; + return Objects.equals(this.data, incidentRenderTemplateRequest.data) + && Objects.equals( + this.additionalProperties, incidentRenderTemplateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRenderTemplateRequest {\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/IncidentRenderedTemplateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderedTemplateData.java new file mode 100644 index 00000000000..605997d299a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderedTemplateData.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Rendered template data. */ +@JsonPropertyOrder({ + IncidentRenderedTemplateData.JSON_PROPERTY_ATTRIBUTES, + IncidentRenderedTemplateData.JSON_PROPERTY_ID, + IncidentRenderedTemplateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRenderedTemplateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentRenderedTemplateDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRenderedTemplateType type; + + public IncidentRenderedTemplateData() {} + + @JsonCreator + public IncidentRenderedTemplateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentRenderedTemplateDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentRenderedTemplateType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentRenderedTemplateData attributes( + IncidentRenderedTemplateDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a rendered template. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRenderedTemplateDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentRenderedTemplateDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentRenderedTemplateData id(UUID id) { + this.id = id; + return this; + } + + /** + * The rendered template 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 IncidentRenderedTemplateData type(IncidentRenderedTemplateType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Rendered template resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRenderedTemplateType getType() { + return type; + } + + public void setType(IncidentRenderedTemplateType 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 IncidentRenderedTemplateData + */ + @JsonAnySetter + public IncidentRenderedTemplateData 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 IncidentRenderedTemplateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRenderedTemplateData incidentRenderedTemplateData = (IncidentRenderedTemplateData) o; + return Objects.equals(this.attributes, incidentRenderedTemplateData.attributes) + && Objects.equals(this.id, incidentRenderedTemplateData.id) + && Objects.equals(this.type, incidentRenderedTemplateData.type) + && Objects.equals( + this.additionalProperties, incidentRenderedTemplateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRenderedTemplateData {\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/IncidentRenderedTemplateDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderedTemplateDataAttributes.java new file mode 100644 index 00000000000..70511e0d1d8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderedTemplateDataAttributes.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; + +/** Attributes of a rendered template. */ +@JsonPropertyOrder({IncidentRenderedTemplateDataAttributes.JSON_PROPERTY_RENDERED_CONTENT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRenderedTemplateDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RENDERED_CONTENT = "rendered_content"; + private String renderedContent; + + public IncidentRenderedTemplateDataAttributes() {} + + @JsonCreator + public IncidentRenderedTemplateDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RENDERED_CONTENT) + String renderedContent) { + this.renderedContent = renderedContent; + } + + public IncidentRenderedTemplateDataAttributes renderedContent(String renderedContent) { + this.renderedContent = renderedContent; + return this; + } + + /** + * The rendered template content. + * + * @return renderedContent + */ + @JsonProperty(JSON_PROPERTY_RENDERED_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRenderedContent() { + return renderedContent; + } + + public void setRenderedContent(String renderedContent) { + this.renderedContent = renderedContent; + } + + /** + * 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 IncidentRenderedTemplateDataAttributes + */ + @JsonAnySetter + public IncidentRenderedTemplateDataAttributes 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 IncidentRenderedTemplateDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRenderedTemplateDataAttributes incidentRenderedTemplateDataAttributes = + (IncidentRenderedTemplateDataAttributes) o; + return Objects.equals( + this.renderedContent, incidentRenderedTemplateDataAttributes.renderedContent) + && Objects.equals( + this.additionalProperties, incidentRenderedTemplateDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(renderedContent, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRenderedTemplateDataAttributes {\n"); + sb.append(" renderedContent: ").append(toIndentedString(renderedContent)).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/IncidentRenderedTemplateResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderedTemplateResponse.java new file mode 100644 index 00000000000..0dc8cab3202 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderedTemplateResponse.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; + +/** Response with a rendered template. */ +@JsonPropertyOrder({IncidentRenderedTemplateResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRenderedTemplateResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentRenderedTemplateData data; + + public IncidentRenderedTemplateResponse() {} + + @JsonCreator + public IncidentRenderedTemplateResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentRenderedTemplateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentRenderedTemplateResponse data(IncidentRenderedTemplateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Rendered template data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRenderedTemplateData getData() { + return data; + } + + public void setData(IncidentRenderedTemplateData 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 IncidentRenderedTemplateResponse + */ + @JsonAnySetter + public IncidentRenderedTemplateResponse 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 IncidentRenderedTemplateResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRenderedTemplateResponse incidentRenderedTemplateResponse = + (IncidentRenderedTemplateResponse) o; + return Objects.equals(this.data, incidentRenderedTemplateResponse.data) + && Objects.equals( + this.additionalProperties, incidentRenderedTemplateResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRenderedTemplateResponse {\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/IncidentRenderedTemplateType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderedTemplateType.java new file mode 100644 index 00000000000..f1ca7e41d1b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRenderedTemplateType.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; + +/** Rendered template resource type. */ +@JsonSerialize(using = IncidentRenderedTemplateType.IncidentRenderedTemplateTypeSerializer.class) +public class IncidentRenderedTemplateType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rendered_templates")); + + public static final IncidentRenderedTemplateType RENDERED_TEMPLATES = + new IncidentRenderedTemplateType("rendered_templates"); + + IncidentRenderedTemplateType(String value) { + super(value, allowedValues); + } + + public static class IncidentRenderedTemplateTypeSerializer + extends StdSerializer { + public IncidentRenderedTemplateTypeSerializer(Class t) { + super(t); + } + + public IncidentRenderedTemplateTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentRenderedTemplateType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentRenderedTemplateType fromValue(String value) { + return new IncidentRenderedTemplateType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRoleDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRoleDataAttributesResponse.java new file mode 100644 index 00000000000..1dadd03d897 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRoleDataAttributesResponse.java @@ -0,0 +1,275 @@ +/* + * 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 reserved role. */ +@JsonPropertyOrder({ + IncidentReservedRoleDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentReservedRoleDataAttributesResponse.JSON_PROPERTY_DESCRIPTION, + IncidentReservedRoleDataAttributesResponse.JSON_PROPERTY_MODIFIED, + IncidentReservedRoleDataAttributesResponse.JSON_PROPERTY_NAME, + IncidentReservedRoleDataAttributesResponse.JSON_PROPERTY_POLICY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentReservedRoleDataAttributesResponse { + @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 IncidentReservedRolePolicy policy; + + public IncidentReservedRoleDataAttributesResponse() {} + + @JsonCreator + public IncidentReservedRoleDataAttributesResponse( + @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) + IncidentReservedRolePolicy policy) { + this.created = created; + this.modified = modified; + this.name = name; + this.policy = policy; + this.unparsed |= policy.unparsed; + } + + public IncidentReservedRoleDataAttributesResponse 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 IncidentReservedRoleDataAttributesResponse description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * A description of the reserved 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 IncidentReservedRoleDataAttributesResponse 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 IncidentReservedRoleDataAttributesResponse name(String name) { + this.name = name; + return this; + } + + /** + * The name of the reserved 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 IncidentReservedRoleDataAttributesResponse policy(IncidentReservedRolePolicy policy) { + this.policy = policy; + this.unparsed |= policy.unparsed; + return this; + } + + /** + * Policy for a reserved role. + * + * @return policy + */ + @JsonProperty(JSON_PROPERTY_POLICY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentReservedRolePolicy getPolicy() { + return policy; + } + + public void setPolicy(IncidentReservedRolePolicy 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 IncidentReservedRoleDataAttributesResponse + */ + @JsonAnySetter + public IncidentReservedRoleDataAttributesResponse 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 IncidentReservedRoleDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentReservedRoleDataAttributesResponse incidentReservedRoleDataAttributesResponse = + (IncidentReservedRoleDataAttributesResponse) o; + return Objects.equals(this.created, incidentReservedRoleDataAttributesResponse.created) + && Objects.equals(this.description, incidentReservedRoleDataAttributesResponse.description) + && Objects.equals(this.modified, incidentReservedRoleDataAttributesResponse.modified) + && Objects.equals(this.name, incidentReservedRoleDataAttributesResponse.name) + && Objects.equals(this.policy, incidentReservedRoleDataAttributesResponse.policy) + && Objects.equals( + this.additionalProperties, + incidentReservedRoleDataAttributesResponse.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 IncidentReservedRoleDataAttributesResponse {\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/IncidentReservedRoleDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRoleDataResponse.java new file mode 100644 index 00000000000..e5af2dc0c11 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRoleDataResponse.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Reserved role data in a response. */ +@JsonPropertyOrder({ + IncidentReservedRoleDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentReservedRoleDataResponse.JSON_PROPERTY_ID, + IncidentReservedRoleDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentReservedRoleDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentReservedRoleDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentReservedRoleType type; + + public IncidentReservedRoleDataResponse() {} + + @JsonCreator + public IncidentReservedRoleDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentReservedRoleDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentReservedRoleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentReservedRoleDataResponse attributes( + IncidentReservedRoleDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a reserved role. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentReservedRoleDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentReservedRoleDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentReservedRoleDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The reserved 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 IncidentReservedRoleDataResponse type(IncidentReservedRoleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident reserved role resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentReservedRoleType getType() { + return type; + } + + public void setType(IncidentReservedRoleType 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 IncidentReservedRoleDataResponse + */ + @JsonAnySetter + public IncidentReservedRoleDataResponse 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 IncidentReservedRoleDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentReservedRoleDataResponse incidentReservedRoleDataResponse = + (IncidentReservedRoleDataResponse) o; + return Objects.equals(this.attributes, incidentReservedRoleDataResponse.attributes) + && Objects.equals(this.id, incidentReservedRoleDataResponse.id) + && Objects.equals(this.type, incidentReservedRoleDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentReservedRoleDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentReservedRoleDataResponse {\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/IncidentReservedRolePolicy.java b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRolePolicy.java new file mode 100644 index 00000000000..500e297fe1a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRolePolicy.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 for a reserved role. */ +@JsonPropertyOrder({IncidentReservedRolePolicy.JSON_PROPERTY_IS_SINGLE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentReservedRolePolicy { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_IS_SINGLE = "is_single"; + private Boolean isSingle; + + public IncidentReservedRolePolicy() {} + + @JsonCreator + public IncidentReservedRolePolicy( + @JsonProperty(required = true, value = JSON_PROPERTY_IS_SINGLE) Boolean isSingle) { + this.isSingle = isSingle; + } + + public IncidentReservedRolePolicy isSingle(Boolean isSingle) { + this.isSingle = isSingle; + return this; + } + + /** + * Whether this role can only be assigned to a single responder. + * + * @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 IncidentReservedRolePolicy + */ + @JsonAnySetter + public IncidentReservedRolePolicy 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 IncidentReservedRolePolicy object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentReservedRolePolicy incidentReservedRolePolicy = (IncidentReservedRolePolicy) o; + return Objects.equals(this.isSingle, incidentReservedRolePolicy.isSingle) + && Objects.equals( + this.additionalProperties, incidentReservedRolePolicy.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(isSingle, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentReservedRolePolicy {\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/IncidentReservedRoleResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRoleResponse.java new file mode 100644 index 00000000000..8177e9d2e86 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRoleResponse.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 reserved role. */ +@JsonPropertyOrder({IncidentReservedRoleResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentReservedRoleResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentReservedRoleDataResponse data; + + public IncidentReservedRoleResponse() {} + + @JsonCreator + public IncidentReservedRoleResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentReservedRoleDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentReservedRoleResponse data(IncidentReservedRoleDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Reserved role data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentReservedRoleDataResponse getData() { + return data; + } + + public void setData(IncidentReservedRoleDataResponse 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 IncidentReservedRoleResponse + */ + @JsonAnySetter + public IncidentReservedRoleResponse 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 IncidentReservedRoleResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentReservedRoleResponse incidentReservedRoleResponse = (IncidentReservedRoleResponse) o; + return Objects.equals(this.data, incidentReservedRoleResponse.data) + && Objects.equals( + this.additionalProperties, incidentReservedRoleResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentReservedRoleResponse {\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/IncidentReservedRoleType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRoleType.java new file mode 100644 index 00000000000..ecbe3c1a5fd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRoleType.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 reserved role resource type. */ +@JsonSerialize(using = IncidentReservedRoleType.IncidentReservedRoleTypeSerializer.class) +public class IncidentReservedRoleType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_reserved_roles")); + + public static final IncidentReservedRoleType INCIDENT_RESERVED_ROLES = + new IncidentReservedRoleType("incident_reserved_roles"); + + IncidentReservedRoleType(String value) { + super(value, allowedValues); + } + + public static class IncidentReservedRoleTypeSerializer + extends StdSerializer { + public IncidentReservedRoleTypeSerializer(Class t) { + super(t); + } + + public IncidentReservedRoleTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentReservedRoleType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentReservedRoleType fromValue(String value) { + return new IncidentReservedRoleType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRolesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRolesResponse.java new file mode 100644 index 00000000000..83ccca34df2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentReservedRolesResponse.java @@ -0,0 +1,156 @@ +/* + * 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 reserved roles. */ +@JsonPropertyOrder({IncidentReservedRolesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentReservedRolesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentReservedRolesResponse() {} + + @JsonCreator + public IncidentReservedRolesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentReservedRolesResponse data(List data) { + this.data = data; + for (IncidentReservedRoleDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentReservedRolesResponse addDataItem(IncidentReservedRoleDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of reserved roles. + * + * @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 IncidentReservedRolesResponse + */ + @JsonAnySetter + public IncidentReservedRolesResponse 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 IncidentReservedRolesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentReservedRolesResponse incidentReservedRolesResponse = (IncidentReservedRolesResponse) o; + return Objects.equals(this.data, incidentReservedRolesResponse.data) + && Objects.equals( + this.additionalProperties, incidentReservedRolesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentReservedRolesResponse {\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/IncidentRoleAssignmentDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentDataAttributesRequest.java new file mode 100644 index 00000000000..57cd4dd72ff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentDataAttributesRequest.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.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 a role assignment. */ +@JsonPropertyOrder({IncidentRoleAssignmentDataAttributesRequest.JSON_PROPERTY_ROLE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ROLE = "role"; + private JsonNullable role = JsonNullable.undefined(); + + public IncidentRoleAssignmentDataAttributesRequest role(String role) { + this.role = JsonNullable.of(role); + return this; + } + + /** + * The name of the role to assign. + * + * @return role + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getRole() { + return role.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getRole_JsonNullable() { + return role; + } + + @JsonProperty(JSON_PROPERTY_ROLE) + public void setRole_JsonNullable(JsonNullable role) { + this.role = role; + } + + public void setRole(String role) { + this.role = JsonNullable.of(role); + } + + /** + * 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 IncidentRoleAssignmentDataAttributesRequest + */ + @JsonAnySetter + public IncidentRoleAssignmentDataAttributesRequest 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 IncidentRoleAssignmentDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentDataAttributesRequest incidentRoleAssignmentDataAttributesRequest = + (IncidentRoleAssignmentDataAttributesRequest) o; + return Objects.equals(this.role, incidentRoleAssignmentDataAttributesRequest.role) + && Objects.equals( + this.additionalProperties, + incidentRoleAssignmentDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(role, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentDataAttributesRequest {\n"); + sb.append(" role: ").append(toIndentedString(role)).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/IncidentRoleAssignmentDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentDataAttributesResponse.java new file mode 100644 index 00000000000..58afae65df9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentDataAttributesResponse.java @@ -0,0 +1,235 @@ +/* + * 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 role assignment. */ +@JsonPropertyOrder({ + IncidentRoleAssignmentDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentRoleAssignmentDataAttributesResponse.JSON_PROPERTY_MODIFIED, + IncidentRoleAssignmentDataAttributesResponse.JSON_PROPERTY_RESPONDER_TYPE, + IncidentRoleAssignmentDataAttributesResponse.JSON_PROPERTY_ROLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentDataAttributesResponse { + @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_RESPONDER_TYPE = "responder_type"; + private String responderType; + + public static final String JSON_PROPERTY_ROLE = "role"; + private String role; + + public IncidentRoleAssignmentDataAttributesResponse() {} + + @JsonCreator + public IncidentRoleAssignmentDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_RESPONDER_TYPE) String responderType, + @JsonProperty(required = true, value = JSON_PROPERTY_ROLE) String role) { + this.created = created; + this.modified = modified; + this.responderType = responderType; + this.role = role; + } + + public IncidentRoleAssignmentDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the role assignment 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 IncidentRoleAssignmentDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the role assignment 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 IncidentRoleAssignmentDataAttributesResponse responderType(String responderType) { + this.responderType = responderType; + return this; + } + + /** + * The type of the responder. + * + * @return responderType + */ + @JsonProperty(JSON_PROPERTY_RESPONDER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResponderType() { + return responderType; + } + + public void setResponderType(String responderType) { + this.responderType = responderType; + } + + public IncidentRoleAssignmentDataAttributesResponse role(String role) { + this.role = role; + return this; + } + + /** + * The name of the assigned role. + * + * @return role + */ + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + /** + * 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 IncidentRoleAssignmentDataAttributesResponse + */ + @JsonAnySetter + public IncidentRoleAssignmentDataAttributesResponse 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 IncidentRoleAssignmentDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentDataAttributesResponse incidentRoleAssignmentDataAttributesResponse = + (IncidentRoleAssignmentDataAttributesResponse) o; + return Objects.equals(this.created, incidentRoleAssignmentDataAttributesResponse.created) + && Objects.equals(this.modified, incidentRoleAssignmentDataAttributesResponse.modified) + && Objects.equals( + this.responderType, incidentRoleAssignmentDataAttributesResponse.responderType) + && Objects.equals(this.role, incidentRoleAssignmentDataAttributesResponse.role) + && Objects.equals( + this.additionalProperties, + incidentRoleAssignmentDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(created, modified, responderType, role, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentDataAttributesResponse {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" responderType: ").append(toIndentedString(responderType)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).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/IncidentRoleAssignmentDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentDataRequest.java new file mode 100644 index 00000000000..25714013f0c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentDataRequest.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Role assignment data for a request. */ +@JsonPropertyOrder({ + IncidentRoleAssignmentDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentRoleAssignmentDataRequest.JSON_PROPERTY_RELATIONSHIPS, + IncidentRoleAssignmentDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentRoleAssignmentDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentRoleAssignmentRelationshipsRequest relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRoleAssignmentType type; + + public IncidentRoleAssignmentDataRequest() {} + + @JsonCreator + public IncidentRoleAssignmentDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + IncidentRoleAssignmentRelationshipsRequest relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentRoleAssignmentType type) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentRoleAssignmentDataRequest attributes( + IncidentRoleAssignmentDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a role assignment. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRoleAssignmentDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentRoleAssignmentDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentRoleAssignmentDataRequest relationships( + IncidentRoleAssignmentRelationshipsRequest relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for creating a role assignment. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRoleAssignmentRelationshipsRequest getRelationships() { + return relationships; + } + + public void setRelationships(IncidentRoleAssignmentRelationshipsRequest relationships) { + this.relationships = relationships; + } + + public IncidentRoleAssignmentDataRequest type(IncidentRoleAssignmentType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident role assignment resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRoleAssignmentType getType() { + return type; + } + + public void setType(IncidentRoleAssignmentType 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 IncidentRoleAssignmentDataRequest + */ + @JsonAnySetter + public IncidentRoleAssignmentDataRequest 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 IncidentRoleAssignmentDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentDataRequest incidentRoleAssignmentDataRequest = + (IncidentRoleAssignmentDataRequest) o; + return Objects.equals(this.attributes, incidentRoleAssignmentDataRequest.attributes) + && Objects.equals(this.relationships, incidentRoleAssignmentDataRequest.relationships) + && Objects.equals(this.type, incidentRoleAssignmentDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentRoleAssignmentDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentDataRequest {\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/IncidentRoleAssignmentDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentDataResponse.java new file mode 100644 index 00000000000..496dcc01a6d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentDataResponse.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; + +/** Role assignment data in a response. */ +@JsonPropertyOrder({ + IncidentRoleAssignmentDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentRoleAssignmentDataResponse.JSON_PROPERTY_ID, + IncidentRoleAssignmentDataResponse.JSON_PROPERTY_RELATIONSHIPS, + IncidentRoleAssignmentDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentRoleAssignmentDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private IncidentRoleAssignmentRelationshipsResponse relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRoleAssignmentType type; + + public IncidentRoleAssignmentDataResponse() {} + + @JsonCreator + public IncidentRoleAssignmentDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentRoleAssignmentDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentRoleAssignmentType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentRoleAssignmentDataResponse attributes( + IncidentRoleAssignmentDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an incident role assignment. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRoleAssignmentDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentRoleAssignmentDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentRoleAssignmentDataResponse 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 IncidentRoleAssignmentDataResponse relationships( + IncidentRoleAssignmentRelationshipsResponse relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships of a role assignment. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRoleAssignmentRelationshipsResponse getRelationships() { + return relationships; + } + + public void setRelationships(IncidentRoleAssignmentRelationshipsResponse relationships) { + this.relationships = relationships; + } + + public IncidentRoleAssignmentDataResponse type(IncidentRoleAssignmentType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident role assignment resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRoleAssignmentType getType() { + return type; + } + + public void setType(IncidentRoleAssignmentType 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 IncidentRoleAssignmentDataResponse + */ + @JsonAnySetter + public IncidentRoleAssignmentDataResponse 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 IncidentRoleAssignmentDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentDataResponse incidentRoleAssignmentDataResponse = + (IncidentRoleAssignmentDataResponse) o; + return Objects.equals(this.attributes, incidentRoleAssignmentDataResponse.attributes) + && Objects.equals(this.id, incidentRoleAssignmentDataResponse.id) + && Objects.equals(this.relationships, incidentRoleAssignmentDataResponse.relationships) + && Objects.equals(this.type, incidentRoleAssignmentDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentRoleAssignmentDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentDataResponse {\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/IncidentRoleAssignmentRelationshipsRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRelationshipsRequest.java new file mode 100644 index 00000000000..c2a33e6ed79 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRelationshipsRequest.java @@ -0,0 +1,213 @@ +/* + * 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 role assignment. */ +@JsonPropertyOrder({ + IncidentRoleAssignmentRelationshipsRequest.JSON_PROPERTY_RESERVED_ROLE, + IncidentRoleAssignmentRelationshipsRequest.JSON_PROPERTY_RESPONDER, + IncidentRoleAssignmentRelationshipsRequest.JSON_PROPERTY_USER_DEFINED_ROLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentRelationshipsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESERVED_ROLE = "reserved_role"; + private IncidentRoleAssignmentRoleRelationship reservedRole; + + public static final String JSON_PROPERTY_RESPONDER = "responder"; + private IncidentRoleAssignmentResponderRelationship responder; + + public static final String JSON_PROPERTY_USER_DEFINED_ROLE = "user_defined_role"; + private IncidentRoleAssignmentRoleRelationship userDefinedRole; + + public IncidentRoleAssignmentRelationshipsRequest() {} + + @JsonCreator + public IncidentRoleAssignmentRelationshipsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_RESPONDER) + IncidentRoleAssignmentResponderRelationship responder) { + this.responder = responder; + this.unparsed |= responder.unparsed; + } + + public IncidentRoleAssignmentRelationshipsRequest reservedRole( + IncidentRoleAssignmentRoleRelationship reservedRole) { + this.reservedRole = reservedRole; + this.unparsed |= reservedRole.unparsed; + return this; + } + + /** + * Relationship to a role. + * + * @return reservedRole + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESERVED_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRoleAssignmentRoleRelationship getReservedRole() { + return reservedRole; + } + + public void setReservedRole(IncidentRoleAssignmentRoleRelationship reservedRole) { + this.reservedRole = reservedRole; + } + + public IncidentRoleAssignmentRelationshipsRequest responder( + IncidentRoleAssignmentResponderRelationship responder) { + this.responder = responder; + this.unparsed |= responder.unparsed; + return this; + } + + /** + * Relationship to a responder. + * + * @return responder + */ + @JsonProperty(JSON_PROPERTY_RESPONDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRoleAssignmentResponderRelationship getResponder() { + return responder; + } + + public void setResponder(IncidentRoleAssignmentResponderRelationship responder) { + this.responder = responder; + } + + public IncidentRoleAssignmentRelationshipsRequest userDefinedRole( + IncidentRoleAssignmentRoleRelationship userDefinedRole) { + this.userDefinedRole = userDefinedRole; + this.unparsed |= userDefinedRole.unparsed; + return this; + } + + /** + * Relationship to a role. + * + * @return userDefinedRole + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_DEFINED_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRoleAssignmentRoleRelationship getUserDefinedRole() { + return userDefinedRole; + } + + public void setUserDefinedRole(IncidentRoleAssignmentRoleRelationship userDefinedRole) { + this.userDefinedRole = userDefinedRole; + } + + /** + * 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 IncidentRoleAssignmentRelationshipsRequest + */ + @JsonAnySetter + public IncidentRoleAssignmentRelationshipsRequest 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 IncidentRoleAssignmentRelationshipsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentRelationshipsRequest incidentRoleAssignmentRelationshipsRequest = + (IncidentRoleAssignmentRelationshipsRequest) o; + return Objects.equals( + this.reservedRole, incidentRoleAssignmentRelationshipsRequest.reservedRole) + && Objects.equals(this.responder, incidentRoleAssignmentRelationshipsRequest.responder) + && Objects.equals( + this.userDefinedRole, incidentRoleAssignmentRelationshipsRequest.userDefinedRole) + && Objects.equals( + this.additionalProperties, + incidentRoleAssignmentRelationshipsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(reservedRole, responder, userDefinedRole, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentRelationshipsRequest {\n"); + sb.append(" reservedRole: ").append(toIndentedString(reservedRole)).append("\n"); + sb.append(" responder: ").append(toIndentedString(responder)).append("\n"); + sb.append(" userDefinedRole: ").append(toIndentedString(userDefinedRole)).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/IncidentRoleAssignmentRelationshipsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRelationshipsResponse.java new file mode 100644 index 00000000000..12651e11e56 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRelationshipsResponse.java @@ -0,0 +1,280 @@ +/* + * 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 of a role assignment. */ +@JsonPropertyOrder({ + IncidentRoleAssignmentRelationshipsResponse.JSON_PROPERTY_CREATED_BY_USER, + IncidentRoleAssignmentRelationshipsResponse.JSON_PROPERTY_LAST_MODIFIED_BY_USER, + IncidentRoleAssignmentRelationshipsResponse.JSON_PROPERTY_RESERVED_ROLE, + IncidentRoleAssignmentRelationshipsResponse.JSON_PROPERTY_RESPONDER, + IncidentRoleAssignmentRelationshipsResponse.JSON_PROPERTY_USER_DEFINED_ROLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentRelationshipsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private IncidentRoleAssignmentResponderRelationship createdByUser; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private IncidentRoleAssignmentResponderRelationship lastModifiedByUser; + + public static final String JSON_PROPERTY_RESERVED_ROLE = "reserved_role"; + private IncidentRoleAssignmentRoleRelationship reservedRole; + + public static final String JSON_PROPERTY_RESPONDER = "responder"; + private IncidentRoleAssignmentResponderRelationship responder; + + public static final String JSON_PROPERTY_USER_DEFINED_ROLE = "user_defined_role"; + private IncidentRoleAssignmentRoleRelationship userDefinedRole; + + public IncidentRoleAssignmentRelationshipsResponse() {} + + @JsonCreator + public IncidentRoleAssignmentRelationshipsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_RESPONDER) + IncidentRoleAssignmentResponderRelationship responder) { + this.responder = responder; + this.unparsed |= responder.unparsed; + } + + public IncidentRoleAssignmentRelationshipsResponse createdByUser( + IncidentRoleAssignmentResponderRelationship createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * Relationship to a responder. + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRoleAssignmentResponderRelationship getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(IncidentRoleAssignmentResponderRelationship createdByUser) { + this.createdByUser = createdByUser; + } + + public IncidentRoleAssignmentRelationshipsResponse lastModifiedByUser( + IncidentRoleAssignmentResponderRelationship lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * Relationship to a responder. + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRoleAssignmentResponderRelationship getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser( + IncidentRoleAssignmentResponderRelationship lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + public IncidentRoleAssignmentRelationshipsResponse reservedRole( + IncidentRoleAssignmentRoleRelationship reservedRole) { + this.reservedRole = reservedRole; + this.unparsed |= reservedRole.unparsed; + return this; + } + + /** + * Relationship to a role. + * + * @return reservedRole + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESERVED_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRoleAssignmentRoleRelationship getReservedRole() { + return reservedRole; + } + + public void setReservedRole(IncidentRoleAssignmentRoleRelationship reservedRole) { + this.reservedRole = reservedRole; + } + + public IncidentRoleAssignmentRelationshipsResponse responder( + IncidentRoleAssignmentResponderRelationship responder) { + this.responder = responder; + this.unparsed |= responder.unparsed; + return this; + } + + /** + * Relationship to a responder. + * + * @return responder + */ + @JsonProperty(JSON_PROPERTY_RESPONDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRoleAssignmentResponderRelationship getResponder() { + return responder; + } + + public void setResponder(IncidentRoleAssignmentResponderRelationship responder) { + this.responder = responder; + } + + public IncidentRoleAssignmentRelationshipsResponse userDefinedRole( + IncidentRoleAssignmentRoleRelationship userDefinedRole) { + this.userDefinedRole = userDefinedRole; + this.unparsed |= userDefinedRole.unparsed; + return this; + } + + /** + * Relationship to a role. + * + * @return userDefinedRole + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_DEFINED_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRoleAssignmentRoleRelationship getUserDefinedRole() { + return userDefinedRole; + } + + public void setUserDefinedRole(IncidentRoleAssignmentRoleRelationship userDefinedRole) { + this.userDefinedRole = userDefinedRole; + } + + /** + * 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 IncidentRoleAssignmentRelationshipsResponse + */ + @JsonAnySetter + public IncidentRoleAssignmentRelationshipsResponse 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 IncidentRoleAssignmentRelationshipsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentRelationshipsResponse incidentRoleAssignmentRelationshipsResponse = + (IncidentRoleAssignmentRelationshipsResponse) o; + return Objects.equals( + this.createdByUser, incidentRoleAssignmentRelationshipsResponse.createdByUser) + && Objects.equals( + this.lastModifiedByUser, incidentRoleAssignmentRelationshipsResponse.lastModifiedByUser) + && Objects.equals( + this.reservedRole, incidentRoleAssignmentRelationshipsResponse.reservedRole) + && Objects.equals(this.responder, incidentRoleAssignmentRelationshipsResponse.responder) + && Objects.equals( + this.userDefinedRole, incidentRoleAssignmentRelationshipsResponse.userDefinedRole) + && Objects.equals( + this.additionalProperties, + incidentRoleAssignmentRelationshipsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdByUser, + lastModifiedByUser, + reservedRole, + responder, + userDefinedRole, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentRelationshipsResponse {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" reservedRole: ").append(toIndentedString(reservedRole)).append("\n"); + sb.append(" responder: ").append(toIndentedString(responder)).append("\n"); + sb.append(" userDefinedRole: ").append(toIndentedString(userDefinedRole)).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/IncidentRoleAssignmentRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRequest.java new file mode 100644 index 00000000000..9f411c733b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRequest.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 to create a role assignment. */ +@JsonPropertyOrder({IncidentRoleAssignmentRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentRoleAssignmentDataRequest data; + + public IncidentRoleAssignmentRequest() {} + + @JsonCreator + public IncidentRoleAssignmentRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentRoleAssignmentDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentRoleAssignmentRequest data(IncidentRoleAssignmentDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Role assignment data for a request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRoleAssignmentDataRequest getData() { + return data; + } + + public void setData(IncidentRoleAssignmentDataRequest 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 IncidentRoleAssignmentRequest + */ + @JsonAnySetter + public IncidentRoleAssignmentRequest 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 IncidentRoleAssignmentRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentRequest incidentRoleAssignmentRequest = (IncidentRoleAssignmentRequest) o; + return Objects.equals(this.data, incidentRoleAssignmentRequest.data) + && Objects.equals( + this.additionalProperties, incidentRoleAssignmentRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentRequest {\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/IncidentRoleAssignmentResponderRelationship.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentResponderRelationship.java new file mode 100644 index 00000000000..a26fb07ad09 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentResponderRelationship.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; + +/** Relationship to a responder. */ +@JsonPropertyOrder({IncidentRoleAssignmentResponderRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentResponderRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentRoleAssignmentResponderRelationshipData data; + + public IncidentRoleAssignmentResponderRelationship() {} + + @JsonCreator + public IncidentRoleAssignmentResponderRelationship( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentRoleAssignmentResponderRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentRoleAssignmentResponderRelationship data( + IncidentRoleAssignmentResponderRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Responder relationship data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRoleAssignmentResponderRelationshipData getData() { + return data; + } + + public void setData(IncidentRoleAssignmentResponderRelationshipData 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 IncidentRoleAssignmentResponderRelationship + */ + @JsonAnySetter + public IncidentRoleAssignmentResponderRelationship 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 IncidentRoleAssignmentResponderRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentResponderRelationship incidentRoleAssignmentResponderRelationship = + (IncidentRoleAssignmentResponderRelationship) o; + return Objects.equals(this.data, incidentRoleAssignmentResponderRelationship.data) + && Objects.equals( + this.additionalProperties, + incidentRoleAssignmentResponderRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentResponderRelationship {\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/IncidentRoleAssignmentResponderRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentResponderRelationshipData.java new file mode 100644 index 00000000000..3cfbd07e519 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentResponderRelationshipData.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; + +/** Responder relationship data. */ +@JsonPropertyOrder({ + IncidentRoleAssignmentResponderRelationshipData.JSON_PROPERTY_ID, + IncidentRoleAssignmentResponderRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentResponderRelationshipData { + @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 IncidentRoleAssignmentResponderRelationshipData() {} + + @JsonCreator + public IncidentRoleAssignmentResponderRelationshipData( + @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 IncidentRoleAssignmentResponderRelationshipData 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 IncidentRoleAssignmentResponderRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * The responder 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 IncidentRoleAssignmentResponderRelationshipData + */ + @JsonAnySetter + public IncidentRoleAssignmentResponderRelationshipData 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 IncidentRoleAssignmentResponderRelationshipData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentResponderRelationshipData + incidentRoleAssignmentResponderRelationshipData = + (IncidentRoleAssignmentResponderRelationshipData) o; + return Objects.equals(this.id, incidentRoleAssignmentResponderRelationshipData.id) + && Objects.equals(this.type, incidentRoleAssignmentResponderRelationshipData.type) + && Objects.equals( + this.additionalProperties, + incidentRoleAssignmentResponderRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentResponderRelationshipData {\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/IncidentRoleAssignmentResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentResponse.java new file mode 100644 index 00000000000..1c3b7a79edb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentResponse.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; + +/** Response with a single role assignment. */ +@JsonPropertyOrder({IncidentRoleAssignmentResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentRoleAssignmentDataResponse data; + + public IncidentRoleAssignmentResponse() {} + + @JsonCreator + public IncidentRoleAssignmentResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentRoleAssignmentDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentRoleAssignmentResponse data(IncidentRoleAssignmentDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Role assignment data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRoleAssignmentDataResponse getData() { + return data; + } + + public void setData(IncidentRoleAssignmentDataResponse 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 IncidentRoleAssignmentResponse + */ + @JsonAnySetter + public IncidentRoleAssignmentResponse 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 IncidentRoleAssignmentResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentResponse incidentRoleAssignmentResponse = + (IncidentRoleAssignmentResponse) o; + return Objects.equals(this.data, incidentRoleAssignmentResponse.data) + && Objects.equals( + this.additionalProperties, incidentRoleAssignmentResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentResponse {\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/IncidentRoleAssignmentRoleRelationship.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRoleRelationship.java new file mode 100644 index 00000000000..e31105a8204 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRoleRelationship.java @@ -0,0 +1,139 @@ +/* + * 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; + +/** Relationship to a role. */ +@JsonPropertyOrder({IncidentRoleAssignmentRoleRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentRoleRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentRoleAssignmentRoleRelationshipData data; + + public IncidentRoleAssignmentRoleRelationship data( + IncidentRoleAssignmentRoleRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Role relationship data. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncidentRoleAssignmentRoleRelationshipData getData() { + return data; + } + + public void setData(IncidentRoleAssignmentRoleRelationshipData 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 IncidentRoleAssignmentRoleRelationship + */ + @JsonAnySetter + public IncidentRoleAssignmentRoleRelationship 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 IncidentRoleAssignmentRoleRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentRoleRelationship incidentRoleAssignmentRoleRelationship = + (IncidentRoleAssignmentRoleRelationship) o; + return Objects.equals(this.data, incidentRoleAssignmentRoleRelationship.data) + && Objects.equals( + this.additionalProperties, incidentRoleAssignmentRoleRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentRoleRelationship {\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/IncidentRoleAssignmentRoleRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRoleRelationshipData.java new file mode 100644 index 00000000000..25c94463c70 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentRoleRelationshipData.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; +import java.util.UUID; + +/** Role relationship data. */ +@JsonPropertyOrder({ + IncidentRoleAssignmentRoleRelationshipData.JSON_PROPERTY_ID, + IncidentRoleAssignmentRoleRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRoleAssignmentRoleRelationshipData { + @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 IncidentRoleAssignmentRoleRelationshipData() {} + + @JsonCreator + public IncidentRoleAssignmentRoleRelationshipData( + @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 IncidentRoleAssignmentRoleRelationshipData 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 IncidentRoleAssignmentRoleRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * The role 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 IncidentRoleAssignmentRoleRelationshipData + */ + @JsonAnySetter + public IncidentRoleAssignmentRoleRelationshipData 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 IncidentRoleAssignmentRoleRelationshipData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRoleAssignmentRoleRelationshipData incidentRoleAssignmentRoleRelationshipData = + (IncidentRoleAssignmentRoleRelationshipData) o; + return Objects.equals(this.id, incidentRoleAssignmentRoleRelationshipData.id) + && Objects.equals(this.type, incidentRoleAssignmentRoleRelationshipData.type) + && Objects.equals( + this.additionalProperties, + incidentRoleAssignmentRoleRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRoleAssignmentRoleRelationshipData {\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/IncidentRoleAssignmentType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentType.java new file mode 100644 index 00000000000..00fa12242f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRoleAssignmentType.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 role assignment resource type. */ +@JsonSerialize(using = IncidentRoleAssignmentType.IncidentRoleAssignmentTypeSerializer.class) +public class IncidentRoleAssignmentType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_role_assignments")); + + public static final IncidentRoleAssignmentType INCIDENT_ROLE_ASSIGNMENTS = + new IncidentRoleAssignmentType("incident_role_assignments"); + + IncidentRoleAssignmentType(String value) { + super(value, allowedValues); + } + + public static class IncidentRoleAssignmentTypeSerializer + extends StdSerializer { + public IncidentRoleAssignmentTypeSerializer(Class t) { + super(t); + } + + public IncidentRoleAssignmentTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentRoleAssignmentType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentRoleAssignmentType fromValue(String value) { + return new IncidentRoleAssignmentType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStateDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStateDataAttributesResponse.java new file mode 100644 index 00000000000..c70db71cf69 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStateDataAttributesResponse.java @@ -0,0 +1,278 @@ +/* + * 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 java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an incident rule execution state. */ +@JsonPropertyOrder({ + IncidentRuleExecutionStateDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentRuleExecutionStateDataAttributesResponse.JSON_PROPERTY_INCIDENT_UUID, + IncidentRuleExecutionStateDataAttributesResponse.JSON_PROPERTY_LAST_EXECUTED_AT, + IncidentRuleExecutionStateDataAttributesResponse.JSON_PROPERTY_MODIFIED, + IncidentRuleExecutionStateDataAttributesResponse.JSON_PROPERTY_RULE_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleExecutionStateDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_INCIDENT_UUID = "incident_uuid"; + private UUID incidentUuid; + + public static final String JSON_PROPERTY_LAST_EXECUTED_AT = "last_executed_at"; + private JsonNullable lastExecutedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_RULE_UUID = "rule_uuid"; + private UUID ruleUuid; + + public IncidentRuleExecutionStateDataAttributesResponse() {} + + @JsonCreator + public IncidentRuleExecutionStateDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_UUID) UUID incidentUuid, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_RULE_UUID) UUID ruleUuid) { + this.created = created; + this.incidentUuid = incidentUuid; + this.modified = modified; + this.ruleUuid = ruleUuid; + } + + public IncidentRuleExecutionStateDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the state 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 IncidentRuleExecutionStateDataAttributesResponse incidentUuid(UUID incidentUuid) { + this.incidentUuid = incidentUuid; + return this; + } + + /** + * The incident identifier. + * + * @return incidentUuid + */ + @JsonProperty(JSON_PROPERTY_INCIDENT_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getIncidentUuid() { + return incidentUuid; + } + + public void setIncidentUuid(UUID incidentUuid) { + this.incidentUuid = incidentUuid; + } + + public IncidentRuleExecutionStateDataAttributesResponse lastExecutedAt( + OffsetDateTime lastExecutedAt) { + this.lastExecutedAt = JsonNullable.of(lastExecutedAt); + return this; + } + + /** + * Timestamp of the last rule execution. + * + * @return lastExecutedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getLastExecutedAt() { + return lastExecutedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_EXECUTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getLastExecutedAt_JsonNullable() { + return lastExecutedAt; + } + + @JsonProperty(JSON_PROPERTY_LAST_EXECUTED_AT) + public void setLastExecutedAt_JsonNullable(JsonNullable lastExecutedAt) { + this.lastExecutedAt = lastExecutedAt; + } + + public void setLastExecutedAt(OffsetDateTime lastExecutedAt) { + this.lastExecutedAt = JsonNullable.of(lastExecutedAt); + } + + public IncidentRuleExecutionStateDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the state 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 IncidentRuleExecutionStateDataAttributesResponse ruleUuid(UUID ruleUuid) { + this.ruleUuid = ruleUuid; + return this; + } + + /** + * The rule identifier. + * + * @return ruleUuid + */ + @JsonProperty(JSON_PROPERTY_RULE_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRuleUuid() { + return ruleUuid; + } + + public void setRuleUuid(UUID ruleUuid) { + this.ruleUuid = ruleUuid; + } + + /** + * 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 IncidentRuleExecutionStateDataAttributesResponse + */ + @JsonAnySetter + public IncidentRuleExecutionStateDataAttributesResponse 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 IncidentRuleExecutionStateDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleExecutionStateDataAttributesResponse + incidentRuleExecutionStateDataAttributesResponse = + (IncidentRuleExecutionStateDataAttributesResponse) o; + return Objects.equals(this.created, incidentRuleExecutionStateDataAttributesResponse.created) + && Objects.equals( + this.incidentUuid, incidentRuleExecutionStateDataAttributesResponse.incidentUuid) + && Objects.equals( + this.lastExecutedAt, incidentRuleExecutionStateDataAttributesResponse.lastExecutedAt) + && Objects.equals(this.modified, incidentRuleExecutionStateDataAttributesResponse.modified) + && Objects.equals(this.ruleUuid, incidentRuleExecutionStateDataAttributesResponse.ruleUuid) + && Objects.equals( + this.additionalProperties, + incidentRuleExecutionStateDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + created, incidentUuid, lastExecutedAt, modified, ruleUuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleExecutionStateDataAttributesResponse {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" incidentUuid: ").append(toIndentedString(incidentUuid)).append("\n"); + sb.append(" lastExecutedAt: ").append(toIndentedString(lastExecutedAt)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" ruleUuid: ").append(toIndentedString(ruleUuid)).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/IncidentRuleExecutionStateDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStateDataResponse.java new file mode 100644 index 00000000000..141ff8ff1f9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStateDataResponse.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; + +/** Rule execution state data in a response. */ +@JsonPropertyOrder({ + IncidentRuleExecutionStateDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentRuleExecutionStateDataResponse.JSON_PROPERTY_ID, + IncidentRuleExecutionStateDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleExecutionStateDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentRuleExecutionStateDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentRuleExecutionStateType type; + + public IncidentRuleExecutionStateDataResponse() {} + + @JsonCreator + public IncidentRuleExecutionStateDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentRuleExecutionStateDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentRuleExecutionStateType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentRuleExecutionStateDataResponse attributes( + IncidentRuleExecutionStateDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an incident rule execution state. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleExecutionStateDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentRuleExecutionStateDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentRuleExecutionStateDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The rule execution state 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 IncidentRuleExecutionStateDataResponse type(IncidentRuleExecutionStateType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident rule execution state resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentRuleExecutionStateType getType() { + return type; + } + + public void setType(IncidentRuleExecutionStateType 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 IncidentRuleExecutionStateDataResponse + */ + @JsonAnySetter + public IncidentRuleExecutionStateDataResponse 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 IncidentRuleExecutionStateDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleExecutionStateDataResponse incidentRuleExecutionStateDataResponse = + (IncidentRuleExecutionStateDataResponse) o; + return Objects.equals(this.attributes, incidentRuleExecutionStateDataResponse.attributes) + && Objects.equals(this.id, incidentRuleExecutionStateDataResponse.id) + && Objects.equals(this.type, incidentRuleExecutionStateDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentRuleExecutionStateDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleExecutionStateDataResponse {\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/IncidentRuleExecutionStateRule.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStateRule.java new file mode 100644 index 00000000000..9962017a21c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStateRule.java @@ -0,0 +1,187 @@ +/* + * 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 java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A rule in a batch request. */ +@JsonPropertyOrder({ + IncidentRuleExecutionStateRule.JSON_PROPERTY_LAST_EXECUTED_AT, + IncidentRuleExecutionStateRule.JSON_PROPERTY_RULE_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleExecutionStateRule { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LAST_EXECUTED_AT = "last_executed_at"; + private JsonNullable lastExecutedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RULE_UUID = "rule_uuid"; + private UUID ruleUuid; + + public IncidentRuleExecutionStateRule() {} + + @JsonCreator + public IncidentRuleExecutionStateRule( + @JsonProperty(required = true, value = JSON_PROPERTY_RULE_UUID) UUID ruleUuid) { + this.ruleUuid = ruleUuid; + } + + public IncidentRuleExecutionStateRule lastExecutedAt(OffsetDateTime lastExecutedAt) { + this.lastExecutedAt = JsonNullable.of(lastExecutedAt); + return this; + } + + /** + * Timestamp of the last rule execution. + * + * @return lastExecutedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getLastExecutedAt() { + return lastExecutedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_EXECUTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getLastExecutedAt_JsonNullable() { + return lastExecutedAt; + } + + @JsonProperty(JSON_PROPERTY_LAST_EXECUTED_AT) + public void setLastExecutedAt_JsonNullable(JsonNullable lastExecutedAt) { + this.lastExecutedAt = lastExecutedAt; + } + + public void setLastExecutedAt(OffsetDateTime lastExecutedAt) { + this.lastExecutedAt = JsonNullable.of(lastExecutedAt); + } + + public IncidentRuleExecutionStateRule ruleUuid(UUID ruleUuid) { + this.ruleUuid = ruleUuid; + return this; + } + + /** + * The rule identifier. + * + * @return ruleUuid + */ + @JsonProperty(JSON_PROPERTY_RULE_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRuleUuid() { + return ruleUuid; + } + + public void setRuleUuid(UUID ruleUuid) { + this.ruleUuid = ruleUuid; + } + + /** + * 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 IncidentRuleExecutionStateRule + */ + @JsonAnySetter + public IncidentRuleExecutionStateRule 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 IncidentRuleExecutionStateRule object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleExecutionStateRule incidentRuleExecutionStateRule = + (IncidentRuleExecutionStateRule) o; + return Objects.equals(this.lastExecutedAt, incidentRuleExecutionStateRule.lastExecutedAt) + && Objects.equals(this.ruleUuid, incidentRuleExecutionStateRule.ruleUuid) + && Objects.equals( + this.additionalProperties, incidentRuleExecutionStateRule.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(lastExecutedAt, ruleUuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleExecutionStateRule {\n"); + sb.append(" lastExecutedAt: ").append(toIndentedString(lastExecutedAt)).append("\n"); + sb.append(" ruleUuid: ").append(toIndentedString(ruleUuid)).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/IncidentRuleExecutionStateType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStateType.java new file mode 100644 index 00000000000..97cd301133d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStateType.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; + +/** Incident rule execution state resource type. */ +@JsonSerialize( + using = IncidentRuleExecutionStateType.IncidentRuleExecutionStateTypeSerializer.class) +public class IncidentRuleExecutionStateType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_rule_execution_states")); + + public static final IncidentRuleExecutionStateType INCIDENT_RULE_EXECUTION_STATES = + new IncidentRuleExecutionStateType("incident_rule_execution_states"); + + IncidentRuleExecutionStateType(String value) { + super(value, allowedValues); + } + + public static class IncidentRuleExecutionStateTypeSerializer + extends StdSerializer { + public IncidentRuleExecutionStateTypeSerializer(Class t) { + super(t); + } + + public IncidentRuleExecutionStateTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentRuleExecutionStateType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentRuleExecutionStateType fromValue(String value) { + return new IncidentRuleExecutionStateType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStatesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStatesResponse.java new file mode 100644 index 00000000000..f443e227774 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRuleExecutionStatesResponse.java @@ -0,0 +1,159 @@ +/* + * 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 rule execution states. */ +@JsonPropertyOrder({IncidentRuleExecutionStatesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentRuleExecutionStatesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentRuleExecutionStatesResponse() {} + + @JsonCreator + public IncidentRuleExecutionStatesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentRuleExecutionStatesResponse data( + List data) { + this.data = data; + for (IncidentRuleExecutionStateDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentRuleExecutionStatesResponse addDataItem( + IncidentRuleExecutionStateDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of rule execution states. + * + * @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 IncidentRuleExecutionStatesResponse + */ + @JsonAnySetter + public IncidentRuleExecutionStatesResponse 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 IncidentRuleExecutionStatesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentRuleExecutionStatesResponse incidentRuleExecutionStatesResponse = + (IncidentRuleExecutionStatesResponse) o; + return Objects.equals(this.data, incidentRuleExecutionStatesResponse.data) + && Objects.equals( + this.additionalProperties, incidentRuleExecutionStatesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentRuleExecutionStatesResponse {\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/IncidentSearchIncidentsExportRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchIncidentsExportRequest.java new file mode 100644 index 00000000000..06a22df6aa4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchIncidentsExportRequest.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.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; + +/** Request to export incidents as CSV. */ +@JsonPropertyOrder({ + IncidentSearchIncidentsExportRequest.JSON_PROPERTY_FIELDS, + IncidentSearchIncidentsExportRequest.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentSearchIncidentsExportRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIELDS = "fields"; + private List fields = new ArrayList<>(); + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public IncidentSearchIncidentsExportRequest() {} + + @JsonCreator + public IncidentSearchIncidentsExportRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_FIELDS) List fields, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { + this.fields = fields; + this.query = query; + } + + public IncidentSearchIncidentsExportRequest fields(List fields) { + this.fields = fields; + return this; + } + + public IncidentSearchIncidentsExportRequest addFieldsItem(String fieldsItem) { + this.fields.add(fieldsItem); + return this; + } + + /** + * The list of fields to include in the export. + * + * @return fields + */ + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + public IncidentSearchIncidentsExportRequest query(String query) { + this.query = query; + return this; + } + + /** + * The search query to filter incidents for export. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * 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 IncidentSearchIncidentsExportRequest + */ + @JsonAnySetter + public IncidentSearchIncidentsExportRequest 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 IncidentSearchIncidentsExportRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentSearchIncidentsExportRequest incidentSearchIncidentsExportRequest = + (IncidentSearchIncidentsExportRequest) o; + return Objects.equals(this.fields, incidentSearchIncidentsExportRequest.fields) + && Objects.equals(this.query, incidentSearchIncidentsExportRequest.query) + && Objects.equals( + this.additionalProperties, incidentSearchIncidentsExportRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(fields, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentSearchIncidentsExportRequest {\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).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/IncidentSearchIncidentsIncludeType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchIncidentsIncludeType.java new file mode 100644 index 00000000000..aac469dd67e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchIncidentsIncludeType.java @@ -0,0 +1,71 @@ +/* + * 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; + +/** Types of related objects to include. */ +@JsonSerialize( + using = IncidentSearchIncidentsIncludeType.IncidentSearchIncidentsIncludeTypeSerializer.class) +public class IncidentSearchIncidentsIncludeType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "incident_type", "impacts", "users", "responders", "integrations", "attachments")); + + public static final IncidentSearchIncidentsIncludeType INCIDENT_TYPE = + new IncidentSearchIncidentsIncludeType("incident_type"); + public static final IncidentSearchIncidentsIncludeType IMPACTS = + new IncidentSearchIncidentsIncludeType("impacts"); + public static final IncidentSearchIncidentsIncludeType USERS = + new IncidentSearchIncidentsIncludeType("users"); + public static final IncidentSearchIncidentsIncludeType RESPONDERS = + new IncidentSearchIncidentsIncludeType("responders"); + public static final IncidentSearchIncidentsIncludeType INTEGRATIONS = + new IncidentSearchIncidentsIncludeType("integrations"); + public static final IncidentSearchIncidentsIncludeType ATTACHMENTS = + new IncidentSearchIncidentsIncludeType("attachments"); + + IncidentSearchIncidentsIncludeType(String value) { + super(value, allowedValues); + } + + public static class IncidentSearchIncidentsIncludeTypeSerializer + extends StdSerializer { + public IncidentSearchIncidentsIncludeTypeSerializer( + Class t) { + super(t); + } + + public IncidentSearchIncidentsIncludeTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentSearchIncidentsIncludeType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentSearchIncidentsIncludeType fromValue(String value) { + return new IncidentSearchIncidentsIncludeType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchIncidentsSortOrder.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchIncidentsSortOrder.java new file mode 100644 index 00000000000..78870f9e0d1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchIncidentsSortOrder.java @@ -0,0 +1,64 @@ +/* + * 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 ways searched incidents can be sorted. */ +@JsonSerialize( + using = IncidentSearchIncidentsSortOrder.IncidentSearchIncidentsSortOrderSerializer.class) +public class IncidentSearchIncidentsSortOrder extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("created", "-created", "modified", "-modified")); + + public static final IncidentSearchIncidentsSortOrder CREATED_ASCENDING = + new IncidentSearchIncidentsSortOrder("created"); + public static final IncidentSearchIncidentsSortOrder CREATED_DESCENDING = + new IncidentSearchIncidentsSortOrder("-created"); + public static final IncidentSearchIncidentsSortOrder MODIFIED_ASCENDING = + new IncidentSearchIncidentsSortOrder("modified"); + public static final IncidentSearchIncidentsSortOrder MODIFIED_DESCENDING = + new IncidentSearchIncidentsSortOrder("-modified"); + + IncidentSearchIncidentsSortOrder(String value) { + super(value, allowedValues); + } + + public static class IncidentSearchIncidentsSortOrderSerializer + extends StdSerializer { + public IncidentSearchIncidentsSortOrderSerializer(Class t) { + super(t); + } + + public IncidentSearchIncidentsSortOrderSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentSearchIncidentsSortOrder value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentSearchIncidentsSortOrder fromValue(String value) { + return new IncidentSearchIncidentsSortOrder(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeCreateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeCreateData.java new file mode 100644 index 00000000000..2473f59ebca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeCreateData.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; + +/** Data for publishing a status page notice. */ +@JsonPropertyOrder({ + IncidentStatusPageNoticeCreateData.JSON_PROPERTY_ATTRIBUTES, + IncidentStatusPageNoticeCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPageNoticeCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentStatusPageNoticeCreateDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentStatusPageNoticeIntegrationType type; + + public IncidentStatusPageNoticeCreateData() {} + + @JsonCreator + public IncidentStatusPageNoticeCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentStatusPageNoticeCreateDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentStatusPageNoticeIntegrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentStatusPageNoticeCreateData attributes( + IncidentStatusPageNoticeCreateDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for publishing a status page notice. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPageNoticeCreateDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentStatusPageNoticeCreateDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentStatusPageNoticeCreateData type(IncidentStatusPageNoticeIntegrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPageNoticeIntegrationType getType() { + return type; + } + + public void setType(IncidentStatusPageNoticeIntegrationType 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 IncidentStatusPageNoticeCreateData + */ + @JsonAnySetter + public IncidentStatusPageNoticeCreateData 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 IncidentStatusPageNoticeCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPageNoticeCreateData incidentStatusPageNoticeCreateData = + (IncidentStatusPageNoticeCreateData) o; + return Objects.equals(this.attributes, incidentStatusPageNoticeCreateData.attributes) + && Objects.equals(this.type, incidentStatusPageNoticeCreateData.type) + && Objects.equals( + this.additionalProperties, incidentStatusPageNoticeCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPageNoticeCreateData {\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/IncidentStatusPageNoticeCreateDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeCreateDataAttributes.java new file mode 100644 index 00000000000..aea09e30d3b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeCreateDataAttributes.java @@ -0,0 +1,231 @@ +/* + * 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 publishing a status page notice. */ +@JsonPropertyOrder({ + IncidentStatusPageNoticeCreateDataAttributes.JSON_PROPERTY_COMPONENTS, + IncidentStatusPageNoticeCreateDataAttributes.JSON_PROPERTY_MESSAGE, + IncidentStatusPageNoticeCreateDataAttributes.JSON_PROPERTY_STATUS, + IncidentStatusPageNoticeCreateDataAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPageNoticeCreateDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private Map components = null; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public IncidentStatusPageNoticeCreateDataAttributes components(Map components) { + this.components = components; + return this; + } + + public IncidentStatusPageNoticeCreateDataAttributes putComponentsItem( + String key, String componentsItem) { + if (this.components == null) { + this.components = new HashMap<>(); + } + this.components.put(key, componentsItem); + return this; + } + + /** + * Map of component identifiers to their status. + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getComponents() { + return components; + } + + public void setComponents(Map components) { + this.components = components; + } + + public IncidentStatusPageNoticeCreateDataAttributes message(String message) { + this.message = message; + return this; + } + + /** + * The message body of the notice. + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public IncidentStatusPageNoticeCreateDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The status of the notice. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public IncidentStatusPageNoticeCreateDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * The title of the notice. + * + * @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 IncidentStatusPageNoticeCreateDataAttributes + */ + @JsonAnySetter + public IncidentStatusPageNoticeCreateDataAttributes 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 IncidentStatusPageNoticeCreateDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPageNoticeCreateDataAttributes incidentStatusPageNoticeCreateDataAttributes = + (IncidentStatusPageNoticeCreateDataAttributes) o; + return Objects.equals(this.components, incidentStatusPageNoticeCreateDataAttributes.components) + && Objects.equals(this.message, incidentStatusPageNoticeCreateDataAttributes.message) + && Objects.equals(this.status, incidentStatusPageNoticeCreateDataAttributes.status) + && Objects.equals(this.title, incidentStatusPageNoticeCreateDataAttributes.title) + && Objects.equals( + this.additionalProperties, + incidentStatusPageNoticeCreateDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(components, message, status, title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPageNoticeCreateDataAttributes {\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IncidentStatusPageNoticeCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeCreateRequest.java new file mode 100644 index 00000000000..0274772a35e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeCreateRequest.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 to publish a status page notice. */ +@JsonPropertyOrder({IncidentStatusPageNoticeCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPageNoticeCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentStatusPageNoticeCreateData data; + + public IncidentStatusPageNoticeCreateRequest() {} + + @JsonCreator + public IncidentStatusPageNoticeCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentStatusPageNoticeCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentStatusPageNoticeCreateRequest data(IncidentStatusPageNoticeCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for publishing a status page notice. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPageNoticeCreateData getData() { + return data; + } + + public void setData(IncidentStatusPageNoticeCreateData 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 IncidentStatusPageNoticeCreateRequest + */ + @JsonAnySetter + public IncidentStatusPageNoticeCreateRequest 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 IncidentStatusPageNoticeCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPageNoticeCreateRequest incidentStatusPageNoticeCreateRequest = + (IncidentStatusPageNoticeCreateRequest) o; + return Objects.equals(this.data, incidentStatusPageNoticeCreateRequest.data) + && Objects.equals( + this.additionalProperties, incidentStatusPageNoticeCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPageNoticeCreateRequest {\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/IncidentStatusPageNoticeIntegrationDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeIntegrationDataAttributes.java new file mode 100644 index 00000000000..5b562843fae --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeIntegrationDataAttributes.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.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 status page notice integration. */ +@JsonPropertyOrder({ + IncidentStatusPageNoticeIntegrationDataAttributes.JSON_PROPERTY_CREATED, + IncidentStatusPageNoticeIntegrationDataAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + IncidentStatusPageNoticeIntegrationDataAttributes.JSON_PROPERTY_MODIFIED, + IncidentStatusPageNoticeIntegrationDataAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPageNoticeIntegrationDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private String integrationType; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public IncidentStatusPageNoticeIntegrationDataAttributes() {} + + @JsonCreator + public IncidentStatusPageNoticeIntegrationDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) String integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.created = created; + this.integrationType = integrationType; + this.modified = modified; + this.status = status; + } + + public IncidentStatusPageNoticeIntegrationDataAttributes created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the integration 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 IncidentStatusPageNoticeIntegrationDataAttributes integrationType(String integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + * The type of integration. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(String integrationType) { + this.integrationType = integrationType; + } + + public IncidentStatusPageNoticeIntegrationDataAttributes modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the integration 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 IncidentStatusPageNoticeIntegrationDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The status of the integration. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * 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 IncidentStatusPageNoticeIntegrationDataAttributes + */ + @JsonAnySetter + public IncidentStatusPageNoticeIntegrationDataAttributes 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 IncidentStatusPageNoticeIntegrationDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPageNoticeIntegrationDataAttributes + incidentStatusPageNoticeIntegrationDataAttributes = + (IncidentStatusPageNoticeIntegrationDataAttributes) o; + return Objects.equals(this.created, incidentStatusPageNoticeIntegrationDataAttributes.created) + && Objects.equals( + this.integrationType, incidentStatusPageNoticeIntegrationDataAttributes.integrationType) + && Objects.equals(this.modified, incidentStatusPageNoticeIntegrationDataAttributes.modified) + && Objects.equals(this.status, incidentStatusPageNoticeIntegrationDataAttributes.status) + && Objects.equals( + this.additionalProperties, + incidentStatusPageNoticeIntegrationDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(created, integrationType, modified, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPageNoticeIntegrationDataAttributes {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IncidentStatusPageNoticeIntegrationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeIntegrationDataResponse.java new file mode 100644 index 00000000000..3d2b476b4f8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeIntegrationDataResponse.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 java.util.UUID; + +/** Status page notice integration data in a response. */ +@JsonPropertyOrder({ + IncidentStatusPageNoticeIntegrationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentStatusPageNoticeIntegrationDataResponse.JSON_PROPERTY_ID, + IncidentStatusPageNoticeIntegrationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPageNoticeIntegrationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentStatusPageNoticeIntegrationDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentStatusPageNoticeIntegrationType type; + + public IncidentStatusPageNoticeIntegrationDataResponse() {} + + @JsonCreator + public IncidentStatusPageNoticeIntegrationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentStatusPageNoticeIntegrationDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentStatusPageNoticeIntegrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentStatusPageNoticeIntegrationDataResponse attributes( + IncidentStatusPageNoticeIntegrationDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a status page notice integration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPageNoticeIntegrationDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentStatusPageNoticeIntegrationDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentStatusPageNoticeIntegrationDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The integration 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 IncidentStatusPageNoticeIntegrationDataResponse type( + IncidentStatusPageNoticeIntegrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPageNoticeIntegrationType getType() { + return type; + } + + public void setType(IncidentStatusPageNoticeIntegrationType 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 IncidentStatusPageNoticeIntegrationDataResponse + */ + @JsonAnySetter + public IncidentStatusPageNoticeIntegrationDataResponse 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 IncidentStatusPageNoticeIntegrationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPageNoticeIntegrationDataResponse + incidentStatusPageNoticeIntegrationDataResponse = + (IncidentStatusPageNoticeIntegrationDataResponse) o; + return Objects.equals( + this.attributes, incidentStatusPageNoticeIntegrationDataResponse.attributes) + && Objects.equals(this.id, incidentStatusPageNoticeIntegrationDataResponse.id) + && Objects.equals(this.type, incidentStatusPageNoticeIntegrationDataResponse.type) + && Objects.equals( + this.additionalProperties, + incidentStatusPageNoticeIntegrationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPageNoticeIntegrationDataResponse {\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/IncidentStatusPageNoticeIntegrationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeIntegrationResponse.java new file mode 100644 index 00000000000..3b01b9cda70 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeIntegrationResponse.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; + +/** Response with status page notice integration metadata. */ +@JsonPropertyOrder({IncidentStatusPageNoticeIntegrationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPageNoticeIntegrationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentStatusPageNoticeIntegrationDataResponse data; + + public IncidentStatusPageNoticeIntegrationResponse() {} + + @JsonCreator + public IncidentStatusPageNoticeIntegrationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentStatusPageNoticeIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentStatusPageNoticeIntegrationResponse data( + IncidentStatusPageNoticeIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Status page notice integration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPageNoticeIntegrationDataResponse getData() { + return data; + } + + public void setData(IncidentStatusPageNoticeIntegrationDataResponse 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 IncidentStatusPageNoticeIntegrationResponse + */ + @JsonAnySetter + public IncidentStatusPageNoticeIntegrationResponse 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 IncidentStatusPageNoticeIntegrationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPageNoticeIntegrationResponse incidentStatusPageNoticeIntegrationResponse = + (IncidentStatusPageNoticeIntegrationResponse) o; + return Objects.equals(this.data, incidentStatusPageNoticeIntegrationResponse.data) + && Objects.equals( + this.additionalProperties, + incidentStatusPageNoticeIntegrationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPageNoticeIntegrationResponse {\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/IncidentStatusPageNoticeIntegrationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeIntegrationType.java new file mode 100644 index 00000000000..47192aadeb5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeIntegrationType.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; + +/** Incident integration resource type. */ +@JsonSerialize( + using = + IncidentStatusPageNoticeIntegrationType.IncidentStatusPageNoticeIntegrationTypeSerializer + .class) +public class IncidentStatusPageNoticeIntegrationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_integrations")); + + public static final IncidentStatusPageNoticeIntegrationType INCIDENT_INTEGRATIONS = + new IncidentStatusPageNoticeIntegrationType("incident_integrations"); + + IncidentStatusPageNoticeIntegrationType(String value) { + super(value, allowedValues); + } + + public static class IncidentStatusPageNoticeIntegrationTypeSerializer + extends StdSerializer { + public IncidentStatusPageNoticeIntegrationTypeSerializer( + Class t) { + super(t); + } + + public IncidentStatusPageNoticeIntegrationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentStatusPageNoticeIntegrationType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentStatusPageNoticeIntegrationType fromValue(String value) { + return new IncidentStatusPageNoticeIntegrationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeUpdateData.java new file mode 100644 index 00000000000..ed784642d09 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeUpdateData.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; + +/** Data for updating a status page notice. */ +@JsonPropertyOrder({ + IncidentStatusPageNoticeUpdateData.JSON_PROPERTY_ATTRIBUTES, + IncidentStatusPageNoticeUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPageNoticeUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentStatusPageNoticeUpdateDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentStatusPageNoticeIntegrationType type; + + public IncidentStatusPageNoticeUpdateData() {} + + @JsonCreator + public IncidentStatusPageNoticeUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentStatusPageNoticeUpdateDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentStatusPageNoticeIntegrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentStatusPageNoticeUpdateData attributes( + IncidentStatusPageNoticeUpdateDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for updating a status page notice. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPageNoticeUpdateDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentStatusPageNoticeUpdateDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentStatusPageNoticeUpdateData type(IncidentStatusPageNoticeIntegrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPageNoticeIntegrationType getType() { + return type; + } + + public void setType(IncidentStatusPageNoticeIntegrationType 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 IncidentStatusPageNoticeUpdateData + */ + @JsonAnySetter + public IncidentStatusPageNoticeUpdateData 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 IncidentStatusPageNoticeUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPageNoticeUpdateData incidentStatusPageNoticeUpdateData = + (IncidentStatusPageNoticeUpdateData) o; + return Objects.equals(this.attributes, incidentStatusPageNoticeUpdateData.attributes) + && Objects.equals(this.type, incidentStatusPageNoticeUpdateData.type) + && Objects.equals( + this.additionalProperties, incidentStatusPageNoticeUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPageNoticeUpdateData {\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/IncidentStatusPageNoticeUpdateDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeUpdateDataAttributes.java new file mode 100644 index 00000000000..d0e8789963a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeUpdateDataAttributes.java @@ -0,0 +1,231 @@ +/* + * 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 updating a status page notice. */ +@JsonPropertyOrder({ + IncidentStatusPageNoticeUpdateDataAttributes.JSON_PROPERTY_COMPONENTS, + IncidentStatusPageNoticeUpdateDataAttributes.JSON_PROPERTY_MESSAGE, + IncidentStatusPageNoticeUpdateDataAttributes.JSON_PROPERTY_STATUS, + IncidentStatusPageNoticeUpdateDataAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPageNoticeUpdateDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private Map components = null; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public IncidentStatusPageNoticeUpdateDataAttributes components(Map components) { + this.components = components; + return this; + } + + public IncidentStatusPageNoticeUpdateDataAttributes putComponentsItem( + String key, String componentsItem) { + if (this.components == null) { + this.components = new HashMap<>(); + } + this.components.put(key, componentsItem); + return this; + } + + /** + * Map of component identifiers to their status. + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getComponents() { + return components; + } + + public void setComponents(Map components) { + this.components = components; + } + + public IncidentStatusPageNoticeUpdateDataAttributes message(String message) { + this.message = message; + return this; + } + + /** + * The message body of the notice. + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public IncidentStatusPageNoticeUpdateDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The status of the notice. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public IncidentStatusPageNoticeUpdateDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * The title of the notice. + * + * @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 IncidentStatusPageNoticeUpdateDataAttributes + */ + @JsonAnySetter + public IncidentStatusPageNoticeUpdateDataAttributes 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 IncidentStatusPageNoticeUpdateDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPageNoticeUpdateDataAttributes incidentStatusPageNoticeUpdateDataAttributes = + (IncidentStatusPageNoticeUpdateDataAttributes) o; + return Objects.equals(this.components, incidentStatusPageNoticeUpdateDataAttributes.components) + && Objects.equals(this.message, incidentStatusPageNoticeUpdateDataAttributes.message) + && Objects.equals(this.status, incidentStatusPageNoticeUpdateDataAttributes.status) + && Objects.equals(this.title, incidentStatusPageNoticeUpdateDataAttributes.title) + && Objects.equals( + this.additionalProperties, + incidentStatusPageNoticeUpdateDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(components, message, status, title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPageNoticeUpdateDataAttributes {\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IncidentStatusPageNoticeUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeUpdateRequest.java new file mode 100644 index 00000000000..2965391f7c6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPageNoticeUpdateRequest.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 to update a status page notice. */ +@JsonPropertyOrder({IncidentStatusPageNoticeUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPageNoticeUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentStatusPageNoticeUpdateData data; + + public IncidentStatusPageNoticeUpdateRequest() {} + + @JsonCreator + public IncidentStatusPageNoticeUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentStatusPageNoticeUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentStatusPageNoticeUpdateRequest data(IncidentStatusPageNoticeUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for updating a status page notice. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPageNoticeUpdateData getData() { + return data; + } + + public void setData(IncidentStatusPageNoticeUpdateData 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 IncidentStatusPageNoticeUpdateRequest + */ + @JsonAnySetter + public IncidentStatusPageNoticeUpdateRequest 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 IncidentStatusPageNoticeUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPageNoticeUpdateRequest incidentStatusPageNoticeUpdateRequest = + (IncidentStatusPageNoticeUpdateRequest) o; + return Objects.equals(this.data, incidentStatusPageNoticeUpdateRequest.data) + && Objects.equals( + this.additionalProperties, incidentStatusPageNoticeUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPageNoticeUpdateRequest {\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/IncidentStatusPagesSuggestionData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPagesSuggestionData.java new file mode 100644 index 00000000000..355249fe751 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPagesSuggestionData.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Status pages suggestion data. */ +@JsonPropertyOrder({ + IncidentStatusPagesSuggestionData.JSON_PROPERTY_ATTRIBUTES, + IncidentStatusPagesSuggestionData.JSON_PROPERTY_ID, + IncidentStatusPagesSuggestionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPagesSuggestionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentStatusPagesSuggestionDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentStatusPagesSuggestionType type; + + public IncidentStatusPagesSuggestionData() {} + + @JsonCreator + public IncidentStatusPagesSuggestionData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentStatusPagesSuggestionDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentStatusPagesSuggestionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentStatusPagesSuggestionData attributes( + IncidentStatusPagesSuggestionDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a status pages suggestion. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPagesSuggestionDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentStatusPagesSuggestionDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentStatusPagesSuggestionData id(String id) { + this.id = id; + return this; + } + + /** + * The suggestion title. + * + * @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 IncidentStatusPagesSuggestionData type(IncidentStatusPagesSuggestionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident status pages suggestion resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPagesSuggestionType getType() { + return type; + } + + public void setType(IncidentStatusPagesSuggestionType 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 IncidentStatusPagesSuggestionData + */ + @JsonAnySetter + public IncidentStatusPagesSuggestionData 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 IncidentStatusPagesSuggestionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPagesSuggestionData incidentStatusPagesSuggestionData = + (IncidentStatusPagesSuggestionData) o; + return Objects.equals(this.attributes, incidentStatusPagesSuggestionData.attributes) + && Objects.equals(this.id, incidentStatusPagesSuggestionData.id) + && Objects.equals(this.type, incidentStatusPagesSuggestionData.type) + && Objects.equals( + this.additionalProperties, incidentStatusPagesSuggestionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPagesSuggestionData {\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/IncidentStatusPagesSuggestionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPagesSuggestionDataAttributes.java new file mode 100644 index 00000000000..12804aed9f0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPagesSuggestionDataAttributes.java @@ -0,0 +1,177 @@ +/* + * 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 of a status pages suggestion. */ +@JsonPropertyOrder({ + IncidentStatusPagesSuggestionDataAttributes.JSON_PROPERTY_STATUS, + IncidentStatusPagesSuggestionDataAttributes.JSON_PROPERTY_UPDATE_TEXT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPagesSuggestionDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_UPDATE_TEXT = "update_text"; + private String updateText; + + public IncidentStatusPagesSuggestionDataAttributes() {} + + @JsonCreator + public IncidentStatusPagesSuggestionDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATE_TEXT) String updateText) { + this.status = status; + this.updateText = updateText; + } + + public IncidentStatusPagesSuggestionDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The suggested status for the status page. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public IncidentStatusPagesSuggestionDataAttributes updateText(String updateText) { + this.updateText = updateText; + return this; + } + + /** + * The suggested update text for the status page notice. + * + * @return updateText + */ + @JsonProperty(JSON_PROPERTY_UPDATE_TEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUpdateText() { + return updateText; + } + + public void setUpdateText(String updateText) { + this.updateText = updateText; + } + + /** + * 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 IncidentStatusPagesSuggestionDataAttributes + */ + @JsonAnySetter + public IncidentStatusPagesSuggestionDataAttributes 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 IncidentStatusPagesSuggestionDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPagesSuggestionDataAttributes incidentStatusPagesSuggestionDataAttributes = + (IncidentStatusPagesSuggestionDataAttributes) o; + return Objects.equals(this.status, incidentStatusPagesSuggestionDataAttributes.status) + && Objects.equals(this.updateText, incidentStatusPagesSuggestionDataAttributes.updateText) + && Objects.equals( + this.additionalProperties, + incidentStatusPagesSuggestionDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(status, updateText, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPagesSuggestionDataAttributes {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" updateText: ").append(toIndentedString(updateText)).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/IncidentStatusPagesSuggestionResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPagesSuggestionResponse.java new file mode 100644 index 00000000000..f9dc17028c1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPagesSuggestionResponse.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; + +/** Response with a status pages suggestion. */ +@JsonPropertyOrder({IncidentStatusPagesSuggestionResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatusPagesSuggestionResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentStatusPagesSuggestionData data; + + public IncidentStatusPagesSuggestionResponse() {} + + @JsonCreator + public IncidentStatusPagesSuggestionResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentStatusPagesSuggestionData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentStatusPagesSuggestionResponse data(IncidentStatusPagesSuggestionData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Status pages suggestion data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatusPagesSuggestionData getData() { + return data; + } + + public void setData(IncidentStatusPagesSuggestionData 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 IncidentStatusPagesSuggestionResponse + */ + @JsonAnySetter + public IncidentStatusPagesSuggestionResponse 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 IncidentStatusPagesSuggestionResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatusPagesSuggestionResponse incidentStatusPagesSuggestionResponse = + (IncidentStatusPagesSuggestionResponse) o; + return Objects.equals(this.data, incidentStatusPagesSuggestionResponse.data) + && Objects.equals( + this.additionalProperties, incidentStatusPagesSuggestionResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatusPagesSuggestionResponse {\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/IncidentStatusPagesSuggestionType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPagesSuggestionType.java new file mode 100644 index 00000000000..3ce712adc5b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatusPagesSuggestionType.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; + +/** Incident status pages suggestion resource type. */ +@JsonSerialize( + using = IncidentStatusPagesSuggestionType.IncidentStatusPagesSuggestionTypeSerializer.class) +public class IncidentStatusPagesSuggestionType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_statuspages_suggestion")); + + public static final IncidentStatusPagesSuggestionType INCIDENT_STATUSPAGES_SUGGESTION = + new IncidentStatusPagesSuggestionType("incident_statuspages_suggestion"); + + IncidentStatusPagesSuggestionType(String value) { + super(value, allowedValues); + } + + public static class IncidentStatusPagesSuggestionTypeSerializer + extends StdSerializer { + public IncidentStatusPagesSuggestionTypeSerializer(Class t) { + super(t); + } + + public IncidentStatusPagesSuggestionTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentStatusPagesSuggestionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentStatusPagesSuggestionType fromValue(String value) { + return new IncidentStatusPagesSuggestionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentDataAttributesRequest.java new file mode 100644 index 00000000000..6cbb0598f3f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentDataAttributesRequest.java @@ -0,0 +1,372 @@ +/* + * 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 creating or updating a Statuspage incident. */ +@JsonPropertyOrder({ + IncidentStatuspageIncidentDataAttributesRequest.JSON_PROPERTY_BODY, + IncidentStatuspageIncidentDataAttributesRequest.JSON_PROPERTY_COMPONENTS, + IncidentStatuspageIncidentDataAttributesRequest.JSON_PROPERTY_DELIVER_NOTIFICATIONS, + IncidentStatuspageIncidentDataAttributesRequest.JSON_PROPERTY_IMPACT, + IncidentStatuspageIncidentDataAttributesRequest.JSON_PROPERTY_NAME, + IncidentStatuspageIncidentDataAttributesRequest.JSON_PROPERTY_PAGE_ID, + IncidentStatuspageIncidentDataAttributesRequest.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageIncidentDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BODY = "body"; + private JsonNullable body = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private Map components = null; + + public static final String JSON_PROPERTY_DELIVER_NOTIFICATIONS = "deliver_notifications"; + private JsonNullable deliverNotifications = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IMPACT = "impact"; + private JsonNullable impact = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PAGE_ID = "page_id"; + private String pageId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private JsonNullable status = JsonNullable.undefined(); + + public IncidentStatuspageIncidentDataAttributesRequest body(String body) { + this.body = JsonNullable.of(body); + return this; + } + + /** + * The body text of the Statuspage incident. + * + * @return body + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getBody() { + return body.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BODY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getBody_JsonNullable() { + return body; + } + + @JsonProperty(JSON_PROPERTY_BODY) + public void setBody_JsonNullable(JsonNullable body) { + this.body = body; + } + + public void setBody(String body) { + this.body = JsonNullable.of(body); + } + + public IncidentStatuspageIncidentDataAttributesRequest components( + Map components) { + this.components = components; + return this; + } + + public IncidentStatuspageIncidentDataAttributesRequest putComponentsItem( + String key, String componentsItem) { + if (this.components == null) { + this.components = new HashMap<>(); + } + this.components.put(key, componentsItem); + return this; + } + + /** + * Map of component identifiers to their status. + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getComponents() { + return components; + } + + public void setComponents(Map components) { + this.components = components; + } + + public IncidentStatuspageIncidentDataAttributesRequest deliverNotifications( + Boolean deliverNotifications) { + this.deliverNotifications = JsonNullable.of(deliverNotifications); + return this; + } + + /** + * Whether to deliver notifications. + * + * @return deliverNotifications + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getDeliverNotifications() { + return deliverNotifications.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELIVER_NOTIFICATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDeliverNotifications_JsonNullable() { + return deliverNotifications; + } + + @JsonProperty(JSON_PROPERTY_DELIVER_NOTIFICATIONS) + public void setDeliverNotifications_JsonNullable(JsonNullable deliverNotifications) { + this.deliverNotifications = deliverNotifications; + } + + public void setDeliverNotifications(Boolean deliverNotifications) { + this.deliverNotifications = JsonNullable.of(deliverNotifications); + } + + public IncidentStatuspageIncidentDataAttributesRequest impact(String impact) { + this.impact = JsonNullable.of(impact); + return this; + } + + /** + * The impact level of the incident. + * + * @return impact + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getImpact() { + return impact.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IMPACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getImpact_JsonNullable() { + return impact; + } + + @JsonProperty(JSON_PROPERTY_IMPACT) + public void setImpact_JsonNullable(JsonNullable impact) { + this.impact = impact; + } + + public void setImpact(String impact) { + this.impact = JsonNullable.of(impact); + } + + public IncidentStatuspageIncidentDataAttributesRequest name(String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * The name of the Statuspage incident. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(String name) { + this.name = JsonNullable.of(name); + } + + public IncidentStatuspageIncidentDataAttributesRequest pageId(String pageId) { + this.pageId = pageId; + return this; + } + + /** + * The Statuspage page identifier. + * + * @return pageId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPageId() { + return pageId; + } + + public void setPageId(String pageId) { + this.pageId = pageId; + } + + public IncidentStatuspageIncidentDataAttributesRequest status(String status) { + this.status = JsonNullable.of(status); + return this; + } + + /** + * The status of the Statuspage incident. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getStatus() { + return status.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getStatus_JsonNullable() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + public void setStatus_JsonNullable(JsonNullable status) { + this.status = status; + } + + public void setStatus(String status) { + this.status = JsonNullable.of(status); + } + + /** + * 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 IncidentStatuspageIncidentDataAttributesRequest + */ + @JsonAnySetter + public IncidentStatuspageIncidentDataAttributesRequest 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 IncidentStatuspageIncidentDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageIncidentDataAttributesRequest + incidentStatuspageIncidentDataAttributesRequest = + (IncidentStatuspageIncidentDataAttributesRequest) o; + return Objects.equals(this.body, incidentStatuspageIncidentDataAttributesRequest.body) + && Objects.equals( + this.components, incidentStatuspageIncidentDataAttributesRequest.components) + && Objects.equals( + this.deliverNotifications, + incidentStatuspageIncidentDataAttributesRequest.deliverNotifications) + && Objects.equals(this.impact, incidentStatuspageIncidentDataAttributesRequest.impact) + && Objects.equals(this.name, incidentStatuspageIncidentDataAttributesRequest.name) + && Objects.equals(this.pageId, incidentStatuspageIncidentDataAttributesRequest.pageId) + && Objects.equals(this.status, incidentStatuspageIncidentDataAttributesRequest.status) + && Objects.equals( + this.additionalProperties, + incidentStatuspageIncidentDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + body, components, deliverNotifications, impact, name, pageId, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageIncidentDataAttributesRequest {\n"); + sb.append(" body: ").append(toIndentedString(body)).append("\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" deliverNotifications: ") + .append(toIndentedString(deliverNotifications)) + .append("\n"); + sb.append(" impact: ").append(toIndentedString(impact)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" pageId: ").append(toIndentedString(pageId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IncidentStatuspageIncidentDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentDataAttributesResponse.java new file mode 100644 index 00000000000..d1f78436a9d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentDataAttributesResponse.java @@ -0,0 +1,281 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Statuspage incident integration. */ +@JsonPropertyOrder({ + IncidentStatuspageIncidentDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentStatuspageIncidentDataAttributesResponse.JSON_PROPERTY_INCIDENTS, + IncidentStatuspageIncidentDataAttributesResponse.JSON_PROPERTY_INTEGRATION_TYPE, + IncidentStatuspageIncidentDataAttributesResponse.JSON_PROPERTY_MODIFIED, + IncidentStatuspageIncidentDataAttributesResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageIncidentDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_INCIDENTS = "incidents"; + private List incidents = null; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private String integrationType; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public IncidentStatuspageIncidentDataAttributesResponse() {} + + @JsonCreator + public IncidentStatuspageIncidentDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) String integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.created = created; + this.integrationType = integrationType; + this.modified = modified; + this.status = status; + } + + public IncidentStatuspageIncidentDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the integration 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 IncidentStatuspageIncidentDataAttributesResponse incidents( + List incidents) { + this.incidents = incidents; + for (IncidentStatuspageIncidentEntry item : incidents) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentStatuspageIncidentDataAttributesResponse addIncidentsItem( + IncidentStatuspageIncidentEntry incidentsItem) { + if (this.incidents == null) { + this.incidents = new ArrayList<>(); + } + this.incidents.add(incidentsItem); + this.unparsed |= incidentsItem.unparsed; + return this; + } + + /** + * List of Statuspage incidents. + * + * @return incidents + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncidents() { + return incidents; + } + + public void setIncidents(List incidents) { + this.incidents = incidents; + } + + public IncidentStatuspageIncidentDataAttributesResponse integrationType(String integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + * The type of integration. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(String integrationType) { + this.integrationType = integrationType; + } + + public IncidentStatuspageIncidentDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the integration 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 IncidentStatuspageIncidentDataAttributesResponse status(String status) { + this.status = status; + return this; + } + + /** + * The status of the integration. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * 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 IncidentStatuspageIncidentDataAttributesResponse + */ + @JsonAnySetter + public IncidentStatuspageIncidentDataAttributesResponse 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 IncidentStatuspageIncidentDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageIncidentDataAttributesResponse + incidentStatuspageIncidentDataAttributesResponse = + (IncidentStatuspageIncidentDataAttributesResponse) o; + return Objects.equals(this.created, incidentStatuspageIncidentDataAttributesResponse.created) + && Objects.equals( + this.incidents, incidentStatuspageIncidentDataAttributesResponse.incidents) + && Objects.equals( + this.integrationType, incidentStatuspageIncidentDataAttributesResponse.integrationType) + && Objects.equals(this.modified, incidentStatuspageIncidentDataAttributesResponse.modified) + && Objects.equals(this.status, incidentStatuspageIncidentDataAttributesResponse.status) + && Objects.equals( + this.additionalProperties, + incidentStatuspageIncidentDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + created, incidents, integrationType, modified, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageIncidentDataAttributesResponse {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" incidents: ").append(toIndentedString(incidents)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IncidentStatuspageIncidentDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentDataRequest.java new file mode 100644 index 00000000000..3579e1e5c18 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentDataRequest.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; + +/** Statuspage incident data for a request. */ +@JsonPropertyOrder({ + IncidentStatuspageIncidentDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentStatuspageIncidentDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageIncidentDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentStatuspageIncidentDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentStatuspageIncidentType type; + + public IncidentStatuspageIncidentDataRequest() {} + + @JsonCreator + public IncidentStatuspageIncidentDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentStatuspageIncidentDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentStatuspageIncidentType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentStatuspageIncidentDataRequest attributes( + IncidentStatuspageIncidentDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a Statuspage incident. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageIncidentDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentStatuspageIncidentDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentStatuspageIncidentDataRequest type(IncidentStatuspageIncidentType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Statuspage incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageIncidentType getType() { + return type; + } + + public void setType(IncidentStatuspageIncidentType 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 IncidentStatuspageIncidentDataRequest + */ + @JsonAnySetter + public IncidentStatuspageIncidentDataRequest 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 IncidentStatuspageIncidentDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageIncidentDataRequest incidentStatuspageIncidentDataRequest = + (IncidentStatuspageIncidentDataRequest) o; + return Objects.equals(this.attributes, incidentStatuspageIncidentDataRequest.attributes) + && Objects.equals(this.type, incidentStatuspageIncidentDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentStatuspageIncidentDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageIncidentDataRequest {\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/IncidentStatuspageIncidentDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentDataResponse.java new file mode 100644 index 00000000000..e0956ba4ca2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentDataResponse.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; + +/** Statuspage incident data in a response. */ +@JsonPropertyOrder({ + IncidentStatuspageIncidentDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentStatuspageIncidentDataResponse.JSON_PROPERTY_ID, + IncidentStatuspageIncidentDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageIncidentDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentStatuspageIncidentDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentStatuspageIncidentType type; + + public IncidentStatuspageIncidentDataResponse() {} + + @JsonCreator + public IncidentStatuspageIncidentDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentStatuspageIncidentDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentStatuspageIncidentType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentStatuspageIncidentDataResponse attributes( + IncidentStatuspageIncidentDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Statuspage incident integration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageIncidentDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentStatuspageIncidentDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentStatuspageIncidentDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The integration 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 IncidentStatuspageIncidentDataResponse type(IncidentStatuspageIncidentType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Statuspage incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageIncidentType getType() { + return type; + } + + public void setType(IncidentStatuspageIncidentType 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 IncidentStatuspageIncidentDataResponse + */ + @JsonAnySetter + public IncidentStatuspageIncidentDataResponse 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 IncidentStatuspageIncidentDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageIncidentDataResponse incidentStatuspageIncidentDataResponse = + (IncidentStatuspageIncidentDataResponse) o; + return Objects.equals(this.attributes, incidentStatuspageIncidentDataResponse.attributes) + && Objects.equals(this.id, incidentStatuspageIncidentDataResponse.id) + && Objects.equals(this.type, incidentStatuspageIncidentDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentStatuspageIncidentDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageIncidentDataResponse {\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/IncidentStatuspageIncidentEntry.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentEntry.java new file mode 100644 index 00000000000..c6218d93cab --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentEntry.java @@ -0,0 +1,202 @@ +/* + * 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 Statuspage incident entry. */ +@JsonPropertyOrder({ + IncidentStatuspageIncidentEntry.JSON_PROPERTY_INCIDENT_ID, + IncidentStatuspageIncidentEntry.JSON_PROPERTY_PAGE_ID, + IncidentStatuspageIncidentEntry.JSON_PROPERTY_REDIRECT_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageIncidentEntry { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_ID = "incident_id"; + private String incidentId; + + public static final String JSON_PROPERTY_PAGE_ID = "page_id"; + private String pageId; + + public static final String JSON_PROPERTY_REDIRECT_URL = "redirect_url"; + private String redirectUrl; + + public IncidentStatuspageIncidentEntry() {} + + @JsonCreator + public IncidentStatuspageIncidentEntry( + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_ID) String incidentId, + @JsonProperty(required = true, value = JSON_PROPERTY_PAGE_ID) String pageId) { + this.incidentId = incidentId; + this.pageId = pageId; + } + + public IncidentStatuspageIncidentEntry incidentId(String incidentId) { + this.incidentId = incidentId; + return this; + } + + /** + * The Datadog 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 IncidentStatuspageIncidentEntry pageId(String pageId) { + this.pageId = pageId; + return this; + } + + /** + * The Statuspage page identifier. + * + * @return pageId + */ + @JsonProperty(JSON_PROPERTY_PAGE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPageId() { + return pageId; + } + + public void setPageId(String pageId) { + this.pageId = pageId; + } + + public IncidentStatuspageIncidentEntry redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + * The URL of the Statuspage incident. + * + * @return redirectUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + /** + * 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 IncidentStatuspageIncidentEntry + */ + @JsonAnySetter + public IncidentStatuspageIncidentEntry 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 IncidentStatuspageIncidentEntry object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageIncidentEntry incidentStatuspageIncidentEntry = + (IncidentStatuspageIncidentEntry) o; + return Objects.equals(this.incidentId, incidentStatuspageIncidentEntry.incidentId) + && Objects.equals(this.pageId, incidentStatuspageIncidentEntry.pageId) + && Objects.equals(this.redirectUrl, incidentStatuspageIncidentEntry.redirectUrl) + && Objects.equals( + this.additionalProperties, incidentStatuspageIncidentEntry.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(incidentId, pageId, redirectUrl, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageIncidentEntry {\n"); + sb.append(" incidentId: ").append(toIndentedString(incidentId)).append("\n"); + sb.append(" pageId: ").append(toIndentedString(pageId)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).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/IncidentStatuspageIncidentRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentRequest.java new file mode 100644 index 00000000000..1105f298d34 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentRequest.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 to create or update a Statuspage incident. */ +@JsonPropertyOrder({IncidentStatuspageIncidentRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageIncidentRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentStatuspageIncidentDataRequest data; + + public IncidentStatuspageIncidentRequest() {} + + @JsonCreator + public IncidentStatuspageIncidentRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentStatuspageIncidentDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentStatuspageIncidentRequest data(IncidentStatuspageIncidentDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Statuspage incident data for a request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageIncidentDataRequest getData() { + return data; + } + + public void setData(IncidentStatuspageIncidentDataRequest 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 IncidentStatuspageIncidentRequest + */ + @JsonAnySetter + public IncidentStatuspageIncidentRequest 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 IncidentStatuspageIncidentRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageIncidentRequest incidentStatuspageIncidentRequest = + (IncidentStatuspageIncidentRequest) o; + return Objects.equals(this.data, incidentStatuspageIncidentRequest.data) + && Objects.equals( + this.additionalProperties, incidentStatuspageIncidentRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageIncidentRequest {\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/IncidentStatuspageIncidentResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentResponse.java new file mode 100644 index 00000000000..2e16bee58f7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentResponse.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; + +/** Response with Statuspage incident integration metadata. */ +@JsonPropertyOrder({IncidentStatuspageIncidentResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageIncidentResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentStatuspageIncidentDataResponse data; + + public IncidentStatuspageIncidentResponse() {} + + @JsonCreator + public IncidentStatuspageIncidentResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentStatuspageIncidentDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentStatuspageIncidentResponse data(IncidentStatuspageIncidentDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Statuspage incident data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageIncidentDataResponse getData() { + return data; + } + + public void setData(IncidentStatuspageIncidentDataResponse 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 IncidentStatuspageIncidentResponse + */ + @JsonAnySetter + public IncidentStatuspageIncidentResponse 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 IncidentStatuspageIncidentResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageIncidentResponse incidentStatuspageIncidentResponse = + (IncidentStatuspageIncidentResponse) o; + return Objects.equals(this.data, incidentStatuspageIncidentResponse.data) + && Objects.equals( + this.additionalProperties, incidentStatuspageIncidentResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageIncidentResponse {\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/IncidentStatuspageIncidentType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentType.java new file mode 100644 index 00000000000..bf4ec6085e1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageIncidentType.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; + +/** Statuspage incident integration resource type. */ +@JsonSerialize( + using = IncidentStatuspageIncidentType.IncidentStatuspageIncidentTypeSerializer.class) +public class IncidentStatuspageIncidentType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_integrations")); + + public static final IncidentStatuspageIncidentType INCIDENT_INTEGRATIONS = + new IncidentStatuspageIncidentType("incident_integrations"); + + IncidentStatuspageIncidentType(String value) { + super(value, allowedValues); + } + + public static class IncidentStatuspageIncidentTypeSerializer + extends StdSerializer { + public IncidentStatuspageIncidentTypeSerializer(Class t) { + super(t); + } + + public IncidentStatuspageIncidentTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentStatuspageIncidentType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentStatuspageIncidentType fromValue(String value) { + return new IncidentStatuspageIncidentType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspagePreferencesData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspagePreferencesData.java new file mode 100644 index 00000000000..ed229893a97 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspagePreferencesData.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Subscription preferences data. */ +@JsonPropertyOrder({ + IncidentStatuspagePreferencesData.JSON_PROPERTY_ATTRIBUTES, + IncidentStatuspagePreferencesData.JSON_PROPERTY_ID, + IncidentStatuspagePreferencesData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspagePreferencesData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentStatuspagePreferencesDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentStatuspagePreferencesType type; + + public IncidentStatuspagePreferencesData() {} + + @JsonCreator + public IncidentStatuspagePreferencesData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentStatuspagePreferencesDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentStatuspagePreferencesType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentStatuspagePreferencesData attributes( + IncidentStatuspagePreferencesDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of subscription preferences. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspagePreferencesDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentStatuspagePreferencesDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentStatuspagePreferencesData id(String id) { + this.id = id; + return this; + } + + /** + * The preferences identifier. + * + * @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 IncidentStatuspagePreferencesData type(IncidentStatuspagePreferencesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Subscription preferences resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspagePreferencesType getType() { + return type; + } + + public void setType(IncidentStatuspagePreferencesType 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 IncidentStatuspagePreferencesData + */ + @JsonAnySetter + public IncidentStatuspagePreferencesData 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 IncidentStatuspagePreferencesData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspagePreferencesData incidentStatuspagePreferencesData = + (IncidentStatuspagePreferencesData) o; + return Objects.equals(this.attributes, incidentStatuspagePreferencesData.attributes) + && Objects.equals(this.id, incidentStatuspagePreferencesData.id) + && Objects.equals(this.type, incidentStatuspagePreferencesData.type) + && Objects.equals( + this.additionalProperties, incidentStatuspagePreferencesData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspagePreferencesData {\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/IncidentStatuspagePreferencesDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspagePreferencesDataAttributes.java new file mode 100644 index 00000000000..4065fa48eb0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspagePreferencesDataAttributes.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; + +/** Attributes of subscription preferences. */ +@JsonPropertyOrder({IncidentStatuspagePreferencesDataAttributes.JSON_PROPERTY_SUBSCRIBED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspagePreferencesDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SUBSCRIBED = "subscribed"; + private Boolean subscribed; + + public IncidentStatuspagePreferencesDataAttributes() {} + + @JsonCreator + public IncidentStatuspagePreferencesDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_SUBSCRIBED) Boolean subscribed) { + this.subscribed = subscribed; + } + + public IncidentStatuspagePreferencesDataAttributes subscribed(Boolean subscribed) { + this.subscribed = subscribed; + return this; + } + + /** + * Whether the user is subscribed. + * + * @return subscribed + */ + @JsonProperty(JSON_PROPERTY_SUBSCRIBED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSubscribed() { + return subscribed; + } + + public void setSubscribed(Boolean subscribed) { + this.subscribed = subscribed; + } + + /** + * 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 IncidentStatuspagePreferencesDataAttributes + */ + @JsonAnySetter + public IncidentStatuspagePreferencesDataAttributes 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 IncidentStatuspagePreferencesDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspagePreferencesDataAttributes incidentStatuspagePreferencesDataAttributes = + (IncidentStatuspagePreferencesDataAttributes) o; + return Objects.equals(this.subscribed, incidentStatuspagePreferencesDataAttributes.subscribed) + && Objects.equals( + this.additionalProperties, + incidentStatuspagePreferencesDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(subscribed, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspagePreferencesDataAttributes {\n"); + sb.append(" subscribed: ").append(toIndentedString(subscribed)).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/IncidentStatuspagePreferencesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspagePreferencesResponse.java new file mode 100644 index 00000000000..787bf2f46ed --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspagePreferencesResponse.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; + +/** Response with subscription preferences. */ +@JsonPropertyOrder({IncidentStatuspagePreferencesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspagePreferencesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentStatuspagePreferencesData data; + + public IncidentStatuspagePreferencesResponse() {} + + @JsonCreator + public IncidentStatuspagePreferencesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentStatuspagePreferencesData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentStatuspagePreferencesResponse data(IncidentStatuspagePreferencesData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Subscription preferences data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspagePreferencesData getData() { + return data; + } + + public void setData(IncidentStatuspagePreferencesData 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 IncidentStatuspagePreferencesResponse + */ + @JsonAnySetter + public IncidentStatuspagePreferencesResponse 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 IncidentStatuspagePreferencesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspagePreferencesResponse incidentStatuspagePreferencesResponse = + (IncidentStatuspagePreferencesResponse) o; + return Objects.equals(this.data, incidentStatuspagePreferencesResponse.data) + && Objects.equals( + this.additionalProperties, incidentStatuspagePreferencesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspagePreferencesResponse {\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/IncidentStatuspagePreferencesType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspagePreferencesType.java new file mode 100644 index 00000000000..126b47e2c7b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspagePreferencesType.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; + +/** Subscription preferences resource type. */ +@JsonSerialize( + using = IncidentStatuspagePreferencesType.IncidentStatuspagePreferencesTypeSerializer.class) +public class IncidentStatuspagePreferencesType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("statuspage_subscription_preferences")); + + public static final IncidentStatuspagePreferencesType STATUSPAGE_SUBSCRIPTION_PREFERENCES = + new IncidentStatuspagePreferencesType("statuspage_subscription_preferences"); + + IncidentStatuspagePreferencesType(String value) { + super(value, allowedValues); + } + + public static class IncidentStatuspagePreferencesTypeSerializer + extends StdSerializer { + public IncidentStatuspagePreferencesTypeSerializer(Class t) { + super(t); + } + + public IncidentStatuspagePreferencesTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentStatuspagePreferencesType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentStatuspagePreferencesType fromValue(String value) { + return new IncidentStatuspagePreferencesType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionDataAttributesRequest.java new file mode 100644 index 00000000000..76a76abf2bb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionDataAttributesRequest.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; + +/** Attributes for creating an email subscription. */ +@JsonPropertyOrder({IncidentStatuspageSubscriptionDataAttributesRequest.JSON_PROPERTY_EMAIL}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageSubscriptionDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public IncidentStatuspageSubscriptionDataAttributesRequest() {} + + @JsonCreator + public IncidentStatuspageSubscriptionDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_EMAIL) String email) { + this.email = email; + } + + public IncidentStatuspageSubscriptionDataAttributesRequest email(String email) { + this.email = email; + return this; + } + + /** + * The email address to subscribe. + * + * @return email + */ + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + /** + * 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 IncidentStatuspageSubscriptionDataAttributesRequest + */ + @JsonAnySetter + public IncidentStatuspageSubscriptionDataAttributesRequest 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 IncidentStatuspageSubscriptionDataAttributesRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageSubscriptionDataAttributesRequest + incidentStatuspageSubscriptionDataAttributesRequest = + (IncidentStatuspageSubscriptionDataAttributesRequest) o; + return Objects.equals(this.email, incidentStatuspageSubscriptionDataAttributesRequest.email) + && Objects.equals( + this.additionalProperties, + incidentStatuspageSubscriptionDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(email, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageSubscriptionDataAttributesRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).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/IncidentStatuspageSubscriptionDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionDataAttributesResponse.java new file mode 100644 index 00000000000..ee270199750 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionDataAttributesResponse.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 email subscription. */ +@JsonPropertyOrder({ + IncidentStatuspageSubscriptionDataAttributesResponse.JSON_PROPERTY_CONFIRMED, + IncidentStatuspageSubscriptionDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + IncidentStatuspageSubscriptionDataAttributesResponse.JSON_PROPERTY_EMAIL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageSubscriptionDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIRMED = "confirmed"; + private Boolean confirmed; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public IncidentStatuspageSubscriptionDataAttributesResponse() {} + + @JsonCreator + public IncidentStatuspageSubscriptionDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIRMED) Boolean confirmed, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EMAIL) String email) { + this.confirmed = confirmed; + this.createdAt = createdAt; + this.email = email; + } + + public IncidentStatuspageSubscriptionDataAttributesResponse confirmed(Boolean confirmed) { + this.confirmed = confirmed; + return this; + } + + /** + * Whether the subscription has been confirmed. + * + * @return confirmed + */ + @JsonProperty(JSON_PROPERTY_CONFIRMED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getConfirmed() { + return confirmed; + } + + public void setConfirmed(Boolean confirmed) { + this.confirmed = confirmed; + } + + public IncidentStatuspageSubscriptionDataAttributesResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the subscription 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 IncidentStatuspageSubscriptionDataAttributesResponse email(String email) { + this.email = email; + return this; + } + + /** + * The subscribed email address. + * + * @return email + */ + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + /** + * 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 IncidentStatuspageSubscriptionDataAttributesResponse + */ + @JsonAnySetter + public IncidentStatuspageSubscriptionDataAttributesResponse 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 IncidentStatuspageSubscriptionDataAttributesResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageSubscriptionDataAttributesResponse + incidentStatuspageSubscriptionDataAttributesResponse = + (IncidentStatuspageSubscriptionDataAttributesResponse) o; + return Objects.equals( + this.confirmed, incidentStatuspageSubscriptionDataAttributesResponse.confirmed) + && Objects.equals( + this.createdAt, incidentStatuspageSubscriptionDataAttributesResponse.createdAt) + && Objects.equals(this.email, incidentStatuspageSubscriptionDataAttributesResponse.email) + && Objects.equals( + this.additionalProperties, + incidentStatuspageSubscriptionDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(confirmed, createdAt, email, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageSubscriptionDataAttributesResponse {\n"); + sb.append(" confirmed: ").append(toIndentedString(confirmed)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).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/IncidentStatuspageSubscriptionDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionDataRequest.java new file mode 100644 index 00000000000..af89c7a714f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionDataRequest.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; + +/** Subscription data for a request. */ +@JsonPropertyOrder({ + IncidentStatuspageSubscriptionDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentStatuspageSubscriptionDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageSubscriptionDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentStatuspageSubscriptionDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentStatuspageSubscriptionType type; + + public IncidentStatuspageSubscriptionDataRequest() {} + + @JsonCreator + public IncidentStatuspageSubscriptionDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentStatuspageSubscriptionDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentStatuspageSubscriptionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentStatuspageSubscriptionDataRequest attributes( + IncidentStatuspageSubscriptionDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating an email subscription. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageSubscriptionDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentStatuspageSubscriptionDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentStatuspageSubscriptionDataRequest type(IncidentStatuspageSubscriptionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Statuspage email subscription resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageSubscriptionType getType() { + return type; + } + + public void setType(IncidentStatuspageSubscriptionType 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 IncidentStatuspageSubscriptionDataRequest + */ + @JsonAnySetter + public IncidentStatuspageSubscriptionDataRequest 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 IncidentStatuspageSubscriptionDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageSubscriptionDataRequest incidentStatuspageSubscriptionDataRequest = + (IncidentStatuspageSubscriptionDataRequest) o; + return Objects.equals(this.attributes, incidentStatuspageSubscriptionDataRequest.attributes) + && Objects.equals(this.type, incidentStatuspageSubscriptionDataRequest.type) + && Objects.equals( + this.additionalProperties, + incidentStatuspageSubscriptionDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageSubscriptionDataRequest {\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/IncidentStatuspageSubscriptionDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionDataResponse.java new file mode 100644 index 00000000000..7bf5ea97f40 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionDataResponse.java @@ -0,0 +1,215 @@ +/* + * 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; + +/** Email subscription data in a response. */ +@JsonPropertyOrder({ + IncidentStatuspageSubscriptionDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentStatuspageSubscriptionDataResponse.JSON_PROPERTY_ID, + IncidentStatuspageSubscriptionDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageSubscriptionDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentStatuspageSubscriptionDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentStatuspageSubscriptionType type; + + public IncidentStatuspageSubscriptionDataResponse() {} + + @JsonCreator + public IncidentStatuspageSubscriptionDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentStatuspageSubscriptionDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentStatuspageSubscriptionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentStatuspageSubscriptionDataResponse attributes( + IncidentStatuspageSubscriptionDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an email subscription. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageSubscriptionDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentStatuspageSubscriptionDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentStatuspageSubscriptionDataResponse id(String id) { + this.id = id; + return this; + } + + /** + * The subscription identifier. + * + * @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 IncidentStatuspageSubscriptionDataResponse type(IncidentStatuspageSubscriptionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Statuspage email subscription resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageSubscriptionType getType() { + return type; + } + + public void setType(IncidentStatuspageSubscriptionType 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 IncidentStatuspageSubscriptionDataResponse + */ + @JsonAnySetter + public IncidentStatuspageSubscriptionDataResponse 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 IncidentStatuspageSubscriptionDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageSubscriptionDataResponse incidentStatuspageSubscriptionDataResponse = + (IncidentStatuspageSubscriptionDataResponse) o; + return Objects.equals(this.attributes, incidentStatuspageSubscriptionDataResponse.attributes) + && Objects.equals(this.id, incidentStatuspageSubscriptionDataResponse.id) + && Objects.equals(this.type, incidentStatuspageSubscriptionDataResponse.type) + && Objects.equals( + this.additionalProperties, + incidentStatuspageSubscriptionDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageSubscriptionDataResponse {\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/IncidentStatuspageSubscriptionRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionRequest.java new file mode 100644 index 00000000000..ae561d86837 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionRequest.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 to create an email subscription. */ +@JsonPropertyOrder({IncidentStatuspageSubscriptionRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageSubscriptionRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentStatuspageSubscriptionDataRequest data; + + public IncidentStatuspageSubscriptionRequest() {} + + @JsonCreator + public IncidentStatuspageSubscriptionRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentStatuspageSubscriptionDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentStatuspageSubscriptionRequest data( + IncidentStatuspageSubscriptionDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Subscription data for a request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageSubscriptionDataRequest getData() { + return data; + } + + public void setData(IncidentStatuspageSubscriptionDataRequest 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 IncidentStatuspageSubscriptionRequest + */ + @JsonAnySetter + public IncidentStatuspageSubscriptionRequest 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 IncidentStatuspageSubscriptionRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageSubscriptionRequest incidentStatuspageSubscriptionRequest = + (IncidentStatuspageSubscriptionRequest) o; + return Objects.equals(this.data, incidentStatuspageSubscriptionRequest.data) + && Objects.equals( + this.additionalProperties, incidentStatuspageSubscriptionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageSubscriptionRequest {\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/IncidentStatuspageSubscriptionResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionResponse.java new file mode 100644 index 00000000000..b1f0af1180d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionResponse.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; + +/** Response with a single email subscription. */ +@JsonPropertyOrder({IncidentStatuspageSubscriptionResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageSubscriptionResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentStatuspageSubscriptionDataResponse data; + + public IncidentStatuspageSubscriptionResponse() {} + + @JsonCreator + public IncidentStatuspageSubscriptionResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentStatuspageSubscriptionDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentStatuspageSubscriptionResponse data( + IncidentStatuspageSubscriptionDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Email subscription data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentStatuspageSubscriptionDataResponse getData() { + return data; + } + + public void setData(IncidentStatuspageSubscriptionDataResponse 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 IncidentStatuspageSubscriptionResponse + */ + @JsonAnySetter + public IncidentStatuspageSubscriptionResponse 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 IncidentStatuspageSubscriptionResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageSubscriptionResponse incidentStatuspageSubscriptionResponse = + (IncidentStatuspageSubscriptionResponse) o; + return Objects.equals(this.data, incidentStatuspageSubscriptionResponse.data) + && Objects.equals( + this.additionalProperties, incidentStatuspageSubscriptionResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageSubscriptionResponse {\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/IncidentStatuspageSubscriptionType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionType.java new file mode 100644 index 00000000000..81d5036ea7b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionType.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; + +/** Statuspage email subscription resource type. */ +@JsonSerialize( + using = IncidentStatuspageSubscriptionType.IncidentStatuspageSubscriptionTypeSerializer.class) +public class IncidentStatuspageSubscriptionType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("statuspage_email_subscription")); + + public static final IncidentStatuspageSubscriptionType STATUSPAGE_EMAIL_SUBSCRIPTION = + new IncidentStatuspageSubscriptionType("statuspage_email_subscription"); + + IncidentStatuspageSubscriptionType(String value) { + super(value, allowedValues); + } + + public static class IncidentStatuspageSubscriptionTypeSerializer + extends StdSerializer { + public IncidentStatuspageSubscriptionTypeSerializer( + Class t) { + super(t); + } + + public IncidentStatuspageSubscriptionTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentStatuspageSubscriptionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentStatuspageSubscriptionType fromValue(String value) { + return new IncidentStatuspageSubscriptionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionsResponse.java new file mode 100644 index 00000000000..847a9a0c91c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentStatuspageSubscriptionsResponse.java @@ -0,0 +1,160 @@ +/* + * 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 email subscriptions. */ +@JsonPropertyOrder({IncidentStatuspageSubscriptionsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentStatuspageSubscriptionsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentStatuspageSubscriptionsResponse() {} + + @JsonCreator + public IncidentStatuspageSubscriptionsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentStatuspageSubscriptionsResponse data( + List data) { + this.data = data; + for (IncidentStatuspageSubscriptionDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentStatuspageSubscriptionsResponse addDataItem( + IncidentStatuspageSubscriptionDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of email subscriptions. + * + * @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 IncidentStatuspageSubscriptionsResponse + */ + @JsonAnySetter + public IncidentStatuspageSubscriptionsResponse 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 IncidentStatuspageSubscriptionsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentStatuspageSubscriptionsResponse incidentStatuspageSubscriptionsResponse = + (IncidentStatuspageSubscriptionsResponse) o; + return Objects.equals(this.data, incidentStatuspageSubscriptionsResponse.data) + && Objects.equals( + this.additionalProperties, + incidentStatuspageSubscriptionsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentStatuspageSubscriptionsResponse {\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/IncidentTemplateVariableData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTemplateVariableData.java new file mode 100644 index 00000000000..fab7118b16d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTemplateVariableData.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; + +/** Template variable data. */ +@JsonPropertyOrder({ + IncidentTemplateVariableData.JSON_PROPERTY_ATTRIBUTES, + IncidentTemplateVariableData.JSON_PROPERTY_ID, + IncidentTemplateVariableData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTemplateVariableData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentTemplateVariableDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentTemplateVariableType type; + + public IncidentTemplateVariableData() {} + + @JsonCreator + public IncidentTemplateVariableData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentTemplateVariableDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentTemplateVariableType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentTemplateVariableData attributes( + IncidentTemplateVariableDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a template variable. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTemplateVariableDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentTemplateVariableDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentTemplateVariableData id(String id) { + this.id = id; + return this; + } + + /** + * The template variable identifier. + * + * @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 IncidentTemplateVariableData type(IncidentTemplateVariableType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Template variable resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTemplateVariableType getType() { + return type; + } + + public void setType(IncidentTemplateVariableType 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 IncidentTemplateVariableData + */ + @JsonAnySetter + public IncidentTemplateVariableData 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 IncidentTemplateVariableData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTemplateVariableData incidentTemplateVariableData = (IncidentTemplateVariableData) o; + return Objects.equals(this.attributes, incidentTemplateVariableData.attributes) + && Objects.equals(this.id, incidentTemplateVariableData.id) + && Objects.equals(this.type, incidentTemplateVariableData.type) + && Objects.equals( + this.additionalProperties, incidentTemplateVariableData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTemplateVariableData {\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/IncidentTemplateVariableDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTemplateVariableDataAttributes.java new file mode 100644 index 00000000000..086746b38db --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTemplateVariableDataAttributes.java @@ -0,0 +1,231 @@ +/* + * 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 of a template variable. */ +@JsonPropertyOrder({ + IncidentTemplateVariableDataAttributes.JSON_PROPERTY_DESCRIPTION, + IncidentTemplateVariableDataAttributes.JSON_PROPERTY_DISPLAY_NAME, + IncidentTemplateVariableDataAttributes.JSON_PROPERTY_DOMAIN, + IncidentTemplateVariableDataAttributes.JSON_PROPERTY_VARIABLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTemplateVariableDataAttributes { + @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_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_VARIABLE = "variable"; + private String variable; + + public IncidentTemplateVariableDataAttributes() {} + + @JsonCreator + public IncidentTemplateVariableDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_DISPLAY_NAME) String displayName, + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_VARIABLE) String variable) { + this.description = description; + this.displayName = displayName; + this.domain = domain; + this.variable = variable; + } + + public IncidentTemplateVariableDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * A description of the template variable. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public IncidentTemplateVariableDataAttributes displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name of the template variable. + * + * @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 IncidentTemplateVariableDataAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain of the template variable. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public IncidentTemplateVariableDataAttributes variable(String variable) { + this.variable = variable; + return this; + } + + /** + * The variable name used in templates. + * + * @return variable + */ + @JsonProperty(JSON_PROPERTY_VARIABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVariable() { + return variable; + } + + public void setVariable(String variable) { + this.variable = variable; + } + + /** + * 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 IncidentTemplateVariableDataAttributes + */ + @JsonAnySetter + public IncidentTemplateVariableDataAttributes 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 IncidentTemplateVariableDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTemplateVariableDataAttributes incidentTemplateVariableDataAttributes = + (IncidentTemplateVariableDataAttributes) o; + return Objects.equals(this.description, incidentTemplateVariableDataAttributes.description) + && Objects.equals(this.displayName, incidentTemplateVariableDataAttributes.displayName) + && Objects.equals(this.domain, incidentTemplateVariableDataAttributes.domain) + && Objects.equals(this.variable, incidentTemplateVariableDataAttributes.variable) + && Objects.equals( + this.additionalProperties, incidentTemplateVariableDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, displayName, domain, variable, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTemplateVariableDataAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" variable: ").append(toIndentedString(variable)).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/IncidentTemplateVariableType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTemplateVariableType.java new file mode 100644 index 00000000000..3ee2d06010b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTemplateVariableType.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; + +/** Template variable resource type. */ +@JsonSerialize(using = IncidentTemplateVariableType.IncidentTemplateVariableTypeSerializer.class) +public class IncidentTemplateVariableType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("template_variables")); + + public static final IncidentTemplateVariableType TEMPLATE_VARIABLES = + new IncidentTemplateVariableType("template_variables"); + + IncidentTemplateVariableType(String value) { + super(value, allowedValues); + } + + public static class IncidentTemplateVariableTypeSerializer + extends StdSerializer { + public IncidentTemplateVariableTypeSerializer(Class t) { + super(t); + } + + public IncidentTemplateVariableTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentTemplateVariableType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentTemplateVariableType fromValue(String value) { + return new IncidentTemplateVariableType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTemplateVariablesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTemplateVariablesResponse.java new file mode 100644 index 00000000000..7b48c126cbb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTemplateVariablesResponse.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 template variables. */ +@JsonPropertyOrder({IncidentTemplateVariablesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTemplateVariablesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentTemplateVariablesResponse() {} + + @JsonCreator + public IncidentTemplateVariablesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentTemplateVariablesResponse data(List data) { + this.data = data; + for (IncidentTemplateVariableData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentTemplateVariablesResponse addDataItem(IncidentTemplateVariableData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of template variables. + * + * @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 IncidentTemplateVariablesResponse + */ + @JsonAnySetter + public IncidentTemplateVariablesResponse 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 IncidentTemplateVariablesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTemplateVariablesResponse incidentTemplateVariablesResponse = + (IncidentTemplateVariablesResponse) o; + return Objects.equals(this.data, incidentTemplateVariablesResponse.data) + && Objects.equals( + this.additionalProperties, incidentTemplateVariablesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTemplateVariablesResponse {\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/IncidentTimelineCellSource.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellSource.java new file mode 100644 index 00000000000..7290ee55268 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellSource.java @@ -0,0 +1,61 @@ +/* + * 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 source of a timeline cell. */ +@JsonSerialize(using = IncidentTimelineCellSource.IncidentTimelineCellSourceSerializer.class) +public class IncidentTimelineCellSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("slack", "microsoft_teams", "datadog", "api")); + + public static final IncidentTimelineCellSource SLACK = new IncidentTimelineCellSource("slack"); + public static final IncidentTimelineCellSource MICROSOFT_TEAMS = + new IncidentTimelineCellSource("microsoft_teams"); + public static final IncidentTimelineCellSource DATADOG = + new IncidentTimelineCellSource("datadog"); + public static final IncidentTimelineCellSource API = new IncidentTimelineCellSource("api"); + + IncidentTimelineCellSource(String value) { + super(value, allowedValues); + } + + public static class IncidentTimelineCellSourceSerializer + extends StdSerializer { + public IncidentTimelineCellSourceSerializer(Class t) { + super(t); + } + + public IncidentTimelineCellSourceSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentTimelineCellSource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentTimelineCellSource fromValue(String value) { + return new IncidentTimelineCellSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellType.java new file mode 100644 index 00000000000..a7a05ef017d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellType.java @@ -0,0 +1,76 @@ +/* + * 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 a timeline cell. */ +@JsonSerialize(using = IncidentTimelineCellType.IncidentTimelineCellTypeSerializer.class) +public class IncidentTimelineCellType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "markdown", + "incident_status_change", + "timestamp_change", + "meeting_summary", + "meeting_chat", + "role_assignment_change", + "postmortem_change")); + + public static final IncidentTimelineCellType MARKDOWN = new IncidentTimelineCellType("markdown"); + public static final IncidentTimelineCellType INCIDENT_STATUS_CHANGE = + new IncidentTimelineCellType("incident_status_change"); + public static final IncidentTimelineCellType TIMESTAMP_CHANGE = + new IncidentTimelineCellType("timestamp_change"); + public static final IncidentTimelineCellType MEETING_SUMMARY = + new IncidentTimelineCellType("meeting_summary"); + public static final IncidentTimelineCellType MEETING_CHAT = + new IncidentTimelineCellType("meeting_chat"); + public static final IncidentTimelineCellType ROLE_ASSIGNMENT_CHANGE = + new IncidentTimelineCellType("role_assignment_change"); + public static final IncidentTimelineCellType POSTMORTEM_CHANGE = + new IncidentTimelineCellType("postmortem_change"); + + IncidentTimelineCellType(String value) { + super(value, allowedValues); + } + + public static class IncidentTimelineCellTypeSerializer + extends StdSerializer { + public IncidentTimelineCellTypeSerializer(Class t) { + super(t); + } + + public IncidentTimelineCellTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentTimelineCellType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentTimelineCellType fromValue(String value) { + return new IncidentTimelineCellType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntriesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntriesResponse.java new file mode 100644 index 00000000000..fa79f1ef4e0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntriesResponse.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 timeline entries. */ +@JsonPropertyOrder({IncidentTimelineEntriesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineEntriesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentTimelineEntriesResponse() {} + + @JsonCreator + public IncidentTimelineEntriesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentTimelineEntriesResponse data(List data) { + this.data = data; + for (IncidentTimelineEntryDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentTimelineEntriesResponse addDataItem(IncidentTimelineEntryDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of timeline entries. + * + * @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 IncidentTimelineEntriesResponse + */ + @JsonAnySetter + public IncidentTimelineEntriesResponse 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 IncidentTimelineEntriesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineEntriesResponse incidentTimelineEntriesResponse = + (IncidentTimelineEntriesResponse) o; + return Objects.equals(this.data, incidentTimelineEntriesResponse.data) + && Objects.equals( + this.additionalProperties, incidentTimelineEntriesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineEntriesResponse {\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/IncidentTimelineEntryContent.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryContent.java new file mode 100644 index 00000000000..b2aaf6d087c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryContent.java @@ -0,0 +1,136 @@ +/* + * 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; + +/** The content of a timeline entry. */ +@JsonPropertyOrder({IncidentTimelineEntryContent.JSON_PROPERTY_MESSAGE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineEntryContent { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public IncidentTimelineEntryContent message(String message) { + this.message = message; + return this; + } + + /** + * The markdown message content. + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + /** + * 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 IncidentTimelineEntryContent + */ + @JsonAnySetter + public IncidentTimelineEntryContent 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 IncidentTimelineEntryContent object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineEntryContent incidentTimelineEntryContent = (IncidentTimelineEntryContent) o; + return Objects.equals(this.message, incidentTimelineEntryContent.message) + && Objects.equals( + this.additionalProperties, incidentTimelineEntryContent.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(message, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineEntryContent {\n"); + sb.append(" message: ").append(toIndentedString(message)).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/IncidentTimelineEntryDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryDataAttributesRequest.java new file mode 100644 index 00000000000..4be1524b80e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryDataAttributesRequest.java @@ -0,0 +1,241 @@ +/* + * 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 or updating a timeline entry. */ +@JsonPropertyOrder({ + IncidentTimelineEntryDataAttributesRequest.JSON_PROPERTY_CELL_TYPE, + IncidentTimelineEntryDataAttributesRequest.JSON_PROPERTY_CONTENT, + IncidentTimelineEntryDataAttributesRequest.JSON_PROPERTY_DISPLAY_TIME, + IncidentTimelineEntryDataAttributesRequest.JSON_PROPERTY_IMPORTANT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineEntryDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CELL_TYPE = "cell_type"; + private IncidentTimelineCellType cellType; + + public static final String JSON_PROPERTY_CONTENT = "content"; + private IncidentTimelineEntryContent content; + + public static final String JSON_PROPERTY_DISPLAY_TIME = "display_time"; + private OffsetDateTime displayTime; + + public static final String JSON_PROPERTY_IMPORTANT = "important"; + private Boolean important; + + public IncidentTimelineEntryDataAttributesRequest() {} + + @JsonCreator + public IncidentTimelineEntryDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_CELL_TYPE) + IncidentTimelineCellType cellType, + @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT) + IncidentTimelineEntryContent content) { + this.cellType = cellType; + this.unparsed |= !cellType.isValid(); + this.content = content; + this.unparsed |= content.unparsed; + } + + public IncidentTimelineEntryDataAttributesRequest cellType(IncidentTimelineCellType cellType) { + this.cellType = cellType; + this.unparsed |= !cellType.isValid(); + return this; + } + + /** + * The type of a timeline cell. + * + * @return cellType + */ + @JsonProperty(JSON_PROPERTY_CELL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineCellType getCellType() { + return cellType; + } + + public void setCellType(IncidentTimelineCellType cellType) { + if (!cellType.isValid()) { + this.unparsed = true; + } + this.cellType = cellType; + } + + public IncidentTimelineEntryDataAttributesRequest content(IncidentTimelineEntryContent content) { + this.content = content; + this.unparsed |= content.unparsed; + return this; + } + + /** + * The content of a timeline entry. + * + * @return content + */ + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryContent getContent() { + return content; + } + + public void setContent(IncidentTimelineEntryContent content) { + this.content = content; + } + + public IncidentTimelineEntryDataAttributesRequest displayTime(OffsetDateTime displayTime) { + this.displayTime = displayTime; + return this; + } + + /** + * The display time for this timeline entry. + * + * @return displayTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getDisplayTime() { + return displayTime; + } + + public void setDisplayTime(OffsetDateTime displayTime) { + this.displayTime = displayTime; + } + + public IncidentTimelineEntryDataAttributesRequest important(Boolean important) { + this.important = important; + return this; + } + + /** + * Whether this timeline entry is marked as important. + * + * @return important + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMPORTANT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getImportant() { + return important; + } + + public void setImportant(Boolean important) { + this.important = important; + } + + /** + * 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 IncidentTimelineEntryDataAttributesRequest + */ + @JsonAnySetter + public IncidentTimelineEntryDataAttributesRequest 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 IncidentTimelineEntryDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineEntryDataAttributesRequest incidentTimelineEntryDataAttributesRequest = + (IncidentTimelineEntryDataAttributesRequest) o; + return Objects.equals(this.cellType, incidentTimelineEntryDataAttributesRequest.cellType) + && Objects.equals(this.content, incidentTimelineEntryDataAttributesRequest.content) + && Objects.equals(this.displayTime, incidentTimelineEntryDataAttributesRequest.displayTime) + && Objects.equals(this.important, incidentTimelineEntryDataAttributesRequest.important) + && Objects.equals( + this.additionalProperties, + incidentTimelineEntryDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(cellType, content, displayTime, important, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineEntryDataAttributesRequest {\n"); + sb.append(" cellType: ").append(toIndentedString(cellType)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" displayTime: ").append(toIndentedString(displayTime)).append("\n"); + sb.append(" important: ").append(toIndentedString(important)).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/IncidentTimelineEntryDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryDataAttributesResponse.java new file mode 100644 index 00000000000..1858da70306 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryDataAttributesResponse.java @@ -0,0 +1,409 @@ +/* + * 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 timeline entry. */ +@JsonPropertyOrder({ + IncidentTimelineEntryDataAttributesResponse.JSON_PROPERTY_CELL_TYPE, + IncidentTimelineEntryDataAttributesResponse.JSON_PROPERTY_CONTENT, + IncidentTimelineEntryDataAttributesResponse.JSON_PROPERTY_CREATED, + IncidentTimelineEntryDataAttributesResponse.JSON_PROPERTY_DISPLAY_TIME, + IncidentTimelineEntryDataAttributesResponse.JSON_PROPERTY_IMPORTANT, + IncidentTimelineEntryDataAttributesResponse.JSON_PROPERTY_INCIDENT_ID, + IncidentTimelineEntryDataAttributesResponse.JSON_PROPERTY_MODIFIED, + IncidentTimelineEntryDataAttributesResponse.JSON_PROPERTY_PARENT_UUID, + IncidentTimelineEntryDataAttributesResponse.JSON_PROPERTY_SOURCE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineEntryDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CELL_TYPE = "cell_type"; + private IncidentTimelineCellType cellType; + + public static final String JSON_PROPERTY_CONTENT = "content"; + private IncidentTimelineEntryContent content; + + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_DISPLAY_TIME = "display_time"; + private OffsetDateTime displayTime; + + public static final String JSON_PROPERTY_IMPORTANT = "important"; + private Boolean important; + + public static final String JSON_PROPERTY_INCIDENT_ID = "incident_id"; + private String incidentId; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_PARENT_UUID = "parent_uuid"; + private JsonNullable parentUuid = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SOURCE = "source"; + private IncidentTimelineCellSource source; + + public IncidentTimelineEntryDataAttributesResponse() {} + + @JsonCreator + public IncidentTimelineEntryDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CELL_TYPE) + IncidentTimelineCellType cellType, + @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT) + IncidentTimelineEntryContent content, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_DISPLAY_TIME) OffsetDateTime displayTime, + @JsonProperty(required = true, value = JSON_PROPERTY_IMPORTANT) Boolean important, + @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_ID) String incidentId, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) + IncidentTimelineCellSource source) { + this.cellType = cellType; + this.unparsed |= !cellType.isValid(); + this.content = content; + this.unparsed |= content.unparsed; + this.created = created; + this.displayTime = displayTime; + this.important = important; + this.incidentId = incidentId; + this.modified = modified; + this.source = source; + this.unparsed |= !source.isValid(); + } + + public IncidentTimelineEntryDataAttributesResponse cellType(IncidentTimelineCellType cellType) { + this.cellType = cellType; + this.unparsed |= !cellType.isValid(); + return this; + } + + /** + * The type of a timeline cell. + * + * @return cellType + */ + @JsonProperty(JSON_PROPERTY_CELL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineCellType getCellType() { + return cellType; + } + + public void setCellType(IncidentTimelineCellType cellType) { + if (!cellType.isValid()) { + this.unparsed = true; + } + this.cellType = cellType; + } + + public IncidentTimelineEntryDataAttributesResponse content(IncidentTimelineEntryContent content) { + this.content = content; + this.unparsed |= content.unparsed; + return this; + } + + /** + * The content of a timeline entry. + * + * @return content + */ + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryContent getContent() { + return content; + } + + public void setContent(IncidentTimelineEntryContent content) { + this.content = content; + } + + public IncidentTimelineEntryDataAttributesResponse created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the entry 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 IncidentTimelineEntryDataAttributesResponse displayTime(OffsetDateTime displayTime) { + this.displayTime = displayTime; + return this; + } + + /** + * The display time for this timeline entry. + * + * @return displayTime + */ + @JsonProperty(JSON_PROPERTY_DISPLAY_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getDisplayTime() { + return displayTime; + } + + public void setDisplayTime(OffsetDateTime displayTime) { + this.displayTime = displayTime; + } + + public IncidentTimelineEntryDataAttributesResponse important(Boolean important) { + this.important = important; + return this; + } + + /** + * Whether this timeline entry is marked as important. + * + * @return important + */ + @JsonProperty(JSON_PROPERTY_IMPORTANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getImportant() { + return important; + } + + public void setImportant(Boolean important) { + this.important = important; + } + + public IncidentTimelineEntryDataAttributesResponse 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 IncidentTimelineEntryDataAttributesResponse modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the entry 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 IncidentTimelineEntryDataAttributesResponse parentUuid(String parentUuid) { + this.parentUuid = JsonNullable.of(parentUuid); + return this; + } + + /** + * UUID of the parent timeline entry. + * + * @return parentUuid + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getParentUuid() { + return parentUuid.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARENT_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getParentUuid_JsonNullable() { + return parentUuid; + } + + @JsonProperty(JSON_PROPERTY_PARENT_UUID) + public void setParentUuid_JsonNullable(JsonNullable parentUuid) { + this.parentUuid = parentUuid; + } + + public void setParentUuid(String parentUuid) { + this.parentUuid = JsonNullable.of(parentUuid); + } + + public IncidentTimelineEntryDataAttributesResponse source(IncidentTimelineCellSource source) { + this.source = source; + this.unparsed |= !source.isValid(); + return this; + } + + /** + * The source of a timeline cell. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineCellSource getSource() { + return source; + } + + public void setSource(IncidentTimelineCellSource source) { + if (!source.isValid()) { + this.unparsed = true; + } + this.source = source; + } + + /** + * 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 IncidentTimelineEntryDataAttributesResponse + */ + @JsonAnySetter + public IncidentTimelineEntryDataAttributesResponse 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 IncidentTimelineEntryDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineEntryDataAttributesResponse incidentTimelineEntryDataAttributesResponse = + (IncidentTimelineEntryDataAttributesResponse) o; + return Objects.equals(this.cellType, incidentTimelineEntryDataAttributesResponse.cellType) + && Objects.equals(this.content, incidentTimelineEntryDataAttributesResponse.content) + && Objects.equals(this.created, incidentTimelineEntryDataAttributesResponse.created) + && Objects.equals(this.displayTime, incidentTimelineEntryDataAttributesResponse.displayTime) + && Objects.equals(this.important, incidentTimelineEntryDataAttributesResponse.important) + && Objects.equals(this.incidentId, incidentTimelineEntryDataAttributesResponse.incidentId) + && Objects.equals(this.modified, incidentTimelineEntryDataAttributesResponse.modified) + && Objects.equals(this.parentUuid, incidentTimelineEntryDataAttributesResponse.parentUuid) + && Objects.equals(this.source, incidentTimelineEntryDataAttributesResponse.source) + && Objects.equals( + this.additionalProperties, + incidentTimelineEntryDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + cellType, + content, + created, + displayTime, + important, + incidentId, + modified, + parentUuid, + source, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineEntryDataAttributesResponse {\n"); + sb.append(" cellType: ").append(toIndentedString(cellType)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" displayTime: ").append(toIndentedString(displayTime)).append("\n"); + sb.append(" important: ").append(toIndentedString(important)).append("\n"); + sb.append(" incidentId: ").append(toIndentedString(incidentId)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" parentUuid: ").append(toIndentedString(parentUuid)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).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/IncidentTimelineEntryDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryDataRequest.java new file mode 100644 index 00000000000..e7b85ed3681 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryDataRequest.java @@ -0,0 +1,184 @@ +/* + * 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; + +/** Timeline entry data for a request. */ +@JsonPropertyOrder({ + IncidentTimelineEntryDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentTimelineEntryDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineEntryDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentTimelineEntryDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentTimelineEntryType type; + + public IncidentTimelineEntryDataRequest() {} + + @JsonCreator + public IncidentTimelineEntryDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentTimelineEntryDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentTimelineEntryType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentTimelineEntryDataRequest attributes( + IncidentTimelineEntryDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a timeline entry. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentTimelineEntryDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentTimelineEntryDataRequest type(IncidentTimelineEntryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident timeline entry resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryType getType() { + return type; + } + + public void setType(IncidentTimelineEntryType 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 IncidentTimelineEntryDataRequest + */ + @JsonAnySetter + public IncidentTimelineEntryDataRequest 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 IncidentTimelineEntryDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineEntryDataRequest incidentTimelineEntryDataRequest = + (IncidentTimelineEntryDataRequest) o; + return Objects.equals(this.attributes, incidentTimelineEntryDataRequest.attributes) + && Objects.equals(this.type, incidentTimelineEntryDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentTimelineEntryDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineEntryDataRequest {\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/IncidentTimelineEntryDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryDataResponse.java new file mode 100644 index 00000000000..ed45679e8e1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryDataResponse.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Timeline entry data in a response. */ +@JsonPropertyOrder({ + IncidentTimelineEntryDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentTimelineEntryDataResponse.JSON_PROPERTY_ID, + IncidentTimelineEntryDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineEntryDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentTimelineEntryDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentTimelineEntryType type; + + public IncidentTimelineEntryDataResponse() {} + + @JsonCreator + public IncidentTimelineEntryDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentTimelineEntryDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentTimelineEntryType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentTimelineEntryDataResponse attributes( + IncidentTimelineEntryDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a timeline entry. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentTimelineEntryDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentTimelineEntryDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The timeline entry 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 IncidentTimelineEntryDataResponse type(IncidentTimelineEntryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident timeline entry resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryType getType() { + return type; + } + + public void setType(IncidentTimelineEntryType 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 IncidentTimelineEntryDataResponse + */ + @JsonAnySetter + public IncidentTimelineEntryDataResponse 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 IncidentTimelineEntryDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineEntryDataResponse incidentTimelineEntryDataResponse = + (IncidentTimelineEntryDataResponse) o; + return Objects.equals(this.attributes, incidentTimelineEntryDataResponse.attributes) + && Objects.equals(this.id, incidentTimelineEntryDataResponse.id) + && Objects.equals(this.type, incidentTimelineEntryDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentTimelineEntryDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineEntryDataResponse {\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/IncidentTimelineEntryRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryRequest.java new file mode 100644 index 00000000000..9b80026c495 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryRequest.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 to create or update a timeline entry. */ +@JsonPropertyOrder({IncidentTimelineEntryRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineEntryRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentTimelineEntryDataRequest data; + + public IncidentTimelineEntryRequest() {} + + @JsonCreator + public IncidentTimelineEntryRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentTimelineEntryDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentTimelineEntryRequest data(IncidentTimelineEntryDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Timeline entry data for a request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryDataRequest getData() { + return data; + } + + public void setData(IncidentTimelineEntryDataRequest 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 IncidentTimelineEntryRequest + */ + @JsonAnySetter + public IncidentTimelineEntryRequest 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 IncidentTimelineEntryRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineEntryRequest incidentTimelineEntryRequest = (IncidentTimelineEntryRequest) o; + return Objects.equals(this.data, incidentTimelineEntryRequest.data) + && Objects.equals( + this.additionalProperties, incidentTimelineEntryRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineEntryRequest {\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/IncidentTimelineEntryResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryResponse.java new file mode 100644 index 00000000000..19fb7a3efd3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryResponse.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 timeline entry. */ +@JsonPropertyOrder({IncidentTimelineEntryResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineEntryResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentTimelineEntryDataResponse data; + + public IncidentTimelineEntryResponse() {} + + @JsonCreator + public IncidentTimelineEntryResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentTimelineEntryDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentTimelineEntryResponse data(IncidentTimelineEntryDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Timeline entry data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryDataResponse getData() { + return data; + } + + public void setData(IncidentTimelineEntryDataResponse 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 IncidentTimelineEntryResponse + */ + @JsonAnySetter + public IncidentTimelineEntryResponse 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 IncidentTimelineEntryResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineEntryResponse incidentTimelineEntryResponse = (IncidentTimelineEntryResponse) o; + return Objects.equals(this.data, incidentTimelineEntryResponse.data) + && Objects.equals( + this.additionalProperties, incidentTimelineEntryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineEntryResponse {\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/IncidentTimelineEntryType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryType.java new file mode 100644 index 00000000000..91a4ee4b417 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineEntryType.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 timeline entry resource type. */ +@JsonSerialize(using = IncidentTimelineEntryType.IncidentTimelineEntryTypeSerializer.class) +public class IncidentTimelineEntryType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_timeline_cells")); + + public static final IncidentTimelineEntryType INCIDENT_TIMELINE_CELLS = + new IncidentTimelineEntryType("incident_timeline_cells"); + + IncidentTimelineEntryType(String value) { + super(value, allowedValues); + } + + public static class IncidentTimelineEntryTypeSerializer + extends StdSerializer { + public IncidentTimelineEntryTypeSerializer(Class t) { + super(t); + } + + public IncidentTimelineEntryTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentTimelineEntryType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentTimelineEntryType fromValue(String value) { + return new IncidentTimelineEntryType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineThreadDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineThreadDataResponse.java new file mode 100644 index 00000000000..bbc31cb0b4a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineThreadDataResponse.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Thread data for a timeline entry. */ +@JsonPropertyOrder({ + IncidentTimelineThreadDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentTimelineThreadDataResponse.JSON_PROPERTY_ID, + IncidentTimelineThreadDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineThreadDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentTimelineEntryDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentTimelineEntryType type; + + public IncidentTimelineThreadDataResponse() {} + + @JsonCreator + public IncidentTimelineThreadDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentTimelineEntryDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentTimelineEntryType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentTimelineThreadDataResponse attributes( + IncidentTimelineEntryDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a timeline entry. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentTimelineEntryDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentTimelineThreadDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The thread entry 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 IncidentTimelineThreadDataResponse type(IncidentTimelineEntryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident timeline entry resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentTimelineEntryType getType() { + return type; + } + + public void setType(IncidentTimelineEntryType 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 IncidentTimelineThreadDataResponse + */ + @JsonAnySetter + public IncidentTimelineThreadDataResponse 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 IncidentTimelineThreadDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineThreadDataResponse incidentTimelineThreadDataResponse = + (IncidentTimelineThreadDataResponse) o; + return Objects.equals(this.attributes, incidentTimelineThreadDataResponse.attributes) + && Objects.equals(this.id, incidentTimelineThreadDataResponse.id) + && Objects.equals(this.type, incidentTimelineThreadDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentTimelineThreadDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineThreadDataResponse {\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/IncidentTimelineThreadResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineThreadResponse.java new file mode 100644 index 00000000000..83833c055db --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineThreadResponse.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 thread entries for a timeline entry. */ +@JsonPropertyOrder({IncidentTimelineThreadResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentTimelineThreadResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IncidentTimelineThreadResponse() {} + + @JsonCreator + public IncidentTimelineThreadResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public IncidentTimelineThreadResponse data(List data) { + this.data = data; + for (IncidentTimelineThreadDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentTimelineThreadResponse addDataItem(IncidentTimelineThreadDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of thread entries. + * + * @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 IncidentTimelineThreadResponse + */ + @JsonAnySetter + public IncidentTimelineThreadResponse 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 IncidentTimelineThreadResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentTimelineThreadResponse incidentTimelineThreadResponse = + (IncidentTimelineThreadResponse) o; + return Objects.equals(this.data, incidentTimelineThreadResponse.data) + && Objects.equals( + this.additionalProperties, incidentTimelineThreadResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentTimelineThreadResponse {\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/IncidentZoomConfigurationDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationDataAttributesRequest.java new file mode 100644 index 00000000000..17b6eb9b001 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationDataAttributesRequest.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; + +/** Attributes for creating or updating a Zoom configuration. */ +@JsonPropertyOrder({ + IncidentZoomConfigurationDataAttributesRequest.JSON_PROPERTY_MANUAL_MEETING_CREATION, + IncidentZoomConfigurationDataAttributesRequest.JSON_PROPERTY_MEETING_CHAT_TIMELINE_SYNC, + IncidentZoomConfigurationDataAttributesRequest.JSON_PROPERTY_POST_MEETING_SUMMARY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomConfigurationDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MANUAL_MEETING_CREATION = "manual_meeting_creation"; + private Boolean manualMeetingCreation; + + public static final String JSON_PROPERTY_MEETING_CHAT_TIMELINE_SYNC = + "meeting_chat_timeline_sync"; + private Boolean meetingChatTimelineSync; + + public static final String JSON_PROPERTY_POST_MEETING_SUMMARY = "post_meeting_summary"; + private Boolean postMeetingSummary; + + public IncidentZoomConfigurationDataAttributesRequest manualMeetingCreation( + Boolean manualMeetingCreation) { + this.manualMeetingCreation = manualMeetingCreation; + return this; + } + + /** + * Whether manual meeting creation is enabled. + * + * @return manualMeetingCreation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MANUAL_MEETING_CREATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getManualMeetingCreation() { + return manualMeetingCreation; + } + + public void setManualMeetingCreation(Boolean manualMeetingCreation) { + this.manualMeetingCreation = manualMeetingCreation; + } + + public IncidentZoomConfigurationDataAttributesRequest meetingChatTimelineSync( + Boolean meetingChatTimelineSync) { + this.meetingChatTimelineSync = meetingChatTimelineSync; + return this; + } + + /** + * Whether meeting chat timeline sync is enabled. + * + * @return meetingChatTimelineSync + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MEETING_CHAT_TIMELINE_SYNC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMeetingChatTimelineSync() { + return meetingChatTimelineSync; + } + + public void setMeetingChatTimelineSync(Boolean meetingChatTimelineSync) { + this.meetingChatTimelineSync = meetingChatTimelineSync; + } + + public IncidentZoomConfigurationDataAttributesRequest postMeetingSummary( + Boolean postMeetingSummary) { + this.postMeetingSummary = postMeetingSummary; + return this; + } + + /** + * Whether post-meeting summary is enabled. + * + * @return postMeetingSummary + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POST_MEETING_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPostMeetingSummary() { + return postMeetingSummary; + } + + public void setPostMeetingSummary(Boolean postMeetingSummary) { + this.postMeetingSummary = postMeetingSummary; + } + + /** + * 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 IncidentZoomConfigurationDataAttributesRequest + */ + @JsonAnySetter + public IncidentZoomConfigurationDataAttributesRequest 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 IncidentZoomConfigurationDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomConfigurationDataAttributesRequest incidentZoomConfigurationDataAttributesRequest = + (IncidentZoomConfigurationDataAttributesRequest) o; + return Objects.equals( + this.manualMeetingCreation, + incidentZoomConfigurationDataAttributesRequest.manualMeetingCreation) + && Objects.equals( + this.meetingChatTimelineSync, + incidentZoomConfigurationDataAttributesRequest.meetingChatTimelineSync) + && Objects.equals( + this.postMeetingSummary, + incidentZoomConfigurationDataAttributesRequest.postMeetingSummary) + && Objects.equals( + this.additionalProperties, + incidentZoomConfigurationDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + manualMeetingCreation, meetingChatTimelineSync, postMeetingSummary, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomConfigurationDataAttributesRequest {\n"); + sb.append(" manualMeetingCreation: ") + .append(toIndentedString(manualMeetingCreation)) + .append("\n"); + sb.append(" meetingChatTimelineSync: ") + .append(toIndentedString(meetingChatTimelineSync)) + .append("\n"); + sb.append(" postMeetingSummary: ").append(toIndentedString(postMeetingSummary)).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/IncidentZoomConfigurationDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationDataAttributesResponse.java new file mode 100644 index 00000000000..fd677404bc4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationDataAttributesResponse.java @@ -0,0 +1,287 @@ +/* + * 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 Zoom configuration. */ +@JsonPropertyOrder({ + IncidentZoomConfigurationDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + IncidentZoomConfigurationDataAttributesResponse.JSON_PROPERTY_MANUAL_MEETING_CREATION, + IncidentZoomConfigurationDataAttributesResponse.JSON_PROPERTY_MEETING_CHAT_TIMELINE_SYNC, + IncidentZoomConfigurationDataAttributesResponse.JSON_PROPERTY_MODIFIED_AT, + IncidentZoomConfigurationDataAttributesResponse.JSON_PROPERTY_POST_MEETING_SUMMARY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomConfigurationDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MANUAL_MEETING_CREATION = "manual_meeting_creation"; + private Boolean manualMeetingCreation; + + public static final String JSON_PROPERTY_MEETING_CHAT_TIMELINE_SYNC = + "meeting_chat_timeline_sync"; + private Boolean meetingChatTimelineSync; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_POST_MEETING_SUMMARY = "post_meeting_summary"; + private Boolean postMeetingSummary; + + public IncidentZoomConfigurationDataAttributesResponse() {} + + @JsonCreator + public IncidentZoomConfigurationDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MANUAL_MEETING_CREATION) + Boolean manualMeetingCreation, + @JsonProperty(required = true, value = JSON_PROPERTY_MEETING_CHAT_TIMELINE_SYNC) + Boolean meetingChatTimelineSync, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_POST_MEETING_SUMMARY) + Boolean postMeetingSummary) { + this.createdAt = createdAt; + this.manualMeetingCreation = manualMeetingCreation; + this.meetingChatTimelineSync = meetingChatTimelineSync; + this.modifiedAt = modifiedAt; + this.postMeetingSummary = postMeetingSummary; + } + + public IncidentZoomConfigurationDataAttributesResponse 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 IncidentZoomConfigurationDataAttributesResponse manualMeetingCreation( + Boolean manualMeetingCreation) { + this.manualMeetingCreation = manualMeetingCreation; + return this; + } + + /** + * Whether manual meeting creation is enabled. + * + * @return manualMeetingCreation + */ + @JsonProperty(JSON_PROPERTY_MANUAL_MEETING_CREATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getManualMeetingCreation() { + return manualMeetingCreation; + } + + public void setManualMeetingCreation(Boolean manualMeetingCreation) { + this.manualMeetingCreation = manualMeetingCreation; + } + + public IncidentZoomConfigurationDataAttributesResponse meetingChatTimelineSync( + Boolean meetingChatTimelineSync) { + this.meetingChatTimelineSync = meetingChatTimelineSync; + return this; + } + + /** + * Whether meeting chat timeline sync is enabled. + * + * @return meetingChatTimelineSync + */ + @JsonProperty(JSON_PROPERTY_MEETING_CHAT_TIMELINE_SYNC) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getMeetingChatTimelineSync() { + return meetingChatTimelineSync; + } + + public void setMeetingChatTimelineSync(Boolean meetingChatTimelineSync) { + this.meetingChatTimelineSync = meetingChatTimelineSync; + } + + public IncidentZoomConfigurationDataAttributesResponse 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 IncidentZoomConfigurationDataAttributesResponse postMeetingSummary( + Boolean postMeetingSummary) { + this.postMeetingSummary = postMeetingSummary; + return this; + } + + /** + * Whether post-meeting summary is enabled. + * + * @return postMeetingSummary + */ + @JsonProperty(JSON_PROPERTY_POST_MEETING_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getPostMeetingSummary() { + return postMeetingSummary; + } + + public void setPostMeetingSummary(Boolean postMeetingSummary) { + this.postMeetingSummary = postMeetingSummary; + } + + /** + * 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 IncidentZoomConfigurationDataAttributesResponse + */ + @JsonAnySetter + public IncidentZoomConfigurationDataAttributesResponse 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 IncidentZoomConfigurationDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomConfigurationDataAttributesResponse + incidentZoomConfigurationDataAttributesResponse = + (IncidentZoomConfigurationDataAttributesResponse) o; + return Objects.equals(this.createdAt, incidentZoomConfigurationDataAttributesResponse.createdAt) + && Objects.equals( + this.manualMeetingCreation, + incidentZoomConfigurationDataAttributesResponse.manualMeetingCreation) + && Objects.equals( + this.meetingChatTimelineSync, + incidentZoomConfigurationDataAttributesResponse.meetingChatTimelineSync) + && Objects.equals( + this.modifiedAt, incidentZoomConfigurationDataAttributesResponse.modifiedAt) + && Objects.equals( + this.postMeetingSummary, + incidentZoomConfigurationDataAttributesResponse.postMeetingSummary) + && Objects.equals( + this.additionalProperties, + incidentZoomConfigurationDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + manualMeetingCreation, + meetingChatTimelineSync, + modifiedAt, + postMeetingSummary, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomConfigurationDataAttributesResponse {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" manualMeetingCreation: ") + .append(toIndentedString(manualMeetingCreation)) + .append("\n"); + sb.append(" meetingChatTimelineSync: ") + .append(toIndentedString(meetingChatTimelineSync)) + .append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" postMeetingSummary: ").append(toIndentedString(postMeetingSummary)).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/IncidentZoomConfigurationDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationDataRequest.java new file mode 100644 index 00000000000..a0e824077f5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationDataRequest.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; + +/** Zoom configuration data for a request. */ +@JsonPropertyOrder({ + IncidentZoomConfigurationDataRequest.JSON_PROPERTY_ATTRIBUTES, + IncidentZoomConfigurationDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomConfigurationDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentZoomConfigurationDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentZoomConfigurationType type; + + public IncidentZoomConfigurationDataRequest() {} + + @JsonCreator + public IncidentZoomConfigurationDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentZoomConfigurationDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentZoomConfigurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentZoomConfigurationDataRequest attributes( + IncidentZoomConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a Zoom configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomConfigurationDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(IncidentZoomConfigurationDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public IncidentZoomConfigurationDataRequest type(IncidentZoomConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Zoom configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomConfigurationType getType() { + return type; + } + + public void setType(IncidentZoomConfigurationType 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 IncidentZoomConfigurationDataRequest + */ + @JsonAnySetter + public IncidentZoomConfigurationDataRequest 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 IncidentZoomConfigurationDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomConfigurationDataRequest incidentZoomConfigurationDataRequest = + (IncidentZoomConfigurationDataRequest) o; + return Objects.equals(this.attributes, incidentZoomConfigurationDataRequest.attributes) + && Objects.equals(this.type, incidentZoomConfigurationDataRequest.type) + && Objects.equals( + this.additionalProperties, incidentZoomConfigurationDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomConfigurationDataRequest {\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/IncidentZoomConfigurationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationDataResponse.java new file mode 100644 index 00000000000..a55ee6ca142 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationDataResponse.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; + +/** Zoom configuration data in a response. */ +@JsonPropertyOrder({ + IncidentZoomConfigurationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentZoomConfigurationDataResponse.JSON_PROPERTY_ID, + IncidentZoomConfigurationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomConfigurationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentZoomConfigurationDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentZoomConfigurationType type; + + public IncidentZoomConfigurationDataResponse() {} + + @JsonCreator + public IncidentZoomConfigurationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentZoomConfigurationDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IncidentZoomConfigurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentZoomConfigurationDataResponse attributes( + IncidentZoomConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Zoom configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomConfigurationDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(IncidentZoomConfigurationDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public IncidentZoomConfigurationDataResponse 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 IncidentZoomConfigurationDataResponse type(IncidentZoomConfigurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Zoom configuration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomConfigurationType getType() { + return type; + } + + public void setType(IncidentZoomConfigurationType 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 IncidentZoomConfigurationDataResponse + */ + @JsonAnySetter + public IncidentZoomConfigurationDataResponse 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 IncidentZoomConfigurationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomConfigurationDataResponse incidentZoomConfigurationDataResponse = + (IncidentZoomConfigurationDataResponse) o; + return Objects.equals(this.attributes, incidentZoomConfigurationDataResponse.attributes) + && Objects.equals(this.id, incidentZoomConfigurationDataResponse.id) + && Objects.equals(this.type, incidentZoomConfigurationDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentZoomConfigurationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomConfigurationDataResponse {\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/IncidentZoomConfigurationRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationRequest.java new file mode 100644 index 00000000000..820f209aab1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationRequest.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 to create or update a Zoom configuration. */ +@JsonPropertyOrder({IncidentZoomConfigurationRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomConfigurationRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentZoomConfigurationDataRequest data; + + public IncidentZoomConfigurationRequest() {} + + @JsonCreator + public IncidentZoomConfigurationRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentZoomConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentZoomConfigurationRequest data(IncidentZoomConfigurationDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Zoom configuration data for a request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomConfigurationDataRequest getData() { + return data; + } + + public void setData(IncidentZoomConfigurationDataRequest 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 IncidentZoomConfigurationRequest + */ + @JsonAnySetter + public IncidentZoomConfigurationRequest 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 IncidentZoomConfigurationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomConfigurationRequest incidentZoomConfigurationRequest = + (IncidentZoomConfigurationRequest) o; + return Objects.equals(this.data, incidentZoomConfigurationRequest.data) + && Objects.equals( + this.additionalProperties, incidentZoomConfigurationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomConfigurationRequest {\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/IncidentZoomConfigurationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationResponse.java new file mode 100644 index 00000000000..dc8ba436972 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationResponse.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; + +/** Response with a Zoom configuration. */ +@JsonPropertyOrder({IncidentZoomConfigurationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomConfigurationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentZoomConfigurationDataResponse data; + + public IncidentZoomConfigurationResponse() {} + + @JsonCreator + public IncidentZoomConfigurationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentZoomConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentZoomConfigurationResponse data(IncidentZoomConfigurationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Zoom configuration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomConfigurationDataResponse getData() { + return data; + } + + public void setData(IncidentZoomConfigurationDataResponse 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 IncidentZoomConfigurationResponse + */ + @JsonAnySetter + public IncidentZoomConfigurationResponse 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 IncidentZoomConfigurationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomConfigurationResponse incidentZoomConfigurationResponse = + (IncidentZoomConfigurationResponse) o; + return Objects.equals(this.data, incidentZoomConfigurationResponse.data) + && Objects.equals( + this.additionalProperties, incidentZoomConfigurationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomConfigurationResponse {\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/IncidentZoomConfigurationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationType.java new file mode 100644 index 00000000000..a2548529f9b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomConfigurationType.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; + +/** Zoom configuration resource type. */ +@JsonSerialize(using = IncidentZoomConfigurationType.IncidentZoomConfigurationTypeSerializer.class) +public class IncidentZoomConfigurationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("zoom_configurations")); + + public static final IncidentZoomConfigurationType ZOOM_CONFIGURATIONS = + new IncidentZoomConfigurationType("zoom_configurations"); + + IncidentZoomConfigurationType(String value) { + super(value, allowedValues); + } + + public static class IncidentZoomConfigurationTypeSerializer + extends StdSerializer { + public IncidentZoomConfigurationTypeSerializer(Class t) { + super(t); + } + + public IncidentZoomConfigurationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentZoomConfigurationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentZoomConfigurationType fromValue(String value) { + return new IncidentZoomConfigurationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentZoomIntegrationDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomIntegrationDataAttributes.java new file mode 100644 index 00000000000..4033a2e9b7e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomIntegrationDataAttributes.java @@ -0,0 +1,273 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Zoom integration metadata. */ +@JsonPropertyOrder({ + IncidentZoomIntegrationDataAttributes.JSON_PROPERTY_CREATED, + IncidentZoomIntegrationDataAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + IncidentZoomIntegrationDataAttributes.JSON_PROPERTY_MEETINGS, + IncidentZoomIntegrationDataAttributes.JSON_PROPERTY_MODIFIED, + IncidentZoomIntegrationDataAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomIntegrationDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private String integrationType; + + public static final String JSON_PROPERTY_MEETINGS = "meetings"; + private List meetings = new ArrayList<>(); + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private OffsetDateTime modified; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public IncidentZoomIntegrationDataAttributes() {} + + @JsonCreator + public IncidentZoomIntegrationDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) String integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_MEETINGS) + List meetings, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) OffsetDateTime modified, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.created = created; + this.integrationType = integrationType; + this.meetings = meetings; + this.modified = modified; + this.status = status; + } + + public IncidentZoomIntegrationDataAttributes created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Timestamp when the integration 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 IncidentZoomIntegrationDataAttributes integrationType(String integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + * The type of integration. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(String integrationType) { + this.integrationType = integrationType; + } + + public IncidentZoomIntegrationDataAttributes meetings(List meetings) { + this.meetings = meetings; + for (IncidentZoomMeeting item : meetings) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IncidentZoomIntegrationDataAttributes addMeetingsItem(IncidentZoomMeeting meetingsItem) { + this.meetings.add(meetingsItem); + this.unparsed |= meetingsItem.unparsed; + return this; + } + + /** + * List of Zoom meetings. + * + * @return meetings + */ + @JsonProperty(JSON_PROPERTY_MEETINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getMeetings() { + return meetings; + } + + public void setMeetings(List meetings) { + this.meetings = meetings; + } + + public IncidentZoomIntegrationDataAttributes modified(OffsetDateTime modified) { + this.modified = modified; + return this; + } + + /** + * Timestamp when the integration 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 IncidentZoomIntegrationDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The status of the integration. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * 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 IncidentZoomIntegrationDataAttributes + */ + @JsonAnySetter + public IncidentZoomIntegrationDataAttributes 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 IncidentZoomIntegrationDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomIntegrationDataAttributes incidentZoomIntegrationDataAttributes = + (IncidentZoomIntegrationDataAttributes) o; + return Objects.equals(this.created, incidentZoomIntegrationDataAttributes.created) + && Objects.equals( + this.integrationType, incidentZoomIntegrationDataAttributes.integrationType) + && Objects.equals(this.meetings, incidentZoomIntegrationDataAttributes.meetings) + && Objects.equals(this.modified, incidentZoomIntegrationDataAttributes.modified) + && Objects.equals(this.status, incidentZoomIntegrationDataAttributes.status) + && Objects.equals( + this.additionalProperties, incidentZoomIntegrationDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(created, integrationType, meetings, modified, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomIntegrationDataAttributes {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" meetings: ").append(toIndentedString(meetings)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IncidentZoomIntegrationDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomIntegrationDataResponse.java new file mode 100644 index 00000000000..3a5d4021e89 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomIntegrationDataResponse.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Zoom integration data in a response. */ +@JsonPropertyOrder({ + IncidentZoomIntegrationDataResponse.JSON_PROPERTY_ATTRIBUTES, + IncidentZoomIntegrationDataResponse.JSON_PROPERTY_ID, + IncidentZoomIntegrationDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomIntegrationDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentZoomIntegrationDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentZoomIntegrationType type; + + public IncidentZoomIntegrationDataResponse() {} + + @JsonCreator + public IncidentZoomIntegrationDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IncidentZoomIntegrationDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentZoomIntegrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IncidentZoomIntegrationDataResponse attributes( + IncidentZoomIntegrationDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Zoom integration metadata. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomIntegrationDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IncidentZoomIntegrationDataAttributes attributes) { + this.attributes = attributes; + } + + public IncidentZoomIntegrationDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The integration 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 IncidentZoomIntegrationDataResponse type(IncidentZoomIntegrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident integration resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomIntegrationType getType() { + return type; + } + + public void setType(IncidentZoomIntegrationType 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 IncidentZoomIntegrationDataResponse + */ + @JsonAnySetter + public IncidentZoomIntegrationDataResponse 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 IncidentZoomIntegrationDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomIntegrationDataResponse incidentZoomIntegrationDataResponse = + (IncidentZoomIntegrationDataResponse) o; + return Objects.equals(this.attributes, incidentZoomIntegrationDataResponse.attributes) + && Objects.equals(this.id, incidentZoomIntegrationDataResponse.id) + && Objects.equals(this.type, incidentZoomIntegrationDataResponse.type) + && Objects.equals( + this.additionalProperties, incidentZoomIntegrationDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomIntegrationDataResponse {\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/IncidentZoomIntegrationResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomIntegrationResponse.java new file mode 100644 index 00000000000..ba0ee1cec96 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomIntegrationResponse.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; + +/** Response with Zoom integration metadata. */ +@JsonPropertyOrder({IncidentZoomIntegrationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomIntegrationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentZoomIntegrationDataResponse data; + + public IncidentZoomIntegrationResponse() {} + + @JsonCreator + public IncidentZoomIntegrationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + IncidentZoomIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public IncidentZoomIntegrationResponse data(IncidentZoomIntegrationDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Zoom integration data in a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IncidentZoomIntegrationDataResponse getData() { + return data; + } + + public void setData(IncidentZoomIntegrationDataResponse 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 IncidentZoomIntegrationResponse + */ + @JsonAnySetter + public IncidentZoomIntegrationResponse 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 IncidentZoomIntegrationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomIntegrationResponse incidentZoomIntegrationResponse = + (IncidentZoomIntegrationResponse) o; + return Objects.equals(this.data, incidentZoomIntegrationResponse.data) + && Objects.equals( + this.additionalProperties, incidentZoomIntegrationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomIntegrationResponse {\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/IncidentZoomIntegrationType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomIntegrationType.java new file mode 100644 index 00000000000..aa4c837e074 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomIntegrationType.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 integration resource type. */ +@JsonSerialize(using = IncidentZoomIntegrationType.IncidentZoomIntegrationTypeSerializer.class) +public class IncidentZoomIntegrationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("incident_integrations")); + + public static final IncidentZoomIntegrationType INCIDENT_INTEGRATIONS = + new IncidentZoomIntegrationType("incident_integrations"); + + IncidentZoomIntegrationType(String value) { + super(value, allowedValues); + } + + public static class IncidentZoomIntegrationTypeSerializer + extends StdSerializer { + public IncidentZoomIntegrationTypeSerializer(Class t) { + super(t); + } + + public IncidentZoomIntegrationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IncidentZoomIntegrationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IncidentZoomIntegrationType fromValue(String value) { + return new IncidentZoomIntegrationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentZoomMeeting.java b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomMeeting.java new file mode 100644 index 00000000000..ef1d5346355 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentZoomMeeting.java @@ -0,0 +1,254 @@ +/* + * 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 Zoom meeting associated with an incident. */ +@JsonPropertyOrder({ + IncidentZoomMeeting.JSON_PROPERTY_HOST_ID, + IncidentZoomMeeting.JSON_PROPERTY_JOIN_URL, + IncidentZoomMeeting.JSON_PROPERTY_MEETING_ID, + IncidentZoomMeeting.JSON_PROPERTY_PASSWORD, + IncidentZoomMeeting.JSON_PROPERTY_RECORDING_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentZoomMeeting { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_HOST_ID = "host_id"; + private String hostId; + + public static final String JSON_PROPERTY_JOIN_URL = "join_url"; + private String joinUrl; + + public static final String JSON_PROPERTY_MEETING_ID = "meeting_id"; + private Long meetingId; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_RECORDING_URL = "recording_url"; + private String recordingUrl; + + public IncidentZoomMeeting() {} + + @JsonCreator + public IncidentZoomMeeting( + @JsonProperty(required = true, value = JSON_PROPERTY_JOIN_URL) String joinUrl, + @JsonProperty(required = true, value = JSON_PROPERTY_MEETING_ID) Long meetingId) { + this.joinUrl = joinUrl; + this.meetingId = meetingId; + } + + public IncidentZoomMeeting hostId(String hostId) { + this.hostId = hostId; + return this; + } + + /** + * The Zoom host identifier. + * + * @return hostId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHostId() { + return hostId; + } + + public void setHostId(String hostId) { + this.hostId = hostId; + } + + public IncidentZoomMeeting joinUrl(String joinUrl) { + this.joinUrl = joinUrl; + return this; + } + + /** + * The URL to join the meeting. + * + * @return joinUrl + */ + @JsonProperty(JSON_PROPERTY_JOIN_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getJoinUrl() { + return joinUrl; + } + + public void setJoinUrl(String joinUrl) { + this.joinUrl = joinUrl; + } + + public IncidentZoomMeeting meetingId(Long meetingId) { + this.meetingId = meetingId; + return this; + } + + /** + * The Zoom meeting identifier. + * + * @return meetingId + */ + @JsonProperty(JSON_PROPERTY_MEETING_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getMeetingId() { + return meetingId; + } + + public void setMeetingId(Long meetingId) { + this.meetingId = meetingId; + } + + public IncidentZoomMeeting password(String password) { + this.password = password; + return this; + } + + /** + * The meeting password. + * + * @return password + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public IncidentZoomMeeting recordingUrl(String recordingUrl) { + this.recordingUrl = recordingUrl; + return this; + } + + /** + * The URL of the meeting recording. + * + * @return recordingUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECORDING_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRecordingUrl() { + return recordingUrl; + } + + public void setRecordingUrl(String recordingUrl) { + this.recordingUrl = recordingUrl; + } + + /** + * 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 IncidentZoomMeeting + */ + @JsonAnySetter + public IncidentZoomMeeting 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 IncidentZoomMeeting object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentZoomMeeting incidentZoomMeeting = (IncidentZoomMeeting) o; + return Objects.equals(this.hostId, incidentZoomMeeting.hostId) + && Objects.equals(this.joinUrl, incidentZoomMeeting.joinUrl) + && Objects.equals(this.meetingId, incidentZoomMeeting.meetingId) + && Objects.equals(this.password, incidentZoomMeeting.password) + && Objects.equals(this.recordingUrl, incidentZoomMeeting.recordingUrl) + && Objects.equals(this.additionalProperties, incidentZoomMeeting.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(hostId, joinUrl, meetingId, password, recordingUrl, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentZoomMeeting {\n"); + sb.append(" hostId: ").append(toIndentedString(hostId)).append("\n"); + sb.append(" joinUrl: ").append(toIndentedString(joinUrl)).append("\n"); + sb.append(" meetingId: ").append(toIndentedString(meetingId)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" recordingUrl: ").append(toIndentedString(recordingUrl)).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/cassettes/features/v1/Create_a_user_returns_User_created_response_test.json b/src/test/resources/cassettes/features/v1/Create_a_user_returns_User_created_response_test.json index 42def371a51..b676df880e6 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_user_returns_User_created_response_test.json +++ b/src/test/resources/cassettes/features/v1/Create_a_user_returns_User_created_response_test.json @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "af617072-2860-ba27-e045-b00c8baf0187" + "id": "af617072-2860-ba27-e045-b00c8baf0188" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_user_returns_null_access_role.json b/src/test/resources/cassettes/features/v1/Create_a_user_returns_null_access_role.json index 5a17eb5f03a..e5b3fe6bcf6 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_user_returns_null_access_role.json +++ b/src/test/resources/cassettes/features/v1/Create_a_user_returns_null_access_role.json @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "af617072-2860-ba27-e045-b00c8baf0188" + "id": "af617072-2860-ba27-e045-b00c8baf0187" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Create_account_config_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Create_account_config_returns_Conflict_response.json index d603e22c7bf..ff861cd3c9f 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Create_account_config_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Create_account_config_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eeb" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eea" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_No_Content_response.json index 20187b03f7f..cf63593c8d1 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eea" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9ee9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Not_Found_response.json index 490992cbf88..aa5b0a6e9b8 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eee" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eed" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2123e3-6fb5-0f90-fe98-365e086c9c6f" + "id": "ab2123e3-6fb5-0f90-fe98-365e086c9c6e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_AWS_Account_object_response.json index 70fc4d3589b..f02f71207af 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eec" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eeb" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_List_available_namespaces_returns_AWS_Namespaces_List_object_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_List_available_namespaces_returns_AWS_Namespaces_List_object_response.json index 994e56ed9eb..7711ea26b7b 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_List_available_namespaces_returns_AWS_Namespaces_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_List_available_namespaces_returns_AWS_Namespaces_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d11" + "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d0e" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_List_namespaces_returns_AWS_Namespaces_List_object_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_List_namespaces_returns_AWS_Namespaces_List_object_response.json index 7711ea26b7b..2e4479a46a7 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_List_namespaces_returns_AWS_Namespaces_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_List_namespaces_returns_AWS_Namespaces_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d0e" + "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d10" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_AWS_Account_object_response.json index 0b391d3aa3a..520c88368e3 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eed" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eec" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_Bad_Request_response.json index 77aa5204b9c..f2b714e3f34 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9ee9" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eee" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json index 2be18c73072..a8c4aa7a929 100644 --- a/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f1" + "id": "79babc38-7a70-5347-c8a6-73b0e7014600" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json index adda0ec49d5..b65d84821ea 100644 --- a/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ed" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ff" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json index 4323550909c..dbfac8750db 100644 --- a/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f6" + "id": "79babc38-7a70-5347-c8a6-73b0e70145fd" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.json index c791186e6fd..8e9d7338d0d 100644 --- a/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145fd" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ec" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_Bad_Request_response.json index 394f3b77f1e..633105f0f85 100644 --- a/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d35" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d30" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_OK_response.json index d39fee8a337..c794e78463c 100644 --- a/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2d" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_Bad_Request_response.json index 834de428629..eb6915eead6 100644 --- a/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d34" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d32" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.json index b2d3b56dbd7..2dd306813ac 100644 --- a/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Cancel_a_historical_job_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80ffd" + "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80ffe" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Cancels_a_data_deletion_request_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Cancels_a_data_deletion_request_returns_OK_response.json index 94ffd01c024..cfae7af1511 100644 --- a/src/test/resources/cassettes/features/v2/Cancels_a_data_deletion_request_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Cancels_a_data_deletion_request_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "516e2b97-25f6-b08c-4d4a-1da22948b330" + "id": "516e2b97-25f6-b08c-4d4a-1da22948b32f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json index 9b1a448d846..8c97b2392b3 100644 --- a/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145fe" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f6" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json index 43ce65998fe..b9551e2103c 100644 --- a/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ee" + "id": "79babc38-7a70-5347-c8a6-73b0e70145eb" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_AWS_CCM_Config_object_response.json b/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_AWS_CCM_Config_object_response.json index 7e70b6729df..7c726903cc8 100644 --- a/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_AWS_CCM_Config_object_response.json +++ b/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_AWS_CCM_Config_object_response.json @@ -18,7 +18,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2bcb392-2d71-be89-5578-460535c541af" + "id": "b2bcb392-2d71-be89-5578-460535c541b0" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully_response.json b/src/test/resources/cassettes/features/v2/Create_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully_response.json index a4926516be0..ac76e0bad7e 100644 --- a/src/test/resources/cassettes/features/v2/Create_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully_response.json +++ b/src/test/resources/cassettes/features/v2/Create_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "22e692ec-0118-56ae-6a7b-e829dfef841a" + "id": "22e692ec-0118-56ae-6a7b-e829dfef8419" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_AWS_on_demand_task_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_AWS_on_demand_task_returns_Bad_Request_response.json index 91451dfea49..ea94cd9866e 100644 --- a/src/test/resources/cassettes/features/v2/Create_AWS_on_demand_task_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_AWS_on_demand_task_returns_Bad_Request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "ddc95453-e78c-c1f7-f3a9-441d29765f2f" + "id": "ddc95453-e78c-c1f7-f3a9-441d29765f2e" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json index 7d376643348..95cb4a17509 100644 --- a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae48" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae45" }, { "httpRequest": { @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae49" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae46" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json index 09c3eea3a79..213894420af 100644 --- a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae46" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae44" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_Bad_Request_response.json index d6ef2b55a53..b58e59655c9 100644 --- a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_Bad_Request_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e79" + "id": "01611a93-5e74-0630-3c51-f707c3b51e78" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9e" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_OK_response.json index 02cf1734a56..27a0366d605 100644 --- a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7e" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7d" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa2" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa1" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_with_should_save_match_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_with_should_save_match_returns_OK_response.json index 1fec75541c7..724c6d79189 100644 --- a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_with_should_save_match_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_with_should_save_match_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7f" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7a" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa3" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Bad_request_response.json b/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Bad_request_response.json index 95a9b514916..18bfaac3c98 100644 --- a/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Bad_request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Bad_request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "9dbbb4fe-ff77-d906-2de1-752f55e537f6" + "id": "9dbbb4fe-ff77-d906-2de1-752f55e537f5" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json index c995fd8ce46..4db34a7a497 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "9dbbb4fe-ff77-d906-2de1-752f55e537f5" + "id": "9dbbb4fe-ff77-d906-2de1-752f55e537f6" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json index 33f84691420..0f7572f4ef5 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c72" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c74" }, { "httpRequest": { @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c73" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c75" }, { "httpRequest": { @@ -83,6 +83,6 @@ "timeToLive": { "unlimited": true }, - "id": "e535722a-99e3-30cf-49f7-2d093bd78b3b" + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3e" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json index 5b2bdee0951..09067379e94 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c76" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c71" }, { "httpRequest": { @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "e535722a-99e3-30cf-49f7-2d093bd78b3f" + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3a" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_Conflict_response.json index f98e1c3550d..df7ec302f17 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "32c558cf-4a2e-f914-f443-ab94000addcc" + "id": "32c558cf-4a2e-f914-f443-ab94000addca" }, { "httpRequest": { @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "32c558cf-4a2e-f914-f443-ab94000addcd" + "id": "32c558cf-4a2e-f914-f443-ab94000addcb" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_OK_response.json index 3f9206673d4..fba8b2ccd41 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "32c558cf-4a2e-f914-f443-ab94000addce" + "id": "32c558cf-4a2e-f914-f443-ab94000addcd" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_a_restriction_query_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_restriction_query_returns_OK_response.json index 2cb19c254b0..fef955ebbee 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_restriction_query_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_restriction_query_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "eb3b308b-3d56-9ef8-4096-dd7718f51861" + "id": "eb3b308b-3d56-9ef8-4096-dd7718f5185e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_an_AWS_account_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/Create_an_AWS_account_returns_AWS_Account_object_response.json index 4e7150c70a8..83646ddb287 100644 --- a/src/test/resources/cassettes/features/v2/Create_an_AWS_account_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/Create_an_AWS_account_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "bf073e02-7e0b-dc8b-b075-82932236e50b" + "id": "bf073e02-7e0b-dc8b-b075-82932236e50a" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_an_AWS_integration_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_an_AWS_integration_returns_Conflict_response.json index 18ed773dab0..d5488cdba66 100644 --- a/src/test/resources/cassettes/features/v2/Create_an_AWS_integration_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Create_an_AWS_integration_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce1" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce2" }, { "httpRequest": { @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "bf073e02-7e0b-dc8b-b075-82932236e50a" + "id": "bf073e02-7e0b-dc8b-b075-82932236e50b" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_an_incident_type_returns_CREATED_response.json b/src/test/resources/cassettes/features/v2/Create_an_incident_type_returns_CREATED_response.json index 5fdb5139b99..4e0d708d5b5 100644 --- a/src/test/resources/cassettes/features/v2/Create_an_incident_type_returns_CREATED_response.json +++ b/src/test/resources/cassettes/features/v2/Create_an_incident_type_returns_CREATED_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd3" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd6" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_Bad_Request_response.json index 2afada8e889..c312b3face8 100644 --- a/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dc45fc73-0f09-c12d-941b-eaf799af6465" + "id": "dc45fc73-0f09-c12d-941b-eaf799af6466" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_CREATED_response.json b/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_CREATED_response.json index 76a037f2ed4..1a120b75ae8 100644 --- a/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_CREATED_response.json +++ b/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_CREATED_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dc45fc73-0f09-c12d-941b-eaf799af6467" + "id": "dc45fc73-0f09-c12d-941b-eaf799af6463" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_incident_notification_rule_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_incident_notification_rule_returns_Created_response.json index 31333da4750..4032fbdc8fc 100644 --- a/src/test/resources/cassettes/features/v2/Create_incident_notification_rule_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Create_incident_notification_rule_returns_Created_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd6" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bdc" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_incident_notification_template_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_incident_notification_template_returns_Created_response.json index 91af4088c4a..6b69cce1630 100644 --- a/src/test/resources/cassettes/features/v2/Create_incident_notification_template_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Create_incident_notification_template_returns_Created_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd2" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bdb" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_role_with_a_permission_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_role_with_a_permission_returns_OK_response.json index cf1765920e9..226202c4126 100644 --- a/src/test/resources/cassettes/features/v2/Create_role_with_a_permission_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_role_with_a_permission_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb89216d" + "id": "ab2c08c1-60c7-9278-3246-d650bb892173" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_AWS_CCM_config_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_AWS_CCM_config_returns_No_Content_response.json index efa9967a0e4..c32805bcdb2 100644 --- a/src/test/resources/cassettes/features/v2/Delete_AWS_CCM_config_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_AWS_CCM_config_returns_No_Content_response.json @@ -18,6 +18,6 @@ "timeToLive": { "unlimited": true }, - "id": "b2bcb392-2d71-be89-5578-460535c541b0" + "id": "b2bcb392-2d71-be89-5578-460535c541af" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json index 0c91755cb44..043c1ba1cdb 100644 --- a/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50f" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.json index 17f6987468c..7ed67796512 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c513" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json index bb02652c1ea..bec4c8bb7be 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae43" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae49" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_Scanning_Group_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_Scanning_Group_returns_OK_response.json index bc7e7c252fa..f6f0ad2102c 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Scanning_Group_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_Scanning_Group_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7d" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7f" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa1" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa3" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_Scanning_Rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_Scanning_Rule_returns_OK_response.json index 0a4283ae5ae..703a137e1f9 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Scanning_Rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_Scanning_Rule_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e85" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7b" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa7" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa0" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json index 0f7523c96c6..ab18e4a92c4 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c74" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c73" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_dataset_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_a_dataset_returns_No_Content_response.json index 92c10c6b507..21f390e6ce1 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_dataset_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_dataset_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "32c558cf-4a2e-f914-f443-ab94000addc9" + "id": "32c558cf-4a2e-f914-f443-ab94000addce" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_pipeline_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_pipeline_returns_OK_response.json index 73d82f08f24..91769fdcab4 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_pipeline_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_pipeline_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7e" + "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_restriction_query_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_restriction_query_returns_OK_response.json index 9d5fec45de3..85885d0581b 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_restriction_query_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_restriction_query_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "eb3b308b-3d56-9ef8-4096-dd7718f5185f" + "id": "eb3b308b-3d56-9ef8-4096-dd7718f51861" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_retention_filter_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_retention_filter_returns_OK_response.json index aeb041f1a43..381d1b90a1b 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_retention_filter_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_retention_filter_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069c" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0699" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_No_Content_response.json index 1530f93b73b..10fbac85dbb 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce3" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce5" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Not_Found_response.json index 7d178b53207..a5021c6aada 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce2" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce6" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2123e3-6fb5-0f90-fe98-365e086c9c6e" + "id": "ab2123e3-6fb5-0f90-fe98-365e086c9c6f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json index f3cb8669c10..a86b5756b5e 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21d" + "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21c" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_an_incident_type_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_an_incident_type_returns_OK_response.json index ee9ff41cc5e..8b898cb6a9d 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_incident_type_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_incident_type_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd1" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bda" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Bad_Request_response.json index 7808c1e347b..18d5998a22a 100644 --- a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145eb" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ea" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_No_Content_response.json index fcf4a2bf172..021bac611d3 100644 --- a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145fa" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f2" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json index 075a7f9db40..7747f8db345 100644 --- a/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f8" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f7" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_custom_attributes_config_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Delete_custom_attributes_config_returns_Bad_Request_response.json index ed84911497c..2dc635d3a78 100644 --- a/src/test/resources/cassettes/features/v2/Delete_custom_attributes_config_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_custom_attributes_config_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dc45fc73-0f09-c12d-941b-eaf799af6464" + "id": "dc45fc73-0f09-c12d-941b-eaf799af6467" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_custom_attributes_config_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_custom_attributes_config_returns_No_Content_response.json index 149174ae6d9..89e714c46e3 100644 --- a/src/test/resources/cassettes/features/v2/Delete_custom_attributes_config_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_custom_attributes_config_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dc45fc73-0f09-c12d-941b-eaf799af6463" + "id": "dc45fc73-0f09-c12d-941b-eaf799af6465" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_datastore_item_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_datastore_item_returns_OK_response.json index a1c5ecbb403..14ecd66b8a4 100644 --- a/src/test/resources/cassettes/features/v2/Delete_datastore_item_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_datastore_item_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d33" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2c" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_datastore_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_datastore_returns_OK_response.json index 3ffceed3185..89a12a585b3 100644 --- a/src/test/resources/cassettes/features/v2/Delete_datastore_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_datastore_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2c" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d31" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_incident_notification_rule_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_incident_notification_rule_returns_No_Content_response.json index 621a6a2a79d..6e8b7d7b0b1 100644 --- a/src/test/resources/cassettes/features/v2/Delete_incident_notification_rule_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_incident_notification_rule_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd7" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_incident_notification_template_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_incident_notification_template_returns_No_Content_response.json index 23e7a36d764..3770b9b0a09 100644 --- a/src/test/resources/cassettes/features/v2/Delete_incident_notification_template_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_incident_notification_template_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bdb" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd5" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Edit_a_dataset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Edit_a_dataset_returns_OK_response.json index f868434d6ac..75a40d06c1c 100644 --- a/src/test/resources/cassettes/features/v2/Edit_a_dataset_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Edit_a_dataset_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "32c558cf-4a2e-f914-f443-ab94000addcf" + "id": "32c558cf-4a2e-f914-f443-ab94000addc9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Generate_a_new_external_ID_returns_AWS_External_ID_object_response.json b/src/test/resources/cassettes/features/v2/Generate_a_new_external_ID_returns_AWS_External_ID_object_response.json index c2491988476..6ef442b0c31 100644 --- a/src/test/resources/cassettes/features/v2/Generate_a_new_external_ID_returns_AWS_External_ID_object_response.json +++ b/src/test/resources/cassettes/features/v2/Generate_a_new_external_ID_returns_AWS_External_ID_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2cc" + "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2ce" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Generate_new_external_ID_returns_AWS_External_ID_object_response.json b/src/test/resources/cassettes/features/v2/Generate_new_external_ID_returns_AWS_External_ID_object_response.json index 1e23eb77688..dbcf089d3c7 100644 --- a/src/test/resources/cassettes/features/v2/Generate_new_external_ID_returns_AWS_External_ID_object_response.json +++ b/src/test/resources/cassettes/features/v2/Generate_new_external_ID_returns_AWS_External_ID_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2ce" + "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2cc" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_task_by_id_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_task_by_id_returns_Bad_Request_response.json index 6b2882ea815..fe4cf251d57 100644 --- a/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_task_by_id_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_task_by_id_returns_Bad_Request_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "4fd99083-06ab-185c-0a48-d579a5f192c2" + "id": "4fd99083-06ab-185c-0a48-d579a5f192c1" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_tasks_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_tasks_returns_OK_response.json index 774e33bf524..5fe868f6988 100644 --- a/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_tasks_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_tasks_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "7442c701-c89c-a74b-3de9-6b4cff876179" + "id": "7442c701-c89c-a74b-3de9-6b4cff876178" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_AWS_on_demand_task_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Get_AWS_on_demand_task_returns_Bad_Request_response.json index fe4cf251d57..6b2882ea815 100644 --- a/src/test/resources/cassettes/features/v2/Get_AWS_on_demand_task_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Get_AWS_on_demand_task_returns_Bad_Request_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "4fd99083-06ab-185c-0a48-d579a5f192c1" + "id": "4fd99083-06ab-185c-0a48-d579a5f192c2" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_AWS_scan_options_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_AWS_scan_options_returns_OK_response.json index 60bf7212494..bc09886e60a 100644 --- a/src/test/resources/cassettes/features/v2/Get_AWS_scan_options_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_AWS_scan_options_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "2cb6ecfe-386c-3349-2689-26da480a6b5d" + "id": "2cb6ecfe-386c-3349-2689-26da480a6b5e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_App_returns_Gone_response.json b/src/test/resources/cassettes/features/v2/Get_App_returns_Gone_response.json index d0faeb9a172..b5a3dd39c4e 100644 --- a/src/test/resources/cassettes/features/v2/Get_App_returns_Gone_response.json +++ b/src/test/resources/cassettes/features/v2/Get_App_returns_Gone_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50c" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json index b461aa9101d..f38809e8af9 100644 --- a/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50e" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c512" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_GCP_scan_options_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_GCP_scan_options_returns_OK_response.json index 018b1504a4a..cab40f18769 100644 --- a/src/test/resources/cassettes/features/v2/Get_GCP_scan_options_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_GCP_scan_options_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "f9eb4412-690a-34d5-e9ac-6eb62df01fac" + "id": "f9eb4412-690a-34d5-e9ac-6eb62df01fab" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json index 958f238638a..009fff14323 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c75" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c72" }, { "httpRequest": { @@ -79,6 +79,6 @@ "timeToLive": { "unlimited": true }, - "id": "e535722a-99e3-30cf-49f7-2d093bd78b3e" + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3b" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_given_APM_retention_filter_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_given_APM_retention_filter_returns_OK_response.json index b3366690d8d..1519dba55ca 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_given_APM_retention_filter_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_given_APM_retention_filter_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0697" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069c" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json index e1bd23989d9..5534121a3e8 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80fff" + "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80ffd" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_a_restriction_query_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_restriction_query_returns_OK_response.json index f6628e0a51d..0c7c6a0abc1 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_restriction_query_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_restriction_query_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "eb3b308b-3d56-9ef8-4096-dd7718f51860" + "id": "eb3b308b-3d56-9ef8-4096-dd7718f5185f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_a_single_dataset_by_ID_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_single_dataset_by_ID_returns_OK_response.json index 462a7eb38f0..59a863c261f 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_single_dataset_by_ID_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_single_dataset_by_ID_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "32c558cf-4a2e-f914-f443-ab94000addca" + "id": "32c558cf-4a2e-f914-f443-ab94000addcf" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_a_specific_pipeline_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_specific_pipeline_returns_OK_response.json index 40f41bf5c71..ac29f8cf42e 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_specific_pipeline_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_specific_pipeline_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7d" + "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_all_custom_attributes_config_of_case_type_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_all_custom_attributes_config_of_case_type_returns_OK_response.json index 758e4fb66ad..3286dbce5dc 100644 --- a/src/test/resources/cassettes/features/v2/Get_all_custom_attributes_config_of_case_type_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_all_custom_attributes_config_of_case_type_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dc45fc73-0f09-c12d-941b-eaf799af6466" + "id": "dc45fc73-0f09-c12d-941b-eaf799af6464" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_all_datasets_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_all_datasets_returns_OK_response.json index 7b4fa0f864b..bd35bd59ea6 100644 --- a/src/test/resources/cassettes/features/v2/Get_all_datasets_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_all_datasets_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "32c558cf-4a2e-f914-f443-ab94000addcb" + "id": "32c558cf-4a2e-f914-f443-ab94000addcc" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_all_rules_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_all_rules_returns_OK_response.json index e1d7d6dfa5f..6e336f005de 100644 --- a/src/test/resources/cassettes/features/v2/Get_all_rules_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_all_rules_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "7e2e839d-ac73-21dc-b480-36e366ae09da" + "id": "7e2e839d-ac73-21dc-b480-36e366ae09d9" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_AWS_Account_object_response.json index 9933d6258ad..88ec4190fd7 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce6" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce3" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json index 79b249db928..c859297de35 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21f" + "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_datastore_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_datastore_returns_OK_response.json index f392f13fc4c..b79df729351 100644 --- a/src/test/resources/cassettes/features/v2/Get_datastore_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_datastore_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d31" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d34" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_incident_notification_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_incident_notification_rule_returns_OK_response.json index 00f0e4bc8fd..7b054104c3f 100644 --- a/src/test/resources/cassettes/features/v2/Get_incident_notification_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_incident_notification_rule_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bdc" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd7" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_incident_notification_template_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_incident_notification_template_returns_OK_response.json index 273c818221c..06a6f28a5dd 100644 --- a/src/test/resources/cassettes/features/v2/Get_incident_notification_template_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_incident_notification_template_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd5" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd3" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_list_of_AWS_log_ready_services_returns_AWS_Logs_Services_List_object_response.json b/src/test/resources/cassettes/features/v2/Get_list_of_AWS_log_ready_services_returns_AWS_Logs_Services_List_object_response.json index e05cab1201f..f469a5cda1f 100644 --- a/src/test/resources/cassettes/features/v2/Get_list_of_AWS_log_ready_services_returns_AWS_Logs_Services_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/Get_list_of_AWS_log_ready_services_returns_AWS_Logs_Services_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "03c3c0d9-a62f-5ac6-398b-e22a05d14d7b" + "id": "03c3c0d9-a62f-5ac6-398b-e22a05d14d79" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json index 9aabde754b9..832db589a6a 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f3" + "id": "79babc38-7a70-5347-c8a6-73b0e70145fa" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Gets_a_list_of_data_deletion_requests_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Gets_a_list_of_data_deletion_requests_returns_OK_response.json index 1eccad92176..6ab71e5cb0b 100644 --- a/src/test/resources/cassettes/features/v2/Gets_a_list_of_data_deletion_requests_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Gets_a_list_of_data_deletion_requests_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "516e2b97-25f6-b08c-4d4a-1da22948b32f" + "id": "516e2b97-25f6-b08c-4d4a-1da22948b330" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Grant_permission_to_a_role_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Grant_permission_to_a_role_returns_OK_response.json index d1447e359b2..c185341f0ba 100644 --- a/src/test/resources/cassettes/features/v2/Grant_permission_to_a_role_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Grant_permission_to_a_role_returns_OK_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb89216c" + "id": "ab2c08c1-60c7-9278-3246-d650bb892175" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Grant_role_to_a_restriction_query_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Grant_role_to_a_restriction_query_returns_OK_response.json index d88ac2ed754..ceb58f79339 100644 --- a/src/test/resources/cassettes/features/v2/Grant_role_to_a_restriction_query_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Grant_role_to_a_restriction_query_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "eb3b308b-3d56-9ef8-4096-dd7718f5185e" + "id": "eb3b308b-3d56-9ef8-4096-dd7718f51862" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_AWS_on_demand_tasks_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_AWS_on_demand_tasks_returns_OK_response.json index 61e60b91801..f5543674faa 100644 --- a/src/test/resources/cassettes/features/v2/List_AWS_on_demand_tasks_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_AWS_on_demand_tasks_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "7442c701-c89c-a74b-3de9-6b4cff876178" + "id": "7442c701-c89c-a74b-3de9-6b4cff876179" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_AWS_scan_options_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_AWS_scan_options_returns_OK_response.json index 4c0f531592f..33fc1c5e1e7 100644 --- a/src/test/resources/cassettes/features/v2/List_AWS_scan_options_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_AWS_scan_options_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "2cb6ecfe-386c-3349-2689-26da480a6b5e" + "id": "2cb6ecfe-386c-3349-2689-26da480a6b5d" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_GCP_scan_options_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_GCP_scan_options_returns_OK_response.json index c09bb52e54b..e200ee772e9 100644 --- a/src/test/resources/cassettes/features/v2/List_GCP_scan_options_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_GCP_scan_options_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "f9eb4412-690a-34d5-e9ac-6eb62df01fab" + "id": "f9eb4412-690a-34d5-e9ac-6eb62df01fac" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_Scanning_Groups_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_Scanning_Groups_returns_OK_response.json index b59f7c51711..601160992e8 100644 --- a/src/test/resources/cassettes/features/v2/List_Scanning_Groups_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_Scanning_Groups_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e82" + "id": "01611a93-5e74-0630-3c51-f707c3b51e84" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa5" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa7" }, { "httpRequest": { @@ -79,7 +79,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e83" + "id": "01611a93-5e74-0630-3c51-f707c3b51e85" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_all_APM_retention_filters_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_all_APM_retention_filters_returns_OK_response.json index ab1e1d16101..3ea25dce874 100644 --- a/src/test/resources/cassettes/features/v2/List_all_APM_retention_filters_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_all_APM_retention_filters_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0698" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069b" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_all_rules_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_all_rules_returns_OK_response.json index 80e2da9ecca..2cd151adcdb 100644 --- a/src/test/resources/cassettes/features/v2/List_all_rules_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_all_rules_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "7e2e839d-ac73-21dc-b480-36e366ae09d9" + "id": "7e2e839d-ac73-21dc-b480-36e366ae09da" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_available_namespaces_returns_AWS_Namespaces_List_object_response.json b/src/test/resources/cassettes/features/v2/List_available_namespaces_returns_AWS_Namespaces_List_object_response.json index f0011c849a4..4e2a1b8a39b 100644 --- a/src/test/resources/cassettes/features/v2/List_available_namespaces_returns_AWS_Namespaces_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/List_available_namespaces_returns_AWS_Namespaces_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d0f" + "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d11" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_datastore_items_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_datastore_items_returns_OK_response.json index ca6902dd772..3ec5cb41a21 100644 --- a/src/test/resources/cassettes/features/v2/List_datastore_items_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_datastore_items_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d32" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d35" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_incident_notification_rules_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_incident_notification_rules_returns_OK_response.json index 26f01926eeb..658cc27abad 100644 --- a/src/test/resources/cassettes/features/v2/List_incident_notification_rules_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_incident_notification_rules_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd4" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd1" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_log_services_returns_AWS_Logs_Services_List_object_response.json b/src/test/resources/cassettes/features/v2/List_log_services_returns_AWS_Logs_Services_List_object_response.json index f469a5cda1f..e05cab1201f 100644 --- a/src/test/resources/cassettes/features/v2/List_log_services_returns_AWS_Logs_Services_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/List_log_services_returns_AWS_Logs_Services_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "03c3c0d9-a62f-5ac6-398b-e22a05d14d79" + "id": "03c3c0d9-a62f-5ac6-398b-e22a05d14d7b" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_namespaces_returns_AWS_Namespaces_List_object_response.json b/src/test/resources/cassettes/features/v2/List_namespaces_returns_AWS_Namespaces_List_object_response.json index 25a1f8a4ae0..f0011c849a4 100644 --- a/src/test/resources/cassettes/features/v2/List_namespaces_returns_AWS_Namespaces_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/List_namespaces_returns_AWS_Namespaces_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d10" + "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d0f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_permissions_for_a_role_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_permissions_for_a_role_returns_OK_response.json index a48da463a36..cfd81d2cd53 100644 --- a/src/test/resources/cassettes/features/v2/List_permissions_for_a_role_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_permissions_for_a_role_returns_OK_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb89216e" + "id": "ab2c08c1-60c7-9278-3246-d650bb89216d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_permissions_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_permissions_returns_OK_response.json index ca2387782fd..15f40344bd7 100644 --- a/src/test/resources/cassettes/features/v2/List_permissions_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_permissions_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892173" + "id": "ab2c08c1-60c7-9278-3246-d650bb89216c" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_pipelines_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_pipelines_returns_OK_response.json index 17a313d3d48..7f8215348d1 100644 --- a/src/test/resources/cassettes/features/v2/List_pipelines_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_pipelines_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7f" + "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c80" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_roles_for_a_restriction_query_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_roles_for_a_restriction_query_returns_OK_response.json index b3459ffd0fc..88ddad7a3ae 100644 --- a/src/test/resources/cassettes/features/v2/List_roles_for_a_restriction_query_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_roles_for_a_restriction_query_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "eb3b308b-3d56-9ef8-4096-dd7718f51862" + "id": "eb3b308b-3d56-9ef8-4096-dd7718f51860" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_Bad_Request_response_2.json b/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_Bad_Request_response_2.json index 2ebfbdcfa75..c48e77cce48 100644 --- a/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_Bad_Request_response_2.json +++ b/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_Bad_Request_response_2.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "c6af96d1-87d1-3cd6-0d2d-71631b85bb77" + "id": "c6af96d1-87d1-3cd6-0d2d-71631b85bb78" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_No_Content_response.json index 974c53ce63d..1b2ef6880a2 100644 --- a/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_No_Content_response.json @@ -22,6 +22,6 @@ "timeToLive": { "unlimited": true }, - "id": "0f485c8a-a29e-ebed-3836-545f90bc9456" + "id": "0f485c8a-a29e-ebed-3836-545f90bc9458" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_OK_response.json index 1b2ef6880a2..0a176ee003e 100644 --- a/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_AWS_Scan_Options_returns_OK_response.json @@ -22,6 +22,6 @@ "timeToLive": { "unlimited": true }, - "id": "0f485c8a-a29e-ebed-3836-545f90bc9458" + "id": "0f485c8a-a29e-ebed-3836-545f90bc9457" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Bad_Request_response.json index d4bcf1ca8ac..fee9f74e00a 100644 --- a/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Bad_Request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "c2c329a8-5875-126a-1858-e7c00b5af113" + "id": "c2c329a8-5875-126a-1858-e7c00b5af114" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Not_Found_response.json index 0d180071156..a7baf1534a7 100644 --- a/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Not_Found_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "0a6c2650-313c-cd4a-4230-f1a883526455" + "id": "0a6c2650-313c-cd4a-4230-f1a883526456" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Post_an_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully_response.json b/src/test/resources/cassettes/features/v2/Post_an_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully_response.json index 8b4791c29ca..c6ff6086445 100644 --- a/src/test/resources/cassettes/features/v2/Post_an_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully_response.json +++ b/src/test/resources/cassettes/features/v2/Post_an_AWS_on_demand_task_returns_AWS_on_demand_task_created_successfully_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "22e692ec-0118-56ae-6a7b-e829dfef8419" + "id": "22e692ec-0118-56ae-6a7b-e829dfef841a" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Post_an_AWS_on_demand_task_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Post_an_AWS_on_demand_task_returns_Bad_Request_response.json index ea94cd9866e..91451dfea49 100644 --- a/src/test/resources/cassettes/features/v2/Post_an_AWS_on_demand_task_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Post_an_AWS_on_demand_task_returns_Bad_Request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "ddc95453-e78c-c1f7-f3a9-441d29765f2e" + "id": "ddc95453-e78c-c1f7-f3a9-441d29765f2f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Publish_App_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Publish_App_returns_Created_response.json index 458c0a50fce..83dc7ceab4a 100644 --- a/src/test/resources/cassettes/features/v2/Publish_App_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Publish_App_returns_Created_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c512" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c514" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_Bad_Request_response.json index 9232671467e..db4e9405d0d 100644 --- a/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_Bad_Request_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7a" + "id": "01611a93-5e74-0630-3c51-f707c3b51e79" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9f" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Revoke_permission_returns_Not_found_response.json b/src/test/resources/cassettes/features/v2/Revoke_permission_returns_Not_found_response.json index d59c27e003b..3ad8271712a 100644 --- a/src/test/resources/cassettes/features/v2/Revoke_permission_returns_Not_found_response.json +++ b/src/test/resources/cassettes/features/v2/Revoke_permission_returns_Not_found_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892174" + "id": "ab2c08c1-60c7-9278-3246-d650bb89216f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Revoke_permission_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Revoke_permission_returns_OK_response.json index 988f4ea02fd..29de68e4b42 100644 --- a/src/test/resources/cassettes/features/v2/Revoke_permission_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Revoke_permission_returns_OK_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892175" + "id": "ab2c08c1-60c7-9278-3246-d650bb892174" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json index 916bccfa080..e5433d704cc 100644 --- a/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json +++ b/src/test/resources/cassettes/features/v2/Run_a_historical_job_returns_Status_created_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80ffe" + "id": "6bb82102-e994-f0d1-ee96-e1e3f1d80fff" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json index 5f10e5a84ba..b0100b1774b 100644 --- a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f7" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ee" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json index 2cf2f5e7036..60a873eea23 100644 --- a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f0" + "id": "79babc38-7a70-5347-c8a6-73b0e70145e9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json index cd0f546067e..9696ac40e32 100644 --- a/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145fc" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ef" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Unpublish_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Unpublish_App_returns_OK_response.json index 5aa2107af10..785bd78f8b8 100644 --- a/src/test/resources/cassettes/features/v2/Unpublish_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Unpublish_App_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50d" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c513" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_AWS_scan_options_returns_Bad_Request_response_2.json b/src/test/resources/cassettes/features/v2/Update_AWS_scan_options_returns_Bad_Request_response_2.json index c48e77cce48..2ebfbdcfa75 100644 --- a/src/test/resources/cassettes/features/v2/Update_AWS_scan_options_returns_Bad_Request_response_2.json +++ b/src/test/resources/cassettes/features/v2/Update_AWS_scan_options_returns_Bad_Request_response_2.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "c6af96d1-87d1-3cd6-0d2d-71631b85bb78" + "id": "c6af96d1-87d1-3cd6-0d2d-71631b85bb77" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_AWS_scan_options_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Update_AWS_scan_options_returns_No_Content_response.json index 0a176ee003e..974c53ce63d 100644 --- a/src/test/resources/cassettes/features/v2/Update_AWS_scan_options_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Update_AWS_scan_options_returns_No_Content_response.json @@ -22,6 +22,6 @@ "timeToLive": { "unlimited": true }, - "id": "0f485c8a-a29e-ebed-3836-545f90bc9457" + "id": "0f485c8a-a29e-ebed-3836-545f90bc9456" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json index b2d72b87ba2..5e1d57e1aff 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c514" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50c" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Bad_Request_response.json index e0d488678ae..bd889c4d7e5 100644 --- a/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Bad_Request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "c2c329a8-5875-126a-1858-e7c00b5af114" + "id": "c2c329a8-5875-126a-1858-e7c00b5af113" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Not_Found_response.json index a7baf1534a7..0d180071156 100644 --- a/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Not_Found_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "0a6c2650-313c-cd4a-4230-f1a883526456" + "id": "0a6c2650-313c-cd4a-4230-f1a883526455" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json index 33523d241e1..441a98208d4 100644 --- a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae45" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae48" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json index e14debdb1c1..085c2a10ee9 100644 --- a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae44" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae43" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_Scanning_Group_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Scanning_Group_returns_OK_response.json index 949fd15a46e..4fc4e2937a7 100644 --- a/src/test/resources/cassettes/features/v2/Update_Scanning_Group_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Scanning_Group_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e78" + "id": "01611a93-5e74-0630-3c51-f707c3b51e83" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9d" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa6" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_Bad_Request_response.json index bc71ccd8654..71ae1c8ab0f 100644 --- a/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_Bad_Request_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e84" + "id": "01611a93-5e74-0630-3c51-f707c3b51e82" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa6" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa5" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_OK_response.json index 7a985fbb55d..19819989192 100644 --- a/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7b" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7e" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa0" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa2" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_Bad_Request_response.json index c7a6553a4f2..36d9e528f82 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9442" + "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9441" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_OK_response.json index 72e65a80efe..7b5287a216a 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9441" + "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9443" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_Bad_Request_response.json index 370567a4e26..402e0d483a0 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9443" + "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9442" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.json index 4144e776050..c6d6252edc4 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c71" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c76" }, { "httpRequest": { @@ -83,6 +83,6 @@ "timeToLive": { "unlimited": true }, - "id": "e535722a-99e3-30cf-49f7-2d093bd78b3a" + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_Bad_Request_response.json index 3f6cb5725eb..7ecba1161be 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c80" + "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Bad_Request_response.json index dff3c5435d1..c669844b54b 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069d" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0697" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Not_Found_response.json index f8e2615c3f8..170166752c7 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Not_Found_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "ce266f9d-5f90-251e-805b-1fa5bbd62fea" + "id": "ce266f9d-5f90-251e-805b-1fa5bbd62feb" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_OK_response.json index cd4b267d68f..3e2885f919c 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0699" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069a" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_with_trace_rate_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_with_trace_rate_returns_OK_response.json index 22477665035..a39d900e784 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_with_trace_rate_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_with_trace_rate_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069b" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Not_Found_response.json index 170166752c7..f8e2615c3f8 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Not_Found_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "ce266f9d-5f90-251e-805b-1fa5bbd62feb" + "id": "ce266f9d-5f90-251e-805b-1fa5bbd62fea" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_OK_response.json index 4dbd4d81382..4f3f459c693 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069a" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0698" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Role_ID_response.json b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Role_ID_response.json index a569622fd79..5eaaca04e42 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Role_ID_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Role_ID_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb89216f" + "id": "ab2c08c1-60c7-9278-3246-d650bb89216e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Not_found_response.json b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Not_found_response.json index 811fe023421..3523eabfb46 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Not_found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Not_found_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892172" + "id": "ab2c08c1-60c7-9278-3246-d650bb892170" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_role_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_role_returns_OK_response.json index b402a04ba55..ada6cbf8cd4 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_role_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_role_returns_OK_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892170" + "id": "ab2c08c1-60c7-9278-3246-d650bb892172" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_AWS_Account_object_response.json index c0415eb8a2f..2efa53de1ac 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce5" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce4" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_Bad_Request_response.json index 38f465a9e25..5e43645a6a4 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce4" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce1" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json index 3fff6d70d3c..59be0a3c587 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21e" + "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json index 0f470acf82f..be6cf1cbadf 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21c" + "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_an_incident_type_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_an_incident_type_returns_OK_response.json index d75c200e9ae..6309739cc9f 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_incident_type_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_incident_type_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd9" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd2" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_Bad_Request_response.json index 743bfbc7078..c403571c4ea 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "0a6534d0-42f2-5075-64f8-7ab28f449a8e" + "id": "0a6534d0-42f2-5075-64f8-7ab28f449a8d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json index aa33727ca2c..88be588dd3c 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ff" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f5" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json index a9ce37fb461..edb0c4fa3c7 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e7014600" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ed" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_description_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_description_returns_Bad_Request_response.json index d1c977728b3..431f560d206 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_description_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_description_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "0a6534d0-42f2-5075-64f8-7ab28f449a8d" + "id": "0a6534d0-42f2-5075-64f8-7ab28f449a8e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json index 31556059bfd..b4cf2323a2d 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ec" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f1" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json index 88b2bb14ac5..266a2b33b31 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f5" + "id": "79babc38-7a70-5347-c8a6-73b0e70145fe" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json index 8acf5728617..f462fd4c8dd 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145e9" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f0" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json index 60921358de9..6a5f8600d39 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ef" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f3" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json index b4040b956bc..4d0529dbc46 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f9" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f8" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json index c06b8597bd4..40f7af7c478 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ea" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json index 1a052a0e510..1463cb0e2aa 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f2" + "id": "79babc38-7a70-5347-c8a6-73b0e70145fc" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_datastore_item_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_datastore_item_returns_OK_response.json index 6b8400bc073..a293ad3ef40 100644 --- a/src/test/resources/cassettes/features/v2/Update_datastore_item_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_datastore_item_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d30" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_datastore_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_datastore_returns_OK_response.json index 3300bd74e78..a5223c853a8 100644 --- a/src/test/resources/cassettes/features/v2/Update_datastore_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_datastore_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2f" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d33" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_incident_notification_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_incident_notification_rule_returns_OK_response.json index 4de99e63586..4b4aaa2bc5d 100644 --- a/src/test/resources/cassettes/features/v2/Update_incident_notification_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_incident_notification_rule_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd8" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd4" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_incident_notification_template_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_incident_notification_template_returns_OK_response.json index b9bf77f1d8f..92e2e3d0445 100644 --- a/src/test/resources/cassettes/features/v2/Update_incident_notification_template_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_incident_notification_template_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bda" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd8" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_Bad_Request_response.json index 4a27cd1e9d6..e642f719a20 100644 --- a/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "a2c05b3b-bab5-013b-200d-7dc622c1b35f" + "id": "a2c05b3b-bab5-013b-200d-7dc622c1b35e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_OK_response.json index 6078cbf29e3..0c4d5613d6a 100644 --- a/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "a2c05b3b-bab5-013b-200d-7dc622c1b35e" + "id": "a2c05b3b-bab5-013b-200d-7dc622c1b35f" }, { "httpRequest": { 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 df4c5fe28da..1d8162b6fb2 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 @@ -21,6 +21,282 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Batch create incident rule execution states returns "Bad Request" response + Given operation "BatchCreateIncidentRuleExecutionStates" enabled + And new "BatchCreateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Batch create incident rule execution states returns "Created" response + Given operation "BatchCreateIncidentRuleExecutionStates" enabled + And new "BatchCreateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Batch create incident rule execution states returns "Not Found" response + Given operation "BatchCreateIncidentRuleExecutionStates" enabled + And new "BatchCreateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Batch update incident rule execution states returns "Bad Request" response + Given operation "BatchUpdateIncidentRuleExecutionStates" enabled + And new "BatchUpdateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Batch update incident rule execution states returns "Not Found" response + Given operation "BatchUpdateIncidentRuleExecutionStates" enabled + And new "BatchUpdateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Batch update incident rule execution states returns "OK" response + Given operation "BatchUpdateIncidentRuleExecutionStates" enabled + And new "BatchUpdateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Create a status page email subscription returns "Bad Request" response + Given operation "CreateStatuspageEmailSubscription" enabled + And new "CreateStatuspageEmailSubscription" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"email": "user@example.com"}, "type": "statuspage_email_subscription"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create a status page email subscription returns "Created" response + Given operation "CreateStatuspageEmailSubscription" enabled + And new "CreateStatuspageEmailSubscription" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"email": "user@example.com"}, "type": "statuspage_email_subscription"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Google Meet space returns "Bad Request" response + Given operation "CreateIncidentGoogleMeetSpace" enabled + And new "CreateIncidentGoogleMeetSpace" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Google Meet space returns "Created" response + Given operation "CreateIncidentGoogleMeetSpace" enabled + And new "CreateIncidentGoogleMeetSpace" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Google Meet space returns "Not Found" response + Given operation "CreateIncidentGoogleMeetSpace" enabled + And new "CreateIncidentGoogleMeetSpace" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira issue returns "Bad Request" response + Given operation "CreateIncidentJiraIssue" enabled + And new "CreateIncidentJiraIssue" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "issue_type_id": "10001", "project_id": "10000", "template_id": "00000000-0000-0000-0000-000000000000"}, "type": "incident_jira_issues"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira issue returns "Created" response + Given operation "CreateIncidentJiraIssue" enabled + And new "CreateIncidentJiraIssue" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "issue_type_id": "10001", "project_id": "10000", "template_id": "00000000-0000-0000-0000-000000000000"}, "type": "incident_jira_issues"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira issue returns "Not Found" response + Given operation "CreateIncidentJiraIssue" enabled + And new "CreateIncidentJiraIssue" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "issue_type_id": "10001", "project_id": "10000", "template_id": "00000000-0000-0000-0000-000000000000"}, "type": "incident_jira_issues"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira template returns "Bad Request" response + Given operation "CreateIncidentJiraTemplate" enabled + And new "CreateIncidentJiraTemplate" request + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira template returns "Created" response + Given operation "CreateIncidentJiraTemplate" enabled + And new "CreateIncidentJiraTemplate" request + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams configuration returns "Bad Request" response + Given operation "CreateIncidentMicrosoftTeamsConfiguration" enabled + And new "CreateIncidentMicrosoftTeamsConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams configuration returns "Created" response + Given operation "CreateIncidentMicrosoftTeamsConfiguration" enabled + And new "CreateIncidentMicrosoftTeamsConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams online meeting returns "Bad Request" response + Given operation "CreateIncidentMSTeamsOnlineMeeting" enabled + And new "CreateIncidentMSTeamsOnlineMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams online meeting returns "Created" response + Given operation "CreateIncidentMSTeamsOnlineMeeting" enabled + And new "CreateIncidentMSTeamsOnlineMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams online meeting returns "Not Found" response + Given operation "CreateIncidentMSTeamsOnlineMeeting" enabled + And new "CreateIncidentMSTeamsOnlineMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Statuspage incident returns "Bad Request" response + Given operation "CreateIncidentStatuspageIncident" enabled + And new "CreateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Statuspage incident returns "Not Found" response + Given operation "CreateIncidentStatuspageIncident" enabled + And new "CreateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Statuspage incident returns "OK" response + Given operation "CreateIncidentStatuspageIncident" enabled + And new "CreateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom configuration returns "Bad Request" response + Given operation "CreateIncidentZoomConfiguration" enabled + And new "CreateIncidentZoomConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom configuration returns "Created" response + Given operation "CreateIncidentZoomConfiguration" enabled + And new "CreateIncidentZoomConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom meeting returns "Bad Request" response + Given operation "CreateIncidentZoomMeeting" enabled + And new "CreateIncidentZoomMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"topic": "Incident INC-123 War Room"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom meeting returns "Created" response + Given operation "CreateIncidentZoomMeeting" enabled + And new "CreateIncidentZoomMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"topic": "Incident INC-123 War Room"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom meeting returns "Not Found" response + Given operation "CreateIncidentZoomMeeting" enabled + And new "CreateIncidentZoomMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"topic": "Incident INC-123 War Room"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident communication returns "Bad Request" response + Given operation "CreateIncidentCommunication" enabled + And new "CreateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident communication returns "Created" response + Given operation "CreateIncidentCommunication" enabled + And new "CreateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident communication returns "Not Found" response + Given operation "CreateIncidentCommunication" enabled + And new "CreateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 404 Not Found + @skip @team:DataDog/incident-app Scenario: Create an incident impact returns "Bad Request" response Given operation "CreateIncidentImpact" enabled @@ -133,6 +409,65 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Bad Request" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Conflict" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Created" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Not Found" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident timeline entry returns "Bad Request" response + Given operation "CreateIncidentTimelineEntry" enabled + And new "CreateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident timeline entry returns "Created" response + Given operation "CreateIncidentTimelineEntry" enabled + And new "CreateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident timeline entry returns "Not Found" response + Given operation "CreateIncidentTimelineEntry" enabled + And new "CreateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:Datadog/incident-app Scenario: Create an incident todo returns "Bad Request" response Given operation "CreateIncidentTodo" enabled @@ -379,6 +714,57 @@ Feature: Incidents When the request is sent Then the response status is 204 OK + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident Jira template returns "Bad Request" response + Given operation "DeleteIncidentJiraTemplate" enabled + And new "DeleteIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident Jira template returns "No Content" response + Given operation "DeleteIncidentJiraTemplate" enabled + And new "DeleteIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident Jira template returns "Not Found" response + Given operation "DeleteIncidentJiraTemplate" enabled + And new "DeleteIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident communication returns "Bad Request" response + Given operation "DeleteIncidentCommunication" enabled + And new "DeleteIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident communication returns "No Content" response + Given operation "DeleteIncidentCommunication" enabled + And new "DeleteIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident communication returns "Not Found" response + Given operation "DeleteIncidentCommunication" enabled + And new "DeleteIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @skip @team:DataDog/incident-app Scenario: Delete an incident impact returns "No Content" response Given there is a valid "incident" in the system @@ -452,6 +838,57 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident role assignment returns "Bad Request" response + Given operation "DeleteIncidentRoleAssignment" enabled + And new "DeleteIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident role assignment returns "No Content" response + Given operation "DeleteIncidentRoleAssignment" enabled + And new "DeleteIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident role assignment returns "Not Found" response + Given operation "DeleteIncidentRoleAssignment" enabled + And new "DeleteIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident timeline entry returns "Bad Request" response + Given operation "DeleteIncidentTimelineEntry" enabled + And new "DeleteIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident timeline entry returns "No Content" response + Given operation "DeleteIncidentTimelineEntry" enabled + And new "DeleteIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident timeline entry returns "Not Found" response + Given operation "DeleteIncidentTimelineEntry" enabled + And new "DeleteIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:Datadog/incident-app Scenario: Delete an incident todo returns "Bad Request" response Given operation "DeleteIncidentTodo" enabled @@ -625,6 +1062,46 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: Export incidents returns "Bad Request" response + Given operation "ExportIncidents" enabled + And new "ExportIncidents" request + And body with value {"fields": ["title", "severity", "state"], "query": "state:active"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Export incidents returns "OK" response + Given operation "ExportIncidents" enabled + And new "ExportIncidents" request + And body with value {"fields": ["title", "severity", "state"], "query": "state:active"} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get PagerDuty related incidents returns "Bad Request" response + Given operation "GetIncidentPagerdutyRelatedIncidents" enabled + And new "GetIncidentPagerdutyRelatedIncidents" request + And request contains "pagerduty_incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get PagerDuty related incidents returns "Not Found" response + Given operation "GetIncidentPagerdutyRelatedIncidents" enabled + And new "GetIncidentPagerdutyRelatedIncidents" request + And request contains "pagerduty_incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get PagerDuty related incidents returns "OK" response + Given operation "GetIncidentPagerdutyRelatedIncidents" enabled + And new "GetIncidentPagerdutyRelatedIncidents" request + And request contains "pagerduty_incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get a list of an incident's integration metadata returns "Bad Request" response Given operation "ListIncidentIntegrations" enabled @@ -741,6 +1218,57 @@ Feature: Incidents Then the response status is 200 OK And the response has 3 items + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident Jira template returns "Bad Request" response + Given operation "GetIncidentJiraTemplate" enabled + And new "GetIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident Jira template returns "Not Found" response + Given operation "GetIncidentJiraTemplate" enabled + And new "GetIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident Jira template returns "OK" response + Given operation "GetIncidentJiraTemplate" enabled + And new "GetIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident communication returns "Bad Request" response + Given operation "GetIncidentCommunication" enabled + And new "GetIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident communication returns "Not Found" response + Given operation "GetIncidentCommunication" enabled + And new "GetIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident communication returns "OK" response + Given operation "GetIncidentCommunication" enabled + And new "GetIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Get an incident notification rule returns "Bad Request" response Given operation "GetIncidentNotificationRule" enabled @@ -765,6 +1293,46 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident reserved role returns "Not Found" response + Given operation "GetIncidentReservedRole" enabled + And new "GetIncidentReservedRole" request + And request contains "role_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident reserved role returns "OK" response + Given operation "GetIncidentReservedRole" enabled + And new "GetIncidentReservedRole" request + And request contains "role_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident role assignment returns "Bad Request" response + Given operation "GetIncidentRoleAssignment" enabled + And new "GetIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident role assignment returns "Not Found" response + Given operation "GetIncidentRoleAssignment" enabled + And new "GetIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident role assignment returns "OK" response + Given operation "GetIncidentRoleAssignment" enabled + And new "GetIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get an incident user-defined field returns "Not Found" response Given operation "GetIncidentUserDefinedField" enabled @@ -795,6 +1363,49 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Get incident automation data returns "Bad Request" response + Given operation "GetIncidentAutomationData" enabled + And new "GetIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident automation data returns "Not Found" response + Given operation "GetIncidentAutomationData" enabled + And new "GetIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident automation data returns "OK" response + Given operation "GetIncidentAutomationData" enabled + And new "GetIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident case source link returns "Not Found" response + Given operation "GetIncidentCaseSourceLink" enabled + And new "GetIncidentCaseSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident case source link returns "OK" response + Given operation "GetIncidentCaseSourceLink" enabled + And new "GetIncidentCaseSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get incident integration metadata details returns "Bad Request" response Given operation "GetIncidentIntegration" enabled @@ -869,10 +1480,69 @@ Feature: Incidents And request contains "id" parameter from "notification_template.data.id" When the request is sent Then the response status is 200 OK - And the response "data.type" is equal to "notification_templates" - And the response "data.id" has the same value as "notification_template.data.id" - And the response "data" has field "attributes" - And the response "data" has field "relationships" + And the response "data.type" is equal to "notification_templates" + And the response "data.id" has the same value as "notification_template.data.id" + And the response "data" has field "attributes" + And the response "data" has field "relationships" + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident page source link returns "Not Found" response + Given operation "GetIncidentPageSourceLink" enabled + And new "GetIncidentPageSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident page source link returns "OK" response + Given operation "GetIncidentPageSourceLink" enabled + And new "GetIncidentPageSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident status pages suggestion returns "Not Found" response + Given operation "GetIncidentStatusPagesSuggestion" enabled + And new "GetIncidentStatusPagesSuggestion" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident status pages suggestion returns "OK" response + Given operation "GetIncidentStatusPagesSuggestion" enabled + And new "GetIncidentStatusPagesSuggestion" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident timeline entry thread returns "Bad Request" response + Given operation "GetIncidentTimelineEntryThread" enabled + And new "GetIncidentTimelineEntryThread" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident timeline entry thread returns "Not Found" response + Given operation "GetIncidentTimelineEntryThread" enabled + And new "GetIncidentTimelineEntryThread" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident timeline entry thread returns "OK" response + Given operation "GetIncidentTimelineEntryThread" enabled + And new "GetIncidentTimelineEntryThread" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK @generated @skip @team:Datadog/incident-app Scenario: Get incident todo details returns "Bad Request" response @@ -953,6 +1623,13 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Get status page subscription preferences returns "OK" response + Given operation "GetStatuspageSubscriptionPreferences" enabled + And new "GetStatuspageSubscriptionPreferences" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get the details of an incident returns "Bad Request" response Given operation "GetIncident" enabled @@ -1005,6 +1682,20 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: List PagerDuty services returns "Bad Request" response + Given operation "ListIncidentPagerdutyServices" enabled + And new "ListIncidentPagerdutyServices" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List PagerDuty services returns "OK" response + Given operation "ListIncidentPagerdutyServices" enabled + And new "ListIncidentPagerdutyServices" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: List an incident's impacts returns "Bad Request" response Given new "ListIncidentImpacts" request @@ -1042,6 +1733,20 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: List incident Jira templates returns "Bad Request" response + Given operation "ListIncidentJiraTemplates" enabled + And new "ListIncidentJiraTemplates" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident Jira templates returns "OK" response + Given operation "ListIncidentJiraTemplates" enabled + And new "ListIncidentJiraTemplates" request + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/incident-app Scenario: List incident attachments returns "Bad Request" response Given operation "ListIncidentAttachments" enabled @@ -1061,6 +1766,30 @@ Feature: Incidents Then the response status is 200 OK And the response "data" has length 1 + @generated @skip @team:DataDog/incident-app + Scenario: List incident communications returns "Bad Request" response + Given operation "ListIncidentCommunications" enabled + And new "ListIncidentCommunications" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident communications returns "Not Found" response + Given operation "ListIncidentCommunications" enabled + And new "ListIncidentCommunications" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List incident communications returns "OK" response + Given operation "ListIncidentCommunications" enabled + And new "ListIncidentCommunications" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: List incident notification rules returns "Bad Request" response Given operation "ListIncidentNotificationRules" enabled @@ -1108,6 +1837,68 @@ Feature: Incidents Then the response status is 200 OK And the response "data" has length 0 + @generated @skip @team:DataDog/incident-app + Scenario: List incident reserved roles returns "OK" response + Given operation "ListIncidentReservedRoles" enabled + And new "ListIncidentReservedRoles" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: List incident rule execution states returns "Bad Request" response + Given operation "ListIncidentRuleExecutionStates" enabled + And new "ListIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident rule execution states returns "Not Found" response + Given operation "ListIncidentRuleExecutionStates" enabled + And new "ListIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List incident rule execution states returns "OK" response + Given operation "ListIncidentRuleExecutionStates" enabled + And new "ListIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: List incident template variables returns "OK" response + Given operation "ListIncidentTemplateVariables" enabled + And new "ListIncidentTemplateVariables" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: List incident timeline entries returns "Bad Request" response + Given operation "ListIncidentTimelineEntries" enabled + And new "ListIncidentTimelineEntries" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident timeline entries returns "Not Found" response + Given operation "ListIncidentTimelineEntries" enabled + And new "ListIncidentTimelineEntries" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List incident timeline entries returns "OK" response + Given operation "ListIncidentTimelineEntries" enabled + And new "ListIncidentTimelineEntries" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: List postmortem templates returns "Bad Request" response Given operation "ListIncidentPostmortemTemplates" enabled @@ -1122,6 +1913,79 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: List status page email subscriptions returns "Not Found" response + Given operation "ListStatuspageEmailSubscriptions" enabled + And new "ListStatuspageEmailSubscriptions" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List status page email subscriptions returns "OK" response + Given operation "ListStatuspageEmailSubscriptions" enabled + And new "ListStatuspageEmailSubscriptions" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/incident-app + Scenario: Patch an incident notification rule returns "Bad Request" response + Given operation "PatchIncidentNotificationRule" enabled + And new "PatchIncidentNotificationRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"conditions": [{"field": "severity", "values": ["SEV-1", "SEV-2"]}], "enabled": true, "handles": ["@team-email@company.com", "@slack-channel"], "renotify_on": ["status", "severity"], "trigger": "incident_created_trigger", "visibility": "organization"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}, "notification_template": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "notification_templates"}}}, "type": "incident_notification_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Patch an incident notification rule returns "Not Found" response + Given operation "PatchIncidentNotificationRule" enabled + And new "PatchIncidentNotificationRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"conditions": [{"field": "severity", "values": ["SEV-1", "SEV-2"]}], "enabled": true, "handles": ["@team-email@company.com", "@slack-channel"], "renotify_on": ["status", "severity"], "trigger": "incident_created_trigger", "visibility": "organization"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}, "notification_template": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "notification_templates"}}}, "type": "incident_notification_rules"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/incident-app + Scenario: Patch an incident notification rule returns "OK" response + Given operation "PatchIncidentNotificationRule" enabled + And new "PatchIncidentNotificationRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"conditions": [{"field": "severity", "values": ["SEV-1", "SEV-2"]}], "enabled": true, "handles": ["@team-email@company.com", "@slack-channel"], "renotify_on": ["status", "severity"], "trigger": "incident_created_trigger", "visibility": "organization"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}, "notification_template": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "notification_templates"}}}, "type": "incident_notification_rules"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Publish an incident status page notice returns "Bad Request" response + Given operation "CreateIncidentStatusPageNotice" enabled + And new "CreateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"components": {"component_1": "degraded_performance"}, "message": "We are investigating reports of elevated error rates.", "status": "investigating", "title": "Service degradation detected."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Publish an incident status page notice returns "Not Found" response + Given operation "CreateIncidentStatusPageNotice" enabled + And new "CreateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"components": {"component_1": "degraded_performance"}, "message": "We are investigating reports of elevated error rates.", "status": "investigating", "title": "Service degradation detected."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Publish an incident status page notice returns "OK" response + Given operation "CreateIncidentStatusPageNotice" enabled + And new "CreateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"components": {"component_1": "degraded_performance"}, "message": "We are investigating reports of elevated error rates.", "status": "investigating", "title": "Service degradation detected."}, "type": "incident_integrations"}} + 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 @@ -1133,6 +1997,33 @@ Feature: Incidents Then the response status is 200 OK And the response "data.relationships.commander_user.data" is equal to null + @generated @skip @team:DataDog/incident-app + Scenario: Render an incident template returns "Bad Request" response + Given operation "RenderIncidentTemplate" enabled + And new "RenderIncidentTemplate" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"content": "Incident INC-123 is SEV-1.", "datetime_format": "2006-01-02T15:04:05Z07:00", "timezone": "America/New_York", "validate_links": false, "validate_variables": false}, "type": "rendered_templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Render an incident template returns "Not Found" response + Given operation "RenderIncidentTemplate" enabled + And new "RenderIncidentTemplate" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"content": "Incident INC-123 is SEV-1.", "datetime_format": "2006-01-02T15:04:05Z07:00", "timezone": "America/New_York", "validate_links": false, "validate_variables": false}, "type": "rendered_templates"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Render an incident template returns "OK" response + Given operation "RenderIncidentTemplate" enabled + And new "RenderIncidentTemplate" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"content": "Incident INC-123 is SEV-1.", "datetime_format": "2006-01-02T15:04:05Z07:00", "timezone": "America/New_York", "validate_links": false, "validate_variables": false}, "type": "rendered_templates"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Search for incidents returns "Bad Request" response Given operation "SearchIncidents" enabled @@ -1170,6 +2061,20 @@ Feature: Incidents Then the response status is 200 OK And the response has 3 items + @generated @skip @team:DataDog/incident-app + Scenario: Search incidents returns "Bad Request" response + Given operation "SearchIncidentsV2" enabled + And new "SearchIncidentsV2" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Search incidents returns "OK" response + Given operation "SearchIncidentsV2" enabled + And new "SearchIncidentsV2" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Update an existing incident integration metadata returns "Bad Request" response Given operation "UpdateIncidentIntegration" enabled @@ -1232,6 +2137,150 @@ 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 Jira template returns "Bad Request" response + Given operation "UpdateIncidentJiraTemplate" enabled + And new "UpdateIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Jira template returns "Not Found" response + Given operation "UpdateIncidentJiraTemplate" enabled + And new "UpdateIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Jira template returns "OK" response + Given operation "UpdateIncidentJiraTemplate" enabled + And new "UpdateIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Microsoft Teams configuration returns "Bad Request" response + Given operation "UpdateIncidentMicrosoftTeamsConfiguration" enabled + And new "UpdateIncidentMicrosoftTeamsConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Microsoft Teams configuration returns "Not Found" response + Given operation "UpdateIncidentMicrosoftTeamsConfiguration" enabled + And new "UpdateIncidentMicrosoftTeamsConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Microsoft Teams configuration returns "OK" response + Given operation "UpdateIncidentMicrosoftTeamsConfiguration" enabled + And new "UpdateIncidentMicrosoftTeamsConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Statuspage incident returns "Bad Request" response + Given operation "UpdateIncidentStatuspageIncident" enabled + And new "UpdateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "statuspage_incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Statuspage incident returns "Not Found" response + Given operation "UpdateIncidentStatuspageIncident" enabled + And new "UpdateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "statuspage_incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Statuspage incident returns "OK" response + Given operation "UpdateIncidentStatuspageIncident" enabled + And new "UpdateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "statuspage_incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Zoom configuration returns "Bad Request" response + Given operation "UpdateIncidentZoomConfiguration" enabled + And new "UpdateIncidentZoomConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Zoom configuration returns "Not Found" response + Given operation "UpdateIncidentZoomConfiguration" enabled + And new "UpdateIncidentZoomConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Zoom configuration returns "OK" response + Given operation "UpdateIncidentZoomConfiguration" enabled + And new "UpdateIncidentZoomConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident communication returns "Bad Request" response + Given operation "UpdateIncidentCommunication" enabled + And new "UpdateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident communication returns "Not Found" response + Given operation "UpdateIncidentCommunication" enabled + And new "UpdateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident communication returns "OK" response + Given operation "UpdateIncidentCommunication" enabled + And new "UpdateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + 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 @@ -1259,6 +2308,69 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident status page notice returns "Bad Request" response + Given operation "UpdateIncidentStatusPageNotice" enabled + And new "UpdateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And request contains "notice_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "The issue has been resolved.", "status": "resolved", "title": "Service degradation resolved."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident status page notice returns "Not Found" response + Given operation "UpdateIncidentStatusPageNotice" enabled + And new "UpdateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And request contains "notice_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "The issue has been resolved.", "status": "resolved", "title": "Service degradation resolved."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident status page notice returns "OK" response + Given operation "UpdateIncidentStatusPageNotice" enabled + And new "UpdateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And request contains "notice_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "The issue has been resolved.", "status": "resolved", "title": "Service degradation resolved."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident timeline entry returns "Bad Request" response + Given operation "UpdateIncidentTimelineEntry" enabled + And new "UpdateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident timeline entry returns "Not Found" response + Given operation "UpdateIncidentTimelineEntry" enabled + And new "UpdateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident timeline entry returns "OK" response + Given operation "UpdateIncidentTimelineEntry" enabled + And new "UpdateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Update an incident todo returns "Bad Request" response Given operation "UpdateIncidentTodo" enabled @@ -1506,3 +2618,33 @@ Feature: Incidents And body with value {"data": {"attributes": {"name": "Standard Postmortem Template"}, "type": "postmortem_template"}} When the request is sent Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Upsert incident automation data returns "Bad Request" response + Given operation "UpsertIncidentAutomationData" enabled + And new "UpsertIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "completed"}, "type": "incidents_automation_data"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Upsert incident automation data returns "Not Found" response + Given operation "UpsertIncidentAutomationData" enabled + And new "UpsertIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "completed"}, "type": "incidents_automation_data"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Upsert incident automation data returns "OK" response + Given operation "UpsertIncidentAutomationData" enabled + And new "UpsertIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "completed"}, "type": "incidents_automation_data"}} + When the request is sent + Then the response status is 200 OK 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 dc1a8b2fbbd..5141ba44f68 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 @@ -2191,6 +2191,54 @@ "type": "idempotent" } }, + "ListIncidentJiraTemplates": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentJiraTemplate", + "parameters": [ + { + "name": "template_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpdateIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "CreateIncidentMicrosoftTeamsConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentMicrosoftTeamsConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListIncidentNotificationRules": { "tag": "Incidents", "undo": { @@ -2222,6 +2270,12 @@ "type": "safe" } }, + "PatchIncidentNotificationRule": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "UpdateIncidentNotificationRule": { "tag": "Incidents", "undo": { @@ -2302,6 +2356,24 @@ "type": "idempotent" } }, + "ListIncidentReservedRoles": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "GetIncidentReservedRole": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ListIncidentTemplateVariables": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "ListIncidentTypes": { "tag": "Incidents", "undo": { @@ -2376,6 +2448,18 @@ "type": "idempotent" } }, + "CreateIncidentZoomConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentZoomConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ImportIncident": { "tag": "Incidents", "undo": { @@ -2389,12 +2473,72 @@ "type": "unsafe" } }, + "ListIncidentPagerdutyServices": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "GetIncidentPagerdutyRelatedIncidents": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentRoleAssignment": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentRoleAssignment", + "parameters": [ + { + "name": "role_assignment_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentRoleAssignment": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentRoleAssignment": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "SearchIncidents": { "tag": "Incidents", "undo": { "type": "safe" } }, + "SearchIncidentsV2": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ExportIncidents": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentStatuspageIncident": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentStatuspageIncident": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "DeleteIncident": { "tag": "Incidents", "undo": { @@ -2456,6 +2600,70 @@ "type": "idempotent" } }, + "GetIncidentAutomationData": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpsertIncidentAutomationData": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentCaseSourceLink": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ListIncidentCommunications": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentCommunication": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentCommunication", + "parameters": [ + { + "name": "incident_id", + "source": "data.attributes.incident_id" + }, + { + "name": "communication_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentCommunication": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentCommunication": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpdateIncidentCommunication": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "CreateIncidentGoogleMeetSpace": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListIncidentImpacts": { "tag": "Incidents", "undo": { @@ -2485,6 +2693,24 @@ "type": "idempotent" } }, + "CreateIncidentJiraIssue": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "CreateIncidentMSTeamsOnlineMeeting": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentPageSourceLink": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "ListIncidentIntegrations": { "tag": "Incidents", "undo": { @@ -2567,6 +2793,94 @@ "type": "idempotent" } }, + "RenderIncidentTemplate": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ListIncidentRuleExecutionStates": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "BatchCreateIncidentRuleExecutionStates": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "BatchUpdateIncidentRuleExecutionStates": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentStatusPagesSuggestion": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentStatusPageNotice": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentStatusPageNotice": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "ListIncidentTimelineEntries": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentTimelineEntry": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentTimelineEntry", + "parameters": [ + { + "name": "incident_id", + "source": "data.attributes.incident_id" + }, + { + "name": "timeline_entry_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentTimelineEntry": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentTimelineEntry": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentTimelineEntryThread": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentZoomMeeting": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListAWSAccounts": { "tag": "AWS Integration", "undo": { @@ -6371,6 +6685,12 @@ "type": "safe" } }, + "GetStatuspageSubscriptionPreferences": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "DeleteStatusPage": { "tag": "Status Pages", "undo": { @@ -6512,6 +6832,18 @@ "type": "idempotent" } }, + "ListStatuspageEmailSubscriptions": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateStatuspageEmailSubscription": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "UnpublishStatusPage": { "tag": "Status Pages", "undo": {